Xoffset=-160;    // modify these values to ...-160
Yoffset= 80;    // change the popup position. 80

var old,skn,iex=(document.all),yyy=-1000;

var login_switch = 0;
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
var def_break = '5';
var def_height = '140';
var def_break2 = '10';
if (!member_login_add) { var member_login_add = ''; }

if (ns4) {
skn=document.dek
}
else if (ns6) {
skn=document.getElementById("dek").style
}
else if (ie4) {
skn=document.all.dek.style
def_break='1';
def_height='90';
def_break2 = '15';
}
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}

function popup_login(redir){
    var login_pad = 500;
if (login_switch == 0) {
    if (redir == null) {
	redir = '0';
    }
    var content="<table width=\"100%\" height=\"" + login_pad + "\"><tr><th align=\"center\" valign=\"center\"><table width=\"300\" height=\"" + def_height + "\" cellpadding=\"0\" cellspacing=\"0\" style=\"border: 2px solid #334D80;\"><tr height=\"25\" class=\"navbar\"><th align=\"left\"><b>btjunkie " + lang[2] + "</b></th><th align=\"right\"><a class=\"Wht\" href=\"#\" onclick=\"popup_login();\"><img src=\"/images/close1.gif\" alt=\"\" border=\"0\" width=\"21\" height=\"20\"></a></th></tr><tr><th bgcolor=\"#9AB4D1\" colspan=\"2\" width=\"100%\" height=\"100%\" align=\"center\" valign=\"center\"><form action=\"/member\" method=\"POST\" name=\"login_box\"><input type=\"hidden\" name=\"do\" value=\"takelogin\"><input type=\"hidden\" name=\"rd\" value=\"" + redir + "\"><input type=\"hidden\" name=\"extra\" value=\"\"><table width=\"100%\" height=\"100%\"><tr><th height=\"" + def_break2 + "\" colspan=\"5\"></th></tr><tr><th width=\"30\"></th><th align=\"left\"><b>" + lang[3] + ":</b></th><th width=\"10\"></th><th align=\"left\"><input type=\"text\" name=\"login\" class=\"input1\"></th><th width=\"30\"></th></tr><tr><th width=\"30\"></th><th align=\"left\"><b>" + lang[4] + ":</b></th><th width=\"10\"></th><th align=\"left\"><input type=\"password\" name=\"password\" class=\"input1\"></th><th width=\"30\"></th></tr><tr><th colspan=\"5\" height=\"" + def_break + "\"></th></tr>" + loginbreak + "<tr><th width=\"30\"></th><th align=\"left\" colspan=\"3\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><th width=\"50\" align=\"left\"><a href=\"/?do=forgot\" class=\"Blue\"><font style=\"font-size: 8pt;\">" + lang[5] + "?</font></a></th><th width=\"10\"></th><th width=\"75\" align=\"left\"><a href=\"/cc.php\" class=\"Blue\"><font style=\"font-size: 8pt;\">" + lang[7] + "?</font></a></th><th align=\"right\" valign=\"bottom\"><input type=\"submit\" value=\"" + lang[2].substr(0,1).toUpperCase() + lang[2].substr(1) + "\" style=\"font-weight: bold;\"></th></tr></table></th><th width=\"30\"></th></tr></table></form></th></tr></table></th></tr>";
    if (special_close) {
        var content="<table width=\"100%\" height=\"" + login_pad + "\"><tr><th align=\"center\" valign=\"center\"><table width=\"300\" height=\"" + def_height + "\" cellpadding=\"0\" cellspacing=\"0\" style=\"border: 2px solid #334D80;\"><tr height=\"25\" class=\"navbar\"><th align=\"left\"><b>btjunkie " + lang[2] + "</b></th><th align=\"right\"><a class=\"Wht\" href=\"#\" onclick=\"location.href='" + special_close + "'\"><img src=\"/images/close1.gif\" alt=\"\" border=\"0\" width=\"21\" height=\"20\"></a></th></tr><tr><th bgcolor=\"#9AB4D1\" colspan=\"2\" width=\"100%\" height=\"100%\" align=\"center\" valign=\"center\"><form action=\"/member\" method=\"POST\" name=\"login_box\"><input type=\"hidden\" name=\"do\" value=\"takelogin\"><input type=\"hidden\" name=\"rd\" value=\"" + redir + "\"><table width=\"100%\" height=\"100%\"><tr><th height=\"" + def_break2 + "\" colspan=\"5\"></th></tr><tr><th width=\"30\"></th><th align=\"left\"><b>" + lang[3] + ":</b></th><th width=\"10\"></th><th align=\"left\"><input type=\"text\" name=\"login\" class=\"input1\"></th><th width=\"30\"></th></tr><tr><th width=\"30\"></th><th align=\"left\"><b>" + lang[4] + ":</b></th><th width=\"10\"></th><th align=\"left\"><input type=\"password\" name=\"password\" class=\"input1\"></th><th width=\"30\"></th></tr><tr><th colspan=\"5\" height=\"" + def_break + "\"></th></tr>" + loginbreak + "<tr><th width=\"30\"></th><th align=\"left\" colspan=\"3\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><th width=\"50\" align=\"left\"><a href=\"/?do=forgot\" class=\"Blue\"><font style=\"font-size: 8pt;\">" + lang[5] + "?</font></a></th><th width=\"10\"></th><th width=\"75\" align=\"left\"><a href=\"/cc.php\" class=\"Blue\"><font style=\"font-size: 8pt;\">" + lang[7] + "?</font></a></th><th align=\"right\" valign=\"bottom\"><input type=\"submit\" value=\"" + lang[2].substr(0,1).toUpperCase() + lang[2].substr(1) + "\" style=\"font-weight: bold;\"></th></tr></table></th><th width=\"30\"></th></tr></table></form>" + member_login_add + "</th></tr></table></th></tr>";    
    }
	yyy=Yoffset;
 	if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
 	if(ns6){document.getElementById("dek").innerHTML=content;skn.display=''}
 	if(ie4){document.all("dek").innerHTML=content;skn.display=''}
	document.login_box.login.focus();
	login_switch = 1;
}
else  {
	yyy=-1000;
	if(ns4){skn.visibility="hidden";}
	else if (ns6||ie4)
	skn.display="none";
	login_switch = 0;
}
}
