//
function getCookie(NameOfCookie){
      if (document.cookie.length > 0) {              
        begin = document.cookie.indexOf(NameOfCookie+"=");       
        if (begin != -1) {           
          begin += NameOfCookie.length+1;       
          end = document.cookie.indexOf(";", begin);
          if (end == -1) end = document.cookie.length;
            return unescape(document.cookie.substring(begin, end));
        } 
      }
      return null;
    }
//
function setCookie(NameOfCookie, value, expiredays) {
      var ExpireDate = new Date();
      ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

      document.cookie = NameOfCookie + "=" + escape(value) + 
      ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
	  history.go();
    }
//
//
defaultStatus="PROFIT-TELL International  (888) 366-4653";
//
function putFocus(formInst, elementInst) {
  if (document.forms.length > 0) {
   document.forms[formInst].elements[elementInst].focus();
  }
}
//
function PopUp(url) {
  popupWin = window.open(url, 'Login', 'status=yes,resizable=yes,scrollbars=yes,width=400,height=300')
}
//
function PopImg(url,w,h) {
  newwin = window.open('', 'Img', 'status=yes,resizable=yes,scrollbars=yes,width='+w+',height='+h+'');
  if (!newwin.opener) newwin.opener = self;
	with (newwin.document)
	{
	open();
	write('<html><title>Image Enlarge</title>');
	write('<link href="style.css" rel="stylesheet" type="text/css">');
	write('<body bgcolor="#eeeeee" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="self.focus()">');
	write('<img src="'+url+'" onClick="window.close()"; title="Click to Close Window" style="cursor:hand;">');
	write('</body></html>');
	close();
   }
}
