function popUpAdmin() 
{
	window.open('admin.aspx','', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=200');
}

function popUpPrintInvoice(link) 
{
	window.open(link,'', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width=800,height=600');
}
		
function popUpSecurityCode() 
{
	window.open('securitycode.html','', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=400');
}

function showMenu(menu) {
		
	document.getElementById(menu).style.display="block";
}

function hideMenu(menu) {

	document.getElementById(menu).style.display="none";
}

function getfocus(control){
	if (control!='')(
		document.getElementById(control).focus()
	)
}

function showOrderControls(menu) {

	document.getElementById(menu).style.visibility="visible";
	hideSelect()
}

function hideOrderControls(menu) {

	document.getElementById(menu).style.visibility="hidden";
	unhideSelect()
}

// Hide all select boxes    
function hideSelect()
{
    if (document.all) // Only do this for IE
    {
        for (formIdx=0; formIdx<document.forms.length; formIdx++) 
        {
            var theForm = document.forms[formIdx];
            for(elementIdx=0; elementIdx<theForm.elements.length; elementIdx++)
            {
                if(theForm[elementIdx].type == "select-one") 
                {    theForm[elementIdx].style.visibility = "hidden";    }
            }
        }
    }
}

// Unhide all select boxes
function unhideSelect()
{
    if (document.all) // Only do this for IE
    {
        for (formIdx=0; formIdx<document.forms.length; formIdx++) 
        {
            var theForm = document.forms[formIdx];
            for(elementIdx=0; elementIdx<theForm.elements.length; elementIdx++)
            {
                if(theForm[elementIdx].type == "select-one") 
                {    theForm[elementIdx].style.visibility = "visible";    }
            }
        }
    } 
}
		
function startHighlight(table)
{				
	if (document.all && document.getElementById)
	{
		navRoot = document.getElementById(table);
			
		// Get a reference to the TBODY element 
		tbody = navRoot.childNodes[0];
			
		for (i = 0; i < tbody.childNodes.length; i++)
		{
			node = tbody.childNodes[i];
			if (node.nodeName == "TR")
			{
				node.onmouseover=function()
				{
					if (this.className != "dgheader")
					{
						this.className = "over";
					}								
				}
					
				node.onmouseout=function()
				{
					if (this.className != "dgheader")
					{
						this.className = this.className.replace("over", "");
					}
					
				}
			}
		}
	}
}
