function doOver(ImageName, ImageSrc) {
	document[ImageName].src = ImageSrc;
}
function ShowHide(chk,obj)
{
	if(chk.checked)
	{
		obj.style.display = "";
	}
	else
	{
		obj.style.display = "none";
	}
}




function getLayer (level, LayerName) {
	if (document.all) {
		// IE
		return eval(LayerName);
	} else if (document.getElementById) {
		// NS6
		return document.getElementById(LayerName);
	} else if (document.layers) {
		// NS
		if (level == "") level = document;
		if (level.layers) {
			for (var i = 0; i < level.layers.length; i++) {
				if (level.layers[i].name == LayerName) return level.layers[i]
				else if (level.layers[i].layers.length > 0) {
					var obj = getLayer(level.layers[i], LayerName)
					if (obj && obj != null) return obj
				}
			}
		}
		return false;
	}
}
// Example:
// simplePreload( '01.gif', '02.gif' ); 
function imagePreload()
{ 
  var args = imagePreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}
function privacypolicy() {
	PrivacyPolicyWin = window.open("/terms.html","PrivacyPolicyWin","top=0,left=0,width=400,height=550,scrollbars=1");
	PrivacyPolicyWin.focus();
}

function LaunchEventsNext() {
	PrivacyPolicyWin = window.open("/section_1/eventsnext.html","eventsnext","top=0,left=0,width=400,height=550,scrollbars=1");
	PrivacyPolicyWin.focus();
}



function embedObject() {
	sEmbedType = arguments[0];
	sURL = arguments[1];
	iWidth = arguments[2];
	iHeight = arguments[3];
	sBGColor = arguments[4];
	sName = arguments[5];
	
	if (sEmbedType.toLowerCase() == "mov") {
	
		document.write ('<EMBED WIDTH="'+iWidth+'" HEIGHT="'+iHeight+'" CONTROLLER="TRUE" SRC="'+sURL+'" id="'+sName+'" name="'+sName+'" type="video/quicktime" BGCOLOR="#'+sBGColor+'" BORDER="0" PLUGINSPAGE="http://www.apple.com/quicktime/download/indext.html" EnableJavaSript="true"></EMBED>');
		
	} else if (sEmbedType.toLowerCase() == "wmv") {
	
		document.write ('<object ID="'+sName+'" WIDTH="'+iWidth+'" HEIGHT="'+iHeight+'" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">');
		document.write ('<param NAME="FileName" VALUE="'+sURL+'">');
		document.write ('<param NAME="ShowControls" VALUE="1">');
		document.write ('<param NAME="ShowDisplay" VALUE="0">');
		document.write ('<param NAME="ShowStatusBar" VALUE="0">');
		document.write ('<param NAME="BgColor" VALUE="#'+sBGColor+'">');
		document.write ('<param NAME="AutoSize" VALUE="0">');
		document.write ('<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" src="'+sURL+'" Name="'+sName+'" ShowControls="1" ShowDisplay="0" ShowStatusBar="0" WIDTH="'+iWidth+'" HEIGHT="'+iHeight+'"></embed>');
		document.write ('</object>');
	
	} else if (sEmbedType.toLowerCase() == "swf") {
	
		sWMode = arguments[5];
		sScale = arguments[6];	
		iFlashVersionRequired = arguments[7];
		
		if (sScale == undefined || sScale == "") {
			sScale = "noscale"
		}
		if (sWMode == undefined || sWMode == "") {
			sWMode = "opaque"
		}		
		document.write ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+iFlashVersionRequired+'" width="'+iWidth+'" height="'+iHeight+'" border="0" vspace="0" hspace="0">');
		document.write ('<param name="movie" value="'+sURL+'">');
		document.write ('<param name="quality" value="high">');
		document.write ('<param name="scale" value="'+sScale+'">');
		document.write ('<param name="menu" value="false">');
		if (sBGColor != "") {
			document.write ('<param name="bgcolor" value="#'+sBGColor+'">');
		}
		document.write ('<param name="wmode" value="'+sWMode+'">');
		
		document.write ('<embed src="'+sURL+'" wmode="'+sWMode+'" ');
		if (sBGColor != "") {
			document.write ('bgcolor="#'+sBGColor+'" ');
		}
		document.write ('quality="high" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" swliveconnect="true" width="'+iWidth+'" height="'+iHeight+'" scale="'+sScale+'" border="0" vspace="0" hspace="0"></embed></OBJECT>');
	
	}
}
function toggleDiv(id,flagit) {
	if (document.layers) document.layers[''+id+''].visibility = "show"
	else if (document.all) document.all[''+id+''].style.visibility = "visible"
	else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
}

function hideAllGalleryDivs(theClass) {
	var allPageTags = new Array(); 
	// Populate the array with all the page tags
	var allPageTags = document.getElementsByTagName("*");
	// Cycle through the tags using a for loop
	for (i = 0; i < allPageTags.length; i++) {
		// Pick out the tags with our class name
		if (allPageTags[i].className == theClass) {
			// Manipulate this in whatever way you want
			if (document.layers) allPageTags[i].visibility = "hide"
			else if (document.all) allPageTags[i].style.visibility = "hidden"
			else if (document.getElementById) allPageTags[i].style.visibility = "hidden"
		}
	}
} 
