/* EDISYS 2007 | DW SCRIPTS
© DELTA WEB FRANCE | http://www.delta-web.com

V 2.0 b08.09.17 
	- 17/09/2008 : TBT - Maj fonction writePerso

*/


function writeFL (id,src,W,H,WM,pathrp,idr,ids)
{
	document.write("<object id='"+id+"' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0' width='"+W+"' height='"+H+"' align='middle'>");
	document.write("<param name='allowScriptAccess' value='always'>");
	document.write("<param name='wmode' value='"+WM+"'>");
	document.write("<param name='movie' value="+src+">");
	document.write("<param name='movie' value="+src+">");
	document.write("<param name='flashvars' value='idR="+idr+"&idS="+ids+"&pathRP="+pathrp+"'>");
	document.write("<param name='quality' value='high'>");
	document.write("<embed name='"+id+"' src="+src+" flashvars='idR="+idr+"&idS="+ids+"&pathRP="+pathrp+"' allowScriptAccess='always' width='"+W+"' height='"+H+"' wmode='"+WM+"' align='middle' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed>");
	document.write("</object>");
}

function writeFLSPE (id,src,W,H,WM,arg)
{
	document.write("<object id='"+id+"' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0' width='"+W+"' height='"+H+"' align='middle'>");
	document.write("<param name='allowScriptAccess' value='always'>");
	document.write("<param name='wmode' value='"+WM+"'>");
	document.write("<param name='movie' value="+src+">");
	document.write("<param name='movie' value="+src+">");
	document.write("<param name='flashvars' value='arg="+arg+"'>");
	document.write("<param name='quality' value='high'>");
	document.write("<embed name='"+id+"' src="+src+" flashvars='arg="+arg+"' allowScriptAccess='always' width='"+W+"' height='"+H+"' wmode='"+WM+"' align='middle' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed>");
	document.write("</object>");
}

function writeFooter ()
{
	document.write("<a class='top' href='#'>haut de page</a> | EDISYS 2010 ");
}

function ow (url)
{
	window.open(url);
}

function initHide(id)
{
	document.getElementById(id).style.display = "none";
}

hideId = "";

function hideShow(id)
{
	document.getElementById(id).style.display = "block";
	if(hideId)
	{
		document.getElementById(hideId).style.display = "none";
	}
	if(hideId != id)
	{
		hideId = id;
	} else {
		hideId = "";
	}
}

function setUrlInfo(AFF,ETAP,IDR)
{
	document.location = "contact.php?AFF="+AFF+"&ETAP="+ETAP+"&IDR="+IDR+"";
}

function writeContact(id)
{
	//document.getElementById(idRecep).innerHTML = "<p><img src='"+tab_pict[id]+"'></p><p><strong>"
	document.write ("<table border='0'  cellspacing='4' cellpadding='0'>"
		+"<tr><td><img src='"+tab_pict[id]+"'></td></tr>"
		+"<td style='text-align:center;'><strong>"+tab_nom[id]+"</td></tr>"
		+"</table>")
	;
}
function writePerso(id, idRc)
{
	switch(idRc)
	{
		//case 1 : idRecep="ficheEntreprise"; break;
		case 1 : idRecep="ficheContactEntreprise"; break;
		case 2 : idRecep="ficheContactCollectivite"; break;
	}
	//document.getElementById(idRecep).innerHTML = "<p><img src='"+tab_pict[id]+"'></p><p><strong>"
	document.getElementById(idRecep).innerHTML = "<table border='0' width='100%' cellspacing='4' cellpadding='0'><tr><td>"
		+"<img src='"+tab_pict[id]+"'></td>"
		+"<td valign='top'><strong>"
		+tab_nom[id]
		+"</strong><br/>"+tab_poste[id]+"<br/>"
	//+"<p><a href='javascript:setUrlInfo("+idRc+",1,"+id+");'>"+tab_mail[id]+"</a>"
	//+"<br />T : "+tab_tel[id]+"</p>"
	//+"<p>Dept : "+tab_dep[id]+"</p>"
		+"<a href='javascript:setUrlInfo("+idRc+",1,"+id+");'>Cliquer ici pour me contacter</a>"
		+"</td></tr></table>"
	;
}

function writeMailto (nom,dom,suj,mess,lib)
{
	document.write("<a href='mailto:"+nom+"@"+dom+"?subject="+suj+"&body="+mess+"'>"+lib+"</a>");
}

function showPersPict(id)
{
	document.getElementById('persoPict').innerHTML = "<img src='"+tab_pict[id]+"' /><br/><strong>"+tab_nom[id]+"</strong><br/>"+tab_poste[id];
}


function hidePersPict()
{
	document.getElementById('persoPict').innerHTML = "&nbsp;";
}

function hide(id)
{
	document.getElementById(id).style.display = "none";
}

function show(id)
{
	document.getElementById(id).style.display = "block";
}

function position(event){
	var event = event || window.event;
	mouse_x = event.clientX;
	mouse_y = event.clientY;
	if(navigator.appName == 'Microsoft Internet Explorer' )
	{
		y = mouse_y+document.documentElement.scrollTop;
	} else {
		y = mouse_y+window.pageYOffset;
	}
} 
	
function setEleY(id)
{
	document.getElementById(id).style.top = y+"px";
}

document.onclick = position;
