function conferma( ) {
	var agree=confirm( "Sei sicuro ?" );
	if (agree)
		return true ;
	else
		return false ;
}

function popUp(url, label, top, left, width, height, scroll) {
	window.open(url, label, 'width='+width+',height='+height+',top='+top+',left='+left+',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars='+scroll+',resizable=no');
}

function createRequestObject() { 
    var ro; 
    var browser = navigator.appName; 
    if(browser == "Microsoft Internet Explorer"){ 
        ro = new ActiveXObject("Microsoft.XMLHTTP"); 
    }else{ 
        ro = new XMLHttpRequest(); 
    } 
    return ro; 
} 

Array.prototype.inArray = function (value)
// Returns true if the passed value is found in the
// array.  Returns false if it is not.
{
	var i;
	for (i=0; i < this.length; i++) {
		// Matches identical (===), not just similar (==).
		if (this[i] === value) {
			return true;
		}
	}
	return false;
};


String.prototype.parseJSON = function () {
    try {
        return (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(this)) &&
            eval('(' + this + ')');
    } catch (e) {
        return false;
    }
};

function check( field ) {
	e = document.getElementsByName(field);
	for (i = 0; i < e.length; i++) {
		if(e[i].checked == true) e[i].checked = false
		else e[i].checked = true;
	}
}

window.onload = function() {
    var links = document.getElementsByTagName('a');
    for (var i=0;i < links.length;i++) {
        if (links[i].className == 'blank') {
            links[i].onclick = function() {
                window.open(this.href);
                return false;
            };
        }
    }
};