
if (document.images) {
  image1on = new Image();
  image1on.src = "images/contact_on.gif";
  
  image2on = new Image();
  image2on.src = "images/homepage_on.gif";
  
  image3on = new Image();
  image3on.src = "images/sitemap_on.gif";

  image1off = new Image();
  image1off.src = "images/contact_off.gif";
  
  image2off = new Image();
  image2off.src = "images/homepage_off.gif";

  image3off = new Image();
  image3off.src = "images/sitemap_off.gif";
  
  otherImageDefault = new Image();
  otherImageDefault.src = "images/default.gif";

  otherImage1 = new Image();
  otherImage1.src = "images/contact.gif";
  
  otherImage2 = new Image();
  otherImage2.src = "images/homepage.gif";

  otherImage3 = new Image();
  otherImage3.src = "images/sitemap.gif";

}

function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval      (changeImages.arguments[i+1] + ".src");
    }
  }
}


var lastimg=false;
function chtab(obj)
{
     if(lastimg)
     {
          lastimg.src=lastimg.src.replace("_on.gif","_off.gif");
          document.getElementById(lastimg.name.replace("_","")).style.display="none";
     }
     else
     {
     document.getElementById("quote").style.display="none";
	 document.quote_.src=document.quote_.src.replace("_on.gif","_off.gif");
     }
     lastimg=obj;
     obj.src=obj.src.replace("_off.gif","_on.gif");
     document.getElementById(obj.name.replace("_","")).style.display="";
}

function CreateQuoteWindow()
{
	window.open('forms/QuickFormSend.cfm?language='+document.Quote.language.value+'&phone='+document.Quote.phone.value+'&email='+document.Quote.email.value+'&Name='+document.Quote.name.value,'Quote_Request','_blank, toolbar=no,width=350,height=150,directories=no,status=no,scrollbars=no,resizable=no,menubar=no,location=no');
	return true;
}

function CreateInfoRequestWindow()
{
	window.open('forms/QuickInfoSend.cfm?language='+document.VideoRequest.language.value+'&phone='+document.VideoRequest.phone.value+'&email='+document.VideoRequest.email.value+'&name='+document.VideoRequest.name.value,'Quote_Request','_blank, toolbar=no,width=350,height=150,directories=no,status=no,scrollbars=no,resizable=no,menubar=no,location=no');
	return true;
}

function CreateQuickContactWindow()
{
	window.open('forms/QuickContactSend.cfm?email='+document.QuickContactRequest.email.value+'&comments='+document.QuickContactRequest.comments.value,'Quote_Request','_blank, toolbar=no,width=350,height=150,directories=no,status=no,scrollbars=no,resizable=no,menubar=no,location=no');
	return true;
}


function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 


function changeDiv(the_div,the_change)
{
  var the_style = getStyleObject(the_div);
  if (the_style != false)
  {
    the_style.display = the_change;
  }
}

function hideAll()
{
  changeDiv("corporate","none");
  changeDiv("personal","none");
}

function getStyleObject(objectId) {
  if (document.getElementById && document.getElementById(objectId)) {
    return document.getElementById(objectId).style;
  } else if (document.all && document.all(objectId)) {
    return document.all(objectId).style;
  } else {
    return false;
  }
}

function hearSampleCall(obj)
     {
     document.getElementById("SampleCall").style.display="none";
     }
	 
function CorpPers()
{
		//window.alert(document.getElementById("corporate").options.selected);
	//alert(x);
	changeDiv("corporate","block");
	changeDiv("personal","none");
	document.corporateaccount.accttype.options[0].selected=true;
//document.getElementById("corporate").options.selected="corporate";
	//document.getElementById("personal").style.display="none";
}

function PersCorp()
{
	//alert(x);
	//window.alert(getstyleobject(x));
	changeDiv("personal","block");
	changeDiv("corporate","none");
	document.personalaccount.accttype.options[1].selected=true;
	//document.getElementById("personal").options.selected="personal";
	 //document.getElementById("corporate").style.display="";
}