// JavaScript Document
var ShowNav = function(show) 
{
	var hide = show == '01' ? '02' : '01';
	var showH = document.getElementById('ANavH' + show)
	var showN = document.getElementById('ANav' + show)
	var hideH = document.getElementById('ANavH' + hide)
	var hideN = document.getElementById('ANav' + hide)
	
	if (showH.className != 'active')
	{
		showH.className = 'active';
		showN.className = showN.className + ' active';
		
		hideH.className = '';
		hideN.className = hideN.className.replace(/active/,'');
	}
};


var RRGallery = 
{
	init : function(flash)
	{
		this.currentActiveThumb = document.getElementById('GalleryWrapper').getElementsByTagName('a')[0];
		this.fullImgWrapper = document.getElementById('GalleryFullImg');
		this.galleryTextWrapper = document.getElementById('GalleryText');
		if (flash)
		{
			this.images[0] = this.images[0].replace(/.swf/,'');
			//AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','320','height','240','src',this.images[0],'quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie',this.images[0]);
			AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','320','height','214','id','FLVPlayer','src','/flash/videos/FLVPlayer_Progressive','flashvars','&MM_ComponentVersion=1&skinName=/flash/videos/Clear_Skin_1&streamName=' + this.images[0] + '&autoPlay=false&autoRewind=false','quality','high','scale','noscale','name','FLVPlayer','salign','lt','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','/flash/videos/FLVPlayer_Progressive' ); //end AC code
		}
		else 
		{
			this.fullImg = this.fullImgWrapper.getElementsByTagName('img')[0];
			this.fullImg.removeAttribute('height');
		}
	},
	
	switchImg : function(index,obj,flash)
	{
		if (this.currentActiveThumb)
		{
			this.currentActiveThumb.className = '';
		}
		
		obj.className = 'active';
		this.currentActiveThumb = obj;
		
		if (!flash)
		{
			this.fullImg.src = this.images[index];
			this.fullImg.alt = this.title[index];
			this.fullImg.title = this.title[index];
		}
		else
		{
			this.images[index] = this.images[index].replace(/.swf/,'');
			//AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','320','height','240','src',this.images[index],'quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie',this.images[index]);
			AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','320','height','214','id','FLVPlayer','src','/flash/videos/FLVPlayer_Progressive','flashvars','&MM_ComponentVersion=1&skinName=/flash/videos/Clear_Skin_1&streamName=' + this.images[index] + '&autoPlay=false&autoRewind=false','quality','high','scale','noscale','name','FLVPlayer','salign','lt','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','/flash/videos/FLVPlayer_Progressive' ); //end AC code

		}
		
		if (this.title[index])
		{
			this.galleryTextWrapper.style.display = 'block';
			this.galleryTextWrapper.innerHTML = this.title[index];
		}
		else
		{
			this.galleryTextWrapper.style.display = 'none';
			this.galleryTextWrapper.innerHTML = '';
		}
		
		return false;
	}
};


var ToggleNews =
{
	register : function(activeClass,inActiveClass)
	{
		this.activeElem = null;
		this.activeClass = activeClass;
		this.inActiveClass = inActiveClass;
	},
	
	action : function(id)
	{
		this.showElem = document.getElementById(id);
		
		if (this.activeElem != null)
			this.hide();
		
		if (this.activeElem != this.showElem)
		{
			this.show(this.showElem);
		}
	},
	
	hide : function()
	{
		this.activeElem.className = this.inActiveClass;
		this.activeElem = null;
	},
	
	show : function(id)
	{				
		this.showElem.className = this.activeClass;
		this.activeElem = this.showElem;
	}
};
