
function center_layer(layer){

document.all(layer).style.top = parseInt(parseFloat(screen.height)/2)-parseInt(parseFloat(document.all(layer).style.height)/2)-60;
document.all(layer).style.left = parseInt(parseFloat(screen.width)/2)-parseInt(parseFloat(document.all(layer).style.width)/2);


}
function scalewin(layer){
document.all(layer).style.top = 0;
document.all(layer).style.left = 0;
document.all(layer).style.width = parseInt(screen.availwidth);
document.all(layer).style.height = parseInt(screen.availheight);
}
function scale_win(layer){
//document.all(layer).style.top = 0;
//document.all(layer).style.left = 0;
document.all(layer).style.width = parseInt(parseFloat(screen.availwidth)*0.5);
document.all(layer).style.height = parseInt(parseFloat(screen.availheight)*0.5);
}

function reposlayer(layer){

var arriba = parseInt(document.all("Main").style.top);
var izquierda = parseInt(document.all("Main").style.left);
var alto = parseInt(document.all("Main").style.height);
var ancho = parseInt(document.all("Main").style.width);


document.all(layer).style.height = parseInt(parseFloat(alto*0.7));
if (screen.availwidth <= 1152)
	document.all(layer).style.top = parseInt(arriba + alto - parseInt(document.all(layer).style.height)-30);
if(screen.availwidth > 1152)
	document.all(layer).style.top = parseInt(arriba + alto - parseInt(document.all(layer).style.height)-65);

document.all(layer).style.left = parseInt(parseFloat(izquierda*1.2));
document.all(layer).style.width = parseInt(parseFloat(ancho*0.95));


}

function showWindow(layer,url){
	document.all(layer).style.width = parseInt(parseFloat(screen.width)*0.85);
	document.all(layer).style.height = parseInt(parseFloat(screen.height)*0.75);
	center_layer(layer);
	document.all("AuxPanel").src = url;
	document.all(layer).style.visibility = 'visible';

	//window.alert(layer);
	//window.alert(document.all(layer).style.height);
}
function closeWindow(layer){
	document.all(layer).style.visibility = 'hidden';
}
function showWindow2(layer){
	if(document.all(layer).style.visibility == 'visible')
		document.all(layer).style.visibility = 'hidden';
	else
		document.all(layer).style.visibility = 'visible';

}

function callmail(){
window.open("http://www.dtplan.com:8080","correo","top=0,left=0,width="+screen.availwidth+", height="+screen.availheight+", resizable=yes, directories=yes, menubar=yes, hotkeys=yes, scrollbars=yes, maxbutton=yes, location=yes, toolbar=yes, status=yes");
}

//-->
