﻿/*
    Empty form fields
*/
function clearText(objField){
	if (objField.defaultValue==objField.value)
	objField.value = ""
}

/*
    Change images on rollover
*/
function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document.images[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}


/*
    Preload images
*/
if (document.images) {
    
    partson = new Image();
    partson.src = "/Images/layout/n_parts_o.gif";
    partsoff = new Image();
    partsoff.src = "/Images/layout/n_parts.gif";
    
    repairon = new Image();
    repairon.src = "/Images/layout/n_repair_o.gif";
    repairoff = new Image();
    repairoff.src = "/Images/layout/n_repair.gif";
    
    serviceon = new Image();
    serviceon.src = "/Images/layout/n_service_o.gif";
    serviceoff = new Image();
    serviceoff.src = "/Images/layout/n_service.gif";
    
    abouton = new Image();
    abouton.src = "/Images/layout/n_about_o.gif";
    aboutoff = new Image();
    aboutoff.src = "/Images/layout/n_about.gif";
    
    contacton = new Image();
    contacton.src = "/Images/layout/n_contact_o.gif";
    contactoff = new Image();
    contactoff.src = "/Images/layout/n_contact.gif";
    

}



	
	/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
Modified here to disable IE image hover menu and
truly disable right click in FF by jscheuer1 in
http://www.dynamicdrive.com/forums
*/

var clickmessage="Images Copyright Xpress Appliance. \nTo receive permission to reuse an image, contact Xpress Appliance at 888.XAP.1020."

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById)
if (e.which==3&&e.target.tagName=="IMG")
setTimeout("alert(clickmessage)",0)
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all){
document.onmousedown=disableclick
for (var i_tem = 0; i_tem < document.images.length; i_tem++)
document.images[i_tem].galleryimg='no'
}
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()



