// *
// * Funciones para manejar ventanas
// *
// *

// ** Detect the type of 
NS4 = (document.layers);
IE4 = (document.all);


function OpenWindow( href, target, width, height, menu , scroll, sizable, top, left)
{
	var hWnd;

	hWnd = hOpenWindow( href, target, width, height, menu , scroll, sizable, top, left);
}

function hOpenWindow( href, target, width, height, menu , scroll, sizable, top, left)
{
	var hWnd;
	var top;
	var left;
	
	if( top == false) {
		ctop = (screen.height / 2) - (height / 2);
		cleft = (screen.width / 2) - (width / 2);
	} else {
		ctop = top;
		cleft = left;
	}
	hWnd = window.open('',target,'menubar=' + menu + ',scrollbars=' + scroll + ',resizable=' + sizable + ',width=' + width + ',height=' + height + ',top=' + ctop + ',left=' + cleft);
	hWnd.close();
	
	hWnd = window.open( href,target,'menubar=' + menu + ',scrollbars=' + scroll + ',resizable=' + sizable + ',width=' + width + ',height=' + height + ',top=' + ctop + ',left=' + cleft);
//	hWnd.moveTo( cleft, ctop);
//	hWnd.resizeTo( width + 12, height + 30);

	return hWnd;
}