
function pixTimeChange(time) {
	
	var t = new Date();
    //var h = t.getHours();
   var h = time;
   // In the example here, "7" = 7 AM; "19" =7PM.
   //alert(document.getElementById("myimage"));
   if (h >= 7 && h < 19)
    {
    	document.getElementById("off").style.display="none"; 
    	document.getElementById("on").style.display="block";
    }
    else
    {
    	document.getElementById("on").style.display="none"; 
    	document.getElementById("off").style.display="block";  
	}
}

function startclock(time, ListDate, todayDate) {
	var ListDate01 = ListDate.split("*");   
	var i, ListDate01Split, todayDateSplit;
	var checkFlag = 0;
	for(i=0; i<ListDate01.length-1; i++)
	{
		ListDate01Split = ListDate01[i].split(" ");
		todayDateSplit = todayDate.split(" ");
		
		if(checkFlag == 0)
		{
			if(ListDate01Split[0] == todayDateSplit[0])
			{
				checkFlag = 1;
				document.getElementById("on").style.display = "Block"; 
	    		document.getElementById("off").style.display = "none";
	    		$('#on img').attr('src','/PublishingImages/LiveChat/LiveChat_VacationOff.jpg');	    		
	    	}
	    	else
	    	{
	    		var curTime = time;
				//Initial call otherwise the clock would display blank for the first second
	    		pixTimeChange(curTime );
	    	}
    	}
	}
}

// JScript source code

