/**
 * @author acecchin
 */



function PopUp(url, nome, scorrimento) {
	if (document.getElementById('popup')) PopClose();
	var div = document.createElement('div');
	div.id = 'popup';
	div.className = 'popup';
	div.style.left = ((window.innerWidth ? window.innerWidth : document.body.clientWidth) / 2 - 216)+'px';
	div.style.top = '100px';

	var close = document.createElement('div');
	close.className = 'pop-heading';
	if (location.host.search('www.') > -1) {
		close.innerHTML = '<a href="#" onclick="return PopClose(location.href)" class="close">Chiudi</a>';
	} else {
		close.innerHTML = '<a href="#" onclick="return PopClose(location.href)" class="close">Close</a>';
	}
	div.appendChild(close);

	var iframe = document.createElement('iframe');
	iframe.setAttribute('src', 'http://ascastellina.altervista.org/popup-css/popup-css.html');
	iframe.setAttribute('frameBorder', 0);
	div.appendChild(iframe);
	document.body.appendChild(div);
//	window.open(http://ascastellina.altervista.org/popup-css/popup-css.html, nome, 'width=390,height=530,scrollbars=' + scorrimento + ',resizable=no');
}

function PopClose(url) {
	var div = document.getElementById('popup');
	if (div) div.parentNode.removeChild(div);
	return false;
}

