

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function MM_findObj(n, d) { //v4.01
  var p,i,x;
    
  if(!d) 
  {
    d=document;
  }
   
	  if((p=n.indexOf("?"))>0&&parent.frames.length) 
	  {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
 }
  
	  if(!(x=d[n])&&d.all)
	  { 
		x=d.all[n];
  }
  	 
	  for (i=0;!x&&i<d.forms.length;i++) 
		x=d.forms[i][n];
		
	 for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
		x=MM_findObj(n,d.layers[i].document);

    if(!x && d.getElementById) 
     x=d.getElementById(n); 
  
  return x;
}


function MM_swapImage() { //v3.0
  
  var i, 
      j = 0, 
	  x, 
	  a = MM_swapImage.arguments;
	  
  document.MM_sr=new Array;
   
	  for(i=0;i<(a.length-2);i+=3)
	  {
		if ((x=MM_findObj(a[i]))!=null)
		{
		  document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
    }
  }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; 

	  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) 
		x.src=x.oSrc;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}



function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('Please fill in all required areas marked in red. \n\n ');
  document.MM_returnValue = (errors == '');
  }
 function windowopen(url,iHeight,iWidth)
	{

		var newurl = "/hvac_viewFile.asp?fileName=" +url
//		var specWindow =window.open(newurl,"SpecSheet");
		if ( iHeight == 0)
		{ // if we pass in a 0 for the height and width we are just going to open the window.
			var specWindow =window.open(newurl,"SpecSheet","location = no, Status = yes, resizable = yes, scrollbars=yes ");
		}
		else
		{ // if we pass in a value for the height and width use it.
			iHeight = window.screen.height - 80;
			iWidth = window.screen.width -20;
			var specWindow =window.open(newurl,"SpecSheet","top = 0, left = 0, height = " + iHeight + ", width=" + iWidth +", location = no, Status = yes, resizable = yes, scrollbars=yes ");
		}
		specWindow.focus();
	}

	function getrateQuote()
	{
	
		//var url = "http://192.168.0.2:8080/smarterway/ratequote/ratequoteweb.html?wFrom=sample&weight=250" 
		var url = "/ratequote/ratequoteweb.asp?wFrom=sample&weight=250" 

		var quoteWindow =window.open(url,"RateQuote","height = 350; Width = 400; location = no; Menubar=no" );
		quoteWindow.focus();
	
	}
/*
var message="Property of Smarterway Inc.  Federal Copyright Law prohibits the copying of photos and text.  All Rights Reserved";
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
//Disable right mouse click Script
 
var message="Property of Smarterway Inc.  Federal Copyright Law prohibits the copying of photos and text.  All Rights Reserved";
 
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
 
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
 
document.oncontextmenu=new Function("alert(message);return false")
*/
/*
      images = new Array(38);
      images[0] = "<img src='/images/smarter_slogan.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
      images[1] = "<img src='/images/smarter_slogan2.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
      images[2] = "<img src='/images/smarter_slogan3.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
      images[3] = "<img src='/images/smarter_slogan4.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
      images[4] = "<img src='/images/smarter_slogan5.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
      images[5] = "<img src='/images/smarter_slogan6.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
      images[6] = "<img src='/images/smarter_slogan7.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
      images[7] = "<img src='/images/smarter_slogan8.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
      images[8] = "<img src='/images/smarter_slogan9.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
      images[9] = "<img src='/images/smarter_slogan10.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
      images[10] = "<img src='/images/smarter_slogan11.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[11] = "<img src='/images/smarter_slogan12.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[12] = "<img src='/images/smarter_slogan13.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[13] = "<img src='/images/smarter_slogan14.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[14] = "<img src='/images/smarter_slogan15.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[15] = "<img src='/images/smarter_slogan16.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[16] = "<img src='/images/smarter_slogan17.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[17] = "<img src='/images/smarter_slogan18.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[18] = "<img src='/images/smarter_slogan19.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[19] = "<img src='/images/smarter_slogan20.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[20] = "<img src='/images/smarter_slogan21.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[21] = "<img src='/images/smarter_slogan22.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[22] = "<img src='/images/smarter_slogan23.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[23] = "<img src='/images/smarter_slogan24.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[24] = "<img src='/images/smarter_slogan25.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[25] = "<img src='/images/smarter_slogan26.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[26] = "<img src='/images/smarter_slogan27.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[27] = "<img src='/images/smarter_slogan28.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[28] = "<img src='/images/smarter_slogan29.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[29] = "<img src='/images/smarter_slogan30.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[30] = "<img src='/images/smarter_slogan31.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[31] = "<img src='/images/smarter_slogan32.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[32] = "<img src='/images/smarter_slogan33.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[33] = "<img src='/images/smarter_slogan34.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[34] = "<img src='/images/smarter_slogan35.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[35] = "<img src='/images/smarter_slogan36.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[36] = "<img src='/images/smarter_slogan37.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[37] = "<img src='/images/smarter_slogan38.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
	  images[38] = "<img src='/images/smarter_slogan39.jpg' border='0' alt='A smarter way to keep cool.' height=89 width =231>";
      index = Math.floor(Math.random() * images.length);
       document.write(images[index]);*/