







function principale(){

    var framePrincipale = document.getElementById('principale');


    framePrincipale.location.href='tutti_prodotti.htm';
}


function initImage(imageId) {
	
	image = document.getElementById(imageId);
	//setOpacity(image, 0);
        //image.style.visibility = "visible";
	//fadeIn(imageId,0);
}

function fadeIn(objId,opacity) {
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity <= 100) {
			setOpacity(obj, opacity);
			opacity += 5;
			window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
		}
	}
}

function setOpacity(obj, opacity) {
	opacity = (opacity == 100)?99.999:opacity;
	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = opacity/100;
	// Older Mozilla and Firefox
	obj.style.MozOpacity = opacity/100;
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = opacity/100;
}


function runSlideShow(obj){
   //if (document.all){
      obj.style.filter="blendTrans(duration=2)"
      obj.style.filter="blendTrans(duration=crossFadeDuration)"
      obj.filters.blendTrans.Apply()      
   //}
   
   //if (document.all){
      obj.filters.blendTrans.Play()
   //}
   
}







  function nascondiTab(){
    var tb1 = document.getElementById("tabella1");
    tb1.style.display = 'none';
    var tb2 = document.getElementById("tabella2");
    tb2.style.display = 'none';
    var tb3 = document.getElementById("tabella3");
    tb3.style.display = 'none';
    var tb4 = document.getElementById("tabella4");
    tb4.style.display = 'none';
    var tb5 = document.getElementById("tabella5");
    tb5.style.display = 'none';
    var tb6 = document.getElementById("tabella6");
    tb6.style.display = 'none';

  }

  function nascondi(indice){
    var obj = document.getElementById(indice);
    obj.style.display = 'none';
  }

  function visualizza(ind){
    var obj = document.getElementById(ind);
    obj.style.display = 'block';
  }


  function checkOff(){
    checkbot1=0;
    checkbot2=0;
    checkbot3=0;
    checkbot4=0;
    checkbot5=0;
    checkbot6=0;
  }



 function bgOff(){
    if(checkbot1==1){
      var bot=document.getElementById('bot1');
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBot.JPG)';
    }
    if(checkbot2==1){
      var bot=document.getElementById("bot2");
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBot.JPG)';
    }
    if(checkbot3==1){ 
      var bot=document.getElementById("bot3");
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBot.JPG)';
    }if(checkbot4==1){
      var bot=document.getElementById("bot4");
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBot.JPG)';
    }if(checkbot5==1){
      var bot=document.getElementById("bot5");
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBot.JPG)';
    }if(checkbot6==1){
      var bot=document.getElementById("bot6");
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBot.JPG)';
    }
  }


  function visualizza1(){
      bgOff();
      var bot=document.getElementById('bot1');
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBotOn.JPG)';
      checkOff();
      checkbot1=1;
      
  }
  function visualizza2(){
      bgOff();
      var bot=document.getElementById('bot2');
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBotOn.JPG)';
      checkOff();
      checkbot2=1;
  }
  function visualizza3(){
      bgOff();
      var bot=document.getElementById('bot3');
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBotOn.JPG)';
      checkOff();
      checkbot3=1;
  }
  function visualizza4(){
      bgOff();
      var bot=document.getElementById('bot4');
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBotOn.JPG)';
      checkOff();
      checkbot4=1;   
      
  }
  function visualizza5(){
      /*nascondiTab();
      peOff();
      var tbl=document.getElementById('tabella5');
      tbl.style.display = 'block';
*/      
      bgOff();
      var bot=document.getElementById('bot5');
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBotOn.JPG)';
      
      checkOff();
      checkbot5=1;
  }
  function visualizza6(){
      /*nascondiTab();
      aOff();
      var tbl=document.getElementById('tabella6');
      tbl.style.display = 'block';*/
      bgOff();
      var bot=document.getElementById('bot6');
      bot.style.backgroundImage='url(sito2006/home/sfondo/sfondoBotOn.JPG)';
      checkOff();
      checkbot6=1;
  }


  function colore() 
  {
    document.getElementById("IMM").style.filter = false;
  }
  
  function opaco()
  {
    document.getElementById("IMM").style.filter = "gray()";
  }

  function selPe(ind,num){
    peoff();
    ind.style.background='#C0C0C0';
    if(num==1)
      pe1=1;
    if(num==2)
      pe2=1;
    if(num==3)
      pe3=1;
    if(num==4)
      pe4=1;
    if(num==5)
      pe5=1;
  }

  function peoff(){
    pe1=0;
    pe2=0;
    pe3=0;
    pe4=0;
    pe5=0;
    var obj1=document.getElementById('pe1');
    obj1.style.background='none';
    var obj2=document.getElementById('pe2');
    obj2.style.background='none';
    var obj3=document.getElementById('pe3');
    obj3.style.background='none';
    var obj4=document.getElementById('pe4');
    obj4.style.background='none';
    var obj5=document.getElementById('pe5');
    obj5.style.background='none';
  }



function selVe(ind,num){
    veOff();
    ind.style.background='#C0C0C0';
    if(num==1)
      ve1=1;
    if(num==2)
      ve2=1;
    if(num==3)
      ve3=1;
    if(num==4)
      ve4=1;
    
  }

  function veOff(){
    ve1=0;
    ve2=0;
    ve3=0;
    ve4=0;
    var obj1=document.getElementById('ve1');
    obj1.style.background='none';
    var obj2=document.getElementById('ve2');
    obj2.style.background='none';
    var obj3=document.getElementById('ve3');
    obj3.style.background='none';
    var obj4=document.getElementById('ve4');
    obj4.style.background='none';
    
  }

function selSp(ind,num){
    spOff();
    ind.style.background='#C0C0C0';
    if(num==1)
      sp1=1;
    if(num==2)
      sp2=1;
    
  }

  function spOff(){
    sp1=0;
    sp2=0;
   
    var obj1=document.getElementById('sp1');
    obj1.style.background='none';
    var obj2=document.getElementById('sp2');
    obj2.style.background='none';
    
  }


 function selSe(ind,num){
    seOff();
    ind.style.background='#C0C0C0';
    if(num==1)
      se1=1;
    if(num==2)
      se2=1;
    if(num==3)
      se3=1;
    if(num==4)
      se4=1;
    if(num==5)
      se5=1;
    if(num==6)
      se6=1;
  }

  function seOff(){
    se1=0;
    var obj1=document.getElementById('se1');
    obj1.style.background='none';
    se2=0;
    var obj2=document.getElementById('se2');
    obj2.style.background='none';
    se3=0;
    var obj3=document.getElementById('se3');
    obj3.style.background='none';
    se4=0;
    var obj4=document.getElementById('se4');
    obj4.style.background='none';
    se5=0;
    var obj5=document.getElementById('se5');
    obj5.style.background='none';
    se6=0;
    var obj6=document.getElementById('se6');
    obj6.style.background='none';
     
  }


 function selPe(ind,num){
    peOff();
    ind.style.background='#C0C0C0';
    if(num==1)
      pe1=1;
    if(num==2)
      pe2=1;
    if(num==3)
      pe3=1;
    if(num==4)
      pe4=1;
    if(num==5)
      pe5=1;
    
  }

  function peOff(){
    pe1=0;
    var obj1=document.getElementById('pe1');
    obj1.style.background='none';
    pe2=0;
    var obj2=document.getElementById('pe2');
    obj2.style.background='none';
    pe3=0;
    var obj3=document.getElementById('pe3');
    obj3.style.background='none';
    pe4=0;
    var obj4=document.getElementById('pe4');
    obj4.style.background='none';
    pe5=0;
    var obj5=document.getElementById('pe5');
    obj5.style.background='none';
    
  }

 function selA(ind,num){
    aOff();
    ind.style.background='#C0C0C0';
    if(num==1)
      a1=1;
    if(num==2)
      a2=1;
    if(num==3)
      a3=1;
    if(num==4)
      a4=1;
    if(num==5)
      a5=1;
    if(num==6)
      a6=1; 
    if(num==7)
      a7=1;
  }

  function aOff(){
    a1=0;
    a2=0;
    a3=0;
    a4=0;
    a5=0;
    a6=0;
    a7=0;
    var obj1=document.getElementById('a1');
    obj1.style.background='none';
    var obj2=document.getElementById('a2');
    obj2.style.background='none';
    var obj3=document.getElementById('a3');
    obj3.style.background='none';
    var obj4=document.getElementById('a4');
    obj4.style.background='none';
    var obj5=document.getElementById('a5');
    obj5.style.background='none';
    var obj6=document.getElementById('a6');
    obj6.style.background='none';
    var obj7=document.getElementById('a7');
    obj7.style.background='none';

  }
