
	var ns = (navigator.appName=="Netscape" && parseInt(navigator.appVersion)>=4)?true:false
	var ie = (navigator.appName=="Microsoft Internet Explorer" && parseInt(navigator.appVersion)>=4)?true:false
	
	var ns6 = (document.getElementById&&!document.all)

	var safari = new String(navigator.appVersion);
	var expr=/safari/gi;
	Saf = safari.search(expr);

	var navigsaf = (Saf!=-1)?true:false;

	


function getLayer(name) {
	
  if (ie ) {  
    return eval('document.all.' + name);
  }
	if (ns6) {
		return document.getElementById(name);
	}
  return null;
  
}



function setBorder(swirlTarget) {		
		/*var windowWidth = 0;
		if (typeof(window.innerWidth) == 'number') {
			windowWidth = window.innerWidth;
		}
		else {
			if (document.documentElement && document.documentElement.clientWidth) {
				windowWidth = document.documentElement.clientWidth;
			}
			else {
				if (document.body && document.body.clientWidth) {
					windowWidth = document.body.clientWidth;
				}
			}
		}
		leftBorder1 = getLayer('leftBorder');
		rightBorder1 = getLayer('rightBorder');
		
		
		
		
		
		leftWidth = (windowWidth-1000)/2;
		leftBorder1.style.width=leftWidth+"px";
		rightBorder1.style.width=leftWidth+"px";	
		
		leftBorder1.style.visibility="visible";
		
		rightBorder1.style.visibility="visible";*/
		
		main1 = getLayer('main');
		main1.style.visibility="visible";
		
		gauche1 = getLayer('colonne_gauche');
		droite1 = getLayer('colonne_droite');
		contact1 = getLayer('contactez_nous');
		footer1 = getLayer('footer');
		
		swirl1= getLayer('swirl_gauche');
		//alert(swirlTarget);
		video1 = getLayer(swirlTarget);
		
		
		//main.style.top = 100 +'px';
		
		if(gauche1.offsetHeight < droite1.offsetHeight) {
			gauche1.style.height=droite1.offsetHeight+"px";
			droite1.style.height = droite1.offsetHeight + contact1.offsetHeight + "px";
			contact1.style.top=main1.offsetHeight-contact1.offsetHeight+"px";
			footer1.style.top=contact1.offsetTop-8+"px";	
		}
		
		if(gauche1.offsetHeight > droite1.offsetHeight) {
			gauche1.style.height = gauche1.offsetHeight + footer1.offsetHeight + "px";
			footer1.style.top=gauche1.offsetHeight-footer1.offsetHeight+"px";
			droite1.style.height=gauche1.offsetHeight + footer1.offsetHeight+"px";			
			contact1.style.top=footer1.offsetTop-8+"px";				

		}
		
		
		swirl1.style.top = video1.offsetTop + "px";
		//swirl.style.display = 'block';
		//main.style.height = droite.offsetHeight+ "px";
		//swirl.style.left = -100+ "px";
		//alert(swirl.offsetTop);
		//alert(main.offsetHeight);
			
		
		
		//alert(contact.offsetTop);
		
		//alert(contact.offsetHeight);
		
		//alert('allo');
			
		//return windowWidth;
		
	}
	
	
	
	function manageDiv(divTarget) {		
		divTarget1 = getLayer(divTarget);
		divTarget1.style.display="none";	
	}
	
	function hidePhoto() {
		div5 = getLayer('espacephoto');
		div6 = getLayer('texte');
		document.getElementById("espacephoto").style.display="none";   
		document.getElementById("texte").style.marginLeft="716px";
		if(div6.offsetHeight > div5.offsetHeight) {
			div6.style.height = "510px";
			//document.getElementById("texte").style.height="510px";
		}
	}
	function showPhoto() {
		document.getElementById("espacephoto").style.display="block";   
		document.getElementById("texte").style.marginLeft="0px";
		
	}
	
	function showDiv(el){
		
	el = el+'';
	
	if(document.getElementById(el).style.display == 'block') {
		document.getElementById(el).style.display = 'none'; 
	} else  {
		document.getElementById(el).style.display = 'block'; 
	}
	
}

