﻿// JScript File

var soset=160;

function sizeTable(oid, oset){
		var tabObj=document.getElementById(oid);
		if (document.all)
			tabObj.style.width=document.body.clientWidth-oset;
		else
			tabObj.style.width=window.innerWidth-oset-17;
	}
	
function newsMouseOver(obje){
    obje.style.backgroundColor='orange';
    obje.style.color='black';
    obje.style.cursor='pointer';
}

function newsMouseOut(obje){
    obje.style.backgroundColor='';
    obje.style.color='';
}

function newsOnClick(oid){
    var tgt='AJAX/newsAjax.aspx?id=' + oid + "&" + new Date()
    ajaxRequest(tgt);
    obj.style.display='block';
}

/*function showImageOnClick(url){
    var tgt='AJAX/showImageAjax.aspx?url=' + url + "&" + new Date()
    ajaxRequest(tgt);
    obj.style.display='block';
}*/

function showImageOnClick(url) {
    var img;
    try {
        img.close();
    }
    catch(E){}
    try {
    
    var img = window.open('','img','width=450,height=450');
    img.document.write("<html><body style=\"margin: 0\"><img src=\"" + url + "\" alt=\"\" /></body></html>")
    img.focus();
    }
    catch (E){
    alert('Per visualizzare le immagini attivare i POP-UP');
    }
}
