// JavaScript functions for opening and closing window 
// It closes old window before opening the new one
//----------
	var window_name = null			// Global variable for closing
        function makeNewWin(filnam,winname,ht,wd,tp,lt,stat,toolb,menub,scro,resiz)
        {
	if (window_name==winname){
           closeNewWin(window_name);
        }
        var param='height='+ht+',width='+wd+',top='+tp+',left='+lt+',status='+stat+',toolbar='+toolb+',menubar='+menub+',scrollbars='+scro+',resizable='+resiz;
        window_name = window.open(filnam,winname,param);
        window_name.focus();
	}
//----------
        function closeNewWin(window_name){
	    if (window_name) {
		window_name.close()
		window_name = null
            }
	}
//-----------
// End of Guman window functions
/*FUNC ShowItem*/
function ShowItem(Layer)
{
	if (Layer.style.visibility == 'visible') 
	{
		Layer.style.visibility = 'hidden';
		Layer.style.position = 'absolute';
	}
	else
	{
		Layer.style.visibility = 'visible';
		Layer.style.position = 'relative';
	}
	return false;
}
/*
function ShowItemA(id)
{
	if (document.all['Layer'+id].style.visibility == 'visible') 
	{
		document.all['Layer'+id].style.visibility = 'hidden';
		document.all['Layer'+id].style.position = 'absolute';
	}
	else
	{
		document.all['Layer'+id].style.visibility = 'visible';
		document.all['Layer'+id].style.position = 'relative';
	}
	return false;
}
*/

/*FUNC ShowItem for css display yes or none*/
function ShowItemAll(id)
{
    var imgid=document.getElementById('img'+id);
	if (document.getElementById('Layer'+id).style.display == '')
	{
		document.getElementById('Layer'+id).style.display = 'none';
        imgid.src = "main_menu/images/arron.gif";
	}
	else
	{
		document.getElementById('Layer'+id).style.display = '';
        imgid.src = "main_menu/images/arroff.gif"
	}
	return false;
}



/*FUNC ShowItem for css display with arrow up and down*/
function ShowItemAll2(id)
{
    var imgid=document.getElementById('img'+id);
	if (document.getElementById('Layer'+id).style.display == '')
	{
		document.getElementById('Layer'+id).style.display = 'none';
        imgid.src = "../../images/arron.gif"
	}
	else
	{
		document.getElementById('Layer'+id).style.display = '';
        imgid.src = "../../images/arroff.gif"
	}
	return false;
}

/*FUNC ShowItem for css visible or hidden parameters*/

function ShowItemVH(id)
{
	if (document.getElementById('Layer'+id).style.visibility == 'visible')
	{
		document.getElementById('Layer'+id).style.visibility = 'hidden';
		document.getElementById('Layer'+id).style.position = 'absolute';
	}
	else
	{
		document.getElementById('Layer'+id).style.visibility = 'visible';
		document.getElementById('Layer'+id).style.position = 'relative';
	}
	return false;
}
   