//<![CDATA[
// Copyright (c) GraphicWeb Interactive Solutions

var nav_IE=document.all;var docwidth;var docheight;var gwpopup_move;var gwpopup_index=100;
document.write('<div id="gwpopup" style="position:absolute;" onmousedown="GWPopup_MoveGo(\'gwpopup\');"></div>');

function GWPopup_Show(gwpopup)
	{document.write('<div id="'+gwpopup+'" style="position:absolute;" onmousedown="GWPopup_MoveGo(\''+gwpopup+'\');"></div>');}

function GWPopup_Open(gwpopup,gwpopup_url,gwpopup_titre,gwpopup_width,gwpopup_height,gwpopup_visible,gwpopup_path)
	{
	if(!gwpopup) {gwpopup="gwpopup";}
	if(!gwpopup_titre) {gwpopup_titre="GW'Popup...";}
	if(gwpopup_width<150) {gwpopup_width=200;}
	if(gwpopup_height<100) {gwpopup_height=150;}
	if(gwpopup_visible!="block" && gwpopup_visible!="none") {gwpopup_visible="block";}
	
	var scrollH=0;var scrollW=0;var windowH=0;var windowW=0;
	var ds_pp=document.getElementById(gwpopup);var GWPopup_objet="";
	
	if(document.doctype==null || document.documentElement.clientHeight==0)
		{
		if(window.innerWidth || (document.body.offsetHeight==document.documentElement.offsetHeight && document.body.offsetWidth==document.documentElement.offsetWidth))
			{
			scrollH=document.body.scrollTop;scrollW=document.body.scrollLeft;
			windowH=document.body.clientHeight;windowW=document.body.clientWidth;
			}
		else
			{
			scrollH=document.documentElement.scrollTop;scrollW=document.documentElement.scrollLeft;
			windowH=document.documentElement.clientHeight;windowW=document.documentElement.clientWidth;
			}
		}
	else
		{
		if(document.doctype.publicId.search(/xhtml/i)!=-1)
			{scrollH=document.documentElement.scrollTop;scrollW=document.documentElement.scrollLeft;}
		else {scrollH=document.body.scrollTop;scrollW=document.body.scrollLeft;}
		}
	
	if(window.innerWidth && window.innerHeight) {windowH=window.innerHeight;windowW=window.innerWidth;}
	
	docwidth=scrollW+windowW-(nav_IE?0:17);docheight=scrollH+windowH;
	
	if(nav_IE)
		{
		GWPopup_objet+='<iframe width="'+(gwpopup_width+8)+'" height="'+(gwpopup_height+32)+'" frameborder="0" scrolling="no" '
			+'src="about:blank" style="filter:alpha(opacity=0);position:absolute;top:0px;left:0px;" id="'+gwpopup+'_MasqueIE">'
			+'</iframe><div>';
		}
	
	for(i=0;i<3;i++)
		{
		GWPopup_objet+='<div id="'+gwpopup+'_Ombre['+i+']" style="width:'+gwpopup_width+'px;height:'
			+((gwpopup_visible=="block")?(gwpopup_height+22):20)+'px;top:'+(10-(2*i))+'px;left:'
			+(7-(2*i))+'px;" class="GWPopup_Ombre"></div>';
		}
	
	GWPopup_objet+='<div style="position:absolute;"><table width="'+(gwpopup_width+3)+'" border="0" cellspacing="0" '
		+'cellpadding="0"><tr id="'+gwpopup+'_Titre">\n'
		+'<td width="'+(gwpopup_width-75)+'" height="25" background="'+gwpopup_path+'Design/GWPopup_Titre.gif" valign="middle" '
		+'class="GWPopup_Titre" onmousedown="GWPopup_MoveGo(\''+gwpopup+'\');"><div style="width:'+(gwpopup_width-75)
		+'px;height:15px;overflow:hidden;"><div style="width:1000px;height:15px;">&nbsp;'+gwpopup_titre+'</div></div></td>\n'
		+'<td width="25" height="25" align="left" valign="middle"><img src="'+gwpopup_path+'Design/Puce_Reduct.gif" '
		+'onclick="GWPopup_Reduct(\''+gwpopup+'\','+gwpopup_height+')" width="25" height="25" alt="Enrouler/D&eacute;rouler '
		+'le Popup" title="Enrouler/D&eacute;rouler le Popup" style="cursor:pointer;"></td>\n'
		+'<td width="25" height="25" align="left" valign="middle"><img src="'+gwpopup_path+'Design/Puce_Export.gif" '
		+'onclick="window.open(\''+gwpopup_url+'\');" width="25" height="25" alt="Ouvrir le Popup dans une nouvelle '
		+'fen&ecirc;tre" title="Ouvrir le Popup dans une nouvelle fen&ecirc;tre" style="cursor:pointer;"></td>\n'
		+'<td width="28" height="25" align="left" valign="middle"><img src="'+gwpopup_path+'Design/Puce_Close.gif" '
		+'onclick="GWPopup_Close(\''+gwpopup+'\');" width="28" height="25" alt="Fermer le Popup" title="Fermer le Popup" '
		+'style="cursor:pointer;"></td>\n</tr></table>\n';
	
	GWPopup_objet+='<iframe width="'+gwpopup_width+'" height="'+gwpopup_height+'" id="'+gwpopup+'_Frame" name="'+gwpopup+'_Frame" '
		+'class="GWPopup_Cadre" onload="document.getElementById(\''+gwpopup+'_Loading\').style.display=\'none\';" '
		+'style="display:'+gwpopup_visible+';"></iframe>\n';
	
	GWPopup_objet+='<table id="'+gwpopup+'_Loading" border="0" cellspacing="0" cellpadding="0" class="GWPopup_Cadre" '
		+'style="position:absolute;left:0px;top:25px;'+((gwpopup_visible=='block')?'display:block':'display:none')+';"><tr>\n'
		+'<td width="'+gwpopup_width+'" height="'+gwpopup_height+'" align="center" valign="middle"><table border="0" '
		+'cellspacing="0" cellpadding="0"><tr><td width="20" align="left"><img src="'+gwpopup_path+'Design/GW_Loading.gif" '
		+'border="0"></td>\n<td width="160" align="left" class="GWPopup_Loading">Chargement en cours ...</td></tr>'
		+'</table></td></tr></table></div>';
	
	ds_pp.innerHTML=GWPopup_objet;ds_pp.style.display="block";ds_pp.scrollIntoView();
	ds_pp.style.width=(gwpopup_width+8)+'px';ds_pp.style.height=((gwpopup_visible=="block")?(gwpopup_height+32):30)+'px';
	ds_pp.style.left=((docwidth-gwpopup_width-10)/2)+'px';ds_pp.style.top=((docheight-gwpopup_height)/2)+'px';
	
	if(nav_IE) {frames[gwpopup+'_Frame'].location.href=gwpopup_url;}
	else {document.getElementById(gwpopup+'_Frame').contentDocument.location.href=gwpopup_url;}
	
	GWPopup_Move(gwpopup);
	}

function GWPopup_Close(gwpopup)
	{document.getElementById(gwpopup).style.display="none";}

function GWPopup_Reduct(gwpopup,gwpopup_height)
	{
	var ds_ppfr=document.getElementById(gwpopup+'_Frame').style;
	
	if(ds_ppfr.display=="block") {var gwdisplay="none";var gwheight=20;}
	else {var gwdisplay="block";var gwheight=gwpopup_height+22;}
	
	document.getElementById(gwpopup).style.height=(gwheight+10)+"px";
	if(nav_IE) {document.getElementById(gwpopup+'_MasqueIE').style.height=(gwheight+10)+"px";}
	ds_ppfr.display=gwdisplay;
	for(i=0;i<3;i++) {document.getElementById(gwpopup+'_Ombre['+i+']').style.height=gwheight+"px";}
	}

function GWPopup_MoveGo(gwpopup)
	{
	gwpopup_move=gwpopup;document.getElementById(gwpopup).style.zIndex=gwpopup_index++;
	if(nav_IE) {document.onselectstart=new Function("return false");}
	}

function GWPopup_Move(gwpopup)
	{
 	if(nav_IE) {document.getElementById(gwpopup+'_Titre').onmousedown=GWMove_Begin;}
	else {document.getElementById(gwpopup+'_Titre').addEventListener("mousedown",GWMove_Begin,false);}
	}

function GWMove_Begin(e)
	{
	if(nav_IE)
		{window.lastX=event.clientX;window.lastY=event.clientY;document.onmousemove=GWMove_On;document.onmouseup=GWMove_Off;}
	else {window.lastX=e.clientX;window.lastY=e.clientY;window.onmousemove=GWMove_On;window.onmouseup=GWMove_Off;}
	}

function GWMove_On(e)
	{
	var ds_mv=document.getElementById(gwpopup_move).style;
	
	if(nav_IE)
		{var x=event.clientX-window.lastX;var y=event.clientY-window.lastY;window.lastX=event.clientX;window.lastY=event.clientY;}
	else {var x=e.clientX-window.lastX;var y=e.clientY-window.lastY;window.lastX=e.clientX;window.lastY=e.clientY;}
	
	var xcoord=parseInt(ds_mv.left)+x;var ycoord=parseInt(ds_mv.top)+y;
	ds_mv.left=xcoord+"px";ds_mv.top=ycoord+"px";
	} 

function GWMove_Off(e)
	{if(nav_IE) {document.onmousemove=null;document.onselectstart=new Function("return true");} else {window.onmousemove=null;}}
//]]>
