//-- AS www.aseventos.com
//-- HDA 
function popup( fichero, ancho, alto ) {
	if ((ancho == 0) || (ancho == undefined)){
		ancho = screen.width - 10;
		alto = screen.height - 10;
	}
	var top=(screen.height-alto)/2 - 1;
	var left=(screen.width-ancho)/2 - 1;
	var options = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no";
	var fecha = new Date();
	var nombre = "vnt"+ (Math.floor( fecha.getTime(  ) ));
	window.open(fichero,nombre,"top="+top+",left="+left+",width="+ancho+",height="+alto+","+options);
}

function replaceVentana( ventana, fichero ) {
	document.replace( fichero );
}

function popupScroll( fichero, ancho, alto ) {
	if ((ancho == 0) || (ancho == undefined)){
		ancho = screen.width - 10;
		alto = screen.height - 10;
	}
	var top=(screen.height-alto)/2 - 1;
	var left=(screen.width-ancho)/2 - 1;
	var options = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no";
	var fecha = new Date();
	var nombre = "vnt"+ (Math.floor( fecha.getTime(  ) ));
	window.open(fichero,nombre,"top="+top+",left="+left+",width="+ancho+",height="+alto+","+options);
}

function cerrarVentana( ventana ) {
	ventana.close();
}

function expand() {
	for(x = 0; x < 50; x++) {
		window.moveTo(screen.availWidth * -(x - 50) / 100, screen.availHeight * -(x - 50) / 100);
		window.resizeTo(screen.availWidth * x / 50, screen.availHeight * x / 50);
	}
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	window.scrollbars = false;
}

function maximizarVentana( ventana ){
	//-- Maximizar Ventana
	top.ventana.moveTo(0,0);
	if (document.all) {
		top.ventana.resizeTo(screen.availWidth,screen.availHeight);
	}
	else if (document.layers||document.getElementById) {
		if (top.ventana.outerHeight<screen.availHeight||top.ventana.outerWidth<screen.availWidth){
		top.ventana.outerHeight = screen.availHeight;
		top.ventana.outerWidth = screen.availWidth;
		}
	}
}

