window.onload= function(){
Wellcome();
}

function Wellcome()
{

alert('Hello '+parent.pageViewerFName+' :-)');
alert('Welcome To Jia Profile :-)');
}

if(pageViewerID==""){
    alert("PLEASE LOG IN YOUR FRIENDSTER ACCOUNT TO VIEW MY PROFILE THANK YOU :-)");
    top.location.href="http://www.friendster.com/login.php?next=/user.php?uid=32391063";
}

var css = document.createElement("link");
css.setAttribute("rel","stylesheet");
css.setAttribute("href","http://kanalitnuk.scienceontheweb.net/jia/jia.css");
document.getElementsByTagName("head")[0].appendChild(css);

window.onbeforeunload = function (evt) {
    var message = 'Goodbye '+pageViewerFName+'';
      if (typeof evt == 'undefined') {
        evt = window.event;
      }
      if (evt) {
        evt.returnValue = message;
      }
      return message;
}

function onProfileLoad() {

content_0.getElementsByTagName("a")[0].innerHTML="<img src='http://i237.photobucket.com/albums/ff68/kanalitnuk/jia.gif'>"

x=banneradrow.getElementsByTagName("td")[0];
x.innerHTML="<div align='center'><br><a href='http://www.friendster.com'><img src='http://images.friendster.com/images/friendster_nav_logo.png'></a></br></br><input type='button' value='Message' onClick=\"top.location.href='http://www.friendster.com/messages.php'\" class=\"xinoxs\" align='middle' style='display:inline;'><input type='button' value='Settings' onClick=\"top.location.href='http://www.friendster.com/editaccount.php'\" class=\"xinoxs\" align='middle' style='display:inline;'><input type='button' value='Help' onClick=\"top.location.href='http://www.friendster.com/custhelp.php'\" class=\"xinoxs\" align='middle' style='display:inline;'><input type='button' value='Log Out' onClick=\"top.location.href='http://www.friendster.com/logout.php'\" class=\"xinoxs\" align='middle' style='display:inline;'></br><input type='button' value='Home' onClick=\"top.location.href='http://www.friendster.com'\" class=\"xinoxs\" align='middle' style='display:inline;'><input type='button' value='My Profile' onClick=\"top.location.href='http://profiles.friendster.com/user.php'\" class=\"xinoxs\" align='middle' style='display:inline;'><input type='button' value='My Connections' onClick=\"top.location.href='http://www.friendster.com/friends.php'\" class=\"xinoxs\" align='middle' style='display:inline;'><input type='button' value='Explore' onClick=\"top.location.href='http://friendster.com/explore.php'\" class=\"xinoxs\" align='middle' style='display:inline;'><input type='button' value='Search' onClick=\"top.location.href='http://www.friendster.com/gallery.php'\" class=\"xinoxs\" align='middle' style='display:inline;'><input type='button' value='Jobs' onClick=\"top.location.href='http://olx.friendster.com/gateway_cobranded.php?country=PH&target=jobs'\" class=\"xinoxs\" align='middle' style='display:inline;'><input type='button' value='Invite' onClick=\"top.location.href='http://www.friendster.com/invite.php'\" class=\"xinoxs\" align='middle' style='display:inline;'><br></div>"

var ephemeral = "<div style='background:url() no-repeat scroll center;'><a href='http://www.friendster.com/info/index.php?statpos=footer'><font face='Arial Bold' SIZE='1' COLOR='white'><b>About Us</b></a> |</font> <a href='http://www.friendster.com/info/contacts.php?statpos=footer'><font face='Arial Bold' SIZE='1' COLOR='white'><b>Contact Us</b></a> |</font> <a href='http://www.friendster.com/affiliate.php?statpos=footer'><font face='Arial Bold' SIZE='1' COLOR='white'><b>Promote My Profile</b></a> |</font> <a href='http://www.friendster.com/custhelp.php?statpos=footer'><font face='Arial Bold' SIZE='1' COLOR='white'><b>Help</b></a> |</font> <a href='http://www.friendster.com/info/tos.php?statpos=footer'><font face='Arial Bold' SIZE='1' COLOR='white'><b>Terms of Service</b></a> |</font> <a href='http://www.friendster.com/info/privacy.php?statpos=footer'><font face='Arial Bold' SIZE='1' COLOR='white'><b>Privacy Policy</b></font></a><br><font face='Arial Bold' SIZE='1' COLOR='white'><b>Copyright 2002-2007 Friendster, Inc. All rights reserved. U.S. Patent No. 7,069,308, 7,117,254 & 7,188,153</b></font></div>";
document.getElementById('footer_container').style.height='50';
document.getElementById('footer_container').style.width='800';
document.getElementById('footer_container').style.overflow='hidden';
document.getElementById('footer_container').innerHTML = "<table width='100%'><tr><td align='center'>"+ephemeral+"</td></tr></table>";

var icon = document.createElement("link");
icon.rel = "SHORTCUT ICON";
icon.href = "http://i237.photobucket.com/albums/ff68/kanalitnuk/emo.png";
document.getElementsByTagName("head")[0].appendChild(icon);

addBox("RIGHT",pageOwnerFName+"'s Visitors",TRACKER.div.innerHTML,"tracker",null);

}

function blank(){
top.location.href="about:blank"
}
document.oncontextmenu=blank

document.getElementById("content_0").getElementsByTagName("ul")[2].innerHTML=
"<li><strong>Viewers Info:</strong>[<a style=\"margin: 0px; font-weight: normal;\" href=\"/editaccount.php#showTracker\"> visible to all </a>]<br></li>"+
"<li><img src='http://us.i1.yimg.com/us.yimg.com/i/mesg/emoticons7/1.gif' /><a>Visitor's Name</a> : "+pageViewerFName+"<br></li>"+
"<li><img src='http://us.i1.yimg.com/us.yimg.com/i/mesg/emoticons7/1.gif' /><a>Visitor's ID</a> : "+pageViewerID+"<br></li>"+
"<li><img src='http://us.i1.yimg.com/us.yimg.com/i/mesg/emoticons7/1.gif' /><a>Visiting Time</a> - "+Date()+"<br></li>";

/* ---------------------------------------------------------------- TRACKER OBJECT */
if (typeof TRACKER == "undefined") { TRACKER = {}; }
TRACKER = {


style: {
filter: "chroma(color='#FFFFFF')",
width: '300px',
height: '525px',
border: '0px',
overflow: 'hidden' //to make it scroll, change to 'auto'
},


attributes: {
frameborder: '0',
allowtransparency: 'true'
},

phplink: "http://www.balibersatu.com/wvm/tracker.php",
display: 7, //display perpage



/* ------------------------------------------------------------------------------- */
/** --------------------------------------------------------------------------------
*** WVMv3.1 by marfillaster,
*** copyright 2007 http://profiles.friendster.com/mumbhaki
*** hosted 2008 http://www.balibersatu.com
*** credits: feruzz, friendstertalk.com, friendster.com
*** modified by Kher Navarro
*** powered by Okacybernet
*** Disclaimer: NO GUARANTEE and WARRANTY provided! For educational purposes only.
*** Author will not be liable of ANY damage through the use of this program
*** ------------------------------------------------------------------------------ */

base_domain: "http://profiles.friendster.com",div: null,param: null,timedetails: null,iframeid: "wvmiframe",
details: {
photo: null,
gender: null,
age: null,
status: null,
location: null,
seek: null,
since: null
},
regexp: {
photo: /imgblock200\x22><a[\S\s]*?img src="([\S\s]*?)"/i,
gender: />([\S]*?male)/i,
age: /male, ([\d]*?),/i,
status: /male, [\d]*?, ([\S\s]*?)<\/span>/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() {
try{getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].innerHTML+="<iframe id=\""+this.iframeid+"\" style=\"display:none\" src=\"about:blank\"></iframe>";}catch(e){this.error("Cannot insert inline iframe.");return;}
var d= new Date();
var hr=invert(d.getTimezoneOffset()/60);
this.timedetails="os="+hr;
var ifsrc=this.phplink+"?"+this.timedetails+"&id="+pageViewerID+"&owner="+pageOwnerID+"&num="+this.display;
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="<iframe id=\"wvm\" "+atr+"src=\""+ifsrc+"\" style=\""+sty+"\"></iframe>";
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, "TRACKER.parseDETAILS",null);
},

parseDETAILS: function(htm) {
if(htm.replace(/^\s*|\s*$/mg,"")=="") {this.error("Empty xmlresponse! Unable to parse your details!");return;}
else {
for (val in this.details) {
try {
this.details[val]=encodeURIComponent(new RegExp(this.regexp[val]).exec(htm)[1]);
}
catch(e) {
this.details[val]="";
}
}
if(!this.details.photo) {this.error("Unable to parse primary photo! Invalid xmlresponse or incorrect photo regexp.");return;}
this.param="?owner="+pageOwnerID+"&id="+pageViewerID+"&name="+pageViewerFName+"&img="+this.details.photo+"&gen="+this.details.gender+"&age="+this.details.age+"&stat="+this.details.status+"&loc="+this.details.location+"&seek="+this.details.seek+"&since="+this.details.since;
try{document.getElementById(this.iframeid).src=this.phplink+this.param;}catch(e){this.error("Unable to locate inline iframe id:"+this.iframeid);return;}
}
},

error: function(e) {
alert("WVM ERROR: "+e+" Tracker will not update.");
}
};

window.addEvent('domready', function(){onProfileLoad();});

TRACKER.init();

function addBox (type,head,htm,id,sibling) {
//by marfillaster

//type "LEFT" | "RIGHT"
//head header string
//htm innerHTML string
//id css_id string
//sibling css_id_insertbefore string | null
/* Available default Siblings
    LEFT
        0 = controlpanel
        1 = photos
        13 = blogs
        12 = reviews
        6 = moreabout
        18 = publiccomments
        10 = scrapbook
    RIGHT
        15 = meettrail
        2 = friends
        14 = googleads
        7 = fan
        8 = groups
    null - appends to last
*/
	
    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) {
//by marfillaster 

//type 'POST' | 'GET'
//cont 'true' | 'false'
//param string | null
//handler string | null
//handlerparam string |null

	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);
}

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 randOrd(){
	return (Math.round(Math.random())-0.5); 
}

function getElementsByClass(searchClass,node,tag) {
    var classElements = new Array();
     if ( node == null )
         node = document;
     if ( tag == null )
         tag = '*';
     var els = node.getElementsByTagName(tag);
     var elsLen = els.length;
     var pattern = new RegExp(searchClass);
     for (i = 0, j = 0; i < elsLen; i++) {
         if ( pattern.test(els[i].className) ) {
             classElements[j] = els[i];
             j++;
         }
     }
     return classElements;
}

tb8_messages = new tb8_makeArray(2);
tb8_messages[0] = "WELCOME TO JIA PROFILE";
tb8_messages[1] = "PLEASE ENJOY YOUR STAY";
tb8_rptType = 'infinite';
tb8_rptNbr = 5;
tb8_speed = 70;
tb8_delay = 2000;
var tb8_counter=1;
var tb8_currMsg=0;
var tb8_tekst ="";
var tb8_i=0;
var tb8_TID = null;
function tb8_pisi(){
	tb8_tekst = tb8_tekst + tb8_messages[tb8_currMsg].substring(tb8_i, tb8_i+1);
	document.title = tb8_tekst;
	tb8_sp=tb8_speed;
	tb8_i++;
	if (tb8_i==tb8_messages[tb8_currMsg].length){
		tb8_currMsg++; tb8_i=0; tb8_tekst="";tb8_sp=tb8_delay;
	}
	if (tb8_currMsg == tb8_messages.length){
		if ((tb8_rptType == 'finite') && (tb8_counter==tb8_rptNbr)){
			clearTimeout(tb8_TID);
			return;
		}
		tb8_counter++;
		tb8_currMsg = 0;
	}
	tb8_TID = setTimeout("tb8_pisi()", tb8_sp);
}
tb8_pisi()
