	var standard=100;
	var max=151;
	var min=59;
	var step=5;
	var parselimit
	var limit
	var i=1
	
	function updateZoom(value) {
		document.body.style.zoom = value + "%";		
	}			
		
	function textSize(size)	{			
		
		if (size == "S")
		{				
			if(standard>min)
			{
				standard=Math.round(standard-step);									
				updateZoom(standard);
			}	
		}
		if(size == "L")
		{		
			if(standard<max)
			{					
				standard=Math.round(standard+step);
				updateZoom(standard);
			}					
		}
		if(size == "M")
		{
			standard=100;					
			updateZoom(standard);
		}				
		
	}
	
	function autoRefresh()
	{
		//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
		limit="0:5"

		if (document.images)
		{
		parselimit=limit.split(":")
		parselimit=parselimit[0]*60+parselimit[1]*1
		}
		
		beginrefresh();
		
	}
	function beginrefresh()
	{
		
		if (!document.images)
		return
		if (parselimit==1)
		
		//window.location.reload()
		HomeImageRotate();
		else
		{ 
		parselimit-=1
		curmin=Math.floor(parselimit/60)
		cursec=parselimit%60
		/*
		if (curmin!=0)
		curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!"
		else
		curtime=cursec+" seconds left until page refresh!"
		window.status=curtime
		*/
		setTimeout("beginrefresh()",1000)
		}
	}
		
	function HomeImageRotate()
	{
		
		self.status=301;
		var strSelfURL=self.location.toString();
		if (strSelfURL.indexOf("www")==-1)
			self.location="http://www.cancertrialshelp.org";
		var imgPath
		if(i==1)/*Identiy the call:Page load event OR Recyclic call*/
		{
				    var valueTemp = document.cookie;
				    var stindexTemp;									
					/*stindexTemp=valueTemp.indexOf(';')
					valueTemp=valueTemp.substring(0,stindexTemp)*/
					var len=valueTemp.length
					valueTemp = valueTemp.substring(len-1,len)
					
					if(valueTemp==1 || valueTemp==2 || valueTemp==3 || valueTemp==4)/*Don't consider the other values in the cookie*/
					{
						if(i!=valueTemp)/*Identify the call:From page load*/
							{
								
									i=valueTemp
							
							}
					}
						
						Set_Cookie('colorCookie',i)
                  
        }

		var value = document.cookie;
		var stindex;									
		/*stindex=value.indexOf(';')
		value=value.substring(0,stindex)*/
		var len=value.length
		value = value.substring(len-1,len)	
				
		if(value!=null)
		{

			i=value
		}				
		switch(parseInt(i))
		{

			case 1:
			imgPath='images/Options.jpg'
			i++
			Delete_Cookie('colorCookie')
			Set_Cookie('colorCookie',i)
			break;    
			case 2:	
			imgPath='images/Consider.jpg'
			i++	
			Delete_Cookie('colorCookie')
			Set_Cookie('colorCookie',i)	
			break;
			
			case 3:	
			imgPath='images/Quality Care.jpg'
			i++	
			Delete_Cookie('colorCookie')
			Set_Cookie('colorCookie',i)	
			break;
			case 4:	
			imgPath='images/Connects.gif'
			i=1	
			Delete_Cookie('colorCookie')
			Set_Cookie('colorCookie',i)	
			break;
			default:
		}
	
		var strUrl=imgPath;	
		document.getElementById('tdHomeImg').style.backgroundImage='url('+strUrl+')';
		var strImage=document.getElementById('tdHomeImg').style.backgroundImage;
		
		/*
		if(strImage.toString().indexOf('Options.jpg')!=-1)
		{
			document.getElementById('tdHomeText').innerHTML='92% of cancer clinical trial participants had a positive experience*';
		}
		if(strImage.toString().indexOf('Consider.jpg')!=-1)
		{
			document.getElementById('tdHomeText').innerHTML='96% of Cancer Clinical Trial Participants Felt They Were Treated with Dignity and Respect*';
		}
		if(strImage.toString().indexOf('Quality Care.jpg')!=-1)
		{
			document.getElementById('tdHomeText').innerHTML='91% of Cancer Clinical Trial Participants Would Recommend a Trial to Others*';
		}
		*/	
		
		autoRefresh();		
		
	}
		
	function Set_Cookie(name,value) { 			
		var cookieString = name + "=" +value 			
		document.cookie = cookieString;	
			
		}
		
	function Delete_Cookie(name)
	{
		var cookie_date = new Date();
		cookie_date.setTime ( cookie_date.getTime() - 1 );					
		
		if (Get_Cookie(name)!='') 
		{
			document.cookie = name + "=" + 			
			";expires=" + cookie_date.toLocaleString();
		}
	}	
			
	function Get_Cookie(name) { 
		var start = document.cookie.indexOf(name+"="); 			
		var len = start+name.length+1; 			
		if ((!len) && (name != document.cookie.substring(0,name.length))) return null; 
		if (start == -1) return null; 
		var end = document.cookie.indexOf(";",len); 			
		if (end == -1) end = document.cookie.length; 			
		return unescape(document.cookie.substring(len,end)); 
	} 		