
var PXpos=document.body.scrollLeft+window.document.body.clientWidth;
var PYpos=document.body.scrollTop+window.document.body.clientHeight;

if(PXpos<400)PXpos=800;
if(PYpos<400)PYpos=800;

var Xpos=(PXpos/2)-200;
var Ypos=PYpos-400;

var url=self.location.href;
var H;
var home='';
if(url.indexOf('cgi-bin')!=-1){ H=url.split("cgi-bin"); home=H[0]; }
else if(url.indexOf('shopcart/html/')!=-1){ H=url.split("shopcart/html/"); home=H[0]; }
else if(url.indexOf('shopcartm/html/')!=-1){ H=url.split("shopcartm/html/"); home=H[0]; }
else
{
 H=self.location.href.split("/");
 for(x=0;x<H.length-1;x++)home+=H[x]+='/';
}

var text="";
text+="<form name='eform' action='"+home+"cgi-bin/site.pl' method='post' onsubmit='return gologin(1);'>";
text+="<input type='hidden' name='Form_Type' value='Site'>";
text+="<input type='hidden' name='Action' value='Index'>";
text+="<input type='hidden' name='Act' value=''><!--NOT NOT ADD FORM ACT VALUE-->";
text+="<input type='hidden' name='Page' value='login'>";
text+="<input type='hidden' name='editor' value=''>";
text+="<input type='hidden' name='Adminbase' value=''>";
text+="<div id='DivLogin' style='left:0px;top:0px;height:"+(PYpos+80)+"px;display:none;' runat='server'>";
text+="<div id='BakLogin' style='left:"+Xpos+"px;top:"+Ypos+"px;'>";
text+="<div width='100%' align='right'><A style='text-decoration: none' href=\"javascript:setVisible('DivLogin',0,0);\"><b style='color:red'>[Hide]</b></A></div>";
text+="<table class='basic' cellspacing='0' cellpadding='5'>";
text+=" <tr>";
text+="  <td valign=top>";
text+="  <h4 class='info' align='center'> - : Administration Login : -</h4>";
text+="  <table class='basic' height='180' cellSpacing='0' cellPadding='0' width='100%' border='0' align='center'>";
text+="   <tr height='15'>";
text+="    <td background='"+home+"i/corners/4/4_tl.gif'></td>";
text+="    <td width='100%' background="+home+"i/corners/4/4_t.gif alt=''></td>";
text+="    <td background='"+home+"i/corners/4/4_tr.gif'></td>";
text+="   </TR>";
text+="   <tr>";
text+="    <td background='"+home+"i/corners/4/4_l.gif' height='100%'></td>";
text+="    <td vAlign='top' width='100%' height='100%' style='font-size:12px;color:#000000;'>";
text+="    <p><br><br><b style='color:red'>*</b> Email <input class='userName' type='text' name='AEmail' id='AEmail' value='' size='40' tabindex='1'></p>";
text+="    <p><br><b style='color:red'>*</b> Password <input class='userPass' type=password name='APW' id='APW' value='' size='15' tabindex='2'></p>";
text+="    <font class='notice'>Case Sensitive. ( min 6 characters )</font>";
text+="    <p><br>";
text+="    <img src='"+home+"i/security.png' class='floatLeft'>";
text+="    <input class='hbut' type='submit' value=' Login ' onclick='document.eform.Action.value=\"\";' tabindex=3>";
text+="    <input class='hbut' type='reset' value='Clear' tabindex=4> ";
text+="    <br>";
text+="    </td>";
text+="    <td background="+home+"i/corners/4/4_r.gif height='100%'></td>";
text+="   </TR>";
text+="   <tr height=23>";
text+="    <td><img src='"+home+"i/corners/4/4_bl.gif'></td>";
text+="    <td width='100%' background='"+home+"i/corners/4/4_b.gif'></td>";
text+="    <td><img src='"+home+"i/corners/4/4_br.gif'></td>";
text+="   </tr>";
text+="  </table>";
text+="  <p align=center class=notice>";
text+="  Forgot your password? Enter your Email and click 'Lost Password' button to have your password emailed to you. <br>";
text+="  <input type=submit class=hbut value='Lost Password' onClick='if(confirm(\"Click OK to email your password.\"))document.eform.Action.value=\"email_pwd\";else return false;' onmouseover='on(this,\"#ff48b8\");' onmouseout='off(this,\"#ffffff\");'>";
text+="  </p>";
text+="  </td>";
text+=" </tr>";
text+="</table>";
text+="</div>";
text+="</div>";
text+="</form>";

document.write(text);

 var tdays=Format('0',0);
 var Site=GetCookie('Site');
 var efields = new Array("AEmail","A valid Email address","APW","Your PassWord");
 function gologin(ref)
 {
  if(document.eform.Action.value!='email_pwd')
  {
   if(!validatefields(efields)) return false;
   storefields(Site,efields,tdays);
   document.eform.Action.value="AccLogin";
   document.eform.Page.value="Options";
   document.eform.Adminbase.value="1";
  }
  return true;
 }

 returnfields(Site,efields);

