if(navigator.userAgent.indexOf('Firefox')>=0){}
if(typeof Element=='undefined')throw("tools.js requires prototype.js library");var db=function(myvar){var varValue='DB ('+typeof myvar+') :\n';if(typeof myvar=='string'||typeof myvar=='number')varValue=myvar;else{for(var att in myvar){if(typeof myvar[att]!='function')
varValue+='\t'+att+' <'+typeof myvar[att]+'> '+myvar[att]+'\n';}}
if(typeof myvar=='array')varValue+="\n"+myvar.inspect();if(navigator.userAgent.indexOf('Firefox')>=0&&console.log)console.log(varValue);else nativeAlert(varValue);};var vd=function(obj,parent){if(typeof obj!='object')return db(obj);for(var attr in obj){if(parent)console.log(parent+"+"+attr+"\n"+obj[attr]);else console.log(attr+"\n"+obj[attr]);if(typeof obj[attr]=='object'){if(parent)vd(obj[attr],parent+"+"+attr);else vd(obj[attr],attr);}}}
var die=function(mess){throw((mess?mess:"JS says that you killing him softly : Oh my god moonWalker is down..."));};var exec=function(func){if(typeof(func)=='string')func=eval(func);else if(typeof(func)!='function')return false;try{func();return true;}
catch(e){func;return true;}
return false;}
var isSet=function(myVar){if(typeof(myVar)=='undefined'||myVar===''||myVar===null)return false;else return true;};var isId=function(element){if(!isSet(element))return false;try{if($(element))return true;else return false;}
catch(e){return false;}};var isWhat=function(myVar){if(!isSet(myVar))return'';else return typeof myVar;};var checkUrl=function(strUrl){var regexp=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return regexp.test(strUrl);};var checkMail=function(strMail){var regexp=/^[A-Za-z0-9._-]+@[A-Za-z0-9.\-]{2,}[.][A-Za-z]{2,4}$/;return regexp.test(strMail);};var checkDate=function(strDate){if(!isSet(strDate)||!strDate.match('/'))return false;var date_array=strDate.split('/');var day=String(date_array[0]);var month=String(date_array[1]);var year=String(date_array[2]);if(day.length<2||month.length<2||year.length<2)return false;if(parseInt(year)>78)year='19'+year;else year='20'+year;month=parseInt(month-1);var source_date=new Date(year,month,day);if(year!=source_date.getFullYear()||month!=source_date.getMonth()||day!=source_date.getDate())return false;else return true;};var cleanString=function(string){if(!isSet(string))return'';var myregexp=new RegExp(/((&ldquo;)|(&rdquo;)|(&acute;)|(&lsquo;)|(&rsquo;)|(&hellip;)|(\)|(\)|(\)|(\)|(\)|(\)|(\)|(\)|(\)|(\)|(\)|(\)|(\))/gi);string=string.replace(myregexp,' ');return string;};var inArray=function(myValue,myArray){if(isWhat(myArray)!='object')return false;for(var k in myArray){if(myArray[k]==myValue)return true;}
return false;};var RollOverImage=function(){var input=$$('input[type=image]','img.rollover');input.each(function(e,index){var chemin=input[index].src;var pos_debut=chemin.lastIndexOf('/')+1;var pos_fin=chemin.lastIndexOf('.');var chemin_fichier=chemin.substring(0,pos_debut);var nom_fichier=chemin.substring(pos_debut,pos_fin);var ext_fichier=chemin.substr(pos_fin);if(!e.hasClassName('no_roll')){Event.observe(e,'mouseover',function(){e.src=chemin_fichier+nom_fichier+'_on'+ext_fichier;});Event.observe(e,'mouseout',function(){e.src=chemin_fichier+nom_fichier+ext_fichier;});}});};var OpenClose=function(a,div){if($(a).hasClassName('on')&&$(div).getStyle('display')=='block'){$(a).removeClassName('on');effet_close=new Array();effet_close[0]=new Effect.BlindUp($(div),{duration:0.3});effet_close[1]=new Effect.Fade($(div),{duration:0.3});new Effect.Parallel(effet_close,{duration:0.3});}
else{$(a).addClassName('on');effet_open=new Array();effet_open[0]=new Effect.BlindDown($(div),{duration:0.3});effet_open[1]=new Effect.Appear($(div),{duration:0.3});new Effect.Parallel(effet_open,{duration:0.3});}};var ModalInfo=function(titre,texte){$('domNode').update(texte);Modalbox.show($('domNode'),{title:titre,width:600});};
