function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
	this.obj = getObjNN4(document,name);
	this.style = this.obj;
  }
}

function getObjNN4(obj,name)
{
	var x = obj.layers;
	var foundLayer;
	for (var i=0;i<x.length;i++)
	{
		if (x[i].id == name)
		 	foundLayer = x[i];
		else if (x[i].layers.length)
			var tmp = getObjNN4(x[i],name);
		if (tmp) foundLayer = tmp;
	}
	return foundLayer;
}

var active_submenu;

function showSubmenu (index)
{
	hideActiveSubmenu();
	var sm = new getObj('submenu_'+index);
	if (sm)
	{
		sm.style.display = 'block';
	}
	var m = new getObj('menu_'+index);
	m.style.backgroundPosition = '0px -58px';
	active_submenu = index;
}

function hideActiveSubmenu()
{
	if (active_submenu)
	{
		var sm = new getObj('submenu_'+active_submenu);		
		sm.style.display = 'none';
		var m = new getObj('menu_'+active_submenu);
		m.style.backgroundPosition = '0px 0px';
		active_submenu = null;
	}
}


function popup(){
	newwin = window.open('','win_img','width=734, height=481,resizable=no,fullscreen=no,channelmode=no,menubar=no,toolbar=no,location=no,scrollbars=no,status=yes,top=20,left=20,screenX=20,screenY=20');
	newwin.focus();
}

function privacy() {
b=window.open('','privacy',"scrollbars=0,status=0,statusbar=0,toolbar=no,location=no,menubar=no,width=400,height=450,resizable=no,top=30,left=30,screenX=30,screenY=30");
b.focus();
}

function news() {
b=window.open('','news',"scrollbars=0,status=0,statusbar=0,toolbar=no,location=no,menubar=no,width=450,height=450,resizable=yes,top=40,left=40,screenX=40,screenY=40");
b.focus();
}
