isie=(navigator.appName=="Microsoft Internet Explorer")?1:0;
coldimg = new Image();coldimg.src="/images/plate_icon_cold.gif";
hotimg = new Image();hotimg.src="/images/plate_icon_hot.gif";
coldbuy = new Image();coldbuy.src="/images/buythebook_cold.jpg";
hotbuy = new Image();hotbuy.src="/images/buythebook_hot.jpg";
secon = new Image();secon.src="/images/security_on.gif";
secoff = new Image();secoff.src="/images/security_off.gif";
function swap(img,st) {
 document.images[img].src=eval(st+".src");
}
function stat(msg) {
 top.status=msg;
 return true;
}
function unhidepwd(frm) {
 fld=document.forms[frm].elements['password'];
 imgn="security"+frm;
 img=document.getElementById(imgn);
 if (fld.type=="password") {
  fld.type="text";
  fld.style.backgroundColor="#aeffae";
  img.src=secoff.src;
  img.alt="Hide your Password!";
 }
 else {
  fld.type="password";
  fld.style.backgroundColor="";
  img.src=secon.src;
  img.alt="Show your Password?";
 }
}
function hidepwd(frm) {
 if (!isie) {
 fld=document.forms[frm].elements['password'];
 imgn="security"+frm;
 img=document.getElementById(imgn);
 fld.type="password";
 fld.style.backgroundColor="";
 if (img) {
  img.src=secon.src;
  img.alt="Password Hidden";
 }
 }
}
function writesec(numb) {
 showsec='<a href="javascript:void unhidepwd('+numb+')" onmouseover="this.style.backgroundColor=\'white\'"><img id="security'+numb+'" src="../images/security_on.gif" width=22 height=16 border=0 alt="Show your Password?" title="Show your Password?" /></a>';
 nosec='<img src="../images/dot_trans.gif" width=22 height=16 border=0 alt="Low-Calorie Meals" />';
 if (navigator.userAgent.indexOf("MSIE")!=-1) { document.write(nosec); }
 else { document.write(showsec); }
}
function menuPrint(mnu) {
 menuprint="menu_ebook.html?page="+mnu;
 window.open(menuprint,"Menu","width=576,height=720,scrollbars=off,toolbars=off,statusbar=off,resizable=no");
}
function chkWeight(fld,msr) {
 if (fld.value!="") {
  wgtchk=confirm("Is "+fld.value+" "+msr+" correct?\nCancel to change it.\nOK to record it.");
  if (wgtchk) { return true; }
  else {
   fld.focus();
   return false;
  }
 }
 else { return false; }
}
function opengraph(nam) {
 getgraph="http://207.36.208.248/mpd/mpdgraph.php?infile="+nam;
 window.open(getgraph,'graph','width=350,height=440,resizable=yes,scrollbars=yes,toolbar=no,status=no');
}
