function windowPrint(){window.print?window.print():alert("Utiliser la commande d'impression de votre navigateur");};function getIFrameDocument(aID,oThing){if(oThing.document.getElementById(aID).contentDocument)return oThing.document.getElementById(aID).contentDocument;else return oThing.document.frames[aID].document;};function resizeIFrame(oFrame,bH,bW,h,w){try{var oBody=window.frames[oFrame.name].document.body;if(bH)oFrame.style.height=(oBody.scrollHeight+(oBody.offsetHeight-oBody.clientHeight))+"px";else oFrame.style.height=h||"100%";if(bW)oFrame.style.width=(oBody.scrollWidth+(oBody.offsetWidth-oBody.clientWidth))+"px";else oFrame.style.width=w||"100%";}catch(e){alert('Error: '+e.number+'; '+e.description);}};function ajusteIFrame(oFrame,h,w){var height=oFrame.style.height;var widht=oFrame.style.widht;if(h){height=height.replace("px","");oFrame.style.height=(parseInt(height)+h)+"px";}if(w){widht=widht.replace("px","");oFrame.style.widht=(parseInt(widht)+w)+"px";}};function getEvent(e){return e||window.event;};function getSrcElement(e){if(e.srcElement)return e.srcElement;var node=e.target;while(node.nodeType!=1)node=node.parentNode;return node;};function getInnerText(element){return element.firstChild?element.firstChild.data:'';};var xWindowPopup=new Object();function openPopupDialog(url,returnFunc,args,width,height,option,top,left,bModal){if(typeof window.showModalDialog!='undefined'&&bModal!=false){var value=window.showModalDialog(url,args,"help:no;dialogWidth:"+width+"px;dialogHeight:"+height+"px;"+(top?"dialogTop:"+top+"px;":'')+(left?"dialogTop:"+left+"px;":'')+option);if(typeof returnFunc=='function')returnFunc(value);}else{if(!xWindowPopup.win||(xWindowPopup.win&&xWindowPopup.win.closed)){xWindowPopup.returnFunc=returnFunc;xWindowPopup.returnedValue="";xWindowPopup.args=args;xWindowPopup.url=url;xWindowPopup.width=width;xWindowPopup.height=height;xWindowPopup.name=(new Date()).getSeconds().toString();xWindowPopup.left=left||window.screenX+((window.outerWidth-xWindowPopup.width)/2);xWindowPopup.top=top||window.screenY+((window.parent.outerHeight-xWindowPopup.height)/2);var features="modal=yes,left="+xWindowPopup.left+",top="+xWindowPopup.top+",width="+xWindowPopup.width+",height="+xWindowPopup.height+(option!=""?","+option.replace(/:/g,'=').replace(/;/g,',').replace(/(scroll)/gi,'scrollbars').replace(/,?(status=yes)|,?(status=no)/gi,''):"");xWindowPopup.win=window.open(xWindowPopup.url,xWindowPopup.name,features);xWindowPopup.win.focus();xWindowPopup.win.args=args;xWindowPopup.win.returnFunc=returnFunc;}else xWindowPopup.win.focus();}};function getPopupDialog(){var arguments;if(typeof window.dialogArguments!='undefined')arguments=window.dialogArguments;else{addEvents(window,"load",window.opener.blockEvents);addEvents(window,"unload",window.opener.unblockEvents);addEvents(window,"load",blockRefresh);if(typeof window.args!='undefined')arguments=window.args;else if(window.opener&&window.opener.dialogWin)arguments=window.opener.dialogWin.args;}return arguments;};function closePopupDialog(value){if(typeof window.dialogArguments!='undefined')window.returnValue=value;else{if(typeof window.returnFunc!='undefined'){if(window.returnFunc!=null)window.returnFunc(value);}else if(opener&&!opener.closed)if(window.opener.dialogWin.returnFunc!=null)window.opener.dialogWin.returnFunc(value);}window.close();};function noExit(){if(xWindowPopup.win&&!xWindowPopup.win.closed){xWindowPopup.win.focus();return false;}};function holdFocus(){if(xWindowPopup.win&&!xWindowPopup.win.closed)xWindowPopup.win.focus();};function blockRefresh(){window.captureEvents(Event.KEYDOWN);window.onkeydown=function(event){var bRefresh=false;switch(getEvent(event).keyCode){case 116:bRefresh=true;break;case 82:if(getEvent(event).ctrlKey)bRefresh=true;break;}if(bRefresh){alert("Vous ne pouvez pas rafraichir cette fenêtre.");window.close();}}};function blockEvents(){window.captureEvents(Event.CLICK|Event.MOUSEDOWN|Event.MOUSEUP|Event.FOCUS|Event.KEYDOWN);window.onclick=noExit;window.onfocus=holdFocus;};function unblockEvents(){window.releaseEvents(Event.CLICK|Event.MOUSEDOWN|Event.MOUSEUP|Event.FOCUS|Event.KEYDOWN);window.onclick=null;window.onfocus=null;};function ResizeIframe(oFrame,sSrc){if(typeof window.dialogArguments!='undefined')oFrame.style.height=window.dialogHeight;else oFrame.style.height=window.innerHeight+"px";oFrame.style.width="100%";oFrame.src=sSrc;};function RefreshSize(sFrameName){var iInnerHeight,iFrameHeight,iDiff;if(typeof window.dialogArguments!='undefined'){iDiff=52;window.dialogHeight=(parseInt(window.dialogHeight)+iDiff)+'px';}else{iFrameHeight=document.getElementById(sFrameName).style.height;iInnerHeight=window.innerHeight;iDiff=iInnerHeight-parseInt(iFrameHeight);if(iDiff>0)window.resizeBy(0,iDiff);}};function RefreshWindowSize(){if(typeof window.dialogArguments!='undefined'){var iDiff=52;window.dialogHeight=(parseInt(window.dialogHeight)+iDiff)+'px';}else if(window.sizeToContent)window.sizeToContent();};function addEvents(oThing,sEvent,pHandler){if(typeof oThing.addEventListener!="undefined")oThing.addEventListener(sEvent,pHandler,false);else if(typeof oThing.attachEvent!="undefined")oThing.attachEvent("on"+sEvent,pHandler);};function removeEvents(oThing,sEvent,pHandler){if(typeof oThing.removeEventListener!="undefined")oThing.removeEventListener(sEvent,pHandler,false);else if(typeof oThing.detachEvent!="undefined")oThing.detachEvent("on"+sEvent,pHandler);};function getMousePosition(e){var oMouse=new Object();oMouse.posX=0;oMouse.posY=0;oMouse.maxX=0;oMouse.minX=0;oMouse.maxY=0;if(!e)e=window.event;if(e.pageX||e.pageY){oMouse.posX=e.pageX;oMouse.posY=e.pageY;}else if(e.clientX||e.clientY){oMouse.posX=e.clientX+Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);oMouse.posY=e.clientY+Math.max(document.documentElement.scrollTop,document.body.scrollTop);};if(window.innerHeight){oMouse.maxX=window.innerWidth+getWindowScroll('X');oMouse.maxY=window.innerHeight+getWindowScroll('Y');oMouse.minX=getWindowScroll('X');}else{oMouse.maxX=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft)+(document.documentElement.clientWidth!=0?document.documentElement.clientWidth:document.body.clientWidth);oMouse.maxY=Math.max(document.documentElement.scrollTop,document.body.scrollTop)+(document.documentElement.clientHeight!=0?document.documentElement.clientHeight:document.body.clientHeight);oMouse.minX=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);};return oMouse;};function getWindowScroll(s){var wsX=window.scrollX?window.scrollX:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft);var wsY=window.scrollY?window.scrollY:Math.max(document.documentElement.scrollTop,document.body.scrollTop);return s=="Y"?wsY:wsX;}