function getObject(obj) 
{
    var theObj;
    
    if (document.all) 
    {
        if (typeof obj=="string") 
        {
            return document.all(obj);
        } else {
            return obj.style;
        }
    }
    
    if(document.getElementById) 
    {
        if (typeof obj=="string") 
        {
            return document.getElementById(obj);
        } else {
            return obj.style;
        }
    }
    
    return null;
}

var hideTimer = null;
var hideObject = null;
var showTimer = null;
var showObject = null;

function hoverPanel(object, parent)
{
    if (hideTimer && hideObject == object)
    {        
        clearTimeout(hideTimer);
    }
    else
    {
        showTimer = setTimeout('doHover(\'' + object + '\',\'' + parent + '\');', 25)
        showObject = object;
    }
}

function unhoverPanel(object, parent)
{
    if (showTimer && showObject == object)
    {
        clearTimeout(showTimer);
    }
    else
    {
        hideTimer = setTimeout('doUnhover(\'' + object + '\',\'' + parent + '\');', 100)
        hideObject = object;
    }
}

function doHover(object, parent)
{
    showObject = null;
	var theObj = getObject(object);	
	
    var theParent = getObject(parent);    
    if (theParent.style.color == "#000000" || theParent.style.color == "" || theParent.style.color == "rgb(0, 0, 0)")
        theParent.style.color = "#ff0000";
    	
    theObj.style.top = '66px';
    theObj.style.left = (theParent.offsetLeft) + "px";
    theObj.style.display = 'block';
}

function doUnhover(object, parent)
{
	hideObject = null;
	var theObj = getObject(object);

    var theParent = getObject(parent);
    if (theParent.style.color == "#ff0000" || theParent.style.color == "rgb(255, 0, 0)")
        theParent.style.color = "#000000";
    theObj.style.display = 'none';
}

function menuHover(object) 
{
    var theObj = getObject(object);
    theObj.className = "newMenuHov";
}

function menuUnHover(object) 
{
    var theObj = getObject(object);
    theObj.className = "newMenu";
}

function SubMenuHover(object) {
    var theObj = getObject(object);
    theObj.className = "newSubMenuHov";
}

function SubMenuUnHover(object) {
    var theObj = getObject(object);
    theObj.className = "newSubMenu";
}

function HeatImg(object) {
    var theObj = getObject(object);
    var src = theObj.src;
    var last = src.lastIndexOf(".");    
    theObj.src = src.substring(0, last) + "Hot" + src.substring(last);
}

function CoolImg(object) {
    var theObj = getObject(object);
    var src = theObj.src;
    var last = src.lastIndexOf(".");
    theObj.src = src.substring(0, last - 3) + src.substring(last);
}

var lastClick = null;

function ExpandClick(object) {
    lastClick = object.substring(3, object.length);

    var theObj = getObject(object);
    var pID = "pnl" + object.substring(3, object.length);
    var panel = getObject(pID);
    if (panel.style.display == "block") {
        theObj.src = theObj.src.replace("Minus", "Plus");
        panel.style.display = "none";
    } else {
        theObj.src = theObj.src.replace("Plus", "Minus");
        panel.style.display = "block";
    }
}

function ItemClick(object, url) {
    if (lastClick == object) {
        lastClick = null;
    } else {
        window.location = url;
    }
}