// fonctions

FuncOL = new Array(); 
function StkFunc(Obj) { 
    FuncOL[FuncOL.length] = Obj; 
} 
     
// Execution des scripts au chargement de la page 
window.onload = function() { 
    for(i=0; i<FuncOL.length; i++) 
        {FuncOL[i]();} 
}

function copyadr()
	{
	  document.getElementById('adr_soc').value = document.getElementById('adres').value;
	  document.getElementById('cp_soc').value = document.getElementById('cp').value;
	  document.getElementById('loc_soc').value = document.getElementById('loc').value;
	  document.getElementById('ps_soc').value = document.getElementById('ps').value;
    }
	
function nbrhoe(nbr)
	{

	for( var i=1; i < 5; i++)
		{

		if(i <= nbr)
			{
			document.getElementById("ressort_" + i).style.visibility='visible';
			document.getElementById("ressort_" + i).style.display='block';							
			}
		else
			{
			document.getElementById("ressort_" + i).style.visibility='hidden';
			document.getElementById("ressort_" + i).style.display='none';	
			}	
		}

	
    }

function ph_aff(ph) 
	{
	document.getElementById('phot_immo').src=ph;
	}
	
function mail(str,dom)
	{ 
	window.location.href="mailto:" + str + "@" + dom; 
   } 
   
function copy_et(val)
	{ 
	document.getElementById("desc_et").value=document.getElementById("desc_"+ val).value; 
   }    

function delph(chp,id)
	{
	window.open('delph.php?oldph='+chp+'&id='+id,'_blank','width=450, height=340');
	}
	
function sel_veer(det)
  {
	  
 

  if(document.getElementById("veer_" + det).checked == true)
  	{
 	document.getElementById("lengte_" + det).disabled = false;
  	document.getElementById("lengte_" + det).disabled = false;
	document.getElementById("dia50_" + det).disabled = false;
	document.getElementById("dia67_" + det).disabled = false;
	document.getElementById("dia95_" + det).disabled = false;
	document.getElementById("dia152_" + det).disabled = false;	
	document.getElementById("windingen_" + det).disabled = false;
	}
  else
  	{
 	document.getElementById("lengte_" + det).disabled = true;
  	document.getElementById("lengte_" + det).disabled = true;
	document.getElementById("dia50_" + det).disabled = true;
	document.getElementById("dia67_" + det).disabled = true;
	document.getElementById("dia95_" + det).disabled = true;
	document.getElementById("dia152_" + det).disabled = true;	
	document.getElementById("windingen_" + det).disabled = true;
	}
  }
	
function affmen(baliseId)
  {
	if(document.getElementById(baliseId).style.visibility == 'visible')
		{
		document.getElementById(baliseId).style.visibility='hidden';
		document.getElementById(baliseId).style.display='none';					
		}
	else
		{
		document.getElementById(baliseId).style.visibility='visible';
		document.getElementById(baliseId).style.display='block';
		}
  }
	
function docswf(fich, pho, width, height)
	{
	document.write('<object id="my_flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=9,0,16,0" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash">');
	document.write('<param name="movie" value="'+fich+'?p='+pho+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed name="my_flash" src="'+fich+'?p='+pho+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" swliveconnect="true" wmode="transparent" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed></object>');
	}	

function pho(txt)
	{
	window.open('pho.php?txt='+txt+'','_blank','width=400, height=150,scrollbars=1');	
	}
	
function pho2(txt)
	{
	window.open('pho2.php?txt='+txt+'','_blank','width=600, height=400,scrollbars=1');	
	}
	
function pho3(txt)
	{
	window.open('pho3.php?ref='+txt+'','_blank','width=600, height=400,scrollbars=1');	
	}
	
function anim_pics(txt)
	{
	window.open('img_anim.php','_blank','width=1250, height=700,scrollbars=1, resizable=1');	
	}
	
	
function delph(id,txt)
	{
	window.open('del.php?sup='+id+'&txt='+txt+'','_blank','width=400, height=300,scrollbars=1');
	} 
	
function delph2(id,txt)
	{
	window.open('del2.php?sup='+id+'&txt='+txt+'','_blank','width=500, height=400,scrollbars=1');
	} 
