function preloader() 
{
    but1 = new Image(); 
    but1.src = "images/menu-on.jpg";
}

function ConfirmDeletion()
{
   var message = "Are you sure you wish to delete this record?";
   return confirm(message);
}

function kalendar(input)
{ 
    var calScheduleDate = new calendar1(document.getElementById(input));
    calScheduleDate.popup();
}

function zoomImage(imagePath)
{
    var newWindow = window.open("", "ZOOM", "scrollbars=auto,width=2,height=2,left=200,top=200,resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,copyhistory=0");         
    newWindow.document.write("<html><head><title>.:: HACCPWORKS ::.</title></head><body>");
    newWindow.document.write("<a href=\"javascript:self.close()\"><img src=\"" + imagePath + "\" alt=\"Click to close!\" border='0' \></a>");
    newWindow.document.write("</body></html>");
    newWindow.resizeTo(newWindow.document.images[0].width + 30, newWindow.document.images[0].height + 50);
}


	function goLog()
	{
	    if( document.getElementById("Header_lbLogin").innerHTML == "Log In" )
	    {
	        document.location.href = "Default.aspx?nofobj='Y'";
	        
	    }
	    else 
	        document.location.href = "Default.aspx?nofobj='Y'";
//	        document.location.href = "Home.aspx";
	    
	}
	


  if(window.attachEvent)
    window.attachEvent("onload",setListeners);

  function setListeners(){
    inputList = document.getElementsByTagName("INPUT");
    for(i=0;i<inputList.length;i++){
      inputList[i].attachEvent("onpropertychange",restoreStyles);
      inputList[i].style.backgroundColor = "";
    }
    selectList = document.getElementsByTagName("SELECT");
    for(i=0;i<selectList.length;i++){
      selectList[i].attachEvent("onpropertychange",restoreStyles);
      selectList[i].style.backgroundColor = "";
    }
  }

  function restoreStyles(){
    if(event.srcElement.style.backgroundColor != "")
      event.srcElement.style.backgroundColor = "";
  }
  if(window.attachEvent)
    window.attachEvent("onload",setListeners);

  function setListeners(){
    inputList = document.getElementsByTagName("INPUT");
    for(i=0;i<inputList.length;i++){
      inputList[i].attachEvent("onpropertychange",restoreStyles);
      inputList[i].style.backgroundColor = "";
    }
    selectList = document.getElementsByTagName("SELECT");
    for(i=0;i<selectList.length;i++){
      selectList[i].attachEvent("onpropertychange",restoreStyles);
      selectList[i].style.backgroundColor = "";
    }
  }

  function restoreStyles(){
    if(event.srcElement.style.backgroundColor != "")
      event.srcElement.style.backgroundColor = "";
  }
