// JavaScript Document

// preload images
function loadImages() {
if (document.images)
{
  pic0= new Image(250,160); 
  pic0.src="images/logo.jpg";
  
  pic00= new Image(550,210); 
  pic00.src="images/temperature_compliance.jpg";
  
  pic1= new Image(90,45); 
  pic1.src="images/nav_home.gif"; 

  pic4= new Image(90,45); 
  pic4.src="images/nav_company.gif"; 

  pic7= new Image(90,45); 
  pic7.src="images/nav_press.gif"; 

  pic10= new Image(90,45); 
  pic10.src="images/nav_distributors.gif"; 

  pic13= new Image(90,45); 
  pic13.src="images/nav_contact.gif"; 

  pic16= new Image(90,45); 
  pic16.src="images/nav_links.gif"; 

  pic19= new Image(250,25); 
  pic19.src="images/nav_monitoring.gif"; 

  pic20= new Image(250,25); 
  pic20.src="images/nav_monitoring_on.gif"; 

  pic21= new Image(250,25); 
  pic21.src="images/nav_critical.gif"; 

  pic22= new Image(250,25); 
  pic22.src="images/nav_critical_on.gif"; 

  pic23= new Image(250,25); 
  pic23.src="images/nav_operational.gif"; 

  pic24= new Image(250,25); 
  pic24.src="images/nav_operational_on.gif";

  pic25= new Image(250,25); 
  pic25.src="images/nav_products.gif"; 

  pic26= new Image(250,25); 
  pic26.src="images/nav_products_on.gif";
  
  pic27= new Image(550,210);
  pic27.src="images/companyinfo.jpg";
  
  pic28= new Image(550,210);
  pic28.src="images/image2.jpg";
  
  pic29= new Image(550,210);
  pic29.src="images/image6.jpg";

  pic30= new Image(550,210);
  pic30.src="images/building.jpg";
  
  pic31= new Image(250,508);
  pic31.src="images/logo_btm.gif";
  
  pic32= new Image(550,30);
  pic32.src="images/top_right.gif";
  
  pic33= new Image(11,45);
  pic33.src="images/nav_spacer.gif";
  
  pic34= new Image(550,30);
  pic34.src="images/image_break.gif";
  
  pic35= new Image(550,210);
  pic35.src="images/image5.jpg";
  
  pic36= new Image(550,210);
  pic36.src="images/hospice_center.jpg";
  
  pic37= new Image(550,210);
  pic37.src="images/medical3.jpg";
  
  pic38= new Image(550,30);
  pic38.src="images/image_break.gif";
  
  pic2= new Image(90,45); 
  pic2.src="images/nav_home_on.gif"; 

  pic3= new Image(90,45); 
  pic3.src="images/nav_home_over.gif"; 

  pic5= new Image(90,45); 
  pic5.src="images/nav_company_on.gif"; 

  pic6= new Image(90,45); 
  pic6.src="images/nav_company_over.gif";

  pic8= new Image(90,45); 
  pic8.src="images/nav_press_on.gif"; 

  pic9= new Image(90,45); 
  pic9.src="images/nav_press_over.gif"; 

  pic11= new Image(90,45); 
  pic11.src="images/nav_distributors_on.gif"; 

  pic12= new Image(90,45); 
  pic12.src="images/nav_distributors_over.gif";

  pic14= new Image(90,45); 
  pic14.src="images/nav_contact_on.gif"; 

  pic15= new Image(90,45); 
  pic15.src="images/nav_contact_over.gif"; 

  pic17= new Image(90,45); 
  pic17.src="images/nav_links_on.gif"; 

  pic18= new Image(90,45); 
  pic18.src="images/nav_links_over.gif";

  pic39= new Image(224,768); 
  pic39.src="images/main2_03.gif";
  
  pic40= new Image(224,768); 
  pic40.src="images/main2_03.gif";
  
  pic41= new Image(550,210);
  pic41.src="images/medical2.jpg";

	}
}

//script for pop up window
function popUp(url) {
	return window.open(url, "thewindow", "width=690, height=690, resize=no, menubar=no, status=yes");
}

//script for contact page
function validate() {
     if (document.contactform.fullname.value == "")
		{
		alert ("Please enter your name.")
		return false
		}
	if (document.contactform.message.value == "")
		{
		alert ("Please enter a message.")
		return false
		}
	if(document.contactform.email.value.length == 0) { 
      document.contactform.email.focus(); 
      alert("Please enter your email."); 
      return false; 
      }
	  
	if(-1 == document.contactform.email.value.indexOf("@")) { 
       document.contactform.email.focus(); 
       alert("Your email must have a '@'."); 
       return false; 
       }
    if(-1 != document.contactform.email.value.indexOf(",")) { 
       document.contactform.email.focus(); 
       alert("Your email must not have a ',' in it"); 
       return false; 
       }
    if(-1 != document.contactform.email.value.indexOf("#")) { 
       document.contactform.email.focus(); 
       alert("Your email must not have an '#' in it." ); 
       return false; 
       }
    if(-1 != document.contactform.email.value.indexOf("!")) { 
       document.contactform.email.focus(); 
       alert("Your email must not have a '!' in it." ); 
       return false; 
       }
    if(-1 != document.contactform.email.value.indexOf(" ")) { 
       document.contactform.email.focus(); 
       alert("Your email must not have a space in it." ); 
       return false; 
       }
    if(document.contactform.email.value.length == (document.jsform.email.value.indexOf("@")+1) ) {
       document.contactform.email.focus();
       alert("Your email must have a domain name after the '@'.");
       return false;
       }
    return true;
  }
  
// script for brochure request page  
  function validate() {
     if (document.jsform.fullname.value == "")
		{
		alert ("Please enter your name.")
		return false
		}
	if (document.jsform.message.value == "")
		{
		alert ("Please enter a message.")
		return false
		}
	if (document.jsform.facility.value == "")
		{
		alert ("Please enter a facility name.")
		return false
		}
	if(document.jsform.email.value.length == 0) { 
      document.jsform.email.focus(); 
      alert("Please enter your email."); 
      return false; 
      }
	  
	if(-1 == document.jsform.email.value.indexOf("@")) { 
       document.jsform.email.focus(); 
       alert("Your email must have a '@'."); 
       return false; 
       }
    if(-1 != document.jsform.email.value.indexOf(",")) { 
       document.jsform.email.focus(); 
       alert("Your email must not have a ',' in it"); 
       return false; 
       }
    if(-1 != document.jsform.email.value.indexOf("#")) { 
       document.jsform.email.focus(); 
       alert("Your email must not have an '#' in it." ); 
       return false; 
       }
    if(-1 != document.jsform.email.value.indexOf("!")) { 
       document.jsform.email.focus(); 
       alert("Your email must not have a '!' in it." ); 
       return false; 
       }
    if(-1 != document.jsform.email.value.indexOf(" ")) { 
       document.jsform.email.focus(); 
       alert("Your email must not have a space in it." ); 
       return false; 
       }
    if(document.jsform.email.value.length == (document.jsform.email.value.indexOf("@")+1) ) {
       document.jsform.email.focus();
       alert("Your email must have a domain name after the '@'.");
       return false;
       }
    
	
    return true;
  }
  

// script for login
function validatelogin() {
     if (document.logform.email.value == "")
		{
		alert ("Please enter your username.")
		return false
		}
	if (document.logform.password.value == "")
		{
		alert ("Please enter your password.")
		return false
		}
	if (document.logform.status.value == "null")
		{
		alert ("Please enter your status.")
		return false
		}

		
return true;
  }
//-->