var undefined;

// <<<< GA Injection
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

// for Mozilla browsers
if (document.addEventListener) 
{
  document.addEventListener("DOMContentLoaded", init, false);
}

// for Internet Explorer (using conditional comments)
/*@cc_on @*/
/*@if (@_win32)
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
var script = document.getElementById("__ie_onload");
script.onreadystatechange = function() {
	if (this.readyState == "complete") {
		init(); // call the onload handler
	}
};
/*@else@*/
window.onload = init;
/*@end @*/

if (/WebKit/i.test(navigator.userAgent)) 
{
    // sniff
    var _timer = setInterval(function() 
    {    
        if (/loaded|complete/.test(document.readyState))
        {      
            clearInterval(_timer);      
            init(); // call the onload handler    
        }
     }, 10);
}
function init()
{
    // quit if this function has already been called
    if (arguments.callee.done) return;  // flag this function so we don't do the same thing twice  
        arguments.callee.done = true;  

    var pageTracker = _gat._getTracker("UA-4043270-1");
    pageTracker._initData();
    pageTracker._trackPageview();
}

// clientMenu.js
var x = 0;
var y = 0;
var bReCalcCoords = true;

function window_onresize()
{
	bReCalcCoords = true;
}
window.onresize = window_onresize;
		
function ShowMenu()
{
	var pseudoThis = GetContainerElement(event.srcElement.parentNode);
	if(pseudoThis == null)
		return;
	var subMenuContainer = pseudoThis.lastChild;
	var mStyle = subMenuContainer.style;
	

	if(bReCalcCoords == true || mStyle.bReCalcCoords == true || mStyle.bReCalcCoords == undefined)
	{
		bReCalcCoords = false;
		mStyle.bReCalcCoords = false;
		var curElem = pseudoThis;
		x = curElem.offsetLeft;//curElem.offsetWidth;
		y = curElem.offsetHeight;//curElem.offsetTop;
										
		var preOffSetParent = "";
		var curOffSetParent = curElem.offsetParent.nodeName;
										
		while(curOffSetParent != "BODY")
		{
			preOffSetParent = curOffSetParent;
			curElem = curElem.parentElement;
			curOffSetParent = curElem.offsetParent.nodeName;
											
			if(curOffSetParent != preOffSetParent)
			{
				x += curElem.offsetLeft;
				y += curElem.offsetTop;
			}
		}
	
		mStyle.left = x + "px";
		mStyle.top = y + "px";
	}
	mStyle.display = "inline";
}
		
function HideMenu()
{
	var pseudoThis = GetContainerElement(event.srcElement);
	if(pseudoThis == null)
		return;
	pseudoThis.lastChild.style.display = "none";
}

function GetContainerElement(node)
{
	while(node != null && node.menucontainer != "true")
		node = node.parentNode;
		
	return node;
}

