

	function navOn() {
			if ( activeNav != "" ) {
				document.getElementById(activeNav).src = "images/nav_" + activeNav + "_on.gif"
			}
		}
	function ButtonOnOff(ObjButton, bAction) {
		thisbutton = ObjButton;
		if ( bAction == "on" ) {
			var buttonaction = "over";
		}
		else {
			var buttonaction = "off";
		}
		thisbuttonid = thisbutton.id;
		newImgPath = "images/nav_" + thisbuttonid + "_" + buttonaction + ".gif";
		thisbutton.src = newImgPath;
		navOn();
	}
	
	function cycleSOC(cycletype) {
		if ( cycletype == 2 ) {
		setTimeout("activateSOC('SOC2', 'SOC1')", 6000);
		setTimeout("activateSOC('SOC3', 'SOC2')", 12000);
		setTimeout("activateSOC('SOC1', 'SOC3')", 18000);
		setTimeout("cycleSOC()", 24000);
		}
		else {
		setTimeout("activateSOC('SOC2', 'SOC1')", 3000);
		setTimeout("activateSOC('SOC3', 'SOC2')", 6000);
		setTimeout("activateSOC('SOC1', 'SOC3')", 12000);
		setTimeout("cycleSOC()", 12001);
		}
		
	}

	function activateSOC(SOCID, SOCIDX) {
		changeOpac(0, SOCID)
		document.getElementById(SOCID).style.display = "block";
		opacity(SOCIDX, 100, 0, 2000);
		opacity(SOCID, 0, 100, 2000);
	}
	

	function cycleTC() {
		setTimeout("activateTC('TC2', 'TC1')", 3000);
		setTimeout("activateTC('TC3', 'TC2')", 6000);
		setTimeout("activateTC('TC1', 'TC3')", 9000);
		setTimeout("cycleTC()", 12000);
	}

	function activateSOC(SOCID, SOCIDX) {
		changeOpac(0, SOCID)
		document.getElementById(SOCID).style.display = "block";
		opacity(SOCIDX, 100, 0, 2000);
		opacity(SOCID, 0, 100, 2000);
	}

	
	function opacity(id, opacStart, opacEnd, millisec) { 
	    //speed for each frame 
	    var speed = Math.round(millisec / 100); 
	    var timer = 0; 
	
	    //determine the direction for the blending, if start and end are the same nothing happens 
	    if(opacStart > opacEnd) { 
	        for(i = opacStart; i >= opacEnd; i--) { 
	            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
	            timer++; 
	        } 
	    } else if(opacStart < opacEnd) { 
	        for(i = opacStart; i <= opacEnd; i++) 
	            { 
	            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
	            timer++; 
	        } 
	    } else if ( opacStart == opacEnd && opacEnd == 0 ) {
			document.getElementById(id).style.display = "none";
		}
	} 
	
	
	//change the opacity for different browsers 
	function changeOpac(opacity, id) { 
	    var object = document.getElementById(id).style; 
	    object.opacity = (opacity / 100); 
	    object.MozOpacity = (opacity / 100); 
	    object.KhtmlOpacity = (opacity / 100); 
	    object.filter = "alpha(opacity=" + opacity + ")"; 
	} 
	
