// Javascript File

/**
 *	This function handles the showing and hiding of the content of
 *	the "Windows"-like panels, found in the backend.
 **/
 
/** =====REMOVED BECAUSE ITS NOW INCLUDED IN THE CONTROL THAT USES IT ====
 *	SEE SERVER CONTROL: code/winpanel.cs
function SectionButton_Click( sectionContentName, sender )
{
	var sectionContent = document.getElementById( sectionContentName );
	if( sectionContent.style.display == 'none' )
	{
		sectionContent.style.display = '';
		sender.src = sender.src.replace( "_Down", "_Up" );
	}
	else
	{
		sectionContent.style.display = 'none';
		sender.src = sender.src.replace( "_Up", "_Down" );
	}
		
	return false;
}
*/

/**
 * This function opens the pop-up window. It is used in the search panels.
 **/
function OpenPopup_ClientInformaton( url )
{
	window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=600,height=480");
}

/**
 * This function opens the pop-up window.
 **/
function OpenPopup_ClientInformaton( url, width, height )
{
	window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=" + width + ",height=" + height);
}

/**
 * This function opens the pop-up window.
 **/
function OpenPopup_UtilityPopup( url, width, height )
{
	window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=" + width + ",height=" + height);
}

/**
 * This function opens the pop-up window with the menu visible.
 **/
function OpenPopup_UtilityPopup_WithMenu( url, width, height )
{
	window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=" + width + ",height=" + height);
}


function showSubMenu( sender )
{
    sender.getElementsByTagName('div')[1].style.left = 'auto';
    var top_container = document.getElementById("top_container");
    top_container.style.zIndex = -5;
}
 
function hideSubMenu( sender )
{
    sender.getElementsByTagName('div')[1].style.left = '-999px';
    var top_container = document.getElementById("top_container");
    top_container.style.zIndex = 1;
}