coldimg = new Image();coldimg.src="/stage/noexcusesdiet/images/plate_icon_cold.gif";
hotimg = new Image();hotimg.src="/stage/noexcusesdiet/images/plate_icon_hot.gif";
coldbuy = new Image();coldbuy.src="/stage/noexcusesdiet/images/buythebook_cold.jpg";
hotbuy = new Image();hotbuy.src="/stage/noexcusesdiet/images/buythebook_hot.jpg";
secon = new Image();secon.src="/stage/noexcusesdiet/images/security_on.gif";
secoff = new Image();secoff.src="/stage/noexcusesdiet/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) {
 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="/stage/noexcusesdiet/images/security_on.gif" width=22 height=16 border=0 alt="Show your Password?" title="Show your Password?" /></a>';
 nosec='<img src="/stage/noexcusesdiet/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 chkFlds() {
 frm=document.forms[0];
 doit=1;
 for (i=0;i<=frm.elements.length-1;i++) {
  if (frm.elements[i].value==="") {
   doit=0;
  }
 }
 if (doit) {
  document.forms[0].elements["subbut"].disabled=0;
 }
}
function chkEmail(em1,em2) {
 if (em1.value != em2.value) {
  alert("Please check your email address, again. Thanks.");
  em1.focus();
  em2.value="";
 }
}

