function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=1440,height=900');");
}


        function CargarPaginaEnModal(URL,PARAMS)
        {
        
	    if(URL == null)
		return;

            // define a response handler
            function responseHandler(ajaxRequest)
            {
            
                var responseText = ajaxRequest.responseText;
                var theDiv = document.getElementById("DivPopupModal");
                if (theDiv == null)
                    return;
                
                var indice1 = responseText.indexOf('<div id="sec#$1"></div>');
                var indice2 = responseText.indexOf('<div id="sec#$2"></div>');
                
                if(indice1 > 0 && indice2>0)
                {
                    //elimina tag form por compatibilidad con ie
                    responseText = responseText.substring(indice1,indice2);
                    theDiv.innerHTML = responseText; // place the Html
                }
                else
                {
                    theDiv.innerHTML = responseText; // place the Html
                }
                    
                // show the PopUp
                $.modal($('#DivPopupModal'));
            }
            
            ajaxSend('get', URL, PARAMS, responseHandler);
            //ajaxSend('get', 'ggg.htm', PARAMS, responseHandler);

        }
        

