
function zoom(url, w, h) {
    window.open(url, "zoom", "width="+w+",height="+h+" ,toolbar=no, location=no,status=no,menubar=no,scrollbars=no,resizable=no");
}

function show(id, id_image, src_image) {
    document.getElementById(id).style.visibility="visible";
    if( id_image != 'undefined' && src_image != 'undefined' ) {
        document.getElementById(id_image).src=src_image;
    }
}

function hide(id, id_image, src_image) {
    document.getElementById(id).style.visibility="hidden";
    if( id_image != 'undefined' && src_image != 'undefined' ) {
        document.getElementById(id_image).src=src_image;
    }
}

function inviaCommento(form) {    
            
	var post = "id_articolo=" + form.id_articolo.value;
	    post+= "&nome="+ form.nome.value;
	    post+= "&email="+ form.email.value;
	    post+= "&url="+ form.url.value;
	    post+= "&testo="+ form.testo.value;
	    post+= "&captcha="+ form.captcha.value;

	var xmlhttp = newXMLHttpRequest();

	if (xmlhttp!=null) {        
	    xmlhttp.open("POST","/commenti/makeReview.php",true);
	    xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	    xmlhttp.send(post);
	    xmlhttp.onreadystatechange = handleResponse(xmlhttp, resultInviaCommento, ResponseType.html);
	} else {
	    alert("Il tuo browser non supporta XMLHttpRequest")
	}
	//alert(form.id_articolo.value);
}

function resultInviaCommento(XMLResult) {
	alert(XMLResult);
}