function popUp(URL, WIDTH, HEIGHT) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + WIDTH + ",height=" + HEIGHT + ",left = 10,top = 10');");
}

function stopError(){
return true;
}

window.onerror=stopError;

function a(form){
 for(var b=0;b<form.elements.length;b++){
  if((form.elements[b].selectedIndex>-1)){
   if(form.elements[b].selectedIndex==0 || form.elements[b+1].value>0){
      alert('Please select a '+form.elements[b].name.toLowerCase());
   return false;
    }
   }
  }
 return true;
}

function qtyOne(thefield) {
	if (thefield.value=="") thefield.value = "1";
	thefield.select();
}

<!-- Begin
function CaricaFoto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}

function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}

function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}
//  End -->

function setCookie(path, expiredays) {
  var ExpireDate = new Date ();
  ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
  document.cookie = "path=" + escape(path) + 
  ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}

function getCookie(path) {
  if (document.cookie.length > 0) { 
    begin = document.cookie.indexOf(path+"="); 
    if (begin != -1) {   
      begin += path.length+1; 
      end = document.cookie.indexOf(";", begin);
      if (end == -1) end = document.cookie.length;
      return unescape(document.cookie.substring(begin, end));
    } 
  }
return ""; 
}

function moveValues() {

var item = document.review.item.value;
var name = document.review.name.value;
var rating = document.review.rating.value;
var title = document.review.title.value;
var review = document.review.review.value;
var location = document.review.location.value;

window.open('http://www.ejones.com/cgi-bin/reviewmail.pl?rating='+rating+'&item='+item+'&review='+review+'&location='+location+'&name='+name+'&title='+title,'newWin','fullscreen=no,titlebar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=240');

}

function processNotify() {

var item = document.notify.nitem.value;
var itemname = document.notify.nitemname.value;
var name = document.notify.nname.value;
var email = document.notify.nemail.value;
var website = document.notify.nwebsite.value;

window.open('http://www.ejones.com/cgi-bin/notifymail.pl?name='+name+'&email='+email+'&website='+website+'&itemname='+itemname+'&item='+item,'newWin','fullscreen=no,titlebar=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=240');

}
