function base64_decode(data){var b64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var o1,o2,o3,h1,h2,h3,h4,bits,i=0,ac=0,dec="",tmp_arr=[];if(!data){return data;}
data+='';do{h1=b64.indexOf(data.charAt(i++));h2=b64.indexOf(data.charAt(i++));h3=b64.indexOf(data.charAt(i++));h4=b64.indexOf(data.charAt(i++));bits=h1<<18|h2<<12|h3<<6|h4;o1=bits>>16&0xff;o2=bits>>8&0xff;o3=bits&0xff;if(h3==64){tmp_arr[ac++]=String.fromCharCode(o1);}else if(h4==64){tmp_arr[ac++]=String.fromCharCode(o1,o2);}else{tmp_arr[ac++]=String.fromCharCode(o1,o2,o3);}}while(i<data.length);dec=tmp_arr.join('');dec=this.utf8_decode(dec);return dec;}
function base64_encode(data){var b64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var o1,o2,o3,h1,h2,h3,h4,bits,i=0,ac=0,enc="",tmp_arr=[];if(!data){return data;}
data=this.utf8_encode(data+'');do{o1=data.charCodeAt(i++);o2=data.charCodeAt(i++);o3=data.charCodeAt(i++);bits=o1<<16|o2<<8|o3;h1=bits>>18&0x3f;h2=bits>>12&0x3f;h3=bits>>6&0x3f;h4=bits&0x3f;tmp_arr[ac++]=b64.charAt(h1)+b64.charAt(h2)+b64.charAt(h3)+b64.charAt(h4);}while(i<data.length);enc=tmp_arr.join('');switch(data.length%3){case 1:enc=enc.slice(0,-2)+'==';break;case 2:enc=enc.slice(0,-1)+'=';break;}
return enc;}
function utf8_decode(str_data){var tmp_arr=[],i=0,ac=0,c1=0,c2=0,c3=0;str_data+='';while(i<str_data.length){c1=str_data.charCodeAt(i);if(c1<128){tmp_arr[ac++]=String.fromCharCode(c1);i++;}else if((c1>191)&&(c1<224)){c2=str_data.charCodeAt(i+1);tmp_arr[ac++]=String.fromCharCode(((c1&31)<<6)|(c2&63));i+=2;}else{c2=str_data.charCodeAt(i+1);c3=str_data.charCodeAt(i+2);tmp_arr[ac++]=String.fromCharCode(((c1&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return tmp_arr.join('');}
function utf8_encode(argString){var string=(argString+'');var utftext="";var start,end;var stringl=0;start=end=0;stringl=string.length;for(var n=0;n<stringl;n++){var c1=string.charCodeAt(n);var enc=null;if(c1<128){end++;}else if(c1>127&&c1<2048){enc=String.fromCharCode((c1>>6)|192)+String.fromCharCode((c1&63)|128);}else{enc=String.fromCharCode((c1>>12)|224)+String.fromCharCode(((c1>>6)&63)|128)+String.fromCharCode((c1&63)|128);}
if(enc!==null){if(end>start){utftext+=string.substring(start,end);}
utftext+=enc;start=end=n+1;}}
if(end>start){utftext+=string.substring(start,string.length);}
return utftext;}
function urldecode(str){return decodeURIComponent(str.replace(/\+/g,'%20'));}
function urlencode(str){str=(str+'').toString();return encodeURIComponent(str).replace(/!/g,'%21').replace(/'/g,'%27').replace(/\(/g,'%28').replace(/\)/g,'%29').replace(/\*/g,'%2A').replace(/%20/g,'+');};if(window.jQuery)(function($){if($.browser.msie)try{document.execCommand("BackgroundImageCache",false,true)}catch(e){};$.fn.rating=function(options){if(this.length==0)return this;if(typeof arguments[0]=='string'){if(this.length>1){var args=arguments;return this.each(function(){$.fn.rating.apply($(this),args);});};$.fn.rating[arguments[0]].apply(this,$.makeArray(arguments).slice(1)||[]);return this;};var options=$.extend({},$.fn.rating.options,options||{});$.fn.rating.calls++;this.not('.star-rating-applied').addClass('star-rating-applied').each(function(){var control,input=$(this);var eid=(this.name||'unnamed-rating').replace(/\[|\]/g,'_').replace(/^\_+|\_+$/g,'');var context=$(this.form||document.body);var raters=context.data('rating');if(!raters||raters.call!=$.fn.rating.calls)raters={count:0,call:$.fn.rating.calls};var rater=raters[eid];if(rater)control=rater.data('rating');if(rater&&control)
control.count++;else{control=$.extend({},options||{},($.metadata?input.metadata():($.meta?input.data():null))||{},{count:0,stars:[],inputs:[]});control.serial=raters.count++;rater=$('<span class="star-rating-control"/>');input.before(rater);rater.addClass('rating-to-be-drawn');if(input.attr('disabled'))control.readOnly=true;rater.append(control.cancel=$('<div class="rating-cancel"><a title="'+control.cancel+'">'+control.cancelValue+'</a></div>').mouseover(function(){$(this).rating('drain');$(this).addClass('star-rating-hover');}).mouseout(function(){$(this).rating('draw');$(this).removeClass('star-rating-hover');}).click(function(){$(this).rating('select');}).data('rating',control));};var star=$('<div class="star-rating rater-'+control.serial+'"><a title="'+(this.title||this.value)+'">'+this.value+'</a></div>');rater.append(star);if(this.id)star.attr('id',this.id);if(this.className)star.addClass(this.className);if(control.half)control.split=2;if(typeof control.split=='number'&&control.split>0){var stw=($.fn.width?star.width():0)||control.starWidth;var spi=(control.count%control.split),spw=Math.floor(stw/control.split);star.width(spw).find('a').css({'margin-left':'-'+(spi*spw)+'px'})};if(control.readOnly)
star.addClass('star-rating-readonly');else
star.addClass('star-rating-live').mouseover(function(){$(this).rating('fill');$(this).rating('focus');}).mouseout(function(){$(this).rating('draw');$(this).rating('blur');}).click(function(){$(this).rating('select');});if(this.checked)control.current=star;input.hide();input.change(function(){$(this).rating('select');});star.data('rating.input',input.data('rating.star',star));control.stars[control.stars.length]=star[0];control.inputs[control.inputs.length]=input[0];control.rater=raters[eid]=rater;control.context=context;input.data('rating',control);rater.data('rating',control);star.data('rating',control);context.data('rating',raters);});$('.rating-to-be-drawn').rating('draw').removeClass('rating-to-be-drawn');return this;};$.extend($.fn.rating,{calls:0,focus:function(){var control=this.data('rating');if(!control)return this;if(!control.focus)return this;var input=$(this).data('rating.input')||$(this.tagName=='INPUT'?this:null);if(control.focus)control.focus.apply(input[0],[input.val(),$('a',input.data('rating.star'))[0]]);},blur:function(){var control=this.data('rating');if(!control)return this;if(!control.blur)return this;var input=$(this).data('rating.input')||$(this.tagName=='INPUT'?this:null);if(control.blur)control.blur.apply(input[0],[input.val(),$('a',input.data('rating.star'))[0]]);},fill:function(){var control=this.data('rating');if(!control)return this;if(control.readOnly)return;this.rating('drain');this.prevAll().andSelf().filter('.rater-'+control.serial).addClass('star-rating-hover');},drain:function(){var control=this.data('rating');if(!control)return this;if(control.readOnly)return;control.rater.children().filter('.rater-'+control.serial).removeClass('star-rating-on').removeClass('star-rating-hover');},draw:function(){var control=this.data('rating');if(!control)return this;this.rating('drain');if(control.current){control.current.data('rating.input').attr('checked','checked');control.current.prevAll().andSelf().filter('.rater-'+control.serial).addClass('star-rating-on');}
else
$(control.inputs).removeAttr('checked');control.cancel[control.readOnly||control.required?'hide':'show']();this.siblings()[control.readOnly?'addClass':'removeClass']('star-rating-readonly');},select:function(value,wantCallBack){var control=this.data('rating');if(!control)return this;if(control.readOnly)return;control.current=null;if(typeof value!='undefined'){if(typeof value=='number')
return $(control.stars[value]).rating('select',undefined,wantCallBack);if(typeof value=='string')
$.each(control.stars,function(){if($(this).data('rating.input').val()==value)$(this).rating('select',undefined,wantCallBack);});}
else
control.current=this[0].tagName=='INPUT'?this.data('rating.star'):(this.is('.rater-'+control.serial)?this:null);this.data('rating',control);this.rating('draw');var input=$(control.current?control.current.data('rating.input'):null);if((wantCallBack||wantCallBack==undefined)&&control.callback)control.callback.apply(input[0],[input.val(),$('a',control.current)[0]]);},readOnly:function(toggle,disable){var control=this.data('rating');if(!control)return this;control.readOnly=toggle||toggle==undefined?true:false;if(disable)$(control.inputs).attr("disabled","disabled");else $(control.inputs).removeAttr("disabled");this.data('rating',control);this.rating('draw');},disable:function(){this.rating('readOnly',true,true);},enable:function(){this.rating('readOnly',false,false);}});$.fn.rating.options={cancel:'Cancel Rating',cancelValue:'',split:0,starWidth:16};$(function(){$('input[type=radio].star').rating();});})(jQuery);(function($,window){if(!$.jqDock){var TRBL=['Top','Right','Bottom','Left'],PROPMAP={src:'Source',altsrc:'AltSource'},VANILLA=['<div style="position:relative;padding:0;','margin:0;border:0 none;background-color:transparent;','">'],VERTHORZ={v:{wh:'height',xy:1,tl:'top',lead:TRBL[0],trail:TRBL[2],act:'TransInv'},h:{wh:'width',xy:0,tl:'left',lead:TRBL[3],trail:TRBL[1],act:'Trans'}},DOCKS=[],XY=[0,0],ALT_IMAGE=function(el){var alt=$(el).attr('alt');return(alt&&alt.match(/\.(gif|jpg|jpeg|png)$/i))?alt:false;},AS_INTEGER=function(x){var r=parseInt(x,10);return isNaN(r)?0:r;},DELTA_XY=function(Dock){var opvh=Dock.Opts.vh,rtn=0,el=Dock.Current!==false?Dock.Elem[Dock.Current]:0,p;if(el){p=el.Pad[opvh.lead]+el.Pad[opvh.trail];rtn=Math.floor((XY[opvh.xy]-el.Wrap.parent().offset()[opvh.tl])*(p+el.Initial)/(p+el.Trans))+el.Offset;}
return rtn;},KEEP_PROPORTION=function(el,dim,orient){var r={},vhwh=VERTHORZ[orient.vh].wh,invwh=VERTHORZ[orient.inv].wh;r[vhwh]=dim;r[invwh]=Math.round(dim*el[invwh]/el[vhwh]);return r;},POSITION_LABEL=function(Dock){var labels=Dock.Opts.labels,opvh=Dock.Opts.vh,css={},el,label;if(labels&&Dock.Current!==false&&(/[mc]/).test(labels)){labels=labels.split('');el=Dock.Elem[Dock.Current];label=el.Label;if(labels[0]=='m'){css.top=Math.floor((el[opvh.inv.act]-label.height-label.heightPad)/2);}
if(labels[1]=='c'){css.left=Math.floor((el[opvh.act]-label.width-label.widthPad)/2);}
label.el.css(css);}
labels=css=null;},REMOVE_TEXT=function(el){var i=el.childNodes.length,j;while(i){j=el.childNodes[--i];if(j.childNodes&&j.childNodes.length){REMOVE_TEXT(j);}else if(j.nodeType==3){el.removeChild(j);}}},SET_LABEL=function(Dock,Elem){var labels=Dock.Opts.labels,label=Elem.Label,pad,css,splt;if(label.txt){label.el.click(function(){Elem.Img.trigger('click');});if((/[mc]/).test(labels)){pad={};$.each(TRBL,function(n,v){pad[v]=AS_INTEGER(label.el.css('padding'+v));});$.each(VERTHORZ,function(vh,o){label[o.wh]=label.el[o.wh]();label[o.wh+'Pad']=pad[o.lead]+pad[o.trail];});}
splt=labels.split('');css={top:0,left:0,bottom:'auto',right:'auto'};if(splt[0]=='b'){css.top='auto';css.bottom=0;}
if(splt[1]=='r'){css.left='auto';css.right=0;}
label.el.css(css);pad=css=splt=null;}},SET_SIZES=function(id,mxy){var Dock=DOCKS[id],op=Dock.Opts,i=Dock.Elem.length,el,ab;mxy=mxy||DELTA_XY(Dock);while(i){el=Dock.Elem[--i];ab=Math.abs(mxy-el.Centre);el.Final=ab<op.distance?el[op.vh.wh]-Math.floor((el[op.vh.wh]-el.Initial)*Math.pow(ab,op.coefficient)/op.attenuation):el.Initial;}},SHOW_LABEL=function(Dock,show){var label;if(Dock.Opts.labels&&Dock.Current!==false){label=Dock.Elem[Dock.Current].Label;label.el[label.txt&&show?'show':'hide']();}},CHANGE_SIZE=function(id,idx,dim,force){var Dock=DOCKS[id],el=Dock.Elem[idx],op=Dock.Opts,invers=op.vh.inv,margin='margin',srcDiff=el.Source!=el.AltSource,bdr,css,diff;if(force||el.Trans!=dim){bdr=($.boxModel||op.orient.vh=='v')?0:Dock.Borders[op.vh.lead]+Dock.Borders[op.vh.trail];if(srcDiff&&!force&&el.Trans==el.Initial){el.Img[0].src=el.AltSource;}
Dock.Spread+=dim-el.Trans;css=KEEP_PROPORTION(el,dim,op.orient);diff=op.size-css[invers.wh];switch(op.align){case'bottom':case'right':css[margin+invers.lead]=diff;break;case'middle':case'center':css[margin+invers.lead]=(diff+(diff%2))/2;css[margin+invers.trail]=(diff-(diff%2))/2;break;default:css[margin+invers.trail]=diff;}
if(dim!=el.Trans||(force&&!idx)){Dock.Yard[op.vh.wh](Dock.Spread+bdr);}
el.Wrap.css(css);Dock.Yard.css(op.vh.tl,Math.floor(Math.max(0,(Dock[op.vh.wh]-Dock.Spread)/2)));if(Dock.OnDock){POSITION_LABEL(Dock);}
el.Trans=dim;el.TransInv=css[invers.wh];if(srcDiff&&!force&&el.Trans==el.Initial){el.Img[0].src=el.Source;}
css=null;}},FACTOR_SIZES=function(id,revers){var Dock=DOCKS[id],op=Dock.Opts,lapse=op.duration+op.step,i=0,factor,el,sz;if(Dock.Timestamp){lapse=(new Date()).getTime()-Dock.Timestamp;if(lapse>=op.duration){Dock.Timestamp=0;}}
if(lapse>op.step){factor=lapse<op.duration?lapse/op.duration:0;while(i<Dock.Elem.length){el=Dock.Elem[i];if(revers){sz=factor?Math.floor(el.Final-((el.Final-el.Initial)*factor)):el.Initial;}else{sz=factor?Math.floor(el.Initial+((el.Final-el.Initial)*factor)):el.Final;}
CHANGE_SIZE(id,i++,sz);}
if(Dock.Spread>Dock[op.vh.wh]){Dock.Yard.parent()[op.vh.wh](Dock.Spread+Dock.Borders[op.vh.lead]+Dock.Borders[op.vh.trail]);Dock[op.vh.wh]=Dock.Spread;}}},OFF_DOCK=function(id){var Dock=DOCKS[id],el=Dock.Elem,i=el.length;if(!Dock.OnDock){while((i--)&&el[i].Trans<=el[i].Initial){}
DELTA_XY(Dock);if(i<0){i=el.length;while(i--){el[i].Trans=el[i].Final=el[i].Initial;}
Dock.Current=false;}else{FACTOR_SIZES(id,true);window.setTimeout(function(){OFF_DOCK(id);},Dock.Opts.step);}}},OVER_DOCK=function(id){var Dock=DOCKS[id],el=Dock.Elem,i=el.length;if(Dock.OnDock){while((i--)&&el[i].Trans>=el[i].Final){}
if(i<0){Dock.Expanded=true;SHOW_LABEL(Dock,true);}else{SET_SIZES(id);FACTOR_SIZES(id);window.setTimeout(function(){OVER_DOCK(id);},Dock.Opts.step);}}},DO_MOUSE=function(etype,id,idx){var Dock=DOCKS[id],el=Dock.Elem,i;switch(etype){case'mousemove':if(idx!==Dock.Current){SHOW_LABEL(Dock);Dock.Current=idx;}
POSITION_LABEL(Dock);if(Dock.Expanded){SHOW_LABEL(Dock,true);}
if(Dock.OnDock&&Dock.Expanded){SET_SIZES(id);FACTOR_SIZES(id);}
break;case'mouseenter':Dock.OnDock=true;if(Dock.Current!==false&&Dock.Current!==idx){SHOW_LABEL(Dock);}
Dock.Current=idx;POSITION_LABEL(Dock);if(Dock.Expanded){SHOW_LABEL(Dock,true);}
Dock.Timestamp=(new Date()).getTime();SET_SIZES(id);OVER_DOCK(id);break;case'mouseleave':if(Dock.Inactive){window.clearTimeout(Dock.Inactive);Dock.Inactive=null;}
Dock.OnDock=Dock.Expanded=false;SHOW_LABEL(Dock);Dock.Timestamp=(new Date()).getTime();i=el.length;while(i--){el[i].Final=el[i].Trans;}
OFF_DOCK(id);break;default:}},MOUSE_HANDLER=function(ev){var dockId=1*(this.id.match(/^jqDock(\d+)$/)||[0,-1])[1],Dock=dockId>=0?DOCKS[dockId]:0,tgt=Dock?ev.target.className.toString().match(/jqDockMouse(\d+)/):0,idx=tgt?1*tgt[1]:false;if(Dock){XY=[ev.pageX,ev.pageY];if(ev.type=='mouseleave'){if(Dock.OnDock){DO_MOUSE(ev.type,dockId,idx);}}else{if(Dock.Opts.inactivity){if(Dock.Inactive){window.clearTimeout(Dock.Inactive);Dock.Inactive=null;}
Dock.Inactive=window.setTimeout(function(){DO_MOUSE('mouseleave',dockId,idx);},Dock.Opts.inactivity);}
if(ev.type=='mousemove'){if(idx===false){if(Dock.OnDock&&Dock.Current!==false){DO_MOUSE('mouseleave',dockId,idx);}}else if(!Dock.OnDock||Dock.Current===false){DO_MOUSE('mouseenter',dockId,idx);}else{DO_MOUSE(ev.type,dockId,idx);}}else if(idx!==false&&!Dock.OnDock){DO_MOUSE(ev.type,dockId,idx);}}}
return false;};$.jqDock=(function(){return{version:1.4,defaults:{size:48,distance:72,coefficient:1.5,duration:300,align:'bottom',labels:false,source:false,loader:null,inactivity:0,fadeIn:0,fadeLayer:'',step:50},useJqLoader:$.browser.opera||$.browser.safari,initDock:function(id){var Dock=DOCKS[id],op=Dock.Opts,vertOrHorz=op.vh,orient=op.orient,borders=Dock.Borders,vanillaDiv=VANILLA.join(''),off=0,i=0,j,el,wh,acc,upad,wrap,callback;REMOVE_TEXT(Dock.Menu);$(Dock.Menu).children().each(function(i,kid){var wrap=Dock.Elem[i].Wrap=$(kid).wrap(vanillaDiv+vanillaDiv+'</div></div>').parent();if(orient.vh=='h'){wrap.parent().css('float','left');}}).find('img').andSelf().css({position:'relative',padding:0,margin:0,borderWidth:0,borderStyle:'none',verticalAlign:'top',display:'block',width:'100%',height:'100%'});while(i<Dock.Elem.length){el=Dock.Elem[i++];wh=KEEP_PROPORTION(el,op.size,{vh:orient.inv,inv:orient.vh});el.Trans=el.Final=el.Initial=wh[vertOrHorz.wh];el.Wrap.css(wh);el.Img.attr({alt:''}).parent('a').andSelf().removeAttr('title');Dock[vertOrHorz.inv.wh]=Math.max(Dock[vertOrHorz.inv.wh],op.size+el.Pad[vertOrHorz.inv.lead]+el.Pad[vertOrHorz.inv.trail]);el.Offset=off;el.Centre=off+el.Pad[vertOrHorz.lead]+(el.Initial/2);off+=el.Initial+el.Pad[vertOrHorz.lead]+el.Pad[vertOrHorz.trail];}
i=0;while(i<Dock.Elem.length){el=Dock.Elem[i++];j=Dock.Elem.length;upad=el.Pad[vertOrHorz.lead]+el.Pad[vertOrHorz.trail];Dock.Spread+=el.Initial+upad;SET_SIZES(id,el.Centre);acc=0;while(j){acc+=Dock.Elem[--j].Final+upad;}
if(acc>Dock[vertOrHorz.wh]){Dock[vertOrHorz.wh]=acc;}
SET_SIZES(id,el.Offset);acc=0;while(j<Dock.Elem.length){acc+=Dock.Elem[j++].Final+upad;}
if(acc>Dock[vertOrHorz.wh]){Dock[vertOrHorz.wh]=acc;}}
while(i){el=Dock.Elem[--i];el.Final=el.Initial;}
wrap=[VANILLA[0],VANILLA[2],'<div id="jqDock',id,'" class="jqDock" style="position:absolute;top:0;left:0;padding:0;margin:0;overflow:visible;','height:',Dock.height,'px;width:',Dock.width,'px;"></div></div>'].join('');Dock.Yard=$(Dock.Menu).wrapInner(wrap).find('div.jqDock');$.each(TRBL,function(n,v){borders[v]=AS_INTEGER(Dock.Yard.css('border'+v+'Width'));});Dock.Yard.parent().addClass('jqDockWrap').width(Dock.width+borders.Left+borders.Right).height(Dock.height+borders.Top+borders.Bottom);while(i<Dock.Elem.length){el=Dock.Elem[i];upad=el.Wrap.parent();for(j in el.Pad){if(el.Pad[j]){upad.css('padding'+j,el.Pad[j]);}}
CHANGE_SIZE(id,i,el.Final,true);upad.add(el.Img).addClass('jqDockMouse'+i);el.Label.el=$('<div class="jqDockLabel jqDockMouse'+i+' jqDockLabel'+(el.Linked?'Link':'Image')+'" style="position:absolute;margin:0px;">'+el.Label.txt+'</div>').hide().appendTo(el.Img.parent());i+=1;}
callback=function(){if(op.labels){$.each(Dock.Elem,function(){SET_LABEL(Dock,this);});}
Dock.Yard.bind('mouseenter mouseleave mousemove',MOUSE_HANDLER);};if(op.fadeIn){el={dock:'.jqDock',wrap:'.jqDockWrap'}[op.fadeLayer.toString()]||'';if(el){el=$(el,Dock.Menu).hide();$(Dock.Menu).show();}else{el=$(Dock.Menu);}
el.find(':not(.jqDockLabel)').css({filter:'inherit'}).end().fadeIn(op.fadeIn,callback);}else{$(Dock.Menu).show();callback();}}};})();$.fn.jqDock=function(opts){if(this.length&&!this.not('img').length){this.each(function(n,el){var idx=el.className.toString().match(/jqDockMouse(\d+)/),id=idx?($(el).parents('div.jqDock').attr('id')||'').match(/^jqDock(\d+)$/):0,src=0,item,atRest;opts=opts||{};if(id){id=1*id[1];idx=1*idx[1];item=DOCKS[id].Elem[idx];atRest=item.Trans==item.Initial;$.each(PROPMAP,function(k,v){var str;if(opts[k]){str=($.isFunction(opts[k])?opts[k].call(el,item[v],k):opts[k]).toString();if(item[v]!==str){item[v]=str;src=(k=='src'?atRest:!atRest)?v:src;}}});if(src){$(el).attr('src',item[src]);}}});}else{this.not('.jqDocked').filter(function(){return!$(this).parents('.jqDocked').length&&!$(this).children().not('img').filter(function(){return $(this).filter('a').children('img').parent().children().length!==1;}).length;}).hide().addClass('jqDocked').each(function(){var id=DOCKS.length,imgOnload=function(ev){var dock=DOCKS[ev.data.id],el=dock.Elem[ev.data.idx];el.height=this.height;el.width=this.width;if(++dock.Loaded>=dock.Elem.length){window.setTimeout(function(){$.jqDock.initDock(ev.data.id);},0);}},Dock,op,jqld,i;DOCKS[id]={Elem:[],Menu:this,OnDock:false,Expanded:false,Timestamp:0,width:0,height:0,Spread:0,Borders:{},Yard:false,Opts:$.extend({},$.jqDock.defaults,opts||{},$.metadata?$(this).metadata():{}),Current:false,Loaded:0,Inactive:null};Dock=DOCKS[id];op=Dock.Opts;jqld=(!op.loader&&$.jqDock.useJqLoader)||op.loader==='jquery';$.each(['size','distance','duration','inactivity','fadeIn','step'],function(k,v){op[v]=AS_INTEGER(op[v]);});i=op.coefficient*1;op.coefficient=isNaN(i)?1.5:i;op.attenuation=Math.pow(op.distance,op.coefficient);op.orient=({left:1,center:1,right:1}[op.align])?{vh:'v',inv:'h'}:{vh:'h',inv:'v'};op.vh=$.extend({},VERTHORZ[op.orient.vh],{inv:VERTHORZ[op.orient.inv]});op.labels=op.labels===true?{top:'br',left:'tr'}[op.align]||'tl':((/^[tmb][lcr]$/).test(op.labels.toString())?op.labels:false);$('img',this).each(function(n,el){var jself=$(el),src=jself.attr('src'),linkParent=jself.parent('a');Dock.Elem[n]={Img:jself,Source:src,AltSource:(op.source?op.source.call(el,n):'')||ALT_IMAGE(el)||src,Label:{txt:jself.attr('title')||linkParent.attr('title')||'',width:0,height:0,widthPad:0,heightPad:0,el:0},Initial:0,Trans:0,TransInv:0,Final:0,Offset:0,Centre:0,Pad:{},Linked:!!linkParent.length,width:0,height:0};$.each(TRBL,function(i,v){Dock.Elem[n].Pad[v]=AS_INTEGER(jself.css('padding'+v));});});$.each(Dock.Elem,function(i,v){var pre,altsrc=v.AltSource;if(jqld){$('<img />').bind('load',{id:id,idx:i},imgOnload).attr({src:altsrc});}else{pre=new Image();pre.onload=function(){imgOnload.call(this,{data:{id:id,idx:i}});pre.onload='';pre=null;};pre.src=altsrc;}});});}
return this;};}})(jQuery,window);var newwindow=null;Loading='<span class="load CIn">Chargement en cours...</span>';Loaded='<span class="load CIn">Fin du Chargement...</span>';Work='<span class="load CIn">Traitement des données...</span>';ErrorXhr='<span class="Errerr">Votre navigateur ne supporte pas les objets XMLHTTPRequest...</span>';IB=new Object;OldId=0;TabText=new Array;TabTextPoeme=new Array;bgcolorlist=new Array('#DFDFFF','#FFFFBF','#80FF80','#00FFCC','#CCFF33','#0066CC','#CC33FF','#FF0099','#D0C0FF','#90E0FF','#D0FF70','#FFC0D0','#FFD020');TotalValue=0;LargeurTop=0;LargeurGraph=0;HauteurGraph=0;DivBulle=null;var Confirme=function(url){if(confirm('Etes vous sure de vouloire effectuer cette action ?')){var newwindow=null;newwindow=window.open(url,"NameFenetre","toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=yes,height=100,width=515");if(typeof newwindow.document!="undefined"){newwindow.focus();}else{window.location.href=url;}
return true;}else{return false;}}
var OuvreFenetre=function(url){var hauteur=400;var largeur=516;url=trim(url);newwindow=window.open(url,"addcom","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=yes,height=365,width=515");if(typeof newwindow.document!="undefined"){newwindow.focus();}else{window.location.href=url;}}
var httpPersoRequest=function(TheIdOfDiv,file,ParamSend){var TheDateObj=new Date();var TheTime=TheDateObj.getTime();var ParamSend=ParamSend||'Time='+TheTime;if(ParamSend!='Time='+TheTime){ParamSend=ParamSend+'&Time='+TheTime;}
$.ajax({type:"POST",url:file,data:ParamSend,cache:false,success:function(html){$("#"+TheIdOfDiv).html(html);}});return true;}
var httpRequestTime=function(DivName,TheFileName,TheTime,ReDoAfter){httpPersoRequest(DivName,TheFileName);if(arguments.length>3)setTimeout('httpRequestTime("'+DivName+'", "'+TheFileName+'", '+TheTime+', '+ReDoAfter+');',ReDoAfter);}
var CanEnter=function(field,bouton){}
var ChgUrl=function(cible){window.location.href=cible;}
var ResizePage=function(){if(typeof window.resizeTo=="undefined"){return false;}
var x=530;var y=350;if(typeof document.images['laphoto']!="undefined"){x=document.images['laphoto'].width;y=document.images['laphoto'].height;y+=95;}
if(typeof document.getElementById('IsCenter')!="undefined"){y=document.body.clientHeight-65;}
var fx=x+20;var fy=y+155;if(fx<530){fx=530;}
if(fy<350){fy=350;}
if(typeof screen.availWidth!="undefined"){if(fx>screen.availWidth){fx=screen.availWidth;}
if(fy>screen.availHeight){fy=screen.availHeight;}}else{if(fx>700){fx=700;}
if(fy>600){fy=600;}}
window.resizeTo(fx,fy);if(typeof self.focus!="undefined"){self.focus();}}
var XPosSeb=0;var YPosSeb=0;var posX=0;var posY=0;var AffBulle=function(texte,TheX,TheY){var cssObj={"left":XPosSeb+10,"top":YPosSeb}
$("#bulleInt").html(TabText[texte]);$("#bulle").css(cssObj).fadeIn("slow");}
var GetInfo=function(id_auteur,ObjLink,TypeInfo,TypeLnk){if(typeof TabText[TypeInfo+id_auteur]!=="undefined"){AffBulle(TypeInfo+id_auteur);}else if(id_auteur!==OldId){$.ajax({type:"POST",url:TypeLnk+id_auteur+".html",cache:false,success:function(html){TabText[TypeInfo+id_auteur]=html;AffBulle(TypeInfo+id_auteur);}});}
OldId=id_auteur;}
var IA=function(id_auteur,ObjLink){GetInfo(id_auteur,ObjLink,'A','/info_auteur_req-');}
var IP=function(id_poeme,ObjLink){GetInfo(id_poeme,ObjLink,'P','/info_poeme_req-');}
var HideBulle=function(){$("#bulle").fadeOut("slow");}
var SetCurso=function(ElmToChg,TypeChg){document.getElementById(ElmToChg).style.cursor=TypeChg;}
var SetClass=function(ElmToChg,TypeChg){document.getElementById(ElmToChg).className=TypeChg;}
var AddPointer=function(ElChg){$(ElChg).addClass("ispointer").removeClass("isauto");};var AddAuto=function(ElChg){$(ElChg).addClass("isauto").removeClass("ispointer");};var ActLn=function(IdOfActAuteur){if(TabPhotoSel[IdOfActAuteur]<=0){$("#PhotoPrv"+IdOfActAuteur).click(function(){});AddAuto("#PhotoPrv"+IdOfActAuteur);}else{$("#PhotoPrv"+IdOfActAuteur).click(function(){FctSt1("IdOfActAuteur");});AddAuto("#PhotoPrv"+IdOfActAuteur);}
if(TabPhotoSel[IdOfActAuteur]>=TabPhotoNb[IdOfActAuteur]){$("#PhotoNxt"+IdOfActAuteur).click(function(){});AddAuto("#PhotoNxt"+IdOfActAuteur);}else{$("#PhotoNxt"+IdOfActAuteur).click(function(){FctSt2("IdOfActAuteur");});AddAuto("#PhotoNxt"+IdOfActAuteur);}
$("#LaPhoto"+IdOfActAuteur).css("background-image","url("+TabPhotoLien[IdOfActAuteur][TabPhotoSel[IdOfActAuteur]]+")");}
var FctSt1=function(IdOfAuteur){TabPhotoSel[IdOfAuteur]=TabPhotoSel[IdOfAuteur]-1;$("#LaPhoto"+IdOfAuteur).fadeOut('slow',function(){ActLn(IdOfAuteur);$("#LaPhoto"+IdOfAuteur).fadeIn('slow');});if(TabPhotoSel[IdOfAuteur]<0){TabPhotoSel[IdOfAuteur]=TabPhotoNb[IdOfAuteur];}}
var FctSt2=function(IdOfAuteur){TabPhotoSel[IdOfAuteur]=TabPhotoSel[IdOfAuteur]+1;$("#LaPhoto"+IdOfAuteur).fadeOut('slow',function(){ActLn(IdOfAuteur);$("#LaPhoto"+IdOfAuteur).fadeIn('slow');});if(TabPhotoSel[IdOfAuteur]>TabPhotoNb[IdOfAuteur]){TabPhotoSel[IdOfAuteur]=0;}}
var myDrawCartouche=function(Titre,Obj,Largeur,Hauteur,AffTo){Obj.setStroke(2);Obj.setColor("#000033");Obj.fillRect(0,20,Largeur,HauteurGraph);Obj.setColor("#2E2E2E");Obj.fillPolygon(new Array(50,50,55,Largeur,Largeur),new Array(20,10,0,0,20));Obj.setColor("#6699FF");Obj.setFont("Comic Sans MS","13px",Font.BOLD);if(AffTo>0){Obj.drawStringRect(Titre+' : '+TotalValue,57,0,LargeurTop-5,'left');}else{Obj.drawStringRect(Titre,57,0,LargeurTop-5,'left');}
Obj.drawImage("/css/stat.jpg",0,20,Largeur,HauteurGraph);Obj.setColor("#8C8C8C");Obj.drawRect(0,20,Largeur,HauteurGraph);Obj.drawPolygon(new Array(50,50,55,Largeur,Largeur),new Array(20,10,0,0,20));}
var myDrawGraphLine=function(Titre,Obj,ArrayName,ArrayValue,Largeur,Hauteur,AffNb,AffTo){var TabValueXTmp=new Array();var TabValueYTmp=new Array();var MaxValue=0;LargeurTop=Largeur-50;LargeurGraph=Largeur/2;HauteurGraph=Hauteur-20;TotalValue=0;var i=ArrayValue.length;while(i--){ArrayValue[i]=Number(ArrayValue[i]);TotalValue=TotalValue+ArrayValue[i];if(ArrayValue[i]>MaxValue)MaxValue=ArrayValue[i];}
myDrawCartouche(Titre,Obj,Largeur,Hauteur,AffTo);Obj.setFont("Arial","11px",Font.PLAIN);HauteurGraph=Hauteur-40;Obj.setStroke(Stroke.DOTTED);Obj.setColor(bgcolorlist[2]);TabValueXTmp[0]=40+0*(Largeur-50)/(ArrayValue.length-1);;TabValueYTmp[0]=HauteurGraph-(HauteurGraph-Hauteur)/MaxValue*0;for(var i=0;i<ArrayValue.length;i++){TabValueXTmp[i+1]=40+i*(Largeur-50)/(ArrayValue.length-1);TabValueYTmp[i+1]=HauteurGraph-(HauteurGraph-40)/MaxValue*ArrayValue[i];Obj.drawLine(TabValueXTmp[i+1],TabValueYTmp[0]+5,TabValueXTmp[i+1],25);Obj.drawLine(TabValueXTmp[i+1],TabValueYTmp[0]+5,TabValueXTmp[i+1],HauteurGraph);if(pair(i)){Obj.drawStringRect(ArrayName[i],TabValueXTmp[i+1]-40,TabValueYTmp[0]+5,(Largeur-50)/(ArrayValue.length-1)-5,'center');}else{Obj.drawStringRect(ArrayName[i],TabValueXTmp[i+1]-40,TabValueYTmp[0]+10,(Largeur-50)/(ArrayValue.length-1)-5,'center');}}
TabValueXTmp[i+1]=40+(ArrayValue.length-1)*(Largeur-50)/(ArrayValue.length-1);TabValueYTmp[i+1]=TabValueYTmp[0];Obj.setColor(bgcolorlist[3]);Maxi=3;for(var i=1;i<Maxi;i++){Obj.drawLine(TabValueXTmp[0]-5,(HauteurGraph)/Maxi*i,(Largeur-5),(HauteurGraph)/Maxi*i);Obj.drawStringRect(Number(MaxValue/(i)),TabValueXTmp[0]-30,(HauteurGraph)/Maxi*i-10,'left');}
Obj.setStroke(2);Obj.setColor(bgcolorlist[3]);Obj.fillPolygon(TabValueXTmp,TabValueYTmp);Maxi1=3;Obj.setColor(bgcolorlist[1]);Obj.drawLine(TabValueXTmp[0],TabValueYTmp[0]+5,TabValueXTmp[0],25);Obj.drawLine(TabValueXTmp[0]-5,(HauteurGraph)/Maxi*Maxi1,(Largeur-5),(HauteurGraph)/Maxi*Maxi1);Obj.drawStringRect(0,TabValueXTmp[0]-30,(HauteurGraph)/Maxi*i-10,'left');Obj.paint();}
var myDrawGraphRond=function(Titre,Obj,ArrayName,ArrayValue,Largeur,Hauteur,AffNb,AffTo){var StartAngle=0;var EndAngle=0;LargeurTop=Largeur-50;LargeurGraph=Largeur/2;HauteurGraph=Hauteur-20;TotalValue=0;var i=ArrayValue.length;while(i--){ArrayValue[i]=Number(ArrayValue[i]);TotalValue=TotalValue+ArrayValue[i];}
myDrawCartouche(Titre,Obj,Largeur,Hauteur,AffTo)
Obj.setColor("#990099");Obj.fillEllipse(5,33,LargeurGraph,HauteurGraph-20);Obj.setFont("arial","11px",Font.PLAIN);var i=ArrayValue.length;while(i--){Obj.setColor(bgcolorlist[i]);if(ArrayValue[i]>0){EndAngle=EndAngle+(360/TotalValue)*Number(ArrayValue[i]);Obj.fillArc(5,27,LargeurGraph,HauteurGraph-20,StartAngle,EndAngle);StartAngle=StartAngle+(360/TotalValue)*Number(ArrayValue[i]);}
Obj.fillRect(LargeurGraph+10,i*14+30,30,12);if(AffNb==0){Obj.drawString(ArrayName[i],LargeurGraph+45,i*14+29);}else{Obj.drawString(ArrayName[i]+' : '+ArrayValue[i],LargeurGraph+45,i*14+29);}}
Obj.paint();}
var pair=function(chiffre){chiffre=Number(chiffre);return((chiffre&1)=='0')?true:false;}
var trim=function(stringToTrim){return stringToTrim.replace(/^\s+|\s+$/g,"");}
var mouseOverFunc=function(){addElementClass(this,"over");};var mouseOutFunc=function(){removeElementClass(this,"over");};var ignoreEvent=function(ev){if(ev&&ev.preventDefault){ev.preventDefault();ev.stopPropagation();}else if(typeof(event)!='undefined'){event.cancelBubble=false;event.returnValue=false;}};var Ligth=function(ClToApli){SaveClasse=ClToApli.className;removeElementClass(ClToApli,"odd");addElementClass(ClToApli,"hlist");}
var NoLigth=function(ClToApli){ClToApli.className=SaveClasse;removeElementClass(ClToApli,"hlist");}
var AddFavori=function(NumFav,TypeFav,FrmType,ValidFav){OuvreFenetre("/ajout-favori.html?FrmType="+FrmType+"&NumFav="+NumFav+"&TypeFav="+TypeFav+"&ValidFav="+ValidFav);};var Msg=function(Pour,De){OuvreFenetre("/ajout-messageprive-"+Pour+"-"+De+".html");};var ChgPubli=function(NomDiv,NumPoeme,TypePubli){httpPersoRequest(NomDiv,"/obj/httprequest/delforum.php","NomTable=ChgPublier&NunToDel="+NumPoeme+"&TypePubli="+TypePubli+"&NoMail=true");}
var GetValueInput=function(NomDiv){TheElemInput=$("#"+NomDiv).val();if(typeof TheElemInput!="undefined"){return TheElemInput;}else{return 0;}}
var FormLogin=function(NomDiv,TypeLog){if(TypeLog==1){TypeEnt='Entrer';}
if(TypeLog==2){TypeEnt='Oublie';}
httpPersoRequest(NomDiv,"/obj/httprequest/login-entrez.php","EMail="+GetValueInput('EMail')+"&Pwd="+GetValueInput('Pwd')+"&Statut="+GetValueInput('Statut')+"&SavePass="+GetValueInput('SavePass')+"&OubliePass="+TypeLog+"&"+TypeEnt+"="+TypeEnt+"&NoMail=true");}
var GetNum=function(NameEl){return NameEl.lastIndexOf('');}
var GetAime=function(DivName,TypeAime,UsrAime){httpPersoRequest(DivName,"/obj/httprequest/meteo.php","Liste="+TypeAime+"&UsrAime="+UsrAime+"&NoMail=true");}
var LesConnectes=function(){httpPersoRequest('NouvoCon',"/httprequest-news.html","IsAway=0&NoMail=true");var TheTimeoutAway=setTimeout("httpPersoRequest('NouvoCon', '/httprequest-news.html', 'IsAway=9&NoMail=true');",300000);setTimeout("httpRequestTime('NouvoCon', '/httprequest-news.html?IsAway=9&NoMail=true', 240000, 200000);",240000);};var DeProtect=function(IdOfTxt){var LePoeme=$("#ThePoeme"+IdOfTxt);$("#myId")[0].style.height=($("#myId")[0].contentWindow.document.body.scrollHeight)+"px";$("#myId")[0].style.height=($("#myId")[0].contentWindow.document.body.offsetHeight+30)+"px";var ImgVide=$("#ImgVide"+IdOfTxt);var LePoeme=$("#AllThePoeme"+IdOfTxt);LePoeme.bind("select click",function(event){alert("Copie Interdite ;)");event.stopPropagation();event.preventDefault();return false;});LePoeme.bind("mouseenter mouseleave mouseover mousedown mouseup mousemove",function(event){event.stopPropagation();event.preventDefault();return false;});ImgVide.bind("select click",function(event){alert("Copie Interdite ;)");event.stopPropagation();event.preventDefault();return false;});ImgVide.bind("mouseenter mouseleave mouseover mousedown mouseup mousemove",function(event){event.stopPropagation();event.preventDefault();return false;});var LePoemePosition=LePoeme.position();var cssObj={"left":LePoemePosition.left,"top":LePoemePosition.top}
ImgVide.css(cssObj);ImgVide.width(LePoeme.width()+10);ImgVide.height(LePoeme.height());}
$(function(){LesConnectes();$(document).bind("mousemove",function(e){XPosSeb=e.pageX;YPosSeb=e.pageY;});$(".TLP tbody tr").hover(function(){$(this).addClass("hover");},function(){$(this).removeClass("hover");});$(".TLP tbody tr:odd").addClass("odd");$(".TLP tbody tr:even").addClass("noodd");});