// Modifié le 2004-12-21 var pwisIE4 = (typeof(document.all) != 'undefined' && parseInt(navigator.appVersion) >= 4 && typeof(window.opera) == 'undefined')? 1 : 0; function pwSetVisibility(obj,visible) { if( document.getElementById(obj) ) { if(visible) document.getElementById(obj).style.visibility='inherit'; else document.getElementById(obj).style.visibility='hidden'; } } function pwShowObject(obj) { if( document.getElementById(obj) ) document.getElementById(obj).style.display="block"; } function pwHideObject(obj) { if( document.getElementById(obj) ) document.getElementById(obj).style.display="none"; } function pwToggleDisplay(obj) { var whichEl = document.getElementById(obj); if( whichEl ) { if (whichEl.style.display == 'none') { whichEl.style.display = 'block'; } else { whichEl.style.display = 'none'; } } } function pwCheckAll(theForm, cName, check) { for(i=0,n=theForm.elements.length;i < n;i++) { if (theForm.elements[i].className.indexOf(cName) !=-1) { theForm.elements[i].checked = check; } } } function pwCheckCount(theForm, cName, check) { var nb=0; for(i=0,n=theForm.elements.length;i < n;i++) { if (theForm.elements[i].className.indexOf(cName) !=-1) { if( theForm.elements[i].checked == check ) nb++; } } return nb; } function pwGetFirstCheckValue(theForm, cName) { for(i=0,n=theForm.elements.length;i < n;i++) { if(theForm.elements[i].className.indexOf(cName) !=-1 && theForm.elements[i].checked == true ) { return theForm.elements[i].value; } } return false; } function pwOpenDetail(filename,targetname,w,h) { window.open(filename,targetname,'status=no,location=no,scrollbars=yes,resize=no,directories=no,toolbar=no,menubar=no,copyhistory=yes,width='+w+',height='+h); return false; } function pwChangeLocation(myfield,target) { var formindex=myfield.selectedIndex; if(myfield.value != ""){ target.location=myfield.options[formindex].value; return true; } return (false); } function pwDisplayOnCheck(chk,targetid) { obj = document.getElementById(targetid); if( chk.checked ) { obj.style.display = 'block'; } else { obj.style.display = 'none'; } } function pwHideOnCheck(chk,targetid) { obj = document.getElementById(targetid); if( chk.checked ) { obj.style.display = 'none'; } else { obj.style.display = 'block'; } } var getFFVersion=navigator.userAgent.indexOf("Firefox"); var FFextraHeight=getFFVersion > 0? 16 : 0; //extra height in px to add to iframe in FireFox 1.0+ browsers function pwAdjustIFrame() { try { myiframe = window.frameElement; if(myiframe && !window.opera) { myiframe.style.display="block"; if(myiframe.contentDocument && myiframe.contentDocument.body.offsetHeight) //ns6 syntax myiframe.height = myiframe.contentDocument.body.offsetHeight+FFextraHeight; else if(myiframe.Document && myiframe.Document.body.scrollHeight) //ie5+ syntax myiframe.height = myiframe.Document.body.scrollHeight; if( parent && parent.frameElement ) { parent.pwAdjustIFrame(); } } } catch(er){} }