	
	function MM_expandirMenu(e)
	{
		if (e.style.display == "")
		{
			e.style.display="none";
		} else {
			e.style.display="";
		}
	}
	
	function MM_restaurarImagen() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	
	function MM_cargarImagenes() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_cargarImagenes.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	
	function MM_buscarObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_buscarObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	
	function MM_cambiarImagen() { //v3.0
	  var i,j=0,x,a=MM_cambiarImagen.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_buscarObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
		
	function DisplayStatusMsg(msgStr)
	{
		status=msgStr;
		document.MM_returnValue = true;
	}
	
	
	function OpenNewWindow(rScript, rHeight, rWidth, rLeft, rTop, fResizable)
	{
		
		window.open(rScript, "", "height="+rHeight+",width="+rWidth+",screenX=15,left="+rLeft+",screenY=15,top="+rTop+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable="+fResizable+",scrollbars=1,status=1,toolbar=0,titlebar=0");
		return true;
	}
	
	
	function AcceptNum(evt)
	{
		// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57	
		var nav4 = window.Event ? true : false;
		var key = nav4 ? evt.which : evt.keyCode;	
		return (key <= 13 || (key >= 48 && key <= 57));
	}
	
	function Trim( str )
	{
		var resultStr = "";
		
		resultStr = TrimLeft(str);
		resultStr = TrimRight(resultStr);
		
		return resultStr;
	}
	
	function TrimLeft( str )
	{
		var resultStr = "";
		var i = len = 0;
		// Return immediately if an invalid value was passed in
		if (str+"" == "undefined" || str == null) 
		return null;
		// Make sure the argument is a string
		str += "";
		if (str.length == 0) 
		resultStr = "";
		else { 
		// Loop through string starting at the beginning as long as there
		// are spaces.
		// len = str.length - 1;
		len = str.length;
		
		while ((i <= len) && (str.charAt(i) == " "))
		i++;
		// When the loop is done, we're sitting at the first non-space char,
		// so return that char plus the remaining chars of the string.
		resultStr = str.substring(i, len);
		}
		return resultStr;
	}
	
	function TrimRight( str )
	{
		var resultStr = "";
		var i = 0;
		// Return immediately if an invalid value was passed in
		if (str+"" == "undefined" || str == null) 
		return null;
		// Make sure the argument is a string
		str += "";
		
		if (str.length == 0) 
		resultStr = "";
		else {
		// Loop through string starting at the end as long as there
		// are spaces.
		i = str.length - 1;
		while ((i >= 0) && (str.charAt(i) == " "))
		i--;
		
		// When the loop is done, we're sitting at the last non-space char,
		// so return that char plus all previous chars of the string.
		resultStr = str.substring(0, i + 1);
		}
		
		return resultStr; 
	}
	
	
	
	function DoEvent(id)
	{
		if (document.getElementById(id).style.display == 'none')
		{
			document.getElementById(id).style.display = 'block';
			document.getElementById(id).style.visibility = 'visible';
		}
		else
		{
			document.getElementById(id).style.display = 'none';
			document.getElementById(id).style.visibility = 'hidden';
		}
		return false;
	}
	
	function ChangeImage(id)
	{
		var imagen=document.getElementById(id).src;
		var	nivel=imagen.indexOf('level');
		if (nivel>=0)		
		{
			var	gif=imagen.indexOf('minus');
			if (gif>=0)		
				document.getElementById(id).src ='images/level_plus.gif';
			else
				document.getElementById(id).src ='images/level_minus.gif';
		}
		else
		{
			var	gif=imagen.indexOf('minus');
			if (gif>=0)		
				document.getElementById(id).src ='images/style_sky/level_plus.gif';
			else
				document.getElementById(id).src ='images/style_sky/level_minus.gif';
		}
		return false;
	}
