﻿/*Con este JScript se tiene acceso al metodo AgregarItem(xGETString) para poder llamar
al splash de Cantidades de Items

xGETString: Es el string que se le pasa a la dirección de la página. No incluye el ? al inicio
*/

var _AgregarItem = new Object();

function AgregarItem(xGETString){

    var theBody = jQuery('body')[0];
    
    var splashscreen = document.createElement('div');
    splashscreen.id = 'AgregarItem';
    splashscreen.style.zindex = '200';
	
	var sHTML;
	
	sHTML = '<table style="width: 100%; height: 100%"><tr><td valign="middle" align="center"><iframe src="InterfazAgregarItem.aspx?' + xGETString + '" style="border: 0px" width="500px" height="80px" scrolling="no" frameborder="0" allowtransparency="true"></iframe></td></tr></table>';
	
    splashscreen.innerHTML =  sHTML;
    
    theBody.appendChild(splashscreen);
    
    jQuery("#AgregarItem").dialog({
		height: 80,
		modal: true, 
		draggable: false,
		width: 510,
		closeOnEscape: false,
		zIndex: 3999
	});
    
    //Guardo el div utilizado en el objeto    
    _AgregarItem.frameDiv = splashscreen;
        
}

function CerrarAgregarItem(xError){
    jQuery("#AgregarItem").dialog("destroy");
    jQuery('#AgregarItem').remove();
    
    if(xError!=null)
        setError(xError);
        
}