/**
Cambia el tama?o de la ventana asegurandose que el interior de esta
sea el indicado por newWidth y newHeight.
 
Se debe agregar el siguiente tag antes del cierre del body </body>
<script language="javascript" type="text/javascript">fnWinResizeInterno(600, 450);</script>
*/


function fnWinMaximizarVentana(){

            window.resizeTo(screen.availWidth, screen.availHeight);

            window.moveTo(0,0);

}


function fnWinResizeInterno(newWidth, newHeight) {
	fnWinResizeInterno_2(newWidth, newHeight);
	fnWinResizeInterno_2(newWidth, newHeight);
}

function fnWinResizeInterno_2(newWidth, newHeight) {
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	myWidth = newWidth - myWidth;
	myHeight = newHeight - myHeight;
	window.resizeBy(myWidth, myHeight);
	window.top.moveTo((screen.availWidth - newWidth) / 2, (screen.availHeight - newHeight) / 2);
}


function fnWinOpen(url, nombreVentana){
	var win = window.open(url, nombreVentana, 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=350,height=200');
	if (win) win.focus();
}

function fnWinOpenScroll(url, nombreVentana){
	var win = window.open(url, nombreVentana, 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=350,height=200');
	if (win) win.focus();
}

function fnWinOpenScroll2(url, nombreVentana, resize){
	var param1 = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=';
	var param2 = ',width=350,height=200';
	if (resize==0)
		var param = param1 + 'yes' + param2
	if (resize==1)
		var param = param1 + 'no' + param2
	var win = window.open(url, nombreVentana, param);
	if (win) win.focus();
}



function fnWinOpenFull(url, nombreVentana, resize){
	var win = window.open(url, nombreVentana, '');
	if (win) win.focus();
}

function redimensiona(){
	//window.parent.grand(document.body.scrollHeight);
	//top.grand($(document).height());
	//$(window).parent().height("3000px");
}


