button1up = new Image; button1up.src = "img/arco_split_C1R1_0.gif";
button1down = new Image; button1down.src = "img/bis_arco_split_C1R1_0.gif";
button2up = new Image; button2up.src = "img/arco_split_C1R1_1.gif";
button2down = new Image; button2down.src = "img/bis_arco_split_C1R1_1.gif";
button3up = new Image; button3up.src = "img/arco_split_C1R1_2.gif";
button3down = new Image; button3down.src = "img/bis_arco_split_C1R1_2.gif";
button4up = new Image; button4up.src = "img/arco_split_C1R1_3.gif";
button4down = new Image; button4down.src = "img/bis_arco_split_C1R1_3.gif";
button5up = new Image; button5up.src = "img/arco_split_C1R1_4.gif";
button5down = new Image; button5down.src = "img/bis_arco_split_C1R1_4.gif";
button6up = new Image; button6up.src = "img/arco_split_C1R1_5.gif";
button6down = new Image; button6down.src = "img/bis_arco_split_C1R1_5.gif";
button7up = new Image; button7up.src = "img/arco_split_C1R1_6.gif";
button7down = new Image; button7down.src = "img/bis_arco_split_C1R1_6.gif";
button8up = new Image; button8up.src = "img/arco_split_C1R1_7.gif";
button8down = new Image; button8down.src = "img/bis_arco_split_C1R1_7.gif";
cerchioup = new Image; cerchioup.src = "img/arco_split_1.gif";
cerchiodown = new Image; cerchiodown.src = "img/bis_arco_split_1.gif";

function MouseOverRoutine(ButtonName)
{
if (ButtonName=="button1")
{document.button1.src = button1down.src;
 document.cerchio.src = cerchiodown.src;}
else if (ButtonName=="button2")
{document.button2.src = button2down.src;}
else if (ButtonName=="button3")
{document.button3.src = button3down.src;}
else if (ButtonName=="button4")
{document.button4.src = button4down.src;}
else if (ButtonName=="button5")
{document.button5.src = button5down.src;}
else if (ButtonName=="button6")
{document.button6.src = button6down.src;}
else if (ButtonName=="button7")
{document.button7.src = button7down.src;}
else if (ButtonName=="button8")
{document.button8.src = button8down.src;
 document.cerchio.src = cerchiodown.src;}
}
function MouseOutRoutine(ButtonName)
{
if (ButtonName=="button1")
{document.button1.src = button1up.src;
 document.cerchio.src = cerchioup.src;}
else if (ButtonName=="button2")
{document.button2.src = button2up.src;}
else if (ButtonName=="button3")
{document.button3.src = button3up.src;}
else if (ButtonName=="button4")
{document.button4.src = button4up.src;}
else if (ButtonName=="button5")
{document.button5.src = button5up.src;}
else if (ButtonName=="button6")
{document.button6.src = button6up.src;}
else if (ButtonName=="button7")
{document.button7.src = button7up.src;}
else if (ButtonName=="button8")
{document.button8.src = button8up.src;
 document.cerchio.src = cerchioup.src;}
}

function confirmSubmit()
{
	var agree=confirm("Vuoi VERAMENTE cancellare?");
	if (agree)
	return true ;
	else
	return false ;
}
function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else {
    if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      myWidth = document.documentElement.clientWidth;
      myHeight = document.documentElement.clientHeight;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
      }
    }
  }
  if (myWidth > 800 || myHeight > 600)
    window.alert( 'Questo sito è ottimizzato per una rizoluzione di 800x600');
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function get_coords() {
  var args = get_coords.arguments;
  var page_x, page_y, mouse_x, mouse_y, x, y, width, height;
  var oggetto = args[0];

  width = MM_findObj(args[0]).width;
  height = MM_findObj(args[0]).height;
  page_x = MM_findObj(args[0]).offsetLeft;
  page_y = MM_findObj(args[0]).offsetTop;
  mouse_x = event.x;
  mouse_y = event.y;
  x = mouse_x - page_x;
  y = mouse_y - page_y;
  window.document.form_chiesa.chiesa_x.value=x;
  window.document.form_chiesa.chiesa_y.value=y;
  
  window.status = "x="+x+" y="+y+" page_x="+page_x+" page_y="+page_y+" mouse_x="+mouse_x+" mouse_y="+mouse_y+" height="+height+" width="+width;
}

