function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}

var preloadFlag = false;
function preloadImages() {
if (document.images) {
n_home_o = newImage("images/n_home_o.jpg");
n_about_us_o = newImage("images/n_about_us_o.jpg");
n_whats_new_o = newImage("images/n_whats_new_o.jpg");
n_the_collection_o = newImage("images/n_the_collection_o.jpg");
n_customer_service_o = newImage("images/n_customer_service_o.jpg");
n_press_o = newImage("images/n_press_o.jpg");
n_contact_us_o = newImage("images/n_contact_us_o.jpg");
preloadFlag = true;
}
}



/* from Sam Kasten ABOUT page */
function openWin(URL)
{
aWindow=window.open(URL, "popup", "toolbar=no,width=650,height=500,scrollbars=yes,resizable=yes,menubar=no,top=25,left=25");
aWindow.focus();
}

function NewWindow(file, w, h){
window.open(file,"NewWindow","toolbar=yes,directories=no,resizable=YES,scrollbars=no,location=no,menubar=no,top=25,left=25,width="+w+",height="+h);
}

/* from Sam Kasten ABOUT page */








/* from CLIMATEX page */

function openWin(URL)
{
aWindow=window.open(URL, "popup", "toolbar=no,width=650,height=520,scrollbars=yes,resizable=no,menubar=no,top=0,left=0");
aWindow.focus();
}

function openCollection(URL)
{
aWindow=window.open(URL, "collection", "toolbar=no,width=488,height=531,scrollbars=no,resizable=no,menubar=no,top=0,left=0");
aWindow.focus();
}

function openCollection_climatex(URL)
{
aWindow=window.open(URL, "climatexcollection", "toolbar=no,width=488,height=558,scrollbars=no,resizable=no,menubar=no,top=0,left=0");
aWindow.focus();
}

/* from CLIMATEX page */










function Validate(theForm) {

 if (theForm.fname.value.length =="")
 {
 alert("Please enter a value for the \"First Name\"\ field.");
 theForm.fname.focus();
 return (false);
 }
 
 if (theForm.lname.value.length =="")
 {
 alert("Please enter a value for the \"LastName\"\ field.");
 theForm.lname.focus();
 return (false);
 }
 
 if (theForm.address.value.length =="")
 {
 alert("Please enter a value for the \"Address\"\ field.");
 theForm.address.focus();
 return (false);
 }
 
 if (theForm.city.value.length =="")
 {
 alert("Please enter a value for the \"City\"\ field.");
 theForm.city.focus();
 return (false);
 }
 
 if (theForm.state.value.length =="")
 {
 alert("Please enter a value for the \"State\"\ field.");
 theForm.state.focus();
 return (false);
 }
 
 if (theForm.zip.value.length =="")
 {
 alert("Please enter a value for the \"Zip\"\ field.");
 theForm.zip.focus();
 return (false);
 }
 
 if (theForm.phone.value.length =="")
 {
 alert("Please enter a value for the \"Phone\"\ field.");
 theForm.phone.focus();
 return (false);
 } 
 
 if (theForm.email.value.length =="")
 {
 alert("Please enter a value for the \"E-mail address\"\ field.");
 theForm.email.focus();
 return (false);
 } 
 
 if (theForm.how.value.length =="")
 {
 alert("Please enter a value for the \"How did you learn about us?\"\ field.");
 theForm.how.focus();
 return (false);
 }
}


function validate(field) {
var valid = "0123456789-() "
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("Please enter numeric charactors only in the zip and phone fields.");
field.focus();
field.select();
 }
}




function BothFieldsIdenticalCaseSensitive() {
var one = document.FormName.fname.value;
var another = document.FormName.lname.value;
if(one != another) { return true; }
alert("Perhaps you've made an error - both FIRST and LAST names appear the same.");
return false;
}

function BothFieldsIdenticalCaseInsensitive() {
var one = document.FormName.fname.value.toLowerCase();
var another = document.FormName.lname.value.toLowerCase();
if(one != another) { return true; }
alert("Oops, both fields must be identical.");
return false;
}








