

var curPopupWindow  = null;
var helpWindow      = null;
var width           = 10;
var border          = 3;
var TableWidth      = 0;
var offsetY         = 0;
var offsetX         = 0;
var BGCOLOR         = "#ffffff";
var BORDERCOLOR     = "#000066";
var TEXTCOLOR       = "#000066";
var BORDERWIDTH     = 1;

var x,y,snow,sw,cnt;
var dir = 1;
var tr = 1;


    var over = document.getElementById("overDiv");
     

        
function ListIconInfo(text, title) {dtc(text,title);}



function LayerMessage(message,type,left,top,width,duration)
{
    if (document.readyState == "complete")
    {
	    toggleSelects('hidden');
		txt = "<DIV class='inline" + type + "' style='width:" + width + "px;'>" +
               "<TABLE cellpadding=0 cellspacing=0 border=0 width=" + width + ">" +
               "<TR>" +
               "<TD width='1%'><img src='../images/spacer.png' width=25 height=25 border=0 /></TD>" +
               "<TD style='padding:22px;' class='JB12'>" + message + "</TD>" +
               "</TR>" +
               "</TABLE>" +
               "</DIV>";
               
	    layerWrite(txt);
	    disp(left + Math.round(((xMousePosMax - 700) / 2)),top + 150);
	    var myLayerMessageTimer = setTimeout("ROut()",duration);
    }
}



function ROInfo(title, pos, width, bgcolor) {
    if (document.readyState == "complete")
    {
	    TableWidth = width;
	    offsetY = 0;
	    offsetX = 0; 
	    if (pos=='R') 
	    {
	        offsetY = 8;
	        offsetX = -8;
	    }
	    if (pos=='L') 
	    {
	        offsetY = 8;
	        offsetX = (width+35) * -1 ;
	    }
	    BGCOLOR = bgcolor;
	    BORDERCOLOR = "#000000";
	    TEXTCOLOR = "#ffffff";
	    BORDERWIDTH = 2;
	    dtc('',title,TableWidth);
    }
}


function ROHelp(text, pos, width) {
    if (document.readyState == "complete")
    {
	    TableWidth = width;
	    offsetY = 0;
	    offsetX = 0; 
	    if (pos=='R') 
	    {
	        offsetY = 8;
	        offsetX = -8;
	    }
	    if (pos=='L') 
	    {
	        offsetY = 8;
	        offsetX = (width+35) * -1 ;
	    }
	    toggleSelects('hidden');
		txt = "<TABLE WIDTH=" + TableWidth + " BORDER=0 CELLPADDING=0 CELLSPACING=0>";
		txt += "<TR><TD>";
		txt += "<DIV class=ROHelp>" + text + "</DIV>";
		txt += "</TD></TR>";
		txt += "</TABLE>";
	    layerWrite(txt);
	    disp();
    }
}



function ROut() {
	toggleSelects('visible');
	hideObject(over);
}



function dtc(text, title, TableWidth) {
	toggleSelects('hidden');
	if (text.length > 0) {
		txt = "<TABLE WIDTH=" + TableWidth + " BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR=#000066><TR><TD>";
		txt += "<TABLE WIDTH=100% BORDER=0 CELLPADDING=5 CELLSPACING=0 BGCOLOR=#ffffff><TR><TD align=left BGCOLOR=aqua>";
		txt += "<SPAN STYLE=\"FONT: bold 10px Verdana,tahoma,arial,sans-serif; COLOR:#333366;\">"+title+"</span>";
		txt += "</TD></TR>";
		txt += "</TABLE>";
		txt += "<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#000066><TR><TD><IMG SRC=../images/spacer.png WIDTH=1 HEIGHT=1 BORDER=0></TD></TR></TABLE>";
		txt += "<TABLE WIDTH=100% BORDER=0 CELLPADDING=4 CELLSPACING=0 BGCOLOR=#F7F7F7>";
		txt += "<TR><TD>";
		txt += "<FONT face=arial COLOR=#000000 size=1>"+text+"</FONT>";
		txt += "</TD></TR></TABLE>";
		txt += "</TD></TR></TABLE>";

	} else {
	
		if (TableWidth>0) {
			txt = "<TABLE WIDTH=" + TableWidth + " BORDER=0 CELLPADDING=" + BORDERWIDTH + " CELLSPACING=0 BGCOLOR=" + BORDERCOLOR + "><TR><TD>";
		} else {
			txt = "<TABLE BORDER=0 CELLPADDING=" + BORDERWIDTH + " CELLSPACING=0 BGCOLOR=" + BORDERCOLOR + "><TR><TD>";
		}
		txt += "<TABLE WIDTH=100% BORDER=0 CELLPADDING=4 CELLSPACING=0 BGCOLOR=" + BGCOLOR + "><TR><TD align=center>";
		txt += "<SPAN STYLE=\"FONT: bold 10px Verdana,tahoma,arial,sans-serif; COLOR:" + TEXTCOLOR + ";\">"+title+"</SPAN></B>";
		txt += "</TD></TR>";
		txt += "</TABLE>";
		txt += "</TD></TR></TABLE>";
	}


	layerWrite(txt);
	disp();
}



function disp(x,y) 
{
    var thisX = parseFloat(document.umouse.x.value) + offsetX;
    var thisY = parseFloat(document.umouse.y.value) + offsetY;
    if (x != undefined)
    {
        thisX = x;
    }
    if (y != undefined)
    {
        thisY = y;
    }
    //alert(thisX);
    //alert(thisY);
    ODmoveTo(over,thisX,thisY);
    hideObject(over);
    showObject(over);
}



function layerWrite(txt) 
{
document.getElementById("overDiv").innerHTML = txt;

}



function showObject(obj) 
{
obj.style.visibility = "visible";

}



function hideObject(obj) 
{
obj.style.visibility = "hidden";

}



function ODmoveTo(obj,xL,yL) 
{

		  obj.style.left = parseFloat(xL)+'px';
		  obj.style.top = parseFloat(yL)+'px';

} 


function toggleSelects(disposition) {
	var mySelects = document.getElementsByTagName("select");
	for (s=0;s<mySelects.length;s++) {
		if (mySelects[s].id == "hideme") {
			mySelects[s].style.visibility = disposition;
		}
	}
}

