function chngLan(id) {
	location.href="index.aspx?idlan="+id;
}

function res(w) {
	w.resizeTo(w.document.images[0].width + 100,w.document.images[0].height + 150);
	w.focus();
} 

function popup(title,img_name,win_name,w,h,desc) {
	var mystring = "height=" + (h+100) + ",width=" + (w+100) + ",toolbar=no,scrollbars=no,menubar=no,resizable=yes,status=yes";
	OpenWindow=window.open("", win_name, mystring);
	OpenWindow.document.write('<HTML>\n');
	OpenWindow.document.write('<HEAD>\n');
	OpenWindow.document.write('<TITLE>'+title+'</TITLE>\n');
	OpenWindow.document.write('<LINK rel="stylesheet" href="./css/stili.css">\n');
	OpenWindow.document.write('<LINK rel="stylesheet" href="../css/stili.css">\n');
    OpenWindow.document.write('</HEAD>\n');
    OpenWindow.document.write('<BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" marginright="0">\n');
	OpenWindow.document.write('<table align="center" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">\n');
	OpenWindow.document.write('<tr><td valign="middle" align="center">\n');
	OpenWindow.document.write('<img src="'+img_name+'" border="0" name="foto" width="'+w+'" height="'+h+'"">\n');
	OpenWindow.document.write('<\/td><\/tr>\n');
	OpenWindow.document.write('<tr><td valign="middle" align="center" class="textblue">\n');
	OpenWindow.document.write(desc+'\n');
	OpenWindow.document.write('<br><br><\/td><\/tr>\n');
	OpenWindow.document.write('<\/table>\n');
   	OpenWindow.document.write('</BODY>\n');
	OpenWindow.document.write('</HTML>\n');
	OpenWindow.document.close();
}

function isNatural(s){
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) {
			return false;
		}
    }
    return true;
}

function GoDocument(val,idlan) {
	if (val>0)
		var dwlwin = window.open("./download.aspx?idattachment=" + val + "&idlan=" + idlan);
	else
		alert("File non disponibile");
}

