// JavaScript Document
function chiamaBlockUI() {
	var str='';
	str += '<div style="padding:13px 13px 0 44px; z-index:2000; position:relative;" id="form_contenitor">';
	str += '	<img src="img/x.png" style="float:right; cursor:pointer; position:relative;" id="chiudi_blockui">';
	str += '	<div style="margin-top:33px;">';
	str += '		<span style="font-size:16px; font-weight:bold;">Iscriviti alla Newsletter delle Shunga per essere informato sugli eventi</span>';
	if ((jQuery.browser.msie) && (parseInt(jQuery.browser.version) < 7)) {
		str += '<div class="formbg" style="position:relative; z-index:1051; background:url(img/form_campi_top.gif) no-repeat; width:680px; height:70px; margin-top:40px;">'
	} else {
		str += '<div class="formbg" style="position:relative; z-index:1051; background:url(img/form_campi_top.png) no-repeat; width:680px; height:70px; margin-top:40px;">';
	}
	str += '		<div style="z-index:2500; position:relative; padding:8px 0 0 45px; font-size:0px;"><input type="text" name="nome" style="width:136px; height:21px; border:none; margin:0px; padding:0;" /><input type="text" name="cognome" style="border:none; margin:0px; padding:0; margin-left:112px; width:136px; height:21px;" /><input type="text" name="email" style="width:136px; height:21px; border:none; margin:0px; padding:0; margin-left:90px;" /></div>';
	str += '	</div>';
	str += '	<a href="docs/privacy.pdf" target="_blank"><img src="img/form_privacy.png" style="border:0;" class="fix"></a>';
	str += '	<div style="background:url(img/form_accetta.png) no-repeat; width:220px; height:26px;" class="fix"><input type="radio" name="privacy" value="1" style="margin:15px 0 0 50px;"><input type="radio" name="privacy" value="0" style="margin:15px 0 0 103px;"></div>';
	str += '	<div id="form_errori" style="margin-top:20px; color:#e20000;">&nbsp;</div>';
	str += '	<div style="float:right;position:relative; z-index:2500;"><img src="img/form_invia_OFF.png" class="hover fix" id="invia"></div>';
	str += '	<div class="clear"></div>';
	str += '</div>';
	
	
		
	
	//str += '<div class="clear"><!-- --></div>';
	//str += '</div>';
	$.blockUI({ 
		css: { 
			border: 'none', 
			background: 'url(img/info_box.png) no-repeat',
			backgroundColor: 'transparent', 
			color: '#4b393e',
			cursor: 'default',
			margin:'0 auto',
			marginTop: '285px',
			width: '839px',
			height: '289px',
			left: '50%',
			top: '0px',
			marginLeft: '-420px',
			fontFamily: 'Arial, Helvetica, sans-serif',
			fontSize: '12px',
			textAlign: 'left',
			overflow: 'hidden',
			zIndex:2050,
			position: 'absolute'
		},

		message: str,
		overlayCSS: {
			cursor: 'default',
			backgroundColor:'#000', 
			opacity:'0.7', 
			zIndex:1040
			/*sfondo*/
		}
	});
	$(".hover").mouseover(function() {
		$(this).attr("src",$(this).attr("src").replace("_OFF","_ON"));							   
	}).mouseout(function() {
		$(this).attr("src",$(this).attr("src").replace("_ON","_OFF"));							   
	});
	if (jQuery.browser.msie) {
		if (parseInt(jQuery.browser.version) < 7) {
			$('.blockUI').ifixpng();
			$('.fix').ifixpng();
			$(".formbg").ifixpng();
			$("#chiudi_blockui").ifixpng();
		}
	}
	setForm();
	//$('img[@src$=.png]').ifixpng();
	

	$("#chiudi_blockui").click(function() {
		$.unblockUI();
	});
}
