
var popupWindow = null;

function popup(url,width,height) {

 if(popupWindow!=null)
  {
  if (typeof(popupWindow) == "object")
   popupWindow.close();
//   popupWindow = null;
  }
        var width=width+18;
        var height=height;
        var top  = (screen.height - height) / 2;
        var left = (screen.width  - width)  / 2;
        $popup='popup'+width+'x'+height;
    popupWindow = window.open(url,$popup,'toolbar=no,menubar=no,scrollbars=yes,resize=no,titlebar=no,resizable=no,width='+width+',height='+height+',top='+top+',left='+left+'');
        popupWindow.focus();
}
	
function show_hide(el)
 {
 	if(document.getElementById('div_'+el).style.display == "") {
//		document.getElementById(el).className="menu";
//		document.getElementById('td_'+el).className="";
//		document.getElementById('sub_'+el).src="/img/plus.gif";
		document.getElementById('sub_'+el).alt="Unroll";
		document.getElementById('sub_'+el).title="Unroll";
		document.getElementById('div_'+el).style.display="none";
	} else {
//	    document.getElementById(el).className="menuact";
//		document.getElementById('td_'+el).className="submenu";
//		document.getElementById('sub_'+el).src="/img/minus.gif";
		document.getElementById('sub_'+el).alt="Roll";
		document.getElementById('sub_'+el).title="Roll";
		document.getElementById('div_'+el).style.display="";
	}
 }

i1 = new Image; i1.src = "/images/menu_bg.gif";
i2 = new Image; i2.src = "/images/menua_bg.gif";
i3 = new Image; i3.src = "/images/menug_bg.gif";
 
function menu_show(el)
 {
	document.getElementById('m'+el).background = i2.src;
   	document.getElementById('m'+el).className = "subma";
 }
 
function menu_hide(el,ch)
{
 	if(ch == 1)
	{
		document.getElementById('m'+el).background = i3.src;
   		document.getElementById('m'+el).className = "submg";
	} else
 	if(ch == 2)
	{
		document.getElementById('m'+el).background = i1.src;
   		document.getElementById('m'+el).className = "subme";
	} else
	{
		document.getElementById('m'+el).background = i1.src;
		document.getElementById('m'+el).className = "subm";
	}
}	
