var myDOM=new Object();myDOM.theme="default";myDOM.select=function(selector){var nodes=document.getElementsBySelector(selector);nodes.each=function(_each){var e;if(typeof _each=='function'){for(var i in this){if(typeof(e=this[i])=='object'){e._each=_each;e._each(e);e._each=null;}}}}
return nodes;}
myDOM.$$={};myDOM._prototypes={};myDOM.useCanvas=document.createElement('canvas').getContext?true:false;myDOM.addPrototype=function(name,obj){var prototype=this._prototypes[name];obj=$(obj);if(prototype)for(var i in prototype)obj[i]=prototype[i];return obj;}
myDOM.browser=function(){this._browser={dataBrowser:[{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{string:navigator.vendor,subString:"Google",identity:"Google"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}],searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)
return data[i].identity;}
else if(dataProp)
return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},init:function(){this.name=this.searchString(this.dataBrowser)||false;this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||false;this.os=this.searchString(this.dataOS)||false;}};this._browser.init();return this._browser;}
var dom=myDOM;var $$={};var _frames={head:(parent.HEAD_FRAME)?parent.HEAD_FRAME:window,main:(parent.MAIN_FRAME)?parent.MAIN_FRAME:window,bottom:(parent.BOTTOM_FRAME)?parent.BOTTOM_FRAME:window};var _defaultsPrototypes=new Array();var _browser={dataBrowser:[{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{string:navigator.vendor,subString:"Google",identity:"Google"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}],searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)
return data[i].identity;}
else if(dataProp)
return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},init:function(){this.name=this.searchString(this.dataBrowser)||false;this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||false;this.os=this.searchString(this.dataOS)||false;}};_browser.init();function $addPrototype(obj,objPrototype){if(obj){for(var i in objPrototype){obj[i]=objPrototype[i];}
return obj;}}
function getAllChildren(e){return e.all?e.all:e.getElementsByTagName('*');}
document.getElementsBySelector=function(selector){if(!document.getElementsByTagName){return new Array();}
var tokens=selector.split(' ');var currentContext=new Array(document);for(var i=0;i<tokens.length;i++){token=tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');;if(token.indexOf('#')>-1){var bits=token.split('#');var tagName=bits[0];var id=bits[1];var element=document.getElementById(id);if(tagName&&element.nodeName.toLowerCase()!=tagName){return new Array();}
currentContext=new Array(element);continue;}
if(token.indexOf('.')>-1){var bits=token.split('.');var tagName=bits[0];var className=bits[1];if(!tagName){tagName='*';}
var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements;if(tagName=='*'){elements=getAllChildren(currentContext[h]);}else{elements=currentContext[h].getElementsByTagName(tagName);}
for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}
currentContext=new Array;var currentContextIndex=0;for(var k=0;k<found.length;k++){if(found[k].className&&found[k].className.match(new RegExp('\\b'+className+'\\b'))){currentContext[currentContextIndex++]=found[k];}}
continue;}
if(token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)){var tagName=RegExp.$1;var attrName=RegExp.$2;var attrOperator=RegExp.$3;var attrValue=RegExp.$4;if(!tagName){tagName='*';}
var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements;if(tagName=='*'){elements=getAllChildren(currentContext[h]);}else{elements=currentContext[h].getElementsByTagName(tagName);}
for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}
currentContext=new Array;var currentContextIndex=0;var checkFunction;switch(attrOperator){case'=':checkFunction=function(e){return(e.getAttribute(attrName)==attrValue);};break;case'~':checkFunction=function(e){return(e.getAttribute(attrName).match(new RegExp('\\b'+attrValue+'\\b')));};break;case'|':checkFunction=function(e){return(e.getAttribute(attrName).match(new RegExp('^'+attrValue+'-?')));};break;case'^':checkFunction=function(e){return(e.getAttribute(attrName).indexOf(attrValue)==0);};break;case'$':checkFunction=function(e){return(e.getAttribute(attrName).lastIndexOf(attrValue)==e.getAttribute(attrName).length-attrValue.length);};break;case'*':checkFunction=function(e){return(e.getAttribute(attrName).indexOf(attrValue)>-1);};break;default:checkFunction=function(e){return e.getAttribute(attrName);};}
currentContext=new Array;var currentContextIndex=0;for(var k=0;k<found.length;k++){if(checkFunction(found[k])){currentContext[currentContextIndex++]=found[k];}}
continue;}
tagName=token;var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements=currentContext[h].getElementsByTagName(tagName);for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}
currentContext=found;}
return currentContext;}

var _mouseX=0;var _mouseY=0;if(window.addEventListener){var _addEvent=function(type,expression){this.addEventListener(type,expression,false);}
var _removeEvent=function(type,expression){this.removeEventListener(type,expression,false);}}
else if(window.attachEvent){var _addEvent=function(type,expression){this.attachEvent('on'+type,expression);}
var _removeEvent=function(type,expression){this.detachEvent('on'+type,expression);}}
else alert('add/remove event error');document.addEvent=_addEvent;document.removeEvent=_removeEvent;window.addEvent=_addEvent;window.removeEvent=_removeEvent;function getMouseX(){return _mouseX;}
function getMouseY(){return _mouseY;}
if(_browser.name=='Explorer'){var getMouseButton=function(){if(event.button==1)return 0;else if(event.button==4)return 1;else return event.button;}}
else var getMouseButton=function(e){return e.button;}
if(_browser.name=='Explorer')
var stopPropagation=function(){try{event.cancelBubble=true;}catch(err){};return false};else var stopPropagation=function(e){try{e.stopPropagation();}catch(err){};return false};if(_browser.name=='Explorer')
var preventDefault=function(){try{event.returnValue=false;}catch(err){};return false};else var preventDefault=function(e){try{e.preventDefault();}catch(err){};return false};if(_browser.name=='Explorer')
var stopParentsEvent=function(){stopPropagation();preventDefault();;return false};else var stopParentsEvent=function(e){stopPropagation(e);preventDefault(e);;return false};if(_browser.name=='Explorer')
var getTarget=function(){return event.srcElement};else var getTarget=function(e){return e.target};if(_browser.name=='Explorer')
var getRelatedTarget=function(){if(event.type=='mouseover')return event.fromElement;else return event.toElement;};else var getRelatedTarget=function(e){return e.relatedTarget};if(window.getSelection)var getSelectedText=function(){return window.getSelection()};else if(document.selection)var getSelectedText=function(){return document.selection.createRange().text};else if(document.getSelection)var getSelectedText=function(){return document.getSelection()};if(window.getSelection)var removeSelectedText=function(){window.getSelection().removeAllRanges()};else if(document.getSelection)var removeSelectedText=function(){document.getSelection().removeAllRanges()};else if(document.selection)var removeSelectedText=function(){document.selection.createRange().execCommand('unselect')};if(_browser.name=='Explorer'){var _captureMousePosition=function(){_mouseX=window.event.clientX+getScrollLeft()-1;_mouseY=window.event.clientY+getScrollTop()-1;};setTimeout("document.addEvent('mousemove',_captureMousePosition);",300);}
else{document.addEvent=_addEvent;var _captureMousePosition=function(e){_mouseX=e.pageX;_mouseY=e.pageY;};document.addEvent('mousemove',_captureMousePosition);}

function returnFalse(){return false};if(typeof document.parentWindow=='undefined')document.parentWindow=window;if(_browser.name=='Explorer'&&_browser.version==6){try{document.execCommand("BackgroundImageCache",false,true);}catch(err){}}

if(document.getElementById)var $id=function(id){return document.getElementById(id);}
else if(document.all)var $id=function(id){return document.all[id];}
else if(document.layers)var $id=function(id){return document.layers[id];}
function getUniqueId(){return new Date().getTime()+'_'+(Math.random().toString().substr(2,10));}
if(_browser.name=='Explorer'){var createInput=function(type,name){return $(document.createElement('<input type="'+type+'" name="'+(typeof name!='undefined'?name:'')+'">'));}}
else{var createInput=function(type,name){var node=document.createElement('input');node.type=type;node.name=(typeof name!='undefined'?name:'');return $(node);}}
if(_browser.name=='Explorer'){var createButton=function(type,name){return $(document.createElement('<button type="'+type+'" name="'+(typeof name!='undefined'?name:'')+'"></button>'));}}
else{var createButton=function(type,name){var node=$(document.createElement('button'));node.newAttribute('type',type);node.newAttribute('name',(typeof name!='undefined'?name:''))
return node;}}
function getCopyArray(arrToCopy){var arrCopy=new Array();if(arrToCopy)copyArrayRecursiv(arrToCopy,arrCopy);return arrCopy;}
function copyArrayRecursiv(arrToCopy,arrCopy){for(var c in arrToCopy){if(arrToCopy[c]==null)arrCopy[c]=null;else if(typeof arrToCopy[c].getTime=='function'){arrCopy[c]=new Date();arrCopy[c].setTime(arrToCopy[c].getTime());}
else if(typeof arrToCopy[c]=='object'&&!arrToCopy[c].appendChild){arrCopy[c]=new Array();copyArrayRecursiv(arrToCopy[c],arrCopy[c]);}
else arrCopy[c]=arrToCopy[c];}}
function lengthArray(arr){var compteur=0;if(typeof arr=='object'){for(var noEl in arr){compteur++;}}
return compteur;}
function firstIndexArray(arr){if(typeof arr=='object'){for(noIndex in arr){return noIndex;}}
return false;}
function absoluteLeft(obj){var aLeft=0;while(obj.tagName!="BODY"&&obj.tagName!="HTML"){aLeft+=obj.offsetLeft-obj.scrollLeft;obj=obj.offsetParent;}
return aLeft;}
function absoluteTop(obj){var aTop=0;while(obj.tagName!="BODY"&&obj.tagName!="HTML"){aTop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent;}
return aTop;}
function htmlAlert(texte){alert(texte.toString().convertHtmlEntities());}
function htmlConfirm(texte){return confirm(texte.toString().convertHtmlEntities());}
function isFunction(v){return(typeof v=='function')?true:false}
function isDate(v){return(typeof v=='object'&&typeof v.getDate=='function')?true:false}
function isObject(v){return(typeof v=='object'&&v!=null)?true:false}
function isString(v){return(typeof v=='string')?true:false}
function isNumber(v){return(typeof v=='number')?true:false}
function isBoolean(v){return(typeof v=='boolean')?true:false}
function isUnknow(v){return(typeof v=='unknow')?true:false}
function isUndefined(v){return(typeof v=='undefined')?true:false}
function isNull(v){return(typeof v=='function')?true:false}
function getHeight(){return document.body.clientHeight}
function getWidth(){return document.body.clientWidth}
if(_browser.name=='Explorer'){var getVisibleHeight=function(){return document.documentElement.offsetHeight}
var getVisibleWidth=function(){return document.documentElement.offsetWidth}}
else{var getVisibleHeight=function(){return window.innerHeight}
var getVisibleWidth=function(){return window.innerWidth}}
var getScrollHeight=function(){return document.documentElement.scrollHeight}
var getScrollWidth=function(){return document.documentElement.scrollWidth}
if(_browser.name=='Google'){var getScrollTop=function(){return document.body.scrollTop};var getScrollLeft=function(){return document.body.scrollLeft};}
else{var getScrollTop=function getScrollTop(){return document.documentElement.scrollTop};var getScrollLeft=function getScrollLeft(){return document.documentElement.scrollLeft};}
function debug(txt,clearDebug){}
var htmlPrintr='';function printr(obj){if(typeof obj!='object')debug("N'est pas un tableau: "+(typeof obj));htmlPrintr="\n========================";_printr(obj,'');htmlPrintr+="\n========================";debug(htmlPrintr);}
function _printr(obj,tab){for(var i in obj){if(typeof obj[i]=='object'&&typeof obj[i].setDate!='function'){htmlPrintr+="\n::::::"+i+"::::::";_printr(obj[i],tab+'\t');htmlPrintr+="\n";}
else htmlPrintr+="\n"+tab+"["+i+"] "+obj[i]+"";}}
function lockInterface(txt){if(document.body.modalNode)return false;clearTimeout($$.timerChargement);if(!txt)txt="Chargement, un instant";var stopEvent=function(e){stopParentsEvent(e);return false;};var visibleHeight=getVisibleHeight();var visibleWidth=getVisibleWidth();var modalNode=$(document.createElement('div')).addClass('modal').setStyle({zIndex:_frames.head.$$.zIndexTop+1,height:visibleHeight+'px',width:visibleWidth+'px'});document.body.modalNode=document.body.appendChild(modalNode);document.body.modalNode.stopClick=stopEvent;document.body.modalNode.onmousedown=stopEvent;$addKeyboard(document.body.modalNode).keyboard={};document.body.modalNode.focuskeyboard();document.body.modal=true;var width=230;var height=40;var divChargement=document.body.modalNode.newNode('div');divChargement.className='waitingMessage';divChargement.write(txt);$$.timerChargement=divChargement.setTimeout(function(){this.addClass('waitingMessage30seconds');$$.timerChargement=divChargement.setTimeout(function(){this.addClass('waitingMessage45seconds');$$.timerChargement=divChargement.setTimeout(function(){$$.timerChargement=null;$$.Ajax.xmlHttp.abort();htmlAlert("Le serveur ne r&eacute;pond pas. Veuillez r&eacute;essayer dans un instant.");unlockInterface();},10000);},10000);},10000);}
function unlockInterface(){clearTimeout($$.timerChargement);if(document.body.modalNode){document.body.modalNode.unfocuskeyboard();document.body.modalNode.remove();document.body.modalNode=null;}}
function calculTaxesDevise(calcul,total,taxe1,taxe2,taxe3){if(typeof calcul=='string'){calcul=calcul.split('%total%').join((total)?total:0);calcul=calcul.split('%taxe1%').join((taxe1)?taxe1:0);calcul=calcul.split('%taxe2%').join((taxe2)?taxe2:0);calcul=calcul.split('%taxe3%').join((taxe3)?taxe3:0);return eval(calcul);}
return 0;}
function $extendPrototype(obj,objPrototype){for(var i in objPrototype)obj[i]=objPrototype[i];return obj;}
function rgb2hex(value){var hex="",v,h,i;var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var h=regexp.exec(value);for(i=1;i<4;i++){v=parseInt(h[i]).toString(16);if(v.length==1)hex+="0"+v;else hex+=v;}
return("#"+hex);}
function mixColors(c1,c2){if(c1.indexOf('rgb')!=-1)c1=rgb2hex(c1);if(c2.indexOf('rgb')!=-1)c2=rgb2hex(c2);var i,step1,step2,x,y,r=new Array(3);if(c1.length==4)step1=1;else step1=2;if(c2.length==4)step2=1;else step2=2;for(i=0;i<3;i++){x=parseInt(c1.substr(1+step1*i,step1),16);if(step1==1)x=16*x+x;y=parseInt(c2.substr(1+step2*i,step2),16);if(step2==1)y=16*y+y;r[i]=Math.floor((x*50+y*50)/100);r[i]=r[i].toString(16);if(r[i].length==1)r[i]="0"+r[i];}
return("#"+r[0]+r[1]+r[2]);}
$$.WINDOW_PRINT=false;function printHTML(html,titre,arrCss,arrPage,htmlHeader,noPageBreak){try{$$.WINDOW_PRINT.document.title='';$$.WINDOW_PRINT.focus();}
catch(e){if(_browser.name=='Explorer')$$.WINDOW_PRINT=window.open("","ZoneImpr","height=500, width=600,toolbar=0, menubar=0, scrollbars=1, resizable=1, status=0, location=0, left=10, top=10");else $$.WINDOW_PRINT=window.open("","ZoneImpr","height=500, width=600,toolbar=0, menubar=1, scrollbars=1, resizable=1, status=0, location=0, left=10, top=10");}
var win=$$.WINDOW_PRINT;if(!win){return false;}
win.focus();win.document.title=(titre)?titre:"Aper&ccedil;u avant impression";var headID=win.document.getElementsByTagName("head")[0];if(typeof arrCss!='object')arrCss={};if(_browser.name=='Explorer'){arrCss[1002]={url:"css/global.impression.preview.iePatch.css",media:"screen"}}
for(var noCss in arrCss){var cssNode=win.document.createElement('link');cssNode.type='text/css';cssNode.rel='stylesheet';cssNode.href=arrCss[noCss]['url'];cssNode.media=arrCss[noCss]['media'];headID.appendChild(cssNode);}
var style='';style+="<style type='text/css'>";style+="@page {";if(typeof arrPage=='object'){for(var i in arrPage){style+=i+":"+arrPage[i]+";";}}
style+="}";style+="</style>";win.document.body.innerHTML=style;html=html.replace(/(<A)(.*?)(>)/gi,"");html=html.replace(/(onclick|ondblclick|oncontextmenu|onmouseover|onmouseout|onmousemove|onmousedown|onmouseup)( )*?=( )*?'(.)*?'/gi,"");html=html.replace(/(onclick|ondblclick|oncontextmenu|onmouseover|onmouseout|onmousemove|onmousedown|onmouseup)( )*?=( )*?"(.)*?"/gi,"");html=html.replace(/(onclick|ondblclick|oncontextmenu|onmouseover|onmouseout|onmousemove|onmousedown|onmouseup)( )*?=/gi,"bidon=");html=html.replace(/(CURSOR\:)(.*?);/gi,"");html=html.replace(/(CURSOR\:)(.*?)"/gi,"\"");if(!noPageBreak)html=html.replace(/<td /gi,"<td onclick='gestionClick(this);event.cancelBubble=true;return false;' ");var doc=win.document;var body=doc.body;var zoneImpression=doc.createElement('div');zoneImpression.style.paddingTop='30px';body.appendChild(zoneImpression);zoneImpression.innerHTML=html;if(_browser.name=='Explorer')win.document.execCommand('print',false,null);else win.print();}
var FENETRE_IMPRESSION=false;function printHTMLOld(html,titre,arrCss,arrPage,htmlHeader,noPageBreak)
{try{FENETRE_IMPRESSION.document.title='';}
catch(e){if(_browser.name=='Explorer')FENETRE_IMPRESSION=window.open("","ZoneImpr","height=500, width=600,toolbar=0, menubar=0, scrollbars=1, resizable=1, status=0, location=0, left=10, top=10");else FENETRE_IMPRESSION=window.open("","ZoneImpr","height=500, width=600,toolbar=0, menubar=1, scrollbars=1, resizable=1, status=0, location=0, left=10, top=10");}
if(FENETRE_IMPRESSION!=null){var headID=FENETRE_IMPRESSION.document.getElementsByTagName("head")[0];if(typeof arrCss!='object')arrCss={};if(_browser.name=='Explorer'){arrCss['previewPatchIE']={url:"css/global.impression.preview.iePatch.css",media:"screen"}}
for(var noCss in arrCss){var cssNode=FENETRE_IMPRESSION.document.createElement('link');cssNode.type='text/css';cssNode.rel='stylesheet';cssNode.href=arrCss[noCss]['url'];cssNode.media=arrCss[noCss]['media'];headID.appendChild(cssNode);}
delete arrCss['preview'];var style='';style+="<style type='text/css'>";style+="@page {";if(typeof arrPage=='object'){for(var i in arrPage){style+=i+":"+arrPage[i]+";";}}
style+="}";style+="</style>";html=html.replace(/(<A)(.*?)(>)/gi,"");html=html.replace(/(onclick|ondblclick|oncontextmenu|onmouseover|onmouseout|onmousemove|onmousedown|onmouseup)( )*?=( )*?'(.)*?'/gi,"");html=html.replace(/(onclick|ondblclick|oncontextmenu|onmouseover|onmouseout|onmousemove|onmousedown|onmouseup)( )*?=( )*?"(.)*?"/gi,"");html=html.replace(/(onclick|ondblclick|oncontextmenu|onmouseover|onmouseout|onmousemove|onmousedown|onmouseup)( )*?=/gi,"bidon=");html=html.replace(/(CURSOR\:)(.*?);/gi,"");html=html.replace(/(CURSOR\:)(.*?)"/gi,"\"");if(!noPageBreak)html=html.replace(/<td /gi,"<td onclick='gestionClick(this);event.cancelBubble=true;return false;' ");if(!noPageBreak)var outerDiv="<div id='zoneImpression' onclick='gestionClick(event.srcElement);'>";else var outerDiv="<div id='zoneImpression'>";FENETRE_IMPRESSION.document.gestionClick=function(source){var found=false;if(source.nextSibling&&source.nextSibling.id=='sautPage'){source.parentNode.removeChild(source.nextSibling);found=true;}
if(!found){if(source.tagName=='TABLE'||source.tagName=='TR'||source.tagName=='BODY')return false;if(source.tagName=='TD'||source.tagName=='TH'){if(source.parentNode.rowIndex==0)return false;var tableBody=source.parentNode.parentNode;var table=tableBody.parentNode;var lineClicked=source.parentNode;while(lineClicked.nextSibling&&lineClicked.nextSibling.noPageBreak){lineClicked=lineClicked.nextSibling;}
if(!lineClicked.nextSibling){if(table.nextSibling&&table.nextSibling.className=='pageBreak'||table.nextSibling.id=='sautPage'){table.nextSibling.onclick();jvs.stopPropagation(e);}else{var divSautPage=FENETRE_IMPRESSION.document.createElement('div');table.parentNode.insertBefore(divSautPage,table.nextSibling);divSautPage.id='sautPage';var div=FENETRE_IMPRESSION.document.createElement('div');div.className='pageBreak';div.innerHTML="Saut de page";divSautPage.appendChild(div);if(htmlHeader){var header=FENETRE_IMPRESSION.document.createElement('div');header.innerHTML=htmlHeader;divSautPage.appendChild(header);}
divSautPage.onclick=function(e){this.parentNode.removeChild(this);jvs.stopPropagation(e);}}
return false;}
var newTable=table.cloneNode(true);var newTableBody=newTable.firstChild;while(lineClicked.nextSibling){tableBody.removeChild(lineClicked.nextSibling);}
var nbToDelete=lineClicked.rowIndex;while(nbToDelete--){newTableBody.removeChild(newTableBody.firstChild.nextSibling);}
var div=FENETRE_IMPRESSION.document.createElement('div');div.className='pageBreak';div.innerHTML="Saut de page";div.onclick=function(e){jvs.stopPropagation(e);if(this.nextSibling&&this.nextSibling.id=='headerImpression'){this.parentNode.removeChild(this.nextSibling);}
if(this.nextSibling&&this.nextSibling.id=='tableCreeParImpression'){var topTable=this.previousSibling;var bottomTableBody=this.nextSibling.firstChild;bottomTableBody.removeChild(bottomTableBody.firstChild);while(bottomTableBody.firstChild){topTable.firstChild.appendChild(bottomTableBody.firstChild.cloneNode(true));bottomTableBody.removeChild(bottomTableBody.firstChild);}
this.parentNode.removeChild(this.nextSibling);}
this.parentNode.removeChild(this);}
table.parentNode.insertBefore(div,table.nextSibling);newTable.id='tableCreeParImpression';div.parentNode.insertBefore(newTable,div.nextSibling);if(htmlHeader){var header=FENETRE_IMPRESSION.document.createElement('div');header.innerHTML=htmlHeader;header.id='headerImpression';div.parentNode.insertBefore(header,div.nextSibling);}}else{var divSautPage=FENETRE_IMPRESSION.document.createElement('div');source.parentNode.insertBefore(divSautPage,source.nextSibling);divSautPage.id='sautPage';var div=FENETRE_IMPRESSION.document.createElement('div');div.className='pageBreak';div.innerHTML="Saut de page";divSautPage.appendChild(div);if(htmlHeader){var header=FENETRE_IMPRESSION.document.createElement('div');header.innerHTML=htmlHeader;divSautPage.appendChild(header);}
divSautPage.onclick=function(e){this.parentNode.removeChild(this);jvs.stopPropagation(e);}}}}
var menu="<div id='menuImpression'></div>";FENETRE_IMPRESSION.document.title=(titre)?titre:'Isios';FENETRE_IMPRESSION.document.body.innerHTML=style+" "+menu+outerDiv+"</div>";var width=FENETRE_IMPRESSION.document.body.clientWidth;$(FENETRE_IMPRESSION.menuImpression).setStyle({width:width+'px'});FENETRE_IMPRESSION.document.body.onresize=function(){var width=FENETRE_IMPRESSION.document.body.clientWidth;$(FENETRE_IMPRESSION.menuImpression).setStyle({width:width+'px'});}
var boutonImprimer=FENETRE_IMPRESSION.document.createElement('button');FENETRE_IMPRESSION.menuImpression.appendChild(boutonImprimer);boutonImprimer.className='boutonImpression';boutonImprimer.window=FENETRE_IMPRESSION;boutonImprimer.icone=FENETRE_IMPRESSION.document.createElement('img');boutonImprimer.appendChild(boutonImprimer.icone);boutonImprimer.icone.src='images/icones/impression.gif';boutonImprimer.icone.className='imageBoutonImpression';boutonImprimer.caption=FENETRE_IMPRESSION.document.createElement('span');boutonImprimer.appendChild(boutonImprimer.caption);boutonImprimer.caption.className='captionBoutonImpression';$(boutonImprimer.caption).write("Imprimer");boutonImprimer.onclick=function(){if(_browser.name=='Explorer')this.window.document.execCommand('print',false,null);else this.window.print();}
$(FENETRE_IMPRESSION.zoneImpression).className="zoneImpression";var htmlImpression="";if(htmlHeader)htmlImpression+=htmlHeader;htmlImpression+=html;$(FENETRE_IMPRESSION.zoneImpression).write(htmlImpression);if(_browser.name=='Explorer')FENETRE_IMPRESSION.document.execCommand('print',false,null);else FENETRE_IMPRESSION.print();return true;}
return false;}

function $addCss(href,attributes){var css=document.createElement("link")
css.href=href;css.rel="stylesheet";css.type="text/css";if(attributes){for(var i in attributes){css[i]=attributes[i];}}
document.getElementsByTagName('head')[0].appendChild(css);}
function $addStyle(def){var ss1=document.createElement('style');ss1.setAttribute("type","text/css");if(ss1.styleSheet){ss1.styleSheet.cssText=def;}else{var tt1=document.createTextNode(def);ss1.appendChild(tt1);}
var hh1=document.getElementsByTagName('head')[0];hh1.appendChild(ss1);}
function $addJs(src,attributes){var script=document.createElement('script');script.type='text/javascript';script.src=src;if(attributes){for(var i in attributes){css[i]=attributes[i];}}
var head=document.getElementsByTagName('head')[0]||document.documentElement;head.appendChild(script);}

	//	Retourne le html dans une fenêtre d'impression
	//===========================================
	var FENETRE_IMPRESSION=false;
	function printHTML(html,titre,arrCss,arrPage,htmlHeader,noPageBreak) 
	{
	
		// Ouvre une nouvelle fenetre
		try {
			FENETRE_IMPRESSION.document.title='';			
		}
		catch(e){
			if(_browser.name=='Explorer') FENETRE_IMPRESSION = window.open("", "ZoneImpr", "height=500, width=600,toolbar=0, menubar=0, scrollbars=1, resizable=1, status=0, location=0, left=10, top=10");
			else FENETRE_IMPRESSION = window.open("", "ZoneImpr", "height=500, width=600,toolbar=0, menubar=1, scrollbars=1, resizable=1, status=0, location=0, left=10, top=10");
		}
		
		//	Si la fenêtre s'Est ouverte correctement
		if(FENETRE_IMPRESSION!=null){
			//	Ajoute le css au header
			var headID = FENETRE_IMPRESSION.document.getElementsByTagName("head")[0];         
			if(typeof arrCss!='object')	arrCss={};
			arrCss['global']={
				url : "css/global.impression.css",
				media : "print"
			}
			arrCss['preview']={
				url : "css/global.impression.preview.css",
				media : "screen"
			}
			if(_browser.name=='Explorer'){	
				arrCss['previewPatchIE']={
					url : "css/global.impression.preview.iePatch.css",
					media : "screen"
				}	
			}
			
			for(var noCss in arrCss){
				var cssNode = FENETRE_IMPRESSION.document.createElement('link');
				cssNode.type = 'text/css';
				cssNode.rel = 'stylesheet';
				cssNode.href = arrCss[noCss]['url'];
				cssNode.media = arrCss[noCss]['media'];
				headID.appendChild(cssNode);
			}		
			
			
			
			delete arrCss['preview'];
			
			var style='';
			style+="<style type='text/css'>";
				style+="@page {";
					if(typeof arrPage=='object'){
						for(var i in arrPage){
							style+=i+":"+arrPage[i]+";";
						}
					}
				style+="}";
			style+="</style>";
			
			// clean l'html
			html=html.replace(/(<A)(.*?)(>)/gi,"");
			
			//	Retire tout les évènements avec =""
			html=html.replace(/(onclick|ondblclick|oncontextmenu|onmouseover|onmouseout|onmousemove|onmousedown|onmouseup)( )*?=( )*?'(.)*?'/gi,"");
			//	Retire tout les évènements avec =''
			html=html.replace(/(onclick|ondblclick|oncontextmenu|onmouseover|onmouseout|onmousemove|onmousedown|onmouseup)( )*?=( )*?"(.)*?"/gi,"");
			//	Remplace les événements pas de guillements par un attribut bidon
			html=html.replace(/(onclick|ondblclick|oncontextmenu|onmouseover|onmouseout|onmousemove|onmousedown|onmouseup)( )*?=/gi,"bidon=");
			// Enlève les curseurs
			html=html.replace(/(CURSOR\:)(.*?);/gi,"");  //	À revoir, ne détecte pas le ; à la fin à cause du innerHTML. Il faudrait tout mettre en class			
			html=html.replace(/(CURSOR\:)(.*?)"/gi,"\"");

			//	Ajoute la gestion du clic sur les <TD>
			if (!noPageBreak) html=html.replace(/<td /gi,"<td onclick='gestionClick(this);event.cancelBubble=true;return false;' ");
	
			// gestion du click
			if (!noPageBreak) var outerDiv = "<div id='zoneImpression' onclick='gestionClick(event.srcElement);'>";
			else var outerDiv = "<div id='zoneImpression'>";
			
			// Fonction de gestion du clic
			FENETRE_IMPRESSION.document.gestionClick = function (source) {
				var found = false;
				
				if (source.nextSibling && source.nextSibling.id=='sautPage') {
					source.parentNode.removeChild(source.nextSibling);
					found=true;
				}
				
				// si elle n'avait pas de div pageBreak
				if (!found) {
					// valide la source
					if (source.tagName == 'TABLE' || source.tagName == 'TR' || source.tagName == 'BODY') return false;
					
					// si la source est un TD
					if (source.tagName == 'TD' || source.tagName == 'TH' ) {
						// on ne fait pas de saut de page directement sous le header
						if (source.parentNode.rowIndex==0) return false;
						
						// trouve la TABLE contenant
						var tableBody = source.parentNode.parentNode;
						var table= tableBody.parentNode;
						var lineClicked=source.parentNode;
						
						// si la ligne suivante ne veut pas de pageBreak
						// on coupe avant la prochaine ligne qui accepte pageBreak
						while(lineClicked.nextSibling && lineClicked.nextSibling.noPageBreak) {
							lineClicked=lineClicked.nextSibling;
						}
						
						// si c'ets la derniere ligne de la table
						if (!lineClicked.nextSibling) {
							
							// si ya un pagebreak apres la table
							if (table.nextSibling && table.nextSibling.className=='pageBreak' || table.nextSibling.id=='sautPage') {
								table.nextSibling.onclick();
								jvs.stopPropagation(e);
							// ajoute un pagebreak apres la table
							} else {
								var divSautPage = FENETRE_IMPRESSION.document.createElement('div');
								table.parentNode.insertBefore(divSautPage, table.nextSibling);
								divSautPage.id = 'sautPage';
								
								var div = FENETRE_IMPRESSION.document.createElement('div');
								div.className = 'pageBreak';
								div.innerHTML = "Saut de page";
								divSautPage.appendChild(div);
								
								if (htmlHeader) {
									var header = FENETRE_IMPRESSION.document.createElement('div');
									header.innerHTML = htmlHeader;
									divSautPage.appendChild(header);
								}
								
								divSautPage.onclick=function(e) {
									this.parentNode.removeChild(this);
									jvs.stopPropagation(e);
								}
							}
							return false;
						}
						
						var newTable = table.cloneNode(true);
						var newTableBody = newTable.firstChild;
						
						// supprime les lignes suivantes de la premiere table
						while(lineClicked.nextSibling) {
							tableBody.removeChild(lineClicked.nextSibling);
						}
						// supprime les lignes précédentes de la nouvelle table, 
						var nbToDelete = lineClicked.rowIndex;
						while(nbToDelete--) {
							newTableBody.removeChild(newTableBody.firstChild.nextSibling);
						}
						
						// ajoute un div apres la table originale
						var div = FENETRE_IMPRESSION.document.createElement('div');
						div.className = 'pageBreak';
						div.innerHTML = "Saut de page";
						div.onclick=function(e) {
							jvs.stopPropagation(e);
							// enlève le header d'impression
							if (this.nextSibling && this.nextSibling.id=='headerImpression') {
								this.parentNode.removeChild(this.nextSibling);
							}
							
							// joindre les tables coupées
							if (this.nextSibling && this.nextSibling.id=='tableCreeParImpression') {
								var topTable = this.previousSibling;
								var bottomTableBody=this.nextSibling.firstChild;
								bottomTableBody.removeChild(bottomTableBody.firstChild);
								while(bottomTableBody.firstChild) {
									topTable.firstChild.appendChild(bottomTableBody.firstChild.cloneNode(true));
									bottomTableBody.removeChild(bottomTableBody.firstChild);
								}
								
								this.parentNode.removeChild(this.nextSibling);
							}
							// enleve le div saut de page
							this.parentNode.removeChild(this);
							
						}
						table.parentNode.insertBefore(div, table.nextSibling);
						
						// insere la nouvelle table apres le div
						newTable.id='tableCreeParImpression';
						div.parentNode.insertBefore(newTable, div.nextSibling);
						
						// ajoute le header d'impression apres le saut de page
						if (htmlHeader) {
							var header = FENETRE_IMPRESSION.document.createElement('div');
							header.innerHTML = htmlHeader;
							header.id='headerImpression';
							div.parentNode.insertBefore(header, div.nextSibling);
						}							
					// si ce n'est pas un TD
					} else {
						var divSautPage = FENETRE_IMPRESSION.document.createElement('div');
						source.parentNode.insertBefore(divSautPage,source.nextSibling);
						divSautPage.id = 'sautPage';
						
						var div = FENETRE_IMPRESSION.document.createElement('div');
						div.className = 'pageBreak';
						div.innerHTML = "Saut de page";
						divSautPage.appendChild(div);
						
						if (htmlHeader) {
							var header = FENETRE_IMPRESSION.document.createElement('div');
							header.innerHTML = htmlHeader;
							divSautPage.appendChild(header);
						}
						
						divSautPage.onclick=function(e) {
							this.parentNode.removeChild(this);
							jvs.stopPropagation(e);
						}
						
					}
				}
			}

		
			// Barre de menu
			var menu = "<div id='menuImpression'></div>";
			
			
			// Ajoute les Données
			FENETRE_IMPRESSION.document.title = (titre)?titre:'Isios';

			FENETRE_IMPRESSION.document.body.innerHTML = style+" " + menu + outerDiv + "</div>";
			
			var width = FENETRE_IMPRESSION.document.body.clientWidth;
				
			$(FENETRE_IMPRESSION.menuImpression).setStyle({
				width:width+'px'
			});

			FENETRE_IMPRESSION.document.body.onresize=function() {
				//var height = FENETRE_IMPRESSION.document.body.clientHeight-30;
				var width = FENETRE_IMPRESSION.document.body.clientWidth;
				
				$(FENETRE_IMPRESSION.menuImpression).setStyle({
					//height:height+'px'//,
					width:width+'px'
				});
			}

			// Bouton imprimer
			//var boutonImprimer = $(FENETRE_IMPRESSION.menuImpression).newNode('button');
			var boutonImprimer = FENETRE_IMPRESSION.document.createElement('button');
			FENETRE_IMPRESSION.menuImpression.appendChild(boutonImprimer);

			boutonImprimer.className='boutonImpression';

			boutonImprimer.window = FENETRE_IMPRESSION;

			//boutonImprimer.icone = boutonImprimer.newNode('img');
			boutonImprimer.icone = FENETRE_IMPRESSION.document.createElement('img');
			boutonImprimer.appendChild(boutonImprimer.icone);
			
			boutonImprimer.icone.src = 'images/icones/impression.gif';
			boutonImprimer.icone.className='imageBoutonImpression';
		
			//boutonImprimer.caption = boutonImprimer.newNode('span');
			boutonImprimer.caption = FENETRE_IMPRESSION.document.createElement('span');
			boutonImprimer.appendChild(boutonImprimer.caption);
			boutonImprimer.caption.className='captionBoutonImpression';
			
			$(boutonImprimer.caption).write("Imprimer");
		
			boutonImprimer.onclick= function() {
				/*
				alert(this.window.document.getElementById('printGantt').firstChild.firstChild.className);
				alert(this.window.document.getElementById('printGantt').firstChild.firstChild.currentStyle['backgroundImage']);
				alert(this.window.document.getElementById('patate').offsetHeight);
				alert(this.window.document.getElementById('patate').currentStyle['borderTop']);
				alert(this.window.document.getElementById('patate').currentStyle['border-top']);
				return false;
				*/
				
				//this.window.print();
				if(_browser.name=='Explorer') this.window.document.execCommand('print',false,null);
				else this.window.print();
			}
		
			
			
			$(FENETRE_IMPRESSION.zoneImpression).className="zoneImpression";	
			/*
			var height = FENETRE_IMPRESSION.document.body.clientHeight-30;
			//var width = FENETRE_IMPRESSION.document.body.clientWidth;
			
			$(FENETRE_IMPRESSION.zoneImpression).setStyle({
				height:height+'px'//,
				//width:width+'px'
			});
			*/
			
			
			
			var htmlImpression = "";
			if (htmlHeader) htmlImpression+=htmlHeader;
			htmlImpression+=html;
			
			$(FENETRE_IMPRESSION.zoneImpression).write(htmlImpression);
			
			
			
			//	Si la fenêtre est bloqué, tooltips
			jvs.arrToolTipImpression = {
					1:{
						'titre'		:	"Comment ajouter un saut de page?",
						'texte'		:	"Dans la fenêtre d'impression, cliquez à l'endroit désiré pour ajouter un {saut de page}.<br><br>Cliquez sur un saut de page pour le supprimer.",	
						'liens'		:	{},
						'disabled'	:	("")?1:0
					}
				};	
			//	Affiche le tooltips
			jvs.OBJ_TOOLTIPS.affiche(jvs.arrToolTipImpression,1,'dhtml');
			
			//FENETRE_IMPRESSION.print();
			
			//this.window.print();
			if(_browser.name=='Explorer') FENETRE_IMPRESSION.document.execCommand('print',false,null);
			else FENETRE_IMPRESSION.print();
			
			
			return true;
		}
		//	Si la fenêtre est bloqué, tooltips
		jvs.arrToolTipImpression = {
				1:{
					'titre'		:	"La fenêtre d'impression ne s'affiche pas?",
					'texte'		:	"Assurez-vous d'autoriser les fenêtres intempestives (pop-up) pour ce site. <br><br>Vous devrez ensuite vous reconnecter.",	
					'liens'		:	{},
					//'liens'		:	{1:"<A class='savoirPlus' href='javascript:jvs.aide(Array(2,1,2,0,0,0));'>"+"En savoir plus"+"</A>"},
					'disabled'	:	("")?1:0
				}
			};	
		//	Affiche le tooltips
		jvs.OBJ_TOOLTIPS.affiche(jvs.arrToolTipImpression,1,'dhtml');
		return false;
	}
	
	
	//===========================================

var ajaxWindow=function(name,post,attributs){if($id('window_'+name))return false;this.win=myDOM.addPrototype('window',$(document.body).newNode('div')).setStyle({position:'absolute',top:'0px',left:'0px',width:'500px'});this.win.id='window_'+name;if(attributs){for(var i in attributs)this.win[i]=attributs[i];}
if(!isObject(post))post={};post.ajaxWindowName=name;this.win.request=new ajax({url:(this.win.url)?this.win.url:'ajaxWindow.php',post:post,win:this.win});this.win.request.onRequestCompleted=function(responseText){this.win.executeRequest(responseText);};this.win.request.execute();this.win.executeRequest=function(responseText){eval(responseText);}
return this.win;}

$$.Ajax=new Array();$$.Ajax.xmlHttp=false;$$.Ajax.request=false;$$.Ajax.queue=new Array();$$.Ajax.onSendResquestGlobal=function(){try{frmStatut.setSessionTimeOut();}catch(e){}}
$$.Ajax.onRequestCompletedGlobal=function(){}
var ajax=function(att){this.blockInterface=true;if(typeof att=='object')for(var i in att)this[i]=att[i];this._stringPost='';this.execute=function(){if($$.Ajax.request){$$.Ajax.queue.push(this);return false;}
if(this.blockInterface){lockInterface();}
try{$$.Ajax.xmlHttp=new XMLHttpRequest();}catch(e){}
try{$$.Ajax.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}
if(!$$.Ajax.xmlHttp)try{$$.Ajax.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){alert("Votre navigateur ne supporte pas Ajax");return false}
$$.Ajax.request=this;$$.Ajax.xmlHttp.onreadystatechange=function(){if($$.Ajax.xmlHttp.readyState==1)$$.Ajax.request.readyStateText="Requ&ecirc;te au serveur, un instant";else if($$.Ajax.xmlHttp.readyState==2)$$.Ajax.request.readyStateText="Requ&ecirc;te achemin&eacute;e, en attente d'une r&eacute;ponse";else if($$.Ajax.xmlHttp.readyState==3)$$.Ajax.request.readyStateText="Transfert des donn&eacute;es";else if($$.Ajax.xmlHttp.readyState==4){$$.Ajax.request.readyStateText="Le serveur a termin&eacute;!";if($$.Ajax.xmlHttp.status==200){unlockInterface();try{if(isFunction($$.Ajax.onRequestCompletedGlobal)){$$.Ajax.request.onRequestCompletedGlobal=$$.Ajax.onRequestCompletedGlobal;$$.Ajax.request.onRequestCompletedGlobal();}
if(isFunction($$.Ajax.request.onRequestCompleted)){$$.Ajax.request.onRequestCompleted($$.Ajax.xmlHttp.responseText);}}
catch(e){alert('AJAX '+e+'\n\n'+e.message);}}
else if($$.Ajax.xmlHttp.status==404){alert('AJAX file not found');unlockInterface();}}
$$.Ajax.request.readyState=$$.Ajax.xmlHttp.readyState;if(isFunction($$.Ajax.request.onStateChanged))$$.Ajax.request.onStateChanged();if($$.Ajax.xmlHttp.readyState==4&&$$.Ajax.xmlHttp){delete $$.Ajax.xmlHttp;delete $$.Ajax.request;if($$.Ajax.queue){for(var i in $$.Ajax.queue){$$.Ajax.queue[i].execute();delete $$.Ajax.queue[i];break;}}}};$$.Ajax.xmlHttp.open("POST",this.url,true);$$.Ajax.xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8;");this.recurArrayToPost(this.post,false);if(isFunction($$.Ajax.onSendResquestGlobal)){this.onSendResquestGlobal=$$.Ajax.onSendResquestGlobal;this.onSendResquestGlobal();}
var sringPost=this._stringPost+(this.stringPost?this.stringPost:'');if(sringPost.substr(0,1)=='&')sringPost=sringPost.substr(1);$$.Ajax.xmlHttp.send(sringPost);return this;}
this.recurArrayToPost=function(arr,dimStr){for(var i in arr){if(isObject(arr[i])&&typeof arr[i].getDate!='function')this.recurArrayToPost(arr[i],(dimStr)?dimStr+'['+i+']':i);else this._stringPost+='&'+((dimStr)?dimStr+'['+i+']':i)+'='+getEncodeURIComponent(arr[i]);}}}
function getEncodeURIComponent(v){if(v&&typeof v.getDate=='function'){return encodeURIComponent(v.getFullYear()+'-'+(v.getMonth()+1)+'-'+v.getDate());}
else if(isBoolean(v))return(v)?1:0;else return encodeURIComponent(v);}

var _prototypeTable={newTableCaption:function(){return this.newNode('caption');},newTableHead:function(){return this._newTablePart('thead');},newTableBody:function(){return this._newTablePart('tbody');},newTableFoot:function(){return this._newTablePart('tfoot');},_newTablePart:function(type){var tPart=this.newNode(type);tPart.newRow=function(attributes){var row=this.newNode('tr');if(attributes)for(var i in attributes)row[i]=attributes[i];row.newCell=this.parentNode._functionsTable.row.newCell;return row;}
return tPart;},_functionsTable:{row:{newCell:function(type,attributes){var cell=this.newNode(type);if(attributes)for(var i in attributes)cell[i]=attributes[i];return cell;}}}};var $addTable=function(node){node=$(node);$addPrototype(node,_prototypeTable);return node;}

var _prototypeKeyboard={focuskeyboard:function(){$$.keyboardThis=this;this.setFocus();if(isFunction(this.onfocuskeyboard)){this.onfocuskeyboard();}
return this;},unfocuskeyboard:function(){if(isFunction(this.onunfocuskeyboard)){this.onunfocuskeyboard();}
this.removeFocus();if($$.keyboardThis==this){if($$.focusedNodes.length){for(var i=$$.focusedNodes.length-1;i>=0;i--){if(isObject($$.focusedNodes[i])){$$.keyboardThis=$$.focusedNodes[i];break;}}}
else $$.keyboardThis=false;}
return this;},setKeyboard:function(conf,keepItIfExist){if(!this.keyboard){this.keyboard=conf;}
else{if(conf){for(var keyCode in conf){if(!this.keyboard[keyCode])this.keyboard[keyCode]={}
for(var combineKeyCode in conf[keyCode]){if(this.keyboard[keyCode][combineKeyCode]&&keepItIfExist)continue;this.keyboard[keyCode][combineKeyCode]=conf[keyCode][combineKeyCode];}}}}
return this;},_onkeyboard:function(m,keyCode,e){this.modifiers=m;this.keyCode=keyCode;if(this.keyboard){if(isObject(this.keyboard[keyCode])){if(isFunction(this.keyboard[keyCode][m])){this.tmp=this.keyboard[keyCode][m];var r=this.tmp(e);this.tmp=null;if(isFunction(this.onkeyboard))this.onkeyboard(e);return(r===false)?false:true;}
else if(isString(this.keyboard[keyCode][m])){this.tmp=this.keyboard[keyCode][m];eval(this.tmp);this.tmp=null;if(isFunction(this.onkeyboard))this.onkeyboard(e);return true;}
else if(isBoolean(this.keyboard[keyCode][m])){return true;}}}}}
$$.onkeydown=function(e,keyboardThis){if(!e)e=event;if(e.keyCode>=16&&e.keyCode<=18)return false;var m=0;m+=e.altKey?1:0;m+=e.ctrlKey?2:0;m+=e.shiftKey?4:0;if(keyboardThis){var parentKeyboard=keyboardThis.parentKeyboard;var r=keyboardThis._onkeyboard(m,e.keyCode,e);if(r===true||keyboardThis.stopKeyboardPropagation){if(_browser.name=='Explorer'){try{e.returnValue=false;e.keyCode=0;}catch(e){}}
if(r===true)keyboardThis.keyCodeFound=true;stopParentsEvent(e);return false;}
else if(!r&&parentKeyboard){try{if(typeof parentKeyboard=='string'){var parentKeyboard=$id(parentKeyboard);}
else{var parentKeyboard=parentKeyboard;}
$$.onkeydown(e,parentKeyboard);}catch(e){}}
if(!r&&document.body._onkeyboard){try{var r=document.body._onkeyboard(m,e.keyCode,e);if(r===true){if(_browser.name=='Explorer'){try{e.returnValue=false;e.keyCode=0;}catch(e){}}
stopParentsEvent(e);return false;}}catch(e){}}
keyboardThis.keyCodeFound=false;}};setTimeout("document.onkeydown=function(e){$$.onkeydown(e,$$.keyboardThis)};",10);setTimeout("document.onkeypress=function(){if($$.keyboardThis&&$$.keyboardThis.keyCodeFound) return false;}",10);if(_browser.name=='Explorer'){_defaultsPrototypes.push(_frames.head._prototypeKeyboard);$addKeyboard=function(node){node=$(node);$addPrototype(node,_frames.head._prototypeKeyboard,'myKeyboard');return node;}}
else{$addKeyboard=function(node){return $(node)};$addPrototype(Element.prototype,_frames.head._prototypeKeyboard);}

var _prototypeNode={replaceNode:function(newNode){this.parentNode.replaceChild(newNode,this);return newNode;},newStyle:function(arr){for(var i in arr)this.style[i]=arr[i];return this;},setStyle:function(arr){for(var i in arr)this.style[i]=arr[i];return this;},setId:function(id){this.id=id;return this;},write:function(html){this.innerHTML=html;return this;},html:function(){return this.innerHTML;return this;},getHtml:function(){return this.innerHTML;return this;},setParams:function(params){for(var name in params)this.setParam(name,params[name]);return this;},setParam:function(name,value){if(!this._params)this._params={};this._params[name]=value;return this;},unsetParam:function(name){delete this._params[name];return this;},getParams:function(){return this._params},getParam:function(name){if(!this._params)this._params={};return this._params[name];},newText:function(text){this.appendChild(document.createTextNode(text));return this;},appendText:function(text){this.appendChild(document.createTextNode(text));return this;},newClass:function(name){if(!this.hasClass(name))this.className+=" "+name;return this;},addClass:function(name){if(!this.hasClass(name))this.className+=" "+name;return this;},hasClass:function(name){return this.className.match(new RegExp('(\\s|^)'+name+'(\\s|$)'));},replaceClass:function(a,b){this.removeClass(a);this.addClass(b);return this;},removeClass:function(name){if(this.hasClass(name)){var reg=new RegExp('(\\s|^)'+name+'(\\s|$)');this.className=this.className.replace(reg,' ');}
return this;},newAttribute:function(name,value){var attr=this.ownerDocument.createAttribute(name);attr.value=value;this.setAttributeNode(attr);return this;},setAttribute:function(name,value){var attr=this.ownerDocument.createAttribute(name);attr.value=value;this.setAttributeNode(attr);return this;},setAttributes:function(att){for(var name in att){this.setAttribute(name,att[name]);}
return this;},remove:function(){var garbage=this.ownerDocument.body.appendChild(this.ownerDocument.createElement('div'));if(this.parentNode)this.parentNode.removeChild(this);garbage.appendChild(this);garbage.innerHTML='';garbage.parentNode.removeChild(garbage);garbage=null;},setTimeout:function(func,time){if(!this.timers)this.timers=new Array();var id=getUniqueId();$$[id]=this;var timer=setTimeout("$$['"+id+"']['"+id+"_func']=$$['"+id+"'].timers['"+id+"']; $$['"+id+"']['"+id+"_func']();",time);setTimeout("$$['"+id+"'].removeAttribute('"+id+"_func'); delete $$['"+id+"'].timers['"+id+"']; delete $$['"+id+"'];",time);this.timers[id]=func;return timer;},setFocus:function(){this.removeFocus();$$.focusedNodes.push(this);return this;},removeFocus:function(){var stack=(isObject($$.focusedNodes))?$$.focusedNodes:false;$$.focusedNodes=new Array();if(isObject(stack)){for(var i=0;i<stack.length;i++){if(this!=stack[i]){$$.focusedNodes.push(stack[i]);}}}
return this;},addEvent:_addEvent,removeEvent:_removeEvent,setEvent:function(name,func){if(!isObject(this[name]))this[name]=new Array();this[name].push(func);return this;},fireEventHandlers:function(name){if(isObject(this[name])){for(var i in this[name]){this._tmpEvent=this[name][i];this._tmpEvent();}
this._tmpEvent=null;}
else if(isFunction(this[name]))this[name]();return this;}};if(_browser.name=='Explorer'){_prototypeNode.getStyle=function(v){return this.currentStyle[v];};}else{_prototypeNode.getStyle=function(v){return this.ownerDocument.defaultView.getComputedStyle(this,null).getPropertyValue(v);};}
if(_browser.name=='Explorer'){_prototypeNode.newNodeBefore=function(type){return this.parentNode.insertBefore(_ElementsPrototypeByTag[type].cloneNode(),this)};_prototypeNode.newNode=function(type){return this.appendChild(_ElementsPrototypeByTag[type].cloneNode())};_prototypeNode.newNodeAfter=function(type){return this.parentNode.insertBefore(_ElementsPrototypeByTag[type].cloneNode(),this.nextSibling)};}
else{_prototypeNode.newNodeBefore=function(type){return $(this.parentNode.insertBefore(this.ownerDocument.createElement(type),this));};_prototypeNode.newNode=function(type){return $(this.appendChild(this.ownerDocument.createElement(type)));}
_prototypeNode.newNodeAfter=function(type){return $(this.parentNode.insertBefore(this.ownerDocument.createElement(type),this.nextSibling));};}
if(_browser.name=='Explorer'){_defaultsPrototypes.push(_prototypeNode);$=function(node){if(typeof node=='string')node=$id(node);for(var p in _defaultsPrototypes)$addPrototype(node,_defaultsPrototypes[p]);return node;}}
else{$=function(node){return(typeof node=='string')?$id(node):node;}
$addPrototype(Element.prototype,_prototypeNode);$addPrototype(Text.prototype,_prototypeNode);}

var _prototypeDragDrop={drag:function(e){if(!e)e=event;this._ondrop=this._functionsDragDrop._ondrop;this._ondragstart=this._functionsDragDrop._ondragstart;this._ondrag=this._functionsDragDrop._ondrag;if(getMouseButton(e)==0){_frames.main.$$.dragThis=$(this);this._ondragstart(e);this._ondragover(e);this.drop(e);$(_frames.main.document).addEvent("mousemove",this._ondrag);$(_frames.main.document).addEvent("mouseup",this._ondrop);}
return this;},drop:function(e){this._ondragover=this._functionsDragDrop._ondragover;this._ondragout=this._functionsDragDrop._ondragout;if(_frames.main.$$.dragThis&&_frames.main.$$.dragThis.dragName==this.dragName){_frames.main.$$.dropThis=$(this);this.removeEvent("mouseout",this._ondragout);this.addEvent("mouseout",this._ondragout);this._ondragover(e);}
return this;},_functionsDragDrop:{_ondrop:function(e){var _this=(_frames.main.$$.dropThis)?_frames.main.$$.dropThis:_frames.main.$$.dragThis;if(_frames.main.$$.dragThis&&_this){if(isFunction(_this.ondrop))_this.ondrop(e);_this._ondragout(e);$(_this).removeEvent("mouseout",_this._ondragout);$(_frames.main.document).removeEvent("mousemove",_frames.main.$$.dragThis._ondrag);$(_frames.main.document).removeEvent("mouseup",_frames.main.$$.dragThis._ondrop);delete _frames.main.$$.dropThis;delete _frames.main.$$.dragThis;}},_ondragstart:function(e){if(_frames.main.$$.dragThis&&isFunction(_frames.main.$$.dragThis.ondragstart)){_frames.main.$$.dragThis.ondragstart(e);}},_ondrag:function(e){if(_frames.main.$$.dragThis&&isFunction(_frames.main.$$.dragThis.ondrag)){_frames.main.removeSelectedText();_frames.main.$$.dragThis.ondrag(e);}},_ondragover:function(e){var _this=_frames.main.$$.dropThis;if(_frames.main.$$.dragThis&&_this&&isFunction(_this.ondragover)){_this.ondragover(e);}},_ondragout:function(e){var _this=_frames.main.$$.dropThis;if(_frames.main.$$.dragThis&&_this){if(isFunction(_this.ondragout)){_this.ondragout(e);delete _frames.main.$$.dropThis;}}}}};if(_browser.name=='Explorer'){_defaultsPrototypes.push(_frames.head._prototypeDragDrop);$addDragDrop=function(node){node=$(node);$addPrototype(node,_frames.head._prototypeDragDrop,'myDragDrop');return node;}}
else{$addDragDrop=function(node){return $(node)};$addPrototype(Element.prototype,_frames.head._prototypeDragDrop,'myDragDrop');}

var _prototypeNumber={toHex:function(){var o=this.toString(16);return o[1]?o:"0"+o;},formatDollard:function(decimale){var num=this;var arrNum;var strNum='';num=this.roundFloat((decimale)?2:0);arrNum=num.toString().split('.');if(arrNum[0]<0){arrNum[0]=arrNum[0].toString().substr(1);arrNum['negatif']='-';}else arrNum['negatif']='';arrNum[0]=arrNum[0].split('').reverse().join('');if(typeof arrNum[1]=='string'){if(arrNum[1].length==1){arrNum[1]+="0";}}else arrNum[1]='00';for(i=0;i<=arrNum[0].length-1;i+=3)strNum+=arrNum[0].substr(i,3)+' ';var strDecimale='';if(decimale){strDecimale+='.'
if(parseInt(arrNum[1])){strDecimale+=arrNum[1];}else{strDecimale+='00';}}
return arrNum['negatif']+strNum.substr(0,strNum.length-1).split('').reverse().join('')+strDecimale;},roundFloat:function(p){if(typeof p!='number')p=2;p=Math.pow(10,p);return Math.round(this*p)/p;}}
$addPrototype(Number.prototype,_prototypeNumber);

var _prototypeResize={resize:function(e){if(this.noResize)return false;if(this.resizable!=true){if(this.resizeSides&1||!isNumber(this.resizeSides)){var topResize=this.newNode('div').setStyle({position:'absolute',top:'0px',left:'0px',width:(this.offsetWidth)+'px',lineHeight:"1px",height:'5px',backgroundColor:'transparent',cursor:'n-resize'});if(this.topResize)this.topResize.parentNode.replaceChild(topResize,this.topResize);this.topResize=topResize;this.topResize.onmousedown=this._functionsResize.topResize.onmousedown;}
if(this.resizeSides&2||!isNumber(this.resizeSides)){var rightResize=this.newNode('div').setStyle({position:'absolute',top:'0px',left:(this.offsetWidth-5)+'px',width:'5px',height:(this.offsetHeight)+'px',backgroundColor:'transparent',cursor:'e-resize'});if(this.rightResize)this.rightResize.parentNode.replaceChild(rightResize,this.rightResize);this.rightResize=rightResize;this.rightResize.onmousedown=this._functionsResize.rightResize.onmousedown;}
if(this.resizeSides&4||!isNumber(this.resizeSides)){var bottomResize=this.newNode('div').setStyle({position:'absolute',top:(this.offsetHeight-5)+'px',left:'0px',width:(this.offsetWidth)+'px',lineHeight:"1px",height:'5px',backgroundColor:'transparent',cursor:'s-resize'});if(this.bottomResize)this.bottomResize.parentNode.replaceChild(bottomResize,this.bottomResize);this.bottomResize=bottomResize;this.bottomResize.onmousedown=this._functionsResize.bottomResize.onmousedown;}
if(this.resizeSides&8||!isNumber(this.resizeSides)){var leftResize=this.newNode('div').setStyle({position:'absolute',top:'0px',left:'0px',width:'5px',height:(this.offsetHeight)+'px',backgroundColor:'transparent',cursor:'w-resize'});if(this.leftResize)this.leftResize.parentNode.replaceChild(leftResize,this.leftResize);this.leftResize=leftResize;this.leftResize.onmousedown=this._functionsResize.leftResize.onmousedown;}
this.resizable=true;}
return this;},unresize:function(){if(this.topResize){this.topResize.remove();this.removeAttribute('topResize');if(this.topResize)delete this.topResize;}
if(this.rightResize){this.rightResize.remove();this.removeAttribute('rightResize');if(this.rightResize)delete this.rightResize;}
if(this.bottomResize){this.bottomResize.remove();this.removeAttribute('bottomResize');if(this.bottomResize)delete this.bottomResize;}
if(this.leftResize){this.leftResize.remove();this.removeAttribute('leftResize');if(this.leftResize)delete this.leftResize;}
this.resizable=false;return this;},resetresize:function(){this.resizable=false;this.resize();return this;},_onstartresize:function(){_frames.main.$$._resizeThis=this;var ln=(typeof this.linkedNodes=='object')?this.linkedNodes:{};ln._this=this;this.linkedClones=new Array();for(var i in ln){var node=ln[i];var zIndex=node.getStyle('zIndex');if(!zIndex)zIndex=10000;this.linkedClones[i]=$(node.parentNode).newNode('div').setStyle({zIndex:zIndex,width:node.offsetWidth+'px',height:(node.offsetHeight-1)+'px',top:(node.offsetTop+node._fixsResize.topClone)+'px',left:node.offsetLeft+'px',lineHeight:'1px',position:'absolute',backgroundColor:node.getStyle('backgroundColor'),border:"1px dotted #000000"});if(typeof node.resizeNodeStyle=='object'){this.linkedClones[i].setStyle(node.resizeNodeStyle);}
if(_browser.name=='Explorer')this.linkedClones[i].style.backgroundColor='transparent';else $addEffects(this.linkedClones[i]).setOpacity(50);this.linkedClones[i].beforeResize={mouseX:_frames.main.getMouseX(),mouseY:_frames.main.getMouseY(),width:node.offsetWidth,top:node.offsetTop,left:node.offsetLeft,height:node.offsetHeight}
node.resizing=this.resizing;this.linkedClones[i].linkedNode=node;node.fireEventHandlers('onstartresize');}
if(this.resizing&1)$(_frames.main.document).addEvent('mousemove',this._onresizetop);if(this.resizing&2)$(_frames.main.document).addEvent('mousemove',this._onresizeright);if(this.resizing&4)$(_frames.main.document).addEvent('mousemove',this._onresizebottom);if(this.resizing&8)$(_frames.main.document).addEvent('mousemove',this._onresizeleft);$(_frames.main.document).addEvent('mouseup',this._onstopresize);},_onresizetop:function(){_frames.main.removeSelectedText();var _this=_frames.main.$$._resizeThis;for(var i in _this.linkedClones){var clone=_this.linkedClones[i];var height=clone.beforeResize.height+(clone.beforeResize.mouseY-_frames.main.getMouseY());if(height>=0){clone.style.top=(clone.beforeResize.top+(_frames.main.getMouseY()-clone.beforeResize.mouseY))+'px';clone.style.height=height+'px';}}
if(isFunction(_this.onresize))_this.onresize();},_onresizeright:function(){_frames.main.removeSelectedText();var _this=_frames.main.$$._resizeThis;for(var i in _this.linkedClones){var clone=_this.linkedClones[i];var width=clone.beforeResize.width+_frames.main.getMouseX()-clone.beforeResize.mouseX;if(width>=0){clone.style.width=width+'px';}}
if(isFunction(_this.onresize))_this.onresize();},_onresizebottom:function(){_frames.main.removeSelectedText();var _this=_frames.main.$$._resizeThis;for(var i in _this.linkedClones){var clone=_this.linkedClones[i];var height=clone.beforeResize.height+_frames.main.getMouseY()-clone.beforeResize.mouseY;if(height>=0){clone.style.height=height+'px';}}
if(isFunction(_this.onresize))_this.onresize();},_onresizeleft:function(){_frames.main.removeSelectedText();var _this=_frames.main.$$._resizeThis;for(var i in _this.linkedClones){var clone=_this.linkedClones[i];var width=clone.beforeResize.width+(clone.beforeResize.mouseX-_frames.main.getMouseX());if(width>=0){clone.style.left=(clone.beforeResize.left+(_frames.main.getMouseX()-clone.beforeResize.mouseX))+'px';clone.style.width=width+'px';}}
if(isFunction(_this.onresize))_this.onresize();},_onstopresize:function(){var _this=_frames.main.$$._resizeThis;for(var i in _this.linkedClones){var clone=_this.linkedClones[i];var node=clone.linkedNode;if(node.resizing&1){node.resizeFromTop=clone.offsetHeight-node.offsetHeight;node.style.top=clone.style.top;node.style.height=clone.style.height;}
if(node.resizing&2){node.resizeFromRight=clone.offsetWidth-node.offsetWidth;node.style.width=clone.style.width;}
if(node.resizing&4){node.resizeFromBottom=clone.offsetHeight-node.offsetHeight;node.style.height=clone.style.height;}
if(node.resizing&8){node.resizeFromLeft=clone.offsetWidth-node.offsetWidth;node.style.left=clone.style.left;node.style.width=clone.style.width;}
if(isFunction(node.resetresize))node.resetresize();clone.remove();node.fireEventHandlers('onstopresize');this.resizeFromTop=0;this.resizeFromRight=0;this.resizeFromBottom=0;this.resizeFromLeft=0;node.resizing=false;}
$(_frames.main.document).removeEvent('mousemove',_this._onresizetop);$(_frames.main.document).removeEvent('mousemove',_this._onresizeright);$(_frames.main.document).removeEvent('mousemove',_this._onresizebottom);$(_frames.main.document).removeEvent('mousemove',_this._onresizeleft);$(_frames.main.document).removeEvent('mouseup',_this._onstopresize);delete _frames.main.$$._resizeThis;return false;},_functionsResize:{topResize:{onmousedown:function(e){if(!e)e=event;if(getMouseButton(e)==2)return false;stopParentsEvent(e);this.parentNode.resizing=1;this.parentNode._onstartresize();}},rightResize:{onmousedown:function(e){if(!e)e=event;if(getMouseButton(e)==2)return false;stopParentsEvent(e);this.parentNode.resizing=2;this.parentNode._onstartresize();}},bottomResize:{onmousedown:function(e){if(!e)e=event;if(getMouseButton(e)==2)return false;stopParentsEvent(e);this.parentNode.resizing=4;this.parentNode._onstartresize();}},leftResize:{onmousedown:function(e){if(!e)e=event;if(getMouseButton(e)==2)return false;stopParentsEvent(e);this.parentNode.resizing=8;this.parentNode._onstartresize();}}}};if(_browser.name=='Firefox'){_prototypeResize._fixsResize={topClone:1};}
else{_prototypeResize._fixsResize={topClone:0};}
if(_browser.name=='Explorer'){_defaultsPrototypes.push(_frames.head._prototypeResize);$addResize=function(node){node=$(node);$addPrototype(node,_frames.head._prototypeResize,'myResize');return node;}}
else{$addResize=function(node){return $(node)};$addPrototype(Element.prototype,_frames.head._prototypeResize);}

var _prototypeString={pad:function(l,s,t){return s||(s=" "),(l-=this.length)>0?(s=new Array(Math.ceil(l/s.length)+1).join(s)).substr(0,t=!t?l:t==1?0:Math.ceil(l/2))+this+s.substr(0,l-t):this;},decodeAscii:function(){var tmp=this;tmp=tmp.replace(/&amp;/g,"&");tmp=tmp.replace(/&quot;/g,"\"");tmp=tmp.replace(/&#039;/g,"\'");tmp=tmp.replace(/&lt;/g,"<");tmp=tmp.replace(/&gt;/g,">");return tmp;},encodeAscii:function(){var tmp=this;tmp=tmp.replace(/&/g,"&amp;");tmp=tmp.replace(/\"/g,"&quot;");tmp=tmp.replace(/\'/g,"&#039;");tmp=tmp.replace(/</g,"&lt;");tmp=tmp.replace(/>/g,"&gt;");return tmp;},removeBR:function(){return this.replace(/<br>/gi,"\n");},setBR:function(){return this.replace(/\n/g,"<br>");},isValidEmail:function(){var emailFilter=/^.+@.+\..+$/;var illegalChars=/[\(\)\<\>\,\;\:\\\/\"\[\]]/;if(!this)return false;else if(!emailFilter.test(this))return false;else if(this.match(illegalChars))return false;else return true;},getWeight:function(){var _this=0;for(var i=0;i<this.length;i++)_this+=this.charCodeAt(i);return _this;},convertHtmlEntities:function(){var tmp=this;arrAccents={"&Agrave;":"À","&agrave;":"à","&Acirc;":"Â","&acirc;":"â","&Auml;":"Ä","&auml;":"ä","&Ccedil;":"Ç","&ccedil;":"ç","&Egrave;":"È","&egrave;":"è","&Eacute;":"É","&eacute;":"é","&Ecirc;":"Ê","&ecirc;":"ê","&Euml;":"Ë","&euml;":"ë","&Iuml;":"Ï","&iuml;":"ï","&Ugrave;":"Ù","&ugrave;":"ù","&Ucirc;":"Û","&ucirc;":"û","&ocirc;":"ô","&amp;":"&","&quot;":"\"","&#039;":"'","&lt;":"<","&gt;":">"};for(entity in arrAccents){tmp=tmp.replace(eval("/"+entity+"/g"),arrAccents[entity]);}
return tmp;},getWidth:function(){var tmpDiv=$id('getWidth');if(!tmpDiv)tmpDiv=$(document.body).newNode('div').setStyle({position:'absolute',visibility:'hidden'});tmpDiv.write(this);return tmpDiv.offsetWidth;}}
if(_browser.name=='Firefox'||_browser.name=='Google'||_browser.name=='Safari'){_prototypeString.RBGtoHEX=function(){return this.replace(/rgb\((\d+)\,\s(\d+)\,\s(\d+)\)/g,function(a,b,c,d){return"#"+parseInt(b).toHex()+parseInt(c).toHex()+parseInt(d).toHex();});}}
else{_prototypeString.RBGtoHEX=function(){return this;}}
$addPrototype(String.prototype,_prototypeString);

var _prototypeDate={newDate:function(){var d=new Date();d.setTime(this.getTime());return d;},copyDate:function(){var d=new Date();d.setTime(this.getTime());return d;},setTimeStampSQL:function(timestampsql){var tmp=timestampsql.split(" ");var d=tmp[0].split("-");this.setYear(d[0]);this.setMonth(d[1]-1);this.setDate(d[2]);var t=(tmp[1])?tmp[1].split(":"):new Array(0,0,0);this.setHours(t[0]);this.setMinutes((t[1])?t[1]:0);this.setSeconds((t[2])?t[2]:0);this.setMilliseconds(0);return this;},addYears:function(years){this.setYear(parseInt(this.getFullYear()+years));return this;},addMonths:function(months){this.setMonth(parseInt(this.getMonth()+months));return this;},addWeeks:function(weeks){this.setDate(parseInt(this.getDate()+(weeks*7)));return this;},addDays:function(days){this.setDate(parseInt(this.getDate()+days));return this;},addHours:function(hours){return this.setTime(parseInt(this.getTime()+(hours*60*60*1000)));return this;},addMinutes:function(minutes){return this.setTime(parseInt(this.getTime()+(minutes*60*1000)));return this;},addSecondes:function(seconds){return this.setTime(parseInt(this.getTime()+(seconds*1000)));return this;},getYearsBetween:function(end){alert('getYears à faire');},getMonthsBetween:function(end){alert('getMonths à faire');},getWeeksBetween:function(end){return Math.ceil(this.getDaysBetween(end)/7);},getDaysBetween:function(end){return(Math.round((Date.parse(end)-Date.parse(this))/(24*60*60*1000)))+1;},getHoursBetween:function(end){return(Date.parse(end)-Date.parse(this))/(60*60*1000);},getMinutesBetween:function(end){return(Date.parse(end)-Date.parse(this))/(60*1000);},getMonthDays:function(){return _monthsDays[this.getMonth()]+((this.getMonth()==1&&this.isBissexstile())?1:0);},isBissexstile:function(){return(this.getFullYear()%4==0)?true:false;},getMonthName:function(){return _monthsName[this.getMonth()];},getDayName:function(){return _daysName[this.getDay()];},getFormat:function(s){s=s.replace(/%l%/,this.getDayName());s=s.replace(/%j%/,this.getDate());s=s.replace(/%d%/,((this.getDate()<10)?'0'+this.getDate():this.getDate()));s=s.replace(/%F%/,this.getMonthName());s=s.replace(/%m%/,(((this.getMonth()+1)<10)?'0'+(this.getMonth()+1):(this.getMonth()+1)));s=s.replace(/%M%/,this.getMonthName().substr(0,3));s=s.replace(/%Y%/,this.getFullYear());s=s.replace(/%y%/,this.getFullYear().toString().substr(2,4));s=s.replace(/%H%/,this.getHours()<10?"0"+this.getHours():this.getHours());s=s.replace(/%i%/,this.getMinutes()<10?"0"+this.getMinutes():this.getMinutes());s=s.replace(/%s%/,this.getSeconds()<10?"0"+this.getSeconds():this.getSeconds());return s;},getPhpFormat:function(){return this.getFullYear()+'-'+(this.getMonth()+1)+'-'+this.getDate();},getSimpleFormat:function(){var month=this.getMonth()+1;var date=this.getDate();return this.getFullYear()+'-'+(((month)<10)?'0'+(month):(month))+'-'+(date<10?'0'+date:date);},getLocalFormat:function(){return this.getFormat(_localDateFormat);},getWeekOfYear:function(){this.y2k=function(number){return(number<1000)?number+1900:number;}
var year=this.getYear();var month=this.getMonth();var day=this.getDate();var when=new Date(year,month,day);var newYear=new Date(year,0,1);var offset=7+1-newYear.getDay();if(offset==8)offset=1;var daynum=((Date.UTC(this.y2k(year),when.getMonth(),when.getDate(),0,0,0)-Date.UTC(this.y2k(year),0,1,0,0,0))/1000/60/60/24)+1;var weeknum=Math.floor((daynum-offset+7)/7);if(weeknum==0){year--;var prevNewYear=new Date(year,0,1);var prevOffset=7+1-prevNewYear.getDay();if(prevOffset==2||prevOffset==8)weeknum=53;else weeknum=52;}
return weeknum;},getTodayServerTime:function(){var d=new Date();d.setTime(_today.getTime());return d;},setFirstDateOfMonth:function(){this.setDate(1);return this;},setLastDateOfMonth:function(){this.setDate(this.getMonthDays());return this;},setFirstDateOfWeek:function(){this.addDays(-this.getDay());return this;},setLastDateOfWeek:function(){this.addDays(6-this.getDay());return this;}}
var _monthsDays=new Array(31,28,31,30,31,30,31,31,30,31,30,31);var _monthsName=new Array("janvier","f&eacute;vrier","mars","avril","mai","juin","juillet","ao&ucirc;t","septembre","octobre","novembre","d&eacute;cembre");var _daysName=new Array("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");var _localDateFormat="%l% %j% %F% %Y%";var _today=new Date(2010,8,5);$addPrototype(Date.prototype,_prototypeDate);

var _prototypeMove={move:function(){if(_frames.main.$$._moveThis)_frames.main.$$._moveThis._onmovementend();if(this.resizing)return false;_frames.main.$$._moveThis=this;if(this.getStyle('position')!='absolute')this.style.position='absolute';this.spaceBetweenMouseTop=(_frames.main.getMouseY()+_frames.main.getScrollTop())-this.offsetTop;this.spaceBetweenMouseLeft=(_frames.main.getMouseX()+_frames.main.getScrollLeft())-this.offsetLeft;this._onmovement=this._functionsMovement._onmovement;this._onmovementstart=this._functionsMovement._onmovementstart;this._onmovementend=this._functionsMovement._onmovementend;this.cancelmovement=this._functionsMovement.cancelmovement;this._onmovementstart();$(_frames.main.document).addEvent("mousemove",this._onmovement);$(_frames.main.document).addEvent("mouseup",this._onmovementend);return this;},_functionsMovement:{cancelmovement:function(){this.movementcanceled=true;this._onmovementend();},_onmovement:function(){var _this=_frames.main.$$._moveThis;if(!_this.noYmove){_this.cloned.style.top=(_frames.main.getMouseY()-_this.spaceBetweenMouseTop+_frames.main.getScrollTop())+'px';_this.distanceY=_this.cloned.offsetTop-_this.offsetTop;}
if(!_this.noXmove){_this.cloned.style.left=(_frames.main.getMouseX()-_this.spaceBetweenMouseLeft+_frames.main.getScrollLeft())+'px';_this.distanceX=_this.cloned.offsetLeft-_this.offsetLeft;}
try{if(isFunction(_this.onmovement))_this.onmovement();}
catch(e){}},_onmovementstart:function(){document.onselectstart=function(e){stopParentsEvent(e);return false;};var _this=_frames.main.$$._moveThis;if(_this){_this.cloned=$(_this.parentNode).newNode('div');_this.cloned.setStyle({zIndex:_this.getStyle('zIndex'),top:(_this.offsetTop+_this._fixsMovement.topClone)+'px',left:_this.offsetLeft+'px',height:'10px',position:'absolute'});if(_browser.name!='Explorer'){$addEffects(_this.cloned).setOpacity(50);}
_this.style.MozUserSelect='none';var ln=(typeof _this.linkedNodes=='object')?_this.linkedNodes:{};ln._this=_this;_this.linkedClones=new Array();for(var i in ln){var node=ln[i];var cloned=node.cloneNode((_this.cloneChildsBeforeMovement)?true:false);_this.cloned.appendChild(cloned);cloned.myParentClone=node;cloned.setStyle({height:node.offsetHeight+'px',top:(node.offsetTop-_this.offsetTop)+'px',left:(node.offsetLeft-_this.offsetLeft)+'px'});if(_this.cloned.offsetWidth<cloned.offsetWidth)_this.cloned.style.width=cloned.offsetWidth+'px';if(_this.cloned.offsetHeight<cloned.offsetHeight)_this.cloned.style.height=cloned.offsetHeight+'px';_this.linkedClones.push(cloned);}
_this.moving=true;try{if(isFunction(_this.onmovementstart))_this.onmovementstart();}
catch(e){}}},_onmovementend:function(){var _this=_frames.main.$$._moveThis;document.onselectstart=null;if(_this){_this.style.MozUserSelect='';$(_frames.main.document).removeEvent("mousemove",_this._onmovement);$(_frames.main.document).removeEvent("mouseup",_this._onmovementend);if(!_this.movementcanceled){_this.distanceX=_this.cloned.offsetLeft-_this.offsetLeft;_this.distanceY=_this.cloned.offsetTop-_this.offsetTop;var ln=_this.linkedClones;for(var i in ln){var cloned=ln[i];var ns=cloned.myParentClone.style;if(!_this.noYmove)ns.top=(parseFloat(_this.style.top)+_this.distanceY)+'px';if(!_this.noXmove)ns.left=(parseFloat(_this.style.left)+_this.distanceX)+'px'}}
_this.cloned.remove();_this.moving=false;if(isFunction(_this.onmovementend)){_this.onmovementend();}
_this.movementcanceled=false;delete _frames.main.$$._moveThis;}}}};if(_browser.name=='Firefox'){_prototypeMove._fixsMovement={topClone:1}}
else{_prototypeMove._fixsMovement={topClone:0}}
if(_browser.name=='Explorer'){_defaultsPrototypes.push(_frames.head._prototypeMove);$addMove=function(node){node=$(node);$addPrototype(node,_frames.head._prototypeMove,'myMove');return node;}}
else{$addMove=function(node){return $(node)};$addPrototype(Element.prototype,_frames.head._prototypeMove,'myMove');}

var _prototypeCookie={getCookie:function(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen)
{var j=i+alen;if(document.cookie.substring(i,j)==arg){var endstr=document.cookie.indexOf(";",j);if(endstr==-1)endstr=document.cookie.length;return unescape(document.cookie.substring(j,endstr));}
i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
return null;},setCookie:function(name,value,expires,secure,path,domain){if(typeof expires=='number'){var days=expires;var expires=new Date();expires.setDate(parseInt(expires.getDate()+days));}
document.cookie=name+"="+escape(value)+
((!expires)?"":("; expires="+expires.toGMTString()))+
((!path)?"":("; path="+path))+
((!domain)?"":("; domain="+domain))+
((!secure)?"":"; secure");},removeCookie:function(name){this.setCookie(name,null,-360);}};var $addCookie=function(node){node=$(node);$addPrototype(node,_prototypeCookie);return node;}

var _prototypeEffects={slide:function(direction,slideTo){if(this.isOnSlide)this.stopSlide();var _slideDirections={'t':function(i){this.style.top=(this.topStart+((this.offsetHeight*i)/100))+'px';},'b':function(i){this.style.top=(this.topStart-((this.offsetHeight*i)/100))+'px';},'l':function(i){this.style.left=(this.leftStart-((this.offsetWidth*i)/100))+'px';},'r':function(i){this.style.left=(this.leftStart+((this.offsetWidth*i)/100))+'px';},'tl':function(i){this.style.top=(this.topStart+((this.offsetHeight*i)/100))+'px';this.style.left=(this.leftStart+((this.offsetWidth*i)/100))+'px';},'rb':function(i){this.style.top=(this.topStart-((this.offsetHeight*i)/100))+'px';this.style.left=(this.leftStart-((this.offsetWidth*i)/100))+'px';},'bl':function(i){this.style.top=(this.topStart-((this.offsetHeight*i)/100))+'px';this.style.left=(this.leftStart+((this.offsetWidth*i)/100))+'px';},'tr':function(i){this.style.top=(this.topStart+((this.offsetHeight*i)/100))+'px';this.style.left=(this.leftStart-((this.offsetWidth*i)/100))+'px';}}
if(_slideDirections[direction])this._slide=_slideDirections[direction];else return false;this.slideTo=((slideTo)?slideTo:100);if(!isNumber(this.slidePosition))this.slidePosition=0;if(!isNumber(this.slideTime))this.slideTime=0.5;this.leftStart=this.offsetLeft;this.topStart=this.offsetTop;if(!this.globalVarName)$$[this.globalVarName=getUniqueId()]=this;this.slideTimers=new Array();for(var i=this.slidePosition;i<=this.slideTo;i++){var slideTime=this.slideTime;this.slideTimers[i]=setTimeout("var _this=$$['"+this.globalVarName+"'];_this.isOnSlide=true;_this._slide("+i+");",(slideTime*10)*i);}
this.slideTimers.onslideend=setTimeout("var _this=$$['"+this.globalVarName+"'];_this.isOnSlide=false;if(isFunction(_this.onslideend)) _this.onslideend();this._slide=null",((this.slideTime*10)*(this.slideTo-this.slidePosition))+100);},stopSlide:function(){if(this.slideTimers)for(var i in this.slideTimers)clearTimeout(this.slideTimers[i]);this.slideTimers=new Array();this.isOnSlide=false;if(isFunction(this.onslidestop))this.onslidestop();},fadeIn:function(fadeTo){if(this.isOnFade)this.stopFade();this.fadeTo=((fadeTo)?fadeTo:100);if(!isNumber(this.opacity))this.opacity=0;if(!isNumber(this.fadeTime))this.fadeTime=0.5;this.fadeRealTime=(this.fadeTime/100)*(this.fadeTo-this.opacity);if(!this.globalVarName)$$[this.globalVarName=getUniqueId()]=this;this.fadeTimers=new Array();for(var i=this.opacity;i<=this.fadeTo;i++){this.fadeTimers[i]=setTimeout("$$['"+this.globalVarName+"'].isOnFade=true;$$['"+this.globalVarName+"'].setOpacity("+(i)+");",(this.fadeRealTime*10)*i);}
this.fadeTimers.onfadeinend=setTimeout("$$['"+this.globalVarName+"'].isOnFade=false;$$['"+this.globalVarName+"'].style.filter='';if(isFunction($$['"+this.globalVarName+"'].onfadeinend)) $$['"+this.globalVarName+"'].onfadeinend();",((this.fadeRealTime*10)*(this.fadeTo-this.opacity))+100);},fadeOut:function(fadeTo){if(this.isOnFade)this.stopFade();this.fadeTo=((fadeTo)?fadeTo:0);if(!isNumber(this.opacity))this.opacity=100;if(!isNumber(this.fadeTime))this.fadeTime=0.5;this.fadeRealTime=(this.fadeTime/100)*(this.opacity-this.fadeTo);if(!this.globalVarName)$$[this.globalVarName=getUniqueId()]=this;this.fadeTimers=new Array();for(var i=this.opacity;i>=this.fadeTo;i--){this.fadeTimers[i]=setTimeout("$$['"+this.globalVarName+"'].isOnFade=true;$$['"+this.globalVarName+"'].setOpacity("+(i)+");",(this.fadeRealTime*10)*(100-i));}
this.fadeTimers.onfadeoutend=setTimeout("$$['"+this.globalVarName+"'].isOnFade=false;$$['"+this.globalVarName+"'].style.filter='';if(isFunction($$['"+this.globalVarName+"'].onfadeoutend)) $$['"+this.globalVarName+"'].onfadeoutend();",((this.fadeRealTime*10)*(this.opacity-this.fadeTo))+100);},stopFade:function(){if(this.fadeTimers)for(var i in this.fadeTimers)clearTimeout(this.fadeTimers[i]);this.fadeTimers=new Array();this.isOnFade=false;this.style.filter='';if(isFunction(this.onfadestop))this.onfadestop();},movesTo:function(path){if(path)this._path=path;var coords=false;for(var i in this._path){coords=this._path[i];this.moveTo(this.offsetLeft+coords[0],this.offsetTop+coords[1],coords[2]);this.setEvent('onmovetoend',function(){this.movesTo();});break;};if(typeof coords=='undefined'){this.fireEventHandlers('onmovestoend');this._path=false;}
else delete this._path[i];},moveTo:function(left,top,time){this.speedX=0;this.speedY=0;var loops=100;if(this.isOnMoveTo)this.stopMoveTo();if(!isNumber(time))time=1;this.isOnMoveTo=true;if(!this.globalVarName)$$[this.globalVarName=getUniqueId()]=this;var strToExecute="var _this=$$['"+this.globalVarName+"'];";if(left>this.offsetLeft){this.speedX=(left-this.offsetLeft)/loops;strToExecute+="_this.style.left=(_this.offsetLeft+_this.speedX)+'px';"}
else if(this.offsetLeft>left){this.speedX=(this.offsetLeft-left)/loops;strToExecute+="_this.style.left=(_this.offsetLeft-_this.speedX)+'px';"}
if(top>this.offsetTop){this.speedY=(top-this.offsetTop)/loops;strToExecute+="_this.style.top=(_this.offsetTop+_this.speedY)+'px';"}
else if(this.offsetTop>top){this.speedY=(this.offsetTop-top)/loops;strToExecute+="_this.style.top=(_this.offsetTop-_this.speedY)+'px';"}
this.moveToTimers=new Array();var timePerLoop=time/loops;for(var i=0;i<=loops;i++){this.moveToTimers[i]=setTimeout(strToExecute,(timePerLoop*1000)*(loops-i));}
this.moveToTimers.onmovetoend=setTimeout("var _this=$$['"+this.globalVarName+"'];_this.fireEventHandlers('onmovetoend')",time*1000);},stopMoveTo:function(){debug('stop');if(this.moveToTimers)for(var i in this.moveToTimers)clearTimeout(this.moveToTimers[i]);this.moveToTimers=new Array();this.isOnMoveTo=false;if(isFunction(this.onmovetostop))this.onmovetostop();},explodeEffect:function(direction){var _expandDirections={'t':function(i){this.clone.display.style.top=(i*(this.offsetHeight/100))+'px';},'b':function(i){this.clone.display.style.top=-(i*(this.offsetHeight/100))+'px';},'l':function(i){this.clone.display.style.left=(i*(this.offsetWidth/100))+'px';},'r':function(i){this.clone.display.style.left=-(i*(this.offsetWidth/100))+'px';},'tl':function(i){this.clone.display.style.top=(i*(this.offsetHeight/100))+'px';this.clone.display.style.left=(i*(this.offsetWidth/100))+'px';},'rb':function(i){this.clone.display.style.left=-(i*(this.offsetWidth/100))+'px';this.clone.display.style.top=-(i*(this.offsetHeight/100))+'px';},'bl':function(i){this.clone.display.style.top=-(i*(this.offsetHeight/100))+'px';this.clone.display.style.left=(i*(this.offsetWidth/100))+'px';},'tr':function(i){this.clone.display.style.top=(i*(this.offsetHeight/100))+'px';this.clone.display.style.left=-(i*(this.offsetWidth/100))+'px';}}
this.expandDirection=direction;if(!isNumber(this.expandTime))this.expandTime=0.5;this.explodeRealTime=this.expandTime;if(!this.globalVarName)$$[this.globalVarName=getUniqueId()]=this;if(this.getStyle('position')!='relative'&&this.getStyle('position')!='absolute')this.style.position='relative';this.clone=this.newNode('div').setStyle({position:'absolute',top:'-1px',left:'-1px',height:this.offsetHeight+'px',width:this.offsetWidth+'px',overflow:'hidden'});this.clone.display=this.clone.newNode('div').setStyle({position:'absolute',top:'-1px',left:'-1px',height:(this.offsetHeight+1)+'px',width:(this.offsetWidth+1)+'px',backgroundColor:'#ffffff',border:'1px solid #000000'});this.style.visibility='visible';this._onexpand=_expandDirections[this.expandDirection];this.explodeTimers=new Array();for(var i=1;i<=100;i++){this.explodeTimers[i]=setTimeout("$$['"+this.globalVarName+"'].isOnExplode=true;$$['"+this.globalVarName+"']._onexpand("+(i)+");",(this.explodeRealTime*10)*i);}
this._onexplodeend=this._functionsEffects._onexplodeend;this.explodeTimers.onexplodeend=setTimeout("$$['"+this.globalVarName+"'].isOnExplode=false;$$['"+this.globalVarName+"']._onexplodeend();",this.explodeRealTime*1000);},startLineMouseEffect:function(){if($$._lineMouseEffect)$$._lineMouseEffect.mouseup();$$._lineMouseEffect=new Array();var arr=$$._lineMouseEffect;arr.dots=(this.dots)?this.dots:15;arr.dotsColor=(this.dotsColor)?this.dotsColor:'#000000';arr.x=getMouseX();arr.y=getMouseY();arr.nodes=new Array();for(var i=0;i<arr.dots;i++){var dot=$(document.body).newNode('div');dot.setStyle({position:'absolute',lineHeight:'1px',height:'2px',width:'2px',top:arr.y,left:arr.x,visibility:'hidden',backgroundColor:arr.dotsColor}).write("&nbsp;");arr.nodes[i]=dot;}
arr.mousemove=function(){try{var arr=$$._lineMouseEffect;for(var i=0;i<arr.dots;i++){var distance=(i/arr.dots);var top=((getMouseY()-arr.y)*(distance))+arr.y;var left=((getMouseX()-arr.x)*(distance))+arr.x;arr.nodes[i].setStyle({visibility:'visible',top:top+'px',left:left+'px'});}}
catch(e){}};arr.mouseup=function(){var arr=$$._lineMouseEffect;$(document).removeEvent('mousemove',arr.mousemove);$(document).removeEvent('mouseup',arr.mouseup);for(var i=0;i<arr.dots;i++){if(arr.nodes[i]){arr.nodes[i].remove();delete arr.nodes[i];}}
delete $$._lineMouseEffect;};$(document).addEvent('mousemove',arr.mousemove);$(document).addEvent('mouseup',arr.mouseup);},_functionsEffects:{_lineMouseEffect:{},_onexplodeend:function(){if(isFunction(this.onexplodeend))this.onexplodeend();if(this.clone){this.clone.remove();this.removeAttribute('clone');}
if(this.clone)delete this.clone;}}};if(_browser.name=='Explorer'){_prototypeEffects.setOpacity=function(v){this.opacity=v;this.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity='+v+')';if(this.opacity==100)this.style.filter='';};}else{_prototypeEffects.setOpacity=function(v){this.opacity=v;this.style.opacity=v/100;this.style.filter='alpha(opacity='+v+')';};}
var $addEffects=function(node){node=$(node);$addPrototype(node,_prototypeEffects);return node;}

var _prototypeInputRitchText={createInputRitchText:function(options){if(!this.id)this.id=getUniqueId();this.className='inputRitchText inputRitchTextTheme';if(options)for(var c in options)this[c]=options[c];this.useIframe=false;var buttons=this.newNode('div');buttons.id='inputRitchTextButtons'+this.id;buttons.className='buttons';if(this.useIframe){var iframe=this.newNode('iframe');iframe.className='iframe';iframe.id='inputRitchTextIframe'+this.id;iframe.frameborder=0;if(_browser.name='Explorer'){iframe.onfocus=function(){debug('onfocus');}
iframe.onblur=function(){debug('onblur');}}
this.appendChild(iframe);var doc=iframe.contentWindow.document;doc.contentEditable=true;doc.designMode='on';}
else{var content=this.newNode('div');content.id='inputRitchTextContent'+this.id;content.className='content';content.contentEditable=true;this.content=content;}
var textarea=this.newNode('textarea');textarea.name=(this.name)?this.name:'';textarea.id='inputRitchTextTextarea'+this.id;this.appendChild(textarea);this.setValue=this._functionsInputRitchText.setValue;this.setButtons=this._functionsInputRitchText.setButtons;this.setReadOnly=this._functionsInputRitchText.setReadOnly;this.getValue=this._functionsInputRitchText.getValue;this.getSelectedText=this._functionsInputRitchText.getSelectedText;this.updateTextarea=this._functionsInputRitchText.updateTextarea;this.apply=this._functionsInputRitchText.apply;$addKeyboard(this).setKeyboard({8:{0:function(){}}});if(this.readOnly)this.setReadOnly(true);this.setButtons(this.buttons?this.buttons:new Array('bold','italic','underline','justifyleft','justifycenter','justifyright','insertunorderedlist','insertorderedlist','upsize','downsize'));var p=this.parentNode;while(p){if(p.tagName&&p.tagName.toString().toLowerCase()=='form'){break;}
p=p.parentNode;}
return this;},_functionsInputRitchText:{setReadOnly:function(e){},setValue:function(html){if(html){if(this.useIframe){var doc=$id('inputRitchTextIframe'+this.id).contentWindow.document;doc.open();doc.write(html);doc.close();}
else{var content=$id('inputRitchTextContent'+this.id).write(html);}
this.updateTextarea();}
return this;},setButtons:function(buttons){if(buttons){var buttonsBar=$id('inputRitchTextButtons'+this.id);if(buttonsBar){for(var i in buttons){var name=buttons[i];var button=buttonsBar.newNode('div');button.name=name;button.className='button icon'+(name.substr(0,1).toUpperCase()+name.substr(1));button.onmousedown=function(){stopParentsEvent();this.parentNode.parentNode.apply(this.name);return false;}
button=null;}}}
return this;},getSelectedText:function(){if(this.useIframe){var iframe=$id('inputRitchTextIframe'+this.id);var win=iframe.contentWindow;var doc=iframe.contentWindow.document;}
else{var win=window;var doc=document;}
if(_browser.name=="Explorer"){var theText=doc.selection;if(theText.type=='Text'){var newText=theText.createRange();selectedText=newText.text;}}
else{var selectedText=win.getSelection();}
return selectedText;},getValue:function(){this.updateTextarea();if(this.useIframe){}
else{return $id('inputRitchTextContent'+this.id).getHtml();}},focus:function(){if(this.useIframe){}
else{var doc=document;var content=$id('inputRitchTextContent'+this.id);content.focus();}},apply:function(cmd){if(this.useIframe){var iframe=$id('inputRitchTextIframe'+this.id);var doc=iframe.contentWindow.document;}
else{var doc=document;var content=$id('inputRitchTextContent'+this.id);content.focus();}
try{doc.execCommand(cmd,false,null);}catch(e){}
return this;},updateTextarea:function(){var content=$id('inputRitchTextContent'+this.id);var textarea=$id('inputRitchTextTextarea'+this.id);textarea.value=content.getHtml();return this;},onFormSubmit:function(){}}};var $addInputRitchText=function(node){node=$(node);$addPrototype(node,_prototypeInputRitchText);return node;}

var _prototypeInputSlide={createInputSlide:function(conf){if(!this.id)this.id=getUniqueId()+'inputSlide';if(!this.value)this.value=0;this.className='inputSlide inputSlideTheme';if(conf)for(var c in conf)this[c]=conf[c];var slide=this.newNode('div');slide.id='slide'+this.id;slide.className='slide';slide.idSlide=this.id;var button=slide.newNode('button');button.id='button'+this.id;button.idSlide=this.id;$addMove(button).noYmove=true;this.onmousedown=this._functionsInputSlide.onmousedown;button.onmousedown=this._functionsInputSlide.button.onmousedown;button.onmovementstart=this._functionsInputSlide.button.onmovementstart;if(!isFunction(this.onslide))this.onslide=this._functionsInputSlide.onslide;button.onmovement=this._functionsInputSlide.button.onmovement;button.onmovementend=this._functionsInputSlide.button.onmovementend;button.onfocus=this._functionsInputSlide.button.onfocus;button.onblur=this._functionsInputSlide.button.onblur;var input=createInput('hidden',(this.name)?this.name:'');input.id='input'+this.id;input.idSlide=this.id;input.value=0;this.appendChild(input);this.setValue=this._functionsInputSlide.setValue;this.setSlide=this._functionsInputSlide.setSlide;this.focus=this._functionsInputSlide.focus;$addKeyboard(this);this.keyboard={37:{0:function(){this.setSlide(this.value-10)}},39:{0:function(){this.setSlide(this.value+10);}}};this.setReadOnly=this._functionsInputSlide.setReadOnly;if(this.readOnly)this.setReadOnly(true);input=null;button=null;viewValue=null;slide=null;return this;},_functionsInputSlide:{onmousedown:function(){if(!this.readOnly){var value=Math.floor(((getMouseX()-absoluteLeft(this)+1)/this.offsetWidth)*100);this.setSlide(value);}},onslide:new Function(),button:{onmousedown:function(){if(!this.parentNode.parentNode.readOnly){this.move();this.cloned.className='buttonOnMovement';}},onmovementstart:function(){this.style.visibility='hidden';var viewValue=$(document.body).newNode('div').setStyle({top:(getMouseY()+15)+'px',left:(getMouseX()+15)+'px'});;viewValue.write(this.parentNode.parentNode.value+'%').className='inputSlideViewValue';this.viewValue=viewValue;if(!this.parentNode.parentNode.readOnly){if(isFunction(this.parentNode.parentNode.onslidestart))this.parentNode.parentNode.onslidestart();}},onmovement:function(){if(!this.parentNode.parentNode.readOnly){if(this.cloned){this.parentNode.parentNode.setValue(Math.floor(((this.cloned.offsetLeft)/this.parentNode.offsetWidth)*100));if(this.parentNode.parentNode.value<=0)this.cloned.style.left='0px';else if(this.parentNode.parentNode.value>=100)this.cloned.style.left=this.parentNode.offsetWidth+'px';this.viewValue.setStyle({top:(getMouseY()+15)+'px',left:(getMouseX()+15)+'px'}).write(this.parentNode.parentNode.value+'%');this.parentNode.parentNode.onslide();}}},onmovementend:function(){this.style.visibility='';if(!this.parentNode.parentNode.readOnly){if(isFunction(this.parentNode.parentNode.onslideend))this.parentNode.parentNode.onslideend();}
this.viewValue.remove();this.viewValue=null;},onfocus:function(){if(!this.parentNode.parentNode.readOnly){this.parentNode.parentNode.focuskeyboard();if(isFunction(this.parentNode.parentNode.onfocus))this.parentNode.parentNode.onfocus();}},onblur:function(){if(!this.parentNode.parentNode.readOnly){this.parentNode.parentNode.unfocuskeyboard();if(isFunction(this.parentNode.parentNode.onblur))this.parentNode.parentNode.onblur();}}},setValue:function(value){var input=$id('input'+this.id);if(isNumber(value)){if(value>100)value=100;else if(value<0)value=0;input.value=value;this.value=value;}},setSlide:function(value){this.setValue(value);var slide=$id('slide'+this.id);var button=$id('button'+this.id);button.style.left=(slide.offsetWidth*(this.value/100))+'px';},focus:function(){var button=$id('button'+this.id);button.focus();},setReadOnly:function(readOnly){this.readOnly=(readOnly)?true:false;var button=$id('button'+this.id);if(this.readOnly){this.className='inputSlide readOnly';button.className='buttonReadOnly';button.disabled=true;}else{button.disabled=false;button.className='';this.className='inputSlide';}}}};var $addInputSlide=function(node){node=$(node);$addPrototype(node,_prototypeInputSlide);return node;}

var _prototypePopup={popup:function(popupHtml,displayPopUpBesidesNode){if($$._popUp){if($$._popUp.timeoutHide)clearTimeout($$._popUp.timeoutHide);if($$._popUp!=this){$$._popUp.hidePopup();}
else{return false;}}
this.displayPopUpBesidesNode=displayPopUpBesidesNode;$$._popUp=this;this.popupHtml=popupHtml;$$._popUp.timeoutShow=setTimeout("$$._popUp.showPopup()",250);this.addEvent("mouseout",$$._popUp.removeTimeoutShowPopup);$(_frames.main.document).addEvent("mousedown",$$._popUp.hidePopup);},removeTimeoutShowPopup:function(){if($$._popUp){if($$._popUp.timeoutShow){clearTimeout($$._popUp.timeoutShow);}else{$$._popUp.hidePopup();return false;}
$$._popUp.removeEvent("mouseout",$$._popUp.removeTimeoutShowPopup);$(_frames.main.document).removeEvent("mousedown",$$._popUp.hidePopup);delete $$._popUp;}},showPopup:function(){var _this=$$._popUp;_this.removeEvent("mouseout",$$._popUp.removeTimeoutShowPopup);while($id('myDOMPopUp')){$id('myDOMPopUp').remove();}
_this.popUp=$(document.createElement('div'));_this.popUp.id='myDOMPopUp';if(this.displayPopUpY=='bottom'){var top=absoluteTop(_this)+_this.offsetHeight+2;}else if(this.displayPopUpY=='top'){var top=absoluteTop(_this)+2;}else{var top=getMouseY()+20;}
if(this.displayPopUpX=='right'){var left=absoluteLeft(_this)+_this.offsetWidth+2;}else if(this.displayPopUpX=='left'){var left=absoluteLeft(_this)+2;}else{var left=getMouseX();}
_this.popUp.setStyle({left:0+'px',top:0+'px',position:'absolute',border:'1px solid #999',backgroundColor:'#ffc',zIndex:'9999'});document.body.appendChild(_this.popUp);_this.popUp.write(_this.popupHtml);_this.popUp.style.width=_this.popUp.offsetWidth+'px';if((left+_this.popUp.offsetWidth)>getVisibleWidth()){left=getVisibleWidth()-_this.popUp.offsetWidth;}
_this.popUp.style.left=left+'px';if(top+_this.popUp.offsetHeight>getVisibleHeight()){top=getVisibleHeight()-_this.popUp.offsetHeight;}
_this.popUp.style.top=top+'px';if(_this.fadeInpopUp){$addEffects(_this.popUp);_this.popUp.setOpacity(0);_this.popUp.fadeTime=0.2;_this.popUp.fadeIn();}
_this.popUp.onmouseover=this._functionsPopup.popUp.onmouseover;_this.popUp.onmouseout=this._functionsPopup.popUp.onmouseout;_this.addEvent("mouseout",$$._popUp.timeoutHidePopup);return _this;},timeoutHidePopup:function(){if($$._popUp){clearTimeout($$._popUp.timeoutHide);$$._popUp.timeoutHide=setTimeout("if($$._popUp) $$._popUp.hidePopup()",100);}else{}},hidePopup:function(){if($$._popUp){var _this=$$._popUp;if($$._popUp.timeoutHide)clearTimeout($$._popUp.timeoutHide);if($$._popUp.timeoutShow)clearTimeout($$._popUp.timeoutShow);this.removeEvent("mouseout",$$._popUp.timeoutHidePopup);if(_this.popUp){_this.popUp.remove();_this.removeAttribute('popUp');if(_this.popUp)delete _this.popUp;}
if($$._popUp)delete $$._popUp;}else{}},_functionsPopup:{popUp:{onmouseover:function(){if($$._popUp)clearTimeout($$._popUp.timeoutHide);},onmouseout:function(){if($$._popUp)$$._popUp.timeoutHidePopup();}}}};var $addPopup=function(node){node=$(node);$addPrototype(node,_prototypePopup);return node;}

var _prototypeRoundCorners={setRoundCorners:function(conf){if(conf)for(var c in conf)this[c]=conf[c];if(!this.color){debug('please set a color for the round box');return false;}
return this;},addTopRoundCorners:function(){if(this.noTopLeftCorner){this.baseClassName='roundRightCorner';}else{this.baseClassName='roundCorners';}
var ligne=this.newNode('div').setStyle({backgroundColor:(this.borderColor)?this.borderColor:this.color});ligne.className=this.baseClassName+'1';ligne=this.newNode('div').setStyle({backgroundColor:this.color});if(this.borderColor){ligne.setStyle({borderRight:"2px solid "+this.borderColor,borderLeft:((this.noTopLeftCorner)?'1':'2')+"px solid "+this.borderColor});}
ligne.className=this.baseClassName+'2';ligne=this.newNode('div').setStyle({backgroundColor:this.color});if(this.borderColor){ligne.setStyle({borderRight:"1px solid "+this.borderColor,borderLeft:"1px solid "+this.borderColor});}
ligne.className=this.baseClassName+'3';ligne=this.newNode('div').setStyle({backgroundColor:this.color});if(this.borderColor){ligne.setStyle({borderRight:"1px solid "+this.borderColor,borderLeft:"1px solid "+this.borderColor});}
ligne.className=this.baseClassName+'4';return this;},addBottomRoundCorners:function(){var ligne=this.newNode('div').setStyle({backgroundColor:this.color});if(this.borderColor){ligne.setStyle({borderRight:"1px solid "+this.borderColor,borderLeft:"1px solid "+this.borderColor});}
ligne.className='roundCorners4';ligne=this.newNode('div').setStyle({backgroundColor:this.color});if(this.borderColor){ligne.setStyle({borderRight:"1px solid "+this.borderColor,borderLeft:"1px solid "+this.borderColor});}
ligne.className='roundCorners3';ligne=this.newNode('div').setStyle({backgroundColor:this.color});if(this.borderColor){ligne.setStyle({borderRight:"2px solid "+this.borderColor,borderLeft:"2px solid "+this.borderColor});}
ligne.className='roundCorners2';ligne=this.newNode('div').setStyle({backgroundColor:(this.borderColor)?this.borderColor:this.color});ligne.className='roundCorners1';return this;}};var $addRoundCorners=function(node){node=$(node);$addPrototype(node,_prototypeRoundCorners);return node;}

$$.zIndexTop=1000;myDOM._prototypes.window={createWindow:function(conf){if(!this.id)this.setId(getUniqueId());if(conf)for(var c in conf)this[c]=conf[c];this.addClass('window windowTheme');this.headerNode=this.newNode('div').addClass('header');if(_browser.name!='Explorer')this.headerNode.addClass('windowHeaderEffects');if(this.icon){var iconMain=this.headerNode.newNode('img').addClass('icon iconImg');iconMain.src=this.icon;}
else{var iconMain=this.headerNode.newNode('div').addClass('icon iconMain');}
iconMain.ondragstart=function(){return false}
iconMain.ondblclick=function(){this.parentNode.parentNode.closeWindow();};iconMain=null;this.headerTitle=this.headerNode.newNode('div').addClass('title titleTheme');this.headerTitle.onmousedown=this._functionsWindow.headerTitle.onmousedown;this.headerTitle.ondblclick=this._functionsWindow.headerTitle.ondblclick;var iconMaximize=this.headerNode.newNode('div').addClass('icon iconMaximize');this.iconMaximize=iconMaximize;if(!this.windowResizable){iconMaximize.replaceClass('iconMaximize','iconMaximizeDisabled');iconMaximize.disabled=true;iconMaximize.onclick=function(){$addPopup(this).popup("Cette fen&ecirc;tre ne peut &ecirc;tre redimensionner",true);};}
else{iconMaximize.onclick=function(){var win=this.parentNode.parentNode;win.maximizeWindow();};}
iconMaximize.ondragstart=function(){return false}
iconMaximize=null;var iconMinimize=this.headerNode.newNode('div').addClass('icon iconMinimize');this.iconMinimize=iconMinimize;if(this.modal){iconMinimize.replaceClass('iconMinimize','iconMinimizeDisabled');iconMinimize.disabled=true;iconMinimize.onclick=function(){$addPopup(this).popup("Cette fen&ecirc;tre ne peut &ecirc;tre r&eacute;duite",true);};}
else{iconMinimize.onclick=function(){var win=this.parentNode.parentNode;win.minimizeWindow();};}
iconMinimize.ondragstart=function(){return false}
iconMinimize=null;var iconClose=this.headerNode.newNode('div').addClass('icon iconClose');iconClose.onclick=function(){this.parentNode.parentNode.closeWindow();};iconClose.ondragstart=function(){return false}
iconClose=null;this.body=this.newNode('div').addClass('body').setId('body'+this.id);if(_browser.name!='Explorer')this.body.addClass('bodyEffects');if(this.windowResizable){this.resizingNode=this.newNode('div').addClass('resizing');this.resizingNode.onmousedown=function(){var win=this.parentNode;win.iconMaximize.replaceClass('iconUnmaximize','iconMaximize');win.windowStatus='';win.resizing=6;win.resizeNodeStyle={backgroundColor:'#FFFFFF',minWidth:this.parentNode.getStyle('minWidth'),minHeight:this.parentNode.getStyle('minHeight')};win._onstartresize();}
$addResize(this).setEvent('onstartresize',function(){this.style.overflow='hidden';this.style.visibility='hidden';if(_browser.name!='Explorer'&&typeof Tween=='function'&&typeof ColorTween=='function'){for(var i in this.linkedClones){var node=this.linkedClones[i];node.addClass('cloneWindowOnMoveEffects');var tween=new ColorTween(node.style,'backgroundColor',Tween.strongEaseOut,'FFFFFF','333333',3);tween.start();}}});$addResize(this).setEvent('onstopresize',function(){var newHeight=(this.offsetHeight-this.headerNode.offsetHeight-10);if(newHeight<50)newHeight=50;this.body.style.height=newHeight+'px';this.style.overflow='';this.style.visibility='visible';this.resetresize();});this.resizeSides=6;this.setTimeout(function(){this.resize();},500);}
if(this.onbeforeunload)document.body.onbeforeunload=new Function("return \""+this.onbeforeunload+"\"");$addKeyboard(this).keyboard={27:{0:function(){this.closeWindow()}}};this.onmovementstart=this._functionsWindow.onmovementstart;this.onmovement=this._functionsWindow.onmovement;this.onmovementend=this._functionsWindow.onmovementend;this.fireEventHandlers('oncreatewindow');return this;},minimizeWindow:function(){if(!this.positionBar)this.positionBar='bottom';if(!$id('tasksBarWindows')){var tasksBarWindows=$(document.body).newNode('div').setId('tasksBarWindows').addClass('tasksBarWindows tasksBarWindows_'+this.positionBar);if(_browser.name=='Explorer'&&_browser.version==6)tasksBarWindows.addClass('tasksBarWindows_ie6_'+this.positionBar);tasksBarWindows.wins=new Array();if(typeof OpacityTween=='function'){tasksBarWindows.tween=new OpacityTween(tasksBarWindows,Tween.regularEaseIn,0,70,0.5);tasksBarWindows.tween.start();tasksBarWindows.onmouseover=function(){if(!this.tween||this.tween.isPlaying)return false;clearTimeout(this._timeoutOpacity);this._timeoutOpacity=this.setTimeout(function(){if(!this.tween||this.tween.isPlaying)return false;this.tween=new OpacityTween(this,Tween.regularEaseOut,this.tween.getPosition(),70,0.5);this.tween.start();},5000);if(this.tween.getPosition()!=100){this.tween=new OpacityTween(this,Tween.regularEaseIn,this.tween.getPosition(),100,0.5);this.tween.start();}}}
tasksBarWindows.getWin=function(win){if(typeof this.wins!='object'||typeof win!='object')return false;for(var i in this.wins){if(win==this.wins[i])return this.wins[i];}
return false;}
tasksBarWindows.removeWin=function(win){var cpt=0;if(typeof this.wins!='object'||typeof win!='object')return false;for(var i in this.wins){cpt++;if(win==this.wins[i]){cpt--;delete this.wins[i];}}
if(cpt)return true;else{$id('tasksBarWindows').setTimeout(function(){this.remove();},1000);return true;}
return false;}}
else var tasksBarWindows=$id('tasksBarWindows');if(tasksBarWindows.getWin(this)){return false;}
var taskNode=tasksBarWindows.newNode('div').addClass('task');if(_browser.name!='Explorer')taskNode.addClass('windowHeaderEffects');taskNode.win=this;tasksBarWindows.wins.push(this);taskNode.newNode('div').addClass('icon iconMain');taskNode.titleNode=taskNode.newNode('div').addClass('title').write(this.headerTitle.getHtml());if(_browser.name!='Explorer'&&typeof Tween=='function'){var top=taskNode.offsetTop;var left=taskNode.offsetLeft;var clone=$(document.body).newNode('div').addClass('windowHeaderEffects cloneWindowOnMinimize');clone.setStyle({height:this.headerNode.offsetHeight+'px',width:this.headerNode.offsetWidth+'px'});var tweenWidth=new Tween(clone.style,'width',Tween.strongEaseOut,this.headerNode.offsetWidth,taskNode.offsetWidth,1,'px');tweenWidth.start();var ajustTop=(getScrollTop()+getVisibleHeight())-this.offsetTop-taskNode.parentNode.offsetHeight-10;var tweenTop=new Tween(clone.style,'top',Tween.strongEaseOut,this.offsetTop,this.offsetTop+ajustTop,1,'px');tweenTop.start();var tweenLeft=new Tween(clone.style,'left',Tween.strongEaseOut,this.offsetLeft,left-10,1,'px');tweenLeft._this=clone;tweenLeft._taskNode=taskNode;tweenLeft.onMotionFinished=function(){this._this.remove();this._this=null;}
tweenLeft.start();if(typeof OpacityTween=='function'){this.removeClass('windowMinimized');var tweenOpatcity=new OpacityTween(this,Tween.regularEaseOut,100,0,0.5);tweenOpatcity._this=this;tweenOpatcity.onMotionFinished=function(){this._this.addClass('windowMinimized');this._this=null;}
tweenOpatcity.start();new OpacityTween(taskNode,Tween.regularEaseIn,0,100,1).start();new OpacityTween(clone,Tween.regularEaseOut,100,0,0.5).start();}}
else this.addClass('windowMinimized');taskNode.onclick=function(){clearTimeout(this._timeout);this.parentNode.removeWin(this.win);this.open(this.win);}
taskNode.onmouseover=function(e){clearTimeout(this._timeout);var target=getRelatedTarget(e);if(target==this){return false;}
if(typeof this.tweenDownHeight=='object'&&this.tweenDownHeight.isPlaying){this._onMotion=false;this.tweenDownHeight.stop();}
if(typeof this.tweenDownTop=='object'&&this.tweenDownTop.isPlaying){this._onMotion=false;this.tweenDownTop.stop();}
if(this._onMotion)return false;if(typeof Tween=='function'){if(!this.beforeSlide){this.beforeSlide={top:this.offsetTop,height:this.offsetHeight}}
this._pixelsMove=this.titleNode.offsetHeight;this.tweenUpHeight=new Tween(this.style,'height',Tween.regularEaseOut,this.offsetHeight,this.beforeSlide.height+this._pixelsMove,0.5,'px');this.tweenUpHeight.start();this.tweenUpTop=new Tween(this.style,'top',Tween.regularEaseOut,this.offsetTop,this.beforeSlide.top-this._pixelsMove,0.5,'px');this.tweenUpTop.start();this.tweenUpTop._this=this;this.tweenUpTop.onMotionFinished=function(){this._this._onMotion=false;this._this._goDown=true;this._this=null;}
this._onMotion=true;taskNode=null;tasksBarWindows=null;}}
taskNode.rollBackTask=function(){if(this._onMotion)return false;if(typeof Tween=='function'){this.tweenDownHeight=new Tween(this.style,'height',Tween.regularEaseIn,this.offsetHeight,this.beforeSlide.height,1,'px');this.tweenDownHeight.start();this.tweenDownTop=new Tween(this.style,'top',Tween.regularEaseIn,this.offsetTop,this.beforeSlide.top,1,'px');this.tweenDownTop.start();this.tweenDownTop._this=this;this.tweenDownTop.onMotionFinished=function(){this._this._onMotion=false;this._this._goDown=false;this._this=null;}
this._onMotion=true;}};taskNode.onmouseout=function(e){var target=getRelatedTarget(e);if(target==this){return false;}
clearTimeout(this._timeout);this._timeout=this.setTimeout(function(){this.rollBackTask();},2000);}
taskNode.open=function(win){if(typeof win!='object')return false;win.style.zIndex=(++$$.zIndexTop);win.removeClass('windowMinimized');var top=this.offsetTop;var left=this.offsetLeft;this.setStyle({position:'absolute',top:top+'px',left:left+'px',height:win.headerNode.offsetHeight+'px',minWidth:'1px',maxWidth:'800px'});this.onclick=null;this.onmouseover=null;this.onmouseout=null;if(typeof this.tweenUpTop=='object')this.tweenUpTop.stop();if(_browser.name!='Explorer'&&typeof Tween=='function'){new Tween(this.style,'width',Tween.strongEaseOut,this.offsetWidth,win.headerNode.offsetWidth,1.5,'px').start();var ajustLeft=this.offsetLeft-win.offsetLeft;new Tween(this.style,'left',Tween.strongEaseOut,left,left-ajustLeft,1,'px').start();var ajustTop=(getScrollTop()+getVisibleHeight())-win.offsetTop-this.parentNode.offsetHeight;this.tween=new Tween(this.style,'top',Tween.strongEaseOut,top,top-ajustTop,1,'px');this.tween.start();this.tween._this=this;this.tween.onMotionFinished=function(){this._this.remove();}
if(typeof OpacityTween=='function'){new OpacityTween(this,Tween.regularEaseOut,100,0,0.5).start();new OpacityTween(win,Tween.regularEaseIn,0,100,0.5).start();}}
else{this.remove();return false;}}
var iconClose=taskNode.newNode('div').addClass('iconClose');iconClose.onclick=function(){this.parentNode.win.removeClass('windowMinimized');this.parentNode.win.closeWindow();this.parentNode.remove();};iconClose.ondragstart=function(){return false}
iconClose=null;this.windowStatus='minimized';},maximizeWindow:function(){if(this.windowResizable){if(this.windowStatus!='maximized'){this.beforeMaximise={top:absoluteTop(this),left:absoluteLeft(this),width:this.offsetWidth,height:this.offsetHeight}
this.setStyle({top:'0px',left:'0px',width:(getVisibleWidth()-25)+'px',height:(getVisibleHeight()-25)+'px'});if(this.iconMaximize)this.iconMaximize.replaceClass('iconMaximize','iconUnmaximize');this.windowStatus='maximized';}
else if(this.beforeMaximise){this.setStyle({top:this.beforeMaximise.top+'px',left:this.beforeMaximise.left+'px',width:this.beforeMaximise.width+'px',height:this.beforeMaximise.height+'px'});if(this.iconMaximize)this.iconMaximize.replaceClass('iconUnmaximize','iconMaximize');this.windowStatus='';}
this.fireEventHandlers('onstopresize');this.resetresize();}},modalWindow:function(){this.modal=true;var modal=$(document.body).newNode('div').addClass('modalWindow modalWindowTheme').setId('modal_'+this.id).setStyle({zIndex:$$.zIndexTop-1});modal.idWindow=this.id;modal.stopClick=this._functionsWindow.modalNode.stopClick;modal.onmousedown=this._functionsWindow.modalNode.onmousedown;modal.oncontextmenu=this._functionsWindow.modalNode.oncontextmenu;modal=null;},showWindow:function(){$$.zIndexTop=$$.zIndexTop+2;this.style.zIndex=$$.zIndexTop;if(this.alignX=='left')this.style.left='0px';else if(this.alignX=='right')this.style.left=(this.parentNode.offsetWidth-this.offsetWidth)+'px';else this.style.left=(this.parentNode.offsetLeft+(this.parentNode.offsetWidth/2)-(this.offsetWidth/2))+'px';if(this.alignY=='bottom')this.style.top='0px';else if(this.alignY=='middle')this.style.top='0px';else this.style.top='0px';if(this.ajustTop)this.style.top=(this.offsetTop+this.ajustTop)+'px';if(this.ajustLeft)this.style.left=(this.offsetLeft+this.ajustLeft)+'px';if(this.offsetTop==0)this.style.top='20px';this.setStyle({visibility:'visible'});if(typeof Tween=='function'&&_browser.name!='Explorer'){this.setStyle({});var tween=new Tween(this.style,'height',Tween.regularEaseOut,this.offsetHeight-20,this.offsetHeight+10,0.2,'px');tween.lastStyleHeight=this.style.height;tween.start();tween.onMotionFinished=function(){this.obj.height=this.lastStyleHeight;}
new Tween(this.style,'width',Tween.regularEaseIn,this.offsetWidth-20,this.offsetWidth+10,0.2,'px').start();var tween=new Tween(this.style,'left',Tween.regularEaseIn,this.offsetLeft+10,this.offsetLeft-10,0.2,'px');tween.start();var tween=new Tween(this.style,'top',Tween.regularEaseOut,this.offsetTop+10,this.offsetTop-10,0.2,'px');tween.start();if(typeof OpacityTween=='function'){var tween=new OpacityTween(this,Tween.regularEaseOut,0,100,0.5);tween.start();}}
this.focuskeyboard();this.fireEventHandlers('onfocuswindow');if(this.modal){this.modalWindow();}
this.fireEventHandlers('onshowwindow');return this;},closeWindow:function(){this.fireEventHandlers('onclosewindow');if(modal=$id('modal_'+this.id)){if(modal)modal.remove();}
this.unfocuskeyboard();if(isFunction(this.onunfocuswindow))this.onunfocuswindow();document.body.onbeforeunload=null
if($$.focusedNodes.length){for(var i=$$.focusedNodes.length-1;i>=0;i--){if(isObject($$.focusedNodes[i])&&$$.focusedNodes[i].onbeforeunload){document.body.onbeforeunload=new Function("return \""+$$.focusedNodes[i].onbeforeunload+"\"");break;}}}
if(typeof Tween=='function'&&_browser.name!='Explorer'){this.setStyle({overflow:'hidden',width:this.offsetWidth+'px',height:this.offsetHeight+'px'});new Tween(this.style,'height',Tween.regularEaseIn,this.offsetHeight,this.offsetHeight-40,0.2,'px').start();new Tween(this.style,'width',Tween.regularEaseIn,this.offsetWidth,this.offsetWidth-100,0.2,'px').start();var tween=new Tween(this.style,'left',Tween.regularEaseIn,this.offsetLeft,this.offsetLeft+50,0.2,'px');tween.start();var tween=new Tween(this.style,'top',Tween.regularEaseIn,this.offsetTop,this.offsetTop+20,0.2,'px');tween.start();if(typeof OpacityTween=='function'){var tween=new OpacityTween(this,Tween.regularEaseOut,100,0,0.3);tween.start();tween.onMotionFinished=function(){if(this.targetObject)this.targetObject.remove();}}
else setTimeout("if($('"+this.id+"')) $('"+this.id+"').remove()",200);}
else{this.remove();}},_functionsWindow:{modalNode:{oncontextmenu:function(e){return false;},stopClick:function(e){$$.windowThis=$id(this.idWindow);if(typeof Tween=='function'){new Tween($$.windowThis.style,'top',Tween.bounceEaseOut,$$.windowThis.offsetTop,$$.windowThis.offsetTop+20,0.5,'px').start();new Tween($$.windowThis.style,'left',Tween.bounceEaseOut,$$.windowThis.offsetLeft,$$.windowThis.offsetLeft+20,0.5,'px').start();}
else{$$.windowThis.headerNode.style.visibility='hidden';setTimeout("$$.windowThis.headerNode.style.visibility=''",100);setTimeout("$$.windowThis.headerNode.style.visibility='hidden'",200);setTimeout("$$.windowThis.headerNode.style.visibility=''",300);}
stopParentsEvent(e);},onmousedown:function(e){this.stopClick(e);return false;}},headerTitle:{onmousedown:function(){clearTimeout(this._timeout);this._timeout=this.setTimeout(function(){var win=this.parentNode.parentNode;win.style.zIndex=$$.zIndexTop++;win.focuskeyboard();win.fireEventHandlers('onfocuswindow');$addMove(win).move();if(_browser.name=='Explorer'){for(var i in this.parentNode.parentNode.linkedClones){var node=this.parentNode.parentNode.linkedClones[i];node.setStyle({background:'none'});}}
else if(typeof Tween=='function'&&typeof ColorTween=='function'){for(var i in this.parentNode.parentNode.linkedClones){var node=this.parentNode.parentNode.linkedClones[i];node.addClass('cloneWindowOnMoveEffects');var tween=new ColorTween(node.style,'backgroundColor',Tween.strongEaseOut,'FFFFFF','333333',3);tween.start();}}},1);},ondblclick:function(){clearTimeout(this._timeout);var win=this.parentNode.parentNode;win.maximizeWindow();}},onmovementstart:function(){if(!this.iconMaximize.hasClass('iconMaximizeDisabled')){this.iconMaximize.replaceClass('iconUnmaximize','iconMaximize');}
this.windowStatus='';this.cloned.setStyle({zIndex:(++$$.zIndexTop)});this.cloned.firstChild.setStyle({backgroundColor:(_browser.name=='Explorer')?'transparent':'#FFFFFF',border:'1px dotted #999999'});},onmovement:function(){document.onselectstart=function(e){stopParentsEvent(e);return false;};this.cloned.firstChild.style.visibility='visible';this.style.visibility='hidden';},onmovementend:function(){if(this.offsetTop<0)this.style.top='0px';if(this.offsetLeft<0)this.style.left='0px';this.style.visibility='visible';if(typeof OpacityTween=='function'){new OpacityTween(this,Tween.regularEaseOut,50,100,0.5).start();}}}};$addWindow=function(node){return myDOM.addPrototype('window',node);}

var _prototypeInput={setCaretTo:function(pos){if(this.createTextRange){var range=this.createTextRange();range.move("character",pos);range.select();}else if(this.selectionStart){this.focus();this.setSelectionRange(pos,pos);}},setCaretToEnd:function(){this.setCaretTo(this.value.toString().length);},highlight:function(){this.setStyle({backgroundColor:'#ffa'});if($$.inputHighlight&&$$.inputHighlight!=this)this._functionsInput.removeHighlight();$$.inputHighlight=this;this.addEvent('focus',this._functionsInput.removeHighlight);this.addEvent('click',this._functionsInput.removeHighlight);this.addEvent('keydown',this._functionsInput.removeHighlight);},isKeyCodeNumber:function(e,noDot){if(!e)e=event;if((e.keyCode>=48&&e.keyCode<=57)||(e.keyCode>=96&&e.keyCode<=105))return true;if(e.keyCode==8||e.keyCode==46||e.keyCode==9||e.keyCode==37||e.keyCode==39||e.keyCode==35||e.keyCode==36){return true;}
if(!noDot&&(e.keyCode==190||e.keyCode==110))return true;return false;},_functionsInput:{removeHighlight:function(){var _this=$$.inputHighlight;_this.setStyle({backgroundColor:'#fff'});_this.removeEvent('focus',_this._functionsInput.removeHighlight);_this.removeEvent('click',_this._functionsInput.removeHighlight);_this.removeEvent('keydown',_this._functionsInput.removeHighlight);delete $$.inputHighlight;}}}
var $addInput=function(node){node=$(node);$addPrototype(node,_prototypeInput);return node;}

var _prototypeBoxMenu={createBoxMenu:function(arrConfigBoxes){this.addClass("boxMenu boxMenuTheme");if(!this.getParam('size'))this.setParam('size','medium');var fadeTimeOnMouseOver=this.getParam('fadeTimeOnMouseOver')?this.getParam('fadeTimeOnMouseOver'):0.5;var fadeTimeOnMouseOut=this.getParam('fadeTimeOnMouseOut')?this.getParam('fadeTimeOnMouseOut'):0.5;for(var noBox in arrConfigBoxes){var confBox=arrConfigBoxes[noBox];var nodeBox=this.newNode('div').addClass('item');$addRoundCorners2(nodeBox).addRoundCorners({size:this.getParam('size')});var body=nodeBox.body;if(this.getParam('fadeColorOnMouseOver')){nodeBox.fadeColorOnMouseOver=this.getParam('fadeColorOnMouseOver');nodeBox.onmouseover=function(){this.fadeBackgroundColor(this.fadeColorOnMouseOver,fadeTimeOnMouseOver);},nodeBox.onmouseout=function(){this.fadeBackgroundColor(false,fadeTimeOnMouseOut)}}
body.newNode('img').src=confBox.icon;body.newNode('h2').write(confBox.title);if(confBox.subtitles){var ul=body.newNode('ul');for(var noSubtitle in confBox.subtitles){var confSubtitle=confBox.subtitles[noSubtitle];var li=ul.newNode('li');var a=li.newNode('a');a.href='#';a.write(confSubtitle.title);a._tmp=confSubtitle.onclick;a.onclick=function(e){stopPropagation(e);this._tmp(e);}
a=null;}}
if(typeof confBox.onclick=='function')body.onclick=confBox.onclick;if(typeof confBox.attributes=='object'){for(var a in confBox.attributes){nodeBox[a]=confBox.attributes[a];}}}
return this;}};var $addBoxMenu=function(node){node=$(node);$addPrototype(node,_prototypeBoxMenu);return node;}

var _prototypeInputBrowse={createBrowse:function(conf){if(typeof this.items!='object')this.items={};this.addClass('inputBrowse inputBrowseTheme');if(!this.id)this.id=getUniqueId();this.cache={};this.value=new Array();this.labels={};this.globalVarName=getUniqueId();this.showBrowse=false;this.useSearch=true;this.urlSearch=false;this.onKeyUpTimeOutSearch=500;this.onKeyUpExempt={9:true,27:true,13:true,33:true,34:true,35:true,36:true,37:true,38:true,39:true,40:true};if(conf)for(var c in conf)this[c]=conf[c];this.display=this.newNode('div');this.display.className='display';this.inputWrapper=this.display.newNode('div').addClass('inputWrapper');this.input=this.inputWrapper.newNode('input');this.input.className='input';if(this.helpText&&!this.helpTextPopup){this.input.value=this.helpText;this.input.setStyle({width:this.display.offsetWidth+'px'});this.input.className='helpText';}
this.input.maxLength=40;$addKeyboard(this).keyboard={};$addKeyboard(this.input).keyboard={};this.input.parentKeyboard=(this.id)?this.id:this;if(!this.hideSelection){this.input.keyboard[8]={0:function(){if(this.value==''){var nodeInputBrowse=this.parentNode.parentNode.parentNode;if(!nodeInputBrowse.noDeleteButton){var inputWrapper=this.parentNode;var lastSelection=inputWrapper.previousSibling;if(lastSelection&&lastSelection.tagName=='DIV'){var removeButton=lastSelection.firstChild.lastChild;removeButton.onclick();}}}
return false;}};}
this.input.keyboard[9]={4:function(){this.onblur();var nodeInputBrowse=this.parentNode.parentNode.parentNode;nodeInputBrowse._onunfocus();return false;}}
if(!this.onbrowse){this.input.keyboard[9][0]=function(e){this.onblur();var nodeInputBrowse=this.parentNode.parentNode.parentNode;nodeInputBrowse._onunfocus();return false;}}
this.input.keyboard[27]={0:function(){this.onblur();var nodeInputBrowse=this.parentNode.parentNode.parentNode;nodeInputBrowse._onunfocus();return false;}};if(this.onbrowse){this.button=this.newNode('button').setStyle({}).write((this.buttonText)?this.buttonText:"...");if(_browser.name=='Explorer'){if(!this.buttonText)this.button.style.width='20px';}
this.button.className='browseButton';this.button.onclick=this._functionsInputBrowse.button.onclick;this.button.onfocus=this._functionsInputBrowse.button.onfocus;this.button.onfocus=this._functionsInputBrowse.button.onfocus;this.display.style.width=(this.display.offsetWidth-this.button.offsetWidth)+'px';this.button.parentKeyboard=this.id;$addKeyboard(this.button).keyboard={9:{0:function(){var nodeInputBrowse=this.parentNode;nodeInputBrowse._onunfocus();return false;}}};}
this.display.newNode('div').setStyle({clear:'both'});this.input.onfocus=this._functionsInputBrowse.input.onfocus;this.input.onblur=this._functionsInputBrowse.input.onunfocus;this.input.onkeydown=this._functionsInputBrowse.input.onkeydown;this.input.onkeyup=this._functionsInputBrowse.input.onkeyup;this.input.onmouseup=this._functionsInputBrowse.input.onmouseup;this._onunfocus=this._functionsInputBrowse._onunfocus;this._onfocus=this._functionsInputBrowse._onfocus;this.onclick=this._functionsInputBrowse.onclick;this.search=this._functionsInputBrowse.search;this.showHelpTextPopup=this._functionsInputBrowse.showHelpTextPopup;this.hideHelpTextPopup=this._functionsInputBrowse.hideHelpTextPopup;this.setResults=this._functionsInputBrowse.setResults;this.hideResults=this._functionsInputBrowse.hideResults;this.showResults=this._functionsInputBrowse.showResults;this.getItems=this._functionsInputBrowse.getItems;this.addItem=this._functionsInputBrowse.addItem;this.focus=this._functionsInputBrowse.focus;this.setReadOnly=this._functionsInputBrowse.setReadOnly;this.highlight=this._functionsInputBrowse.highlight;if(this.readOnly)this.setReadOnly(true);return this;},formatResultItem:function(){this.write(this.item);},formatSelectedItem:function(){this.write(this.item);},_functionsInputBrowse:{button:{onclick:function(e){this.parentNode.onbrowse();stopPropagation(e);},onfocus:function(e){this.focuskeyboard();},onblur:function(e){this.unfocuskeyboard();}},input:{onkeyup:function(e){if(!e)e=event;var inputBrowse=this.parentNode.parentNode.parentNode;if(inputBrowse.useSearch){if(!inputBrowse.onKeyUpExempt[e.keyCode]){if($$.TIME_OUT_BROWSE_ONKEYUP)clearTimeout($$.TIME_OUT_BROWSE_ONKEYUP);$$.INPUT_BROWSE=inputBrowse;$$.TIME_OUT_BROWSE_ONKEYUP=setTimeout('$$.INPUT_BROWSE.search()',inputBrowse.onKeyUpTimeOutSearch);;}}
if(!inputBrowse.hideSelection){var contentWidth=this.value.getWidth();this.parentNode.setStyle({width:contentWidth+10+'px'});this.setStyle({width:contentWidth+10+'px'});}
if(inputBrowse.helpText&&!inputBrowse.helpTextPopup&&inputBrowse.value==''&&this.value==''){this.value=inputBrowse.helpText;this.setStyle({width:inputBrowse.display.offsetWidth+'px'});this.className='helpText';$addInput(this).setCaretTo(0);}},onkeydown:function(e){if(!e)e=event;var inputBrowse=this.parentNode.parentNode.parentNode;if(inputBrowse.useSearch){if(!inputBrowse.onKeyUpExempt[e.keyCode])inputBrowse.hideResults();}
if(inputBrowse.helpText&&this.value==inputBrowse.helpText){if(e.keyCode!=9){this.value='';this.className='';}}},onfocus:function(){var nodeInputBrowse=this.parentNode.parentNode.parentNode;if(nodeInputBrowse.helpText&&this.value==nodeInputBrowse.helpText){this.className='helpText';$addInput(this).setCaretTo(0);}
this.focuskeyboard();nodeInputBrowse._onfocus();},onunfocus:function(){this.unfocuskeyboard();},onmouseup:function(){var inputBrowse=this.parentNode.parentNode.parentNode;if(inputBrowse.helpText&&this.value==inputBrowse.helpText){$addInput(this).setCaretTo(0);}}},_onunfocus:function(){if(_frames.main.$$[this.globalVarName+'_onunfocus']){this.hideResults();if(isFunction(this.onunfocus))this.onunfocus();var lastFrame=false;for(var frameName in _frames){if(lastFrame!=_frames[frameName])$(_frames[frameName].document).removeEvent("mousedown",_frames.main.$$[this.globalVarName+'_onunfocus']);lastFrame=_frames[frameName];}
delete _frames.main.$$[this.globalVarName+'_onunfocus'];delete _frames.main.$$[this.globalVarName];delete _frames.main.$$.FOCUSED_BROWSE;}
if(this.helpText){if(this.helpTextPopup){this.hideHelpTextPopup();this.input.value='';}
else if(this.value==''){this.input.value=this.helpText;this.input.setStyle({width:this.display.offsetWidth+'px'});this.input.className='helpText';}}else this.input.value='';},_onfocus:function(){if(_frames.main.$$.FOCUSED_BROWSE!=this){_frames.main.$$[this.globalVarName]=this;_frames.main.$$[this.globalVarName+'_onunfocus']=new Function("_frames.main.$$['"+this.globalVarName+"']._onunfocus()");var lastFrame=false;for(var frameName in _frames){if(lastFrame!=_frames[frameName])$(_frames[frameName].document).addEvent("mousedown",_frames.main.$$[this.globalVarName+'_onunfocus']);lastFrame=_frames[frameName];}
_frames.main.$$.FOCUSED_BROWSE=this;if(isFunction(this.onfocus))this.onfocus();}
if(this.helpText&&this.helpTextPopup){this.showHelpTextPopup();}},showHelpTextPopup:function(){this.hideHelpTextPopup();this.displayHelpTextPopup=this.newNode('div');this.displayHelpTextPopup.className='helpTextPopup helpText';$addEffects(this.displayHelpTextPopup);this.displayHelpTextPopup.fadeTime=0.3;this.displayHelpTextPopup.setOpacity(0);this.displayHelpTextPopup.fadeIn();this.displayHelpTextPopup.write(this.helpText);},hideHelpTextPopup:function(){if(this.displayHelpTextPopup){this.displayHelpTextPopup.remove();this.displayHelpTextPopup=false;}},highlight:function(){if(this.readOnly)return false;this.display.className='display hightlight';if($$.inputHighlight)this._functionsInputBrowse.removeHighlight();$$.inputHighlight=this;this.input.addEvent('focus',this._functionsInputBrowse.removeHighlight);this.input.addEvent('keydown',this._functionsInputBrowse.removeHighlight);if(this.onbrowse){this.button.addEvent('focus',this._functionsInputBrowse.removeHighlight);this.button.addEvent('click',this._functionsInputBrowse.removeHighlight);}},removeHighlight:function(){var _this=$$.inputHighlight;_this.display.className='display';this.input.className='';_this.input.removeEvent('focus',_this._functionsInputBrowse.removeHighlight);_this.input.removeEvent('keydown',_this._functionsInputBrowse.removeHighlight);if(_this.onbrowse){_this.button.removeEvent('focus',_this._functionsInputBrowse.removeHighlight);_this.button.removeEvent('click',_this._functionsInputBrowse.removeHighlight);}
delete $$.inputHighlight;},search:function(){if(this.input.value&&this.input.value!=this.helpText){if(this.cache[this.input.value]){this.setResults(this.input.value,this.cache[this.input.value]);if(isFunction(this.ongetcache))this.ongetcache();this.showResults();}
else{var post={ajaxExecuteName:this.urlSearch,searchText:this.input.value};if(this.arrExtraPostArguments){for(var nomArg in this.arrExtraPostArguments){post[nomArg]=this.arrExtraPostArguments[nomArg];}}
var request=new ajax({url:(this.url)?this.url:'ajaxExecute.php',post:post,blockInterface:false});request.parentObject=this;request.onRequestCompleted=function(resultsText){try{eval(resultsText);this.parentObject.setResults(request.post.searchText,resultsText);this.parentObject.showResults();}catch(e){}};request.execute();}}
else{this.hideResults();}},setResults:function(searchText,results){if(isString(results)){try{eval(results);}catch(e){}
if(isObject(results)){this.cache[searchText]=results;this.results=results;if(isFunction(this.onsetcache))this.onsetcache();}}},hideResults:function(){if(this.displayResults){this.displayResults.unfocuskeyboard();this.displayResults.remove();this.removeAttribute('displayResults');if(this.displayResults)delete this.displayResults;if(this.helpText&&this.helpTextPopup){this.input.focus();this.showHelpTextPopup();}}},showResults:function(){if(!this.parentNode){return false;}
var haveResults=false;for(var i in this.results){haveResults=true;break;}
if(!haveResults)return false;this.hideHelpTextPopup();if(!this.displayResults){this.displayResults=this.newNode('div').setStyle({});this.displayResults.className='displayResults';this.displayResults.focusPrevious=function(){if(this.focusedItem.previousSibling)this.focusedItem.previousSibling.focus()}
this.displayResults.focusNext=function(){if(this.focusedItem.nextSibling)this.focusedItem.nextSibling.focus()}}
this.displayResults.write('');for(var i in this.results){var cell=this.displayResults.newNode('div');cell.index=i;cell.item=this.results[i];cell.className='item';cell.onmouseover=cell.focus=function(){if(this.parentNode.focusedItem)this.parentNode.focusedItem.className='item';this.className='item selected';this.parentNode.focusedItem=this;}
cell.select=function(){var inputBrowse=this.parentNode.parentNode;inputBrowse.input.value='';if(isFunction(inputBrowse.onselectitem)){if(inputBrowse.onselectitem(this.index,this.item)===false)return false;}
if(!inputBrowse.hideSelection){inputBrowse.addItem(this.index,this.item);}else{if(inputBrowse.helpText&&!inputBrowse.helpTextPopup){inputBrowse.input.value=inputBrowse.helpText;inputBrowse.input.className='helpText';}else{inputBrowse.input.setStyle({width:inputBrowse.display.offsetWidth+'px'});inputBrowse.input.value='';inputBrowse.input.className='';inputBrowse.input.focus();inputBrowse.showHelpTextPopup();}}}
cell.onmousedown=function(e){this.ownerDocument.parentWindow.stopParentsEvent(e);}
cell.onclick=function(e){this.select();this.parentNode.parentNode.hideResults();}
cell.refresh=this.formatResultItem;cell.refresh();}
$addKeyboard(this.displayResults).setKeyboard({13:{0:function(){this.focusedItem.select();this.parentNode.hideResults();return true;}},27:{0:function(){this.parentNode.hideResults();return true;}},38:{0:function(){this.focusPrevious();return true;}},40:{0:function(){this.focusNext();return true;}}}).focuskeyboard();this.displayResults.parentKeyboard=this.id;this.displayResults.firstChild.focus();if(typeof Tween=='function'){var tween=new Tween(this.displayResults.style,'height',Tween.backEaseOut,0,this.displayResults.offsetHeight,0.3,'px');tween.start();}},getItems:function(index,item){if(typeof this.items=='object'){for(var i in this.items){return this.items;}
return false;}},addItem:function(index,item){if(!this.labels[index]){this.items[index]=item;if(this.onlySelectOne){if(this.inputWrapper.previousSibling&&this.inputWrapper.previousSibling.tagName=='DIV'){var oldItem=this.inputWrapper.previousSibling.firstChild;oldItem.removeItem();}}
if(isFunction(this.onadditem)){if(this.onadditem(index,item)===false)return false;}
var container=this.inputWrapper.newNodeBefore('div');var newItem=container.newNode('span');this.inputWrapper.setStyle({width:'10px'});if(this.helpText&&this.hideSelection){this.input.value=this.helpText;this.input.setStyle({width:this.display.offsetWidth+'px'});this.input.className='helpText';$addInput(this.input).setCaretTo(0);}else{this.input.setStyle({width:'10px'});this.input.className='';this.input.value='';}
newItem.index=index;newItem.item=item;newItem.refresh=this.formatSelectedItem;newItem.refresh();container.className='item';newItem.valueOfSelectedItem=(isFunction(this.valueOfSelectedItem))?this.valueOfSelectedItem:function(){return this.index};this.value.push(index);this.labels[index]=newItem.getHtml();newItem.input=createInput('hidden',this.name+'['+index+']');newItem.input.value=newItem.valueOfSelectedItem();newItem.appendChild(newItem.input);newItem.removeItem=function(){var nodeBrowse=this.parentNode.parentNode.parentNode;if(nodeBrowse.readOnly)return false;nodeBrowse.input.focus();for(i in nodeBrowse.value){if(nodeBrowse.value[i]==this.index){if(isFunction(nodeBrowse.onremoveitem))if(nodeBrowse.onremoveitem(this.index,this.item)===false)return false;nodeBrowse.value.splice(i,1);break;}}
delete nodeBrowse.items[index];delete nodeBrowse.labels[this.index];this.parentNode.remove();if(nodeBrowse.helpText&&!nodeBrowse.helpTextPopup&&nodeBrowse.input.value==''){nodeBrowse.input.value=nodeBrowse.helpText;nodeBrowse.input.setStyle({width:nodeBrowse.display.offsetWidth+'px'});nodeBrowse.input.className='helpText';$addInput(nodeBrowse.input).setCaretTo(0);}}
if(!this.noDeleteButton){var deleteItemButton=newItem.newNode('button');deleteItemButton.index=index;deleteItemButton.onmousedown=function(e){this.ownerDocument.parentWindow.stopParentsEvent(e);}
deleteItemButton.onclick=function(){this.parentNode.removeItem();}
deleteItemButton=null;}
newItem=null;}
try{this.input.focus();}catch(e){}},onclick:function(){this.input.focus();},focus:function(){this.input.focus();},setReadOnly:function(readOnly){this.readOnly=readOnly;if(this.readOnly){this.input.disabled=true;this.input.className='readonly';if(this.button)this.button.disabled=true;this.display.className='display readonly';}else{this.input.disabled=false;if(this.button)this.button.disabled=false;this.display.className='display';}}}};var $addInputBrowse=function(node){node=$(node);$addPrototype(node,_prototypeInputBrowse);return node;}

var _prototypeInputDate={createInputDate:function(conf){this.addClass('inputDate');if(conf)for(var c in conf)this[c]=conf[c];if(!this.id)this.id=getUniqueId();var display=this.newNode('div').addClass('display').setId('display_'+this.id);display.onclick=this._functionsInputDate.display.onclick;if(!this.noButton){if(this.deleteButton){var buttonDelete=this.appendChild(createButton('button','')).addClass('buttonDelete').setId('buttonDelete_'+this.id);buttonDelete.onclick=this._functionsInputDate.buttonDelete.onclick;}
var buttonCalendar=this.appendChild(createButton('button','')).addClass('buttonCalendar').setId('buttonCalendar_'+this.id);;buttonCalendar.onclick=this._functionsInputDate.buttonCalendar.onclick;}
$(this.appendChild(createInput('hidden',this.name))).setId('input_'+this.id);this.refresh=this._functionsInputDate.refresh;this.setReadOnly=this._functionsInputDate.setReadOnly;this.highlight=this._functionsInputDate.highlight;if(!this.format)this.format="%l% %j% %F% %Y%";this.refresh();if(this.readOnly)this.setReadOnly(true);return this;},getCalendar:function(){if(!this.id)this.id=getUniqueId();this.today=new Date().getTodayServerTime();$$.INPUT_SELECT_ID=this.id;var calendar=this.newNode('div').addClass('inputDateCalendar').setId('calendar_'+this.id);this.calendar=calendar;calendar.setDate=this._functionsInputDate.calendar.setDate;calendar.previousDay=this._functionsInputDate.calendar.previousDay;calendar.nextDay=this._functionsInputDate.calendar.nextDay;calendar.previousWeek=this._functionsInputDate.calendar.previousWeek;calendar.nextWeek=this._functionsInputDate.calendar.nextWeek;calendar.month=(this.date)?this.date.getMonth():this.today.getMonth();calendar.year=(this.date)?this.date.getFullYear():this.today.getFullYear();calendar.day=(this.date)?this.date.getDate():this.today.getDate();$addKeyboard(calendar).focuskeyboard().setKeyboard({13:{0:function(){var selectedDate=new Date(this.year,this.month,this.day);this.parentNode.setDate(selectedDate);if(isFunction(this.parentNode.ondateselected))this.parentNode.ondateselected();this.parentNode.hideCalendar();}},27:{0:function(){this.parentNode.hideCalendar();}},33:{0:function(){var previousMonth=$id('previousMonth_navigation_calendar_'+this.parentNode.id);previousMonth.onclick();}},34:{0:function(){var nextMonth=$id('nextMonth_navigation_calendar_'+this.parentNode.id);nextMonth.onclick();}},35:{0:function(){var navigation=$id('navigation_'+this.id);navigation.inputYear.value=parseInt(navigation.inputYear.value)+1;navigation.inputYear.onkeyup();}},36:{0:function(){navigation.inputYear.value=parseInt(navigation.inputYear.value)-1;navigation.inputYear.onkeyup();}},37:{0:function(){this.previousDay();}},38:{0:function(){this.previousWeek();}},39:{0:function(){this.nextDay();}},40:{0:function(){this.nextWeek();}}});var navigation=calendar.newNode('div').addClass('navigation').setId('navigation_calendar_'+this.id);var nextMonth=navigation.appendChild(createButton('button','')).addClass('nextMonth').setId('nextMonth_navigation_calendar_'+this.id);nextMonth.onclick=this._functionsInputDate.calendar.nextMonth.onclick;var inputMonth=$addInputSelect(navigation.newNode('div')).setId('inputMonth_navigation_calendar_'+this.id).createInputSelect().addClass('inputMonth');for(var m in _monthsName)inputMonth.addItem(_monthsName[m],m,false);inputMonth.selectItem(calendar.month);inputMonth.onselectitem=this._functionsInputDate.calendar.inputMonth.onselectitem;var inputYear=$addInputSelect(navigation.newNode('div')).setId('inputYear_navigation_calendar_'+this.id).createInputSelect().addClass('inputYear');if(!this.yearsBefore)this.yearsBefore=10;if(!this.yearsAfter)this.yearsAfter=10;for(var year=(2009-this.yearsBefore);year<=(2009+this.yearsAfter);year++){inputYear.addItem(year,year,false);}
inputYear.selectItem(calendar.year);inputYear.onselectitem=this._functionsInputDate.calendar.inputYear.onselectitem;var previousMonth=navigation.appendChild(createButton('button','')).addClass('previousMonth').setId('previousMonth_navigation_calendar_'+this.id);;previousMonth.onclick=this._functionsInputDate.calendar.previousMonth.onclick;calendar.display=calendar.newNode('div').addClass('display').setId('display_calendar_'+this.id);calendar.display.refresh=this._functionsInputDate.calendar.display.refresh;calendar.display.refresh();calendar.addEvent("mouseup",function(){var calendar=$id('calendar_'+$$.INPUT_SELECT_ID);if(calendar){calendar.dontClose=true}});if(typeof Tween=='function'){calendar.style.overflow='hidden';var tween=new Tween(calendar.style,'height',Tween.backEaseOut,0,calendar.offsetHeight,0.3,'px');tween.onMotionFinished=function(){this.obj.overflow='';this.obj.height='';};tween.start();}
$(document).addEvent("mouseup",this.hideCalendar);return this;},hideCalendar:function(){var calendar=$id('calendar_'+$$.INPUT_SELECT_ID);if(!calendar)return false;if(calendar&&calendar.dontClose){calendar.dontClose=false;return false;}
var _this=$id($$.INPUT_SELECT_ID);if(_this){var calendar=$id('calendar_'+_this.id);calendar.unfocuskeyboard();calendar.remove();if(typeof _this.calendar=='object')_this.calendar=false;document.removeEvent("mouseup",_this.hideCalendar);delete $$.INPUT_SELECT_ID;}},setDate:function(newDate){if(this.date)this.lastDateSelected=this.date.newDate();this.date=false;if(newDate){this.date=new Date();this.date.setTime(newDate.getTime());if(!this.lastDateSelected)this.lastDateSelected=this.date.newDate();}
if(isFunction(this.refresh))this.refresh();},getDate:function(){if(this.date){var dateCopy=new Date();dateCopy.setTime(this.date.getTime());return dateCopy;}
return false;},_functionsInputDate:{buttonCalendar:{onclick:function(){if(!this.parentNode.readOnly){if(this.parentNode.calendar)this.parentNode.hideCalendar();else this.parentNode.getCalendar();}}},buttonDelete:{onclick:function(){this.parentNode.setDate(false);if(isFunction(this.parentNode.ondatedeleted))this.parentNode.ondatedeleted();}},display:{onclick:function(){if(!this.parentNode.readOnly){if(this.parentNode.calendar)this.parentNode.hideCalendar();else this.parentNode.getCalendar();}}},refresh:function(){var display=$id('display_'+this.id);if(this.date){display.write(this.date.getFormat(this.format));var input=$id('input_'+this.id);this.value=input.value=this.date.getPhpFormat();}
else{display.write(this.defaultText);var input=$id('input_'+this.id);this.value=input.value='';}},highlight:function(){if(this.readOnly)return false;this.addClass('inputDateHightlight');var buttonCalendar;if($$.inputDateHighlight)this._functionsInputDate.removeHighlight();$$.inputDateHighlight=this;$id('display_'+this.id).addEvent('click',this._functionsInputDate.removeHighlight);if(buttonCalendar=$id('buttonCalendar_'+this.id)){buttonCalendar.addEvent('focus',this._functionsInputDate.removeHighlight);buttonCalendar.addEvent('click',this._functionsInputDate.removeHighlight);}},removeHighlight:function(){var _this=$$.inputDateHighlight;var buttonCalendar;_this.removeClass('inputDateHightlight');$id('display_'+_this.id).removeEvent('click',_this._functionsInputDate.removeHighlight);if(buttonCalendar=$id('buttonCalendar_'+_this.id)){buttonCalendar.removeEvent('focus',_this._functionsInputDate.removeHighlight);buttonCalendar.removeEvent('click',_this._functionsInputDate.removeHighlight);}
delete $$.inputDateHighlight;},setReadOnly:function(readOnly){this.readOnly=(readOnly)?true:false;var buttonDelete,buttonCalendar;if(this.readOnly){this.addClass('inputDateReadonly');if(buttonCalendar=$id('buttonCalendar_'+this.id)){buttonCalendar.addClass('buttonCalendarReadonly');buttonCalendar.disabled=true;}
if(buttonDelete=$id('buttonDelete_'+this.id)){buttonDelete.addClass('buttonDeleteReadonly');buttonDelete.disabled=true;}}else{this.removeClass('inputDateReadonly');if(buttonCalendar=$id('buttonCalendar_'+this.id)){buttonCalendar.removeClass('buttonCalendarReadonly');buttonCalendar.disabled=false;}
if(buttonDelete=$id('buttonDelete_'+this.id)){buttonDelete.removeClass('buttonDeleteReadonly');buttonDelete.disabled=false;}}},calendar:{inputYear:{onselectitem:function(value){var inputDate=this.parentNode.parentNode.parentNode;$id('calendar_'+inputDate.id).year=value;$id('display_calendar_'+inputDate.id).refresh();}},inputMonth:{onselectitem:function(value){var inputDate=this.parentNode.parentNode.parentNode;$id('calendar_'+inputDate.id).month=value;$id('display_calendar_'+inputDate.id).refresh();}},nextMonth:{onclick:function(){var calendar=this.parentNode.parentNode;var d=new Date(calendar.year,calendar.month,calendar.day);d.addMonths(1);calendar.setDate(d);}},previousMonth:{onclick:function(){var calendar=this.parentNode.parentNode;var d=new Date(calendar.year,calendar.month,calendar.day);d.addMonths(-1);calendar.setDate(d);}},previousDay:function(){var d=new Date(this.year,this.month,this.day);d.addDays(-1);this.setDate(d);},nextDay:function(){var d=new Date(this.year,this.month,this.day);d.addDays(+1);this.setDate(d);},previousWeek:function(){var d=new Date(this.year,this.month,this.day);d.addWeeks(-1);this.setDate(d);},nextWeek:function(){var d=new Date(this.year,this.month,this.day);d.addWeeks(+1);this.setDate(d);},setDate:function(date){this.month=date.getMonth();this.year=date.getFullYear();this.day=date.getDate();var inputMonth=$id('inputMonth_navigation_calendar_'+this.parentNode.id);var inputYear=$id('inputYear_navigation_calendar_'+this.parentNode.id);inputMonth.setValue(this.month).refresh();inputYear.setValue(this.year).refresh();$id('display_'+this.id).refresh();},displayToday:{onclick:function(){this.parentNode.setDate(new Date());}},display:{refresh:function(){this.write('');var calendar=$id('calendar_'+this.parentNode.parentNode.id);this.start=new Date(this.parentNode.year,this.parentNode.month,1);this.start.addDays(-this.start.getDay());this.end=new Date(this.parentNode.year,this.parentNode.month,1);this.end.addDays(this.end.getMonthDays()-1);this.end.addDays(6-this.end.getDay());this.cur=new Date();this.cur.setTime(this.start.getTime());var table=$addTable(this.newNode('table'));var tHead=table.newTableHead();var row=tHead.newRow();for(var j in _daysName)row.newCell('th').write(_daysName[j].substr(0,1));var tBody=table.newTableBody();while(this.cur.getTime()<=this.end.getTime()){if(this.cur.getDay()==0){var row=tBody.newRow();}
var cell=row.newCell('td',{onmouseout:function(){this.style.backgroundColor='';},onmouseover:function(){this.style.backgroundColor='#FFFF99';},onmouseup:function(){var inputDate=this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;var selectedDate=new Date();selectedDate.setTime(this.time);inputDate.setDate(selectedDate);if(isFunction(inputDate.ondateselected))inputDate.ondateselected();inputDate.hideCalendar();}}).write(this.cur.getDate());if(this.parentNode.parentNode.today.getTime()==this.cur.getTime()){cell.addClass('today');}
if(calendar.month!=this.cur.getMonth()){cell.addClass('outOfMonth');}
if(this.cur.getDate()==calendar.day&&this.cur.getMonth()==calendar.month){cell.addClass('selected');}
cell.time=this.cur.getTime();this.cur.addDays(1);cell=null;}}}}}};var $addInputDate=function(node){node=$(node);$addPrototype(node,_prototypeInputDate);return node;}

var _prototypeListAjax={createListAjax:function(){if(!this.getParameters('filters'))this.setParameter('filters',{});if(!this.getParameters('defaultFilters'))this.setParameter('defaultFilters',false);this.setEvent('onrefreshlist',function(){this._showPagination();this._ajustHeightColumnsList();this._addButtonFunctionOut();});this.createList();this._addOrderBy();return this;},tryDeleteSelectedItems:function(pk){this.deleteSelectedItems(pk);},deleteSelectedItems:function(pk){var confirmation=false;var nbDeleted=0;if(!this.garbage)this.garbage={};for(var i in this.items){if(this.items[i].checked){if(!confirmation){if(this.messages&&this.messages.confirmDelete)var message=this.messages.confirmDelete;else var message="&Ecirc;tes-vous s&ucirc;r de vouloir effacer cet(s) &eacute;l&eacute;ment(s)?";confirmation=htmlConfirm(message);if(!confirmation)return false;}
if(pk){if(isString(pk)){this.garbage[this.items[i][pk]]=this.items[i][pk];}else{this.garbage[i]={};for(noPK in pk){this.garbage[i][pk[noPK]]=this.items[i][pk[noPK]];}}}
else{this.garbage[i]=i;}
nbDeleted++;}}
if(!nbDeleted){if(this.messages&&this.messages.noElementSelected)var message=this.messages.noElementSelected;else var message="Veuillez s&eacute;lectionner au moins un &eacute;l&eacute;ment";htmlAlert(message);}else{this.setFilters({action:'delete',garbage:this.garbage});this.execute();this.garbage=false;}},deleteItem:function(noEl,arrPK){if(this.messages&&this.messages.confirmDelete)var message=this.messages.confirmDelete;else var message="&Ecirc;tes-vous s&ucirc;r de vouloir effacer cet(s) &eacute;l&eacute;ment(s)?";var garbage={};if(arrPK){garbage[noEl]=arrPK;}else{garbage[noEl]=noEl;}
if(!htmlConfirm(message))return false;this.setFilters({action:'delete',garbage:garbage});this.execute();this.setFilter('garbage',false);},saveItem:function(item,refreshList){this.setFilter('action','save');this.setFilter('chargeListe',refreshList?1:0);var post={};post.form=item;this.execute(post);this.setFilter('chargeListe',1);},execute:function(post){var _post=isObject(post)?post:{};var tmpFilters=_post.filters;_post.filters=getCopyArray(this.getFilters());if(typeof tmpFilters=='object')for(var i in tmpFilters)_post.filters[i]=tmpFilters[i];if(this.getParameter('ajaxExecuteName'))_post.ajaxExecuteName=this.getParameter('ajaxExecuteName');this.request=new ajax({url:this.getParameter('executeUrl'),post:_post,idList:this.id});this.request.onRequestCompleted=this._functionsListAjax.request.onRequestCompleted;this.request.execute();this.selectedItems={};},alertError:function(noError){if(typeof this.getParameter('errorMessages')=='object'&&typeof this.getParameter('errorMessages')[noError]=='string'){htmlAlert(this.getParameter('errorMessages')[noError]);}
else htmlAlert("Error: "+noError);},_evalRequestResult:function(responseText){if(this.debug)debug(responseText);eval(responseText);},_showPagination:function(){var win=this.parentNode.parentNode.parentNode;if(this.pagination)this.pagination.remove();if((this.totalElements||(typeof win.onconfirmselection=='function'&&!$id('buttonFunctionOut_'+this.id)))&&this.getFilter('nbElParPage')&&this.getFilter('noPageCourante')){var nbPages=Math.ceil(this.totalElements/this.getFilter('nbElParPage'));if(this.pagination){}else{var divColumnsList=$id('divColumnsList_'+this.id);divColumnsList.style.height=parseInt(divColumnsList.offsetHeight)-40+'px';}
if(this.displayNumberOfElements)this.displayNumberOfElements.remove();this.pagination=this.newNode('div').addClass('pagination').setId('divPaginationList_'+this.id);this.pagination.onmousedown=this._functionsListAjax.pagination.onmousedown;if(nbPages>1){var previousPage=this.pagination.newNode('span').write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");if(this.getFilter('noPageCourante')!=1){previousPage.write("&#171;");previousPage.className='previous';previousPage.onclick=this._functionsListAjax.pagination.previous.onclick;previousPage.onmouseover=this._functionsListAjax.pagination.page.onmouseover;previousPage.onmouseout=this._functionsListAjax.pagination.page.onmouseout;}
if(nbPages<9)var startPage=1;else var startPage=this.getFilter('noPageCourante');var endPage=(nbPages<9)?nbPages:this.getFilter('noPageCourante')+9;if(endPage>nbPages)endPage=nbPages;if(nbPages>9&&(endPage-this.getFilter('noPageCourante'))<9)startPage=endPage-9;for(var noPage=startPage;noPage<=endPage;noPage++){var page=this.pagination.newNode('span');page.className='page'
if(noPage!=this.getFilter('noPageCourante')){page.write(noPage);page.noPage=parseInt(noPage);page.onclick=this._functionsListAjax.pagination.page.onclick;page.onmouseover=this._functionsListAjax.pagination.page.onmouseover;page.onmouseout=this._functionsListAjax.pagination.page.onmouseout;}else{page.write(noPage);page.className='currentPage';}}
if(this.getFilter('noPageCourante')!=nbPages){var nextPage=this.pagination.newNode('span').write("&#187;");nextPage.className='next';nextPage.onclick=this._functionsListAjax.pagination.next.onclick;nextPage.onmouseover=this._functionsListAjax.pagination.page.onmouseover;nextPage.onmouseout=this._functionsListAjax.pagination.page.onmouseout;}}
this.displayNumberOfElements=this.pagination.newNode('div').write(this.totalElements+" &eacute;l&eacute;ments");this.displayNumberOfElements.className='displayTotal';}
nextPage=null;previousPage=null;},_addOrderBy:function(){if(this.getFilter('triCol')&&this.getFilter('triSens')){for(var i in this._columns){var header=this._columns[i].header;if(header.button){header.button.onclick=this._functionsListAjax.headerColumn.onclick;}}}},_addButtonFunctionOut:function(){var win=this.parentNode.parentNode;if(typeof win.onconfirmselection=='function'&&!$id('buttonFunctionOut_'+this.id)){if(win.singleSelection){this.setParameter('singleSelection',true);}
var buttonsFunctionOut=this.pagination.newNode('div').addClass('buttonsFunctionOut');var ok=buttonsFunctionOut.newNode('button').addClass('ok');ok.id='buttonFunctionOut_'+this.id;ok.setStyle({width:'100px',fontWeight:'bold'});ok.write("Ok");ok.onclick=this._functionsListAjax.buttonFunctionOut.onclick;var cancel=buttonsFunctionOut.newNode('button').addClass('cancel').setId('buttonFunctionOutCancel'+this.id).write("Annuler");cancel.onclick=this._functionsListAjax.buttonFunctionOutCancel.onclick;ok=null;cancel=null;}},enableFiltersFields:function(){if(this.getParameter('editFilters')){this.divSearchField.style.visibility='visible';this.buttonToggleFiltersList.disabled=false;this.buttonToggleFiltersList.refresh();if(this.inputTextKeywords){this.inputTextKeywords.disabled=false;this.inputTextKeywords.onblur();this.buttonFiltersList.disabled=false;}}},disableFiltersFields:function(){if(this.getParameter('editFilters')){this.buttonToggleFiltersList.disabled=true;this.buttonToggleFiltersList.refresh();if(this.inputTextKeywords){this.inputTextKeywords.disabled=true;this.inputTextKeywords.onblur();this.buttonFiltersList.disabled=true;}
this.divSearchField.style.visibility='hidden';this.hideFilters();}},_functionsListAjax:{headerColumn:{onclick:function(){var list=$id(this.parentNode.idList);if(this.parentNode.conf.orderBy){if(this.parentNode.conf.orderBy==list.getFilter('triCol')){if(list.getFilter('triSens')=='DESC'){list.setFilter('triSens','ASC');}
else{list.setFilter('triSens','DESC');}
list.setFilter('action','');list.execute();}
else{list.setFilters({triCol:this.parentNode.conf.orderBy,triSens:'ASC'});list.setFilter('action','');list.execute();}
this.refreshArrowOrderBy();}}},pagination:{onmousedown:function(){return false;},previous:{onclick:function(){var list=this.parentNode.parentNode;var nbPages=Math.ceil(list.totalElements/list.getFilter('nbElParPage'));var noPage=list.getFilter('noPageCourante')-10;if(noPage<1)noPage=1;list.setFilters({noPageCourante:noPage,action:''});list.execute();}},page:{onclick:function(){var list=this.parentNode.parentNode;list.setFilters({noPageCourante:this.noPage,action:''});list.execute();},onmouseover:function(){this.className='page overPage';},onmouseout:function(){this.className='page';}},next:{onclick:function(){var list=this.parentNode.parentNode;var nbPages=Math.ceil(list.totalElements/list.getFilter('nbElParPage'));var noPage=list.getFilter('noPageCourante')+10;if(noPage>nbPages)noPage=nbPages;list.setFilters({noPageCourante:noPage,action:''});list.execute();}}},request:{onRequestCompleted:function(responseText){$id(this.idList)._evalRequestResult(responseText);}},buttonFunctionOutCancel:{onclick:function(){var p=this;while(!p.closeWindow){p=p.parentNode;}
p.closeWindow();}},buttonFunctionOut:{onclick:function(){var arrReturn={};var list=this.parentNode.parentNode.parentNode;var nbResults=0;for(var i in list.items){if(list.items[i].checked){nbResults++;arrReturn[i]=list.items[i];}}
if(!nbResults&&list.selectedCell&&typeof list.selectedCell.item=='object'){nbResults++;var arrReturn={0:list.selectedCell.item};}
if(!nbResults){htmlAlert("Veuillez s&eacute;lectionner au moins un &eacute;l&eacute;ment");return false;}
else if(nbResults>1&&list.getParameter('singleSelection')){htmlAlert("Veuillez s&eacute;lectionner qu'un seul &eacute;l&eacute;ment");return false;}
var win=list.parentNode.parentNode;win.onconfirmselection(arrReturn);if(isFunction(win.closeWindow))win.closeWindow();}}}};var $addListAjax=function(node){node=$(node);$addPrototype(node,_prototypeList);$addPrototype(node,_prototypeListAjax);return node;}

myDOM._prototypes.form={createForm:function(insideNode){if(!insideNode)insideNode=this;if(!this.id)this.id='form_'+getUniqueId();var fields=this.getParam('inputs');var nbInputs=lengthArray(fields);this.inputs={};var table=$addTable(insideNode.newNode('table')).setStyle({width:'100%'});table.cellSpacing=0;var tBody=table.newTableBody();if(fields){var cpt=0;for(var i in fields){var field=fields[i];if(field.edit&&!field.alwaysHide){cpt++;if(!this.splitHorizontal||(this.splitHorizontal&&cpt%2)||field.newLine)var row=tBody.newRow();var cell=row.newCell('th',{vAlign:'top'}).write(field.header).setStyle({textAlign:'left',width:'20%'});var cell=row.newCell('td',{vAlign:'top'}).setStyle({width:'30%',paddingRight:'10px'});if(field.colSpan)cell.colSpan=field.colSpan;if(typeof this._createInputForm=='function')this.inputs[field.name]=this._createInputForm(field,cell,this.item).setStyle({zIndex:(nbInputs--)});}}}
return this;},_createInputForm:function(conf,node,item){if(!conf)return false;node.item=item;if(typeof conf.attributes=='object')for(var i in conf.attributes)node[i]=conf.attributes[i];if(typeof conf.edit=='object'){if(!conf.edit.type)conf.edit.type='text';node._edit=this._functionsForm.editByTypes[conf.edit.type];node._conf=conf.edit;node._conf.name=conf.name;}
else if(typeof conf.edit=='function'){node._edit=conf.edit;}
return node._edit();},createInputForm:function(name,node,item){var conf=this.getInputConfiguration(name);if(!conf)return false;return this._createInputForm(conf,node,item);},getInputConfiguration:function(name){var fields=this.getParam('inputs');var nbInputs=lengthArray(fields);for(var i in fields){if(fields[i].name==name)return fields[i];}
return false;},_functionsForm:{editByTypes:{string:function(editOnlist){var conf=this._conf;var value=this.item[conf.field];var input=$addInput(createInput('text')).setStyle({width:'100%'});input.name=conf.name;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);input.getInputValue=function(){return this.value;}
this.input=input;input.value=(typeof value!='undefined')?value:'';input=null;return this.input;},text:function(){var conf=this._conf;var value=this.item[conf.field];var defaultHeight=100;var input=$addInput(document.createElement('textarea')).setStyle({width:'100%',minWidth:'150px',height:defaultHeight+'px',minHeight:'150px',maxHeight:'400px'});input.name=conf.name;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);input.getInputValue=function(){return this.value;}
this.input=input;input.write(value?value.toString().removeBR():'');input=null;return this.input;},richtext:function(){var conf=this._conf;var value=this.item[conf.field];var defaultHeight=100;var input=$addInputRitchText(document.createElement('div')).setStyle({width:'100%',minWidth:'150px',height:defaultHeight+'px',minHeight:'150px',maxHeight:'400px'});input.name=conf.name;input.setId('richtext_'+getUniqueId());if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);input.createInputRitchText({});input.getInputValue=function(){return this.getValue();}
this.input=input;input.setValue(value?value.toString().decodeAscii():'');input=null;return this.input;},number:function(){var conf=this._conf;var value=this.item[conf.field];var input=$addInput(createInput('text')).setStyle({width:'100%'});input.name=conf.name;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);input.onkeydown=function(e){return this.isKeyCodeNumber(e,true);}
input.getInputValue=function(){return this.value;}
this.input=input;input.value=(value?value:'');input=null;return this.input;},float:function(){var conf=this._conf;var value=this.item[conf.field];var input=$addInput(createInput('text')).setStyle({width:'100%'});input.name=conf.name;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);input.onkeydown=function(e){return this.isKeyCodeNumber(e);}
input.getInputValue=function(){return this.value;}
this.input=input;input.value=(value?value:'');input=null;return this.input;},check:function(){var conf=this._conf;var value=this.item[conf.field];var input=$addInput(createInput('checkbox'));input.name=conf.name;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);input.getInputValue=function(){return this.checked;}
this.input=input;input.checked=(typeof value!='undefined'&&value)?true:false;input=null;return this.input;},select:function(){var conf=this._conf;var value=this.item[conf.field];if(typeof value=='undefined')value=false;var input=$addInputSelect(this.newNode('div')).setStyle({width:'100%',minWidth:'50px'})
input.name=conf.name;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];input.createInputSelect({items:conf.elements});input.selectItem(value);input.getInputValue=function(){return this.value;}
this.input=input;input=null;return this.input;},date:function(){var conf=this._conf;var value=this.item[conf.field];var input=$addInputDate(this.newNode('div')).setStyle({width:'100%',minWidth:'50px'});input.name=conf.name;input.defaultText="Aucune";input.format="%l% %j% %F% %Y%";input.noButton=false;input.readOnly=false;input.deleteButton=true;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object'){for(var att in conf.attributes)input[att]=conf.attributes[att];}
if(typeof value=='object'&&typeof value.getDate=='function')input.setDate(value);input.createInputDate();input.getInputValue=function(){return this.getDate();}
this.input=input;input=null;return this.input;},slide:function(){var conf=this._conf;var value=this.item[conf.field];var input=$addInputSlide(this.newNode('div')).setStyle({width:'100%',minWidth:'50px'})
input.name=conf.name;input.createInputSlide({});if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];input.setSlide(value);input.getInputValue=function(){return this.value;}
this.input=input;input=null;return this.input;},browse:function(){var list=$id(this.idList);var conf=this._conf;var value=this.item[conf.field.index];var input=$addInputBrowse(this.newNode('div')).setStyle({width:'100%',minWidth:'100px'});input.name=conf.name;input.formatResultItem=new Function("this.write(this.item."+conf.field.itemLabel+");");input.formatSelectedItem=new Function("this.write(this.item."+conf.field.itemLabel+");");input.valueOfSelectedItem=new Function("return this.item."+conf.field.itemIndex);if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];input.createBrowse(conf.attributes);if(typeof value=='object'){for(var i in value){input.addItem(i,value[i]);}}
else if(typeof value=='number'&&value!=0){var _item={};_item[conf.field.itemIndex]
_item[conf.field.itemIndex]=value;_item[conf.field.itemLabel]=this.item[conf.field.label];input.addItem(value,_item);}
input.getInputValue=function(){return this.getItems();}
this.input=input;input=null;return this.input;}}}};$addForm=function(node){return myDOM.addPrototype('form',node);}

var _prototypeRoundBox={createBox:function(conf){if(conf)for(var c in conf)this[c]=conf[c];if(this.confTabs){this.nodeTabs=$addTabs(this.newNode('div'));this.nodeTabs.conf={borderColor:this.borderColor,backgroundColor:this.confTabs.backgroundColor,backgroundColorSelected:this.color};this.nodeTabs.elements=this.confTabs.elements;this.setTimeout(function(){this.nodeTabs.selectTab(this.confTabs.select);},50);}
$addRoundCorners(this).setRoundCorners();this.body=this.newNode('div');this.body.setStyle({backgroundColor:this.color,paddingLeft:'5px',paddingRight:'5px'});if(this.borderColor){this.body.setStyle({borderRight:"1px solid "+this.borderColor,borderLeft:"1px solid "+this.borderColor});}
this.addBottomRoundCorners();return this;}};var $addRoundBox=function(node){node=$(node);$addPrototype(node,_prototypeRoundBox);return node;}

var _prototypeMenu={newContextMenu:function(){if($$.menuThis)$$.menuThis.removeMenu();this.childMenuNode=$(_frames.main.document.createElement('div')).setStyle({left:_frames.main.getMouseX()+'px',top:_frames.main.getMouseY()+'px',width:((this.elementsMenu.width)?this.elementsMenu.width:150)+'px'});$$.menuThis=this.childMenuNode;$$.replaceByValueMenu=this.replaceByValueMenu;$addMenu(this.childMenuNode);this.childMenuNode.className='contextMenu contextMenuTheme';if(_browser.name!='Explorer'&&_browser.version!=6)this.childMenuNode.addClass('contextMenuEffect');this.childMenuNode.elementsMenu=this.elementsMenu;this.childMenuNode._this=this;this.childMenuNode.newMenu(this);$(document).addEvent("mousedown",this.removeMenu);document.body.appendChild(this.childMenuNode);if(typeof Tween=='function'){if(typeof OpacityTween=='function')new OpacityTween(this.childMenuNode,Tween.regularEaseOut,0,100,0.4).start();var tween=new Tween(this.childMenuNode.style,'width',Tween.regularEaseOut,0,this.childMenuNode.offsetWidth,0.2,'px');tween.start();var tween=new Tween(this.childMenuNode.style,'height',Tween.regularEaseOut,0,this.childMenuNode.offsetHeight,0.2,'px');tween.start();}
return this;},newStaticMenu:function(){this.className='staticMenu staticMenuTheme';$$.replaceByValueMenu=this.replaceByValueMenu;for(var i in this.elementsMenu){if(isNaN(parseInt(i))){continue;}
var cell=this.newNode('div');cell.arr=this.elementsMenu[i];if(cell.arr.attributes)for(var att in cell.arr.attributes)cell[att]=cell.arr.attributes[att];if(cell.arr.id)cell.id=cell.arr.id;cell._disabled=(!this._checkConditionsCellMenu(cell.arr.cond)&&(!cell.arr.condB||!this._checkConditionsCellMenu(cell.arr.condB))&&!cell.arr[0])?true:false;if(cell.arr.disabled)cell._disabled=true;cell.className='item';var displayIcon=true
if(cell.arr.condIcone){var cond=cell.arr.condIcone;for(var r in $$.replaceByValueMenu){cond=cond.replace(r,$$.replaceByValueMenu[r]);}
if(!eval(cond))displayIcon=false;}
if(displayIcon){if(cell.arr.icone){var iconNode=cell.newNode('img');iconNode.src=cell.arr.icone;if(cell.arr.texte){iconNode.className='itemIcon';}else{iconNode.className='itemIconOnly';}}
if(isFunction(cell.arr.customIcon)){cell._tmp=cell.arr.customIcon;var iconNode=cell._tmp();if(iconNode.className)iconNode.className+=' itemIcon';else iconNode.className='itemIcon';cell._tmp=null;}}
if(cell.arr.texte){cell.titleNode=cell.newNode('div').write(cell.arr.texte);cell.titleNode.className=(cell._disabled)?'itemTitleDisabled':'itemTitle';}
if(isObject(cell.arr.style)){cell.setStyle(cell.arr.style);}
if(cell.arr.shortcut){$addPopup(cell);}
if(cell.arr[0]){var arrowNode=cell.newNode('div');arrowNode.className='itemSubIcon';cell.refreshChildMenu=this._functionsMenu.cellParent.refreshChildMenu;cell.onmousedown=this._functionsMenu.cellParent.onmousedown;}
else{cell.onmousedown=this._functionsMenu.cell.onmousedown;cell.onmouseup=this._functionsMenu.cell.onmouseup;}
cell.onmouseover=this._functionsMenu.cell.onmouseover;cell.onmouseout=this._functionsMenu.cell.onmouseout;this.lastCell=cell;}
this.refresh=this.refreshStaticMenu;return this;},refreshStaticMenu:function(objetMere){this.write('');this.newStaticMenu();},newMenu:function(objetMere){this._this=objetMere;document.body.onselectstart=function(){return false;};this.style.MozUserSelect='none';var scrollWidth=getScrollWidth();var visibleWidth=getVisibleWidth();var visibleHeight=getVisibleHeight();var scrollTop=getScrollTop();var scrollLeft=getScrollLeft();var tmpNode=$(document.body).newNode('div').setStyle({visibility:'hidden'})
tmpNode.className='item';var lineHeight=parseInt(tmpNode.getStyle('height'));tmpNode.className='separator';var separatorHeight=parseInt(tmpNode.getStyle('height'))+parseInt(tmpNode.getStyle('marginTop'))+parseInt(tmpNode.getStyle('marginBottom'));tmpNode.remove();var height=0;var width=parseInt(this.style.width);for(var i in this.elementsMenu){if(isNaN(parseInt(i))){continue;}
var line=this.newNode('div');line.className='item';height+=lineHeight;line.arr=this.elementsMenu[i];if(line.arr.separatorBefore){line.newNodeBefore('div').write('&nbsp;').className='separator';height+=separatorHeight;}
if(line.arr.separatorAfter){line.newNodeAfter('div').write('&nbsp;').className='separator';height+=separatorHeight;}
line._disabled=(!this._checkConditionsCellMenu(line.arr.cond)&&(!line.arr.condB||!this._checkConditionsCellMenu(line.arr.condB))&&!line.arr[0])?true:false;if(line.arr.disabled)line._disabled=true;line.titleNode=line.newNode('div').write(line.arr.texte);line.titleNode.className=(line._disabled)?'itemTitleDisabled':'itemTitle';var displayIcon=true
if(line.arr.condIcone){var cond=line.arr.condIcone;for(var r in $$.replaceByValueMenu){cond=cond.replace(r,$$.replaceByValueMenu[r]);}
if(!eval(cond))displayIcon=false;}
if(displayIcon){if(isFunction(line.arr.customIcon)){line._tmp=line.arr.customIcon;var iconNode=line._tmp();iconNode.style.top='0px';if(iconNode.className)iconNode.className+=' itemIcon';else iconNode.className='itemIcon';line._tmp=null;}
if(line.arr.icone){var iconNode=line.newNode('img');iconNode.src=line.arr.icone;iconNode.className='itemIcon';}}
if(line.arr.shortcut){var shortcutNode=line.newNode('div').write(line.arr.shortcut);shortcutNode.className='itemShorcut';}
if(line.arr[0]){var arrowNode=line.newNode('div');arrowNode.className='itemSubIcon';line.refreshChildMenu=this._functionsMenu.lineParent.refreshChildMenu;line.onmouseover=this._functionsMenu.lineParent.onmouseover;}
else{line.onmouseover=this._functionsMenu.line.onmouseover;}
line.onmousedown=this._functionsMenu.line.onmousedown;line.onmouseup=this._functionsMenu.line.onmouseup;if(isObject(line.arr.style)){line.setStyle(line.arr.style);}}
var left=0;var top=0;var lastParentMenuWidth=0;var lastParentMenuHeight=0;var p=$$.menuThis;while(p){left+=parseInt(p.style.left);top+=parseInt(p.style.top);if(p!=this){lastParentMenuWidth=parseInt(p.style.width);lastParentMenuHeight=parseInt(p.style.height);}
p=p.childMenuNode;}
if((left+width+scrollLeft)>scrollLeft+visibleWidth){if(lastParentMenuWidth)this.style.left=(parseInt(this.style.left)-width-lastParentMenuWidth+20)+'px';else this.style.left=(parseInt(this.style.left)-width)+'px';}
if((top+height+20)>scrollTop+visibleHeight){this.style.top=(parseInt(this.style.top)-height+10)+'px';}},removeMenu:function(){document.body.onselectstart=null;var _this=$$.menuThis;if(_this){_this.remove();var lastFrame=false;for(var frameName in _frames){if(lastFrame!=_frames[frameName])$(_frames[frameName].document).removeEvent("mousedown",$$.menuThis.removeMenu);lastFrame=_frames[frameName];}}
delete $$.menuThis;},removeChildMenu:function(){document.body.onselectstart=null;var _this=$$.menuChildThis;if(_this){if(_this.lastCellSelected)_this.lastCellSelected.className='item';_this.refreshChildOnMouseOver=false;if(_this.childMenuNode){_this.childMenuNode.remove();_this.removeAttribute('childMenuNode');if($$.menuChildThis.childMenuNode)delete $$.menuChildThis.childMenuNode;var lastFrame=false;for(var frameName in _frames){if(lastFrame!=_frames[frameName])$(_frames[frameName].document).removeEvent("mousedown",$$.menuChildThis.removeChildMenu);lastFrame=_frames[frameName];}}}
delete $$.menuChildThis;},executeDefaultMenu:function(){var execString='';$$.replaceByValueMenu=this.replaceByValueMenu;for(var i in this.elementsMenu){var element=this.elementsMenu[i];if(element.defautA&&this._checkConditionsCellMenu(element.cond,element.onMouseDown)){execString=this._checkConditionsCellMenu(element.cond,element.onMouseDown);if(typeof element.onMouseDown=='function'){this.execMenuDefault=element.onMouseDown;this.execMenuDefault();this.execMenuDefault=null;}
else _frames.main.eval(execString);return true;}}
for(var i in this.elementsMenu){var element=this.elementsMenu[i];if(element.defautB&&this._checkConditionsCellMenu(element.condB,element.onMouseDownB)){execString=this._checkConditionsCellMenu(element.condB,element.onMouseDownB);if(typeof element.onMouseDownB=='function'){this.execMenuDefault=element.onMouseDown;this.execMenuDefault();this.execMenuDefault=null;}
else _frames.main.eval(execString);return true;}}},_checkConditionsCellMenu:function(arrCond,execString){if(isObject(arrCond)){for(var i in arrCond){if(arrCond[i]){var cond=arrCond[i];for(var r in $$.replaceByValueMenu){cond=cond.replace(r,$$.replaceByValueMenu[r]);}}
var t=(this._this)?this._this:this;t._testCondition=function(cond){if(!eval(cond))return false;else return true;}
var ok=t._testCondition(cond);t._testCondition=null
if(!ok)return false;}}
if(typeof execString=='string'){for(var r in $$.replaceByValueMenu){execString=execString.replace(r,$$.replaceByValueMenu[r]);}
return execString;}
return true;},_functionsMenu:{cellParent:{refreshChildMenu:function(){if($$.menuThis)$$.menuThis.removeMenu();if(this.parentNode.childsFrame){this.parentNode.childMenuNode=$addMenu($(this.parentNode.childsFrame.document.body).newNode('div')).setStyle({left:(this.parentNode.offsetLeft+this.offsetLeft)+'px',width:((this.arr[0].width)?this.arr[0].width:150)+'px'});}
else{this.parentNode.childMenuNode=$addMenu(this.parentNode.newNode('div')).setStyle({left:(this.offsetLeft)+'px',width:((this.arr[0].width)?this.arr[0].width:150)+'px'});}
this.parentNode.childMenuNode.cell=this;this.parentNode.childMenuNode._this=this;this.parentNode.childMenuNode.className='contextMenu contextMenuTheme';if(_browser.name!='Explorer'&&_browser.version!=6)this.parentNode.childMenuNode.addClass('contextMenuEffect');this.parentNode.childMenuNode.elementsMenu=this.arr[0];this.parentNode.childMenuNode.newMenu(this.parentNode);if(this.parentNode.verticalAlign=='top')this.parentNode.childMenuNode.style.top=(this.parentNode.childsFrame?this.parentNode.childsFrame.getVisibleHeight()-this.parentNode.childMenuNode.offsetHeight:this.parentNode.offsetHeight)+'px';else this.parentNode.childMenuNode.style.top=(this.parentNode.childsFrame?0:this.parentNode.offsetHeight)+'px';this.parentNode.refreshChildOnMouseOver=true;$$.menuChildThis=this.parentNode;$(document).addEvent("mousedown",$$.menuChildThis.removeChildMenu);},onmousedown:function(e){this.ownerDocument.parentWindow.stopParentsEvent(e);if($$.menuChildThis)$$.menuChildThis.removeChildMenu();if(this.parentNode.childMenuNode){this.parentNode.childMenuNode.remove();this.parentNode.removeAttribute('childMenuNode');if(this.parentNode.childMenuNode)delete this.parentNode.childMenuNode;}
$(document).removeEvent("mousedown",this.parentNode.removeChildMenu);this.refreshChildMenu();return false;}},cell:{onmousedown:function(e){},onmouseup:function(e){if(!this._disabled){if(isFunction(this.parentNode.onclickmenuitem)){this.parentNode.onclickmenuitem();}
var execString='';if(execString=this.parentNode._checkConditionsCellMenu(this.arr.cond,this.arr.onMouseDown)){if(typeof this.arr.onMouseDown=='function'){this.parentNode.exec=this.arr.onMouseDown;this.parentNode.exec();}
else _frames.main.eval(execString);}
else if(execString=this.parentNode._checkConditionsCellMenu(this.arr.condB,this.arr.onMouseDownB)){if(typeof this.arr.onMouseDownB=='function'){this.parentNode.exec=this.arr.onMouseDownB;this.parentNode.exec();}
else _frames.main.eval(execString);}}},onmouseover:function(e){if(this.arr.shortcut){this.popup(this.arr.shortcut);}
this.ownerDocument.parentWindow.stopParentsEvent(e);if(this.parentNode.lastCellSelected)this.parentNode.lastCellSelected.className='item';if(this.arr.texte||_browser.name=='Explorer'){this.className='item selected';}else{this.className='item selected';}
if(this.parentNode.childMenuNode&&this.parentNode.childMenuNode.cell==this)return false;this.parentNode.lastCellSelected=this;if(this.parentNode.childMenuNode){if(this.parentNode.childMenuNode.parentNode){this.parentNode.childMenuNode.remove();this.parentNode.removeAttribute('childMenuNode');if(this.parentNode.childMenuNode)delete this.parentNode.childMenuNode;}
var lastFrame=false;for(var frameName in _frames){if(lastFrame!=_frames[frameName])$(_frames[frameName].document).removeEvent("mousedown",$$.menuChildThis.removeChildMenu);lastFrame=_frames[frameName];}}
if(this.parentNode.refreshChildOnMouseOver&&this.refreshChildMenu)this.refreshChildMenu();},onmouseout:function(e){if(getRelatedTarget(e)&&getRelatedTarget(e).parentNode==this)return false;this.ownerDocument.parentWindow.stopParentsEvent(e);if(this.parentNode.childMenuNode&&this.parentNode.childMenuNode.cell==this)return false;this.className='item';}},lineParent:{refreshChildMenu:function(){if(this.parentNode){this.parentNode.childMenuNode=$(_frames.main.document.createElement('div')).setStyle({top:this.offsetTop+'px',left:(this.offsetLeft+this.offsetWidth-10)+'px',width:((this.arr[0].width)?this.arr[0].width:150)+'px'});this.parentNode.childMenuNode.line=this;this.parentNode.childMenuNode.className='contextMenu contextMenuTheme';if(_browser.name!='Explorer'&&_browser.version!=6)this.parentNode.childMenuNode.addClass('contextMenuEffect');this.parentNode.childMenuNode.elementsMenu=this.arr[0];$addMenu(this.parentNode.childMenuNode).newMenu(this.parentNode._this);this.parentNode.appendChild(this.parentNode.childMenuNode);if(typeof Tween=='function'){if(typeof OpacityTween=='function')new OpacityTween(this.parentNode.childMenuNode,Tween.regularEaseOut,0,100,0.4).start();var tween=new Tween(this.parentNode.childMenuNode.style,'width',Tween.regularEaseOut,0,this.parentNode.childMenuNode.offsetWidth,0.2,'px');tween.start();var tween=new Tween(this.parentNode.childMenuNode.style,'height',Tween.regularEaseOut,0,this.parentNode.childMenuNode.offsetHeight,0.2,'px');tween.start();}}},onmouseover:function(e){this.ownerDocument.parentWindow.stopParentsEvent(e);if(this.parentNode.lastLineSelected)this.parentNode.lastLineSelected.className='item';this.className='item selected';this.parentNode.lastLineSelected=this;if(this.parentNode.childMenuNode&&this.parentNode.childMenuNode.line==this)return false;if(this.parentNode.childMenuNode){this.parentNode.childMenuNode.remove();this.parentNode.removeAttribute('childMenuNode');if(this.parentNode.childMenuNode)delete this.parentNode.childMenuNode;}
clearTimeout($$.menuTimerChildMenu);$$.childMenu=this;$$.menuTimerChildMenu=setTimeout("$$.childMenu.refreshChildMenu()",300);}},line:{onmouseover:function(e){this.ownerDocument.parentWindow.stopParentsEvent(e);if(this.parentNode.lastLineSelected)this.parentNode.lastLineSelected.className='item';this.className='item selected';this.parentNode.lastLineSelected=this;clearTimeout($$.menuTimerChildMenu);if(this.parentNode.childMenuNode){this.parentNode.childMenuNode.remove();this.parentNode.removeAttribute('childMenuNode');if(this.parentNode.childMenuNode)delete this.parentNode.childMenuNode;}},onmousedown:function(e){this.ownerDocument.parentWindow.stopParentsEvent(e);},onmouseup:function(e){this.ownerDocument.parentWindow.stopParentsEvent(e);if(!this._disabled){if(isFunction(this.parentNode._this.onclickmenuitem)){this.parentNode._this.onclickmenuitem();}
var execString='';if(execString=this.parentNode._checkConditionsCellMenu(this.arr.cond,this.arr.onMouseDown)){if(typeof this.arr.onMouseDown=='function'){this.parentNode._this.exec=eval('['+this.arr.onMouseDown.toString()+']')[0];this.parentNode._this.exec();}
else _frames.main.eval(execString);var stie=true;}
else if(execString=this.parentNode._checkConditionsCellMenu(this.arr.condB,this.arr.onMouseDownB)){if(typeof this.arr.onMouseDownB=='function'){this.parentNode._this.exec=this.arr.onMouseDownB;this.parentNode._this.exec();}
else _frames.main.eval(execString);var stie=true;}}
if(this.parentNode&&stie){try{this.parentNode.removeChildMenu();this.parentNode.removeMenu();}catch(e){}}}}}};var $addMenu=function(node){node=$(node);$addPrototype(node,_prototypeMenu);return node;}

var _prototypeCalendar={createCalendar:function(params){if(!this.id)this.id=getUniqueId();if(params)this.setParams(params);if(!this.getParam('date'))this.setParam('date',new Date().getTodayServerTime());if(!this.getParam('monthsBefore'))this.setParam('monthsBefore',0);if(!this.getParam('monthsAfter'))this.setParam('monthsAfter',0);if(!this.getParam('typeSelection'))this.setParam('typeSelection','daily');if(!this.getParam('alignement'))this.setParam('alignement','horizontal');this.setParam('startDate',this.getParam('date').newDate().addMonths(-this.getParam('monthsBefore')).setFirstDateOfMonth().setFirstDateOfWeek());this.setParam('endDate',this.getParam('date').newDate().addMonths(this.getParam('monthsAfter')).setLastDateOfMonth().setLastDateOfWeek());this.setParam('currentMonth',this.getParam('date').getMonth());this.setParam('currentYear',this.getParam('date').getFullYear());this.setDate=this._functionsCalendar.setDate;this.select=this._functionsCalendar.select;this.refresh=this._functionsCalendar.refresh;this.onselectstart=this._functionsCalendar.onselectstart;var divTopNavigation=this.newNode('div');divTopNavigation.className='topNavigationCalendar';divTopNavigation.id=this.id+'_divTopNavigation';var previous=divTopNavigation.newNode('button').write('&lt;');previous.className='previous';previous.onclick=function(){var calendar=this.parentNode.parentNode;var curMonth=calendar.getParam('currentMonth');var curYear=calendar.getParam('currentYear');curMonth--;if(curMonth<0){curMonth=11;curYear--;}
calendar.setParam('currentMonth',curMonth);calendar.setParam('currentYear',curYear);var newDate=new Date();newDate.setDate(1);newDate.setMonth(curMonth);newDate.setYear(curYear);calendar.setParam('startDate',newDate.newDate().addMonths(-calendar.getParam('monthsBefore')).setFirstDateOfMonth().setFirstDateOfWeek());calendar.setParam('endDate',newDate.addMonths(calendar.getParam('monthsAfter')).setLastDateOfMonth().setLastDateOfWeek());calendar.refresh();}
var next=divTopNavigation.newNode('button').write('&gt;');next.className='next';next.onclick=function(){var calendar=this.parentNode.parentNode;var curMonth=calendar.getParam('currentMonth');var curYear=calendar.getParam('currentYear');curMonth++;if(curMonth>11){curMonth=0;curYear++;}
calendar.setParam('currentMonth',curMonth);calendar.setParam('currentYear',curYear);var newDate=new Date();newDate.setDate(1);newDate.setMonth(curMonth);newDate.setYear(curYear);calendar.setParam('startDate',newDate.newDate().addMonths(-calendar.getParam('monthsBefore')).setFirstDateOfMonth().setFirstDateOfWeek());calendar.setParam('endDate',newDate.addMonths(calendar.getParam('monthsAfter')).setLastDateOfMonth().setLastDateOfWeek());calendar.refresh();}
var divMonths=this.newNode('div');divMonths.className='verticalCalendar';divMonths.id=this.id+'_divMonths';return this;},_functionsCalendar:{setDate:function(date){if(this.dateSelected)this.lastDateSelected=this.dateSelected.newDate();this.dateSelected=date.newDate();},select:function(noEvent){if(this.lastDateSelected&&this.lastDateSelected.getTime()==this.dateSelected.getTime())return false;if(this.idWeekSelected){var week=$id(this.idWeekSelected);var weekCopy=$id(this.idWeekSelected+'_copy');if(week)week.className='';if(weekCopy)weekCopy.className='';}
if(isDate(this.dateSelected)){var weekDate=this.dateSelected.newDate().setFirstDateOfWeek();var week=$id(this.id+'_'+weekDate.getTime());var weekCopy=$id(this.id+'_'+weekDate.getTime()+'_copy');if(week){week.className='selected';this.idWeekSelected=week.id;}
if(weekCopy){weekCopy.className='selected';this.idWeekSelected=weekCopy.id.substr(0,weekCopy.id.length-5);}}
if(!noEvent&&isFunction(this.ondateselected))this.ondateselected();},refresh:function(){var divMonths=$id(this.id+'_divMonths').write('');var curWeek=this.getParam('startDate').newDate();var weeks=curWeek.getWeeksBetween(this.getParam('endDate'));var headRowToClone=$(document.createElement('tr'));var bodyRowToClone=$(document.createElement('tr'));for(var j in _daysName){headRowToClone.newNode('th').write(_daysName[j].substr(0,1));bodyRowToClone.newNode('td');}
var setDaysWeek=function(weekDate,isFirstWeekOfMonth,copyOfFirstWeekOnLastWeek){var calendar=this.parentNode.parentNode.parentNode.parentNode;this._weekTime=weekDate.getTime();this.id=calendar.id+'_'+this._weekTime+(copyOfFirstWeekOnLastWeek?'_copy':'');var d=weekDate.newDate();for(var j=0;j<=6;j++){var cell=this.childNodes[j];cell.write(d.getDate());if(isFirstWeekOfMonth){if((copyOfFirstWeekOnLastWeek&&(curWeek.getDate()+j)>curWeek.getMonthDays())||!copyOfFirstWeekOnLastWeek&&(curWeek.getDate()+j)<=curWeek.getMonthDays()){cell.className='grey';}}
d.addDays(1);}
this.onmouseup=calendar._functionsCalendar.calendarRow.onmouseup;this.onmouseover=calendar._functionsCalendar.calendarRow.onmouseover;this.onmouseout=calendar._functionsCalendar.calendarRow.onmouseout;}
var isFirstWeekOfMonth=false;for(var w=1;weeks>=w;w++){var isLastWeek=(weeks>w)?false:true;if(curWeek.getDate()==1||(curWeek.getDate()+6)>curWeek.getMonthDays())isFirstWeekOfMonth=true;if(isFirstWeekOfMonth){if(w>1&&curWeek.getDate()>1){var bodyRow=tBody.appendChild(bodyRowToClone.cloneNode(true));bodyRow._setDaysWeek=setDaysWeek;bodyRow._setDaysWeek(curWeek,isFirstWeekOfMonth,true);}
if(!isLastWeek){var table=$addTable(divMonths.newNode('table'));table.className='tableCalendar tableCalendarEffects';table.cellSpacing=0;table.cellPadding=0;var tCaption=table.newTableCaption();var curMonth=curWeek.newDate();if(curMonth.getDate()!=1)curMonth.addDays((curWeek.getMonthDays()-curWeek.getDate()+1));var monthName=curMonth.getMonthName();tCaption.write(monthName.substr(0,1).toUpperCase()+monthName.substr(1)+" "+curMonth.getFullYear());var tHead=table.newTableHead();var headRow=tHead.appendChild(headRowToClone.cloneNode(true));var tBody=table.newTableBody();}}
if(!isLastWeek||(curWeek.getDate()+6)==curMonth.getMonthDays()){var bodyRow=tBody.appendChild(bodyRowToClone.cloneNode(true));bodyRow._setDaysWeek=setDaysWeek;bodyRow._setDaysWeek(curWeek,isFirstWeekOfMonth,curWeek.getDate()==1?true:false);curWeek.addWeeks(1);isFirstWeekOfMonth=false;}}
this.select(true);bodyRow._setDaysWeek=null;table=null;tHead=null;headRow=null;tBody=null;bodyRow=null;setDaysWeek=null;},onselectstart:function(){return false;},calendarRow:{onmouseup:function(e){var calendar=this.parentNode.parentNode.parentNode.parentNode;var day=0;if(getTarget(e)!=this){for(var j=0;j<this.childNodes.length;j++){if(getTarget(e)==this.childNodes[j]){day=j;break;}}}
var dateSelected=new Date();dateSelected.setTime(this._weekTime);if(this.getParam('typeSelection')=='daily')dateSelected.addDays(day);calendar.setDate(dateSelected);calendar.select();},onmouseover:function(e){var calendar=this.parentNode.parentNode.parentNode.parentNode;if(this.className!='selected'){this.className='onmouseover';}},onmouseout:function(e){var calendar=this.parentNode.parentNode.parentNode.parentNode;if(this.className!='selected'){this.className='';}}}}};var $addCalendar=function(node){node=$(node);$addPrototype(node,_prototypeCalendar);return node;}

var _prototypeInputSelect={createInputSelect:function(conf){this.addClass('inputSelect inputSelectTheme');if(conf)for(var c in conf)this[c]=conf[c];if(!this.id)this.id=getUniqueId();$addKeyboard(this).setKeyboard({9:{0:new Function("e","this.unfocus(e, true);return false;"),4:new Function("e","this.unfocus(e, true);return false;")},13:{0:new Function("this.button.onclick()")},27:{0:function(){if(this.list)this.hideItems();return false;}},38:{0:new Function("this.previousItem();")},40:{0:new Function("this.nextItem();")}});this.display=this.newNode('div').addClass('display');this.display.onclick=this._functionsSelect.display.onclick;this.button=this.newNode('button').addClass('button');this.button.onclick=this._functionsSelect.button.onclick;this.button.onfocus=this._functionsSelect.button.onfocus;if(this.getAttribute('tabIndex')){this.button.newAttribute('tabIndex',this.getAttribute('tabIndex'));this.removeAttribute('tabIndex');}
this.input=createInput('hidden',this.name);this.input.value=this.value;this.appendChild(this.input);this.onmousedown=this._functionsSelect.onmousedown;this.onkeydown=this._functionsSelect.onkeydown;this.highlight=this._functionsSelect.highlight;this.removeHighlight=this._functionsSelect.removeHighlight
this.focus=this._functionsSelect.focus;this.unfocus=this._functionsSelect.unfocus;this.search=this._functionsSelect.search;this.selectItem=this._functionsSelect.selectItem;this.setValue=this._functionsSelect.setValue;this.refresh=this._functionsSelect.refresh;this.previousItem=this._functionsSelect.previousItem;this.nextItem=this._functionsSelect.nextItem;this.showItems=this._functionsSelect.showItems;this.hideItems=this._functionsSelect.hideItems;this.toggleItemsList=this._functionsSelect.toggleItemsList;this.setReadOnly=this._functionsSelect.setReadOnly;if(this.readOnly)this.setReadOnly(true);this.setItems(this.items);input=null;return this;},addItem:function(label,value,onTop){if(onTop){var newitems={};newitems[value]={label:label};for(var v in this._items){newitems[v]=this._items[v];}
this._items=newitems;}else{this._items[value]={label:label};}},setItems:function(arrItems){this._items=new Array();for(value in arrItems){if(isString(arrItems[value])){this._items[value]={label:arrItems[value]}}else{this._items[value]=arrItems[value];}}},_functionsSelect:{onmousedown:function(e){},display:{onclick:function(){if(!this.parentNode.readOnly){this.parentNode.focus();this.parentNode.toggleItemsList();}}},button:{onclick:function(){if(!this.parentNode.readOnly){this.parentNode.toggleItemsList();this.focus();}
return false;},onfocus:function(){if(!this.parentNode.readOnly){this.parentNode.focus();}}},focus:function(){this.display.addClass('focus');this.removeHighlight();this.focuskeyboard();if($$.inputSelect!=this){$$.inputSelect=this;$(document).addEvent("mousedown",$$.inputSelect.unfocus);}},unfocus:function(e,force){var _this=$$.inputSelect;if(force||(getTarget(e).parentNode!=_this&&getTarget(e).parentNode!=_this.list)){_this.display.removeClass('focus');_this.unfocuskeyboard();_this.hideItems();$(document).removeEvent("mousedown",$$.inputSelect.unfocus);$$.lastInputSelect=$$.inputSelect;delete $$.inputSelect;}},onkeydown:function(e){if(!e)e=event;var keyCode=e.keyCode;var modifiers=0;modifiers+=e.altKey?1:0;modifiers+=e.ctrlKey?2:0;modifiers+=e.shiftKey?4:0;if(keyCode>47&&keyCode<91){if(modifiers==0||modifiers==4){this.search(String.fromCharCode(keyCode));}}},search:function(char){var currentSelection=this.input.value;var firstElementThatStartsWithChar=false;var currentSelectionStartsWithChar=false;var wentOverCurrentSelection=true;if(this._items[this.input.value].label.toString().substring(0,1).toUpperCase()==char){currentSelectionStartsWithChar=true;wentOverCurrentSelection=false;}
for(value in this._items){if(this._items[value].label.toString().substring(0,1).toUpperCase()==char){if(firstElementThatStartsWithChar===false){firstElementThatStartsWithChar=value;}
if(!wentOverCurrentSelection){if(value==this.input.value){wentOverCurrentSelection=true;}}else{this.selectItem(value);break;}}}
if(currentSelectionStartsWithChar&&currentSelection==this.input.value){this.selectItem(firstElementThatStartsWithChar);}},selectItem:function(value){if(value===false){this.setValue('');}
if(this._items[value]){if(this.list){if(this.list.items[this.value]){this.list.items[this.value].removeClass('itemSelected');}
this.list.items[value].addClass('itemSelected');if(this.list.items[value].offsetTop<this.list.scrollTop){this.list.scrollTop=this.list.items[value].offsetTop;}
else if(this.list.items[value].offsetTop>(this.list.scrollTop+this.list.offsetHeight-20)){this.list.scrollTop=this.list.items[value].offsetTop-this.list.offsetHeight+20;}}
if(isFunction(this.onselectitem))if(this.onselectitem(value)===false)return false;if(typeof this.value!='undefined'&&this.value!=value&&isFunction(this.onchange))if(this.onchange(value)===false)return false;this.setValue(value);}},setValue:function(value){this.input.value=value;this.value=value.toString();this.refresh();return this;},refresh:function(){var html="";if(this._items[this.value]){if(this._items[this.value].icon){html+='&nbsp;<img src="'+this._items[this.value].icon+'">&nbsp;';}
var label=this._items[this.value].label;this.display.write(html+label);}else{this.display.write(this.value);}
return this;},previousItem:function(){if(this.readOnly)return false;var previous=false;for(var value in this._items){if(value===this.value){if(previous){this.selectItem(previous);}}
previous=value;}},nextItem:function(){if(this.readOnly)return false;var previous=false;for(var v in this._items){if(previous===this.value){this.selectItem(v);break;}
if(!this.value==!isNumber(this.value)){this.selectItem(v);break;}
previous=v;}},list:{items:{onmouseup:function(e){this.parentNode.parentNode.selectItem(this.value);this.parentNode.parentNode.hideItems();}}},showItems:function(){if(this.readOnly)return false;this.fireEventHandlers('onshowitems');this.list=this.newNode('div').addClass('listItems');$addKeyboard(this.list).focuskeyboard().setKeyboard({27:{0:function(){this.parentNode.hideItems();return true;}},13:{0:new Function("this.parentNode.button.onclick()")},38:{0:new Function("this.parentNode.previousItem()")},40:{0:new Function("this.parentNode.nextItem()")}});var nbItemsVisible=(this.nbItemsVisible)?this.nbItemsVisible:10;this.scrollTopTo=0;var cptItems=0;this.list.items={};var cpt=0;this.list._height=0;for(var value in this._items){this.list.items[value]=this.list.newNode('div').addClass('item');if(this._items[value].icon){this.list.items[value].write('&nbsp;<img src="'+this._items[value].icon+'">&nbsp;'+this._items[value].label);}else{this.list.items[value].write(this._items[value].label);}
if(this._items[value].style)this.list.items[value].setStyle(this._items[value].style);this.list.items[value].value=value;this.list.items[value].onmouseup=this._functionsSelect.list.items.onmouseup;if(++cpt<nbItemsVisible)this.list._height+=this.list.items[value].offsetHeight;}
this.list.style.height=(this.list._height)+'px';if(this.list.items[this.value]){this.list.items[this.value].addClass('itemSelected');this.scrollTopTo=this.list.items[this.value].offsetTop;if(_browser.name=='Explorer'){this.setTimeout(function(){this.list.scrollTop=this.scrollTopTo;},1);}}
if(typeof Tween=='function'){var tween=new Tween(this.list.style,'height',Tween.regularEaseOut,0,this.list.offsetHeight,0.3,'px');if(cptItems<=nbItemsVisible)this.list.style.overflow='hidden';tween.list=this.list;tween.onMotionFinished=new Function("this.obj.overflow='';this.list.scrollTop="+this.scrollTopTo);tween.start();}},hideItems:function(){if(this.list){this.list.unfocuskeyboard();this.list.remove();this.list=null;this.focuskeyboard();this.fireEventHandlers('onhideitems');}
return this;},toggleItemsList:function(){if(this.list)this.hideItems();else this.showItems();return this;},setReadOnly:function(readOnly){this.removeHighlight();this.readOnly=(readOnly)?true:false;if(this.readOnly){this.button.addClass('buttonReadonly')
this.button.disabled=true;this.display.addClass('displayReadonly');}else{this.button.disabled=false;this.button.removeClass('buttonReadonly');this.display.removeClass('displayReadonly');}
return this;},highlight:function(){if(this.readOnly)return false;this.display.addClass('displayHightlight');return this;},removeHighlight:function(){this.display.removeClass('displayHightlight');return this;}}};var $addInputSelect=function(node){node=$(node);$addPrototype(node,_prototypeInputSelect);return node;}

var _prototypeRoundCorners2={addRoundCorners:function(options){var browserName=myDOM.browser().name;if(browserName=='Explorer'){this._browser={backgroundColor:'backgroundColor',borderTopColor:'borderTopColor',borderBottomColor:'borderBottomColor',borderLeftColor:'borderLeftColor',borderRightColor:'borderRightColor',borderTopWidth:'borderTopWidth',borderBottomWidth:'borderBottomWidth',borderLeftWidth:'borderLeftWidth',borderRightWidth:'borderRightWidth'}}
else{this._browser={backgroundColor:'background-color',borderTopColor:'border-top-color',borderBottomColor:'border-bottom-color',borderLeftColor:'border-left-color',borderRightColor:'border-right-color',borderTopWidth:'border-top-width',borderBottomWidth:'border-bottom-width',borderLeftWidth:'border-left-width',borderRightWidth:'border-right-width'}}
var bkc=this.getStyle(this._browser.backgroundColor);if(bkc.indexOf('rgb')!=-1)bkc=rgb2hex(bkc);this.setParam('backgroundColor',bkc);var bc=this.getStyle(this._browser.borderTopColor);if(bc.indexOf('rgb')!=-1)bc=rgb2hex(bc);this.setParam('borderTopColor',parseFloat(this.getStyle(this._browser.borderTopWidth))?bc:bkc);var bc=this.getStyle(this._browser.borderBottomColor);if(bc.indexOf('rgb')!=-1)bc=rgb2hex(bc);this.setParam('borderBottomColor',parseFloat(this.getStyle(this._browser.borderBottomWidth))?bc:bkc);var bc=this.getStyle(this._browser.borderLeftColor);if(bc.indexOf('rgb')!=-1)bc=rgb2hex(bc);this.setParam('borderLeftColor',parseFloat(this.getStyle(this._browser.borderLeftWidth))?bc:bkc);var bc=this.getStyle(this._browser.borderRightColor);if(bc.indexOf('rgb')!=-1)bc=rgb2hex(bc);this.setParam('borderRightColor',parseFloat(this.getStyle(this._browser.borderRightWidth))?bc:bkc);this.setParam('size','small');this.setStyle({border:'none',backgroundColor:'transparent'});if(options)for(var c in options)this.setParam(c,options[c]);var html=this.getHtml();this.write('');var nodes=this.setParam('nodes',{top:new Array(),leftRight:new Array(),bottom:new Array()});this._addTopRoundCorners();this._bodyCorners=this.body=this.newNode('div').setStyle({position:'relative',padding:'0px 5px 0px 5px'});this._addBottomRoundCorners();this._bodyCorners.write(html).setStyle({height:'100%',backgroundColor:this.getParam('backgroundColor'),borderLeft:'1px solid '+this.getParam('borderLeftColor'),borderRight:'1px solid '+this.getParam('borderRightColor')});return this;},setColor:function(background,border){if(!background)background=this.getParam('backgroundColor');if(!border)border=this.getParam('borderTopColor');if(!border)border=background;this._bodyCorners.setStyle({backgroundColor:background,borderLeftColor:border,borderRightColor:border});var nodes=this.getParam('nodes');if(typeof nodes=='object'){for(var pos in nodes){var _nodesByPosition=nodes[pos];for(var i=0;i<_nodesByPosition.length;i++){var node=_nodesByPosition[i];node.style.backgroundColor=background;if(pos=='top'){node.style.borderTopColor=border;}
else if(pos=='leftRight'){node.style.borderLeftColor=border;node.style.borderRightColor=border;}
else if(pos=='bottom')node.style.borderBottomColor=border;}}}},fadeBackgroundColor:function(toColor,duration){if(this.tween&&this.tween.isPlaying){this.tween.stop();}
var fromColor=this._bodyCorners.getStyle(this._browser.backgroundColor);if(fromColor.indexOf('rgb')!=-1)fromColor=rgb2hex(fromColor);fromColor=fromColor.toString().replace('#','');if(!toColor)toColor=this.getParam('backgroundColor');if(toColor)toColor=toColor.toString().replace('#','');if(!duration)duration=0.2;this.tween=new ColorTween(this._bodyCorners.style,'backgroundColor',Tween.regularEaseIn,fromColor,toColor,duration);this.tween._this=this;this.tween.onMotionChanged=function(){this.actualColor=this.targetObject[this.targetProperty];if(this.actualColor.indexOf('rgb')!=-1)this.actualColor=rgb2hex(this.actualColor);this._this.setColor(this.actualColor);}
this.tween.onMotionFinished=function(){this.actualColor=this.targetObject[this.targetProperty];if(this.actualColor.indexOf('rgb')!=-1)this.actualColor=rgb2hex(this.actualColor);this._this.setColor(this.actualColor);this._this=null;}
this.tween.start();},_addTopRoundCorners:function(){var bc=this.getParam('borderTopColor');var bkc=this.getParam('backgroundColor');var nodes=this.getParam('nodes');var setNoEvents=function(node){return node;}
if(this.getParam('size')=='small'){nodes.top.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'0px',backgroundColor:bkc,borderTop:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:5)+'px 0px '+(this.getParam('noTopLeft')?0:5)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noTopLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noTopRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:3)+'px 0px '+(this.getParam('noTopLeft')?0:3)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:2)+'px 0px '+(this.getParam('noTopLeft')?0:2)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:1)+'px 0px '+(this.getParam('noTopLeft')?0:1)+'px'})));}
else if(this.getParam('size')=='medium'){nodes.top.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',backgroundColor:bkc,borderTop:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:8)+'px 0px '+(this.getParam('noTopLeft')?0:8)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noTopLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noTopRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:6)+'px 0px '+(this.getParam('noTopLeft')?0:6)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noTopLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noTopRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:4)+'px 0px '+(this.getParam('noTopLeft')?0:4)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:3)+'px 0px '+(this.getParam('noTopLeft')?0:3)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:2)+'px 0px '+(this.getParam('noTopLeft')?0:2)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:1)+'px 0px '+(this.getParam('noTopLeft')?0:1)+'px'})));}
else if(this.getParam('size')=='big'){nodes.top.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',backgroundColor:bkc,borderTop:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:14)+'px 0px '+(this.getParam('noTopLeft')?0:14)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noTopLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noTopRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:12)+'px 0px '+(this.getParam('noTopLeft')?0:12)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noTopLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noTopRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:10)+'px 0px '+(this.getParam('noTopLeft')?0:10)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noTopLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noTopRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:8)+'px 0px '+(this.getParam('noTopLeft')?0:8)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:7)+'px 0px '+(this.getParam('noTopLeft')?0:7)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:6)+'px 0px '+(this.getParam('noTopLeft')?0:6)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:5)+'px 0px '+(this.getParam('noTopLeft')?0:5)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:4)+'px 0px '+(this.getParam('noTopLeft')?0:4)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:3)+'px 0px '+(this.getParam('noTopLeft')?0:3)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:2)+'px 0px '+(this.getParam('noTopLeft')?0:2)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noTopRight')?0:1)+'px 0px '+(this.getParam('noTopLeft')?0:1)+'px'})));}
setNoEvents=null;},_addBottomRoundCorners:function(){var bc=this.getParam('borderBottomColor');var bkc=this.getParam('backgroundColor');var nodes=this.getParam('nodes');var setNoEvents=function(node){return node;}
if(this.getParam('size')=='small'){nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:1)+'px 0px '+(this.getParam('noBottomLeft')?0:1)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:2)+'px 0px '+(this.getParam('noBottomLeft')?0:2)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noBottomLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noBottomRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:3)+'px 0px '+(this.getParam('noBottomLeft')?0:3)+'px'})));nodes.bottom.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'0px',fontSize:'1px',height:'0px',backgroundColor:bkc,borderBottom:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:5)+'px 0px '+(this.getParam('noBottomLeft')?0:5)+'px'})));}
else if(this.getParam('size')=='medium'){nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:1)+'px 0px '+(this.getParam('noBottomLeft')?0:1)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:2)+'px 0px '+(this.getParam('noBottomLeft')?0:2)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:3)+'px 0px '+(this.getParam('noBottomLeft')?0:3)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noBottomLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noBottomRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:4)+'px 0px '+(this.getParam('noBottomLeft')?0:4)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noBottomLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noBottomRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:6)+'px 0px '+(this.getParam('noBottomLeft')?0:6)+'px'})));nodes.bottom.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'0px',backgroundColor:bkc,borderBottom:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:8)+'px 0px '+(this.getParam('noBottomLeft')?0:8)+'px'})));}
else if(this.getParam('size')=='big'){nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:1)+'px 0px '+(this.getParam('noBottomLeft')?0:1)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:2)+'px 0px '+(this.getParam('noBottomLeft')?0:2)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'2px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:3)+'px 0px '+(this.getParam('noBottomLeft')?0:3)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:4)+'px 0px '+(this.getParam('noBottomLeft')?0:4)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:5)+'px 0px '+(this.getParam('noBottomLeft')?0:5)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:6)+'px 0px '+(this.getParam('noBottomLeft')?0:6)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:'1px solid '+bc,borderRight:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:7)+'px 0px '+(this.getParam('noBottomLeft')?0:7)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noBottomLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noBottomRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:8)+'px 0px '+(this.getParam('noBottomLeft')?0:8)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noBottomLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noBottomRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:10)+'px 0px '+(this.getParam('noBottomLeft')?0:10)+'px'})));nodes.leftRight.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'1px',backgroundColor:bkc,borderLeft:(this.getParam('noBottomLeft')?1:2)+'px solid '+bc,borderRight:(this.getParam('noBottomRight')?1:2)+'px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:12)+'px 0px '+(this.getParam('noBottomLeft')?0:12)+'px'})));nodes.bottom.push(setNoEvents(this.newNode('div').setStyle({lineHeight:'1px',fontSize:'1px',height:'0px',backgroundColor:bkc,borderBottom:'1px solid '+bc,margin:'0px '+(this.getParam('noBottomRight')?0:14)+'px 0px '+(this.getParam('noBottomLeft')?0:14)+'px'})));}
setNoEvents=null;}};var $addRoundCorners2=function(node){node=$(node);$addPrototype(node,_prototypeRoundCorners2);return node;}

var _prototypeList={createList:function(params){if(typeof params=='object')this.setParameters(params);$addCookie(this);if(!this.getParameters('filters'))this.setParameter('filters',{});if(!this.getParameters('defaultFilters'))this.setParameter('defaultFilters',false);if(!this.id)this.id=getUniqueId();this.className='list listTheme';if(isUndefined(this.getParameter('checkboxs'))){this.setParameters({checkboxs:true});}
this.setStyle({zIndex:1});var divHeadersColumnsList=this.newNode('div');divHeadersColumnsList.idList=this.id;divHeadersColumnsList.id='divHeadersColumnsList_'+this.id;divHeadersColumnsList.className='header';divHeadersColumnsList.oncontextmenu=this._functionsList.divColumnsList.oncontextmenu;var divColumnsList=this.newNode('div');divColumnsList.idList=this.id;divColumnsList.id='divColumnsList_'+this.id;divColumnsList.className='scroll';divColumnsList.onscroll=this._functionsList.divColumnsList.onscroll;var cookiesCol=this.getCookie('columns_'+this.id);if(!this.getParameters('noCookies')&&cookiesCol){var cookiesColByName={};var cookiesColByPosition={};cookiesCol=cookiesCol.split(';');if(typeof cookiesCol=='object'){for(var i in cookiesCol){var tmp=cookiesCol[i].split(',');cookiesColByName[tmp[0]]={name:tmp[0],width:tmp[1]}
cookiesColByPosition[i]=cookiesColByName[tmp[0]];}
this.setParameter('cookiesColByName',cookiesColByName);var columns=this.getParameter('columns');var columnsByName=new Array();for(var i in columns){var col=columns[i];if(col.name){if(cookiesColByName[col.name]){var width=cookiesColByName[col.name].width;col.width=(width.toString().indexOf('px')!=-1)?width:parseInt(width);col.hide=false;columnsByName[col.name]=col;}
else{col.hide=true;columnsByName[col.name]=col;}}}
newOrderColumns=new Array();;for(var i in cookiesColByPosition){var colName=cookiesColByPosition[i].name;newOrderColumns.push(columnsByName[colName]);}}}
this._createColumns();this.refresh();$addKeyboard(this).setKeyboard({13:{0:function(){if(this.parentNode.parentNode.onconfirmselection){this.selectedCell.onclick();}
else if(this.selectedCell)this.selectedCell.ondblclick();}},32:{0:function(){if(this.indexCheckboxsColumn>=0&&this.selectedCell){var checkbox=this.selectedCell.cells[this.indexCheckboxsColumn].firstChild;checkbox.checked=(checkbox.checked)?false:true;checkbox.onclick();}},2:function(){if(this.indexItemDetailsColumn>=0&&this.selectedCell){this.selectedCell.cells[this.indexItemDetailsColumn].button.onclick();}}},37:{0:function(){if(this.getParameter('selectByCell'))this.selectCell('left');else{if(this.indexItemDetailsColumn>=0&&this.selectedCell){this.selectedCell.cells[this.indexItemDetailsColumn].button.parentNode.item.showDetails=false;this.selectedCell.cells[this.indexItemDetailsColumn].button.refresh(true);}}}},38:{0:function(){this.selectCell('up');}},39:{0:function(){if(this.getParameter('selectByCell'))this.selectCell('right');else{if(this.indexItemDetailsColumn>=0){this.selectedCell.cells[this.indexItemDetailsColumn].button.parentNode.item.showDetails=true;this.selectedCell.cells[this.indexItemDetailsColumn].button.refresh(true);}}}},40:{0:function(){this.selectCell('down');}},46:{0:function(){this.tryDeleteSelectedItems();}},65:{2:function(){this.selectAll();}},69:{2:function(){if(this.getParameter('itemDetails')){var divHeadersColumnsList=$id('divHeadersColumnsList_'+this.id);divHeadersColumnsList.firstChild.nextSibling.firstChild.checked=!divHeadersColumnsList.firstChild.nextSibling.firstChild.checked;divHeadersColumnsList.firstChild.nextSibling.firstChild.onclick();}}},80:{2:function(){this.print();return true;}}},true);this._createTabs();this._createMenus();this._createFiltersFields();this._oncreatelist();this._ajustHeightColumnsList();this.setEvent('onstopresize',this._functionsList.onstopresize);return this;},getItems:function(){return this.items;},setItems:function(items){if(typeof items=='object')this.items=items;return this;},selectAll:function(){if(this.getParameter('checkboxs')){var divHeadersColumnsList=$id('divHeadersColumnsList_'+this.id);divHeadersColumnsList.firstChild.firstChild.checked=!divHeadersColumnsList.firstChild.firstChild.checked;divHeadersColumnsList.firstChild.firstChild.onclick();}},setHeightList:function(height){this.style.height=height+'px';this._ajustHeightColumnsList();},_ajustHeightColumnsList:function(){var divColumnsList=$id('divColumnsList_'+this.id);var height=this.offsetHeight;if(this.divHeaderList)height-=this.divHeaderList.offsetHeight;if($id('divHeadersColumnsList_'+this.id))height-=$id('divHeadersColumnsList_'+this.id).offsetHeight;if(this.divFooterColumnsList)height-=this.divFooterColumnsList.offsetHeight;if(this.pagination)height-=this.pagination.offsetHeight;divColumnsList.setStyle({height:height+'px'});},createInputColumn:function(name,node,item){var conf=this.getColumnConfiguration(name);if(!conf)return false;node.item=item;node.idList=this.id;if(typeof conf.attributes=='object')for(var i in conf.attributes)node[i]=conf.attributes[i];if(typeof conf.edit=='object'){if(!conf.edit.type)conf.edit.type='text';node._edit=this._functionsList.columns.cell.editByTypes[conf.edit.type];node._conf=conf.edit;}
else if(typeof conf.edit=='function'){node._edit=conf.edit;}
if(typeof node._edit=='function'){return node._edit(false);}
return false;},setParameters:function(parameters){if(isObject(parameters)){for(var name in parameters){this.setParameter(name,parameters[name]);}}},setParameter:function(name,value){if(!this._parameters)this._parameters={};this._parameters[name]=value;},unsetParameter:function(name){delete this._parameters[name];},getParameters:function(){return this._parameters},getParameter:function(name){return this._parameters[name];},setFilters:function(filters){if(isObject(filters)){if(!this.getParameter('filters'))this.setParameter('filters',{});for(var name in filters){this.setFilter(name,filters[name]);}}
return this;},setFilter:function(name,value){if(!this.getParameter('filters'))this.setParameter('filters',{});var filters=this.getParameter('filters');filters[name]=value;return this;},unsetFilter:function(name){var filters=this.getParameter('filters');delete filters[name];return this;},getFilters:function(){return this.getParameter('filters')?this.getParameter('filters'):false},getFilter:function(name){return this.getParameter('filters')?this.getParameter('filters')[name]:false;},_oncreatelist:function(){this.fireEventHandlers('oncreatelist');},onmousedown:function(){this.focuskeyboard();},selectCell:function(direction){var divColumnsList=$id('divColumnsList_'+this.id);if(!this.selectedCell){var noFirstColumn=0;if(this.getParameter('checkboxs'))noFirstColumn++;if(this.getParameter('itemDetails'))noFirstColumn++;this.selectedCell=this._columns[noFirstColumn].cells.firstChild;}else if(direction=='up'){var previous=this.selectedCell.previousSibling
if(previous){if(previous.previousSibling){if(previous==previous.previousSibling.divDetails)previous=previous.previousSibling;}
this.selectedCell=previous;}}else if(direction=='down'){var next=this.selectedCell.nextSibling;if(next){if(next==this.selectedCell.divDetails)next=next.nextSibling;this.selectedCell=next;}}else if(direction=='left'){var a=0;var cells=getCopyArray(this.selectedCell.cells).reverse();for(var i in cells){if(cells[i-a]==this.selectedCell){i++;if(cells[i]&&!cells[i].noSelection){this.selectedCell=cells[i];break;}
else a++;}}}else if(direction=='right'){var a=0;var cells=this.selectedCell.cells;for(var i in cells){if(cells[i-a]==this.selectedCell){i++;if(cells[i]&&!cells[i].noSelection){this.selectedCell=cells[i];break;}
else a++;}}}
this.selectedCell.onmousedown();return this;},_defaultColumns:{checkboxs:{name:'checkboxsList',width:'25px',noResize:true,noSelection:true,header:function(){this.setStyle({textAlign:'center'})
var checkbox=this.ownerDocument.createElement('input');checkbox.type='checkbox';checkbox.onclick=this.parentNode.parentNode._functionsList.columns.checkboxs.header.onclick;this.appendChild(checkbox);},cell:function(){this.setStyle({textAlign:'center'})
this.checkbox=this.ownerDocument.createElement('input');this.checkbox.type='checkbox';this.checkbox.onclick=this.parentNode.parentNode.parentNode._functionsList.columns.checkboxs.cell.onclick;this.appendChild(this.checkbox);this.checkbox.checked=(this.item.checked)?true:false;}},details:{name:'detailsList',width:'25px',noResize:true,noSelection:true,header:function(){this.style.paddingLeft='0px';if(this.button)this.button.remove();this.button=createButton('button').setStyle({width:'25px',textAlign:'center',border:'none',backgroundColor:'transparent'});var list=this.parentNode.parentNode;this.button.refresh=list._functionsList.columns.details.header.refresh;this.button.onclick=list._functionsList.columns.details.header.onclick;this.appendChild(this.button);this.button.refresh();},cell:function(){this.style.paddingLeft='0px';this.button=createButton('button').setStyle({width:'25px',textAlign:'center',border:'none',backgroundColor:'transparent'});var list=this.parentNode.parentNode.parentNode;this.button.refresh=list._functionsList.columns.details.cell.refresh;this.button.onclick=list._functionsList.columns.details.cell.onclick;this.appendChild(this.button);this.button.refresh();}}},_createColumns:function(){var header=$id('divHeadersColumnsList_'+this.id).write('');$id('divColumnsList_'+this.id).write('');this._columns=new Array();this.lastColumn=false;var columns=this.getParameter('columns');columns[0].defaultActionMenu=true;if(this.getParameter('checkboxs')){this.indexCheckboxsColumn=this.addColumn(this._defaultColumns.checkboxs);}
if(this.getParameter('itemDetails')){this.indexItemDetailsColumn=this.addColumn(this._defaultColumns.details)}
for(var i in columns){this.addColumn(columns[i]);}
if(!this.isVisibleStateOnColumn()){var button=header.newNode('button').addClass('buttonMenuColumns');button.onclick=function(){this.parentNode.oncontextmenu();}
header.buttonSetColumns=button;button=null;}
header.newNode('div').setStyle({width:'20px',height:'20px',position:'absolute',right:'-5000px',backgroundColor:'#DE0000'})},addColumn:function(conf){if((conf.hide&&!conf.alwaysVisible)||conf.alwaysHide)return false;if(typeof conf.width=='number'){var listOffsetWidth=this.offsetWidth-12;if(_browser.name=='Explorer'||_browser.name=='Safari')listOffsetWidth=listOffsetWidth-5;if(this.getParameter('checkboxs'))listOffsetWidth=listOffsetWidth-25;if(this.getParameter('itemDetails'))listOffsetWidth=listOffsetWidth-25;}
var headerColumn=$id('divHeadersColumnsList_'+this.id).newNode('div').setStyle({left:((this.lastColumn)?this.lastColumn.header.offsetLeft+this.lastColumn.header.offsetWidth:0)+'px',width:(typeof conf.width=='number')?(((conf.width/100)*(listOffsetWidth))+'px'):conf.width});headerColumn.idList=this.id;headerColumn.className='cell';if(typeof conf.header=='string'){headerColumn.button=headerColumn.newNode('button').setStyle({width:headerColumn.offsetWidth+'px'}).write(conf.header);if(conf.styleHeader)headerColumn.button.setStyle(conf.styleHeader);if(!conf.noMove){$addDragDrop(headerColumn.button);headerColumn.button.onmousedown=this._functionsList.headerColumn.button.onmousedown;headerColumn.button.onmouseover=this._functionsList.headerColumn.button.onmouseover;headerColumn.button.ondragstart=this._functionsList.headerColumn.button.ondragstart;headerColumn.button.ondrag=this._functionsList.headerColumn.button.ondrag;headerColumn.button.ondragover=this._functionsList.headerColumn.button.ondragover;headerColumn.button.ondragout=this._functionsList.headerColumn.button.ondragout;headerColumn.button.ondrop=this._functionsList.headerColumn.button.ondrop;}
headerColumn.button.onclick=this._functionsList.headerColumn.button.onclick;headerColumn.button.refreshArrowOrderBy=this._functionsList.headerColumn.button.refreshArrowOrderBy;}
else if(typeof conf.header=='function'){headerColumn.refresh=conf.header;headerColumn.refresh();if(conf.styleHeader)headerColumn.setStyle(conf.styleHeader);}
var cellsColumn=$id('divColumnsList_'+this.id).newNode('div').setStyle({left:headerColumn.offsetLeft+'px',width:headerColumn.offsetWidth+'px'});cellsColumn.idList=this.id;cellsColumn.className='column';headerColumn.cells=cellsColumn;cellsColumn.header=headerColumn;if(conf.noSelection)headerColumn.noSelection=conf.noSelection;if(conf.noResize)headerColumn.noResize=conf.noResize;if(!conf.noResize){$addResize(headerColumn);headerColumn.resizeSides=2;headerColumn.resize();headerColumn.onstopresize=this._functionsList.headerColumn.onstopresize;}
headerColumn.conf=conf;cellsColumn.conf=conf;var indexCol=new Array();indexCol.header=headerColumn;indexCol.cells=cellsColumn;indexCol.conf=conf;var noCol=(this._columns.push(indexCol))-1;this.lastColumn=indexCol;if(headerColumn.button&&typeof headerColumn.button.refreshArrowOrderBy=='function')headerColumn.button.refreshArrowOrderBy();return noCol;},getColumn:function(name,position){var iFound=false;var cols=new Array();for(var i in this._columns){cols[i]=this._columns[i];if(this._columns[i].conf.name==name){iFound=parseInt(i);if(!position)return this._columns[i];}}
return(iFound&&position&&cols[iFound+position])?cols[iFound+position]:false;},getLastColumn:function(){return this._columns[this._columns.length-1];},getColumnConfiguration:function(name){var columns=this.getParameter('columns');for(var i in columns){if(columns[i].name==name)return columns[i];}
return false;},_moveColumn:function(fromHeader,toHeader){var cpt=0;var newCols=new Array();var lastColumn=false;if(fromHeader==toHeader)return false;for(var i in this._columns){if(this._columns[i].header==fromHeader){var tmpFrom=this._columns[i];delete this._columns[i];}}
for(var i in this._columns){if(this._columns[i].header==toHeader){newCols[cpt]=tmpFrom;newCols[cpt].header.style.left=((lastColumn)?lastColumn.header.offsetLeft+lastColumn.header.offsetWidth:0)+'px';newCols[cpt].cells.style.left=newCols[cpt].header.offsetLeft+'px';lastColumn=newCols[cpt];cpt++;}
newCols[cpt]=this._columns[i];newCols[cpt].header.style.left=((lastColumn)?lastColumn.header.offsetLeft+lastColumn.header.offsetWidth:0)+'px';newCols[cpt].cells.style.left=newCols[cpt].header.offsetLeft+'px';lastColumn=newCols[cpt];cpt++;}
this._columns=newCols;this.setCookieColumns();this.refresh();},toggleVisibilityColumn:function(name){var columns=this.getParameter('columns');var cpt=0;var colFound=false;for(var i in columns){var col=columns[i];if(!col.hide)cpt++;if(col.name==name)colFound=col;}
if((!colFound.hide&&!colFound.alwaysVisible)||colFound.alwaysHide){if(cpt>1)colFound.hide=true;}
else colFound.hide=false;this._createColumns();if(typeof this._addOrderBy=='function')this._addOrderBy();this.refresh();this.setCookieColumns();},setCookieColumns:function(){var columns=this.getParameter('columns');var cookieColumns="";for(var i in this._columns){var col=this._columns[i].conf;if(col.name&&!col.hide&&!col.alwaysHide){cookieColumns+=(cookieColumns?";":"")+""+col.name+","+col.width;}}
if(this.id)this.setCookie('columns_'+this.id,cookieColumns,360);},resetCookieColumns:function(){if(this.id)this.removeCookie('columns_'+this.id);},getSelectedItems:function(){var items=new Array();var cpt=0;for(var i in this.items){if(this.items[i].checked){cpt++;items[i]=this.items[i];}}
if(!cpt&&this.selectedCell&&typeof this.selectedCell.item=='object'){for(var i in this.items)if(this.items[i]==this.selectedCell.item){cpt++;items[i]=this.selectedCell.item;break};}
return(cpt)?items:false;},getSelectedIndexes:function(){var indexes=new Array();var cpt=0;for(var i in this.items){if(this.items[i].checked){cpt++;indexes[i]=i;}}
if(!cpt&&this.selectedCell&&typeof this.selectedCell.item=='object'){for(var i in this.items)if(this.items[i]==this.selectedCell.item){cpt++;indexes[i]=i;break};}
return(cpt)?indexes:false;},tryDeleteSelectedItems:function(){var nbChecked=0;for(var i in this.items){if(this.items[i].checked){nbChecked++;break;}}
if(!nbChecked){if(this.getParameter('messages')&&this.getParameter('messages').noElementSelected)var message=this.getParameter('messages').noElementSelected;else var message="Veuillez s&eacute;lectionner au moins un &eacute;l&eacute;ment";htmlAlert(message);return false;}
if(isFunction(this.onbeforedelete)){if(!this.onbeforedelete())return false;}
else{for(var i in this.items){if(this.items[i].checked){if(this.getParameter('messages')&&this.getParameter('messages').confirmDelete)var message=this.getParameter('messages').confirmDelete;else var message="&Ecirc;tes-vous s&ucirc;r de vouloir effacer cet(s) &eacute;l&eacute;ment(s)?";if(htmlConfirm(message)){this.deleteSelectedItems();return true;}
return false;}}}},deleteSelectedItems:function(){var confirmation=false;if(!this.garbage)this.garbage=new Array();for(var i in this.items){if(this.items[i].checked){this.garbage.push(this.items[i]);delete this.items[i];}}
this.refresh();},addItem:function(item){last=item;lastIndex=0;for(var i in this.items){tmp=this.items[i];this.items[i]=last;last=tmp;lastIndex=i;}
this.items[parseInt(lastIndex)+1]=last;this.refresh();},getCellByItem:function(name,item){if(!name)return false;var col=this.getColumn(name);if(col){for(var i=0;i<=col.cells.childNodes.length;i++){cell=col.cells.childNodes[i];if(cell.item==item)return cell;}}
return false;},execute:function(post){var filtersApply=false;var editFilters=this.getParameter('editFilters');var fields=editFilters.searchIntoFields;var filters=editFilters.filters;this._createIndexItems();if(typeof fields!='object'){for(var i in this.items){var item=this.items[i];fields=new Array();for(var field in item){fields.push(field);}
break;}}
if(inputKeywords=this.inputTextKeywords){var keywords=inputKeywords.value;for(var i in this.items){var indexIt=false;var item=this.items[i];var reject=false;if(typeof filters=='object'){for(var name in filters){var value=this.getFilter(name);var func=filters[name];if(typeof func=='function'){filtersApply=true;if(func(item,value)){indexIt=true;break;}
else reject=true;}}}
if(!reject&&keywords&&keywords!=inputKeywords.defaultText){filtersApply=true;for(var f in fields){var field=fields[f];var value=item[field];var rg=new RegExp(keywords,'i');if(value.toString().search(rg)>=0){indexIt=true;break;}
else if(indexIt)indexIt=false;}}
if(indexIt)this.indexItem(i);}}
if(!filtersApply)this._deleteIndexItems();if(this.getFilter('triCol')){this.sortItems(this.getFilter('triCol'),this.getFilter('triSens'));}
else this.refresh();},_deleteIndexItems:function(){this._items=false;},_createIndexItems:function(){this._items={};},indexItem:function(i){this._items[i]=this.items[i];},getPreviousItem:function(item){if(item&&this.items){var last=false;for(var i in this.items){var currentItem=this.items[i];if(this.items[i]==item){return last;}
last=currentItem;}}
return false;},getNextItem:function(item){if(item&&this.items){var found=false;for(var i in this.items){var currentItem=this.items[i];if(found)return currentItem;if(this.items[i]==item){found=true;}}}
return false;},sortItems:function(orderBy,triSens){if(!orderBy)return false;if(!triSens)triSens='ASC';var items=this._items?this._items:this.items;var triCol=orderBy;var _orders={desc:new Function("a","b","return a."+triCol+".toString().localeCompare(b."+triCol+".toString())>0?true:false"),asc:new Function("a","b","return a."+triCol+".toString().localeCompare(b."+triCol+".toString())<0?true:false ")}
var func=_orders[triSens.toString().toLowerCase()];var tmp;for(var i in items)
{for(var j in items)
{if(func(items[i],items[j]))
{tmp=items[i];items[i]=items[j];items[j]=tmp;}}}
this.setFilter('triCol',orderBy);this.setFilter('triSens',triSens);this.refresh();},refresh:function(){var divColumnsList=$id('divColumnsList_'+this.id);var lastScrollLeft=divColumnsList.scrollLeft;var items=this._items?this._items:this.items;this.lines=0;var zIndex=40000;if(this.emptyMessage){this.emptyMessage.remove();this.removeAttribute('emptyMessage');if(this.emptyMessage)delete this.emptyMessage;}
if(this.getParameter('itemDetails')){this.showAllDetails=false;var nbColumnDetails=0;if(this.getParameter('checkboxs'))nbColumnDetails++;this._columns[nbColumnDetails].header.showAllDetails=false;this._columns[nbColumnDetails].header.refresh();this.nbColumnDetails=nbColumnDetails;}
for(var i in this._columns)this._columns[i].cells.write('');var totalItems=0;var cell={};if(typeof items=='object'){for(var i in items){totalItems++;this.lines++;var item=items[i];if(this.selectedItems&&this.selectedItems[i]){items[i].checked=true;}
var height=21;var cells=new Array();zIndex=zIndex-2;for(var c in this._columns){var col=this._columns[c];cell=col.cells.newNode('div');cell.className='cell '+((this.lines%2)?'lineA':'lineB');cell.style.zIndex=zIndex;if(col.conf.styleCell)cell.setStyle(col.conf.styleCell);cell.index=i;cell.item=item;cells[c]=cell;cell.cells=cells;cell.idList=this.id;cell.refresh=col.conf.cell;cell.refresh();cell._edit=col.conf.edit;cell._save=col.conf.save;if(col.conf.onshowedit)cell.onshowedit=col.conf.onshowedit;if(col.conf.oncloseedit)cell.oncloseedit=col.conf.oncloseedit;if(col.header.noSelection)cell.noSelection=true;var cellHeight=cell.offsetHeight;if(cellHeight>height)height=cellHeight;if(cellHeight<21)cell.style.height='21px';cell.onmousedown=this._functionsList.columns.cell.onmousedown;cell.onclick=this._functionsList.columns.cell.onclick;cell.ondblclick=this._functionsList.columns.cell.ondblclick;cell.oncontextmenu=this._functionsList.columns.cell.oncontextmenu;cell.removeItem=this._functionsList.columns.cell.removeItem;cell.showEdit=this._functionsList.columns.cell.showEdit;cell.normalizeCellsHeight=this._functionsList.columns.cell.normalizeCellsHeight;cell.scrollToCell=this._functionsList.columns.cell.scrollToCell;if(col.conf.attributes){for(var a in col.conf.attributes){cell[a]=col.conf.attributes[a];}}}
cell.normalizeCellsHeight(height);cell=null;}}
this.totalItems=totalItems;if(!this.lines){var message='';if(this.getParameter('messages')&&typeof this.getParameter('messages').emptyList=='string')message=this.getParameter('messages').emptyList;else message="Aucun &eacute;l&eacute;ment";this.emptyMessage=divColumnsList.newNode('div').write(message);this.emptyMessage.className='empty';}
else{if(this.selectedCell)this.removeAttribute('selectedCell');if(this.selectedCell)delete this.selectedCell;}
if(this.getParameter('footer')){if(!this.divFooterColumnsList){this.divFooterColumnsList=this.newNode('div').addClass('footer footerTheme');this.divFooterColumnsList.id='divFooterColumnsList'+this.id;this.divFooterColumnsList.idList=this.id;this.divFooterColumnsList.refresh=this.getParameter('footer');var ajustHeight=true;}
this.divFooterColumnsList.write('');this.divFooterColumnsList.refresh();}
this._ajustHeightColumnsList();this._onrefreshlist();divColumnsList.scrollLeft=lastScrollLeft;divColumnsList.onscroll();},_onrefreshlist:function(){this.fireEventHandlers('onrefreshlist');},setReadOnly:function(readOnly){this.readOnly=readOnly;if(this.divTopMenuList)this.divTopMenuList.refresh();},isVisibleStateOnColumn:function(){var columns=this.getParameter('columns');var nbColsVisible=0;var nbColsAlwaysVisibles=0;for(var i in columns){var col=columns[i];if(!col.alwaysHide){nbColsVisible++;if(col.alwaysVisible)nbColsAlwaysVisibles++;}}
return(nbColsVisible==nbColsAlwaysVisibles)?true:false;},print:function(){var html="<table class='tableImpressionObjetListe' width='100%' align='center' cellpadding='0' cellspacing='0' border='0'><tr>";var noColMin=0;if(this.getParameter('checkboxs'))noColMin++;if(this.getParameter('itemDetails')){var noColDetails=noColMin;noColMin++;}
var totalWidth=$id('divHeadersColumnsList_'+this.id).offsetWidth;var nbCols=0;for(var noCol in this._columns){if(noCol<noColMin)continue;nbCols++;var headerCaption=this._columns[noCol].header.firstChild.getHtml();var widthInPixels=parseInt(this._columns[noCol].header.firstChild.style.width);html+="<th class='ligneTitreObjetListe' width='"+Math.round(widthInPixels*100/totalWidth)+"%'>"+headerCaption+"</th>";}
html+="</tr>";var selectedItems=this.getSelectedItems();if(lengthArray(selectedItems))var onlySelectedItems=true;var arrLignes={};for(var noCol in this._columns){if(noCol<noColMin)continue;var currentCell=this._columns[noCol].cells.firstChild;while(currentCell){if(!onlySelectedItems||selectedItems[currentCell.index]){if(!arrLignes[currentCell.index])arrLignes[currentCell.index]=new Array;arrLignes[currentCell.index].push(currentCell.getHtml());}
currentCell=currentCell.nextSibling;}}
var arrDetails={};if(noColDetails){var currentCell=this._columns[noColDetails].cells.firstChild;while(currentCell){if(!onlySelectedItems||selectedItems[currentCell.index]){if(currentCell.divDetails){if(!arrDetails[currentCell.index])arrDetails[currentCell.index]=new Array;arrDetails[currentCell.index].push(currentCell.divDetails.firstChild.getHtml());}}
currentCell=currentCell.nextSibling;}}
var cptLigne=0;for(var noLigne in arrLignes){html+="<tr class='"+((cptLigne%2)?"ligneObjetListePair":"ligneObjetListeImpair")+"'><td valign='top'>";html+=arrLignes[noLigne].join("</td><td>")+"</td></tr>";if(arrDetails[noLigne]){html+="<tr class='"+((cptLigne%2)?"ligneObjetListePair":"ligneObjetListeImpair")+"'><td valign='top' colspan='"+lengthArray(arrLignes[noLigne])+"'>";html+=arrDetails[noLigne]+"</td></tr>";}
cptLigne++;}
if($id('divFooterColumnsList'+this.id))html+="<tr style='background-color:#DE0000'><td colspan='"+nbCols+"'>"+$id('divFooterColumnsList'+this.id).getHtml()+"</td></tr>";else html+="<tr><td colspan='"+nbCols+"' class='ligneQueue'>&nbsp;</td></tr>";html+="</table>";printHTML(html,"",new Array({url:"css/listes.defaut.impression.css",media:"screen,print"}),{size:'landscape'});},_createHeader:function(){if(!this.divHeaderList){this.divHeaderList=this.firstChild.newNodeBefore('div').setStyle({zIndex:this.style.zIndex+1,height:(this.getParameter('topMenu')&&this.getParameter('tabs'))?'50px':'26px'});this.divHeaderList.className='topList topListTheme';this.divHeaderList.idList=this.id;}},_createMenus:function(){if(this.getParameter('topMenu')){this._createHeader();this.divTopMenuList=$addMenu(this.divHeaderList.newNode('div')).setStyle({});this.divTopMenuList.idList=this.id;this.divTopMenuList.elementsMenu=this.getParameter('topMenu');this.divTopMenuList.newStaticMenu();}},_createTabs:function(){if(this.getParameter('tabs')){this._createHeader();var divTabsList=$addTabs(this.divHeaderList.newNode('div')).setStyle({position:'absolute',bottom:'0px',width:(this.divHeaderList.offsetWidth-(this.divHeaderList.offsetWidth/3))+'px'});divTabsList.id='divTabsList_'+this.id;divTabsList.idList=this.id;divTabsList.conf={};var tmp=false;(tmp=$(document.createElement('div'))).className='colorTab';divTabsList.appendChild(tmp);divTabsList.conf.color=tmp.getStyle('color');divTabsList.elements=this.getParameter('tabs');tmp.remove();(tmp=$(document.createElement('div'))).className='backgroundColorTab';divTabsList.appendChild(tmp);divTabsList.conf.backgroundColor=tmp.getStyle('color');divTabsList.elements=this.getParameter('tabs');tmp.remove();(tmp=$(document.createElement('div'))).className='colorSelectedTab';divTabsList.appendChild(tmp);divTabsList.conf.colorSelected=tmp.getStyle('color');divTabsList.elements=this.getParameter('tabs');tmp.remove();(tmp=$(document.createElement('div'))).className='backgroundColorSelectedTab';divTabsList.appendChild(tmp);divTabsList.conf.backgroundColorSelected=tmp.getStyle('color')
divTabsList.elements=this.getParameter('tabs');tmp.remove();(tmp=$(document.createElement('div'))).className='borderColorTab';divTabsList.appendChild(tmp);divTabsList.conf.borderColor=tmp.getStyle('color');tmp.remove();divTabsList.elements=this.getParameter('tabs');var first=false;for(var tabName in divTabsList.elements){var tab=divTabsList.elements[tabName];if(!first)first=tabName;if(!tab.attributes)tab.attributes={};tab.attributes.idList=this.id;}
divTabsList.selectTab(first);}},_createFiltersFields:function(){if(this.getParameter('editFilters')){this._createHeader();this.divSearchField=this.divHeaderList.newNode('div');this.divSearchField.className='search';if(this.getParameter('editFilters').customFields){this.buttonToggleFiltersList=this.divSearchField.newNode('button');this.buttonToggleFiltersList.className='buttonCustomFilters';this.buttonToggleFiltersList.tabIndex=1;this.buttonToggleFiltersList.onclick=this._functionsList.filters.buttonToggleFiltersList.onclick;this.buttonToggleFiltersList.refresh=this._functionsList.filters.buttonToggleFiltersList.refresh;this.buttonToggleFiltersList.refresh();this.showFilters=this._functionsList.filters.customFields.showFilters;this.hideFilters=this._functionsList.filters.customFields.hideFilters;this.toggleFilters=this._functionsList.filters.customFields.toggleFilters;}
if(this.getParameter('editFilters').searchField){this.inputTextKeywords=(this.buttonToggleFiltersList)?this.buttonToggleFiltersList.newNodeBefore('input'):this.divSearchField.newNode('input');this.inputTextKeywords.className='inputTextKeywords';this.inputTextKeywords.tabIndex=2;this.inputTextKeywords.defaultText="Recherche";this.inputTextKeywords.value=(this.getFilter('filtreTxtRecherche'))?this.getFilter('filtreTxtRecherche'):this.inputTextKeywords.defaultText;this.inputTextKeywords.onkeyup=this._functionsList.filters.inputTextKeywords.onkeyup;this.inputTextKeywords.onfocus=this._functionsList.filters.inputTextKeywords.onfocus;this.inputTextKeywords.onblur=this._functionsList.filters.inputTextKeywords.onblur;this.inputTextKeywords.onblur();this.buttonFiltersList=this.divSearchField.newNode('button');this.buttonFiltersList.className='buttonRefresh';this.buttonFiltersList.tabIndex=3;this.buttonFiltersList.onclick=this._functionsList.filters.buttonFilter.onclick;$addKeyboard(this).setKeyboard({70:{2:function(){this.inputTextKeywords.focus();}}});}
else{$addKeyboard(this).setKeyboard({70:{2:function(){this.showFilters();}}});}}},_functionsList:{divColumnsList:{onscroll:function(){var edit=$id('divEditCellList_'+this.idList);if(edit){this.scrollTop=edit.lastScrollTop;this.scrollLeft=edit.lastScrollLeft;}
var header=$id('divHeadersColumnsList_'+this.idList);if(header.buttonSetColumns){header.buttonSetColumns.style.left=(this.offsetWidth+this.scrollLeft-20)+'px';header.scrollLeft=this.scrollLeft;}},oncontextmenu:function(){var list=$id(this.idList);var columns=list.getParameter('columns');if(!list.isVisibleStateOnColumn()){$addMenu(this).elementsMenu={width:200};var noM=1;for(var i in columns){var col=columns[i];if(!col.alwaysHide){this.elementsMenu[noM++]={texte:col.header,onMouseDown:"$id('"+this.idList+"').toggleVisibilityColumn('"+col.name+"')",customIcon:(!col.hide||col.alwaysVisible)?new Function("return this.newNode('div').addClass('itemChecked');"):false,disabled:col.alwaysVisible?true:false};}}
this.newContextMenu();}
return false;}},columns:{checkboxs:{header:{onclick:function(){for(var i=0;i<=this.parentNode.cells.childNodes.length;i++){var cell=this.parentNode.cells.childNodes[i];if(cell&&typeof cell.checkbox=='object'){cell.checkbox.checked=(this.checked)?true:false;cell.checkbox.onclick();}}}},cell:{onclick:function(e){stopPropagation(e);this.parentNode.item.checked=this.checked;}}},details:{header:{refresh:function(){this.write("<div class='"+(this.showAllDetails?'iconDetailMinus':'iconDetailPlus')+"'></div>");},onclick:function(){this.showAllDetails=!this.showAllDetails;this.refresh();for(var i=0;i<=this.parentNode.cells.childNodes.length;i++){var cell=this.parentNode.cells.childNodes[i];if(cell&&typeof cell.button=='object'){cell.button.parentNode.item.showDetails=this.showAllDetails;cell.button.refresh(true);}}}},cell:{refresh:function(fromHeader){this.write("<div class='"+(this.parentNode.item.showDetails?'iconDetailMinus':'iconDetailPlus')+"'></div>");if(this.parentNode.item.showDetails){var cell=this.parentNode;var column=this.parentNode.parentNode;var list=$id(column.idList);var width=$id('divColumnsList_'+list.id).scrollWidth-5;if(list.getParameter('checkboxs')){width-=25;}
if(cell.divDetails){cell.divDetails.remove();cell.removeAttribute('divDetails');if(cell.divDetails)delete cell.divDetails;}
cell.divDetails=cell.newNodeAfter('div').setStyle({position:'relative',width:width+'px'});cell.divDetails.style.zIndex=cell.style.zIndex-1;this.divItemDetails=cell.divDetails.newNode('div').setStyle({width:(width)+'px'});this.divItemDetails.item=cell.item;this.divItemDetails.index=cell.index;this.divItemDetails.idList=list.id;this.divItemDetails.className=cell.className+' details';if(list.getParameter('itemDetails')){this.divItemDetails.buildDetails=list.getParameter('itemDetails').content;this.divItemDetails.buildDetails();}
this.divItemDetails.onmousedown=function(){this.parentNode.previousSibling.onmousedown();}
this.divItemDetails.ondblclick=function(){this.parentNode.previousSibling.ondblclick();}
this.divItemDetails.oncontextmenu=function(){this.parentNode.previousSibling.oncontextmenu();return false;}
cell.divDetails.style.height=this.divItemDetails.offsetHeight+'px';column.style.zIndex=40000;var height=cell.offsetHeight+this.divItemDetails.offsetHeight+'px';for(var i in cell.cells){if(!fromHeader||cell.cells[i]!=cell)cell.cells[i].style.height=height;}
if(!list.getParameter('selectByCell')&&list.selectedCell&&list.selectedCell.cells[0]==cell.cells[0]){cell.divDetails.firstChild.addClass('selected');}}
else{if(this.divItemDetails){var height=this.parentNode.offsetHeight+'px';if(this.parentNode.divDetails){this.parentNode.divDetails.remove();this.parentNode.removeAttribute('divDetails');if(this.parentNode.divDetails)delete this.parentNode.divDetails;for(var i in this.parentNode.cells){var cell=this.parentNode.cells[i];if(!fromHeader||cell!=this.parentNode)cell.style.height=height;}}}}},onclick:function(e){stopPropagation(e);this.parentNode.item.showDetails=!this.parentNode.item.showDetails;this.refresh();if(this.parentNode.item.showDetails){this.parentNode.style.height=this.parentNode.offsetHeight-this.divItemDetails.offsetHeight+'px';}}}},cell:{onmousedown:function(){if(!this.parentNode)return false;var list=this.parentNode.parentNode.parentNode;if(list.getParameter('selectByCell')){if(!this.noSelection){if(list.lastSelectedCell)list.lastSelectedCell.removeClass('selected');this.addClass('selected');this.scrollToCell();list.lastSelectedCell=this;list.selectedCell=this;}}
else{if(list.lastSelectedCell){for(var i in list.lastSelectedCell.cells)list.lastSelectedCell.cells[i].removeClass('selected');if(list.indexItemDetailsColumn&&list.lastSelectedCell.cells[list.indexItemDetailsColumn].divDetails){list.lastSelectedCell.cells[list.indexItemDetailsColumn].divDetails.firstChild.removeClass('selected');}}
for(var i in this.cells)this.cells[i].addClass('selected');if(list.indexItemDetailsColumn&&this.cells[list.indexItemDetailsColumn].divDetails){this.cells[list.indexItemDetailsColumn].divDetails.firstChild.addClass('selected');}
list.lastSelectedCell=this;list.selectedCell=this;}},onclick:function(){try{var list=this.parentNode.parentNode.parentNode;if(list.parentNode.parentNode.onconfirmselection){if(list.getParameter('singleSelection')){var items=list.getSelectedItems();if(items)for(var i in items)items[i].checked=false;}
if(list.indexCheckboxsColumn>=0){var checkbox=list.selectedCell.cells[list.indexCheckboxsColumn].firstChild;checkbox.checked=true;checkbox.onclick();}
if(list.getParameter('singleSelection'))$id('buttonFunctionOut_'+this.idList).onclick();}}catch(e){}},ondblclick:function(){var list=$id(this.idList);if(!list.parentNode.parentNode.onconfirmselection){if(list.getParameter('selectByCell')){this.showEdit()}
else{if(list.getParameter('itemMenu')){$addMenu(this).elementsMenu=list.getParameter('itemMenu').elements;this.replaceByValueMenu=list.getParameter('itemMenu').replaceByValue;this.executeDefaultMenu();}}}},editByTypes:{string:function(editOnlist){var conf=this._conf;var value=this.item[conf.field];var input=$addInput(createInput('text')).addClass('editInputText').setStyle({width:'100%'});input.idList=this.idList;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);if(editOnlist){this.setKeyboard({13:{0:function(){this.save();}},27:{0:function(){this.closeEdit(false);}}});input.onblur=function(){this.parentNode.save();}
this.save=function(){var cell=this.divCell;if(cell){var saveState=cell._save(this.input.value);if(saveState!==false)cell.refresh();this.closeEdit(saveState);}}
input.focus();input.setCaretToEnd();}
input.getInputValue=function(){return this.value;}
this.input=input;input.value=(typeof value!='undefined')?value:'';input=null;return this.input;},text:function(editOnlist){var list=$id(this.idList);var cell=this.divCell;var conf=this._conf;var value=this.item[conf.field];var defaultHeight=(cell&&cell.offsetHeight>50)?cell.offsetHeight:50;var input=$addInput(document.createElement('textarea')).setStyle({width:'100%',minWidth:'150px',height:defaultHeight+'px',minHeight:'150px',maxHeight:'400px'});input.idList=this.idList;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);if(editOnlist){this.setKeyboard({13:{0:function(){this.save();}},27:{0:function(){this.closeEdit(false);}}});input.onblur=function(){this.parentNode.save();}
this.save=function(){var cell=this.divCell;if(cell){var saveState=cell._save(this.input.value);if(saveState!==false)cell.refresh();this.closeEdit(saveState);}}
$$.tmpEdit=this;$(document).addEvent("mouseup",list._functionsList.columns.cell._saveEdit);input.focus();}
input.getInputValue=function(){return this.value;}
this.input=input;input.write(value?value.toString().removeBR():'');input=null;return this.input;},richtext:function(editOnlist){var list=$id(this.idList);var cell=this.divCell;var conf=this._conf;var value=this.item[conf.field];var defaultHeight=(cell&&cell.offsetHeight>50)?cell.offsetHeight:50;var input=$addInputRitchText(document.createElement('div')).setStyle({width:'100%',minWidth:'150px',height:defaultHeight+'px',minHeight:'150px',maxHeight:'400px'});input.setId('richtext_'+getUniqueId());input.idList=this.idList;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);input.createInputRitchText({});if(editOnlist){this.setKeyboard({13:{0:function(){this.save();}},27:{0:function(){this.closeEdit(false);}}});input.onblur=function(){this.parentNode.save();}
this.save=function(){var cell=this.divCell;if(cell){var saveState=cell._save(this.input.getValue());if(saveState!==false)cell.refresh();this.closeEdit(saveState);}}
$$.tmpEdit=this;$(document).addEvent("mouseup",list._functionsList.columns.cell._saveEdit);input.focus();}
input.getInputValue=function(){return this.getValue();}
this.input=input;input.setValue(value?value.toString().decodeAscii():'');input=null;return this.input;},number:function(editOnlist){var conf=this._conf;var value=this.item[conf.field];var input=$addInput(createInput('text')).setStyle({width:'100%'});input.idList=this.idList;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);if(editOnlist){this.setKeyboard({13:{0:function(){this.save();}},27:{0:function(){this.closeEdit(false);}}});input.onblur=function(){this.parentNode.save();}
this.save=function(){var cell=this.divCell;if(cell){var saveState=cell._save(this.input.value);if(saveState!==false)cell.refresh();this.closeEdit(saveState);}}
input.focus();input.setCaretToEnd();}
input.onkeydown=function(e){return this.isKeyCodeNumber(e,true);}
input.getInputValue=function(){return this.value;}
this.input=input;input.value=(typeof value!='undefined'?value:'');input=null;return this.input;},float:function(editOnlist){var conf=this._conf;var value=this.item[conf.field];var input=$addInput(createInput('text')).setStyle({width:'100%'});input.idList=this.idList;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);if(editOnlist){this.setKeyboard({13:{0:function(){this.firstChild.onblur();}},27:{0:function(){this.closeEdit(false);}}});input.onblur=function(){this.parentNode.save();}
this.save=function(){var cell=this.divCell;if(cell){var saveState=cell._save(this.input.value);if(saveState!==false)cell.refresh();this.closeEdit(saveState);}}
input.focus();input.setCaretToEnd();}
input.onkeydown=function(e){return this.isKeyCodeNumber(e);}
input.getInputValue=function(){return this.value;}
this.input=input;input.value=(typeof value!='undefined'?value:'');input=null;return this.input;},check:function(editOnlist){var conf=this._conf;var value=this.item[conf.field];if(editOnlist){var cell=this.divCell;var saveState=cell._save(value?0:1);if(saveState!==false)cell.refresh();this.closeEdit(saveState);}
else{var input=$addInput(createInput('checkbox'));input.idList=this.idList;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];this.appendChild(input);input.getInputValue=function(){return this.checked;}
this.input=input;input.checked=(typeof value!='undefined'&&value)?true:false;input=null;return this.input;}},select:function(editOnlist){var list=$id(this.idList);var conf=this._conf;var value=this.item[conf.field];var input=$addInputSelect(this.newNode('div')).setStyle({width:'100%',minWidth:'50px'});input.idList=this.idList;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];input.createInputSelect({items:conf.elements});input.selectItem(value);if(editOnlist){this.setKeyboard({13:{0:function(){this.save();}},27:{0:function(){this.closeEdit(false);}}});input.onmousedown=function(e){stopParentsEvent(e);},input.onhideitems=function(){this.parentNode.save();};this.save=function(){var cell=this.divCell;if(cell){var saveState=cell._save(this.input.value);if(saveState!==false)cell.refresh();this.input.unfocuskeyboard();this.closeEdit(saveState);}}
input.showItems();$$.tmpEdit=this;$(document).addEvent("mouseup",list._functionsList.columns.cell._saveEdit);}
input.getInputValue=function(){return this.value;}
this.input=input;input=null;return this.input;},date:function(editOnlist){var list=$id(this.idList);var conf=this._conf;var value=this.item[conf.field];var input=$addInputDate(this.newNode('div')).setStyle({width:'100%',minWidth:'50px'});input.idList=this.idList;input.defaultText="Aucune";input.format="%l% %j% %F% %Y%";input.noButton=false;input.readOnly=false;input.deleteButton=true;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object'){for(var att in conf.attributes)input[att]=conf.attributes[att];}
if(typeof value=='object'&&typeof value.getDate=='function')input.setDate(value);if(editOnlist){this.setKeyboard({13:{0:function(){this.save();}},27:{0:function(){this.closeEdit(false);}}});input.onmousedown=function(e){stopParentsEvent(e);},input.onmouseup=function(e){stopParentsEvent(e);},input.ondateselected=function(){this.parentNode.save();};this.save=function(){var cell=this.divCell;if(cell){var saveState=cell._save(this.input.getDate());if(saveState!==false)cell.refresh();if(this.input.calendar)this.input.calendar.unfocuskeyboard();this.input.unfocuskeyboard();this.closeEdit(saveState);}}
input.getCalendar();$$.tmpEdit=this;$(document).addEvent("mouseup",list._functionsList.columns.cell._saveEdit);}
else{input.createInputDate();}
input.getInputValue=function(){return this.getDate();}
this.input=input;input=null;return this.input;},slide:function(editOnlist){var list=$id(this.idList);var conf=this._conf;var value=this.item[conf.field];var input=$addInputSlide(this.newNode('div')).setStyle({width:'100%',minWidth:'50px'}).createInputSlide({});input.idList=this.idList;if(typeof conf.style=='object')input.setStyle(conf.style);if(typeof conf.attributes=='object')for(var att in conf.attributes)input[att]=conf.attributes[att];input.setSlide(value);if(editOnlist){input.setKeyboard({13:{0:function(){this.parentNode.save();}},27:{0:function(){this.unfocuskeyboard();this.parentNode.closeEdit(false);}}});this.save=function(){var cell=this.divCell;if(cell){var saveState=cell._save(this.input.value);if(saveState!==false)cell.refresh();this.input.unfocuskeyboard();this.closeEdit(saveState);}}
input.focuskeyboard();$$.tmpEdit=this;$(document).addEvent("mouseup",list._functionsList.columns.cell._saveEdit);}
input.getInputValue=function(){return this.value;}
this.input=input;input=null;return this.input;},browse:function(editOnlist){var list=$id(this.idList);var conf=this._conf;var value=this.item[conf.field.index];var input=$addInputBrowse(this.newNode('div')).setStyle({width:'100%',minWidth:'100px'});input.idList=this.idList;input.formatResultItem=new Function("this.write(this.item."+conf.field.itemLabel+");");input.formatSelectedItem=new Function("this.write(this.item."+conf.field.itemLabel+");");input.valueOfSelectedItem=new Function("return this.item."+conf.field.itemIndex);if(typeof conf.style=='object')input.setStyle(conf.style);input.createBrowse(conf.attributes);if(typeof value=='object'){for(var i in value){input.addItem(i,value[i]);}}
else if(typeof value=='number'&&value!=0){var _item={};_item[conf.field.itemIndex]
_item[conf.field.itemIndex]=value;_item[conf.field.itemLabel]=this.item[conf.field.label];input.addItem(value,_item);}
if(editOnlist){input.setKeyboard({13:{0:function(){this.parentNode.save();}},27:{0:function(){this.parentNode.closeEdit(false);}}});input.onmousedown=function(e){stopParentsEvent(e);},input.onmouseup=function(e){stopParentsEvent(e);},this.save=function(){var list=$id(this.idList);if(list.winBrowseOpened)return false;var cell=this.divCell;if(cell){var saveState=cell._save(this.input.getItems());if(saveState!==false)cell.refresh();this.input.input.unfocuskeyboard();this.input.unfocuskeyboard();this.closeEdit(saveState);}}
$$.tmpEdit=this;$(document).addEvent("mouseup",list._functionsList.columns.cell._saveEdit);input.focus();}
input.getInputValue=function(){return this.getItems();}
this.input=input;input=null;return this.input;}},_saveEdit:function(e){var p=getTarget(e);if(p){while(p.tagName!="BODY"&&p.tagName!="HTML"){if($$.tmpEdit==p){return false;}
p=p.parentNode;}
if(typeof $$.tmpEdit.save=='function'){var state=$$.tmpEdit.save();if(state!==false){$$.tmpEdit=null;}}}},showEdit:function(){var list=$id(this.idList);list.isOnEdit=true;var columns=$id('divColumnsList_'+this.idList);if(list.readOnly)return false;if(this.parentNode.conf.noEditByList)return false;removeSelectedText();if(typeof this._edit=='function'||typeof this._edit=='object'){var top=0;left=1;var p=this;while(!p.hasClass('list')){left+=p.offsetLeft;top+=p.offsetTop;p=p.parentNode;}
left-=columns.scrollLeft;top-=columns.scrollTop;var divEdit=$(document.createElement('div')).setStyle({top:top+'px',left:left+'px',width:(this.offsetWidth-5)+'px'});divEdit.lastScrollTop=columns.scrollTop;divEdit.lastScrollLeft=columns.scrollLeft;divEdit.id='divEditCellList_'+this.idList;divEdit.addClass('edit');divEdit.idList=this.idList;divEdit.divCell=this;divEdit.item=this.item;if(typeof this._edit=='function'){divEdit._edit=this._edit;}
else{if(!this._edit.type)this._edit.type='text';divEdit._edit=list._functionsList.columns.cell.editByTypes[this._edit.type];divEdit._conf=this._edit;}
if(typeof this._save=='function'){divEdit._save=this._save;}
list.appendChild(divEdit);$addKeyboard(divEdit).focuskeyboard();if(typeof this.onshowedit=='function')divEdit.onshowedit=this.onshowedit;if(typeof this.oncloseedit=='function')divEdit.oncloseedit=this.oncloseedit;divEdit.setTimeout(function(){this._edit(true);this.fireEventHandlers('onshowedit');},1);divEdit.closeEdit=function(saveState){var list=$id(this.idList);this.saveState=saveState;list.isOnEdit=false;this.divCell.normalizeCellsHeight();this.fireEventHandlers('oncloseedit');this.unfocuskeyboard();this.divCell=null;$(document).removeEvent("mouseup",list._functionsList.columns.cell._saveEdit);this.remove();list.divEdit=false;}
this.divEdit=divEdit;}},normalizeCellsHeight:function(height){var list=$id(this.idList);if(!height||height<21){height=21;var heightDetails=0;for(var i in this.cells){var cell=this.cells[i];if(cell.divDetails){heightDetails=cell.divDetails.offsetHeight;}
cell.style.height='auto';if(height<cell.offsetHeight)height=cell.offsetHeight;}}
for(var i in this.cells){var cell=this.cells[i];if(heightDetails)cell.style.height=(height+heightDetails)+'px';else cell.style.height=(height)+'px';}
if(list.getParameter('itemDetails')&&this.item.showDetails){var height=this.cells[list.nbColumnDetails].offsetHeight-this.cells[list.nbColumnDetails].divDetails.offsetHeight;this.cells[list.nbColumnDetails].style.height=height+'px';}},scrollToCell:function(){var list=this.parentNode.parentNode.parentNode;var divColumnsList=this.parentNode.parentNode;var topList=divColumnsList.scrollTop;var leftList=divColumnsList.scrollLeft;var bottomList=divColumnsList.scrollTop+divColumnsList.offsetHeight;;var rightList=divColumnsList.scrollLeft+divColumnsList.offsetWidth;var topCell=this.offsetTop;var leftCell=this.parentNode.offsetLeft;var bottomCell=this.offsetTop+this.offsetHeight;var rightCell=this.parentNode.offsetLeft+this.offsetWidth;if(bottomCell>bottomList)divColumnsList.scrollTop=topCell;if(topCell<topList)divColumnsList.scrollTop=topCell;if(rightCell>rightList)divColumnsList.scrollLeft=leftCell-(divColumnsList.offsetWidth-this.offsetWidth);if(leftCell<leftList)divColumnsList.scrollLeft=leftCell;if(leftCell<=50)divColumnsList.scrollLeft=0;},oncontextmenu:function(){var list=$id(this.idList);if(list.getParameter('itemMenu')){$addMenu(this).elementsMenu=list.getParameter('itemMenu').elements;this.replaceByValueMenu=list.getParameter('itemMenu').replaceByValue;this.onclickmenuitem=list.getParameter('itemMenu').onclickmenuitem;this.newContextMenu();}
return false;},removeItem:function(){var list=$id(this.idList);if(list.readOnly)return false;for(var i in list.items){if(list.items[i]==this.item){if(!list.garbage)list.garbage=new Array();list.garbage.push(list.items[i]);delete list.items[i];break;}}
if(this.item.showDetails){var nbColumnDetails=0;if(list.getParameter('checkboxs'))nbColumnDetails++;this.cells[nbColumnDetails].divDetails.remove();this.cells[nbColumnDetails].removeAttribute('divDetails');if(this.cells[nbColumnDetails].divDetails)delete this.cells[nbColumnDetails].divDetails;}
for(var i in this.cells){this.cells[i].remove();}}}},headerColumn:{button:{onmousedown:function(e){this.drag(e)},onmouseover:function(){this.drop()},ondragstart:function(){var left=absoluteLeft(this);var top=absoluteTop(this);this.stickyMouse=$(document.createElement('div'));this.stickyMouse.ajustX=-(getMouseX()-left);this.stickyMouse.ajustY=this.offsetHeight+5;this.stickyMouse.style.visibility='hidden';this.stickyMouse.style.width=this.offsetWidth+'px';this.stickyMouse.className='listHeaderDragIcon listHeaderDragIconTheme';this.stickyMouse.write(this.getHtml());},ondrag:function(){if(this.stickyMouse){if(this.stickyMouse.style.visibility=='hidden'){document.body.appendChild(this.stickyMouse);this.stickyMouse.style.visibility='visible';$addEffects(this.stickyMouse);this.stickyMouse.fadeTime=0.2;this.stickyMouse.setOpacity(0);this.stickyMouse.fadeIn();}
this.stickyMouse.style.left=(getMouseX()+this.stickyMouse.ajustX)+'px';this.stickyMouse.style.top=(getMouseY()+this.stickyMouse.ajustY)+'px';}},ondragover:function(){if($$.dragThis!=this){this.curDrop=this.parentNode.parentNode.newNode('div').setStyle({left:(this.parentNode.offsetLeft-5)+'px'});this.curDrop.className='listHeaderDropIcon listHeaderDropIconTheme';}},ondragout:function(){if(this.curDrop){this.curDrop.remove();this.removeAttribute('curDrop');if(this.curDrop)delete this.curDrop;}},ondrop:function(){var _this=$$.dragThis;_this.stickyMouse.remove();_this.removeAttribute('stickyMouse');if(_this.stickyMouse)delete _this.stickyMouse;if($$.dropThis)_this.parentNode.parentNode.parentNode._moveColumn(_this.parentNode,$$.dropThis.parentNode);},onclick:function(triSens){if(typeof triSens!='string')triSens='';var list=$id(this.parentNode.idList);var orderBy=this.parentNode.conf.orderBy;if(!triSens){var triSens=list.getFilter('triSens');if(!triSens||orderBy!=list.getFilter('triCol'))triSens='ASC';else if(triSens=='ASC')triSens='DESC';else if(triSens=='DESC')triSens='ASC';}
if(orderBy){list.sortItems(orderBy,triSens);this.refreshArrowOrderBy();}},refreshArrowOrderBy:function(){var list=$id(this.parentNode.idList);if(this.parentNode.conf.orderBy==list.getFilter('triCol')){if(list.arrowOrderBy)list.arrowOrderBy.remove();list.arrowOrderBy=this.parentNode.button.newNode('div');list.arrowOrderBy.className=(list.getFilter('triSens')=='DESC')?'downOrder':'upOrder';}}},onstopresize:function(){var list=this.parentNode.parentNode;var _columns=list._columns;if(this.offsetWidth<25)this.style.width='25px';var left=0;for(var i in _columns){var header=_columns[i].header;header.style.left=left+'px';left+=(header.offsetWidth);if(header.button)header.button.style.width=header.offsetWidth+'px';_columns[i].cells.style.left=header.style.left;_columns[i].cells.style.width=header.style.width;if(!_columns[i].conf.hide&&!_columns[i].conf.alwaysHide)_columns[i].conf.width=header.style.width;var lastCol=_columns[i];if(lastCol.header.resetresize)lastCol.header.resetresize();}
this.parentNode.parentNode.refresh();list.setCookieColumns();}},filters:{inputTextKeywords:{onfocus:function(){if(this.value==this.defaultText){this.style.color='#000000';this.value='';}
$addKeyboard(this).keyboard={13:{0:function(){if(!this.disabled){var list=$id(this.parentNode.parentNode.idList);if(list.hideFilters)list.hideFilters();list.setFilter('action','');list.execute();}}},27:{0:function(){this.blur();}},70:{2:function(){var list=$id(this.parentNode.parentNode.idList);if(typeof list.toggleFilters=='function')list.toggleFilters();}}}
this.focuskeyboard();},onblur:function(){if(this.disabled){this.value='';this.style.backgroundColor='transparent';}else{if(!this.value)this.value=this.defaultText;if(this.value==this.defaultText)this.style.color='#AAAAAA';this.style.backgroundColor='';this.unfocuskeyboard();}},onkeyup:function(){var list=$id(this.parentNode.parentNode.idList);list.setFilter('filtreTxtRecherche',this.value)}},buttonToggleFiltersList:{onclick:function(){$id(this.parentNode.parentNode.idList).toggleFilters();},refresh:function(){var list=$id(this.parentNode.parentNode.idList);if(this.disabled){this.write("<img src='myDOM/images/list/arrowdown_gris.gif' alt='Les filtres ne sont pas disponibles'>");}
else if(!list.divCustomFiltersList||this.className=='buttonCustomFilters buttonCustomFiltersOpened'){this.className='buttonCustomFilters';}
else{this.className='buttonCustomFilters buttonCustomFiltersOpened';}}},buttonFilter:{onclick:function(){var list=$id(this.parentNode.parentNode.idList);if(list.hideFilters)list.hideFilters();list.setFilter('action','');list.execute();}},customFields:{toggleFilters:function(){if(this.divCustomFiltersList){if(this.divCustomFiltersList.style.visibility=='hidden'){this.divCustomFiltersList.style.visibility='';this.divCustomFiltersList.focuskeyboard();this.buttonToggleFiltersList.refresh();if(typeof Tween=='function'){if(!this.divCustomFiltersList.fixedHeight)this.divCustomFiltersList.fixedHeight=this.divCustomFiltersList.offsetHeight;this.divCustomFiltersList.style.overflow='hidden';var tween=new Tween(this.divCustomFiltersList.style,'height',Tween.bounceEaseOut,0,this.divCustomFiltersList.fixedHeight,0.5,'px');tween.onMotionFinished=function(){this.obj.overflow='';this.obj.height='';};tween.start();}}
else{this.hideFilters();}}
else{this.showFilters();if(typeof Tween=='function'){this.divCustomFiltersList.style.overflow='hidden';var tween=new Tween(this.divCustomFiltersList.style,'height',Tween.bounceEaseOut,0,this.divCustomFiltersList.offsetHeight,0.5,'px');tween.onMotionFinished=function(){this.obj.overflow='';this.obj.height='';};tween.start();}}},hideFilters:function(){if(this.divCustomFiltersList){if(typeof Tween=='function'){}
else{}
this.divCustomFiltersList.style.visibility='hidden';this.divCustomFiltersList.unfocuskeyboard();}
this.buttonToggleFiltersList.refresh();},showFilters:function(){var left=0,top=0;this.divCustomFiltersList=this.divSearchField.newNode('div');this.divCustomFiltersList.className='customFilters';this.divCustomFiltersList.id='divCustomFiltersList_'+this.id;$addKeyboard(this.divCustomFiltersList).keyboard={13:{0:function(){$id(this.parentNode.parentNode.idList).hideFilters();$id(this.parentNode.parentNode.idList).execute();}},27:{0:function(){$id(this.parentNode.parentNode.idList).hideFilters();}},70:{2:function(){var list=$id(this.parentNode.parentNode.idList);list.hideFilters();if(list.inputTextKeywords)list.inputTextKeywords.focus();}}}
this.divCustomFiltersList.focuskeyboard();this.divCustomFiltersList.idList=this.id;this.divCustomFiltersList._init=this.getParameter('editFilters').customFields;this.divCustomFiltersList._init();this.divCustomFiltersList._init=null;if(this.inputTextKeywords){var left=this.inputTextKeywords.offsetLeft+this.inputTextKeywords.offsetWidth;var top=this.inputTextKeywords.offsetTop+this.inputTextKeywords.offsetHeight-1;}
else{var left=this.buttonToggleFiltersList.offsetLeft+this.buttonToggleFiltersList.offsetWidth;var top=this.buttonToggleFiltersList.offsetTop+this.buttonToggleFiltersList.offsetHeight-1;}
this.divCustomFiltersList.setStyle({left:(left-this.divCustomFiltersList.offsetWidth)+'px',top:(top)+'px'});this.buttonToggleFiltersList.refresh();}}}}};var $addList=function(node){node=$(node);$addPrototype(node,_prototypeList);return node;}

var _prototypeSlideShow={createSlideShow:function(options){this.addClass('slideShow slideTheme');if(options)for(var c in options)this.setParam(c,options[c]);this.display=this.newNode('div').addClass('display');this.display.onclick=this._functionsSlideShow.display.onclick;this.display.oncontextmenu=this._functionsSlideShow.display.oncontextmenu;this.nav=this.newNode('div').addClass('nav');this.nav.onmouseover=this._functionsSlideShow.nav.onmouseover;if(typeof Tween=='function'){if(typeof OpacityTween=='function'){this.tween=new OpacityTween(this.nav,Tween.regularEaseIn,0,30,1).start();}}
var previous=this.nav.newNode('div').addClass('previous');previous.onclick=this._functionsSlideShow.nav.previous.onclick;next=this.nav.newNode('div').addClass('next');next.onclick=this._functionsSlideShow.nav.next.onclick;this._imagesPreloaded=new Array();return this;},start:function(){this.isPlaying=true;this.next();},stop:function(){clearTimeout(this.timer);this.isPlaying=false;},setTimer:function(){if(this.isPlaying){clearTimeout(this.timer);this.timer=this.setTimeout(function(){this.next();},this.getParam('pause')*1000);}},previous:function(){var index=this.index-1;if(isNaN(index))index=0;if(!this.items[index]){if(this.getParam('loop')){index=this.items.length-1;}
else return false;}
this.animate(index,'previous');this.setTimer();},next:function(){var index=this.index+1;if(isNaN(index))index=0;if(!this.items[index]){if(this.getParam('loop'))index=0;else return false;}
this.animate(index,'next');this.setTimer();},animate:function(index,direction){this.index=index?index:0;this.goTo=direction?direction:'next';this.item=this.items[this.index];if(!this.item)return false;if(this._imagesPreloaded[this.index]){this._animate();}
else{var img=this._imagesPreloaded[this.index]=new Image();img.from=this;img.onload=function(){this.from._animate();this.from=null;}
img.src=this.item.src;}
return this;},addAnimation:function(name,func){this._functionsSlideShow.animations[name]=func;},setItems:function(items){this.items=items;},_animate:function(){this._animation=this._functionsSlideShow.animations[this.getParam('animation')];if(typeof this._animation=='function')this._animation(this.goTo);},_functionsSlideShow:{display:{onclick:function(){this.parentNode.next();},oncontextmenu:function(){this.parentNode.previous();return false;}},nav:{previous:{onclick:function(){this.parentNode.parentNode.previous();}},next:{onclick:function(){this.parentNode.parentNode.next();}},onmouseover:function(){if(typeof Tween=='function'){if(typeof OpacityTween=='function'){if(!this._visible){this._visible=true;this.tween=new OpacityTween(this,Tween.regularEaseIn,30,100,1).start();this.tween.onMotionFinished=function(){};}}}}},animations:{slide:function(){if(this.tween&&this.tween.isPlaying)return false;var display=this.display;var nodes=new Array();if(display.childNodes.length>0){for(var i=0;i<this.display.childNodes.length;i++){nodes.push(this.display.childNodes[i]);}
if(this.goTo=='next')var current=display.firstChild.newNodeBefore('img');else var current=display.newNode('img');}
else var current=display.newNode('img');current.setStyle({width:display.offsetWidth+'px',height:display.offsetHeight+'px',zIndex:1});current.src=this._imagesPreloaded[this.index].src;if(typeof Tween=='function'){var direction=this.getParam('direction');if(this.goTo=='previous'){if(direction=='down')direction='up';else if(direction=='up')direction='down';else if(direction=='left')direction='right';else if(direction=='right')direction='left';}
switch(direction){case'down':var from=-display.offsetHeight;var to=0;var moving='top';var childMove=function(current,child){child.style.top=current.offsetTop+current.offsetHeight+'px';}
break;case'up':var from=display.offsetHeight;var to=0;var moving='top';var childMove=function(current,child){child.style.top=current.offsetTop-current.offsetHeight+'px';}
break;case'right':var from=-display.offsetWidth;var to=0;var moving='left';var childMove=function(current,child){child.style.left=current.offsetLeft+current.offsetWidth+'px';}
break;case'left':var from=display.offsetWidth;var to=0;var moving='left';var childMove=function(current,child){child.style.left=current.offsetLeft-current.offsetWidth+'px';}
break;}
this.tween=new Tween(current.style,moving,Tween[this.getParam('tween')],from,to,this.getParam('duration'),'px');this.tween.nodes=nodes;this.tween.current=current;this.tween.childMove=childMove;this.tween.onMotionChanged=function(){for(var i=0;i<this.nodes.length;i++){var node=this.nodes[i];this.childMove(this.current,node);}};this.tween.onMotionFinished=function(){for(var i=0;i<this.nodes.length;i++){var node=this.nodes[i];node.remove();node=null;}
this.nodes=null;this.current=null;};this.tween.start();}
else{for(var i=0;i<nodes.length;i++){nodes[i].remove();nodes[i]=null;}}
childMove=null;return true;},pile:function(){if(this.tween&&this.tween.isPlaying)return false;var display=this.display;var nodes=new Array();if(display.childNodes.length>0){for(var i=0;i<this.display.childNodes.length;i++){nodes.push(this.display.childNodes[i]);}
if(this.goTo=='next')var current=display.firstChild.newNodeBefore('img');else var current=display.newNode('img');}
else var current=display.newNode('img');current.setStyle({width:display.offsetWidth+'px',height:display.offsetHeight+'px',zIndex:1});current.src=this._imagesPreloaded[this.index].src;if(typeof Tween=='function'){var direction=this.getParam('direction');if(this.goTo=='previous'){if(direction=='down')direction='up';else if(direction=='up')direction='down';else if(direction=='left')direction='right';else if(direction=='right')direction='left';}
switch(direction){case'down':var from=-display.offsetHeight;var to=0;var moving='top';var childMove=function(current,child){child.style.zIndex=0;}
break;case'up':var from=display.offsetHeight;var to=0;var moving='top';var childMove=function(current,child){child.style.zIndex=0;}
break;case'right':var from=-display.offsetWidth;var to=0;var moving='left';var childMove=function(current,child){child.style.zIndex=0;}
break;case'left':var from=display.offsetWidth;var to=0;var moving='left';var childMove=function(current,child){child.style.zIndex=0;}
break;}
this.tween=new Tween(current.style,moving,Tween[this.getParam('tween')],from,to,this.getParam('duration'),'px');this.tween.nodes=nodes;this.tween.current=current;this.tween.childMove=childMove;this.tween.onMotionChanged=function(){for(var i=0;i<this.nodes.length;i++){var node=this.nodes[i];this.childMove(this.current,node);}};this.tween.onMotionFinished=function(){for(var i=0;i<this.nodes.length;i++){var node=this.nodes[i];node.remove();node=null;}
this.nodes=null;this.current=null;};this.tween.start();}
else{for(var i=0;i<nodes.length;i++){nodes[i].remove();nodes[i]=null;}}
childMove=null;return true;},fade:function(){display
if(this.tween&&this.tween.isPlaying)return false;var display=this.display;display.write('');var nodes=new Array();if(display.childNodes.length>0){for(var i=0;i<this.display.childNodes.length;i++){nodes.push(this.display.childNodes[i]);}
if(this.goTo=='next')var current=display.firstChild.newNodeBefore('img');else var current=display.newNode('img');}
else var current=display.newNode('img');current.setStyle({width:display.offsetWidth+'px',height:display.offsetHeight+'px'});current.src=this._imagesPreloaded[this.index].src;if(typeof Tween=='function'){if(typeof OpacityTween=='function'){this.tween=new OpacityTween(current,Tween[this.getParam('tween')],0,100,this.getParam('duration'));this.tween.start();this.tween.nodes=nodes;for(var i=0;i<nodes.length;i++){var node=nodes[i];new OpacityTween(node,Tween[this.getParam('tween')],100,0,this.getParam('duration')).start();}
this.tween.onMotionFinished=function(){for(var i=0;i<this.nodes.length;i++){var node=this.nodes[i];node.remove();node=null;}
this.nodes=null;};}
else{}}},zoom:function(){if(this.tween&&this.tween.isPlaying)return false;var display=this.display;var nodes=new Array();if(display.childNodes.length>0){for(var i=0;i<this.display.childNodes.length;i++){nodes.push(this.display.childNodes[i]);}
if(this.goTo=='next')var current=display.firstChild.newNodeBefore('img');else var current=display.newNode('img');}
else var current=display.newNode('img');current.setStyle({width:display.offsetWidth+'px',height:(display.offsetHeight)+'px',zIndex:1});current.src=this._imagesPreloaded[this.index].src;var direction=this.getParam('direction');if(this.goTo=='previous'){if(direction=='down')direction='up';else if(direction=='up')direction='down';else if(direction=='left')direction='right';else if(direction=='right')direction='left';}
switch(direction){case'down':case'right':var from=-(current.offsetHeight*0.40);var moving='top';var childMove=function(current,child){child.style.zIndex=0;}
break;case'up':case'left':var from=current.offsetHeight*0.40;var moving='top';var childMove=function(current,child){child.style.zIndex=0;}
break;}
if(typeof Tween=='function'){if(typeof OpacityTween=='function'){this.tween=new OpacityTween(current,Tween[this.getParam('tween')],0,100,this.getParam('duration'));this.tween.start();this.tween.nodes=nodes;for(var i=0;i<nodes.length;i++){var node=nodes[i];new OpacityTween(node,Tween[this.getParam('tween')],100,0,this.getParam('duration')).start();}
this.tween.onMotionFinished=function(){for(var i=0;i<this.nodes.length;i++){var node=this.nodes[i];node.remove();node=null;}
this.nodes=null;};}
new Tween(current.style,'left',Tween[this.getParam('tween')],from/2,0,this.getParam('duration'),'px').start();new Tween(current.style,'height',Tween[this.getParam('tween')],current.offsetHeight-from,current.offsetHeight,this.getParam('duration'),'px').start();new Tween(current.style,'width',Tween[this.getParam('tween')],current.offsetWidth-from,current.offsetWidth,this.getParam('duration'),'px').start();this.tween=new Tween(current.style,'top',Tween[this.getParam('tween')],from/2,0,this.getParam('duration'),'px');this.tween.nodes=nodes;this.tween.current=current;this.tween.onMotionChanged=function(){for(var i=0;i<this.nodes.length;i++){var node=this.nodes[i];this.childMove(this.current,node);}};this.tween.onMotionFinished=function(){for(var i=0;i<this.nodes.length;i++){var node=this.nodes[i];node.remove();node=null;}
this.nodes=null;this.current=null;};this.tween.start();}}}}};var $addSlideShow=function(node){node=$(node);$addPrototype(node,_prototypeSlideShow);return node;}

var _prototypeTabs={selectTab:function(index){this.selectTabIndex=index;this._selectTab();},_selectTab:function(index){var index=this.selectTabIndex;this.className='tabs tabsTheme';if(this.elements[index]&&!this.elements[index].disabled){if(this.selectedTab){this.elements[this.selectedTab.index].selected=0;var tabContent=$id(this.id+'_'+this.selectedTab.index);if(tabContent){$(tabContent).setStyle({position:'absolute',top:'0px',left:'0px',visibility:'hidden'});}}
this.elements[index].selected=1;this.write('');this._setTabs();var tabContent=$id(this.id+'_'+index);if(tabContent){$(tabContent).setStyle({position:'relative',visibility:'inherit'});if(_browser.name=='Explorer'&&tabContent.getStyle('width')=='auto')tabContent.style.width='100%';}
this.selectedTab.fireEventHandlers('onselectedtab');}
return this;},_setTabs:function(){if(this.elements){for(var index in this.elements){var item=this.elements[index];var tab=this.newNode('div').setStyle({left:((tab)?(tab.offsetLeft+tab.offsetWidth):0)+'px'});tab.className='tab';tab.id='tab_'+this.id;tab.idTabs=this.id;tab.style.top='0px';tab.index=index;tab.arr=item;if(item.attributes)for(var c in item.attributes)tab[c]=item.attributes[c];if(this.elements[index].style)tab.setStyle(this.elements[index].style);tab.write("&nbsp;&nbsp;"+tab.arr.title+"&nbsp;&nbsp;");if(tab.arr.selected){tab.setStyle({cursor:'default'});}
tab.onmousedown=this._functionsTabs.tab.onmousedown;tab.onclick=this._functionsTabs.tab.onclick;tab.oncontextmenu=this._functionsTabs.tab.oncontextmenu;if(tab.arr.onselectedtab)tab.onselectedtab=tab.arr.onselectedtab;tab.setStyle({width:(tab.offsetWidth)+'px',height:(tab.offsetHeight+(tab.arr.selected?1:0)+this._fixsTabs.heightTabs)+'px',overflow:'hidden'});tab.write('');if(!this.getParam('borderColor')){this.setParam('borderColor',this.getStyle(_browser.name=='Explorer'?'borderTopColor':'border-top-color'));this.style.border='none';}
if(!this.getParam('backgroundColor')){this.setParam('backgroundColor',this.getStyle(_browser.name=='Explorer'?'backgroundColor':'background-color'));this.style.backgroundColor='transparent';}
tab.setStyle({border:'1px solid '+this.getParam('borderColor'),backgroundColor:this.getParam('backgroundColor')});if(!tab.arr.selected)tab.style.backgroundColor=mixColors(this.getParam('borderColor'),this.getParam('backgroundColor'));$addRoundCorners2(tab).addRoundCorners({noBottomLeft:false,noBottomRight:true,size:'small'});tab.body=tab.newNode('div');tab.body.setStyle({paddingRight:'2px',paddingLeft:'2px',height:tab.offsetHeight-2+'px'});var texte=tab.newNode('div').write(tab.arr.title);texte.className='title';if(tab.arr.disabled){texte.style.color="#999999";}
if(tab.arr.selected){this.selectedTab=tab;}}}},_functionsTabs:{tab:{oncontextmenu:function(e){if(!this.arr.disabled){if(typeof this.arr.oncontextmenu=='function'){this._oncontextmenu=this.arr.oncontextmenu;this._oncontextmenu();}}
return false;},onmousedown:function(e){if(getMouseButton(e)!=0)return false;if(!this.arr.disabled){if(this.parentNode.selectedTab!=this){if(typeof this.arr.onmousedown=='function'){this._onmousedown=this.arr.onmousedown;if(this._onmousedown(e)){this.parentNode.selectTab(this.index);}}
else this.parentNode.selectTab(this.index);}
else if(typeof this.arr.onmousedown=='function'){this._onmousedown=this.arr.onmousedown;this._onmousedown(e);}}},onclick:function(e){if(!this.arr.disabled){if(typeof this.arr.onclick=='function'){this._onclick=this.arr.onclick;this._onclick();}}
return false;}}}};if(_browser.name=='Google'){_prototypeTabs._fixsTabs={heightTabs:-1}}
else if(_browser.name=='Firefox'){_prototypeTabs._fixsTabs={heightTabs:0}}
else if(_browser.name=='Safari'){_prototypeTabs._fixsTabs={heightTabs:1}}
else{_prototypeTabs._fixsTabs={heightTabs:0}}
var $addTabs=function(node){node=$(node);$addPrototype(node,_prototypeTabs);return node;}

/**********************************************************************
TERMS OF USE - EASING EQUATIONS
Open source under the BSD License.
Copyright (c) 2001 Robert Penner
JavaScript version copyright (C) 2006 by Philippe Maegerman
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

   * Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
   * Neither the name of the author nor the names of contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

http://jstween.blogspot.com/


*/
function Delegate(){}
Delegate.create=function(o,f){var a=new Array();var l=arguments.length;for(var i=2;i<l;i++)a[i-2]=arguments[i];return function(){var aP=[].concat(arguments,a);f.apply(o,aP);}}
Tween=function(obj,prop,func,begin,finish,duration,suffixe){this.init(obj,prop,func,begin,finish,duration,suffixe)}
var t=Tween.prototype;t.obj=new Object();t.prop='';t.func=function(t,b,c,d){return c*t/d+b;};t.begin=0;t.change=0;t.prevTime=0;t.prevPos=0;t.looping=false;t._duration=0;t._time=0;t._pos=0;t._position=0;t._startTime=0;t._finish=0;t.name='';t.suffixe='';t._listeners=new Array();t.setTime=function(t){this.prevTime=this._time;if(t>this.getDuration()){if(this.looping){this.rewind(t-this._duration);this.update();this.broadcastMessage('onMotionLooped',{target:this,type:'onMotionLooped'});}else{this._time=this._duration;this.update();this.stop();this.broadcastMessage('onMotionFinished',{target:this,type:'onMotionFinished'});}}else if(t<0){this.rewind();this.update();}else{this._time=t;this.update();}}
t.getTime=function(){return this._time;}
t.setDuration=function(d){this._duration=(d==null||d<=0)?100000:d;}
t.getDuration=function(){return this._duration;}
t.setPosition=function(p){this.prevPos=this._pos;var a=this.suffixe!=''?this.suffixe:'';this.obj[this.prop]=Math.round(p)+a;this._pos=p;this.broadcastMessage('onMotionChanged',{target:this,type:'onMotionChanged'});}
t.getPosition=function(t){if(t==undefined)t=this._time;return this.func(t,this.begin,this.change,this._duration);};t.setFinish=function(f){this.change=f-this.begin;};t.geFinish=function(){return this.begin+this.change;};t.init=function(obj,prop,func,begin,finish,duration,suffixe){if(!arguments.length)return;this._listeners=new Array();this.addListener(this);if(suffixe)this.suffixe=suffixe;this.obj=obj;this.prop=prop;this.begin=begin;this._pos=begin;this.setDuration(duration);if(func!=null&&func!=''){this.func=func;}
this.setFinish(finish);}
t.start=function(){this.rewind();this.startEnterFrame();this.broadcastMessage('onMotionStarted',{target:this,type:'onMotionStarted'});}
t.rewind=function(t){this.stop();this._time=(t==undefined)?0:t;this.fixTime();this.update();}
t.fforward=function(){this._time=this._duration;this.fixTime();this.update();}
t.update=function(){this.setPosition(this.getPosition(this._time));}
t.startEnterFrame=function(){this.stopEnterFrame();this.isPlaying=true;this.onEnterFrame();}
t.onEnterFrame=function(){if(this.isPlaying){this.nextFrame();setTimeout(Delegate.create(this,this.onEnterFrame),0);}}
t.nextFrame=function(){this.setTime((this.getTimer()-this._startTime)/1000);}
t.stop=function(){this.stopEnterFrame();this.broadcastMessage('onMotionStopped',{target:this,type:'onMotionStopped'});}
t.stopEnterFrame=function(){this.isPlaying=false;}
t.continueTo=function(finish,duration){this.begin=this._pos;this.setFinish(finish);if(this._duration!=undefined)
this.setDuration(duration);this.start();}
t.resume=function(){this.fixTime();this.startEnterFrame();this.broadcastMessage('onMotionResumed',{target:this,type:'onMotionResumed'});}
t.yoyo=function(){this.continueTo(this.begin,this._time);}
t.addListener=function(o){this.removeListener(o);return this._listeners.push(o);}
t.removeListener=function(o){var a=this._listeners;var i=a.length;while(i--){if(a[i]==o){a.splice(i,1);return true;}}
return false;}
t.broadcastMessage=function(){try{var arr=new Array();for(var i=0;i<arguments.length;i++){arr.push(arguments[i])}
var e=arr.shift();var a=this._listeners;var l=a.length;for(var i=0;i<l;i++){if(a[i][e])
a[i][e].apply(a[i],arr);}}catch(e){}}
t.fixTime=function(){this._startTime=this.getTimer()-this._time*1000;}
t.getTimer=function(){return new Date().getTime()-this._time;}
Tween.backEaseIn=function(t,b,c,d,a,p){if(s==undefined)var s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;}
Tween.backEaseOut=function(t,b,c,d,a,p){if(s==undefined)var s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;}
Tween.backEaseInOut=function(t,b,c,d,a,p){if(s==undefined)var s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;}
Tween.elasticEaseIn=function(t,b,c,d,a,p){if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else
var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;}
Tween.elasticEaseOut=function(t,b,c,d,a,p){if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return(a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b);}
Tween.elasticEaseInOut=function(t,b,c,d,a,p){if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)var p=d*(.3*1.5);if(!a||a<Math.abs(c)){var a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;}
Tween.bounceEaseOut=function(t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}}
Tween.bounceEaseIn=function(t,b,c,d){return c-Tween.bounceEaseOut(d-t,0,c,d)+b;}
Tween.bounceEaseInOut=function(t,b,c,d){if(t<d/2)return Tween.bounceEaseIn(t*2,0,c,d)*.5+b;else return Tween.bounceEaseOut(t*2-d,0,c,d)*.5+c*.5+b;}
Tween.strongEaseInOut=function(t,b,c,d){return c*(t/=d)*t*t*t*t+b;}
Tween.regularEaseIn=function(t,b,c,d){return c*(t/=d)*t+b;}
Tween.regularEaseOut=function(t,b,c,d){return-c*(t/=d)*(t-2)+b;}
Tween.regularEaseInOut=function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;}
Tween.strongEaseIn=function(t,b,c,d){return c*(t/=d)*t*t*t*t+b;}
Tween.strongEaseOut=function(t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;}
Tween.strongEaseInOut=function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;}

OpacityTween.prototype=new Tween();OpacityTween.prototype.constructor=Tween;OpacityTween.superclass=Tween.prototype;function OpacityTween(obj,func,fromOpacity,toOpacity,duration){this.targetObject=obj;this.init(new Object(),'x',func,fromOpacity,toOpacity,duration);}
var o=OpacityTween.prototype;o.targetObject={};o.onMotionChanged=function(evt){var v=evt.target._pos;var t=this.targetObject;t.style['opacity']=v/100;t.style['-moz-opacity']=v/100;if(t.filters)t.filters.alpha['opacity']=v;}

function Delegate(){}
Delegate.create=function(o,f){var a=new Array();var l=arguments.length;for(var i=2;i<l;i++)a[i-2]=arguments[i];return function(){var aP=[].concat(arguments,a);f.apply(o,aP);}}
function Parallel(){this.children=new Array();this.numChildren=0;this._listeners=new Array();this.addListener(this);}
var s=Parallel.prototype;s.endObject=new Object();s.addChild=function(tween){this.children.push(tween)
this.numChildren++;}
s.start=function(){this.play();this.broadcastMessage('onMotionStarted',{target:this,type:'onMotionStarted'});}
s.play=function(){for(var u=0;u<this.numChildren;u++){if(u==(this.numChildren-1)){this.endObject=new Object();this.endObject.onMotionFinished=Delegate.create(this,this.end);this.children[u].addListener(this.endObject);}
this.children[u].start();}}
s.end=function(){this.children[this.numChildren-1].removeListener(this.endObject);this.broadcastMessage('onMotionFinished',{target:this,type:'onMotionFinished'});}
s.stop=function(){this.enumAction('stop');this.broadcastMessage('onMotionStopped',{target:this,type:'onMotionStopped'});}
s.rewind=function(){this.enumAction('rewind');}
s.fforward=function(){this.enumAction('fforward');}
s.resume=function(){this.enumAction('resume');this.broadcastMessage('onMotionResumed',{target:this,type:'onMotionResumed'});}
s.yoyo=function(){this.enumAction('yoyo');}
s.enumAction=function(action){for(var u=0;u<this.numChildren;u++){this.children[u][action]();}}
s.addListener=function(o){this.removeListener(o);return this._listeners.push(o);}
s.removeListener=function(o){var a=this._listeners;var i=a.length;while(i--){if(a[i]==o){a.splice(i,1);return true;}}
return false;}
s.broadcastMessage=function(){var arr=new Array();for(var i=0;i<arguments.length;i++){arr.push(arguments[i])}
var e=arr.shift();var a=this._listeners;var l=a.length;for(var i=0;i<l;i++){if(a[i][e])
a[i][e].apply(a[i],arr);}}

function Delegate(){}
Delegate.create=function(o,f){var a=new Array();var l=arguments.length;for(var i=2;i<l;i++)a[i-2]=arguments[i];return function(){var aP=[].concat(arguments,a);f.apply(o,aP);}}
function Sequence(){this.children=new Array();this.currentChildIndex=0;this._listeners=new Array();this.nextObject=new Object();this.addListener(this);}
var s=Sequence.prototype;s.addChild=function(tween){this.children.push(tween)}
s.removeChild=function(tween){var a=this.children;var i=a.length;while(i--){if(a[i]==tween){a.splice(i,1);return true;}}
return false;}
s.start=function(){this.rewind();this.play();this.broadcastMessage('onMotionStarted',{target:this,type:'onMotionStarted'});}
s.next=function(){this.children[this.currentChildIndex].removeListener(this.nextObject);if(this.currentChildIndex<this.children.length-1){this.currentChildIndex++;this.play();}
else{this.stop();this.broadcastMessage('onMotionFinished',{target:this,type:'onMotionFinished'});}}
s.play=function(){this.nextObject=new Object();this.nextObject.onMotionFinished=Delegate.create(this,this.next);this.children[this.currentChildIndex].addListener(this.nextObject);this.children[this.currentChildIndex].start();}
s.stop=function(){this.children[this.currentChildIndex].stop();this.broadcastMessage('onMotionStopped',{target:this,type:'onMotionStopped'});}
s.rewind=function(){this.children[this.currentChildIndex].removeListener(this.nextObject);this.currentChildIndex=0;for(var i=0;i<this.children.length;i++){this.children[i].rewind();}}
s.fforward=function(){this.children[this.currentChildIndex].removeListener(this.nextObject);for(var i=0;i<this.children.length;i++){this.children[i].fforward();}
this.currentChildIndex=this.children.length-1;}
s.resume=function(){this.children[this.currentChildIndex].resume();this.broadcastMessage('onMotionResumed',{target:this,type:'onMotionStopped'});}
s.addListener=function(o){this.removeListener(o);return this._listeners.push(o);}
s.removeListener=function(o){var a=this._listeners;var i=a.length;while(i--){if(a[i]==o){a.splice(i,1);return true;}}
return false;}
s.broadcastMessage=function(){var arr=new Array();for(var i=0;i<arguments.length;i++){arr.push(arguments[i])}
var e=arr.shift();var a=this._listeners;var l=a.length;for(var i=0;i<l;i++){if(a[i][e])
a[i][e].apply(a[i],arr);}}

ColorTween.prototype=new Tween();ColorTween.prototype.constructor=Tween;ColorTween.superclass=Tween.prototype;function ColorTween(obj,prop,func,fromColor,toColor,duration){this.targetObject=obj;this.targetProperty=prop;this.fromColor=fromColor;this.toColor=toColor;this.init(new Object(),'x',func,0,100,duration);this.listenerObj=new Object();this.listenerObj.onMotionChanged=Delegate.create(this,this.onColorChanged);this.addListener(this.listenerObj);}
var o=ColorTween.prototype;o.targetObject={};o.targetProperty={};o.fromColor='';o.toColor='';o.currentColor='';o.listenerObj={};o.onColorChanged=function(){this.currentColor=this.getColor(this.fromColor,this.toColor,this._pos);this.targetObject[this.targetProperty]=this.currentColor;}
o.getColor=function(start,end,percent)
{var r1=this.hex2dec(start.slice(0,2));var g1=this.hex2dec(start.slice(2,4));var b1=this.hex2dec(start.slice(4,6));var r2=this.hex2dec(end.slice(0,2));var g2=this.hex2dec(end.slice(2,4));var b2=this.hex2dec(end.slice(4,6));var pc=percent/100;r=Math.floor(r1+(pc*(r2-r1))+.5);g=Math.floor(g1+(pc*(g2-g1))+.5);b=Math.floor(b1+(pc*(b2-b1))+.5);return("#"+this.dec2hex(r)+this.dec2hex(g)+this.dec2hex(b));}
o.dec2hex=function(dec){return(this.hexDigit[dec>>4]+this.hexDigit[dec&15]);}
o.hexDigit=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");o.hex2dec=function(hex){return(parseInt(hex,16))};

TextTween.prototype=new Tween();TextTween.prototype.constructor=Tween;TextTween.superclass=Tween.prototype;function TextTween(obj,property,txt,func,duration){this.targetObject=obj;this.targetProperty=property;this.txt=txt;if(func!=null&&func!=''){this.func=func;}
this.init(new Object(),'x',func,0,txt.length,duration);}
var o=TextTween.prototype;o.targetObject={};o.targetProperty={};o.fromColor='';o.toColor='';o.currentColor='';o.onMotionChanged=function(evt){var v=evt.target._pos;this.targetObject[this.targetProperty]=this.txt.substr(0,v);}


if(_browser.name=='Explorer'){var _TAGS=new Array('div','span','form','button','input','textarea','text','label','a','b','strong','i','p','blockquote','img','caption','table','tr','th','td','thead','tbody','tfoot','ul','ol','li','h1','h2','h3','h4','h5','hr','br','select','option','iframe');var _ElementsPrototypeByTag=new Array();for(var i in _TAGS){_ElementsPrototypeByTag[_TAGS[i]]=$(document.createElement(_TAGS[i]));}}
if(_browser.name=='Explorer'){if(_browser.version==5||_browser.version==6){Tween=false;}
OpacityTween=false;}