/*//scroller width
var swidth=715;

//scroller height
var sheight=120;

//background color
var sbcolor='#ffffff';

//scroller's speed
var sspeed=5;

var msg=''
//Your messages go below:
        msg +=        
            '<ul><li><a href="../mcsConnect.html" target="_self" title="">Fri Oct  8,  2010 - New version of MCS-Connect!</a></li>'+
            '<li>MCS-Connect 6.03A is available for download.</li>'+
			'<li><ul><li>Added setpoint changing functionality to Graphics Screen</li><li>Increased maximum number of Magnums connected to at one time to 40</li></ul></li>'+
            '<li><br/><br/> </li></ul>'+                     
            
            '<ul><li><a href="../mcsConfig.html" target="_self" title="">Fri Oct  8,  2010 - New version of MCS-Config!</a></li>'+
            '<li>MCS-Config 6.04B is available for download.</li>'+
            '<li> <br/><br/> </li></ul>'+  
            
            '<ul><li><a href="http://" target="_blank" title="">Tue Jun  8,  2010</a></li>'+
            '<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. Nam blandit quam ut lacus.</li>'+
            '<li><br/><br/>  </li></ul>'+  
            
            '<ul><li><a href="http://" target="_blank" title="">Tue Jun  8,  2010</a></li>'+
            '<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. Nam blandit quam ut lacus.</li>'+
            '<li><br/></li></ul>'+            

        '';

        //End of your messages
        // Begin the ticker code

	var resumesspeed=sspeed
	function start() {
			if (document.all) iemarquee(ticker);
			else if (document.getElementById)
					ns6marquee(document.getElementById('ticker'));
	}
	
	function iemarquee(whichdiv){
			iediv=eval(whichdiv)
			sheight += 50;
			iediv.style.pixelTop=sheight
			iediv.innerHTML=msg 
			sizeup=iediv.offsetHeight
			ieslide()
	}
	
	function ieslide(){
			if (iediv.style.pixelTop>=sizeup*(-1)){
					iediv.style.pixelTop-=sspeed
					setTimeout("ieslide()",100)
			}
			else{
					iediv.style.pixelTop=sheight
					ieslide()
			}
	}
	
	function ns6marquee(whichdiv){
			ns6div=eval(whichdiv)
			sheight += 50;
			ns6div.style.top=sheight + "px";
			ns6div.innerHTML=msg
			sizeup=ns6div.offsetHeight
			ns6slide()
	}
	function ns6slide(){
			if (parseInt(ns6div.style.top)>=sizeup*(-1)){
					theTop = parseInt(ns6div.style.top)-sspeed
					ns6div.style.top = theTop + "px";
					setTimeout("ns6slide()",100)
			}
			else {
					ns6div.style.top = sheight + "px";
					ns6slide()
			}
	}*/
	
	//Checking the register for class form to ensure that necessary fields are filled in
	function checkform ( form )
	{
	// ** START **
	  if (form.country.value != "United States") { form.state.value = ""; }

	  if (form.name.value == "") {
		alert( "Please enter your name." );
		form.name.focus();
		return false;
	  }
	  if (form.company.value == "") {
		alert( "Please enter your Company name." );
		form.company.focus();
		return false ;
	  }
	  if (form.phone.value == "") {
		alert( "Please enter your telephone Number." );
		form.phone.focus();
		return false ;
	  }
	  else if (isNaN(form.phone.value))
	  {
		alert( "Invalid Phone! Please enter your phone in the correct format without hyphens. i.e. 0123456789" );
		form.phone.value = "";
		form.phone.focus();
		return false ;
	  }
	  if (form.email.value == "" || form.email.value == null)
	  {
		alert( "Please enter your email address." );
		form.email.focus();
		return false ;
	  }
	  else if (echeck(form.email.value) == false)
	  {
		form.email.value = "";
		form.email.focus();
		return false ;
	  }
	  // ** END **
	  return true ;
	}
	
	//Checking the mailing list signup form to ensure that the required fields are filled in
	function MailingListcheckform ( form )
	{
	// ** START **
 	  if (form.country.value != "United States") {
		  form.state.value = "";
	  }
	  else 
	  {
		if (form.state.value == "") 
		{
			alert( "Please select your state." );
			form.state.focus();
			return false ;
	  	}
	  }
	  if (form.name.value == "") {
		alert( "Please enter your name." );
		form.name.focus();
		return false ;
	  }
	  if (form.company.value == "") {
		alert( "Please enter your Company name." );
		form.company.focus();
		return false ;
	  }
	  if (form.phone.value == "") {
		alert( "Please enter your telephone Number." );
		form.phone.focus();
		return false ;
	  }
	  else if (isNaN(form.phone.value))
	  {
		alert( "Invalid Phone! Please enter your phone in the correct format without hyphens. i.e. 0123456789" );
		form.phone.value = "";
		form.phone.focus();
		return false ;
	  }
	  if (form.email.value == "" || form.email.value == null) 
	  {
		alert( "Please enter your email address." );
		form.email.focus();
		return false ;
	  }
	  else if (echeck(form.email.value) == false)
	  {
		form.email.value = "";
		form.email.focus();
		return false ;
	  }
	  if (form.address.value == "") {
		alert( "Please enter your address." );
		form.address.focus();
		return false ;
	  }
	  if (form.city.value == "") {
		alert( "Please enter your city." );
		form.city.focus();
		return false ;
	  }
	  if (form.zip.value == "") {
		alert( "Please enter your zip." );
		form.zip.focus();
		return false ;
	  }
	  else if (isNaN(form.zip.value))
	  {
		alert( "Invalid Zip! Please enter your zip in the correct format. i.e. 12345" );
		form.zip.value = "";
		form.zip.focus();
		return false ;
	  }
	  if (form.selType.value == "") {
		alert( "Please select your company type." );
		form.selType.focus();
		return false ;
	  }
	  // ** END **
	  return true ;
	}
	//START control quote form functions
	//Checking the control quote form to ensure that the required fields are filled in
	function check_CQ_form ( form )
	{
	  // ** START CQ FORM**
	  //General Info
	  if (form.name.value == "") {
		alert( "Please enter your name." );
		form.name.focus();
		return false ;
	  }
	  if (form.address.value == "") {
		alert( "Please enter your address." );
		form.address.focus();
		return false ;
	  }
	  if (form.city.value == "") {
		alert( "Please enter your city." );
		form.city.focus();
		return false ;
	  }
 	  if (form.country.value != "United States") {
		  form.state.value = "";
	  }
	  else 
	  {
		if (form.state.value == "selOneState") 
		{
			alert( "Please select your state." );
			form.state.focus();
			return false ;
	  	}
	  }
	  if (form.zip.value == "") {
		alert( "Please enter your zip." );
		form.zip.focus();
		return false ;
	  }
	  else if (isNaN(form.zip.value))
	  {
		alert( "Invalid Zip! Please enter your zip in the correct format. i.e. 12345" );
		form.zip.value = "";
		form.zip.focus();
		return false ;
	  }
	  if (form.email.value == "" || form.email.value == null) 
	  {
		alert( "Please enter your email address." );
		form.email.focus();
		return false ;
	  }
	  else if (echeck(form.email.value) == false)
	  {
		form.email.value = "";
		form.email.focus();
		return false ;
	  }
	  if (form.phone.value == "") {
		alert( "Please enter your telephone Number." );
		form.phone.focus();
		return false ;
	  }
	  else if (isNaN(form.phone.value))
	  {
		alert( "Invalid Phone! Please enter your phone in the correct format without hyphens. i.e. 0123456789" );
		form.phone.value = "";
		form.phone.focus();
		return false ;
	  }
	  if (form.company.value == "") {
		alert( "Please enter your Company name." );
		form.company.focus();
		return false ;
	  }
	  //unit info
	  if (form.site.value == "") {
		alert( "Please enter your site name." );
		form.site.focus();
		return false ;
	  }
	  if (form.siteNum.value == "") {
		alert( "Please enter your site unit number." );
		form.siteNum.focus();
		return false ;
	  }
	  if (form.modnum.value == "") {
		alert( "Please enter your model number." );
		form.modnum.focus();
		return false ;
	  }
	  if (form.sernum.value == "") {
		alert( "Please enter your serial number." );
		form.sernum.focus();
		return false ;
	  }
	  if (form.oem.value == "") {
		alert( "Please enter your package manufacturer." );
		form.oem.focus();
		return false ;
	  }
	  if (form.volts.value == "selOneVolt") {
		alert( "Please select your control voltage." );
		form.volts.focus();
		return false ;
	  }
	  if (form.refr.value == "selOneRefr") {
		alert( "Please select your refrigerant type." );
		form.refr.focus();
		return false ;
	  }
	  else if (form.refr.value == "Other") {
	    if (form.otherRef.value == "") {
		  alert( "Please enter the other refrigerant type." );
		  form.otherRef.focus();
		  return false ;
		}
	  }	  
	  //evap info
	  if (form.evapType.value == "selOneEvap") {
		alert( "Please select your evaporator type." );
		form.evapType.focus();
		return false ;
	  }
	  else if (form.evapType.value == "DX CB") {
		  if (form.dxcb.value == "selOneCB") {
			alert( "Please select your DX chiller barrel type." );
			form.dxcb.focus();
			return false ;
		  }
		  else if (form.dxcb.value == "Other") {
			  if (form.otherDXCB.value == "") {
				alert( "Please enter the other DX chiller barrel type." );
				form.otherDXCB.focus();
				return false ;
			  }
		  }
	  }
	  else if (form.evapType.value == "Other") {
	    if (form.otherEvap.value == "") {
		  alert( "Please enter the other evaporator type." );
		  form.otherEvap.focus();
		  return false ;
		}
	  }
	  if (form.evapLocation.value == "selOneEvapLoc") {
		alert( "Please select your evaporator location." );
		form.evapLocation.focus();
		return false ;
	  }
	  //condenser info
	  if (form.condType.value == "selOneCond") {
		alert( "Please select your condenser type." );
		form.condType.focus();
		return false ;
	  }
	  if (form.condLocation.value == "selOneCondLoc") {
		alert( "Please select your condenser location." );
		form.condLocation.focus();
		return false ;
	  }
	  if (form.numROs.value == "Zero") {
		alert( "Please select the number of relay outputs required for the condenser pumps and fans." );
		form.numROs.focus();
		return false ;
	  }
	  if (form.FD_yes.checked == true) {		  
		  if (form.drive.value == "") {
			alert( "Please enter whether the frequency drive is on the pump or fans." );
			form.drive.focus();
			return false ;
		  }
	  }
	  //compressor info
	  if (form.compType.value == "selOneComp") {
		alert( "Please select your compressor type." );
		form.compType.focus();
		return false ;
	  }
	  else if (form.compType.value == "other") {
		if (form.otherComp.value == "") {
		  alert( "Please enter the other compressor type." );
		  form.otherComp.focus();
		  return false ;
		}
	  }
	  if (form.circuits.value == "Zero") {
		alert( "Please enter the amount of circuits." );
		form.circuits.focus();
		return false ;
	  }
	  if (form.cpc.value == "") {
		alert( "Please select the amount of compressors per circuit." );
		form.cpc.focus();
		return false ;
	  }
	  if (form.circuits.value != "Zero") {
		  var numComps = form.circuits.value;
		  switch (numComps)
		  {
			  case "One":
			  //alert (numComps);
			  	if (form.modNumOne.value == ""){
				  alert( "Please enter the model number and FLA for Comp 1." );
				  form.modNumOne.focus();
				  return false ;
				}
				break;
			  case "Two":
			  	if (form.modNumOne.value == ""){
				  alert( "Please enter the model number and FLA for Comp 1." );
				  form.modNumOne.focus();
				  return false ;
				}
				else if (form.modNumTwo.value == ""){
				  alert( "Please enter the model number and FLA for Comp 2." );
				  form.modNumTwo.focus();
				  return false ;					
				}
				break;
			  case "Three":
			  	if (form.modNumOne.value == ""){
				  alert( "Please enter the model number and FLA for Comp 1." );
				  form.modNumOne.focus();
				  return false ;
				}
				else if (form.modNumTwo.value == ""){
				  alert( "Please enter the model number and FLA for Comp 2." );
				  form.modNumTwo.focus();
				  return false ;					
				}
				else if (form.modNumThree.value == ""){
				  alert( "Please enter the model number and FLA for Comp 3." );
				  form.modNumThree.focus();
				  return false ;					
				}
				break;
			  case "Four":
			  	if (form.modNumOne.value == ""){
				  alert( "Please enter the model number and FLA for Comp 1." );
				  form.modNumOne.focus();
				  return false ;
				}
				else if (form.modNumTwo.value == ""){
				  alert( "Please enter the model number and FLA for Comp 2." );
				  form.modNumTwo.focus();
				  return false ;					
				}
				else if (form.modNumThree.value == ""){
				  alert( "Please enter the model number and FLA for Comp 3." );
				  form.modNumThree.focus();
				  return false ;					
				}
				else if (form.modNumFour.value == ""){
				  alert( "Please enter the model number and FLA for Comp 4." );
				  form.modNumFour.focus();
				  return false ;					
				}
				break;
			  case "Five":
			  	if (form.modNumOne.value == ""){
				  alert( "Please enter the model number and FLA for Comp 1." );
				  form.modNumOne.focus();
				  return false ;
				}
				else if (form.modNumTwo.value == ""){
				  alert( "Please enter the model number and FLA for Comp 2." );
				  form.modNumTwo.focus();
				  return false ;					
				}
				else if (form.modNumThree.value == ""){
				  alert( "Please enter the model number and FLA for Comp 3." );
				  form.modNumThree.focus();
				  return false ;					
				}
				else if (form.modNumFour.value == ""){
				  alert( "Please enter the model number and FLA for Comp 4." );
				  form.modNumFour.focus();
				  return false ;					
				}
				else if (form.modNumFive.value == ""){
				  alert( "Please enter the model number and FLA for Comp 5." );
				  form.modNumFive.focus();
				  return false ;					
				}
				break;
			  case "Six":
			  	if (form.modNumOne.value == ""){
				  alert( "Please enter the model number and FLA for Comp 1." );
				  form.modNumOne.focus();
				  return false ;
				}
				else if (form.modNumTwo.value == ""){
				  alert( "Please enter the model number and FLA for Comp 2." );
				  form.modNumTwo.focus();
				  return false ;					
				}
				else if (form.modNumThree.value == ""){
				  alert( "Please enter the model number and FLA for Comp 3." );
				  form.modNumThree.focus();
				  return false ;					
				}
				else if (form.modNumFour.value == ""){
				  alert( "Please enter the model number and FLA for Comp 4." );
				  form.modNumFour.focus();
				  return false ;					
				}
				else if (form.modNumFive.value == ""){
				  alert( "Please enter the model number and FLA for Comp 5." );
				  form.modNumFive.focus();
				  return false ;					
				}
				else if (form.modNumSix.value == ""){
				  alert( "Please enter the model number and FLA for Comp 6." );
				  form.modNumSix.focus();
				  return false ;					
				}
				break;
			  case "Seven":
			  	if (form.modNumOne.value == ""){
				  alert( "Please enter the model number and FLA for Comp 1." );
				  form.modNumOne.focus();
				  return false ;
				}
				else if (form.modNumTwo.value == ""){
				  alert( "Please enter the model number and FLA for Comp 2." );
				  form.modNumTwo.focus();
				  return false ;					
				}
				else if (form.modNumThree.value == ""){
				  alert( "Please enter the model number and FLA for Comp 3." );
				  form.modNumThree.focus();
				  return false ;					
				}
				else if (form.modNumFour.value == ""){
				  alert( "Please enter the model number and FLA for Comp 4." );
				  form.modNumFour.focus();
				  return false ;					
				}
				else if (form.modNumFive.value == ""){
				  alert( "Please enter the model number and FLA for Comp 5." );
				  form.modNumFive.focus();
				  return false ;					
				}
				else if (form.modNumSix.value == ""){
				  alert( "Please enter the model number and FLA for Comp 6." );
				  form.modNumSix.focus();
				  return false ;					
				}
				else if (form.modNumSeven.value == ""){
				  alert( "Please enter the model number and FLA for Comp 7." );
				  form.modNumSeven.focus();
				  return false ;					
				}
				break;
			  case "Eight":
			  	if (form.modNumOne.value == ""){
				  alert( "Please enter the model number and FLA for Comp 1." );
				  form.modNumOne.focus();
				  return false ;
				}
				else if (form.modNumTwo.value == ""){
				  alert( "Please enter the model number and FLA for Comp 2." );
				  form.modNumTwo.focus();
				  return false ;					
				}
				else if (form.modNumThree.value == ""){
				  alert( "Please enter the model number and FLA for Comp 3." );
				  form.modNumThree.focus();
				  return false ;					
				}
				else if (form.modNumFour.value == ""){
				  alert( "Please enter the model number and FLA for Comp 4." );
				  form.modNumFour.focus();
				  return false ;					
				}
				else if (form.modNumFive.value == ""){
				  alert( "Please enter the model number and FLA for Comp 5." );
				  form.modNumFive.focus();
				  return false ;					
				}
				else if (form.modNumSix.value == ""){
				  alert( "Please enter the model number and FLA for Comp 6." );
				  form.modNumSix.focus();
				  return false ;					
				}
				else if (form.modNumSeven.value == ""){
				  alert( "Please enter the model number and FLA for Comp 7." );
				  form.modNumSeven.focus();
				  return false ;					
				}
				else if (form.modNumEight.value == ""){
				  alert( "Please enter the model number and FLA for Comp 8." );
				  form.modNumEight.focus();
				  return false ;					
				}
				break;
			  default:
				alert( "Please enter the number of circuits." );
				form.circuits.focus();
				return false ;
				break;
		  }
	  }	  
	  // ** END **
	  return true ;
	}
	//START compressor quote form functions
	//Checking the compressor quote form to ensure that the required fields are filled in
	function check_CompQ_form ( form )
	{
	  // ** START CQ FORM**
	  //General Info
	  if (form.name.value == "") {
		alert( "Please enter your name." );
		form.name.focus();
		return false ;
	  }
	  if (form.address.value == "") {
		alert( "Please enter your address." );
		form.address.focus();
		return false ;
	  }
	  if (form.city.value == "") {
		alert( "Please enter your city." );
		form.city.focus();
		return false ;
	  }
 	  if (form.country.value != "United States") {
		  form.state.value = "";
	  }
	  else 
	  {
		if (form.state.value == "selOneState") 
		{
			alert( "Please select your state." );
			form.state.focus();
			return false ;
	  	}
	  }
	  if (form.zip.value == "") {
		alert( "Please enter your zip." );
		form.zip.focus();
		return false ;
	  }
	  else if (isNaN(form.zip.value))
	  {
		alert( "Invalid Zip! Please enter your zip in the correct format. i.e. 12345" );
		form.zip.value = "";
		form.zip.focus();
		return false ;
	  }
	  if (form.email.value == "" || form.email.value == null) 
	  {
		alert( "Please enter your email address." );
		form.email.focus();
		return false ;
	  }
	  else if (echeck(form.email.value) == false)
	  {
		form.email.value = "";
		form.email.focus();
		return false ;
	  }
	  if (form.phone.value == "") {
		alert( "Please enter your telephone Number." );
		form.phone.focus();
		return false ;
	  }
	  else if (isNaN(form.phone.value))
	  {
		alert( "Invalid Phone! Please enter your phone in the correct format without hyphens. i.e. 0123456789" );
		form.phone.value = "";
		form.phone.focus();
		return false ;
	  }
	  if (form.company.value == "") {
		alert( "Please enter your Company name." );
		form.company.focus();
		return false ;
	  }
	  if (form.unitbrand.value == "") {
		alert( "Please enter the Brand name of the unit." );
		form.unitbrand.focus();
		return false ;
	  }
	  if (form.unitmodNum.value == "") {
		alert( "Please enter the Model number of the unit." );
		form.unitmodNum.focus();
		return false ;
	  }
	  if (form.compressorbrand.value == "") {
		alert( "Please enter the Brand name of the existing compressor." );
		form.compressorbrand.focus();
		return false ;
	  }
	  if (form.compressormodNum.value == "") {
		alert( "Please enter the Model number of the existing compressor." );
		form.compressormodNum.focus();
		return false ;
	  }
	  if (form.FLAtb.value == "") {
		alert( "Please enter the FLA of the existing compressor." );
		form.FLAtb.focus();
		return false ;
	  }
	  if (form.cooled.value == "selOneCooled") 
	  {
		alert( "Please select if the existing unit is air cooled or water cooled." );
		form.cooled.focus();
		return false ;
	  }
	  if (form.compType.value == "selOneComp") 
	  {
		alert( "Please select the existing unit's compressor type." );
		form.compType.focus();
		return false ;
	  }
	  if (form.refr.value == "selOneRefr") 
	  {
		alert( "Please select the type of refrigerant being used." );
		form.refr.focus();
		return false ;
	  }
	  if (form.evapType.value == "selOneEvap") 
	  {
		alert( "Please select the type of evaporator being used." );
		form.evapType.focus();
		return false ;
	  }
	  if (form.evapType.value == "DX CB" && form.dxcb.value == "selOneCB") 
	  {
		alert( "Please select the type of DX Chiller Barrel being used." );
		form.dxcb.focus();
		return false ;
	  }
	  if (form.volts.value == "selOneVolt") 
	  {
		alert( "Please select the existing compressor's voltage." );
		form.volts.focus();
		return false ;
	  }
	  if (form.starter.value == "selOneStarter") 
	  {
		alert( "Please select the starter type." );
		form.starter.focus();
		return false ;    circuits
	  }
	  if (form.circuits.value == "Zero") 
	  {
		alert( "Please select the amount of circuits." );
		form.circuits.focus();
		return false ;    
	  }
	// ** END **      
	  return true ;
	}

	//this function will check the country selected. If USA then the function will enable the state selection if not USA the function will disable the state selection
	function TCcheckCountry ( form )
	{
	  var f = document.getElementById('country');

	  if (f.value == "United States")
	  { 
	  	document.trainingClassForm.state.disabled = false; 
		document.trainingClassForm.state.focus();
	  }        
	  else  
	  { 
	  	document.trainingClassForm.state.disabled = true; 		
	  }	  
	}	
	
	//this function will check the country selected. If USA then the function will enable the state selection if not USA the function will disable the state selection
	function MLcheckCountry ( form )
	{	
	  var f = document.getElementById('country');
	  
	  if (f.value == "United States")
	  { 
	  	document.mailingListForm.state.disabled = false; 
		document.mailingListForm.state.focus();
	  }
	  else 
	  { 
	    document.mailingListForm.state.disabled = true; 
	  }
	}
	//***CONTROLS***this function will check the country selected. If USA then the function will enable the state selection if not USA the function will disable the state selection
	function CQF_checkCountry ( form )
	{	
	  var f = document.getElementById('country');

	  if (f.value == "United States")
	  { 
	  	document.controlsQuoteForm.state.disabled = false;
		document.controlsQuoteForm.state.focus();
	  }
	  else 
	  { 
	    document.controlsQuoteForm.state.disabled = true;
	  }
	}
	//***COMPRESSORS***this function will check the country selected. If USA then the function will enable the state selection if not USA the function will disable the state selection
	function CompQF_checkCountry ( form )
	{	
	  var f = document.getElementById('country');

	  if (f.value == "United States")
	  { 
	  	document.compressorQuoteForm.state.disabled = false;
		document.compressorQuoteForm.state.focus();
	  }
	  else 
	  { 
	  	document.compressorQuoteForm.state.disabled = true;
	  }
	}
	//***CONTROLS***this function will check the selection of refrigerant type and disable or enable the other refrigerant type text box if other is chosen
	function checkRefType()      
	{
	  var f = document.getElementById('refr');
	  if (f.value == "Other")
	  { 
	  	document.controlsQuoteForm.otherRef.disabled = false; 
		document.controlsQuoteForm.otherRef.focus();
	  }
	  else 
	  {
	    document.controlsQuoteForm.otherRef.disabled = true;
		document.controlsQuoteForm.otherRef.value = "";
	  }		
	}
	//***COMPRESSORS***this function will check the selection of refrigerant type and disable or enable the other refrigerant type text box if other is chosen
	function checkRefTypeComp()      
	{
	  var f = document.getElementById('refr');
	  if (f.value == "Other")
	  { 
	  	document.compressorQuoteForm.otherRef.disabled = false; 
		document.compressorQuoteForm.otherRef.focus();
	  }
	  else 
	  {
	    document.compressorQuoteForm.otherRef.disabled = true;
		document.compressorQuoteForm.otherRef.value = "";
	  }		
	}
	//***CONTROLS***this function will check the selection of evaporator type and disable or enable the other evaporator type text box if other is chosen
	function checkEvapType()      
	{
	  var f = document.getElementById('evapType');
	  if (f.value == "Other")
	  {
	  	document.controlsQuoteForm.otherEvap.disabled = false;
		document.controlsQuoteForm.otherEvap.focus();
	  }
	  else
	  {
	    document.controlsQuoteForm.otherEvap.disabled = true;
		document.controlsQuoteForm.otherEvap.value = "";
	  }		
	  
	  if (f.value == "DX CB")
	  {
	    document.controlsQuoteForm.dxcb.disabled = false;
		var e = document.getElementById('dxcb');
		if (e.value == "Other")
		{
			document.controlsQuoteForm.otherDXCB.disabled = false;
			document.controlsQuoteForm.otherDXCB.focus();
		}
	  }
	  else
	  {
	    document.controlsQuoteForm.dxcb.disabled = true;
		document.controlsQuoteForm.otherDXCB.disabled = true;
		document.controlsQuoteForm.otherDXCB.value = "";
	  }
	}
	//***COMPRESSORS***this function will check the selection of evaporator type and disable or enable the other evaporator type text box if other is chosen
	function checkEvapTypeComp()      
	{
	  var f = document.getElementById('evapType');
	  if (f.value == "Other")
	  {
	  	document.compressorQuoteForm.otherEvap.disabled = false;
		document.compressorQuoteForm.otherEvap.focus();
	  }
	  else
	  {
	    document.compressorQuoteForm.otherEvap.disabled = true;
		document.compressorQuoteForm.otherEvap.value = "";
	  }		
	  
	  if (f.value == "DX CB")
	  {
	    document.compressorQuoteForm.dxcb.disabled = false;
		var e = document.getElementById('dxcb');
		if (e.value == "Other")
		{
			document.compressorQuoteForm.otherDXCB.disabled = false;
			document.compressorQuoteForm.otherDXCB.focus();
		}
	  }
	  else
	  {
	    document.compressorQuoteForm.dxcb.disabled = true;
		document.compressorQuoteForm.otherDXCB.disabled = true;
		document.compressorQuoteForm.otherDXCB.value = "";
	  }
	}
	//***CONTROLS***this function will check the selection of evaporator type and disable or enable the other evaporator type text box if other is chosen
	function checkCBType()      
	{
	  var e = document.getElementById('evapType');
	  var f = document.getElementById('dxcb');
	  if ( f.value == "Other" && e.value == "DX CB" )
	  {
		document.controlsQuoteForm.otherDXCB.disabled = false;
		document.controlsQuoteForm.otherDXCB.focus();
	  }
	  else
	  {
		document.controlsQuoteForm.otherDXCB.disabled = true;
		document.controlsQuoteForm.otherDXCB.value = "";
	  }		
	}
	//***COMPRESSORS***this function will check the selection of evaporator type and disable or enable the other evaporator type text box if other is chosen
	function checkCBTypeComp()      
	{
	  var e = document.getElementById('evapType');
	  var f = document.getElementById('dxcb');
	  if ( f.value == "Other" && e.value == "DX CB" )
	  {
		document.compressorQuoteForm.otherDXCB.disabled = false;
		document.compressorQuoteForm.otherDXCB.focus();
	  }
	  else
	  {
		document.compressorQuoteForm.otherDXCB.disabled = true;
		document.compressorQuoteForm.otherDXCB.value = "";
	  }
	}
	//***COMPRESSORS***this function will check the selection of voltage and disable or enable the other voltage text box if other is chosen
	function checkVoltage()      
	{
	  var f = document.getElementById('volts');
	  if (f.value == "Other")
	  { 
	  	document.compressorQuoteForm.otherVolt.disabled = false; 
		document.compressorQuoteForm.otherVolt.focus();
	  }
	  else 
	  {
	    document.compressorQuoteForm.otherVolt.disabled = true;
		document.compressorQuoteForm.otherVolt.value = "";
	  }		
	}
	//***COMPRESSORS***this function will check the selection of starter type and disable or enable the other starter type text box if other is chosen
	function checkStarterType()      
	{
	  var f = document.getElementById('starter');
	  if (f.value == "Other")
	  { 
	  	document.compressorQuoteForm.otherStarter.disabled = false; 
		document.compressorQuoteForm.otherStarter.focus();
	  }
	  else 
	  {
	    document.compressorQuoteForm.otherStarter.disabled = true;
		document.compressorQuoteForm.otherStarter.value = "";
	  }		
	}
	function checkCondType()
	{
	  var f = document.getElementById('condType');
	  if ( f.value == "AC")
	  {
		document.controlsQuoteForm.oneFanRelay.disabled = false;
		document.controlsQuoteForm.twoFanRelay.disabled = false;
		document.controlsQuoteForm.threeFanRelay.disabled = false;
		document.controlsQuoteForm.fourFanRelay.disabled = false;
		document.controlsQuoteForm.fiveFanRelay.disabled = false;
		document.controlsQuoteForm.sixFanRelay.disabled = false;
		document.controlsQuoteForm.sevenFanRelay.disabled = false;
		document.controlsQuoteForm.eightFanRelay.disabled = false;
	  }
	  else
	  {
		document.controlsQuoteForm.oneFanRelay.disabled = true;
		document.controlsQuoteForm.twoFanRelay.disabled = true;
		document.controlsQuoteForm.threeFanRelay.disabled = true;
		document.controlsQuoteForm.fourFanRelay.disabled = true;
		document.controlsQuoteForm.fiveFanRelay.disabled = true;
		document.controlsQuoteForm.sixFanRelay.disabled = true;
		document.controlsQuoteForm.sevenFanRelay.disabled = true;
		document.controlsQuoteForm.eightFanRelay.disabled = true;
		
		document.controlsQuoteForm.oneFanRelay.value = "Zero";
		document.controlsQuoteForm.twoFanRelay.value = "Zero";
		document.controlsQuoteForm.threeFanRelay.value = "Zero";
		document.controlsQuoteForm.fourFanRelay.value = "Zero";
		document.controlsQuoteForm.fiveFanRelay.value = "Zero";
		document.controlsQuoteForm.sixFanRelay.value = "Zero";
		document.controlsQuoteForm.sevenFanRelay.value = "Zero";
		document.controlsQuoteForm.eightFanRelay.value = "Zero";
	  }
	}
	//***CONTROLS***this function will check the compressor type and if other enable or disable the other text box
	function checkCompType()
	{
	  var f = document.getElementById('compType');
	  if ( f.value == "other")
	  {
		document.controlsQuoteForm.otherComp.disabled = false;
		document.controlsQuoteForm.otherComp.focus();
	  }
	  else
	  {
		document.controlsQuoteForm.otherComp.disabled = true;
		document.controlsQuoteForm.otherComp.value = "";
	  }
	  
	  if ( f.value == "reciprocating")
	  {
		document.controlsQuoteForm.oneCompressor.disabled = false;
		document.controlsQuoteForm.twoCompressor.disabled = false;
		document.controlsQuoteForm.threeCompressor.disabled = false;
		document.controlsQuoteForm.fourCompressor.disabled = false;
		document.controlsQuoteForm.fiveCompressor.disabled = false;
		document.controlsQuoteForm.sixCompressor.disabled = false;
		document.controlsQuoteForm.sevenCompressor.disabled = false;
		document.controlsQuoteForm.eightCompressor.disabled = false;
	  }
	  else
	  {
		document.controlsQuoteForm.oneCompressor.disabled = true;
		document.controlsQuoteForm.twoCompressor.disabled = true;
		document.controlsQuoteForm.threeCompressor.disabled = true;
		document.controlsQuoteForm.fourCompressor.disabled = true;
		document.controlsQuoteForm.fiveCompressor.disabled = true;
		document.controlsQuoteForm.sixCompressor.disabled = true;
		document.controlsQuoteForm.sevenCompressor.disabled = true;
		document.controlsQuoteForm.eightCompressor.disabled = true;
		
		document.controlsQuoteForm.oneCompressor.value = "Zero";
		document.controlsQuoteForm.twoCompressor.value = "Zero";
		document.controlsQuoteForm.threeCompressor.value = "Zero";
		document.controlsQuoteForm.fourCompressor.value = "Zero";
		document.controlsQuoteForm.fiveCompressor.value = "Zero";
		document.controlsQuoteForm.sixCompressor.value = "Zero";
		document.controlsQuoteForm.sevenCompressor.value = "Zero";
		document.controlsQuoteForm.eightCompressor.value = "Zero";
	  }
	}
	//***COMPRESSORS***this function will check the compressor type and if other enable or disable the other text box
	function checkCompTypeCQ()
	{
	  var f = document.getElementById('compType');
	  if ( f.value == "other")
	  {
		document.compressorQuoteForm.otherComp.disabled = false;
		document.compressorQuoteForm.otherComp.focus();
	  }
	  else
	  {
		document.compressorQuoteForm.otherComp.disabled = true;
		document.compressorQuoteForm.otherComp.value = "";
	  }
	}
	//***CONTROLS***this function will enable or disable the frequency drive textbox depending on if the user selected yes or no
	function enableTextbox ()
	{
		if ( document.controlsQuoteForm.FD_yes.checked == true )
		{
			document.controlsQuoteForm.drive.disabled = false;	
			document.controlsQuoteForm.drive.focus();
		}
		else
		{
			document.controlsQuoteForm.drive.disabled = true;	
		}
	}
	//***COMPRESSORS***this function will enable or disable the shared circuit/oil equalization textbox depending on if the user selected yes or no
	function enableOETextbox ()
	{
		if ( document.compressorQuoteForm.sc_yes.checked == true )
		{
			document.compressorQuoteForm.oilEQ.disabled = false;	
			document.compressorQuoteForm.oilEQ.focus();
		}
		else
		{
			document.compressorQuoteForm.oilEQ.disabled = true;	
		}
	}
	//END control quote form functions
	//START contact us page functions
	function mangle() {
	if (!document.getElementsByTagName && !document.createElement &&
		!document.createTextNode) return;
	var nodes = document.getElementsByTagName("span");
	for(var i=nodes.length-1;i>=0;i--) {
		if (nodes[i].className=="change") {
			var at = / at /;
			var dot = / dot /g;
			var node = document.createElement("a");
			var address = nodes[i].firstChild.nodeValue;

			address = address.replace(at, "@");
			address = address.replace(dot, ".");

			address = address.replace(at, "@");
			address = address.replace(dot, ".");
			node.setAttribute("href", "mailto:"+address);
			node.appendChild(document.createTextNode(address));
			
			var prnt = nodes[i].parentNode;
			for(var j=0;j<prnt.childNodes.length;j++)
				if (prnt.childNodes[j] == nodes[i]) {
					if (!prnt.replaceChild) return;
					prnt.replaceChild(node, prnt.childNodes[j]);
					break;
				}
		}
	}
	//END contact us page functions
}

	//email validation function
	function echeck(str) 
	{
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail ID");
		   return false;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID");
		   return false;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
			alert("Invalid E-mail ID");
			return false;
		}

		 if (str.indexOf(at,(lat+1))!=-1){
			alert("Invalid E-mail ID");
			return false;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
			alert("Invalid E-mail ID");
			return false;
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
			alert("Invalid E-mail ID");
			return false;
		 }
		
		 if (str.indexOf(" ")!=-1){
			alert("Invalid E-mail ID");
			return false;
		 }

		 return true;					
	}
	function toTop ( form )
	{
		form.name.focus();
	}
	/*Order submission questions*/
	function msg()
	{
		alert("Please submit your purchase orders to one of the following:\n\n" + "Email To: orders@mcscontrols.com\n\n" + "Fax To: 239-694-0031\n\n" + "If you have any questions about ordering or existing orders please call us at 239-694-0089.");
	}
	
/*
function ValidateForm(){
	var emailID=document.frmSample.txtEmail
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}

	return true
 }
*/
