/* Psyleron Website - Informational pages - Common Javascript for clientside animation and rollovers */

function menu_item_over(pObj)
{
	if(pObj)
		pObj.style.backgroundImage = 'URL(img/menu_over.png)';
}
function menu_item_out(pObj)
{
	if(pObj)
		pObj.style.backgroundImage = 'URL(img/spacer.gif)';
}

function submenu_item_over(pObj)
{
	if(pObj)
		pObj.style.backgroundImage = 'URL(img/submenu_over.png)';
}
function submenu_item_out(pObj)
{
	if(pObj)
		pObj.style.backgroundImage = 'URL(img/spacer.gif)';
}

function button_item_over(pObj)
{
	if(pObj)
		pObj.style.backgroundImage = 'URL(img/button_over.png)';
}
function button_item_out(pObj)
{
	if(pObj)
		pObj.style.backgroundImage = 'URL(img/spacer.gif)';
}

function menu_collapse(oObj)
{
	if(!oObj)
		return;
	
	oChild = oObj.firstChild;
	while(oChild){
		if((oChild.nodeType == 1 && oChild.tagName.toLowerCase() == "a") || oChild.className == "shorthr"){
			oChild.style.display = "none";
		}else if(oChild.className == "collapser"){
			oChild.style.visibility = "hidden";
		}else if(oChild.className == "expander"){
			oChild.style.visibility = "visible";
		}
		oChild = oChild.nextSibling;
	}
}

function menu_expand(oObj)
{
	if(!oObj)
		return;
	
	oChild = oObj.firstChild;
	while(oChild){
		if((oChild.nodeType == 1 && oChild.tagName.toLowerCase() == "a") || oChild.className == "shorthr"){
			oChild.style.display = "";	//do not specify type  because we have imgs and divs
		}else if(oChild.className == "collapser"){
			oChild.style.visibility = "visible";
		}else if(oChild.className == "expander"){
			oChild.style.visibility = "hidden";
		}
		oChild = oChild.nextSibling;
	}
}