﻿

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

function InitFloat(){
	imgGroup=new Array();
		imgGroup[0] = new Array("fltopkey","flhomekey","flforwardkey","flbackkey");
		imgGroup[1] = new Array((IE) ? "#top" : "#keywords","index.aspx","javascript:history.forward()","javascript:history.back()");
		imgGroup[2] =new Array("Top","Home","Forward","Back");
	LeftFloat =3;
	TopFloat = 200;
	Lasty=Nexty=0;
	moving_F = LateMoveto_F =setTimeout("null",1);
}

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


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


function Over() {document.flplus.src = ""+Path+"images/flminus.gif";}
function Out() {document.flplus.src = ""+Path+"images/flplus.gif";}


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


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


function Slide_Menu(num){
	if (IE) {Object_Layer.pixelTop += num;}
	else if (NS_std||OP) {Object_Layer.top = parseInt(Object_Layer.top) + num + "px";}
}

function Move_Out(){
	Object_Layer = (stdBrowser) ? document.getElementById("thbfKey").style : document.all.thbfKey.style;
	if ( (NS_std && parseInt(Object_Layer.top) < 0) || (IE && Object_Layer.pixelTop < 0)  || (OP && parseInt(Object_Layer.top) < 0) ){
		Slide_Menu(8);
		clearTimeout(moving_F);
		moving_F=setTimeout("Move_Out()",10);
	}
}

function Move_To(){
	Object_Layer = (stdBrowser) ? document.getElementById("thbfKey").style : document.all.thbfKey.style;
	if ( (NS_std && parseInt(Object_Layer.top) > -64) || (IE && Object_Layer.pixelTop > -64) || (OP && parseInt(Object_Layer.top) > -64) ){
		Slide_Menu(-8);
		clearTimeout(moving_F);
		moving_F=setTimeout("Move_To()",20);
	}
}

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

function ClearLateMove(){
	clearTimeout(LateMoveto_F);
	LateMoveto_F = setInterval("null",1);
}

function Late_Move(){
	clearTimeout(LateMoveto_F);
	LateMoveto_F = setInterval('Move_To();Out();',1200);
}


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


function Buildfloat(){
	InitFloat();
	document.writeln("<div id=\"Floating\" style=\"position:absolute;visibility:visible;top:"+TopFloat+"px;left:"+LeftFloat+"px;width:14px;height:92px;z-index:6;\" onmouseover=\"ClearLateMove();\" onmouseout=\"Late_Move();\">");
	document.write("<div style=\"position:static;width:14px;\"><a href=\"http://www.ParsehComputer.com\" onmouseover=\"Over();Move_Out();\" onmouseout=\"Late_Move();\" onclick=\"ManagerMove();return false;\">");
	document.writeln("<img alt=\"\" border=\"0\" name=\"flplus\" src=\""+Path+"images/flplus.gif\" width=\"14px\" height=\"16px\" \/><\/a><\/div>");
	document.writeln("<div id=\"bg\" style=\"position:absolute;top:16px;left:0px;width:14px;height:64px;clip:rect(0px 14px 64px 0px);overflow:hidden;z-index:8;\">");
	document.writeln("<div id=\"thbfKey\" style=\"position:absolute;top:-64px;left:0px;width:14px ;height:64px;z-index:10;\">");
	for(i=0;i<imgGroup[0].length;i++){
		document.writeln("<div style=\"width:14px;height:16px;\"><a href='"+imgGroup[1][i]+"'><img alt=\"\" border=\"0\" src=\""+Path+"images/"+imgGroup[0][i]+".gif\" width=\"14\" height=\"16\" title='"+imgGroup[2][i]+"' \/><\/a><\/div>");
	}
	document.writeln("<\/div><\/div><\/div>");
}

function Mover(){
	var MoverObj= (stdBrowser) ? document.getElementById('Floating') : (IE) ? document.all['Floating'] : document.layers['Floating'];
	var Nexty = (NS) ? pageYOffset : (document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;
	var px = document.layers ? "" : "px";

	if(Nexty!=Lasty){
		percent = 0.1 * (Nexty-Lasty);
		if(percent > 0) {percent = Math.ceil(percent);}
		else {percent = Math.floor(percent);}
		MoverObj.style.top = parseInt(MoverObj.style.top) + percent + px;		
		Lasty = Lasty + percent;
	}
	setTimeout("Mover()",30);
}


