

//  Initialize --------------------------------------------------------------------------------------------------------------------------------------------------------------

var Browsers = navigator.userAgent.toLowerCase();
NS  = ( (Browsers.indexOf('mozilla')!=-1) && ( (Browsers.indexOf('spoofer')==-1) && (Browsers.indexOf('compatible') == -1) ) );
NS6 = (document.getElementById&&!document.all);
IE = ( (Browsers.indexOf("msie") != -1) && (Browsers.indexOf("opera") == -1) );
OP = (Browsers.indexOf("opera") != -1);
stdBrowser=(document.getElementById) ? true : false;
NS6 = (document.getElementById&&!document.all);
IE = (document.all);
stdBrowser=(document.getElementById) ? true : false;

function pInitFloat(){
	imgGroup=new Array();
	imgGroup[0] = new Array("topkey","homekey","forwardkey","backkey");
	imgGroup[1] = new Array("#top","index.html","javascript:history.forward()","javascript:history.back()");
	imgGroup[2] =new Array("Top","Home","Forward","Back");
	LeftFloat	= 3;
}
function eInitFloat(){
	imgGroup=new Array();
	imgGroup[0] = new Array("topkey","homekey","forwardkey","backkey");
	imgGroup[1] = new Array("#top","index.html","javascript:history.forward()","javascript:history.back()");
	imgGroup[2] =new Array("Top","Home","Forward","Back");
	LeftFloat	= 765;	
}
switch(classPage){
	case "Arabic" :
	case "Persian" :
		pInitFloat();
		break;
	case "English" :
		eInitFloat();
		break;
}
var VsbArray= new Array("show","hide");
var Lasty=Nexty=0;
var moving = LateMoveto =setTimeout("null",1);


// End  Initialize --------------------------------------------------------------------------------------------------------------------------------------------------------------


//  Rollover ----------------------------------------------------------------------------------------------------------------------------------------------------------------


function Over() {document.plus.src = "../images/minus.gif";}
function Out() {document.plus.src = "../images/plus.gif";}


//  End Rollover ---------------------------------------------------------------------------------------------------------------------------------------------------------


// Moving -----------------------------------------------------------------------------------------------------------------------------------------------------------------


function slideMenu(Number){
	if (IE) {prosldMenu.pixelTop += Number;}
	else if (NS6||OP) {prosldMenu.top = parseInt(prosldMenu.top)+Number+"px";}
}

function Ejaculation(){
	prosldMenu = (stdBrowser) ? document.getElementById("thbfKey").style : document.all.thbfKey.style;
	if ( (NS6 && parseInt(prosldMenu.top) < 0) || (IE && prosldMenu.pixelTop < 0)  || (OP && parseInt(prosldMenu.top) < 0) ){
		slideMenu(8);
		clearTimeout(moving);
		moving=setTimeout("Ejaculation()",20);
	}

}

function Recursion(){
	prosldMenu = (stdBrowser) ? document.getElementById("thbfKey").style : document.all.thbfKey.style;
	if ( (NS6 && parseInt(prosldMenu.top) > -64) || (IE && prosldMenu.pixelTop > -64) || (OP && parseInt(prosldMenu.top) > -64) ){
		slideMenu(-8);
		clearTimeout(moving);
		moving=setTimeout("Recursion()",20);
	}
}

function ManagerMove(){
	var Base = (stdBrowser) ? document.getElementById("thbfKey").style.top : document.all.thbfKey.style.pixelTop;
	if( (NS6 && parseInt(prosldMenu.top) < 0) || (IE && prosldMenu.pixelTop < 0)  || (OP && parseInt(prosldMenu.top) < 0) ){
		Over();
		Ejaculation();
	}
	else if( (NS6 && parseInt(prosldMenu.top) > -64) || (IE && prosldMenu.pixelTop > -64)  || (OP && parseInt(prosldMenu.top) > -64) ){
		Recursion();
		Out();

	}
}

function ClearLatemove(){
	clearTimeout(LateMoveto);
	LateMoveto = setTimeout("null",1);
}

function LateMove(){
	clearTimeout(LateMoveto);
	LateMoveto = setTimeout('Recursion();Out();',1200);
}


// End  Moving ---------------------------------------------------------------------------------------------------------------------------------------------------------


function Buildfloat(){
	document.writeln("<div id=\"Floating\" align=\"left\" style=\"position:absolute ; visibility:visible ; top:140px ; left:"+LeftFloat+"px ; width:14px ; height:92px ; z-index:6\" onmouseover=\"ClearLatemove()\" onmouseout=\"LateMove()\">");
	document.writeln("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"14px\" height=\"92px\">");
	document.writeln("<tr height=\"16px\">");
	document.write("<td align=\"center\" valign=\"middle\" width=\"14px\" height=\"16px\">");
	document.write("<a target=\"_self\" href=\"ParsehComputer.com\" onmouseover=\"Over() ; Ejaculation()\" onmouseout=\"LateMove()\" onClick=\"ManagerMove() ; return false\">");
	document.write("<img border=\"0\" name=\"plus\" src=\"../images/plus.gif\" width=\"14px\" height=\"16px\"><\/a><\/td><\/tr>");
	document.writeln("<tr height=\"64px\">");
	document.writeln("<td align=\"center\" valign=\"middle\" width=\"14px\" height=\"64px\">");
	document.writeln("<div id=\"bg\" style=\"position:absolute;top:17px;left:0px;width:14px;height:64px;clip:rect(0px 14px 64px 0px);overflow:hidden;z-index:8\"><div id=\"thbfKey\" style=\"position:absolute;top:-64px;left:0px;width:14px ;height:64px;z-index:10\">");
	document.writeln("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"14px\" height=\"64px\">");
	for(i=0;i<imgGroup[0].length;i++){
		document.writeln("<tr height=\"16px\">");
		document.write("<td width=\"14px\" height=\"16px\"><a target=\"_self\" href='"+imgGroup[1][i]+"'>");
		document.writeln("<img border=\"0\" src=\"../images/"+imgGroup[0][i]+".gif\" width=\"14px\" height=\"16px\" title='"+imgGroup[2][i]+"'><\/a><\/td><\/tr>");
	}
	document.write("<\/table><\/div><\/div><\/td><\/tr><\/table><\/div>");
}

function Mover(){
	MoverObj = (stdBrowser) ? document.getElementById("Floating").style : document.all.Floating.style ;
	if(stdBrowser || IE) {Nexty = document.body.scrollTop;}
	else if(NS6) {Nexty = window.pageYOffset;}
	if(Nexty!=Lasty){
		percent = 0.1 * (Nexty-Lasty);
		if(percent > 0) {percent = Math.ceil(percent);}
		else {percent = Math.floor(percent);}
		if(IE||OP) {MoverObj.pixelTop += percent;}
		else if(NS6) {MoverObj.top = parseInt(MoverObj.top) + percent + "px";}
		Lasty = Lasty + percent;
	}
	setTimeout("Mover()",1);
}



