// JavaScript Document

	function HideShow(panel)
		{
			var tableDbg;
			var tableTemp;
			
              if (panel == "n4")
				{document.getElementById("white").style.width='876px';}
				else if (panel == "n0")
				{$("white").style.width='876px';
				$("main").style.backgroundImage='url(img/bgsfolio.jpg)';
				}
				else
				{$("white").style.width='418px';}
				
			//if (panel == "1") {
				if ($(panel)!=null) {
					tableTemp = $(panel);
					//tableTemp.style.display='none';
					//segue forzatura ridondante per IE7.....
					$('n1').className='tab_off';
					$('imgn1').src='img/tit_n1.gif';		
					$('n2').className='tab_off';
					$('imgn2').src='img/tit_n2.gif';	
					$('n3').className='tab_off';
					$('imgn3').src='img/tit_n3.gif';
					$('n4').className='tab_off';
					$('imgn4').src='img/tit_n4.gif';
					$('n5').className='tab_off';
					$('imgn5').src='img/tit_n5.gif';
					//tableTemp.style.backgroundImage='url(img/tab_on.png)';
					//tableTemp.style.cursor='default';
					tableTemp.className='tab_on';
					//$('img'+panel).src='img/tit_'+panel+'.png'
					$('img'+panel).src='img/tit_'+panel+'_on.gif';
					
					//$("main").style.backgroundImage='url(img/'+elemento1[aCaso1]+'.jpg)';
					//$("main").style.backgroundImage='url(img/bg'+panel+'.jpg)';
					//alert(elemento1[Math.floor(37 * Math.random())]);
					ajax_showImage('main', 'img/'+elemento1[Math.floor(37 * Math.random())]+'.jpg');
					
				}			
			//}
			
			var div = document.getElementsByTagName("div"); 
			var ii = 1;
			
			for (var i = 0; i < div.length; i++) { 
			    status = div[i].getAttribute("rele"); 
				
				//alert(status);
			    if ( status == "true") { 
					
					//alert('img'+ii);
					
					//alert(div[i].id != panel);
					//alert(panel);
					
					if (div[i].id != panel) {
						
						//alert("casso");
						
						//div[i].style.backgroundImage='url(img/tab_off.png)';
						//div[i].style.cursor='pointer';	
						div[i].className='tab_off';
						//if (ii != panel) {
							$('imgn'+ii).src='img/tit_n'+ii+'.gif';
						//}

					}
					ii++;
				
			        // grab the data 
			    }
			
			
			}
			/*if (panel == "2") {
				if ($("2")!=null) {
					tableTemp = $("2");
					//tableTemp.style.display='none';
					tableTemp.style.backgroundImage='url(img/tab_off.png)'
					$('img2').src='img/tit_azienda.png'
				}
			}
			
			if (panel == "3") {
				if ($("3")!=null) {
					tableTemp = $("3");
					//tableTemp.style.display='none';
					tableTemp.style.backgroundImage='url(img/tab_on.png)'
					$('img3').src='img/tit_mission.png'
				}
			}
			
			if (panel == "4") {
				if ($("3")!=null) {
					tableTemp = $("4");
					//tableTemp.style.display='none';				
					tableTemp.style.backgroundImage='url(img/tab_on.png)'
					$('img4').src='img/tit_portfolio.png'
				}
			}
			
			if (panel == "5") {
				if ($("5")!=null) {
					tableTemp = $("5");
					//tableTemp.style.display='none';
					tableTemp.style.backgroundImage='url(img/tab_on.png)'
					$('img5').src='img/tit_contatto.png'
				}
			}
			
			if ($(panel)!=null) {
				tableDbg=$(panel);
				
				if (tableTemp.style.backgroundImage='url(img/tab_off.png)') {
					tableTemp.style.backgroundImage='url(img/tab_on.png)';
				} else {
					tableTemp.style.backgroundImage='url(img/tab_on.png)';
					$('img'+panel).src='img/tit_contatto_on.png'
				}
			}*/
			
		}
