
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;}};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);}};}();var Cookie=function(){return{set:function(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=/";},get:function(name){var cookieValue=null;if(document.cookie.length>0){var bgn=document.cookie.indexOf(name+'=');if(bgn!=-1){bgn+=name.length+1;var end=document.cookie.indexOf(";",bgn);if(end==-1){end=document.cookie.length;}
cookieValue=unescape(document.cookie.substring(bgn,end));}}
return cookieValue;}};}();function Dow(){}
Dow.prototype={loaded:false,getLoaded:function(){return this.loaded;},setLoaded:function(bln){this.loaded=bln;}};var Win=function(){var _count=0;var _styles={'basic':158,'default':222,'fixed':0,'max':222,'min':6};return{loaded:false,load:function(win,func){$(win.document).ready(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;}};}();