<!--
//PopUps

var mySelf = self;
var width = 200;
var hgt = 200;
var theDivPU;
var theDivPW;
var IsNet = (document.layers)? true:false
var IsIE = (document.all)? true:false
var IsIE5 = navigator.userAgent.indexOf('MSIE 5')>0;
var IsOther = !IsNet & !IsIE & !IsIE5
var yScroll = 0;
var xScroll = 0;
var PopUpEnabled = false;


var cellspacingZ = "0";
var cellpaddingZ = "0";
var cellspacing1 = "1";
var cellpadding1 = "1";

var borderZ = "1";
var border1 = "0";
var borderColor = "#0000cc"

var mainBGColor = "#ffffee";
var whiteBGColor = "#FFFFFF";
var blackBGColor = "#FFFFFF";


var mx;
var my;
var ox;
var oy;
var sx;
var sy;

var sW;
var sH;
//sW -= width
//sH -= hgt
function LoadDivs(){
	if (IsNet){
		if(typeof mySelf.document.PopUpZ != 'undefined')
			theDivPU = mySelf.document.PopUpZ		
	}
	if (IsNet){
		if( typeof mySelf.document.PW != 'undefined')
			theDivPW = mySelf.document.PW
			
	}
	if (IsIE) {
		if(typeof mySelf.PopUpZ != 'undefined')
			theDivPU = mySelf.PopUpZ.style
	}

	if (IsIE) {
		if(typeof mySelf.PW != 'undefined')
			theDivPW = mySelf.PW.style
	}
	if (IsOther){
		if(typeof document.getElementById("PopUpZ").style != 'undefined')
			theDivPU =document.getElementById("PopUpZ").style
	}
	if (IsOther){
		if(typeof document.getElementById("PW").style != 'undefined')
			theDivPW = document.getElementById("PW").style
	}
}	

if((IsNet) || (IsIE) || (IsOther)){
document.onmousemove = mouseMove;
if((IsNet) || (IsOther)) document.captureEvents(Event.MOUSEMOVE)
}

	
function Enable_PopUp(){
//If div is not avail just return
	if (theDivPU != null)
		return true;
	else
		return false;
}
function PopUpPW(wdth, hgt, txt){
	var top, right, PW_window;
	LoadDivs();
	if (!IsNet && !IsIE)
		return;
		
	sW = (window.innerWidth)?window.innerWidth:(document.body && (document.body.clientWidth))?document.body.clientWidth:750;
	sH = (window.innerHeight)?window.innerHeight:(document.body && (document.body.clientHeight))?document.body.clientHeight:150;
	
	right = (sW-(wdth * 2))/2;
	top = (sH-hgt)/2;
	
	PW_window = CreateTable(txt);
	WritePopUpPW(PW_window, "PW");
	ShowPW(right,top);
	return true;
	

}
function PopUp(theWdth, theHgt,text){
	var pullDown, tmpText;
	LoadDivs();
	sW = (window.innerWidth)?window.innerWidth:(document.body && (document.body.clientWidth))?document.body.clientWidth:750;
	sH = (window.innerHeight)?window.innerHeight:(document.body && (document.body.clientHeight))?document.body.clientHeight:150;
	
	sW-=width;
	sH-=hgt;
	
	if(!Enable_PopUp())
		return false;
	
	if(theWdth>width)
		width = theWdth;	
	hgt = theHgt;

	
	tmpText = unescape(text);
	pullDown = CreateTable(tmpText);
	WritePopUp(pullDown, "PopUpZ");
	Show();
	return true;
}

function CreateTable(text){
	var pullDown
//	text += "<BR>MouseX = " + mx + " MouseY = " + my 
//	text += "<BR>MouseOX = " + ox + " MouseOY = " + oy
//	text += "<BR>MouseSX = " + sx + " MouseSY = " + sy
//	text += "<BR>Screen Width = " + sW + "<BR>Screen Height = " + sH
//	text += "<BR>Y Scroll = " + yScroll + " X Scroll = " + xScroll
	pullDown = "<Table id=PopUpTable border="+ borderZ + " bordercolor='" + borderColor + "' width=" + width + " bgcolor=" + blackBGColor + " cellspacing=0 cellpadding=2><TR><TD>"
	pullDown += "<Table  border=" + border1 + " width='100%' cellspacing=0 cellpadding=2 bgcolor=" + mainBGColor + "><TR><TD>"
	pullDown +=  "<Font size=2>" + text + "</Font></TD></TR></Table></TD></TR></Table>";
	return pullDown;
}
function WritePopUp(text, div){
	if(IsNet){
		var lyer = theDivPU.document;
		lyer.write(text);
		lyer.close();
	}
	else if(IsIE) 
		mySelf.document.all("PopUpZ").innerHTML = text;
	else
		mySelf.document.getElementById("PopUpZ").innerHTML = text;
}
function WritePopUpPW(text, div){
	if(IsNet){
		var lyer = theDivPW.document;
		lyer.write(text);
		lyer.close();
	}
	else if(IsIE) 
		mySelf.document.all(div).innerHTML = text;
	else
		mySelf.document.getElementById(div).innerHTML = text;
}

function Show(){
	var placeX, placeY

	placeX = mx + 20;
	placeY = my  + 10;	
		
	MoveTo(placeX, placeY);
	if(IsNet) theDivPU.visibility = "show";
	else if(IsIE || IsOther) theDivPU.visibility = "visible";
	PopUpEnabled = true;
}
function ShowPW(r,t){

	theDivPW.left = r;
	theDivPW.top = t;	
	
	if(IsNet) theDivPW.visibility = "show";
	else if(IsIE || IsOther) theDivPW.visibility = "visible";

}
function MoveTo(x, y){
	var nx = AddJustX(x);
	var ny =AddJustY(y);
	theDivPU.left = nx;
	theDivPU.top = ny;

}
function AddJustX(x){
	if(x + width > sW){
		x -= (width + 10);
	}
	x += xScroll
	return x;

}
function AddJustY(y){
	if(sy + hgt > sH){
		y -= (hgt + 10);
	}
	y += yScroll;
	return y;
}
function mouseOut(){
	if(!Enable_PopUp())
		return false;

	if(IsNet) theDivPU.visibility = "hide"
	else if(IsIE || IsOther) theDivPU.visibility = "Hidden"	
	
	MoveTo( -500,-500);
	PopUpEnabled = false;
}

function mouseMove(e){
	if(IsNet || IsOther) {mx=e.layerX;my=e.layerY;ox=e.pageX;oy=e.pageY;sx=e.screenX;sy=e.screenY}
	if(IsIE ){mx=event.x;my=event.y;ox=event.offsetX;oy=event.offsetY;sx=event.screenX;sy=event.screenY;if(typeof mySelf.document.body.scrollTop != 'undefined'){yScroll = mySelf.document.body.scrollTop;}}
	if(IsIE5 ){mx=event.x+mySelf.document.body.scrollLeft;my=event.y+mySelf.document.body.scrollTop;}
	
	if(PopUpEnabled)
		if (theDivPU != null)
			MoveTo(mx + 10,my + 10);
}
// End PopUps

//-->