//SIMPLEMODAL

function SimpleModalOpen(url, height, width)
{
	
		var mask = document.createElement('div'),
			eDiv = document.createElement('div');
		
		$(mask).attr('id','maskModal');
		$(eDiv).attr('id','divModal');
		
		//FONDO		
		$(document.body).append(mask).append(eDiv);
		$(mask).addClass('_simpleModalMask').
		css({
			'position':'fixed',
			'top':'0px',
			'left':'0px',
			//'width':$(document).width() + 'px',
			//'height':$(document).height() + 'px',
			'width':'100%',
			'height':'100%',
			'margin':'0px',
			'padding':'0px',
			'background-color':'#CCCCCC',
			'opacity':0.8,
                        'z-index':'500'
		});
		
		
		//CONTENEDOR
		$(eDiv).addClass('_simpleModal').
		css({
			'height':height + 'px',
			'width':width + 'px',
			'padding':'0px',
			'margin':'0px',
			'border':'1px solid #999999',
			'position':'fixed',
			'background-color':'#FFF',
			'left': '50%',
			'top': '50%',
			'margin-top': -1*(height/2)+'px',
			'margin-left': -1*(width/2)+'px',
                        'z-index':'600'
		}).
		
		
		//IFRAME
		append("<iframe frameborder='0'></iframe>");
		
		//URL AL IFRAME
		$('iframe:first', eDiv).attr('src',url).
		css({
			'height':'100%',
			'width':'100%',
			'background-color':'#FFFFFF',
			'border':'none'
			//'overflow':'hidden'
		});

}


function SimpleModalClose(){
		parent.$("#maskModal").remove();
		parent.$("#divModal").remove();
}