function windowFrame(windowName,frameWidth,frameHeight,url) {
  fw=window.open(url,windowName,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,left=0,top=0,width=" + frameWidth + ",height=" + frameHeight);     
  fw.focus();
}

function windowNonResizable(windowname,frameWidth,frameHeight,url, centered){
  fw=window.open(url,windowname,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=no,left=0,top=0,width=" + frameWidth + ",height=" + frameHeight);     
  if(centered==true){
    fw.moveTo((screen.Width-frameWidth)/2,(screen.Height-frameHeight)/2 );
  }
  fw.focus();
}

function windowReference(windowName,url) {
   fw=window.open(url,windowName,"toolbar=1,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,left=0,top=0,width=700,height=500");     
   fw.moveTo((screen.Width-780)/2,(screen.Height-500)/2 );
   fw.focus();
}

function checkEmpty(control) {
    var a= document.getElementById(control);
    
    if (a.value.length == 0)
    {
        alert('Please enter a search term');
        return false;
     }
     else
    {
    return true;
}
}

function checkEmpty2(control) {
    var a= document.getElementById(control);
    
    if (a.value.length == 0)
    {
        alert('Please enter a search term');
        return false;
     }
     else
    {
    document.frmSearch.submit();
    return true;
}
}