// JavaScript Document
/*
CSS Browser Selector v0.2.7
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}();


// page height

  function getHeight(){
	
		var divH 	= document.getElementById('dynamicRight').offsetHeight;
		divH = divH-2;
		document.getElementById('dynamicLeft').style.height = divH+"px";

		var divHC 	= document.getElementById('headerContainer').offsetHeight;
		
		var mainCont = divH + divHC;

		document.getElementById('wraper').style.height = mainCont+"px";
	}
	
	function getHeight3(){
	
		var divH 	= document.getElementById('dynamicRight').offsetHeight;
		divH = divH;
		document.getElementById('bodySiamo').style.height = divH+"px";

		var divHC 	= document.getElementById('headerContainer').offsetHeight;
		
		var mainCont = divH + divHC;

		document.getElementById('wraper').style.height = mainCont+"px";

	}
	
	function getHeight2(){
		var divH_B 	= document.getElementById('dynamicPage').offsetHeight;
		var divH_R 	= document.getElementById('dynamicRight').offsetHeight;
		if(divH_R-17 > divH_B){
			divH = divH_R;
			divH = divH -2;
		}
		else{
			divH = divH_B;
			divH = divH +50;
		}
		document.getElementById('dynamicLeft').style.height = divH+"px";
		document.getElementById('dynamicRight').style.height = divH+"px";
		
		var divHC 	= document.getElementById('headerContainer').offsetHeight;
		
		var mainCont = divH + divHC;

		document.getElementById('wraper').style.height = mainCont+"px";

	}

	function getContattaci(){
		var divH 	= document.getElementById('dynamicRight').offsetHeight;
		divH = divH +100;
		
		document.getElementById('bodyContattaci').style.height = divH+"px";

		var divHC 	= document.getElementById('headerContainer').offsetHeight;
		
		var mainCont = divH + divHC;

		document.getElementById('wraper').style.height = mainCont+"px";

	}
	
	function getHeightDove(){
		var divH 	= document.getElementById('dynamicRight').offsetHeight;
		divH = divH +100;
		
		document.getElementById('bodyDoveSiamo').style.height = divH+"px";

		var divHC 	= document.getElementById('headerContainer').offsetHeight;
		
		var mainCont = divH + divHC;

		document.getElementById('wraper').style.height = mainCont+"px";

	}

	function getHeightDoveSiamo(){
		var divH_B 	= document.getElementById('siamoContents').offsetHeight;
		var divH_R 	= document.getElementById('dynamicRight').offsetHeight;
		if(divH_R > divH_B){
			divH = divH_R;
			divH = divH ;
			divR = divH -2;
		}
		else{
			divH = divH_B;
			divH = divH +50;
			divR = divH -2;
		}
		document.getElementById('siamoContents').style.height = divH+"px";
		document.getElementById('dynamicRight').style.height = divR+"px";

		var divHC 	= document.getElementById('headerContainer').offsetHeight;
		
		var mainCont = divH + divHC;

		document.getElementById('wraper').style.height = mainCont+"px";

	}
	
// left menu

function dropMenu(id, imageId){
	if(document.getElementById(id).style.display == 'none'){
		document.getElementById(id).style.display = 'block';
		document.getElementById(imageId).src= 'images/headers/arrow_down.gif';
	}
	else if(document.getElementById(id).style.display == 'block'){
		document.getElementById(id).style.display = 'none';
		document.getElementById(imageId).src= 'images/headers/arrow.gif';
	}
}


