function controlesaisie(obj,entier,autorise_negatif,limit){val=obj.value;if(!isNaN(val)){if(limit !=null)
if(val>=limit)
val=Math.floor(limit);if(entier==1)
val=Math.round(val);if((val<0)&&(autorise_negatif==0))
val=Math.abs(val);}
else{val=null;}
obj.value=val;if(val==null){obj.value="0";return false;}
else
return true;}
function iFrameHeight(id){var h=0;if(!document.all){h=document.getElementById(id).contentDocument.height;document.getElementById(id).style.height=h+60+'px';} else if(document.all){h=document.frames(id).document.body.scrollHeight;eval("document.all."+id+".style.height=h+60+'px';");}}
function hauteur_iframe(id){var h=0;if(!document.all){h=document.getElementById(id).contentDocument.height;} else if(document.all){h=document.frames(id).document.body.scrollHeight;}
return h+20;}
function iFrameWidth(id){var w=0;if(!document.all){w=document.getElementById(id).contentDocument.width;document.getElementById(id).style.width=w+20+'px';} else if(document.all){w=document.frames(id).document.body.scrollWidth;eval("document.all."+id+".style.width=w+20+'px';");}}
var t_zoom_image=new Array();function zoom_image_over(id,w_min,h_min,w_max,h_max){i=t_zoom_image.length;if(i>0)z=t_zoom_image[i-1]["zindex"]+1;else z=2;document.getElementById("conteneur_"+id).style.zIndex=z;t_zoom_image[i]=new Array();t_zoom_image[i]["id"]=id;t_zoom_image[i]["w_min"]=w_min;t_zoom_image[i]["h_min"]=h_min;t_zoom_image[i]["w_max"]=w_max;t_zoom_image[i]["h_max"]=h_max;t_zoom_image[i]["boucle"]=0;t_zoom_image[i]["zindex"]=z;t_zoom_image[i]["interval"]=setInterval("zoom_image_anim_over("+i+")",20);}
function zoom_image_anim_over(i){t_zoom_image[i]["boucle"]++;w_augmentation=Math.round((t_zoom_image[i]["w_max"]-t_zoom_image[i]["w_min"])/10*t_zoom_image[i]["boucle"]);h_augmentation=Math.round((t_zoom_image[i]["h_max"]-t_zoom_image[i]["h_min"])/10*t_zoom_image[i]["boucle"]);document.getElementById(t_zoom_image[i]["id"]).style.left=(-Math.round(w_augmentation/2))+"px";document.getElementById(t_zoom_image[i]["id"]).style.top=(-Math.round(h_augmentation/2))+"px";document.getElementById(t_zoom_image[i]["id"]).style.width=(t_zoom_image[i]["w_min"]+w_augmentation)+"px";document.getElementById(t_zoom_image[i]["id"]).style.height=(t_zoom_image[i]["h_min"]+h_augmentation)+"px";if(t_zoom_image[i]["boucle"]==10){clearInterval(t_zoom_image[i]["interval"]);}}
function zoom_image_out(){i=t_zoom_image.length-1;clearInterval(t_zoom_image[i]["interval"]);t_zoom_image[i]["interval"]=setInterval("zoom_image_anim_out("+i+")",20);}
function zoom_image_anim_out(i){t_zoom_image[i]["boucle"]--;if(t_zoom_image[i]["boucle"]>0){w_augmentation=Math.round((t_zoom_image[i]["w_max"]-t_zoom_image[i]["w_min"])/10*t_zoom_image[i]["boucle"]);h_augmentation=Math.round((t_zoom_image[i]["h_max"]-t_zoom_image[i]["h_min"])/10*t_zoom_image[i]["boucle"]);document.getElementById(t_zoom_image[i]["id"]).style.left=(-Math.round(w_augmentation/2))+"px";document.getElementById(t_zoom_image[i]["id"]).style.top=(-Math.round(h_augmentation/2))+"px";document.getElementById(t_zoom_image[i]["id"]).style.width=(t_zoom_image[i]["w_min"]+w_augmentation)+"px";document.getElementById(t_zoom_image[i]["id"]).style.height=(t_zoom_image[i]["h_min"]+h_augmentation)+"px";}
else{clearInterval(t_zoom_image[i]["interval"]);document.getElementById("conteneur_"+t_zoom_image[i]["id"]).style.zIndex=1;document.getElementById(t_zoom_image[i]["id"]).style.left="0px";document.getElementById(t_zoom_image[i]["id"]).style.top="0px";document.getElementById(t_zoom_image[i]["id"]).style.width=t_zoom_image[i]["w_min"]+"px";document.getElementById(t_zoom_image[i]["id"]).style.height=t_zoom_image[i]["h_min"]+"px";}}
var obj_lien="";var obj_fenetre="";var obj_contenu="";function set_lien(lien,fenetre,contenu){obj_lien.value=lien;obj_fenetre.value=fenetre;obj_contenu.value=contenu;}
function editer_lien(lien,fenetre,contenu){obj_lien=lien;obj_fenetre=fenetre;obj_contenu=contenu;if(obj_fenetre.value==0)fenetre="false";else fenetre="true";affiche_popup('../admin/page_intranet_pop_lien.php?lien='+obj_lien.value+'&fenetre='+fenetre+'&contenu='+obj_contenu.value);}
function set_date(d,chemin,envoi,forme,id){if(id==1){elem=document.getElementById(chemin);elem.value=d;}
else
eval(chemin+".value='"+d+"';");if(envoi==1) eval("document."+forme+".submit();")}
function pop_date(d,chemin,envoi,forme,id){MM_openBrWindow('calendrier.php?date_origine='+d+'&chemin='+chemin+'&envoi='+envoi+'&forme='+forme+'&id='+id,'','width=200,height=167')}
function findPosX(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetLeft;obj=obj.offsetParent;}}
else if(obj.x)
curleft+=obj.x;return curleft;}
function findPosY(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offsetTop;obj=obj.offsetParent;}}
else if(obj.y)
curleft+=obj.y;return curleft;}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}
function MM_findObj(n,d){var p,i,x;if(!d) d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n];for(i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];for(i=0;!x&&d.layers&&id.layers.length;i++) x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById) x=d.getElementById(n);return x;}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p) d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_CheckFlashVersion(reqVerStr,msg){with(navigator){var isIE=(appVersion.indexOf("MSIE") !=-1&&userAgent.indexOf("Opera")==-1);var isWin=(appVersion.toLowerCase().indexOf("win") !=-1);if(!isIE||!isWin){var flashVer=-1;if(plugins&&plugins.length>0){var desc=plugins["Shockwave Flash"]?plugins["Shockwave Flash"].description:"";desc=plugins["Shockwave Flash 2.0"]?plugins["Shockwave Flash 2.0"].description:desc;if(desc=="") flashVer=-1;else{var descArr=desc.split(" ");var tempArrMajor=descArr[2].split(".");var verMajor=tempArrMajor[0];var tempArrMinor=(descArr[3] !="")?descArr[3].split("r"):descArr[4].split("r");var verMinor=(tempArrMinor[1]>0)?tempArrMinor[1]:0;flashVer=parseFloat(verMajor+"."+verMinor);}}
else if(userAgent.toLowerCase().indexOf("webtv") !=-1) flashVer=4.0;var verArr=reqVerStr.split(",");var reqVer=parseFloat(verArr[0]+"."+verArr[2]);if(flashVer<reqVer){if(confirm(msg))
window.location="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";}}}
if(document.getElementById(GenPageStat))
document.getElementById(GenPageStat).style.display='none';}

function BackToTheHtml(node){if(node==null)
this.node=document;else
this.node=node;};BackToTheHtml.prototype.node=null;BackToTheHtml.prototype.execute=function(){this.activateObject();}
BackToTheHtml.prototype.activateObject=function(domObject){var aDomObject=this.node.getElementsByTagName('object');var activationObject;for(var i=0;i<aDomObject.length;i++)
if((aDomObject[i].getAttributeNode('BackToTheHtml')==null)
&&(activationObject=this.getActivationObject(aDomObject[i])) !=null)
activationObject.execute();};BackToTheHtml.prototype.getActivationObject=function(domObject){var classid=domObject.classid.toUpperCase().substr('clsid:'.length);var mimeType=domObject.type.toLowerCase();switch(true){case
classid=='D27CDB6E-AE6D-11CF-96B8-444553540000'||mimeType=='application/x-shockwave-flash'
:
return new ActivateObjectFlash(domObject);default:
return null;}};BackToTheHtml.uniqueID=function(prefix){var sPrefix;if(prefix==null)
sPrefix='uniqueId';else
sPrefix=prefix;var i=0;while(document.getElementById(sPrefix+(i++)));return sPrefix+(i-1);};BackToTheHtml.isParentOf=function(parent,child){var found=false;for(var i=0;i<parent.childNodes.length;i++)
if(parent.childNodes[i]==child)
return true;else
found=arguments.callee(parent.childNodes[i],child);return found;}

function ActivateObject(domObject){this.domObject=domObject;}
ActivateObject.prototype.domObject=null;ActivateObject.prototype.classid=null;ActivateObject.prototype.aHtmlAttribute=['accessKey','align','alt','archive','border','code','codeBase','codeType','declare','dir','height','hideFocus','hspace','lang','language','name','standby','tabIndex','title','useMap','vspace','width'];ActivateObject.prototype.aObjectProperty=null;ActivateObject.prototype.execute=function(){this.xndObjectId=BackToTheHtml.uniqueID();this.setTextHtml();this.writeObject();this.xndObject=document.getElementById(this.xndObjectId);this.setSpecialProperties();this.removeOriginalObject();}
ActivateObject.prototype.setTextHtml=function(){var str='';str+='<object BackToTheHtml '+'\n';str+=' classid="clsid:'+this.classid+'" '+'\n';for(var i=0;i<this.aHtmlAttribute.length;i++){var name=this.aHtmlAttribute[i];if(typeof this.domObject[name] !='undefined'&&this.domObject[name].toString() !='')
str+='\t'+name+'="'+this.domObject[name].toString()+'" '+'\n';}
str+='id="'+this.xndObjectId+'" '+'\n';str+='>';for(var i=0;i<this.aObjectProperty.length;i++){var name=this.aObjectProperty[i];if(typeof this.domObject[name] !='undefined'&&this.domObject[name].toString() !='')
str+='\t<param name="'+name+'" value="'+this.domObject[name].toString()+'"></param>'+'\n';}
str+='</object>';this.textHtml=str;};ActivateObject.prototype.writeObject=function(){this.domObject.insertAdjacentHTML("afterEnd",this.textHtml);};ActivateObject.prototype.setSpecialProperties=function(){if(typeof this.domObject.className !='undefined'&&this.domObject.className.toString() !='')
this.xndObject.className=this.domObject.className
if(typeof this.domObject.style.cssText !='undefined'&&this.domObject.style.cssText.toString() !='')
this.xndObject.style.cssText=this.domObject.style.cssText;if(typeof this.domObject.SWRemote !='undefined'&&this.domObject.SWRemote.toString() !='')
this.xndObject.FlashVars=this.domObject.SWRemote;if(typeof this.domObject.codebase=='undefined'||this.domObject.codebase.toString()=='')
this.xndObject.codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0';if(typeof this.domObject.id !='undefined'&&this.domObject.id.toString() !='')
this.xndObject.id=this.domObject.id;};ActivateObject.prototype.removeOriginalObject=function(){this.domObject.parentNode.removeChild(this.domObject);};function ActivateObjectFlash(domObject){ActivateObject.call(this,domObject);}
ActivateObjectFlash.prototype=new ActivateObject;ActivateObjectFlash.prototype.aObjectProperty=['FrameNum','Playing','Quality','Quality2','Scalemode','Scale','AlignMode','SAlign','BackgroundColor','BGColor','Loop','Movie','WMode','Base','DeviceFont','EmbedMovie','SWRemote','FlashVars','AllowScriptAccess'];ActivateObjectFlash.prototype.classid='D27CDB6E-AE6D-11CF-96B8-444553540000';if(typeof ActiveXObject !='undefined'&&typeof Function.call !='undefined'){var styleId=BackToTheHtml.uniqueID();document.write('<style id="'+styleId+'"></style>');var domStyle=document.getElementById(styleId);var isHead=false;var aHead=document.getElementsByTagName('head');for(var i=0;i<aHead.length;i++)
if(BackToTheHtml.isParentOf(aHead[i],domStyle))
isHead=true;if(isHead){document.write('<style type="text/css">OBJECT{visibility:hidden;}</style>');document.onreadystatechange=function(){if(document.readyState=='complete'){new BackToTheHtml().execute();document.styleSheets[document.styleSheets.length-1].addRule("OBJECT","visibility:visible;");}}}
else{new BackToTheHtml().execute();}
domStyle.parentNode.removeChild(domStyle);}


