/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 	Handles the right column expand/collapse in the product detail * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */var lastRCol = null;function hideShow_rCol(divID) {	// check to see if there was one fired before	if (lastRCol != null && lastRCol != divID)		document.getElementById(lastRCol).className = "prodinfo-1-collapse";		var theDiv = document.getElementById(divID);		if (theDiv.className.toLowerCase() != "prodinfo-1-expand") // need to expand it		theDiv.className = "prodinfo-1-expand";	else		theDiv.className = "prodinfo-1-collapse";		lastRCol = divID;}/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 	Handles the navigation along top of the page * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */function getNav(navLevel1, navLevel2, navLevel3){      if(navLevel1 != "")    {       var navlevel1div = document.getElementById(navLevel1);       navlevel1div.className = "on";      // alert(navLevel1);    }           if(navLevel2 != "")    {        var navlevel2div = document.getElementById(navLevel1+"_"+navLevel2);        navlevel2div.className = "on";      //alert(navlevel2div);    }        if(navLevel3 != "")    {    var navlevel3div = document.getElementById(navLevel1+"_"+navLevel2+"_"+navLevel3);        navlevel3div.className = "on";    }  }var whitespace = "\t\r\n"function validate(){	var requiredFields = new Array("fname", "lname","email","comment");	var fieldNames = new Array("First Name", "Last Name","Email Address","Comments");	var missedFields = "Please enter values in the following fields:\n\n" ;	var f = document.contactform;	var fieldsGood = true;	for(var i=0; i<requiredFields.length; i++)	{	if(trim(f.elements[requiredFields[i]].value) == "")	{		missedFields = missedFields += fieldNames[i]+"\n";		fieldsGood = false;   	}	} 	    	if(fieldsGood == true)	{	 	 if(!isEmail(f.email.value))	 { 		alert("The email address entered is invalid.");		f.email.focus();		return false;	 } //end isEmail if statement	      return true;	}	else	{	 alert(missedFields);	 return false;	} }function trim(s){//trims whitespace and carrige returns from beginnings and ends values s = s.replace(/\s*$/, ""); s = s.replace(/^\s*/, ""); return s; }//end function trimfunction isEmail(x){ if((x == "") || (x == null)){return false;}	       if(hasWhitespace(x)){return false;}	       var i = 1; while((i<x.length) && (x.charAt(i) != "@")) {   i++; }     if((i>x.length) || (x.charAt(i) != "@")) {  return false; } else {  i += 2; }	       while((i<x.length) && (x.charAt(i) != ".")) {   i++; }	       if((i>x.length) || (x.charAt(i) != ".")) {  return false; } else {  return true; }}//end isEmail functionfunction hasWhitespace(x){     	       for(var i=0;i<x.length;i++) {  var c = x.charAt(i)  if(whitespace.indexOf(c) == -1){return false;} }  return true;}//end whitespace functionfunction galleryimageswap(input){ document.getElementById('galleryimage').src = "_assets/img/" + input.id + ".jpg";}