
	// Abre una popup centrada en la pantalla
	// parametros : 
	// -----------> URL_Ventana : url pagina 
	// -----------> OpcionesVentana : width, heigh, scroll etc (ver window.open())
	// -----------> Centrada : true or false
	// -----------> PosX, PosY : si centrada=false especifican las coordenadas de la ventana
	// --------------------------------------------------------------------------------------//
	function AbreVentana(URL_Ventana, OpcionesVentana, Ancho, Alto, Centrada, PosX, PosY) {

	if (Centrada) {
		PosX = (screen.availWidth)? ((screen.availWidth - Ancho)/2):20;
		PosY = (screen.availHeight)? ((screen.availHeight - Alto)/2):20;
		}
		
	if (OpcionesVentana == '')
		OpcionesVentana = 'width=' + Ancho;
	else
		OpcionesVentana += ',width=' + Ancho;

	OpcionesVentana += ',height=' + Alto + ',left=' + PosX
		+ ',top=' + PosY;
		
	return window.open(URL_Ventana, "", OpcionesVentana);
	
	}
	
	function iFrameFix(){

	    /*var iFix = $('divfixIframe');
	    if (iFix != null){
		    new Rico.Effect.Size( parent.document.getElementsByTagName("IFRAME")[0], null, findPixY(iFix) + 20, 1, 1);
	    }*/
	    //var heightFrame = $jq("body").height()+270;
	    //alert(parent.$("iframe").height());
        //parent.$("iframe").height(heightFrame);
        //alert($("#tableCat").height());
        //alert($("#tableCat").height());
        var heightFrame= $("#tableCat").height();
        parent.$("iframe").height(heightFrame+50);
    }

function findPixY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

