var MI,rM,nt,vp,ku,wn,uv,mNs,LLK,GBW;var Nj=0;var BLB=0;
var zv=0;var fu=new Array();var EE=new Array();var EU=new Array();var fb=new Array();var AH=new Array('<ul id="nv">');var ika=new Array(0,0,13,25,37,48,59,70,81,92,103,114,125,136,147,158,169,180,191,202,213,223);
var Nv=new Array();
function U(MQ){var HAV=AV(MQ,'b');HAV=HAV+'/'+MQ+'.jpg';EU.push('<li style="padding:4px 0 3px 11px;"><a href="http://asiantown.net/'+MQ+'" onmouseover="fxtool(this,\''+MQ+'\');" onMouseout="delaytip()"><img src="'+HAV+'" width="25" height="27" alt=""/> '+MQ+'</a></li>');}

function Q(MQ){var MAV=AV(MQ.toLowerCase(),'c')+'/'+MQ+'.jpg';EE.push('<a href="http://asiantown.net/'+MQ+'" onmouseover="fxtool(this,\''+MQ+'\')" onMouseout="delaytip()"><img src="'+MAV+'" width="50" height="50" alt="'+MQ+'" /></a>');}

function nz(nzi,nzn,nzk,niC){
var n50='';if (nzk>49){n50=' style="color:red;"';}
Nv.push('<li><div class="ni" style="background-position:0 -'+ika[niC]+'px;"> </div> <a href="http://news.asiantown.net/read/'+nzi+'.html">'+nzn+' (<span'+n50+'>'+nzk+'</span>)</a></li>');}

function NWK(){document.getElementById("nwc").innerHTML=Nv.join('');Nv=null;}


function newz(){fu.push('<h1 class="hd"><a href="http://news.asiantown.net/default.aspx">News</a></h1><div><ul id="nwc" class="hdu"><li><img src="http://axaru.com/i/load.gif" alt="" width="16" height="16" /></li></ul></div>');}
function foru(){fu.push('<h1 class="hd"><a href="http://forums.asiantown.net/index.html">Forums</a></h1><div><ul class="hdu" id="FAM"><li><img src="http://axaru.com/i/load.gif" alt="" width="16" height="16" /></li></ul></div>');}
function u(u1,u2,sb){fb.push('<li><a href="http://forums.asiantown.net/topic.aspx?id='+u1+'&c='+u2+'">'+sb+'</a></li>');}
function blog(){
	
	fu.push('<h1 class="hd"><a href="http://blogs.asiantown.net/default.aspx">Weblogs</a></h1><div id="blz"><img src="http://axaru.com/i/load.gif" alt="" width="16" height="16" />Loading...</div>');
	
	}
var BA=new Array();
function BG(bid,bic,bti,bds,bAg){
var brd='';if (bds.length<2){bds='&nbsp;';}
if (BA.length==0){brd=' style="border-top:none;"';}
if (BA.length==13){brd=' style="border-bottom:none;"';}
var DuD=new Date(bAg);
var YAR=DuD.getYear();
if (bic.length<3){bic='http://axaru.com/i/t.gif';}
if (YAR<2000){YAR=1900+YAR;}
var tuf=bti.replace(/[^a-z0-9]/ig,'-');
var aL='<a href="http://blogs.asiantown.net/-/'+bid+'/'+tuf.toLowerCase()+'.aspx">';

BA.push('<div class="bng"'+brd+'>'+aL+'<img src="'+bic+'" alt="" width="60" height="60" /></a><div><h2>'+aL+''+bti+'</a></h2><span>'+bds+'</span></div></div>');
}

//function BOG(){if (document.getElementById("blz")){document.getElementById("blz").innerHTML=BA.join('');BA=null;}}


function Xv(){
//document.getElementById('mtop').innerHTML='<a href="index.html" class="ww">Guest<b class="ona">*</b>';

var nUx=new Date(nuu.toGMTString());sco('p','',nUx);sco('t','',nUx);sco('o','',nUx);sco('v','',nUx);sco('i','',nUx);sco('a','',nUx);sco('q','',nUx);sco('l','',nUx);}

var VB=new Array();var ML=new Array();


function MWR(mil){var mjn;VB.push('<li class="');
if (mil.length<6){
mjn=parseInt(mil);
var MCK=ML[mjn].split('$');
VB.push('m_'+MCK[0]);
VB.push('"><a href="');
if (MCK[0]=='gb'){VB.push('http://guestbook.asiantown.net/guestbook.aspx?id='+mem+'" id="gbL"><span id="gba">Guestbook</span></a>');GBW=1;}
else {
VB.push('http://'+MCK[1]);VB.push('">'+MCK[2]);
}
}
else {
var MSS=mil.split('$');
if (MSS[0]=='0'){
VB.push('m_link');
}else {

VB.push('m_bg" style="background-image:url('+MSS[0]+')');

}

VB.push('"><a href="');
VB.push(MSS[2]);
VB.push('">'+MSS[1]);

}

VB.push('</a></li>');

}



function Gh(Gz,GPR){if (document.getElementById('gba')){if (GPR==1){document.getElementById('gbL').href='http://guestbook.asiantown.net/guestbook_edit.aspx';document.getElementById('gba').innerHTML='<b class="apr">Approve GB Entries!</a>';}else{document.getElementById('gba').innerHTML='Guestbook: '+Gz;}}}


function LGN(){
//MI=null;

//if (MI==0){Xv();}
if (MI!=null){

if (mem=='Guest'){Xv();}

VB.push('<div id="mys"><ul>');
var noh='My Notes';if(nt==1){noh='<b class="rd">New Notes!</b>';}
ML[1]='note$notes.asiantown.net$'+noh;
ML[2]='blog$edit.asiantown.net/myblog/default.aspx$My Blog';
ML[3]='kudo$my.asiantown.net/my/kudos.aspx$My Kudos: '+ku;
ML[4]='gb$guestbook.asiantown.net/guestbook.aspx?id='+mem+'$Guestbook<span id="gba"></span>';
ML[5]='wan$my.asiantown.net/my/wannabuddies.aspx$Wanna Buddies: '+wn;
ML[6]='ava$avatar.asiantown.net/upload.aspx$My Avatar';
ML[7]='online$my.asiantown.net/my/onlinemode.aspx$Online Mode';
ML[8]='edit$editpage.asiantown.net/design.aspx$Edit MyPages';
ML[9]='log$editpage.asiantown.net/pagelog.aspx$Page Log';
ML[10]='tools$edit.asiantown.net/index.html$My Tools';
ML[11]='rate$rate.asiantown.net/myrates.aspx$My Ratings';
ML[12]='bud$my.asiantown.net/my/buddies.aspx$My Buddies';
ML[13]='gallery$edit.asiantown.net/albums.aspx$My Gallery';
ML[14]='forum$forums.asiantown.net/favoritetopics.aspx$My Favorite Forums';
ML[15]='onlinebud$my.asiantown.net/my/onlinebuddies.aspx$Online Buddies';
//ML[16]='club$clubs.asiantown.net/myclub.aspx$My Club';
if (mNs==null||mNs==''||mNs=='0'){mNs='1`2`3`4`5`6`7`8`9`10`11`12`13`14`15';}
var mar=mNs.split('`');var MAL=mar.length;var mil;
for (var i=0;i<MAL;i++){
MWR(mar[i]);
}
VB.push('</ul></div>');
document.write(VB.join(''));
VB=null;
}

else {Xv();document.write('<div id="myn"><form id="lgi" name="lgi" method="post" onsubmit="return CF()" action="http://login.asiantown.net/my.aspx"><h3>Member Login</h3>Username:<br /><input name="u" type="text" maxlength="18" /><br />Password:<br /><input name="p" type="password"  /><br />Online Mode: <select name="m"><option value="1" selected="selected">Normal</option><option value="2">Available</option><option value="3">Not Available</option><option value="0">Invisible</option></select><br /><input name="ru" id="ru" type="checkbox" value="1" /><label for="ru">remember user</label><p><input name="lo" type="submit" value="LOGIN" /></p><p><a href="'+My+'signup.aspx" class="sup" title="Free! Join AsianTown.NET"><b>Free Sign Up!</b></a></p> <ul><li><a href="'+My+'password.aspx" class="w">Forgot Password?</a></li><li><a href="'+My+'trouble.html" class="w">Login Trouble?</a></li></ul></form></div>');}
}



function jup(){
var F=document.forms['ju'];var JmP=F.jp.value;JmP=JmP.replace(/\s/ig,'');
if (F.jp.value.length<3){alert('enter user');}
else {top.location.href='http://asiantown.net/'+JmP;}
}


function r(){var SR=new Array('<h3 class="mh3"><a href="'+My+'members.aspx">New Members</a></h3><ul class="wo">');
var fv='';var lee=nm.length-1;var ss=0;for (ss=0;ss<lee;ss++){if (cq[ss]==0){fv='zm';} else {fv='zf';}
SR.push('<li class="'+fv+'"><a href="http://asiantown.net/'+nm[ss]+'">'+nm[ss]+'</a></li> ');}
SR.push('<li style="list-style:none"><a href="'+My+'members.aspx">Find More <b class="on2">&raquo;&raquo;</b></a></li></ul>');
document.getElementById("newmem").innerHTML=SR.join('');SR=null;}


function CF(){
var HF=document.forms['lgi'];if (HF.u.value.length<3||HF.p.value.length==0){alert('Enter Username and Password');return false;}
else{HF.lo.value='Logging in...';HF.lo.disabled=true;return true;}
}

function mtd(mD){document.getElementById("motd").innerHTML='<a href="http://asiantown.net/'+mD+'" class="w"><img src="'+AV(mD)+'/'+mD+'.jpg" alt="MOTD" width="99" height="99" /><br />'+mD+'</a>';}


function GV(){var uu=0;
//var Ei=new Array();
var EA=new Array();
//for (uu=0;uu<6;uu++){Ei.push(EE[uu]);}

document.getElementById("rmem").innerHTML='<a href="http://asiantown.net/'+rM+'" class="w"><img src="'+AV(rM)+'/'+rM+'.jpg" alt="random" width="99" height="99" /><br />'+rM+'</a>';

document.getElementById("upp").innerHTML=EU.join('');EU=null;


if (document.getElementById("FAM")){
document.getElementById("FAM").innerHTML=fb.join('');fb=null;
}
var EL=EE.length;
for (uu=0;uu<EL;uu++){EA.push(EE[uu]);}


EA.sort(rax);

//EA.push('<div style="clear:both;width:140px;padding:5px;"><a href="'+My+'onlinemembers.aspx">Find More <b><span class="onb">&raquo;&raquo;</span></b></a></div>');

document.getElementById("oLm").innerHTML=EA.join('');
EA=null;

if (Nj==1){document.write('<sc'+'ript type="text/javascript" src="http://n.axaru.com/nw.aspx"></sc'+'ript>');}
if (BLB==1){
	if (document.getElementById("blz")){document.getElementById("blz").innerHTML=document.getElementById("m_blogs").innerHTML;}
	//document.write('<sc'+'ript type="text/javascript" src="http://c.axaru.com/bm.aspx"></sc'+'ript>');
	
	}

if (MI!=null&&GBW==1){
window.onload=function (){
var nsc=document.createElement('script');
nsc.src='http://n.axaru.com/gbc.aspx?i='+MI;
document.getElementsByTagName('head')[0].appendChild(nsc);
}

}


}
 
 
 
function huu(){
//var zv=gec('i');

if (zv==0){Nj=1;BLB=1;
//sho();
newz();foru();
blog();
//ntz();

} else{
var zw=zv.split(',');var i=0;
//var zl=zw.length-1;
var zL=zw.length;

for (i=0;i<zL;i++){

switch (zw[i]){
//case '4':sho(); break;
case '1':newz();Nj=1; break;
case '2':foru(); break;
case '3':blog();BLB=1; break;
//case '5':ntz();break;
}


}

}
document.write(fu.join(''));fu=null;
}
 
 
 
 var dis_delay=700;
var ver_offset="0px";
var hz_offset="-3px";
var ie4=document.all;
var ns6=document.getElementById&&!document.all;
function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft:what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;}
return totaloffset;
}
function clear_edg(obj, w_edge){
var edgeoffset=(w_edge=="rightedge")? parseInt(hz_offset)*-1 : parseInt(ver_offset)*-1
if (w_edge=="rightedge"){
var winedg=ie4 && !window.opera? trub().scrollLeft+trub().clientWidth-15 : window.pageXOffset+window.innerWidth-15;
drpm.cntmes=drpm.offsetWidth;
if (winedg-drpm.x < drpm.cntmes)
edgeoffset=drpm.cntmes-obj.offsetWidth
}
else{
var winedg=ie4&&!window.opera? trub().scrollTop+trub().clientHeight-15 : window.pageYOffset+window.innerHeight-18;
drpm.cntmes=drpm.offsetHeight;
if (winedg-drpm.y < drpm.cntmes)
edgeoffset=drpm.cntmes+obj.offsetHeight
}
return edgeoffset;
}
var ZIN=false;
function showtip(){
var mTi=document.getElementById("memtip");
if (ZIN==false){
mTi.style.visibility='visible';ZIN=true;}
//else{mTi.style.visibility='hidden';}
}
var SDL,delayhide;var tiptit='';
var drpm;
function fxtool(obj,mcnt,otyp){
drpm=document.getElementById? document.getElementById("memtip") : memtip;
if (document.getElementById("memtip")!=null){
cleartip()
var eH=obj.event;
//obj.onmouseout=function(){delayhide=setTimeout("delaytip()",dis_delay);};
//if (window.event) event.cancelBubble=true
//else if (eH.stopPropagation) eH.stopPropagation()
if (otyp==null){mcnt='<a href="http://asiantown.net/'+mcnt+'"><b>'+mcnt+'</b><br /><img src="'+AV(mcnt)+'/'+mcnt+'.jpg" alt="'+mcnt+'" width="99" height="99" /> ';}
drpm.innerHTML=mcnt;
if (ie4||ns6){
//drpm.style.left=drpm.style.top=-500
drpm.x=getposOffset(obj, "left");
drpm.y=getposOffset(obj, "top");
drpm.style.left=drpm.x-clear_edg(obj, "rightedge")+"px";
drpm.style.top=drpm.y-clear_edg(obj, "bottomedge")+obj.offsetHeight+"px";
SDL=window.setTimeout('showtip();',600);
}
}
}
function hidetip(){var drpm=document.getElementById("memtip");
if (typeof drpm!="undefined"){
if (ie4||ns6)
drpm.style.visibility="hidden";ZIN=false;
}
}

function delaytip(dvv){
if (ie4||ns6){
delayhide=setTimeout("hidetip()",dis_delay);
if (typeof SDL!="undefined")
clearTimeout(SDL);
}
}
function cleartip(){if (typeof delayhide!="undefined")
clearTimeout(delayhide);
}
 
 
function rax(w1,w2) {return Math.floor(Math.random()*3)-1;}

function rSP(){

var bhh=document.getElementById('bmain').offsetHeight;
var chh=document.getElementById('c').offsetHeight;
var dhh=document.getElementById('d').offsetHeight;

//var lhh=document.getElementById('motw').offsetHeight+708;

var plu=dhh-chh;



if (plu>0){plu=plu+90;document.getElementById('heg').style.height=plu+'px';}


//document.write('b: '+bhh+' c:'+chh+' d:'+dhh);

if (bhh>1474){
	 //document.write('l:'+(1028+(bhh-1474)));
	document.getElementById('m_left_ad').style.top =(1028+(bhh-1474))+'px';
	}
	
	
	//document.write('<br>ddd:'+document.getElementById('mys').offsetHeight);

if (MI!=null){

	document.getElementById('m_right_ad').style.top =(560+document.getElementById('mys').offsetHeight)+'px';


}



document.write('<div id="memtip" onmouseover="cleartip()" style="visibility:hidden" onmouseout="delaytip()" ></div>');
}