//default image url link
	var initValue = 1; 	
	 
	function rotateTime(){				
		var aPar = "topbar" + initValue;
		//alert(aPar);
		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/h1n1.jpg')";	
			urllink = "http://www.publichealth.lacounty.gov/acd/h1n1.htm";
			changeback('topbar1');
			}
		if (a == "topbar2")	
		{document.getElementById(b).style.backgroundImage = "url('/images/icons/storm.jpg')";	
		//url('/images/icons/24hotline.jpg')
		//urllink = "http://publichealth.lacounty.gov/ivpp/hotlines.htm";
		urllink = "http://publichealth.lacounty.gov/storm.htm";

		changeback('topbar2');
		
		}
		if (a == "topbar3")	
		{//document.getElementById(b).style.backgroundImage = "url('/images/icons/prepared.jpg')";	
			//urllink = "http://publichealth.lacounty.gov/eprp/media/index.htm";
			document.getElementById(b).style.backgroundImage = "url('/images/icons/heartdisease.jpg')";	
			urllink = "http://publichealth.lacounty.gov/docs/heartdisease.pdf";
			changeback('topbar3');
		}
		if (a == "topbar4")	
				{//document.getElementById(b).style.backgroundImage = "url('/images/icons/quittingtimela.jpg')";	
				document.getElementById(b).style.backgroundImage = "url('/images/icons/beCounted.jpg')";	
				urllink = "http://publichealth.lacounty.gov/census.htm";
				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(){
		//alert(urllink);
		window.location = urllink;		
	}
