<!--
function sG(obj)
{
	var el = $(obj);
	var ar = $("menuContent").getElementsByClassName("submenu");
	var exAr = $("menuContent").getElementsByClassName("expandable");
	for (var i=0; i<ar.length; i++)
	{
		var oEl = ar[i].getAttribute('id');
		if(oEl!=obj)
		{
			Effect.BlindUp(oEl,{ duration:0.2 });		
		}
	}
	if(el.style.display=='none')
	{
		Effect.BlindDown(el,{ duration:0.5 });
	}
	else
	{
		Effect.BlindUp(el,{ duration:0.5 });
	}
}

function sHp(obj)
{
	var el = $(obj);
	var ar = $("menuContent").getElementsByClassName("submenu");
	var exAr = $("menuContent").getElementsByClassName("change");
	var ex = document.getElementById("change-"+obj);
	for (var i=0; i<ar.length; i++)
	{
		var oEl = ar[i].getAttribute('id');
		if(oEl!=obj)
		{
			Effect.BlindUp(oEl,{ duration:0.2 });
			ex.innerHTML = '<img src="/images/plus-icon.png" width="6" height="6" />';			
		}
		exAr[i].innerHTML = '<img src="/images/plus-icon.png" width="6" height="6" />'; /*Reset all expandable images*/
	}
	if(el.style.display=='none')
	{
		Effect.BlindDown(el,{ duration:0.5 });
		ex.innerHTML = '<img src="/images/less-icon.png" width="6" height="6" />';
	}
	else
	{
		Effect.BlindUp(el,{ duration:0.5 });
		ex.innerHTML = '<img src="/images/plus-icon.png" width="6" height="6" />';
	}
}

function Redirect(url) {
	window.top.location.href = url;
}
function openwin(url, name, options) {
	var win = window.open(url, name, options);
}
function pageHeight()
{
	var y;
	if (self.innerHeight) // all except Explorer
	{
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
	{
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		y = document.body.clientHeight;
	}
	return y;
}

function pageWidth()
{
	var x;
	if (self.innerWidth)// all except Explorer
	{
		x = self.innerWidth;
	}else if(document.documentElement && document.documentElement.clientWidth)// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
	}
	else if(document.body)// other Explorers
	{
		x = document.body.clientWidth;
	}
	return x;
}
function cLog()
{
	var obj = document.getElementById('mainContent');
	var cont = document.getElementById('container');
	var ah = pageHeight() - 0;
	var aw = pageWidth() - 0;
	var oh = obj.offsetHeight; //si
	var ow = obj.offsetWidth; //si
	var xc = (aw - ow) / 2;
	var yc = (ah - oh) / 2;
	obj.style.left = xc+'px';
	obj.style.top = yc+'px';
	cont.style.height = ah+'px'
	//alert('Page Height= '+ah+'; Page Width= '+aw+'; Div Height= '+oh+'; Div Width= '+ow+'; Coordenadas eje X= '+xc+'; Coordenadas eje Y= '+yc);
}
//-->

//GAME POP UP
//This function is similar to openwin, both open new windows
//but gamePop center the page in the space avialble of the screen
function gamePop(url,name,width,height,resizable,scrollbars)
{
	var str = "height=" + height + ",innerHeight=" + height;
	str += ",width=" + width + ",innerWidth=" + width;
	str += ",resizable=" + resizable + ",scrollbars=" + scrollbars;
	if (window.screen)
	{
		var ah = screen.availHeight - 0;
		var aw = screen.availWidth - 0;
		var xc = (aw - width) / 2;
		var yc = (ah - height) / 2;
		str += ",left=" + xc + ",screenX=" + xc;
		str += ",top=" + yc + ",screenY=" + yc;
	}
	var win =  window.open(url, name, str);
	if (window.focus)
	{
	  win.focus()
	}
}

var newWin = null;
function openIt()
{
  newWin = window.open();
}
function closeThis(){
  window.close()
}
function doIt() {
  openIt();
  setTimeout("closeThis();",1000);
}

