function isIE(){return document.all?true:false;}
function setVisible(obj,bln){if(typeof bln=='undefined'){obj.style.visibility=(obj.style.visibility=='hidden')?'visible':'hidden';}else if(bln===true&&obj.style.visibility!='visible'){obj.style.visibility='visible';}else if(bln===false&&obj.style.visibility!='hidden'){obj.style.visibility='hidden';}}
function setDisplay(obj,bln){if(typeof bln=='undefined'){obj.style.display=(obj.style.display=='none')?'block':'none';}else{obj.style.display=(!bln)?'none':'block';}}
function setSelects(formName,bln){var objSelects=formName.getElementsByTagName('SELECT');for(var i=0,l=objSelects.length;i<l;i++){setVisible(objSelects[i],bln);}}
function getPageLeft(obj){var left=0;do{left+=obj.offsetLeft;}while((obj=obj.offsetParent));return left;}
function getPageTop(obj){var top=0;do{top+=obj.offsetTop;}while((obj=obj.offsetParent));return top;}
function getWindowHeight(){var myHeight=0;if(typeof window.innerWidth=='number'){myHeight=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myHeight=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myHeight=document.body.clientHeight;}return myHeight;}
function getWindowWidth(){var myWidth=0;if(typeof window.innerWidth=='number'){myWidth=window.innerWidth;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth=document.documentElement.clientWidth;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth=document.body.clientWidth;}return myWidth;}
function getScrollTop(){var scrOfY=0;if(typeof window.pageYOffset=='number'){scrOfY=window.pageYOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;}return scrOfY;}
function getScrollLeft(){var scrOfX=0;if(typeof window.pageXOffset=='number'){scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfX=document.documentElement.scrollLeft;}return scrOfX;}
function setCookie(name,value,days){var expires="";if(typeof days!="undefined"){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires=";expires="+date.toGMTString();}document.cookie=name+"="+escape(value)+expires+"; path=/";}
function getCookie(name){var cookieValue=null;var search=name+"=";if(document.cookie.length>0){var offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;var end=document.cookie.indexOf(";",offset);if(end==-1){end=document.cookie.length;}cookieValue=unescape(document.cookie.substring(offset,end));}}return cookieValue;}
function Mask(){var s=0;}Mask.prototype={init:function(i){this.s=i},set:function(m){var z=1<<m;this.s=this.s|z;},clear:function(m){var z=1<<m;this.s=this.s&z;},get:function(m){var z=1<<m;return (parseInt(this.s&z)==z)?true:false;},empty:function(){this.s=0;},inventory:function(){return this.s;}};
function Dow(){}Dow.prototype={loaded:false,getLoaded:function(){return this.loaded;},setLoaded:function(bln){this.loaded=bln;}};
var Win=function(){var _w=null;var _count=0;var _styles={'basic':158,'default':222,'fixed':0,'max':222,'min':6};return{loaded:false,
load:function(win,func){if(_w===null)_w=win;E.attach(_w,'load',func);},getLoaded:function(){return this.loaded;},setLoaded:function(bln){this.loaded=bln;},
open:function(url,name,style,w,h){var strStyle=style.toLowerCase();if(!this.exists(name)){this[name]=new Dow();_count++;}var oStyle = new Mask;oStyle.init(((strStyle in _styles)?_styles[strStyle]:_styles['default']));
strStyle='toolbar='+oStyle.get(7)+',location='+oStyle.get(6)+',directories='+oStyle.get(5)+',status='+oStyle.get(4)+',menubar='+oStyle.get(3)+',scrollbars='+oStyle.get(2)+',resizable='+oStyle.get(1)+',copyhistory='+oStyle.get(0)+',width='+((!w||w===0)?1000:w)+',height='+((!h||h===0)?window.screen.availHeight:h);
var newWindow=window.open(url,name,strStyle);if(!newWindow.opener)newWindow.opener=self;if(window.focus)newWindow.focus();return false;},
close:function(name){this[name].close();return false;},exists:function(name){return(typeof this[name]!=='undefined'&&this[name]!==undefined)?true:false;},top:function(url){if(top.location!=self.location)top.location=url;else{window.opener.location=url;window.close();}return false;}};}();
var Doc=function(){var _bomb=null;function _getMatches(list){return list.split(',');}return{initialized:null,fire:function(obj,list){if(_bomb===null){_bomb=obj;}var aMatch=_getMatches(list);for(var i=0,l=aMatch.length;i<l;i++){var _fire=aMatch[i];if(_fire=='onkeyup'){_bomb.onkeyup=fuse;}if(_fire=='onclick'){_bomb.onclick=fuse;}if(_fire=='ondblclick'){_bomb.ondblclick=fuse;}if(_fire=='onchange'){_bomb.onchange=fuse;}if(_fire=='onblur'){_bomb.onblur=fuse;}if(_fire=='onsubmit'){_bomb.onsubmit=fuse;}if(_fire=='onmouseover'){_bomb.onmouseover=fuse;}if(_fire=='onmouseout'){_bomb.onmouseout=fuse;}if(_fire=='oncontextmenu'){_bomb.oncontextmenu=fuse;}}}};}();
var E=function(){return{e:null,id:'',tag:'',type:'',kcode:null,target:null,clientx:null,clienty:null,
init:function(Event){this.e=Event||window.event;this.type=this.e.type;this.target=(!this.e.target&&this.e.srcElement)?this.e.srcElement:this.e.target;this.id=this.target.id;this.tag=this.target.tagName;this.kcode=this.e.keyCode;this.clientX=this.e.clientX;this.clientY=this.e.clientY;},
cancel:function(){this.e.cancelBubble=true;if(this.e.stopPropagation){this.e.stopPropagation();}},
attach:function(o,e,f){if(o.addEventListener)o.addEventListener(e,f,false);else if(o.attachEvent)o.attachEvent('on'+e,f);else o['on'+e]=f;},
detach:function(o,e,f){if (o.removeEventListener)o.removeEventListener(e,f,false);else if(o.detachEvent)o.detachEvent('on'+e,f);else o['on'+e]={};}};}();
var CGI=function(){var _cgi={};function _stripQuery(path){return(path.indexOf('?')!=-1)?path.substring(0,path.indexOf('?')):path;}function _stripAnchor(path){return(path.indexOf('#')!=-1)?path.substring(0,path.indexOf('#')):path;}function _getFileFromPath(path){var strPath=_stripQuery(path);strPath=_stripAnchor(strPath);var aPath=strPath.split('/');return aPath[aPath.length-1];}function _getDirFromPath(path){var strPath=_stripQuery(path);strPath=_stripAnchor(strPath);var aPath=path.split('/');aPath.pop();return aPath.join('/');}return{
init:function(url){var loc=window.location;_cgi.http_host=loc.host;_cgi.path_info=_stripAnchor(_stripQuery(loc.pathname));_cgi.script_name=_getFileFromPath(_cgi.path_info);_cgi.query_string=_stripAnchor(loc.search.replace('?',''));_cgi.params={};if(_cgi.query_string!==''){var aParams=_cgi.query_string.split('& ');for(var i=0,l=aParams.length;i<l;i++){var aTuple=aParams[i].split('=');_cgi.params[aTuple[0]]=aTuple[1];}}_cgi.root='/';if(url){_cgi.appli=url+_cgi.root;}else{_cgi.appli=_getDirFromPath(_cgi.path_info)+'/';}},
root:function(){return _cgi.root;},appli:function(){return _cgi.appli;},host:function(){return _cgi.http_host;},query:function(){return _cgi.query_string;},script:function(){return _cgi.script_name;},param:function(val){if(_cgi.params[val]!==undefined){return _cgi.params[val];}else{return null;}},file:function(path){return _getFileFromPath(path);},dir:function(path){return _getDirFromPath(path);}};}();

