function handleError() {
	return true;
}


function turnon(imgName)
 {
   if (document.images)
    {
      buttonON= new Image(100,25);
      buttonON.src=imgName + "ON.gif";
  //    alert ("turnon imgName = " + imgName);
  //    imgOn=eval(imgName + "ON.gif");
  //    alert ("turnon (2) imgName = " + imgName);
      document[imgName].src= buttonON.src;
    }
 }

function turnoff(imgName)
 {
   if (document.images)
    {
      buttonOFF= new Image(100,25);
      buttonOFF.src=imgName + ".gif";
   //   imgOff=eval(imgName + ".gif");
      document[imgName].src= buttonOFF.src;
    }
 }


//show a larger version of an image
function showLarger(theID, theImage, theObj) {
	if (document.images) {
		document[theID].src = theImage;
		if (theObj.width > 600) document[theID].width = 600
		  else document[theID].width = theObj.width;

	}
}


//show a larger version of an image
function showLargePhotoandText(theID, theImage, theObj, textID, theText, titleID, theTitle, priceID, thePrice) {
	if (document.images) {
	document[theID].src = theImage;
	if (theObj.width > 550) document[theID].width = 550
	  else document[theID].width = theObj.width; 
        document.getElementById(theID).alt=theText;
	var ta = document.getElementById(textID).firstChild;
	ta.data = theText;
//      var ti = document.getElementById(titleID).firstChild;
//	ti.data = theTitle;
//      var tp = document.getElementById(priceID).firstChild;
//	tp.data = thePrice;		
	}
	
}

//show a larger version of an image and text with embedded HTML
function showLargePhotoandHTMLText(theID, theImage, theObj, textID, theText) {
	if (document.images) {
		document[theID].src = theImage;
		if (theObj.width > 600) document[theID].width = 600
		  else document[theID].width = theObj.width; 
	var ta = document.getElementById(textID);
	ta.innerHTML = theText;

	}
	
}



function validatesignup() {
//required fields = username,email,phone
var errlist = "";
if (mainform.username.value=='') errlist = errlist + "name, ";
if (mainform.email.value=='') errlist = errlist + "email, ";
if (mainform.phone.value=='') errlist = errlist + "phone, ";
if (errlist != "") {
alert('The following fields are required: ' + errlist + '. Please fill them and submit this form again.');
event.returnValue=false;
return false;
}

}

function openNewWindow(filename, high, wide)
{
  winref = window.open(filename, "newwin1", "fullscreen=no,toolbar=yes,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no,width="+wide+",height="+high+",left=50,top=50");
  winref.focus();
}

function openNewWindow2(filename, high, wide)
{
  winref = window.open(filename, "newwin1", "fullscreen=no,toolbar=yes,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no,width="+wide+",height="+high+",left=50,top=50");
  winref.focus();
  return false;
}

