function PopupImage(imageName, pop_wdt, pop_hgt) { 
  if (document.all) {
    var x = window.screenLeft;
    var y = window.screenTop;
    var w = window.document.body.offsetWidth;
    var h = window.document.body.offsetHeight;
  }else{
    var x = window.screenX;
    var y = window.screenY;
    var w = window.outerWidth;
    var h = window.outerHeight;
  }
    var pop_wdt2 = 0;
    var pop_hgt2 = 0;
    var pop_offset_x = 2*35;
    var pop_offset_y = 2*40;
    var pop_wdt2 = pop_wdt + pop_offset_x;
    var pop_hgt2 = pop_hgt + pop_offset_y;
    var cntx = x + Math.round((w - pop_wdt2) / 2);
    var cnty = y + Math.round((h - pop_hgt2) / 2);
    myWindow = window.open('','portfolio','left='+ cntx +',screenX='+ cntx +',top='+ cnty +',screenY='+ cnty +',width=' + pop_wdt2 +',height=' + pop_hgt2 +',toolbar=0, location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0'); 
    myWindow.document.write("<HTML><HEAD><title>AGRISOLE</title><\/HEAD>");
    myWindow.document.write("<BODY bgcolor='#F0ECE0' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
    myWindow.document.write("<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr>");
    myWindow.document.write("<td align='center' valign='middle'>");
    myWindow.document.write("<a href='javascript:;' onClick='window.close()'><IMG SRC='" + imageName + "' + border='0' alt='Click screen to close'></a>");
    myWindow.document.write("</td></tr></table>");
    myWindow.document.write("<\/BODY><\/HTML>");
    myWindow.window.resizeTo(pop_wdt2, pop_hgt2);
    myWindow.document.close();
    myWindow.focus();
} 
//<a href="javascript:PopupImage('mass_cantone/foto1.jpg',450,337)">

function PopupDown(imageName, pop_wdt, pop_hgt) { 
  if (document.all) {
    var x = window.screenLeft;
    var y = window.screenTop;
    var w = window.document.body.offsetWidth;
    var h = window.document.body.offsetHeight;
  }else{
    var x = window.screenX;
    var y = window.screenY;
    var w = window.outerWidth;
    var h = window.outerHeight;
  }
    var pop_wdt2 = 0;
    var pop_hgt2 = 0;
    var pop_offset_x = 2*35;
    var pop_offset_y = 2*40;
    var pop_wdt2 = pop_wdt + pop_offset_x;
    var pop_hgt2 = pop_hgt + pop_offset_y;
    var cntx = x + Math.round((w - pop_wdt2) / 2);
    var cnty = y + Math.round((h - pop_hgt2) / 2);
    myWindow = window.open('','portfolio','left='+ cntx +',screenX='+ cntx +',top='+ cnty +',screenY='+ cnty +',width=' + pop_wdt2 +',height=' + pop_hgt2 +',toolbar=0, location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0'); 
    myWindow.document.write("<HTML><HEAD><title>AGRISOLE</title><\/HEAD>");
    myWindow.document.write("<BODY bgcolor='#F0ECE0' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>");
    myWindow.document.write("<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0'><tr>");
    myWindow.document.write("<td align='center' valign='middle'>");
    myWindow.document.write("<a href='javascript:;' onClick='window.close()'><IMG SRC='" + imageName + "' + width='" + pop_wdt + "' border='0' alt='Click screen to close'></a>");
    myWindow.document.write("</td></tr></table>");
    myWindow.document.write("<\/BODY><\/HTML>");
    myWindow.window.resizeTo(pop_wdt2, pop_hgt2);
    myWindow.document.close();
    myWindow.focus();
} 

function PopupPage(pageName, pop_wdt, pop_hgt) { 
  if (document.all) {
    var x = window.screenLeft;
    var y = window.screenTop;
    var w = window.document.body.offsetWidth;
    var h = window.document.body.offsetHeight;
  }else{
    var x = window.screenX;
    var y = window.screenY;
    var w = window.outerWidth;
    var h = window.outerHeight;
  }
    var pop_wdt2 = 0;
    var pop_hgt2 = 0;
    var pop_offset_x = 2*0;
    var pop_offset_y = 2*0;
    var pop_wdt2 = pop_wdt + pop_offset_x;
    var pop_hgt2 = pop_hgt + pop_offset_y;
    var cntx = x + Math.round((w - pop_wdt2) / 2);
    var cnty = y + Math.round((h - pop_hgt2) / 2);
    myWindow = window.open(pageName,'page','left='+ cntx +',screenX='+ cntx +',top='+ cnty +',screenY='+ cnty +',width=' + pop_wdt2 +',height=' + pop_hgt2 +',toolbar=0, location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0'); 
    myWindow.focus();
} 
//<a href="javascript:PopupPage('coccaro.htm',450,335);">

function PopupPageNo(pageName, pop_wdt, pop_hgt) { 
  if (document.all) {
    var x = window.screenLeft;
    var y = window.screenTop;
    var w = window.document.body.offsetWidth;
    var h = window.document.body.offsetHeight;
  }else{
    var x = window.screenX;
    var y = window.screenY;
    var w = window.outerWidth;
    var h = window.outerHeight;
  }
    var pop_wdt2 = 0;
    var pop_hgt2 = 0;
    var pop_offset_x = 2*0;
    var pop_offset_y = 2*0;
    var pop_wdt2 = pop_wdt + pop_offset_x;
    var pop_hgt2 = pop_hgt + pop_offset_y;
    var cntx = x + Math.round((w - pop_wdt2) / 2);
    var cnty = y + Math.round((h - pop_hgt2) / 2);
    myWindow = window.open(pageName,'page','left='+ cntx +',screenX='+ cntx +',top='+ cnty +',screenY='+ cnty +',width=' + pop_wdt2 +',height=' + pop_hgt2 +',toolbar=0, location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0'); 
    myWindow.focus();
} 
//<a href="javascript:PopupPage('coccaro.htm',450,335);">

function viewPromo(NomeDiv) {
	for (i=1;i<=2;i++){
		document.getElementById(i).style.visibility = 'hidden';
	}
	document.getElementById(NomeDiv).style.visibility= "visible"; /*per IE 5 / 6 e NN 6*/
	//document.layers["mioLiv"].visibility= "hide"; /*per Netscape 4*/
	//document.all["mioLiv"].style.visibility="visible"; /*per Internet Explorer*/
} 

function chiudiPromo(NomeDiv) { 
	document.getElementById(NomeDiv).style.visibility= "hidden"; /*per IE 5 / 6 e NN 6*/
	//document.layers["mioLiv"].visibility= "hide"; /*per Netscape 4*/
	//document.all["mioLiv"].style.visibility="visible"; /*per Internet Explorer*/
} 

