function console(percorso, larghezza, altezza, titolo){
	fin = window.open("","console","scrollbars=NO");
	fin.document.open();
	fin.moveTo(screen.availWidth/2 - larghezza/2, screen.availHeight/2 - altezza/2)
	fin.resizeTo(larghezza,altezza); 
		documento = "<html><head><title>" + titolo + "</title></head>";
		documento += "<body bgcolor='#D6DFEF' align='center'><img src='" + percorso + "' border='1' align='center'></body></html>";
		fin.document.open()
    fin.document.write(documento) ;
    fin.document.close()
	fin.focus();}
 
function consoleP(id){
	fin = window.open(id,"console","scrollbars=yes,resize=no");
	fin.resizeTo(620,550);
	fin.focus();}

function consolePrint(percorso){
	fin = window.open(percorso, "console", "scrollbars=yes,resize = no");
	fin.resizeTo(450,550)
	fin.focus();
	fin.print();
	}
var bckBG

function Ov2(srcEle) {
bckBG = srcEle.style.backgroundColor
srcEle.style.backgroundColor ="#EEEEEE";
}

function Ou2(srcEle) {
srcEle.style.backgroundColor = bckBG
}

$(document).ready(function(){
  
  $("ul.navigazione li").mouseover( function(){
    if( $(this).children("ul.navigazione_subitem").length != 0 ){
      $(this).children("ul.navigazione_subitem").show()
    }
  })

  $("ul.navigazione li").mouseout( function(){
    if( $(this).children("ul.navigazione_subitem").length != 0 ){
      $(this).children("ul.navigazione_subitem").hide()
    }
  })
  
})

function preventivo(id){

    var r =""
    for(i=0;i<5;i++){
      r += String.fromCharCode( Math.round(Math.random() * (57)) +65 )
    }
  id += "&dummyIE=" + r
  $("#preventivo").load("preventivi/preventivi.asp?" + id, function(response, status, xhr){
//     $("#preventivo").slideDown( function(){
//       $("#preventivo_wrapper").fadeIn()
//     })
    $("#preventivo").show();
    $("#preventivo_wrapper").slideDown()
    
  } )
  
}
