// JScript source code

function Print(){
	document.body.offsetHeight;
	window.print();
}


function MessageBox(IconoIndex,Titulo,Mensaje){
    
	var Incono;  
	if (IconoIndex == 1){Incono = Ext.MessageBox.INFO;}
	if (IconoIndex == 2){Incono = Ext.MessageBox.QUESTION;} 
	if (IconoIndex == 3){Incono = Ext.MessageBox.WARNING;} 
	if (IconoIndex == 4){Incono = Ext.MessageBox.ERROR;}

	   Ext.MessageBox.show({
           title: Titulo,
           msg: Mensaje,
           buttons: Ext.MessageBox.OK,
           icon: Incono
       });
}

function VentanaEsperaON()
{
        Ext.MessageBox.show({
           msg: 'Cargando la pagina',
           progressText: 'Cargando....',
           width:300,
           wait:true,
           waitConfig:{interval:200}
       });

       // setTimeout( function(){ Ext.MessageBox.hide();}, 8000 );
}

function VentanaEsperaOFF()
{
       Ext.MessageBox.hide();
}


function ventana_poup_galeria(prodidn,idlink,textbtn){

            var button = Ext.get(idlink);
            var win;

                win = new Ext.Window({
				html        :'<iframe style="WIDTH: 100%; HEIGHT: 100%" src="galeria.php?prodidn=' + prodidn + '" frameborder="0"></iframe>',  
                layout      : 'fit',
                closeAction :'hide',
                plain       : true,
                modal       : true,
                width       : 800,
                height      : 600,
                closeAction :'hide',
                plain       : true, 
                maskDisabled: false,
                pageY       : 0,
				resizable	: false,
				autoScrol	: false,
				buttons: [{
                    text     : textbtn,
                    handler  : function(){
                        win.hide();
                    }
                }]
            });

    win.show(button);
        return true;
}


function ventana_poup(contidn,idlink,textbtn){

            var button = Ext.get(idlink);
            var win;

                win = new Ext.Window({
				html        :'<iframe style="WIDTH: 100%; HEIGHT: 100%" src="contenidopoup.php?contidn=' + contidn + '" frameborder="0"></iframe>',  
                layout      : 'fit',
                closeAction :'hide',
                plain       : true,
                modal       : true,
                width       : 500,
                height      : 600,
                closeAction :'hide',
                plain       : true, 
                maskDisabled: false,
                pageY       : 0,
				resizable	: false,
				autoScrol	: false,
				buttons: [{
                    text     : textbtn,
                    handler  : function(){
                        win.hide();
                    }
                }]
            });

    win.show(button);
        return true;
}



function ventana_poup_pago(idlink,textbtn){
var winx;
            var buttonx = Ext.get(idlink);
            
                winx = new Ext.Window({
                autoLoad    : 'pago.php',   
                layout      : 'fit',
                closeAction :'hide',
                plain       : true,
                modal       : true,
                width       : 600,
                height      : 550,
                closeAction :'hide',
                plain       : true, 
                maskDisabled: false,
                pageY       : 0,
				resizable	: false,
				autoScrol	: false,
                buttons: [{
                    text     : textbtn,
                    handler  : function(){
                    winx.hide();
                    }
                }]
            });

    winx.show(buttonx);
        return true;
}


function ventana_poup_productodes(prodidn,idlink,textbtn){

            var button = Ext.get(idlink);
            var win;

                win = new Ext.Window({  
				        html:'<iframe scrolling="no" style="WIDTH: 100%; HEIGHT: 100%" src="descrip_produ.php?prodidn=' + prodidn + '" frameborder="0"></iframe>',
                layout      : 'fit',
                closeAction :'hide',
                plain       : true,
                modal       : true,
                width       : 400,
                height      : 600,
                closeAction :'hide',
                plain       : true, 
                maskDisabled: false,
                pageY       : 0,
				resizable	: false,
				autoScrol	: true,
				buttons: [{
                    text     : textbtn,
                    handler  : function(){
                        win.hide();
                    }
                }]
            });

    win.show(button);
        return true;
}




