// JavaScript Document
 var isIE=1;
 var isSaf=0;
 if (navigator.userAgent.indexOf("MSIE")==-1){isIE=0};
 if (navigator.userAgent.indexOf("AppleWebKit")>=0){isSaf=1};
 function getObj(objID) {
    // Chino's Super Duper DOM addressing script (xbrowser within limits..:-)
    if(document.getElementById && document.getElementById(objID)) {
	// W3C
	return document.getElementById(objID);
    } else if (document.all && document.all(objID)) {
	// IE4
	return document.all(objID);
    } else if (document.layers && document.layers[objID]) {
	// NS4 .. note: not perfect.. this will not find nested layers
	return document.layers[objID];
    } else {
    // returning 0, will not work for anything else
	alert("Chino's getObj() function failed. The object '"+objID+"' cannot be found. This script will now error out.");
	return false;
    }
 } 
 function msg(m){
	 if(getObj("msgbox")){
		t = getObj("msgbox").innerHTML;
		getObj("msgbox").innerHTML = m+"<br>"+t;
	 }
 }
 var ma = new Array();
function swapMasks(){
		 setTimeout("swapMask('mask1','mask2')",10000)
	 setTimeout("swapMask('mask2','mask3')",25000)
	 setTimeout("swapMask('mask3','mask1')",40000)
/*
	 if(isSaf){
	 setTimeout("swapMask('mask1','mask2')",5000)
	 setTimeout("swapMask('mask2','mask3')",20000)
	 setTimeout("swapMask('mask3','mask4')",35000)
	 setTimeout("swapMask('mask4','mask1')",50000)
	 } else {
//	 setTimeout("swapMask('mask4','mask5')",40000)
//	 setTimeout("swapMask('mask5','mask6')",50000)
//	 setTimeout("swapMask('mask6','mask1')",60000)
	 //setTimeout("swapMask('mask7','mask8')",70000)
	 //setTimeout("swapMask('mask8','mask9')",80000)
	 //setTimeout("swapMask('mask9','mask10')",90000)
	 //setTimeout("swapMask('mask10','mask11')",100000)
	 //setTimeout("swapMask('mask11','mask1')",110000)
	 }
*/
 }
 function showcontactinfo(){
 	getObj("contactinfo").style.zIndex=20;
	getObj("contactinfo").style.display="inline"; 
 	getObj("copyblock").style.zIndex=0;
 	getObj("topnav").style.zIndex=0;

 }
 function hidecontactinfo(){
	getObj("contactinfo").style.display="none"; 
 	getObj("contactinfo").style.zIndex=0;
 	getObj("copyblock").style.zIndex=3;
 	getObj("topnav").style.zIndex=3;
 }



window.onload=function(){
	swapMasks();
}



















 ///////////////
 //////////////
 /////////////
 ////////////
 ///////////
 //////////
 /////////
 ////////
 ///////
 //////
 /////
 ////
 ///
 //
 var iCount=0;
 var oCount=100;
 var fTimer;
 function fadeIn(theMask){
	myObj = getObj(theMask).style;
	if (!myObj) {return(0)};
	 myObj.zIndex=1;
	if (isIE) { 
		myObj.filter	= "Alpha(opacity=" + iCount + ")";
		} else {
		myObj.opacity = eval("." + iCount);
		}
	iCount = iCount + 1;
	if(iCount>=100){
		iCount = 0;
		return("Done!");
		}else{
		fTimer = setTimeout("fadeIn('"+theMask+"')",30);
		}
	}
 function fadeOut(theMask){
	myObj = getObj(theMask).style;
	if (!myObj) {return(0)};
	if (isIE) { 
		myObj.filter	= "Alpha(opacity=" + oCount + ")";
		} else {
		myObj.opacity = eval("." + oCount);
		}
	oCount = oCount - 1;
	if(iCount<=0){
		iCount = 100;
		return("Done!");
		}else{
		fTimer = setTimeout("fadeOut('"+theMask+"')",30);
		}
	}
 var offcounterMask=100;
 var oncounterMask=0;
 var onTimer;
 var offTimer;
 function swapMask(oMask,nMask){
	myMaskObj = getObj(nMask);
	if (!myMaskObj) {return(0)};
	myMaskObj.style.zIndex=1;	
	if (isIE) { 
		myMaskObj.style.filter	= "Alpha(opacity=" + oncounterMask + ")";
		} else {
		myMaskObj.style.opacity = oncounterMask/100;
	}
	 oncounterMask=oncounterMask+1;
	if(oncounterMask==50){swapMask2(oMask)};
	if (oncounterMask<=100) {
		onTimer = setTimeout("swapMask('"+oMask+"','"+nMask+"');",10);
		} else {
	    oncounterMask=0;
		onTimer = null;
		if(nMask=="mask1"){setTimeout("swapMasks()", 1000)};
		//msg(nMask+" displayed!");
		return(0);
		
	}
	 	
 }
 function swapMask2(oMask){
	myObjMask = getObj(oMask);
	if (!myObjMask) {return(0)};
	if (isIE) { 
		myObjMask.style.filter	= "Alpha(opacity=" + offcounterMask + ")";
		} else {
		myObjMask.style.opacity = offcounterMask/100;
	}
	 offcounterMask=offcounterMask-1;
	if (offcounterMask>0) {
		offTimer = setTimeout("swapMask2('"+oMask+"');",10);
		} else {
		offTimer = null;
		myObjMask.style.zIndex=0;	
	    offcounterMask=100;
		//msg(oMask+" hidden!");
		return(0);
	}
 }


