// global show/hide
// used in the following areas:
// locale drop down in top navigation

function ShowHide(elementId)
{
	var element = document.getElementById(elementId);
	if(element.style.display != "block")
	{
		element.style.display = "block";
	}
	else
	{
		element.style.display = "none";
	}
}

var cX = 0; var cY = 0; var rX = 0; var rY = 0;
function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}
if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
else { document.onmousemove = UpdateCursorPosition; }
function AssignPosition(d) {
if(self.pageYOffset) {
	rX = self.pageXOffset;
	rY = self.pageYOffset;
	}
else if(document.documentElement && document.documentElement.scrollTop) {
	rX = document.documentElement.scrollLeft;
	rY = document.documentElement.scrollTop;
	}
else if(document.body) {
	rX = document.body.scrollLeft;
	rY = document.body.scrollTop;
	}
if(document.all) {
	cX += rX; 
	cY += rY;
	}
d.style.left = (cX-233) + "px";
d.style.top = (cY-50) + "px";
}
function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
dd.style.display = "block";
}
function ReverseContentDisplay(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
AssignPosition(dd);
if(dd.style.display == "none") { dd.style.display = "block"; }
else { dd.style.display = "none"; }
}

// full TAID type popup
// if this popup is reused be sure to add your ID at the bottom of the 


	/* -----------------------------------------------
   Floating layer - v.1
   (c) 2006 www.haan.net
   contact: jeroen@haan.net
   You may use this script but please leave the credits on top intact.
   Please inform us of any improvements made.
   When usefull we will add your credits.
  ------------------------------------------------ */

x = 300;
y = 300;
function setVisible(obj)
{
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}

function placeIt(obj){
    obj = document.getElementById(obj);
    if (document.documentElement) {
    	theLeft = document.documentElement.scrollLeft;
    	theTop = document.documentElement.scrollTop;
    } else if (document.body) {
    	theLeft = document.body.scrollLeft;
    	theTop = document.body.scrollTop;
    }
    theLeft += x;
    theTop += y;
    if(obj){
    	obj.style.left = theLeft + 'px' ;
    	obj.style.top = theTop + 'px' ;
    }
    setTimeout("placeIt('fullTAIDlistTip')",500);
}

window.onscroll = function(){setTimeout("placeIt('fullTAIDlistTip')",500)};

function llcEnable(isEnable) {
    document.w9tax.llcType.disabled = !isEnable;
}

