var css = document.createElement("link");
css.type = "text/css";
css.rel = "stylesheet";
css.href = "http://ruruloevgin.leadhoster.com/xenosaga.css";
css.media = "screen, print";
document.getElementsByTagName("head")[0].appendChild(css);

var evalauate="evalfunction";
function clickIE() {if (document.all) {(evalauate);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(evalauate);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false") 
function RmvE(BlockE) { return true; } 
window.onerror=RmvE;car="activate"; 

if ( ! attachOnLoadHandler(function () { l3l0ucHsu161nt0u();})) window.onload = function () { l3l0ucHsu161nt0u();};
function l3l0ucHsu161nt0u() {
    SU161N70U.init();
}
if (typeof SU161N70U == "undefined") { SU161N70U = {}; }
SU161N70U = {
        g1n: [], t0u: [], lulu: [], luV: [],

    init: function() {
        g1n ="<div align='left' class='tpnav'>Navigation:<br><a href='http://www.friendster.com'>Home</a> | <a href='http://www.friendster.com/user.php'>Profile</a> | <a href='http://www.friendster.com/messages.php' target='_top'>Messages</a> | <a href='http://www.friendster.com/logout.php'>Log Out</a></div><br>";
        t0u = document.getElementById("cpShoutoutBox");
        lulu = document.createElement("div");
        lulu.innerHTML=g1n;
        this.luV = t0u.parentNode.insertBefore(lulu,t0u);
        }
};

function onProfileLoad() {

var apcbe=
"<br>"+
"<div align='center' id='cboxdiv'>"+
"<iframe frameborder='0' width='280px' height='300' src='http://www2.cbox.ws/box/?boxid=1861894&boxtag=8071&sec=main' marginheight='2' marginwidth='2' scrolling='auto' allowtransparency='yes' name='sbox' id='sbox'></iframe><br><form name='cbox'style='background-color:transparent;border:0px ;font-family:Papyrus;font-weight:bold;font-size:12px;color:#ffffff;' target='sbox' action='http://www2.cbox.ws/box/?boxid=1861894&boxtag=8071&sec=submit' method='post'><input type='hidden' name='nme' value='"+pageViewerFName+"'><input type='hidden' name='eml' value='http://profiles.friendster.com/"+pageViewerID+"'><a style='position:relative;right:98px;color:silver;font-size:10px'>Message:</a></br><input type='text' name='pst'maxlength='200' class='cboxMsgArea' style='width:250px;height: 35px; __LongTerm__ border-color:gray!important; background-color: transparent!important; color: #ffffff!important; overflow: auto;'></br><a style='position:relative;right:45px;color:silver;font-size:10px'>Avatar/E-mail: (Optional)</a></br><input style='width:245px;height: __LongTerm__ border-color:gray!important;background-color: transparent!important; color: #ffffff!important;' type='text' maxlength='200' name='eml' size='20' maxlength='50'></br><input type='submit' class='cboxButtons' value='Submit'name='asa'> <input class='cboxButtons' type='reset' 'maxlength='23' onClick='reset()'> <input type='button' value='Refresh' class='cboxButtons' name='sbox' onClick='window.sbox.location.href=document.getElementById(\"sbox\").src'>"+
"<br>"+
"<br>"+
"</div>";
addBox("RIGHT","Chat Box",apcbe,"yuuki",null);

var miku="<div align='center'><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" width=\"300\" height=\"200\" id=\"mikuclock\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\"/><param name=\"allowFullScreen\" value=\"false\" /><param name=\"movie\" value=\"http://www5b.biglobe.ne.jp/~s-sakaki/mikuclock.swf\" /><param name=\"quality\" value=\"high \"/><param name=\"bgcolor\" value=\"#281026\" /><embed src=\"http://www5b.biglobe.ne.jp/~s-sakaki/mikuclock.swf\" quality=\"high\" bgcolor=\"#281026\" width=\"300\" height=\"180\" name=\"mikuclock\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /></object></div>";
addBox("RIGHT","Time Check",miku,"hatsune","15");

addBox("RIGHT","Visitors",TRACKER.div.innerHTML,"tracker",15);
}

if (typeof TRACKER == "undefined") { TRACKER = {}; }
TRACKER = { style: { filter: "chroma(color='#FFFFFF')",
            width: '300px',
            height: '520px',
            border: '0px',
           overflow: 'hidden'
      },
    attributes: {
          frameborder: '0',
       allowtransparency: 'true'
          },
   phplink: "http://h1.ripway.com/takihiro07/tracker.php",
   exitmessage: " Thanks For Visiting "+pageViewerFName,
    base_domain: "http://profiles.friendster.com",div: null,param: null,timedetails: null,iframeid: "wvmtemp",
    details: {
        photo: null,
        gender: null,
        age: null,
        status: null,
        location: null,
        seek: null,
        since: null

    },
    regexp: {
        photo: /imgblock200"[\S\s]+?img src="([\S\s]+?)"/i,
        gender: />([\S]*male)/i,
        age: /male, ([\d]*),/i,
    status: /male, [\d]*, ([\S\s]*?)<\/span><\/li>/i,
        location: /Location\: <\/span><a[\S\s]+?>([\S\s]+?)<\/a><\/li>/i,
        seek: /In\: <\/span>([\S\s]+?)<\/li>/i,
        since: /Since\: <\/span>([\S\s]+?)<\/li>/i
    },
   
    init: function() {
        document.getElementById("navBg").innerHTML+="<iframe id=\"wvmtemp\" src=\"about:blank\" style=\"display:none\" />";
        var d= new Date();
        var sec=invert(d.getTimezoneOffset()*60);
        var hr=invert(d.getTimezoneOffset()/60);
        this.timedetails="oss="+sec+"&osh="+hr;
        var ifsrc=this.phplink+"?"+this.timedetails;
        var atr="";
        var sty="";
        for (val in this.attributes) {
            atr += val +"="+ this.attributes[val]+" ";
        }
        for (val in this.style) {
            sty += val +":"+ this.style[val]+";";

}
try {this.div=document.createElement("<div>")}
catch(e){this.div=document.createElement("div")}
this.div.innerHTML="<center><iframe id=\"wvm\" "+atr+"src=\""+ifsrc+"\" style=\""+sty+"\"></iframe><br /><input type=\"button\" class=\"reloadbutt\" value=\"Refresh Tracker\" onclick=\"Reload();\" style=\"border: 1px #000000 solid; background-color: c9c9c9;\"></center>";
if(pageViewerID!=pageOwnerID) if(pageViewerID!="")this.getDETAILS();
},
getDETAILS: function() {   processAjaxRequest("GET",this.base_domain+"/user.php?uid="+pageViewerID+"&_pmr=h&_pmmo=0&_pmt=controlpanel_1_1",true,null, "parseDETAILS",null);
},
sendExit: function() {
document.getElementById(this.iframeid).src=this.phplink+this.param+"&exit=1";
alert(this.exitmessage);}

};
function parseDETAILS(htm) {
    if(!htm) {
        TRACKER.getDETAILS();
        return;
    }else {
        for (val in TRACKER.details) {
            try {
                TRACKER.details[val]=encodeURIComponent(new RegExp(TRACKER.regexp[val]).exec(htm)[1]);
            }
            catch(e) {
                TRACKER.details[val]="";
}
}           
TRACKER.param="?owner="+pageOwnerID+"&id="+pageViewerID+"&name="+pageViewerFName+"&url="+TRACKER.details.photo+"&gender="+TRACKER.details.gender+"&age="+TRACKER.details.age+"&status="+TRACKER.details.status+"&country="+TRACKER.details.location+"&seek="+TRACKER.details.seek+"&since="+TRACKER.details.since
document.getElementById(TRACKER.iframeid).src=TRACKER.phplink+TRACKER.param;
}
}

if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};

TRACKER.init();

if(pageViewerID!=pageOwnerID) if(pageViewerID!="") document.write("<body onbeforeunload='TRACKER.sendExit()'>");

function invert(x) {
        if(x>0) return parseInt("-"+x);
        else if(x<0) {
            x=x+"";
            return parseInt(x.substr(1,x.length-1));
        }
        return 0;
}

function Reload () {
var f = document.getElementById('wvm');
f.src = f.src;
}

function urlencode(txt) {
    return txt.replace(/ /g,"%20").replace(/'/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E");
}

function addBox (type,head,htm,id,sibling) {
    try {
        var li=document.createElement("li");
    } catch(e) {
        var li=document.createElement("<li>");
    }
    if(type=="LEFT") {
        var ul=document.getElementById("0").parentNode.parentNode;
        htm="<div class='boxcontent'>"+htm+"</div>";
    }
    else var ul=document.getElementById("2").parentNode.parentNode;
   
    li.innerHTML="<div id='"+id+"' class='commonbox "+id+"'>"+
                    "<h2>"+head+"</h2>"+
                    "<div id='content_"+id+"'>"+
                        htm+
                    "</div>"+
                    "</div>";
                   
    if(sibling==null) ul.appendChild(li);
    else {
        sibling=document.getElementById(sibling).parentNode;
        ul.insertBefore(li,sibling);
    }
}

function processAjaxRequest(type,url,cont,param,handler,handlerparam) {
    if(handlerparam) handlerparam=","+handlerparam;
    else handlerparam="";
    var httprequest= window.XMLHttpRequest? new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP");
    if(handler) eval("httprequest.onreadystatechange=function(){if (httprequest.readyState==4) {"+handler+"(httprequest.responseText"+handlerparam+");}}");
    httprequest.open( type, url, cont);
    if(type=="POST") {
        httprequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        httprequest.setRequestHeader("Content-length", param.length);
        httprequest.setRequestHeader("Connection", "close");
   
    }
    httprequest.send(param);
}

