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

var nav_IE=document.all;var gwbodywidth;var gwbodyheight;var gwmodule_index=1000;var gwmoduleid;
var gwpopupobj=window.top.window.document;var gwpopupwin=window.top.window;

function GWPopup_Open(gwpopup,gwpopup_url,gwpopup_titre,gwpopup_width,gwpopup_height,gwpopup_img,gwpopup_visible,gwpopup_path)
	{
	if(!gwpopup) {gwpopup="gwpopup";}
	if(!gwpopup_titre) {gwpopup_titre="GW'Popup...";}
	if(gwpopup_width<150) {gwpopup_width=200;} else {gwpopup_width--;}
	if(gwpopup_height<100) {gwpopup_height=150;} else {gwpopup_height--;}
	if(gwpopup_visible!="block" && gwpopup_visible!="none") {gwpopup_visible="block";}
	
	var gwdiv=gwpopupobj.createElement("div");
	gwdiv.id=gwpopup;gwdiv.style.position="absolute";gwdiv.style.display="block";
	if(!gwpopupobj.gwmodule_index) {gwpopupobj.gwmodule_index="32767";}
	gwdiv.style.zIndex=gwpopupobj.gwmodule_index++;gwdiv.onselectstart=new Function("return false");
	gwpopupobj.body.appendChild(gwdiv);
	
	var gwobjpopup=gwpopupobj.getElementById(gwpopup);var GWPopup_objet="";
	
	gwbodywidth=gwpopupwin.innerWidth;gwbodywidth=(gwbodywidth)?gwbodywidth:gwpopupobj.documentElement.offsetWidth;gwbodywidth=(gwbodywidth)?gwbodywidth:gwpopupobj.body.offsetWidth;
	gwbodyheight=gwpopupwin.innerHeight;gwbodyheight=(gwbodyheight)?gwbodyheight:gwpopupobj.documentElement.offsetHeight;gwbodyheight=(gwbodyheight)?gwbodyheight:gwpopupobj.body.offsetHeight;
	
	var gwbodyscrollwidth=gwpopupobj.documentElement.scrollLeft;gwbodyscrollwidth=(gwbodyscrollwidth)?gwbodyscrollwidth:gwpopupobj.body.scrollLeft;
	var gwbodyscrollheight=gwpopupobj.documentElement.scrollTop;gwbodyscrollheight=(gwbodyscrollheight)?gwbodyscrollheight:gwpopupobj.body.scrollTop;
	
	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;left:0px;text-align:left;"><table width="'+(gwpopup_width+2)+'" border="0" cellspacing="0" cellpadding="0"><tr>\n<td width="'
		+(gwpopup_width-76)+'" height="25" background="'+gwpopup_path+'Design/GWPopup_Titre.gif" valign="middle" class="GWPopup_Titre"><div style="width:'+(gwpopup_width-76)
		+'px;height:17px;overflow:hidden;cursor:pointer;-moz-user-select:none;"><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+');GWPopup_MoveInit(\''
		+gwpopup+'\');" 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+'\');GWPopup_MoveInit(\''+gwpopup+'\');" '
		+'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+='<div id="'+gwpopup+'_DivFrame" style="position:absolute;width:'+gwpopup_width+'px;height:'+gwpopup_height+'px;left:0px;"><iframe width="100%" height="100%" '
		+'id="'+gwpopup+'_Frame" name="'+gwpopup+'_Frame" class="GWPopup_Cadre" onload="document.getElementById(\''+gwpopup+'_Loading\').style.display=\'none\';" frameborder="0"'
		+((gwpopup_img!='')?' scrolling="no" marginwidth="0" marginheight="0"':'')+' style="display:'+gwpopup_visible+';"></iframe></div>\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="180" align="left" '
		+'class="GWPopup_Loading">Chargement en cours ...</td></tr></table></td></tr></table>';
	
	GWPopup_objet+='<div id="'+gwpopup+'_Titre" class="GWPopup_TitreMove" onmousedown="GWPopup_MoveInit(\''+gwpopup+'\');" style="position:relative;width:'+(gwpopup_width-60)
		+'px;"></div></div>';
	
	GWModule_Object("hide",gwpopup_path);
	gwobjpopup.innerHTML=GWPopup_objet;
	gwobjpopup.style.width=(gwpopup_width+8)+'px';gwobjpopup.style.height=((gwpopup_visible=="block")?(gwpopup_height+32):30)+'px';
	
	gwobjpopup.style.left=gwbodyscrollwidth+((gwbodywidth-gwpopup_width-10)/2)+'px';
	gwobjpopup.style.top=gwbodyscrollheight+((gwbodyheight-gwpopup_height)/2)+'px';
	
	if(nav_IE) {gwpopupobj.frames[gwpopup+'_Frame'].location.href=gwpopup_url;}
	else {gwpopupobj.getElementById(gwpopup+'_Frame').contentDocument.location.href=gwpopup_url+'?'+(new Date()).getTime();}
	
	GWModule_MoveStart(gwpopup);
	}

function GWPopup_Close(gwpopup)
	{gwpopupobj.getElementById(gwpopup).parentNode.removeChild(gwpopupobj.getElementById(gwpopup));GWModule_Object("show","");}

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

function GWPopup_MoveInit(gwpopup)
	{gwpopupobj.gwmoduleid=gwpopup;gwpopupobj.getElementById(gwpopup).style.zIndex=gwpopupobj.gwmodule_index++;}

function GWModule_MoveStart(gwid)
	{
	if(nav_IE) {gwpopupobj.getElementById(gwid).onmousedown=GWModule_MoveGo;}
	else {gwpopupobj.getElementById(gwid).addEventListener("mousedown",GWModule_MoveGo,false);}
	}

function GWModule_MoveGo(e)
	{
	if(nav_IE) {gwpopupwin.lastX=window.top.event.clientX;gwpopupwin.lastY=window.top.event.clientY;gwpopupobj.onmousemove=GWModule_MoveOn;gwpopupobj.onmouseup=GWModule_MoveOff;}
	else {gwpopupwin.lastX=e.clientX;gwpopupwin.lastY=e.clientY;gwpopupwin.onmousemove=GWModule_MoveOn;gwpopupwin.onmouseup=GWModule_MoveOff;}
	}

function GWModule_MoveOn(e)
	{
	var ds_mv=gwpopupobj.getElementById(gwpopupobj.gwmoduleid).style;
	
	if(nav_IE)
		{var x=window.top.event.clientX-gwpopupwin.lastX;var y=window.top.event.clientY-gwpopupwin.lastY;gwpopupwin.lastX=window.top.event.clientX;gwpopupwin.lastY=window.top.event.clientY;}
	else {var x=e.clientX-gwpopupwin.lastX;var y=e.clientY-gwpopupwin.lastY;gwpopupwin.lastX=e.clientX;gwpopupwin.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 GWModule_MoveOff(e)
	{if(nav_IE) {gwpopupobj.onmousemove=null;} else {gwpopupwin.onmousemove=null;}}

function GWModule_Object(gwview,gwpath)
	{
	var gwobj=new Array("OBJECT","EMBED","APPLET");var gwobjhtml=null;var gwobjid="";var gwframeobjid;
	
	for(i=0;i<gwobj.length;i++)
		{
		gwobjhtml=gwpopupobj.body.getElementsByTagName(gwobj[i]);
		
		for(j=0;j<gwobjhtml.length;j++)
			{
			gwobjid=gwobjhtml.item(j).getAttribute("id");gwframeobjid=gwpopupobj.getElementById(gwobjid);
			
			if(gwview=="hide" && gwobjid) {GWModule_ObjectAlert(gwobjid,gwpath,gwpopupobj);gwframeobjid.style.visibility="hidden";}
			else if(gwobjid) {gwframeobjid.style.visibility="visible";gwpopupobj.body.removeChild(gwpopupobj.getElementById(gwobjid+"_DIV"));}
			}
		}
		
	if(gwpopupwin.frames.length>0) {GWModule_ObjectFrame(gwpopupwin.frames,gwview,gwpath);}
	}

function GWModule_ObjectFrame(gwdocument,gwview,gwpath)
	{
	var k=0;
	
	while(k<gwdocument.length)
		{
		var gwobj=new Array("OBJECT","EMBED","APPLET");var gwobjhtml=null;var gwobjid="";var gwframeobjid;var gwframecontent=gwdocument[k].window.document;
		
		for(i=0;i<gwobj.length;i++)
			{
			gwobjhtml=gwframecontent.body.getElementsByTagName(gwobj[i]);
			
			for(j=0;j<gwobjhtml.length;j++)
				{
				gwobjid=gwobjhtml.item(j).getAttribute("id");gwframeobjid=gwframecontent.getElementById(gwobjid);
				
				if(gwview=="hide" && gwobjid) {GWModule_ObjectAlert(gwobjid,gwpath,gwframecontent);gwframeobjid.style.visibility="hidden";}
				else if(gwobjid) {gwframeobjid.style.visibility="visible";gwframecontent.body.removeChild(gwframecontent.getElementById(gwobjid+"_DIV"));}
				}
			}
		
		if(gwdocument[k].frames.length>0) {GWModule_ObjectFrame(gwdocument[k].frames,gwview);}
		k++
		}
	}

function GWModule_ObjectAlert(gwid,gwpath,gwwindow)
	{
	var gwposleft=gwpostop=0;var gwobjpos=gwwindow.getElementById(gwid);var gwobjet=gwobjpos;
	
	if(gwobjpos.offsetParent) {do {gwposleft+=gwobjpos.offsetLeft;gwpostop+=gwobjpos.offsetTop;} while (gwobjpos=gwobjpos.offsetParent);}
	
	var gwdiv=gwwindow.createElement("div");gwdiv.id=gwid+"_DIV";gwdiv.style.position="absolute";gwdiv.style.top=gwpostop+"px";gwdiv.style.left=gwposleft+"px";
	gwdiv.style.width=parseInt(gwobjet.width)+"px";gwdiv.style.height=parseInt(gwobjet.height)+"px";
	
	var gwobjetalert="<div style='width:"+gwobjet.width+"px;height:"+gwobjet.height+"px;' class='GWModule_AlertObject'>";
	
	if(gwobjet.height>90)
		{
		gwobjetalert+="<table border='0' align='left' cellpadding='0' cellspacing='0'><tr><td align='center' valign='middle' width='"+gwobjet.width+"' height='"+gwobjet.height+"'>\n"
			+"<table width='75%' border='0' cellpadding='0' cellspacing='0'>\n<tr><td height='60' valign='top' align='center'><img src='"+gwpath+"Design/GWModule_Error_BW.gif' "
			+"width='50' height='50' border='0' alt='' title='' /></td></tr>\n<tr><td align='center'><i>Cet El&eacute;ment multim&eacute;dia a &eacute;t&eacute; d&eacute;sactiv&eacute; "
			+"pour assurer une totale compatibilit&eacute; avec le Popup que vous venez d'ouvrir ...</i></td></tr>\n</table></td></tr></table>";
		}
	
	gwobjetalert+="</div>";gwdiv.innerHTML=gwobjetalert;gwwindow.body.appendChild(gwdiv);
	}
//]]>
