var message="Sorry, this function is disabled to help protect the copyright holder of this image. \n\n Infringement of this copyright or other unlawful use of this image is strictly prohibited.";
overImage=0;

function mouseDown1(e) {
 var clickType=1;
 var tgt="";
 if (parseInt(navigator.appVersion)>3) {
  if (navigator.appName=="Netscape") {
   clickType=e.which;
   tgt=""+e.target;
   if (tgt.length!=0 && tgt.charAt(tgt.length-1)=="#") 
    overImage=1;
  }
  else {
   clickType=event.button;
   if (""+event.srcElement.className=="disabledMenu")
    overImage=1;
  }
  if (clickType!=1 && overImage) {
   alert (message)
   return false;
  }
 }
 return true;
}
if (parseInt(navigator.appVersion)>3) {
 document.onmousedown = mouseDown1;
 if (navigator.appName=="Netscape") 
  document.captureEvents(Event.MOUSEDOWN);
}

window.name = 'MyBeer';
window.focus()

function PopupTop10(PopupName)
{
    window.open(PopupName, "Copyright", "toolbar=0,menubar=0,left=337,top=209,resizable=1,height=400,width=400,scrollbars=1");
}

function PopupTopSmall(PopupName)
{
    window.open(PopupName, "WishList", "toolbar=0,menubar=0,left=337,top=209,resizable=1,height=250,width=250,scrollbars=1");
}

function PopupGlassware(PopupName)
{
    window.open(PopupName, "WishList", "toolbar=0,menubar=0,left=337,top=209,resizable=1,height=475,width=375,scrollbars=1");
}

function HandleSelection()
{
    var nSel;

    nSel = Top10Select.value;
    RedirPage = "#" + nSel;
    window.location = RedirPage;
}

function PopTop(PopupName)
{
    RedirPage = "/ShowStyle.asp?StyleID=" + PopupName;
    window.open(RedirPage, "BeerStyles", "toolbar=0,menubar=0,left=337,top=209,resizable=1,height=375,width=375,scrollbars=1");
}

function PopAvail(PopupName)
{
    RedirPage = "/Avail-Add.asp?BeerID=" + PopupName;
    window.open(RedirPage, "BeerAvail", "toolbar=0,menubar=0,left=337,top=209,resizable=1,height=375,width=375,scrollbars=1");
}

function PopUpWho(BeerID)
{
    RedirPage = "/Ratings-Who.asp?BeerID=" + BeerID;
    window.open(RedirPage, "WhoRatedThis", "toolbar=0,menubar=0,left=337,top=209,resizable=1,height=375,width=375,scrollbars=1");
}


function isNumber(entry) {
var validChar = '0123456789'; // characters allowed in hex
var strlen = entry.length;          // how long is test string
//if (strlen < 1) {alert('Enter Something!');return false;} // no check!
entry=entry.toUpperCase();          // in case of lowercase characters
// Now scan string for illegal characters
for (var i = 0; i < strlen; i++ ) {
    if (validChar.indexOf(entry.charAt(i)) < 0) {
       alert("Entry must be a number!");
       return false;
       }
    } // end scanning loop
//alert('ok!'); return true;
}