function AbrirEX(url,nombre,ancho,alto,features,scrollbars,cerrar) 
{ 
	var left,top;
	
	if(ancho!='')
	{
		left= screen.availWidth/2 -ancho/2;
		ancho = ', width = ' + ancho + ',left = ' + left;
	}
	if(alto!='')
	{
		top= screen.availHeight/2 -alto/2;
		alto = ', height = ' + alto + ',top =' + top ;
	}
	if(features!="")
	{
			features = ", " + features
	}

	if (scrollbars == true || scrollbars==1)
	{
		scrollbars=1;
	}
	else
	{
		scrollbars=0;
	}
	
	var hWindow
	
	hWindow =window.open(url,nombre,  'scrollbars =' + scrollbars + features + ancho + alto);
	
	
	cerrar=cerrar||false; 
	if(cerrar)
	{
		papa = window.self;
		papa.opener = window.self;
		papa.close();
	}
	
}

function Abrir(theURL,winName,features) { //v2.0
  	var hWindow
	hWindow =window.open(theURL,winName,features);
}

function AbrirFullscreen(url,nombre,scrollbars,cerrar) 
{ 

	if (scrollbars == true || scrollbars==1)
	{
		scrollbars='scrolling=yes ';
	}
	else
	{
		scrollbars='scrolling=no ';
	}
	
	tsz=10
	brd=10
	fSO=scrollbars
	tW=nombre
	
	var cFRM='<HTML><HEAD><TITLE>'+tW+'</TITLE>\n'+
	'</HEAD>\n'+
	'<frameset border=0 framespacing=0 frameborder=0 rows="'+tsz+',100%,'+brd+'">\n'+
	'	<frame name=fT src="about:blank" scrolling=no noresize>\n'+
	'	<frameset border=0 framespacing=0 frameborder=0 cols="'+brd+',1,100%,1,'+brd+'">\n'+
	'		<frame name=n0 src="about:blank" scrolling=no noresize>\n'+
	'		<frame name=bL src="about:blank" scrolling=no noresize>\n'+
	'			<frameset border=0 framespacing=0 frameborder=0 rows="1,100%,1">\n'+
	'				<frame name=bT src="about:blank" scrolling=no noresize>\n'+
	'				<frame name=main src="'+url+'" '+fSO+'>\n'+
	'				<frame name=bB src="about:blank" scrolling=no noresize>\n'+
	'			</frameset>\n'+
	'		<frame name=bR src="about:blank" scrolling=no noresize>\n'+
	'		<frame name=n1 src="about:blank" scrolling=no noresize>\n'+
	'	</frameset>\n'+
	'	<frameset border=0 framespacing=0 frameborder=0 cols="'+brd+',100%,'+brd+'">\n'+
	'		<frame name=n3 src="about:blank" scrolling=no noresize>\n'+
	'		<frame name=n2 src="about:blank" scrolling=no noresize>\n'+
	'		<frame name=n4 src="about:blank" scrolling=no noresize>\n'+
	'	</frameset>\n'+
	'</frameset>\n'+
	'</HTML>'
	
	var hWindow
	hWindow = window.open("",nombre,"fullscreen=1");
	hWindow.document.write(cFRM)
	hWindow.document.close()
		
	cerrar=cerrar||false; 
	if(cerrar)
	{
		papa = window.self;
		papa.opener = window.self;
		papa.close();
	}
	
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function tabla_Dysplay(boton, tabla)
{
if(tabla.style.display=='none') {tabla.style.display='block';boton.innerText = '-'} else {tabla.style.display='none';boton.innerText = '+'}
return 1;
}

function selectAll(form,tipo)
{
	with (form)
	{
		var check = false;
		var i=0;

		for (i=0; i< elements.length; i++)
			if (elements[i].type == tipo)
				//if (elements[i].name.substring(0, select.length) == select)
				{
					check = !(elements[i].checked);	break;
				}

		for (i=0; i < elements.length; i++)
		{
			if (elements[i].type == tipo)
				//if (elements[i].name.substring(0, select.length) == select)
					elements[i].checked = check;
		}
	}
}

