
	var initValue = 1; 	
	 
	function rotateTime(){				
		var aPar = "topbar" + initValue;
		
		change(aPar,'rollImage');
		initValue = initValue + 1;		
		if (initValue == 5){
			initValue = 1;
		}
		setTimeout("rotateTime()", 6000);		
	}
		
	function change(a,b){
		document.getElementById(a).style.color="1c3664";
		document.getElementById(a).style.backgroundImage = "url('/images/icons/top_bgr2.gif')";		
		
		if (a == "topbar1")		
			{
				
				document.getElementById(b).style.backgroundImage = "url('/images/icons/homekitchenquiz.jpg')";	
			urllink = "http://publichealth.lacounty.gov/eh/misc/homeKitchenSelfInspection.htm";

			changeback('topbar1');
			}
			
		if (a == "topbar2")		
			{
				document.getElementById(b).style.backgroundImage = "url('/images/icons/fluseason.jpg')";	
			urllink = "http://publichealth.lacounty.gov/ip/flu/FluLocatorMain.htm";
			changeback('topbar2');
			}
		if (a == "topbar3")		
			{
		document.getElementById(b).style.backgroundImage = "url('/images/icons/sugarydrinks.jpg')";	
			urllink = "http://www.choosehealthla.com/eat-healthy/sugar-loaded-beverages/";
			
			changeback('topbar3');
			}
			
		if (a == "topbar4")	
		{	document.getElementById(b).style.backgroundImage = "url('/images/icons/con-prep-resp.gif')";	
			urllink = "http://www.prepare2respond.org";
			//document.getElementById(b).style.backgroundImage = "url('/images/icons/hiv-week.jpg')";				
			//urllink = "http://www.erasedoubt.org";			
			changeback('topbar4');
		
		}
	
		
		
	
	}

	function changeback(a){
		
		for (i=1; i<5;i++){
		var excludePar = "topbar" + i;
		if (excludePar != a){
		
			document.getElementById(excludePar).style.color="48525b";
			document.getElementById(excludePar).style.backgroundImage = "url('/images/icons/top_bgr.gif')";
			}
		}
	}
	function gourl(){
		
		window.location = urllink;		
	}

