var Window=Class.create();
Window.keepMultiModalWindow=false;
Window.hasEffectLib=(typeof Effect!="undefined");
Window.resizeEffectDuration=0.4;
Window.prototype={initialize:function(){
var id;
var _2=0;
if(arguments.length>0){
if(typeof arguments[0]=="string"){
id=arguments[0];
_2=1;
}else{
id=arguments[0]?arguments[0].id:null;
}
}
if(!id){
id="window_"+new Date().getTime();
}
if($(id)){
alert("Window "+id+" is already registered in the DOM! Make sure you use setDestroyOnClose() or destroyOnClose: true in the constructor");
}
this.options=Object.extend({className:"alphacube",blurClassName:null,minWidth:100,minHeight:20,resizable:true,closable:true,minimizable:true,maximizable:true,draggable:true,userData:null,showEffect:(Window.hasEffectLib?Effect.Appear:Element.show),hideEffect:(Window.hasEffectLib?Effect.Fade:Element.hide),showEffectOptions:{},hideEffectOptions:{},effectOptions:null,parent:document.body,title:"&nbsp;",url:null,onload:Prototype.emptyFunction,width:200,height:300,opacity:1,recenterAuto:true,wiredDrag:false,closeCallback:null,destroyOnClose:false,gridX:1,gridY:1,externalStyle:false},arguments[_2]||{});
if(this.options.blurClassName){
this.options.focusClassName=this.options.className;
}
if(typeof this.options.top=="undefined"&&typeof this.options.bottom=="undefined"){
this.options.top=this._round(Math.random()*500,this.options.gridY);
}
if(typeof this.options.left=="undefined"&&typeof this.options.right=="undefined"){
this.options.left=this._round(Math.random()*500,this.options.gridX);
}
if(this.options.effectOptions){
Object.extend(this.options.hideEffectOptions,this.options.effectOptions);
Object.extend(this.options.showEffectOptions,this.options.effectOptions);
if(this.options.showEffect==Element.Appear){
this.options.showEffectOptions.to=this.options.opacity;
}
}
if(Window.hasEffectLib){
if(this.options.showEffect==Effect.Appear){
this.options.showEffectOptions.to=this.options.opacity;
}
if(this.options.hideEffect==Effect.Fade){
this.options.hideEffectOptions.from=this.options.opacity;
}
}
if(this.options.hideEffect==Element.hide){
this.options.hideEffect=function(){
Element.hide(this.element);
if(this.options.destroyOnClose){
this.destroy();
}
}.bind(this);
}
if(this.options.parent!=document.body){
this.options.parent=$(this.options.parent);
}
this.element=this._createWindow(id);
this.element.win=this;
this.eventMouseDown=this._initDrag.bindAsEventListener(this);
this.eventMouseUp=this._endDrag.bindAsEventListener(this);
this.eventMouseMove=this._updateDrag.bindAsEventListener(this);
this.eventOnLoad=this._getWindowBorderSize.bindAsEventListener(this);
this.eventMouseDownContent=this.toFront.bindAsEventListener(this);
this.eventResize=this._recenter.bindAsEventListener(this);
this.topbar=$(this.element.id+"_top");
this.bottombar=$(this.element.id+"_bottom");
this.content=$(this.element.id+"_content");
Event.observe(this.topbar,"mousedown",this.eventMouseDown);
Event.observe(this.bottombar,"mousedown",this.eventMouseDown);
Event.observe(this.content,"mousedown",this.eventMouseDownContent);
Event.observe(window,"load",this.eventOnLoad);
Event.observe(window,"resize",this.eventResize);
Event.observe(window,"scroll",this.eventResize);
Event.observe(this.options.parent,"scroll",this.eventResize);
if(this.options.draggable){
var _3=this;
[this.topbar,this.topbar.up().previous(),this.topbar.up().next()].each(function(_4){
_4.observe("mousedown",_3.eventMouseDown);
_4.addClassName("top_draggable");
});
[this.bottombar.up(),this.bottombar.up().previous(),this.bottombar.up().next()].each(function(_5){
_5.observe("mousedown",_3.eventMouseDown);
_5.addClassName("bottom_draggable");
});
}
if(this.options.resizable){
this.sizer=$(this.element.id+"_sizer");
Event.observe(this.sizer,"mousedown",this.eventMouseDown);
}
this.useLeft=null;
this.useTop=null;
if(typeof this.options.left!="undefined"){
this.element.setStyle({left:parseFloat(this.options.left)+"px"});
this.useLeft=true;
}else{
this.element.setStyle({right:parseFloat(this.options.right)+"px"});
this.useLeft=false;
}
if(typeof this.options.top!="undefined"){
this.element.setStyle({top:parseFloat(this.options.top)+"px"});
this.useTop=true;
}else{
this.element.setStyle({bottom:parseFloat(this.options.bottom)+"px"});
this.useTop=false;
}
this.storedLocation=null;
this.setOpacity(this.options.opacity);
if(this.options.zIndex){
this.setZIndex(this.options.zIndex);
}
if(this.options.destroyOnClose){
this.setDestroyOnClose(true);
}
this._getWindowBorderSize();
this.width=this.options.width;
this.height=this.options.height;
this.visible=false;
this.constraint=false;
this.constraintPad={top:0,left:0,bottom:0,right:0};
if(this.width&&this.height){
this.setSize(this.options.width,this.options.height);
}
this.setTitle(this.options.title);
Windows.register(this);
},destroy:function(){
this._notify("onDestroy");
Event.stopObserving(this.topbar,"mousedown",this.eventMouseDown);
Event.stopObserving(this.bottombar,"mousedown",this.eventMouseDown);
Event.stopObserving(this.content,"mousedown",this.eventMouseDownContent);
Event.stopObserving(window,"load",this.eventOnLoad);
Event.stopObserving(window,"resize",this.eventResize);
Event.stopObserving(window,"scroll",this.eventResize);
Event.stopObserving(this.content,"load",this.options.onload);
if(this._oldParent){
var _6=this.getContent();
var _7=null;
for(var i=0;i<_6.childNodes.length;i++){
_7=_6.childNodes[i];
if(_7.nodeType==1){
break;
}
_7=null;
}
if(_7){
this._oldParent.appendChild(_7);
}
this._oldParent=null;
}
if(this.sizer){
Event.stopObserving(this.sizer,"mousedown",this.eventMouseDown);
}
if(this.options.url){
this.content.src=null;
}
if(this.iefix){
Element.remove(this.iefix);
}
Element.remove(this.element);
Windows.unregister(this);
},setCloseCallback:function(_9){
this.options.closeCallback=_9;
},getContent:function(){
return this.content;
},setContent:function(id,_b,_c){
var _d=$(id);
if(null==_d){
throw "Unable to find element '"+id+"' in DOM";
}
this._oldParent=_d.parentNode;
var d=null;
var p=null;
if(_b){
d=Element.getDimensions(_d);
}
if(_c){
p=Position.cumulativeOffset(_d);
}
var _10=this.getContent();
this.setHTMLContent("");
_10=this.getContent();
_10.appendChild(_d);
_d.show();
if(_b){
this.setSize(d.width,d.height);
}
if(_c){
this.setLocation(p[1]-this.heightN,p[0]-this.widthW);
}
},setHTMLContent:function(_11){
if(this.options.url){
this.content.src=null;
this.options.url=null;
var _12="<div id=\""+this.getId()+"_content\" class=\""+this.options.className+"_content\"> </div>";
$(this.getId()+"_table_content").innerHTML=_12;
this.content=$(this.element.id+"_content");
}
this.getContent().innerHTML=_11;
},setAjaxContent:function(url,_14,_15,_16){
this.showFunction=_15?"showCenter":"show";
this.showModal=_16||false;
_14=_14||{};
this.setHTMLContent("");
this.onComplete=_14.onComplete;
if(!this._onCompleteHandler){
this._onCompleteHandler=this._setAjaxContent.bind(this);
}
_14.onComplete=this._onCompleteHandler;
new Ajax.Request(url,_14);
_14.onComplete=this.onComplete;
},_setAjaxContent:function(_17){
Element.update(this.getContent(),_17.responseText);
if(this.onComplete){
this.onComplete(_17);
}
this.onComplete=null;
this[this.showFunction](this.showModal);
},setURL:function(url){
if(this.options.url){
this.content.src=null;
}
this.options.url=url;
var _19="<iframe frameborder='0' name='"+this.getId()+"_content'  id='"+this.getId()+"_content' src='"+url+"' width='"+this.width+"' height='"+this.height+"'> </iframe>";
$(this.getId()+"_table_content").innerHTML=_19;
this.content=$(this.element.id+"_content");
},getURL:function(){
return this.options.url?this.options.url:null;
},refresh:function(){
if(this.options.url){
$(this.element.getAttribute("id")+"_content").src=this.options.url;
}
},setCookie:function(_1a,_1b,_1c,_1d,_1e){
_1a=_1a||this.element.id;
this.cookie=[_1a,_1b,_1c,_1d,_1e];
var _1f=WindowUtilities.getCookie(_1a);
if(_1f){
var _20=_1f.split(",");
var x=_20[0].split(":");
var y=_20[1].split(":");
var w=parseFloat(_20[2]),h=parseFloat(_20[3]);
var _25=_20[4];
var _26=_20[5];
this.setSize(w,h);
if(_25=="true"){
this.doMinimize=true;
}else{
if(_26=="true"){
this.doMaximize=true;
}
}
this.useLeft=x[0]=="l";
this.useTop=y[0]=="t";
this.element.setStyle(this.useLeft?{left:x[1]}:{right:x[1]});
this.element.setStyle(this.useTop?{top:y[1]}:{bottom:y[1]});
}
},getId:function(){
return this.element.id;
},setDestroyOnClose:function(){
this.options.destroyOnClose=true;
},setConstraint:function(_27,_28){
this.constraint=_27;
this.constraintPad=Object.extend(this.constraintPad,_28||{});
if(this.useTop&&this.useLeft){
this.setLocation(parseFloat(this.element.style.top),parseFloat(this.element.style.left));
}
},_initDrag:function(_29){
if(Event.element(_29)==this.sizer&&this.isMinimized()){
return;
}
if(Event.element(_29)!=this.sizer&&this.isMaximized()){
return;
}
if(Prototype.Browser.IE&&this.heightN==0){
this._getWindowBorderSize();
}
this.pointer=[this._round(Event.pointerX(_29),this.options.gridX),this._round(Event.pointerY(_29),this.options.gridY)];
if(this.options.wiredDrag){
this.currentDrag=this._createWiredElement();
}else{
this.currentDrag=this.element;
}
if(Event.element(_29)==this.sizer){
this.doResize=true;
this.widthOrg=this.width;
this.heightOrg=this.height;
this.bottomOrg=parseFloat(this.element.getStyle("bottom"));
this.rightOrg=parseFloat(this.element.getStyle("right"));
this._notify("onStartResize");
}else{
this.doResize=false;
var _2a=$(this.getId()+"_close");
if(_2a&&Position.within(_2a,this.pointer[0],this.pointer[1])){
this.currentDrag=null;
return;
}
this.toFront();
if(!this.options.draggable){
return;
}
this._notify("onStartMove");
}
Event.observe(document,"mouseup",this.eventMouseUp,false);
Event.observe(document,"mousemove",this.eventMouseMove,false);
WindowUtilities.disableScreen("__invisible__","__invisible__",this.overlayOpacity);
document.body.ondrag=function(){
return false;
};
document.body.onselectstart=function(){
return false;
};
this.currentDrag.show();
Event.stop(_29);
},_round:function(val,_2c){
return _2c==1?val:val=Math.floor(val/_2c)*_2c;
},_updateDrag:function(_2d){
var _2e=[this._round(Event.pointerX(_2d),this.options.gridX),this._round(Event.pointerY(_2d),this.options.gridY)];
var dx=_2e[0]-this.pointer[0];
var dy=_2e[1]-this.pointer[1];
if(this.doResize){
var w=this.widthOrg+dx;
var h=this.heightOrg+dy;
dx=this.width-this.widthOrg;
dy=this.height-this.heightOrg;
if(this.useLeft){
w=this._updateWidthConstraint(w);
}else{
this.currentDrag.setStyle({right:(this.rightOrg-dx)+"px"});
}
if(this.useTop){
h=this._updateHeightConstraint(h);
}else{
this.currentDrag.setStyle({bottom:(this.bottomOrg-dy)+"px"});
}
this.setSize(w,h);
this._notify("onResize");
}else{
this.pointer=_2e;
if(this.useLeft){
var _33=parseFloat(this.currentDrag.getStyle("left"))+dx;
var _34=this._updateLeftConstraint(_33);
this.pointer[0]+=_34-_33;
this.currentDrag.setStyle({left:_34+"px"});
}else{
this.currentDrag.setStyle({right:parseFloat(this.currentDrag.getStyle("right"))-dx+"px"});
}
if(this.useTop){
var top=parseFloat(this.currentDrag.getStyle("top"))+dy;
var _36=this._updateTopConstraint(top);
this.pointer[1]+=_36-top;
this.currentDrag.setStyle({top:_36+"px"});
}else{
this.currentDrag.setStyle({bottom:parseFloat(this.currentDrag.getStyle("bottom"))-dy+"px"});
}
this._notify("onMove");
}
if(this.iefix){
this._fixIEOverlapping();
}
this._removeStoreLocation();
Event.stop(_2d);
},_endDrag:function(_37){
WindowUtilities.enableScreen("__invisible__");
if(this.doResize){
this._notify("onEndResize");
}else{
this._notify("onEndMove");
}
Event.stopObserving(document,"mouseup",this.eventMouseUp,false);
Event.stopObserving(document,"mousemove",this.eventMouseMove,false);
Event.stop(_37);
this._hideWiredElement();
this._saveCookie();
document.body.ondrag=null;
document.body.onselectstart=null;
},_updateLeftConstraint:function(_38){
if(this.constraint&&this.useLeft&&this.useTop){
var _39=this.options.parent==document.body?WindowUtilities.getPageSize().windowWidth:this.options.parent.getDimensions().width;
if(_38<this.constraintPad.left){
_38=this.constraintPad.left;
}
if(_38+this.width+this.widthE+this.widthW>_39-this.constraintPad.right){
_38=_39-this.constraintPad.right-this.width-this.widthE-this.widthW;
}
}
return _38;
},_updateTopConstraint:function(top){
if(this.constraint&&this.useLeft&&this.useTop){
var _3b=this.options.parent==document.body?WindowUtilities.getPageSize().windowHeight:this.options.parent.getDimensions().height;
var h=this.height+this.heightN+this.heightS;
if(top<this.constraintPad.top){
top=this.constraintPad.top;
}
if(top+h>_3b-this.constraintPad.bottom){
top=_3b-this.constraintPad.bottom-h;
}
}
return top;
},_updateWidthConstraint:function(w){
if(this.constraint&&this.useLeft&&this.useTop){
var _3e=this.options.parent==document.body?WindowUtilities.getPageSize().windowWidth:this.options.parent.getDimensions().width;
var _3f=parseFloat(this.element.getStyle("left"));
if(_3f+w+this.widthE+this.widthW>_3e-this.constraintPad.right){
w=_3e-this.constraintPad.right-_3f-this.widthE-this.widthW;
}
}
return w;
},_updateHeightConstraint:function(h){
if(this.constraint&&this.useLeft&&this.useTop){
var _41=this.options.parent==document.body?WindowUtilities.getPageSize().windowHeight:this.options.parent.getDimensions().height;
var top=parseFloat(this.element.getStyle("top"));
if(top+h+this.heightN+this.heightS>_41-this.constraintPad.bottom){
h=_41-this.constraintPad.bottom-top-this.heightN-this.heightS;
}
}
return h;
},_createWindow:function(id){
var _44=this.options.className;
var win=document.createElement("div");
win.setAttribute("id",id);
win.className="alphacube";
var _46;
if(this.options.url){
_46="<iframe frameborder=\"0\" name=\""+id+"_content\"  id=\""+id+"_content\" src=\""+this.options.url+"\"> </iframe>";
}else{
_46="<div id=\""+id+"_content\" class=\""+_44+"_content\"> </div>";
}
var _47=this.options.closable?"<div class='"+_44+"_close' id='"+id+"_close' onclick='Windows.close(\""+id+"\", event)'> </div>":"";
var _48=this.options.minimizable?"<div class='"+_44+"_minimize' id='"+id+"_minimize' onclick='Windows.minimize(\""+id+"\", event)'> </div>":"";
var _49=this.options.maximizable?"<div class='"+_44+"_maximize' id='"+id+"_maximize' onclick='Windows.maximize(\""+id+"\", event)'> </div>":"";
var _4a=this.options.resizable?"class='"+_44+"_sizer' id='"+id+"_sizer'":"class='"+_44+"_se'";
var _4b="../themes/default/blank.gif";
win.innerHTML=_47+_48+_49+"      <table id='"+id+"_row1' class=\"top table_window\">        <tr>          <td class='"+_44+"_nw'></td>          <td class='"+_44+"_n'><div id='"+id+"_top' class='"+_44+"_title title_window'>"+this.options.title+"</div></td>          <td class='"+_44+"_ne'></td>        </tr>      </table>      <table id='contentAlphacube' class=\"mid table_window\">        <tr>          <td class='"+_44+"_w'></td>            <td id='"+id+"_table_content' class='"+_44+"_content' valign='top'>"+_46+"</td>          <td class='"+_44+"_e'></td>        </tr>      </table>        <table id='"+id+"_row3' class=\"bot table_window\">        <tr>          <td class='"+_44+"_sw'></td>            <td class='"+_44+"_s'><div id='"+id+"_bottom' class='status_bar'><span style='float:left; width:1px; height:1px'></span></div></td>            <td "+_4a+"></td>        </tr>      </table>    ";
Element.hide(win);
this.options.parent.insertBefore(win,this.options.parent.firstChild);
Event.observe($(id+"_content"),"load",this.options.onload);
return win;
},changeClassName:function(_4c){
var _4d=this.options.className;
var id=this.getId();
$A(["_close","_minimize","_maximize","_sizer","_content"]).each(function(_4f){
this._toggleClassName($(id+_4f),_4d+_4f,_4c+_4f);
}.bind(this));
this._toggleClassName($(id+"_top"),_4d+"_title",_4c+"_title");
$$("#"+id+" td").each(function(td){
td.className=td.className.sub(_4d,_4c);
});
this.options.className=_4c;
},_toggleClassName:function(_51,_52,_53){
if(_51){
_51.removeClassName(_52);
_51.addClassName(_53);
}
},setLocation:function(top,_55){
top=this._updateTopConstraint(top);
_55=this._updateLeftConstraint(_55);
var e=this.currentDrag||this.element;
e.setStyle({top:top+"px"});
e.setStyle({left:_55+"px"});
this.useLeft=true;
this.useTop=true;
},getLocation:function(){
var _57={};
if(this.useTop){
_57=Object.extend(_57,{top:this.element.getStyle("top")});
}else{
_57=Object.extend(_57,{bottom:this.element.getStyle("bottom")});
}
if(this.useLeft){
_57=Object.extend(_57,{left:this.element.getStyle("left")});
}else{
_57=Object.extend(_57,{right:this.element.getStyle("right")});
}
return _57;
},getSize:function(){
return {width:this.width,height:this.height};
},setSize:function(_58,_59,_5a){
_58=parseFloat(_58);
_59=parseFloat(_59);
if(!this.minimized&&_58<this.options.minWidth){
_58=this.options.minWidth;
}
if(!this.minimized&&_59<this.options.minHeight){
_59=this.options.minHeight;
}
if(this.options.maxHeight&&_59>this.options.maxHeight){
_59=this.options.maxHeight;
}
if(this.options.maxWidth&&_58>this.options.maxWidth){
_58=this.options.maxWidth;
}
if(this.useTop&&this.useLeft&&Window.hasEffectLib&&Effect.ResizeWindow&&_5a){
new Effect.ResizeWindow(this,null,null,_58,_59,{duration:Window.resizeEffectDuration});
}else{
this.width=_58;
this.height=_59;
var e=this.currentDrag?this.currentDrag:this.element;
e.setStyle({width:_58+this.widthW+this.widthE+"px"});
e.setStyle({height:_59+this.heightN+this.heightS+"px"});
if(!this.options.externalStyle&&!this.currentDrag||this.currentDrag==this.element){
var _5c=$(this.element.id+"_content");
_5c.setStyle({height:_59+"px"});
_5c.setStyle({width:_58+"px"});
}
}
},updateHeight:function(){
this.setSize(this.width,this.content.scrollHeight,true);
},updateWidth:function(){
this.setSize(this.content.scrollWidth,this.height,true);
},toFront:function(){
if(this.element.style.zIndex<Windows.maxZIndex){
this.setZIndex(Windows.maxZIndex+1);
}
if(this.iefix){
this._fixIEOverlapping();
}
},getBounds:function(_5d){
if(!this.width||!this.height||!this.visible){
this.computeBounds();
}
var w=this.width;
var h=this.height;
if(!_5d){
w+=this.widthW+this.widthE;
h+=this.heightN+this.heightS;
}
var _60=Object.extend(this.getLocation(),{width:w+"px",height:h+"px"});
return _60;
},computeBounds:function(){
if(!this.width||!this.height){
var _61=WindowUtilities._computeSize(this.content.innerHTML,this.content.id,this.width,this.height,0,this.options.className);
if(this.height){
this.width=_61+5;
}else{
this.height=_61+5;
}
}
this.setSize(this.width,this.height);
if(this.centered){
this._center(this.centerTop,this.centerLeft);
}
},show:function(_62){
this.visible=true;
if(_62){
if(typeof this.overlayOpacity=="undefined"){
var _63=this;
setTimeout(function(){
_63.show(_62);
},10);
return;
}
Windows.addModalWindow(this);
this.modal=true;
this.setZIndex(Windows.maxZIndex+1);
Windows.unsetOverflow(this);
}else{
if(!this.element.style.zIndex){
this.setZIndex(Windows.maxZIndex+1);
}
}
if(this.oldStyle){
this.getContent().setStyle({overflow:this.oldStyle});
}
this.computeBounds();
this._notify("onBeforeShow");
if(this.options.showEffect!=Element.show&&this.options.showEffectOptions){
this.options.showEffect(this.element,this.options.showEffectOptions);
}else{
this.options.showEffect(this.element);
}
this._checkIEOverlapping();
WindowUtilities.focusedWindow=this;
this._notify("onShow");
},showCenter:function(_64,top,_66){
this.centered=true;
this.centerTop=top;
this.centerLeft=_66;
this.show(_64);
},isVisible:function(){
return this.visible;
},_center:function(top,_68){
var _69=WindowUtilities.getWindowScroll(this.options.parent);
var _6a=WindowUtilities.getPageSize(this.options.parent);
if(typeof top=="undefined"){
top=(_6a.windowHeight-(this.height+this.heightN+this.heightS))/2;
}
top+=_69.top;
if(typeof _68=="undefined"){
_68=(_6a.windowWidth-(this.width+this.widthW+this.widthE))/2;
}
_68+=_69.left;
this.setLocation(top,_68);
this.toFront();
},_recenter:function(_6b){
if(this.centered){
var _6c=WindowUtilities.getPageSize(this.options.parent);
var _6d=WindowUtilities.getWindowScroll(this.options.parent);
if(this.pageSize&&this.pageSize.windowWidth==_6c.windowWidth&&this.pageSize.windowHeight==_6c.windowHeight&&this.windowScroll.left==_6d.left&&this.windowScroll.top==_6d.top){
return;
}
this.pageSize=_6c;
this.windowScroll=_6d;
if($("overlay_modal")){
$("overlay_modal").setStyle({height:(_6c.pageHeight+"px")});
}
if(this.options.recenterAuto){
this._center(this.centerTop,this.centerLeft);
}
}
},hide:function(){
this.visible=false;
if(this.modal){
Windows.removeModalWindow(this);
Windows.resetOverflow();
}
this.oldStyle=this.getContent().getStyle("overflow")||"auto";
this.getContent().setStyle({overflow:"hidden"});
this.options.hideEffect(this.element,this.options.hideEffectOptions);
if(this.iefix){
this.iefix.hide();
}
if(!this.doNotNotifyHide){
this._notify("onHide");
}
},close:function(){
if(this.visible){
if(this.options.closeCallback&&!this.options.closeCallback(this)){
return;
}
if(this.options.destroyOnClose){
var _6e=this.destroy.bind(this);
if(this.options.hideEffectOptions.afterFinish){
var _6f=this.options.hideEffectOptions.afterFinish;
this.options.hideEffectOptions.afterFinish=function(){
_6f();
_6e();
};
}else{
this.options.hideEffectOptions.afterFinish=function(){
_6e();
};
}
}
Windows.updateFocusedWindow();
this.doNotNotifyHide=true;
this.hide();
this.doNotNotifyHide=false;
this._notify("onClose");
}
},minimize:function(){
if(this.resizing){
return;
}
var r2=$(this.getId()+"_row2");
if(!this.minimized){
this.minimized=true;
var dh=r2.getDimensions().height;
this.r2Height=dh;
var h=this.element.getHeight()-dh;
if(this.useLeft&&this.useTop&&Window.hasEffectLib&&Effect.ResizeWindow){
new Effect.ResizeWindow(this,null,null,null,this.height-dh,{duration:Window.resizeEffectDuration});
}else{
this.height-=dh;
this.element.setStyle({height:h+"px"});
r2.hide();
}
if(!this.useTop){
var _73=parseFloat(this.element.getStyle("bottom"));
this.element.setStyle({bottom:(_73+dh)+"px"});
}
}else{
this.minimized=false;
var dh=this.r2Height;
this.r2Height=null;
if(this.useLeft&&this.useTop&&Window.hasEffectLib&&Effect.ResizeWindow){
new Effect.ResizeWindow(this,null,null,null,this.height+dh,{duration:Window.resizeEffectDuration});
}else{
var h=this.element.getHeight()+dh;
this.height+=dh;
this.element.setStyle({height:h+"px"});
r2.show();
}
if(!this.useTop){
var _73=parseFloat(this.element.getStyle("bottom"));
this.element.setStyle({bottom:(_73-dh)+"px"});
}
this.toFront();
}
this._notify("onMinimize");
this._saveCookie();
},maximize:function(){
if(this.isMinimized()||this.resizing){
return;
}
if(Prototype.Browser.IE&&this.heightN==0){
this._getWindowBorderSize();
}
if(this.storedLocation!=null){
this._restoreLocation();
if(this.iefix){
this.iefix.hide();
}
}else{
this._storeLocation();
Windows.unsetOverflow(this);
var _74=WindowUtilities.getWindowScroll(this.options.parent);
var _75=WindowUtilities.getPageSize(this.options.parent);
var _76=_74.left;
var top=_74.top;
if(this.options.parent!=document.body){
_74={top:0,left:0,bottom:0,right:0};
var dim=this.options.parent.getDimensions();
_75.windowWidth=dim.width;
_75.windowHeight=dim.height;
top=0;
_76=0;
}
if(this.constraint){
_75.windowWidth-=Math.max(0,this.constraintPad.left)+Math.max(0,this.constraintPad.right);
_75.windowHeight-=Math.max(0,this.constraintPad.top)+Math.max(0,this.constraintPad.bottom);
_76+=Math.max(0,this.constraintPad.left);
top+=Math.max(0,this.constraintPad.top);
}
var _79=_75.windowWidth-this.widthW-this.widthE;
var _7a=_75.windowHeight-this.heightN-this.heightS;
if(this.useLeft&&this.useTop&&Window.hasEffectLib&&Effect.ResizeWindow){
new Effect.ResizeWindow(this,top,_76,_79,_7a,{duration:Window.resizeEffectDuration});
}else{
this.setSize(_79,_7a);
this.element.setStyle(this.useLeft?{left:_76}:{right:_76});
this.element.setStyle(this.useTop?{top:top}:{bottom:top});
}
this.toFront();
if(this.iefix){
this._fixIEOverlapping();
}
}
this._notify("onMaximize");
this._saveCookie();
},isMinimized:function(){
return this.minimized;
},isMaximized:function(){
return (this.storedLocation!=null);
},setOpacity:function(_7b){
if(Element.setOpacity){
Element.setOpacity(this.element,_7b);
}
},setZIndex:function(_7c){
this.element.setStyle({zIndex:_7c});
Windows.updateZindex(_7c,this);
},setTitle:function(_7d){
if(!_7d||_7d==""){
_7d="&nbsp;";
}
Element.update(this.element.id+"_top",_7d);
},getTitle:function(){
return $(this.element.id+"_top").innerHTML;
},setStatusBar:function(_7e){
var _7f=$(this.getId()+"_bottom");
if(typeof (_7e)=="object"){
if(this.bottombar.firstChild){
this.bottombar.replaceChild(_7e,this.bottombar.firstChild);
}else{
this.bottombar.appendChild(_7e);
}
}else{
this.bottombar.innerHTML=_7e;
}
},_checkIEOverlapping:function(){
if(!this.iefix&&(navigator.appVersion.indexOf("MSIE")>0)&&(navigator.userAgent.indexOf("Opera")<0)&&(this.element.getStyle("position")=="absolute")){
new Insertion.After(this.element.id,"<iframe id=\""+this.element.id+"_iefix\" "+"style=\"display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);\" "+"src=\"javascript:false;\" frameborder=\"0\" scrolling=\"no\"></iframe>");
this.iefix=$(this.element.id+"_iefix");
}
if(this.iefix){
setTimeout(this._fixIEOverlapping.bind(this),50);
}
},_fixIEOverlapping:function(){
Position.clone(this.element,this.iefix);
this.iefix.style.zIndex=this.element.style.zIndex-1;
this.iefix.show();
},_getWindowBorderSize:function(_80){
var div=this._createHiddenDiv(this.options.className+"_n");
this.heightN=Element.getDimensions(div).height;
div.parentNode.removeChild(div);
var div=this._createHiddenDiv(this.options.className+"_s");
this.heightS=Element.getDimensions(div).height;
div.parentNode.removeChild(div);
var div=this._createHiddenDiv(this.options.className+"_e");
this.widthE=Element.getDimensions(div).width;
div.parentNode.removeChild(div);
var div=this._createHiddenDiv(this.options.className+"_w");
this.widthW=Element.getDimensions(div).width;
div.parentNode.removeChild(div);
var div=document.createElement("div");
div.className="overlay_"+this.options.className;
document.body.appendChild(div);
var _82=this;
setTimeout(function(){
_82.overlayOpacity=($(div).getStyle("opacity"));
div.parentNode.removeChild(div);
},10);
if(Prototype.Browser.IE){
this.heightS=$(this.getId()+"_row3").getDimensions().height;
this.heightN=$(this.getId()+"_row1").getDimensions().height;
}
if(Prototype.Browser.WebKit&&Prototype.Browser.WebKitVersion<420){
this.setSize(this.width,this.height);
}
if(this.doMaximize){
this.maximize();
}
if(this.doMinimize){
this.minimize();
}
},_createHiddenDiv:function(_83){
var _84=document.body;
var win=document.createElement("div");
win.setAttribute("id",this.element.id+"_tmp");
win.className=_83;
win.style.display="none";
win.innerHTML="";
_84.insertBefore(win,_84.firstChild);
return win;
},_storeLocation:function(){
if(this.storedLocation==null){
this.storedLocation={useTop:this.useTop,useLeft:this.useLeft,top:this.element.getStyle("top"),bottom:this.element.getStyle("bottom"),left:this.element.getStyle("left"),right:this.element.getStyle("right"),width:this.width,height:this.height};
}
},_restoreLocation:function(){
if(this.storedLocation!=null){
this.useLeft=this.storedLocation.useLeft;
this.useTop=this.storedLocation.useTop;
if(this.useLeft&&this.useTop&&Window.hasEffectLib&&Effect.ResizeWindow){
new Effect.ResizeWindow(this,this.storedLocation.top,this.storedLocation.left,this.storedLocation.width,this.storedLocation.height,{duration:Window.resizeEffectDuration});
}else{
this.element.setStyle(this.useLeft?{left:this.storedLocation.left}:{right:this.storedLocation.right});
this.element.setStyle(this.useTop?{top:this.storedLocation.top}:{bottom:this.storedLocation.bottom});
this.setSize(this.storedLocation.width,this.storedLocation.height);
}
Windows.resetOverflow();
this._removeStoreLocation();
}
},_removeStoreLocation:function(){
this.storedLocation=null;
},_saveCookie:function(){
if(this.cookie){
var _86="";
if(this.useLeft){
_86+="l:"+(this.storedLocation?this.storedLocation.left:this.element.getStyle("left"));
}else{
_86+="r:"+(this.storedLocation?this.storedLocation.right:this.element.getStyle("right"));
}
if(this.useTop){
_86+=",t:"+(this.storedLocation?this.storedLocation.top:this.element.getStyle("top"));
}else{
_86+=",b:"+(this.storedLocation?this.storedLocation.bottom:this.element.getStyle("bottom"));
}
_86+=","+(this.storedLocation?this.storedLocation.width:this.width);
_86+=","+(this.storedLocation?this.storedLocation.height:this.height);
_86+=","+this.isMinimized();
_86+=","+this.isMaximized();
WindowUtilities.setCookie(_86,this.cookie);
}
},_createWiredElement:function(){
if(!this.wiredElement){
if(Prototype.Browser.IE){
this._getWindowBorderSize();
}
var div=document.createElement("div");
div.className="wired_frame "+this.options.className+"_wired_frame";
div.style.position="absolute";
this.options.parent.insertBefore(div,this.options.parent.firstChild);
this.wiredElement=$(div);
}
if(this.useLeft){
this.wiredElement.setStyle({left:this.element.getStyle("left")});
}else{
this.wiredElement.setStyle({right:this.element.getStyle("right")});
}
if(this.useTop){
this.wiredElement.setStyle({top:this.element.getStyle("top")});
}else{
this.wiredElement.setStyle({bottom:this.element.getStyle("bottom")});
}
var dim=this.element.getDimensions();
this.wiredElement.setStyle({width:dim.width+"px",height:dim.height+"px"});
this.wiredElement.setStyle({zIndex:Windows.maxZIndex+30});
return this.wiredElement;
},_hideWiredElement:function(){
if(!this.wiredElement||!this.currentDrag){
return;
}
if(this.currentDrag==this.element){
this.currentDrag=null;
}else{
if(this.useLeft){
this.element.setStyle({left:this.currentDrag.getStyle("left")});
}else{
this.element.setStyle({right:this.currentDrag.getStyle("right")});
}
if(this.useTop){
this.element.setStyle({top:this.currentDrag.getStyle("top")});
}else{
this.element.setStyle({bottom:this.currentDrag.getStyle("bottom")});
}
this.currentDrag.hide();
this.currentDrag=null;
if(this.doResize){
this.setSize(this.width,this.height);
}
}
},_notify:function(_89){
if(this.options[_89]){
this.options[_89](this);
}else{
Windows.notify(_89,this);
}
}};
var Windows={windows:[],modalWindows:[],observers:[],focusedWindow:null,maxZIndex:0,overlayShowEffectOptions:{duration:0.5},overlayHideEffectOptions:{duration:0.5},addObserver:function(_8a){
this.removeObserver(_8a);
this.observers.push(_8a);
},removeObserver:function(_8b){
this.observers=this.observers.reject(function(o){
return o==_8b;
});
},notify:function(_8d,win){
this.observers.each(function(o){
if(o[_8d]){
o[_8d](_8d,win);
}
});
},getWindow:function(id){
return this.windows.detect(function(d){
return d.getId()==id;
});
},getFocusedWindow:function(){
return this.focusedWindow;
},updateFocusedWindow:function(){
this.focusedWindow=this.windows.length>=2?this.windows[this.windows.length-2]:null;
},register:function(win){
this.windows.push(win);
},addModalWindow:function(win){
if(this.modalWindows.length==0){
WindowUtilities.disableScreen(win.options.className,"overlay_modal",win.overlayOpacity,win.getId(),win.options.parent);
}else{
if(Window.keepMultiModalWindow){
$("overlay_modal").style.zIndex=Windows.maxZIndex+1;
Windows.maxZIndex+=1;
WindowUtilities._hideSelect(this.modalWindows.last().getId());
}else{
this.modalWindows.last().element.hide();
}
WindowUtilities._showSelect(win.getId());
}
this.modalWindows.push(win);
},removeModalWindow:function(win){
this.modalWindows.pop();
if(this.modalWindows.length==0){
WindowUtilities.enableScreen();
}else{
if(Window.keepMultiModalWindow){
this.modalWindows.last().toFront();
WindowUtilities._showSelect(this.modalWindows.last().getId());
}else{
this.modalWindows.last().element.show();
}
}
},register:function(win){
this.windows.push(win);
},unregister:function(win){
this.windows=this.windows.reject(function(d){
return d==win;
});
},closeAll:function(){
this.windows.each(function(w){
Windows.close(w.getId());
});
},closeAllModalWindows:function(){
WindowUtilities.enableScreen();
this.modalWindows.each(function(win){
if(win){
win.close();
}
});
},minimize:function(id,_9b){
var win=this.getWindow(id);
if(win&&win.visible){
win.minimize();
}
Event.stop(_9b);
},maximize:function(id,_9e){
var win=this.getWindow(id);
if(win&&win.visible){
win.maximize();
}
Event.stop(_9e);
},close:function(id,_a1){
var win=this.getWindow(id);
if(win){
win.close();
}
if(_a1){
Event.stop(_a1);
}
},blur:function(id){
var win=this.getWindow(id);
if(!win){
return;
}
if(win.options.blurClassName){
win.changeClassName(win.options.blurClassName);
}
if(this.focusedWindow==win){
this.focusedWindow=null;
}
win._notify("onBlur");
},focus:function(id){
var win=this.getWindow(id);
if(!win){
return;
}
if(this.focusedWindow){
this.blur(this.focusedWindow.getId());
}
if(win.options.focusClassName){
win.changeClassName(win.options.focusClassName);
}
this.focusedWindow=win;
win._notify("onFocus");
},unsetOverflow:function(_a7){
this.windows.each(function(d){
d.oldOverflow=d.getContent().getStyle("overflow")||"auto";
d.getContent().setStyle({overflow:"hidden"});
});
if(_a7&&_a7.oldOverflow){
_a7.getContent().setStyle({overflow:_a7.oldOverflow});
}
},resetOverflow:function(){
this.windows.each(function(d){
if(d.oldOverflow){
d.getContent().setStyle({overflow:d.oldOverflow});
}
});
},updateZindex:function(_aa,win){
if(_aa>this.maxZIndex){
this.maxZIndex=_aa;
if(this.focusedWindow){
this.blur(this.focusedWindow.getId());
}
}
this.focusedWindow=win;
if(this.focusedWindow){
this.focus(this.focusedWindow.getId());
}
}};
var Dialog={dialogId:null,onCompleteFunc:null,callFunc:null,parameters:null,confirm:function(_ac,_ad){
if(_ac&&typeof _ac!="string"){
Dialog._runAjaxRequest(_ac,_ad,Dialog.confirm);
return;
}
_ac=_ac||"";
_ad=_ad||{};
var _ae=_ad.okLabel?_ad.okLabel:"Ok";
var _af=_ad.cancelLabel?_ad.cancelLabel:"Cancel";
_ad=Object.extend(_ad,_ad.windowParameters||{});
_ad.windowParameters=_ad.windowParameters||{};
_ad.className=_ad.className||"alert";
var _b0="class ='"+(_ad.buttonClass?_ad.buttonClass+" ":"")+" ok_button'";
var _b1="class ='"+(_ad.buttonClass?_ad.buttonClass+" ":"")+" cancel_button'";
var _ac="      <div class='"+_ad.className+"_message'>"+_ac+"</div>        <div class='"+_ad.className+"_buttons'>          <input type='button' value='"+_ae+"' onclick='Dialog.okCallback()' "+_b0+"/>          <input type='button' value='"+_af+"' onclick='Dialog.cancelCallback()' "+_b1+"/>        </div>    ";
return this._openDialog(_ac,_ad);
},alert:function(_b2,_b3){
if(_b2&&typeof _b2!="string"){
Dialog._runAjaxRequest(_b2,_b3,Dialog.alert);
return;
}
_b2=_b2||"";
_b3=_b3||{};
var _b4=_b3.okLabel?_b3.okLabel:"Ok";
_b3=Object.extend(_b3,_b3.windowParameters||{});
_b3.windowParameters=_b3.windowParameters||{};
_b3.className=_b3.className||"alert";
var _b5="class ='"+(_b3.buttonClass?_b3.buttonClass+" ":"")+" ok_button'";
var _b2="      <div class='"+_b3.className+"_message'>"+_b2+"</div>        <div class='"+_b3.className+"_buttons'>          <input type='button' value='"+_b4+"' onclick='Dialog.okCallback()' "+_b5+"/>        </div>";
return this._openDialog(_b2,_b3);
},info:function(_b6,_b7){
if(_b6&&typeof _b6!="string"){
Dialog._runAjaxRequest(_b6,_b7,Dialog.info);
return;
}
_b6=_b6||"";
_b7=_b7||{};
_b7=Object.extend(_b7,_b7.windowParameters||{});
_b7.windowParameters=_b7.windowParameters||{};
_b7.className=_b7.className||"alert";
var _b6="<div id='modal_dialog_message' class='"+_b7.className+"_message'>"+_b6+"</div>";
if(_b7.showProgress){
_b6+="<div id='modal_dialog_progress' class='"+_b7.className+"_progress'>  </div>";
}
_b7.ok=null;
_b7.cancel=null;
return this._openDialog(_b6,_b7);
},setInfoMessage:function(_b8){
$("modal_dialog_message").update(_b8);
},closeInfo:function(){
Windows.close(this.dialogId);
},_openDialog:function(_b9,_ba){
var _bb=_ba.className;
if(!_ba.height&&!_ba.width){
_ba.width=WindowUtilities.getPageSize(_ba.options.parent||document.body).pageWidth/2;
}
if(_ba.id){
this.dialogId=_ba.id;
}else{
var t=new Date();
this.dialogId="modal_dialog_"+t.getTime();
_ba.id=this.dialogId;
}
if(!_ba.height||!_ba.width){
var _bd=WindowUtilities._computeSize(_b9,this.dialogId,_ba.width,_ba.height,5,_bb);
if(_ba.height){
_ba.width=_bd+5;
}else{
_ba.height=_bd+5;
}
}
_ba.effectOptions=_ba.effectOptions;
_ba.resizable=_ba.resizable||false;
_ba.minimizable=_ba.minimizable||false;
_ba.maximizable=_ba.maximizable||false;
_ba.draggable=_ba.draggable||false;
_ba.closable=_ba.closable||false;
var win=new Window(_ba);
win.getContent().innerHTML=_b9;
win.showCenter(true,_ba.top,_ba.left);
win.setDestroyOnClose();
win.cancelCallback=_ba.onCancel||_ba.cancel;
win.okCallback=_ba.onOk||_ba.ok;
return win;
},_getAjaxContent:function(_bf){
Dialog.callFunc(_bf.responseText,Dialog.parameters);
},_runAjaxRequest:function(_c0,_c1,_c2){
if(_c0.options==null){
_c0.options={};
}
Dialog.onCompleteFunc=_c0.options.onComplete;
Dialog.parameters=_c1;
Dialog.callFunc=_c2;
_c0.options.onComplete=Dialog._getAjaxContent;
new Ajax.Request(_c0.url,_c0.options);
},okCallback:function(){
var win=Windows.focusedWindow;
if(!win.okCallback||win.okCallback(win)){
$$("#"+win.getId()+" input").each(function(_c4){
_c4.onclick=null;
});
win.close();
}
},cancelCallback:function(){
var win=Windows.focusedWindow;
$$("#"+win.getId()+" input").each(function(_c6){
_c6.onclick=null;
});
win.close();
if(win.cancelCallback){
win.cancelCallback(win);
}
}};
if(Prototype.Browser.WebKit){
var array=navigator.userAgent.match(new RegExp(/AppleWebKit\/([\d\.\+]*)/));
Prototype.Browser.WebKitVersion=parseFloat(array[1]);
}
var WindowUtilities={getWindowScroll:function(_c7){
var T,L,W,H;
_c7=_c7||document.body;
if(_c7!=document.body){
T=_c7.scrollTop;
L=_c7.scrollLeft;
W=_c7.scrollWidth;
H=_c7.scrollHeight;
}else{
var w=window;
with(w.document){
if(w.document.documentElement&&documentElement.scrollTop){
T=documentElement.scrollTop;
L=documentElement.scrollLeft;
}else{
if(w.document.body){
T=body.scrollTop;
L=body.scrollLeft;
}
}
if(w.innerWidth){
W=w.innerWidth;
H=w.innerHeight;
}else{
if(w.document.documentElement&&documentElement.clientWidth){
W=documentElement.clientWidth;
H=documentElement.clientHeight;
}else{
W=body.offsetWidth;
H=body.offsetHeight;
}
}
}
}
return {top:T,left:L,width:W,height:H};
},getPageSize:function(_cd){
_cd=_cd||document.body;
var _ce,_cf;
var _d0,_d1;
if(_cd!=document.body){
_ce=_cd.getWidth();
_cf=_cd.getHeight();
_d1=_cd.scrollWidth;
_d0=_cd.scrollHeight;
}else{
var _d2,_d3;
if(window.innerHeight&&window.scrollMaxY){
_d2=document.body.scrollWidth;
_d3=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_d2=document.body.scrollWidth;
_d3=document.body.scrollHeight;
}else{
_d2=document.body.offsetWidth;
_d3=document.body.offsetHeight;
}
}
if(self.innerHeight){
_ce=self.innerWidth;
_cf=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_ce=document.documentElement.clientWidth;
_cf=document.documentElement.clientHeight;
}else{
if(document.body){
_ce=document.body.clientWidth;
_cf=document.body.clientHeight;
}
}
}
if(_d3<_cf){
_d0=_cf;
}else{
_d0=_d3;
}
if(_d2<_ce){
_d1=_ce;
}else{
_d1=_d2;
}
}
return {pageWidth:_d1,pageHeight:_d0,windowWidth:_ce,windowHeight:_cf};
},disableScreen:function(_d4,_d5,_d6,_d7,_d8){
WindowUtilities.initLightbox(_d5,_d4,function(){
this._disableScreen(_d4,_d5,_d6,_d7);
}.bind(this),_d8||document.body);
},_disableScreen:function(_d9,_da,_db,_dc){
var _dd=$(_da);
var _de=WindowUtilities.getPageSize(_dd.parentNode);
if(_dc&&Prototype.Browser.IE){
WindowUtilities._hideSelect();
WindowUtilities._showSelect(_dc);
}
_dd.style.height=(_de.pageHeight+"px");
_dd.style.display="none";
if(_da=="overlay_modal"&&Window.hasEffectLib&&Windows.overlayShowEffectOptions){
_dd.overlayOpacity=_db;
new Effect.Appear(_dd,Object.extend({from:0,to:_db},Windows.overlayShowEffectOptions));
}else{
_dd.style.display="block";
}
},enableScreen:function(id){
id=id||"overlay_modal";
var _e0=$(id);
if(_e0){
if(id=="overlay_modal"&&Window.hasEffectLib&&Windows.overlayHideEffectOptions){
new Effect.Fade(_e0,Object.extend({from:_e0.overlayOpacity,to:0},Windows.overlayHideEffectOptions));
}else{
_e0.style.display="none";
_e0.parentNode.removeChild(_e0);
}
if(id!="__invisible__"){
WindowUtilities._showSelect();
}
}
},_hideSelect:function(id){
if(Prototype.Browser.IE){
id=id==null?"":"#"+id+" ";
$$(id+"select").each(function(_e2){
if(!WindowUtilities.isDefined(_e2.oldVisibility)){
_e2.oldVisibility=_e2.style.visibility?_e2.style.visibility:"visible";
_e2.style.visibility="hidden";
}
});
}
},_showSelect:function(id){
if(Prototype.Browser.IE){
id=id==null?"":"#"+id+" ";
$$(id+"select").each(function(_e4){
if(WindowUtilities.isDefined(_e4.oldVisibility)){
try{
_e4.style.visibility=_e4.oldVisibility;
}
catch(e){
_e4.style.visibility="visible";
}
_e4.oldVisibility=null;
}else{
if(_e4.style.visibility){
_e4.style.visibility="visible";
}
}
});
}
},isDefined:function(_e5){
return typeof (_e5)!="undefined"&&_e5!=null;
},initLightbox:function(id,_e7,_e8,_e9){
if($(id)){
Element.setStyle(id,{zIndex:Windows.maxZIndex+1});
Windows.maxZIndex++;
_e8();
}else{
var _ea=document.createElement("div");
_ea.setAttribute("id",id);
_ea.className="overlay_"+_e7;
_ea.style.display="none";
_ea.style.position="absolute";
_ea.style.top="0";
_ea.style.left="0";
_ea.style.zIndex=Windows.maxZIndex+1;
Windows.maxZIndex++;
_ea.style.width="100%";
_e9.insertBefore(_ea,_e9.firstChild);
if(Prototype.Browser.WebKit&&id=="overlay_modal"){
setTimeout(function(){
_e8();
},10);
}else{
_e8();
}
}
},setCookie:function(_eb,_ec){
document.cookie=_ec[0]+"="+escape(_eb)+((_ec[1])?"; expires="+_ec[1].toGMTString():"")+((_ec[2])?"; path="+_ec[2]:"")+((_ec[3])?"; domain="+_ec[3]:"")+((_ec[4])?"; secure":"");
},getCookie:function(_ed){
var dc=document.cookie;
var _ef=_ed+"=";
var _f0=dc.indexOf("; "+_ef);
if(_f0==-1){
_f0=dc.indexOf(_ef);
if(_f0!=0){
return null;
}
}else{
_f0+=2;
}
var end=document.cookie.indexOf(";",_f0);
if(end==-1){
end=dc.length;
}
return unescape(dc.substring(_f0+_ef.length,end));
},_computeSize:function(_f2,id,_f4,_f5,_f6,_f7){
var _f8=document.body;
var _f9=document.createElement("div");
_f9.setAttribute("id",id);
_f9.className=_f7+"_content";
if(_f5){
_f9.style.height=_f5+"px";
}else{
_f9.style.width=_f4+"px";
}
_f9.style.position="absolute";
_f9.style.top="0";
_f9.style.left="0";
_f9.style.display="none";
_f9.innerHTML=_f2;
_f8.insertBefore(_f9,_f8.firstChild);
var _fa;
if(_f5){
_fa=$(_f9).getDimensions().width+_f6;
}else{
_fa=$(_f9).getDimensions().height+_f6;
}
_f8.removeChild(_f9);
return _fa;
}};
var BrowserDetect={init:function(){
this.browser=this.searchString(this.dataBrowser)||"An unknown browser";
this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";
this.OS=this.searchString(this.dataOS)||"an unknown OS";
},searchString:function(_fb){
for(var i=0;i<_fb.length;i++){
var _fd=_fb[i].string;
var _fe=_fb[i].prop;
this.versionSearchString=_fb[i].versionSearch||_fb[i].identity;
if(_fd){
if(_fd.indexOf(_fb[i].subString)!=-1){
return _fb[i].identity;
}
}else{
if(_fe){
return _fb[i].identity;
}
}
}
},searchVersion:function(_ff){
var _100=_ff.indexOf(this.versionSearchString);
if(_100==-1){
return;
}
return parseFloat(_ff.substring(_100+this.versionSearchString.length+1));
},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};
BrowserDetect.init();
Object.extend(Event,{_domReady:function(){
if(arguments.callee.done){
return;
}
arguments.callee.done=true;
if(Event._timer){
clearInterval(Event._timer);
}
Event._readyCallbacks.each(function(f){
try{
f();
}
catch(e){
}
});
Event._readyCallbacks=null;
Event._lateCallbacks.each(function(f){
try{
f();
}
catch(e){
}
});
Event._lateCallbacks=null;
},onReady:function(f,_104){
if(!this._readyCallbacks){
var _105=this._domReady;
if(_105.done){
return f();
}
if(document.addEventListener){
document.addEventListener("DOMContentLoaded",_105,false);
}
if(/WebKit/i.test(navigator.userAgent)){
this._timer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
_105();
}
},10);
}
Event.observe(window,"load",_105);
Event._readyCallbacks=[];
Event._lateCallbacks=[];
}
if(typeof _104=="undefined"){
Event._readyCallbacks.push(f);
}else{
Event._lateCallbacks.push(f);
}
}});
Object.extend(Event,{observe:function(el,type,func){
el=$(el);
if(!func.$$guid){
func.$$guid=Event._guid++;
}
if(!el.events){
el.events={};
}
var _109=el.events[type];
if(!_109){
_109=el.events[type]={};
if(el["on"+type]){
_109[0]=el["on"+type];
}
}
_109[func.$$guid]=func;
el["on"+type]=Event._handleEvent;
if(!Event.observers){
Event.observers=[];
}
Event.observers.push([el,type,func,false]);
},stopObserving:function(el,type,func){
if(el.events&&el.events[type]){
delete el.events[type][func.$$guid];
}
},_handleEvent:function(e){
var _10e=true;
e=e||Event._fixEvent(window.event);
var _10f=this.events[e.type],el=$(this);
for(var i in _10f){
el.$$handleEvent=_10f[i];
if(el.$$handleEvent(e)===false){
_10e=false;
}
}
return _10e;
},_fixEvent:function(e){
e.preventDefault=Event._preventDefault;
e.stopPropagation=Event._stopPropagation;
return e;
},_preventDefault:function(){
this.returnValue=false;
},_stopPropagation:function(){
this.cancelBubble=true;
},_guid:1});
Object.extend(Event,{trigger:function(_113,_114,_115){
_113=$(_113);
_115=_115||{type:_114};
this.observers.each(function(_116){
if(_116[0]==_113&&_116[1]==_114){
_116[2].call(_113,_115);
}
});
}});
Object.extend(Ajax.Request.prototype,{evalJSON:function(){
try{
var json=this.transport.responseText;
return json?eval("("+json+")"):null;
}
catch(e){
return null;
}
},notifyEndUser:function(){
if(this.transport.statusText!="NO_RATE_INFO"){
alert("Request to Server failed - Please retry later.");
}
},respondToReadyState:function(_118){
var _119=Ajax.Request.Events[_118];
var _11a=this.transport,json;
if(_119=="Complete"){
try{
if((this.getHeader("Content-type")||"text/javascript").strip().match(/^(text|application)\/(x-)?json(;.*)?$/i)){
json=this.evalJSON();
}
this._complete=true;
(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(_11a,json);
}
catch(e){
this.notifyEndUser();
this.dispatchException(e);
}
if((this.getHeader("Content-type")||"text/javascript").strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){
this.evalResponse();
}
}
try{
(this.options["on"+_119]||Prototype.emptyFunction)(_11a,json);
Ajax.Responders.dispatch("on"+_119,this,_11a,json);
}
catch(e){
this.notifyEndUser();
this.dispatchException(e);
}
if(_119=="Complete"){
this.transport.onreadystatechange=Prototype.emptyFunction;
}
}});
var Advice=Class.create();
Advice.prototype={initialize:function(_11c,_11d,_11e){
this.advised=_11c;
this.result=null;
if(typeof _11d!="undefined"){
this.before=_11d;
}
if(typeof _11e!="undefined"){
this.after=_11e;
}
},call:function(_11f,_120){
this.before(_11f,_120);
this.result=this.advised(_11f,_120);
this.after(_11f,_120);
},before:function(el,_122){
},after:function(){
}};
var AjaxAdvice=Class.create();
AjaxAdvice.prototype={initialize:function(url,_124,_125,_126,_127){
this.advised=_125;
this.url=url;
this.parameters=_124==null?"":_124;
if(typeof _126!="undefined"){
this.before=_126;
}
if(typeof _127!="undefined"){
this.after=_127;
}
},call:function(_128,_129){
this.before(_128,_129);
if(typeof this.url!="undefined"){
new Ajax.Request(this.url,{onSuccess:this.advised,onComplete:this.after,onFailure:this.failure,parameters:this.parameters,method:"post"});
}
},before:function(_12a,_12b){
},after:function(){
},failure:function(_12c,_12d){
alert("Backend Request Failed - Please retry in a few minutes.");
}};
var JSONAdvice=Class.create();
JSONAdvice.prototype={initialize:function(url,_12f,_130,_131,_132,_133){
this.advised=_130;
this.url=url;
this.parameters=_12f==null?"":_12f;
if(typeof _131!="undefined"){
this.before=_131;
}
if(typeof _132!="undefined"){
this.after=_132;
}
if(typeof _133!="undefined"){
this.failure=_133;
}
},call:function(_134,_135){
this.before(_134,_135);
if(typeof this.url!="undefined"){
new Ajax.Request(this.url,{onSuccess:this.advised,onComplete:this.after,onFailure:this.failure,parameters:this.parameters,method:"post"});
}
},before:function(_136,_137){
},after:function(){
},failure:function(_138,_139){
alert("Backend Request Failed - Please retry in a few minutes.");
}};
function evt_ModelChanged(_13a,_13b){
Event.trigger("header_block",_13a,_13b);
}
function evt_regForModelChanges(_13c,func){
Event.observe("header_block",_13c,func);
}
function evt_getModel(){
return _globalModel;
}
function evt_changeModel(_13e,tree){
_globalModel[_13e]=tree;
evt_ModelChanged(_13e);
}
function redrawScreen(_140,_141){
if(typeof _141=="undefined"){
if(_140==BrowserDetect.browser){
if(_140!="Safari"){
window.resizeBy(-10,-10);
window.resizeBy(+10,+10);
}else{
window.resizeBy(-1,-1);
window.resizeBy(+1,+1);
}
}
}else{
if(_140==BrowserDetect.browser&&BrowserDetect.version==_141){
if(_140!="Safari"){
window.resizeBy(-10,-10);
window.resizeBy(+10,+10);
}else{
window.resizeBy(-1,-1);
window.resizeBy(+1,+1);
}
}
}
}
function redrawScreenAfterEffect(){
redrawScreen("Safari");
}
function showHideArea(_142,_143,_144){
var id=$(_144);
var _146=$(_142);
var _147=$(_143);
if(_146){
Element.toggle(_146);
}
if(_147){
Element.toggle(_147);
}
if(id.style.display=="none"){
Effect.Appear(id,{afterFinish:redrawScreenAfterEffect});
}else{
Effect.Fade(id,{afterFinish:redrawScreenAfterEffect});
}
}
function showThawteLogo(){
$$("#header_flash_object","#header_flash_img").invoke("toggle");
thawteLogoWin=new Window({className:"alphacube",maximizable:false,minimizable:false,closable:true,resizable:false,hideEffect:Element.hide,showEffect:Element.show,minWidth:400,minHeight:100,destroyOnClose:true});
thawteLogoWin.showCenter(true);
var url="../"+evt_getModel().ibfName+"/security/thawte.html";
thawteLogoWin.setURL(url);
thawteLogoWin.toFront();
}
function goToStartPage(){
var _149=window.location.href+"&_eventId=page1";
window.location.href=_149;
}
function advised(){
}
function before(){
}
function after(){
}
function failure(){
}
function getUserDecisionAfterRateChange(){
$$("#header_flash_object","#header_flash_img").invoke("toggle");
rateChangedErrorWin=new Window({className:"alphacube",maximizable:false,minimizable:false,closable:false,resizable:false,hideEffect:Element.hide,showEffect:Element.show,minWidth:300,height:80,destroyOnClose:true});
rateChangedErrorWin.setContent("rateChangedError",false,true);
rateChangedErrorWin.showCenter(true);
rateChangedErrorWin.toFront();
}
function bookAfterRateChangeError(_14a){
var h=new Hash();
h["_flowExecutionKey"]=_14a;
addie=new AjaxAdvice("bookAfterRateChangeError.ajax",h,resubmitChangedReservation,before,after);
addie.call();
}
function resubmitChangedReservation(){
submitData();
}
function removeFromCart(_14c,_14d){
var h=new Hash();
h["_flowExecutionKey"]=_14d;
h["reservationIdsToHotelCodes"]=_14c;
addie=new AjaxAdvice("removeFromCart.ajax",h,goToPage2,before,after);
addie.call();
}
function goToPage2(){
var _14f=window.location.href+"&_eventId=page2";
window.location.href=_14f;
}
function setChildHeightByHighest(id){
var el=$(id);
var _152=el.getElementsByTagName("div");
var _153;
var _154=0;
for(var i=0;i<_152.length;i++){
_153=$(_152[i]).getStyle("height");
_153=_153.substring(0,2);
if(_153>_154){
_154=_153;
}
}
_154=_154+"px";
for(var i=0;i<_152.length;i++){
$(_152[i]).setStyle({height:_154});
}
}
var _globalModel={};
var CALENDAR="calendar";
var COUNTRY="country";
Event.fireEvent=function(_156,_157){
if(document.createEvent){
var evt=document.createEvent("Events");
evt.initEvent(_156,true,true);
$(_157).dispatchEvent(evt);
}else{
if(document.createEventObject){
var evt=document.createEventObject();
$(_157).fireEvent("on"+_156,evt);
}
}
};
function trim(_159){
while(_159.substring(0,1)==" "){
_159=_159.substring(1,_159.length);
}
while(_159.substring(_159.length-1,_159.length)==" "){
_159=_159.substring(0,_159.length-1);
}
return _159;
}
var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");
function LZ(x){
return (x<0||x>9?"":"0")+x;
}
function isDate(val,_15c){
var date=getDateFromFormat(val,_15c);
if(date==0){
return false;
}
return true;
}
function compareDates(_15e,_15f,_160,_161){
var d1=getDateFromFormat(_15e,_15f);
var d2=getDateFromFormat(_160,_161);
if(d1==0||d2==0){
return -1;
}else{
if(d1>d2){
return 1;
}
}
return 0;
}
function formatDate(date,_165){
_165=_165+"";
var _166="";
var _167=0;
var c="";
var _169="";
var y=date.getYear()+"";
var M=date.getMonth()+1;
var d=date.getDate();
var E=date.getDay();
var H=date.getHours();
var m=date.getMinutes();
var s=date.getSeconds();
var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;
var _180=new Object();
if(y.length<4){
y=""+(y-0+1900);
}
_180["y"]=""+y;
_180["yyyy"]=y;
_180["yy"]=y.substring(2,4);
_180["M"]=M;
_180["MM"]=LZ(M);
_180["MMM"]=MONTH_NAMES[M-1];
_180["NNN"]=MONTH_NAMES[M+11];
_180["d"]=d;
_180["dd"]=LZ(d);
_180["E"]=DAY_NAMES[E+7];
_180["EE"]=DAY_NAMES[E];
_180["H"]=H;
_180["HH"]=LZ(H);
if(H==0){
_180["h"]=12;
}else{
if(H>12){
_180["h"]=H-12;
}else{
_180["h"]=H;
}
}
_180["hh"]=LZ(_180["h"]);
if(H>11){
_180["K"]=H-12;
}else{
_180["K"]=H;
}
_180["k"]=H+1;
_180["KK"]=LZ(_180["K"]);
_180["kk"]=LZ(_180["k"]);
if(H>11){
_180["a"]="PM";
}else{
_180["a"]="AM";
}
_180["m"]=m;
_180["mm"]=LZ(m);
_180["s"]=s;
_180["ss"]=LZ(s);
while(_167<_165.length){
c=_165.charAt(_167);
_169="";
while((_165.charAt(_167)==c)&&(_167<_165.length)){
_169+=_165.charAt(_167++);
}
if(_180[_169]!=null){
_166=_166+_180[_169];
}else{
_166=_166+_169;
}
}
return _166;
}
function _isInteger(val){
var _182="1234567890";
for(var i=0;i<val.length;i++){
if(_182.indexOf(val.charAt(i))==-1){
return false;
}
}
return true;
}
function _getInt(str,i,_186,_187){
for(var x=_187;x>=_186;x--){
var _189=str.substring(i,i+x);
if(_189.length<_186){
return null;
}
if(_isInteger(_189)){
return _189;
}
}
return null;
}
function getDateFromFormat(val,_18b){
val=val+"";
_18b=_18b+"";
var _18c=0;
var _18d=0;
var c="";
var _18f="";
var _190="";
var x,y;
var now=new Date();
var year=now.getYear();
var _195=now.getMonth()+1;
var date=1;
var hh=now.getHours();
var mm=now.getMinutes();
var ss=now.getSeconds();
var ampm="";
while(_18d<_18b.length){
c=_18b.charAt(_18d);
_18f="";
while((_18b.charAt(_18d)==c)&&(_18d<_18b.length)){
_18f+=_18b.charAt(_18d++);
}
if(_18f=="yyyy"||_18f=="yy"||_18f=="y"){
if(_18f=="yyyy"){
x=4;
y=4;
}
if(_18f=="yy"){
x=2;
y=2;
}
if(_18f=="y"){
x=2;
y=4;
}
year=_getInt(val,_18c,x,y);
if(year==null){
return 0;
}
_18c+=year.length;
if(year.length==2){
if(year>70){
year=1900+(year-0);
}else{
year=2000+(year-0);
}
}
}else{
if(_18f=="MMM"||_18f=="NNN"){
_195=0;
for(var i=0;i<MONTH_NAMES.length;i++){
var _19c=MONTH_NAMES[i];
if(val.substring(_18c,_18c+_19c.length).toLowerCase()==_19c.toLowerCase()){
if(_18f=="MMM"||(_18f=="NNN"&&i>11)){
_195=i+1;
if(_195>12){
_195-=12;
}
_18c+=_19c.length;
break;
}
}
}
if((_195<1)||(_195>12)){
return 0;
}
}else{
if(_18f=="EE"||_18f=="E"){
for(var i=0;i<DAY_NAMES.length;i++){
var _19d=DAY_NAMES[i];
if(val.substring(_18c,_18c+_19d.length).toLowerCase()==_19d.toLowerCase()){
_18c+=_19d.length;
break;
}
}
}else{
if(_18f=="MM"||_18f=="M"){
_195=_getInt(val,_18c,_18f.length,2);
if(_195==null||(_195<1)||(_195>12)){
return 0;
}
_18c+=_195.length;
}else{
if(_18f=="dd"||_18f=="d"){
date=_getInt(val,_18c,_18f.length,2);
if(date==null||(date<1)||(date>31)){
return 0;
}
_18c+=date.length;
}else{
if(_18f=="hh"||_18f=="h"){
hh=_getInt(val,_18c,_18f.length,2);
if(hh==null||(hh<1)||(hh>12)){
return 0;
}
_18c+=hh.length;
}else{
if(_18f=="HH"||_18f=="H"){
hh=_getInt(val,_18c,_18f.length,2);
if(hh==null||(hh<0)||(hh>23)){
return 0;
}
_18c+=hh.length;
}else{
if(_18f=="KK"||_18f=="K"){
hh=_getInt(val,_18c,_18f.length,2);
if(hh==null||(hh<0)||(hh>11)){
return 0;
}
_18c+=hh.length;
}else{
if(_18f=="kk"||_18f=="k"){
hh=_getInt(val,_18c,_18f.length,2);
if(hh==null||(hh<1)||(hh>24)){
return 0;
}
_18c+=hh.length;
hh--;
}else{
if(_18f=="mm"||_18f=="m"){
mm=_getInt(val,_18c,_18f.length,2);
if(mm==null||(mm<0)||(mm>59)){
return 0;
}
_18c+=mm.length;
}else{
if(_18f=="ss"||_18f=="s"){
ss=_getInt(val,_18c,_18f.length,2);
if(ss==null||(ss<0)||(ss>59)){
return 0;
}
_18c+=ss.length;
}else{
if(_18f=="a"){
if(val.substring(_18c,_18c+2).toLowerCase()=="am"){
ampm="AM";
}else{
if(val.substring(_18c,_18c+2).toLowerCase()=="pm"){
ampm="PM";
}else{
return 0;
}
}
_18c+=2;
}else{
if(val.substring(_18c,_18c+_18f.length)!=_18f){
return 0;
}else{
_18c+=_18f.length;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if(_18c!=val.length){
return 0;
}
if(_195==2){
if(((year%4==0)&&(year%100!=0))||(year%400==0)){
if(date>29){
return 0;
}
}else{
if(date>28){
return 0;
}
}
}
if((_195==4)||(_195==6)||(_195==9)||(_195==11)){
if(date>30){
return 0;
}
}
if(hh<12&&ampm=="PM"){
hh=hh-0+12;
}else{
if(hh>11&&ampm=="AM"){
hh-=12;
}
}
var _19e=new Date(year,_195-1,date,hh,mm,ss);
return _19e.getTime();
}
function parseDate(val){
var _1a0=(arguments.length==2)?arguments[1]:false;
generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");
monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");
dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");
var _1a1=new Array("generalFormats",_1a0?"dateFirst":"monthFirst",_1a0?"monthFirst":"dateFirst");
var d=null;
for(var i=0;i<_1a1.length;i++){
var l=window[_1a1[i]];
for(var j=0;j<l.length;j++){
d=getDateFromFormat(val,l[j]);
if(d!=0){
return new Date(d);
}
}
}
return null;
}
function mapDaysToNumbers(_1a6){
var _1a7=0;
if(_1a6=="Mon"){
_1a7=1;
}else{
if(_1a6=="Tue"){
_1a7=2;
}else{
if(_1a6=="Wed"){
_1a7=3;
}else{
if(_1a6=="Thu"){
_1a7=4;
}else{
if(_1a6=="Fri"){
_1a7=5;
}else{
if(_1a6=="Sat"){
_1a7=6;
}
}
}
}
}
}
return _1a7;
}
Effect.ResizeWindow=Class.create();
Object.extend(Object.extend(Effect.ResizeWindow.prototype,Effect.Base.prototype),{initialize:function(win,top,left,_1ab,_1ac){
this.window=win;
this.window.resizing=true;
var size=win.getSize();
this.initWidth=parseFloat(size.width);
this.initHeight=parseFloat(size.height);
var _1ae=win.getLocation();
this.initTop=parseFloat(_1ae.top);
this.initLeft=parseFloat(_1ae.left);
this.width=_1ab!=null?parseFloat(_1ab):this.initWidth;
this.height=_1ac!=null?parseFloat(_1ac):this.initHeight;
this.top=top!=null?parseFloat(top):this.initTop;
this.left=left!=null?parseFloat(left):this.initLeft;
this.dx=this.left-this.initLeft;
this.dy=this.top-this.initTop;
this.dw=this.width-this.initWidth;
this.dh=this.height-this.initHeight;
this.r2=$(this.window.getId()+"_row2");
this.content=$(this.window.getId()+"_content");
this.contentOverflow=this.content.getStyle("overflow")||"auto";
this.content.setStyle({overflow:"hidden"});
if(this.window.options.wiredDrag){
this.window.currentDrag=win._createWiredElement();
this.window.currentDrag.show();
this.window.element.hide();
}
this.start(arguments[5]);
},update:function(_1af){
var _1b0=Math.floor(this.initWidth+this.dw*_1af);
var _1b1=Math.floor(this.initHeight+this.dh*_1af);
var top=Math.floor(this.initTop+this.dy*_1af);
var left=Math.floor(this.initLeft+this.dx*_1af);
if(window.ie){
if(Math.floor(_1b1)==0){
this.r2.hide();
}else{
if(Math.floor(_1b1)>1){
this.r2.show();
}
}
}
this.r2.setStyle({height:_1b1});
this.window.setSize(_1b0,_1b1);
this.window.setLocation(top,left);
},finish:function(_1b4){
if(this.window.options.wiredDrag){
this.window._hideWiredElement();
this.window.element.show();
}
this.window.setSize(this.width,this.height);
this.window.setLocation(this.top,this.left);
this.r2.setStyle({height:null});
this.content.setStyle({overflow:this.contentOverflow});
this.window.resizing=false;
}});
Effect.ModalSlideDown=function(_1b5){
var _1b6=WindowUtilities.getWindowScroll();
var _1b7=_1b5.getStyle("height");
_1b5.setStyle({top:-(parseFloat(_1b7)-_1b6.top)+"px"});
_1b5.show();
return new Effect.Move(_1b5,Object.extend({x:0,y:parseFloat(_1b7)},arguments[1]||{}));
};
Effect.ModalSlideUp=function(_1b8){
var _1b9=_1b8.getStyle("height");
return new Effect.Move(_1b8,Object.extend({x:0,y:-parseFloat(_1b9)},arguments[1]||{}));
};
var MaxHeight=200;
var ThumbnailWidth="100px";
var ThumbnailHeight="75px";
var zoomcount=0;
var originalDimension=new Hash();
var originalWidth;
var originalHeight;
var originalSrc;
function zoomhelper(_1ba,_1bb,_1bc,_1bd){
var _1be=0;
var _1bf=0;
for(var _1c0=_1bc;_1c0>0.01;_1c0=_1c0-0.01){
_1be=_1bd.getWidth()*_1c0;
_1bf=_1bd.getHeight()*_1c0;
if(_1bf<=MaxHeight){
break;
}
}
if(_1bb=="upperRight"){
var left=(-1)*(_1be-_1ba.getWidth());
_1ba.style.left=left+"px";
}
_1ba.style.width=_1be+"px";
_1ba.style.height=_1bf+"px";
_1ba.src=_1bd.src;
}
function zoom(el,_1c3,_1c4,_1c5){
if(!document.all&&!document.getElementById){
return;
}
var _1c6=$(el);
var _1c7=$(el+"_big");
if(_1c6.getWidth()==""){
return;
}
if(zoomcount==0){
var _1c8=_1c6.getWidth();
originalDimension[el]=_1c8;
originalSrc=_1c6.src;
_1c6.setStyle({"z-index":"99"});
}
prefix=(_1c3=="in")?1:-1;
if(_1c3=="restore"){
_1c6.src=originalSrc;
_1c6.style.width=ThumbnailWidth;
_1c6.style.height=ThumbnailHeight;
_1c6.style.left="0px";
originalDimension.remove(el);
_1c6.setStyle({"z-index":"0"});
zoomcount=0;
return;
}else{
zoomcount++;
zoomhelper(_1c6,_1c5,_1c4,_1c7);
}
}
function clearzoom(){
if(window.beginzoom){
clearInterval(beginzoom);
}
}
var css_browser_selector=function(){
var ua=navigator.userAgent.toLowerCase(),is=function(t){
return ua.indexOf(t)!=-1;
},h=document.getElementsByTagName("html")[0],b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?("ie ie"+RegExp.$1):is("gecko/")?"gecko":is("opera/9")?"opera opera9":/opera (\d)/.test(ua)?"opera opera"+RegExp.$1:is("konqueror")?"konqueror":is("applewebkit/")?"webkit safari":is("mozilla/")?"gecko":"",os=(is("x11")||is("linux"))?" linux":is("mac")?" mac":is("win")?" win":"";
var c=b+os+" js";
h.className+=h.className?" "+c:c;
}();
Date.$VERSION=1.02;
Date.LZ=function(x){
return (x<0||x>9?"":"0")+x;
};
Date.monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
Date.monthAbbreviations=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
Date.dayNames=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
Date.dayAbbreviations=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
Date.preferAmericanFormat=true;
if(!Date.prototype.getFullYear){
Date.prototype.getFullYear=function(){
var yy=this.getYear();
return (yy<1900?yy+1900:yy);
};
}
Date.parseString=function(val,_1d3){
if(typeof (_1d3)=="undefined"||_1d3==null||_1d3==""){
var _1d4=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d","MMM-d","d-MMM");
var _1d5=new Array("M/d/y","M-d-y","M.d.y","M/d","M-d");
var _1d6=new Array("d/M/y","d-M-y","d.M.y","d/M","d-M");
var _1d7=new Array(_1d4,Date.preferAmericanFormat?_1d5:_1d6,Date.preferAmericanFormat?_1d6:_1d5);
for(var i=0;i<_1d7.length;i++){
var l=_1d7[i];
for(var j=0;j<l.length;j++){
var d=Date.parseString(val,l[j]);
if(d!=null){
return d;
}
}
}
return null;
}
this.isInteger=function(val){
for(var i=0;i<val.length;i++){
if("1234567890".indexOf(val.charAt(i))==-1){
return false;
}
}
return true;
};
this.getInt=function(str,i,_1e0,_1e1){
for(var x=_1e1;x>=_1e0;x--){
var _1e3=str.substring(i,i+x);
if(_1e3.length<_1e0){
return null;
}
if(this.isInteger(_1e3)){
return _1e3;
}
}
return null;
};
val=val+"";
_1d3=_1d3+"";
var _1e4=0;
var _1e5=0;
var c="";
var _1e7="";
var _1e8="";
var x,y;
var year=new Date().getFullYear();
var _1ec=1;
var date=1;
var hh=0;
var mm=0;
var ss=0;
var ampm="";
while(_1e5<_1d3.length){
c=_1d3.charAt(_1e5);
_1e7="";
while((_1d3.charAt(_1e5)==c)&&(_1e5<_1d3.length)){
_1e7+=_1d3.charAt(_1e5++);
}
if(_1e7=="yyyy"||_1e7=="yy"||_1e7=="y"){
if(_1e7=="yyyy"){
x=4;
y=4;
}
if(_1e7=="yy"){
x=2;
y=2;
}
if(_1e7=="y"){
x=2;
y=4;
}
year=this.getInt(val,_1e4,x,y);
if(year==null){
return null;
}
_1e4+=year.length;
if(year.length==2){
if(year>70){
year=1900+(year-0);
}else{
year=2000+(year-0);
}
}
}else{
if(_1e7=="MMM"||_1e7=="NNN"){
_1ec=0;
var _1f2=(_1e7=="MMM"?(Date.monthNames.concat(Date.monthAbbreviations)):Date.monthAbbreviations);
for(var i=0;i<_1f2.length;i++){
var _1f3=_1f2[i];
if(val.substring(_1e4,_1e4+_1f3.length).toLowerCase()==_1f3.toLowerCase()){
_1ec=(i%12)+1;
_1e4+=_1f3.length;
break;
}
}
if((_1ec<1)||(_1ec>12)){
return null;
}
}else{
if(_1e7=="EE"||_1e7=="E"){
var _1f2=(_1e7=="EE"?Date.dayNames:Date.dayAbbreviations);
for(var i=0;i<_1f2.length;i++){
var _1f4=_1f2[i];
if(val.substring(_1e4,_1e4+_1f4.length).toLowerCase()==_1f4.toLowerCase()){
_1e4+=_1f4.length;
break;
}
}
}else{
if(_1e7=="MM"||_1e7=="M"){
_1ec=this.getInt(val,_1e4,_1e7.length,2);
if(_1ec==null||(_1ec<1)||(_1ec>12)){
return null;
}
_1e4+=_1ec.length;
}else{
if(_1e7=="dd"||_1e7=="d"){
date=this.getInt(val,_1e4,_1e7.length,2);
if(date==null||(date<1)||(date>31)){
return null;
}
_1e4+=date.length;
}else{
if(_1e7=="hh"||_1e7=="h"){
hh=this.getInt(val,_1e4,_1e7.length,2);
if(hh==null||(hh<1)||(hh>12)){
return null;
}
_1e4+=hh.length;
}else{
if(_1e7=="HH"||_1e7=="H"){
hh=this.getInt(val,_1e4,_1e7.length,2);
if(hh==null||(hh<0)||(hh>23)){
return null;
}
_1e4+=hh.length;
}else{
if(_1e7=="KK"||_1e7=="K"){
hh=this.getInt(val,_1e4,_1e7.length,2);
if(hh==null||(hh<0)||(hh>11)){
return null;
}
_1e4+=hh.length;
hh++;
}else{
if(_1e7=="kk"||_1e7=="k"){
hh=this.getInt(val,_1e4,_1e7.length,2);
if(hh==null||(hh<1)||(hh>24)){
return null;
}
_1e4+=hh.length;
hh--;
}else{
if(_1e7=="mm"||_1e7=="m"){
mm=this.getInt(val,_1e4,_1e7.length,2);
if(mm==null||(mm<0)||(mm>59)){
return null;
}
_1e4+=mm.length;
}else{
if(_1e7=="ss"||_1e7=="s"){
ss=this.getInt(val,_1e4,_1e7.length,2);
if(ss==null||(ss<0)||(ss>59)){
return null;
}
_1e4+=ss.length;
}else{
if(_1e7=="a"){
if(val.substring(_1e4,_1e4+2).toLowerCase()=="am"){
ampm="AM";
}else{
if(val.substring(_1e4,_1e4+2).toLowerCase()=="pm"){
ampm="PM";
}else{
return null;
}
}
_1e4+=2;
}else{
if(val.substring(_1e4,_1e4+_1e7.length)!=_1e7){
return null;
}else{
_1e4+=_1e7.length;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if(_1e4!=val.length){
return null;
}
if(_1ec==2){
if(((year%4==0)&&(year%100!=0))||(year%400==0)){
if(date>29){
return null;
}
}else{
if(date>28){
return null;
}
}
}
if((_1ec==4)||(_1ec==6)||(_1ec==9)||(_1ec==11)){
if(date>30){
return null;
}
}
if(hh<12&&ampm=="PM"){
hh=hh-0+12;
}else{
if(hh>11&&ampm=="AM"){
hh-=12;
}
}
return new Date(year,_1ec-1,date,hh,mm,ss);
};
Date.isValid=function(val,_1f6){
return (Date.parseString(val,_1f6)!=null);
};
Date.prototype.isBefore=function(_1f7){
if(_1f7==null){
return false;
}
return (this.getTime()<_1f7.getTime());
};
Date.prototype.isAfter=function(_1f8){
if(_1f8==null){
return false;
}
return (this.getTime()>_1f8.getTime());
};
Date.prototype.equals=function(_1f9){
if(_1f9==null){
return false;
}
return (this.getTime()==_1f9.getTime());
};
Date.prototype.equalsIgnoreTime=function(_1fa){
if(_1fa==null){
return false;
}
var d1=new Date(this.getTime()).clearTime();
var d2=new Date(_1fa.getTime()).clearTime();
return (d1.getTime()==d2.getTime());
};
Date.prototype.format=function(_1fd){
_1fd=_1fd+"";
var _1fe="";
var _1ff=0;
var c="";
var _201="";
var y=this.getYear()+"";
var M=this.getMonth()+1;
var d=this.getDate();
var E=this.getDay();
var H=this.getHours();
var m=this.getMinutes();
var s=this.getSeconds();
var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;
var _218=new Object();
if(y.length<4){
y=""+(+y+1900);
}
_218["y"]=""+y;
_218["yyyy"]=y;
_218["yy"]=y.substring(2,4);
_218["M"]=M;
_218["MM"]=Date.LZ(M);
_218["MMM"]=Date.monthNames[M-1];
_218["NNN"]=Date.monthAbbreviations[M-1];
_218["d"]=d;
_218["dd"]=Date.LZ(d);
_218["E"]=Date.dayAbbreviations[E];
_218["EE"]=Date.dayNames[E];
_218["H"]=H;
_218["HH"]=Date.LZ(H);
if(H==0){
_218["h"]=12;
}else{
if(H>12){
_218["h"]=H-12;
}else{
_218["h"]=H;
}
}
_218["hh"]=Date.LZ(_218["h"]);
_218["K"]=_218["h"]-1;
_218["k"]=_218["H"]+1;
_218["KK"]=Date.LZ(_218["K"]);
_218["kk"]=Date.LZ(_218["k"]);
if(H>11){
_218["a"]="PM";
}else{
_218["a"]="AM";
}
_218["m"]=m;
_218["mm"]=Date.LZ(m);
_218["s"]=s;
_218["ss"]=Date.LZ(s);
while(_1ff<_1fd.length){
c=_1fd.charAt(_1ff);
_201="";
while((_1fd.charAt(_1ff)==c)&&(_1ff<_1fd.length)){
_201+=_1fd.charAt(_1ff++);
}
if(typeof (_218[_201])!="undefined"){
_1fe=_1fe+_218[_201];
}else{
_1fe=_1fe+_201;
}
}
return _1fe;
};
Date.prototype.getDayName=function(){
return Date.dayNames[this.getDay()];
};
Date.prototype.getDayAbbreviation=function(){
return Date.dayAbbreviations[this.getDay()];
};
Date.prototype.getMonthName=function(){
return Date.monthNames[this.getMonth()];
};
Date.prototype.getMonthAbbreviation=function(){
return Date.monthAbbreviations[this.getMonth()];
};
Date.prototype.clearTime=function(){
this.setHours(0);
this.setMinutes(0);
this.setSeconds(0);
this.setMilliseconds(0);
return this;
};
Date.prototype.add=function(_219,_21a){
if(typeof (_219)=="undefined"||_219==null||typeof (_21a)=="undefined"||_21a==null){
return this;
}
_21a=+_21a;
if(_219=="y"){
this.setFullYear(this.getFullYear()+_21a);
}else{
if(_219=="M"){
this.setMonth(this.getMonth()+_21a);
}else{
if(_219=="d"){
this.setDate(this.getDate()+_21a);
}else{
if(_219=="w"){
var step=(_21a>0)?1:-1;
while(_21a!=0){
this.add("d",step);
while(this.getDay()==0||this.getDay()==6){
this.add("d",step);
}
_21a-=step;
}
}else{
if(_219=="h"){
this.setHours(this.getHours()+_21a);
}else{
if(_219=="m"){
this.setMinutes(this.getMinutes()+_21a);
}else{
if(_219=="s"){
this.setSeconds(this.getSeconds()+_21a);
}
}
}
}
}
}
}
return this;
};
WindowStore={doSetCookie:false,cookieName:"__window_store__",expired:null,init:function(_21c,_21d){
WindowStore.cookieName=_21c||WindowStore.cookieName;
if(!_21d){
var _21e=new Date();
_21e.setYear(_21e.getYear()+1903);
WindowStore.expired=_21e;
}else{
WindowStore.expired=_21d;
}
Windows.windows.each(function(win){
win.setCookie(win.getId(),WindowStore.expired);
});
var _220={onShow:function(_221,win){
WindowStore._saveCookie();
},onClose:function(_223,win){
WindowStore._saveCookie();
},onHide:function(_225,win){
WindowStore._saveCookie();
}};
Windows.addObserver(_220);
WindowStore._restoreWindows();
WindowStore._saveCookie();
},show:function(win){
eval("var cookie = "+WindowUtilities.getCookie(WindowStore.cookieName));
if(cookie!=null){
if(cookie[win.getId()]){
win.show();
}
}else{
win.show();
}
},_saveCookie:function(){
if(!doSetCookie){
return;
}
var _228="{";
Windows.windows.each(function(win){
if(_228!="{"){
_228+=",";
}
_228+=win.getId()+": "+win.isVisible();
});
_228+="}";
WindowUtilities.setCookie(_228,[WindowStore.cookieName,WindowStore.expired]);
},_restoreWindows:function(){
eval("var cookie = "+WindowUtilities.getCookie(WindowStore.cookieName));
if(cookie!=null){
doSetCookie=false;
Windows.windows.each(function(win){
if(cookie[win.getId()]){
win.show();
}
});
}
doSetCookie=true;
}};
WindowCloseKey={keyCode:Event.KEY_ESC,init:function(_22b){
if(_22b){
WindowCloseKey.keyCode=_22b;
}
Event.observe(document,"keydown",this._closeCurrentWindow.bindAsEventListener(this));
},_closeCurrentWindow:function(_22c){
var e=_22c||window.event;
var _22e=e.which||e.keyCode;
var win=top.Windows.focusedWindow;
if(_22e==WindowCloseKey.keyCode&&win){
if(win.cancelCallback){
top.Dialog.cancelCallback();
}else{
if(win.okCallback){
top.Dialog.okCallback();
}else{
top.Windows.close(top.Windows.focusedWindow.getId());
}
}
}
}};
var TrimPath;
(function(){
if(TrimPath==null){
TrimPath=new Object();
}
if(TrimPath.evalEx==null){
TrimPath.evalEx=function(src){
return eval(src);
};
}
var _231;
if(Array.prototype.pop==null){
Array.prototype.pop=function(){
if(this.length===0){
return _231;
}
return this[--this.length];
};
}
if(Array.prototype.push==null){
Array.prototype.push=function(){
for(var i=0;i<arguments.length;++i){
this[this.length]=arguments[i];
}
return this.length;
};
}
TrimPath.parseTemplate=function(_233,_234,_235){
if(_235==null){
_235=TrimPath.parseTemplate_etc;
}
var _236=_237(_233,_234,_235);
var func=TrimPath.evalEx(_236,_234,1);
if(func!=null){
return new _235.Template(_234,_233,_236,func,_235);
}
return null;
};
try{
String.prototype.process=function(_239,_23a){
var _23b=TrimPath.parseTemplate(this,null);
if(_23b!=null){
return _23b.process(_239,_23a);
}
return this;
};
}
catch(e){
}
TrimPath.parseTemplate_etc={};
TrimPath.parseTemplate_etc.statementTag="forelse|for|if|elseif|else|var|macro";
TrimPath.parseTemplate_etc.statementDef={"if":{delta:1,prefix:"if (",suffix:") {",paramMin:1},"else":{delta:0,prefix:"} else {"},"elseif":{delta:0,prefix:"} else if (",suffix:") {",paramDefault:"true"},"/if":{delta:-1,prefix:"}"},"for":{delta:1,paramMin:3,prefixFunc:function(_23c,_23d,_23e,etc){
if(_23c[2]=="in"){
var _240=_23c[1];
if(_23c[4]=="to"){
var _241=_23c[3];
var _242=_23c[5];
var step=1;
if(_23c[6]=="by"){
step=_23c[7];
}
var ret=["var ",_240,"_ct = 0;","var ",_240,"_index = -1;","var __LENGTH_STACK__;","if (typeof(__LENGTH_STACK__) == 'undefined' || !__LENGTH_STACK__.length) __LENGTH_STACK__ = new Array();","__LENGTH_STACK__[__LENGTH_STACK__.length] = 0;","if( (",step," > 0 && ",_241," < ",_242,") || (",step," < 0 && ",_241,">",_242,") ) { ","for (var ",_240," = ",_241,"; ",_240,(step<0?">":"<"),_242,"; ",_240," += ",step,") { ",_240,"_ct++;",_240,"_index++;","__LENGTH_STACK__[__LENGTH_STACK__.length - 1]++;",].join("");
return ret;
}else{
var _245="__LIST__"+_240;
return ["var ",_245," = ",_23c[3],";","var __LENGTH_STACK__;","if (typeof(__LENGTH_STACK__) == 'undefined' || !__LENGTH_STACK__.length) __LENGTH_STACK__ = new Array();","__LENGTH_STACK__[__LENGTH_STACK__.length] = 0;","if ((",_245,") != null) { ","var ",_240,"_ct = 0;","for (var ",_240,"_index in ",_245,") { ",_240,"_ct++;","if (typeof(",_245,"[",_240,"_index]) == 'function') {continue;}","__LENGTH_STACK__[__LENGTH_STACK__.length - 1]++;","var ",_240," = ",_245,"[",_240,"_index];"].join("");
}
}else{
throw new etc.ParseError(_23e,_23d.line,"bad for loop statement: "+_23c.join(" "));
}
}},"forelse":{delta:0,prefix:"} } if (__LENGTH_STACK__[__LENGTH_STACK__.length - 1] == 0) { if (",suffix:") {",paramDefault:"true"},"/for":{delta:-1,prefix:"} }; delete __LENGTH_STACK__[__LENGTH_STACK__.length - 1];"},"var":{delta:0,prefix:"var ",suffix:";"},"macro":{delta:1,prefixFunc:function(_246,_247,_248,etc){
var _24a=_246[1].split("(")[0];
return ["var ",_24a," = function",_246.slice(1).join(" ").substring(_24a.length),"{ var _OUT_arr = []; var _OUT = { write: function(m) { if (m) _OUT_arr.push(m); } }; "].join("");
}},"/macro":{delta:-1,prefix:" return _OUT_arr.join(''); };"}};
TrimPath.parseTemplate_etc.modifierDef={"eat":function(v){
return "";
},"escape":function(s){
return String(s).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
},"capitalize":function(s){
return String(s).toUpperCase();
},"default":function(s,d){
return s!=null?s:d;
}};
TrimPath.parseTemplate_etc.modifierDef.h=TrimPath.parseTemplate_etc.modifierDef.escape;
TrimPath.parseTemplate_etc.Template=function(_250,_251,_252,func,etc){
this.process=function(_255,_256){
if(_255==null){
_255={};
}
if(_255._MODIFIERS==null){
_255._MODIFIERS={};
}
if(_255.defined==null){
_255.defined=function(str){
return (_255[str]!=undefined);
};
}
for(var k in etc.modifierDef){
if(_255._MODIFIERS[k]==null){
_255._MODIFIERS[k]=etc.modifierDef[k];
}
}
if(_256==null){
_256={};
}
var _259=[];
var _25a={write:function(m){
_259.push(m);
}};
try{
func(_25a,_255,_256);
}
catch(e){
if(_256.throwExceptions==true){
throw e;
}
var _25c=new String(_259.join("")+"[ERROR: "+e.toString()+(e.message?"; "+e.message:"")+"]");
_25c["exception"]=e;
return _25c;
}
return _259.join("");
};
this.name=_250;
this.source=_251;
this.sourceFunc=_252;
this.toString=function(){
return "TrimPath.Template ["+_250+"]";
};
};
TrimPath.parseTemplate_etc.ParseError=function(name,line,_25f){
this.name=name;
this.line=line;
this.message=_25f;
};
TrimPath.parseTemplate_etc.ParseError.prototype.toString=function(){
return ("TrimPath template ParseError in "+this.name+": line "+this.line+", "+this.message);
};
var _237=function(body,_261,etc){
body=_263(body);
var _264=["var TrimPath_Template_TEMP = function(_OUT, _CONTEXT, _FLAGS) { with (_CONTEXT) {"];
var _265={stack:[],line:1};
var _266=-1;
while(_266+1<body.length){
var _267=_266;
_267=body.indexOf("{",_267+1);
while(_267>=0){
var _268=body.indexOf("}",_267+1);
var stmt=body.substring(_267,_268);
var _26a=stmt.match(/^\{(cdata|minify|eval)/);
if(_26a){
var _26b=_26a[1];
var _26c=_267+_26b.length+1;
var _26d=body.indexOf("}",_26c);
if(_26d>=0){
var _26e;
if(_26d-_26c<=0){
_26e="{/"+_26b+"}";
}else{
_26e=body.substring(_26c+1,_26d);
}
var _26f=body.indexOf(_26e,_26d+1);
if(_26f>=0){
_270(body.substring(_266+1,_267),_264);
var _271=body.substring(_26d+1,_26f);
if(_26b=="cdata"){
_272(_271,_264);
}else{
if(_26b=="minify"){
_272(_273(_271),_264);
}else{
if(_26b=="eval"){
if(_271!=null&&_271.length>0){
_264.push("_OUT.write( (function() { "+_271+" })() );");
}
}
}
}
_267=_266=_26f+_26e.length-1;
}
}
}else{
if(body.charAt(_267-1)!="$"&&body.charAt(_267-1)!="\\"){
var _274=(body.charAt(_267+1)=="/"?2:1);
if(body.substring(_267+_274,_267+10+_274).search(TrimPath.parseTemplate_etc.statementTag)==0){
break;
}
}
}
_267=body.indexOf("{",_267+1);
}
if(_267<0){
break;
}
var _268=body.indexOf("}",_267+1);
if(_268<0){
break;
}
_270(body.substring(_266+1,_267),_264);
_275(body.substring(_267,_268+1),_265,_264,_261,etc);
_266=_268;
}
_270(body.substring(_266+1),_264);
if(_265.stack.length!=0){
throw new etc.ParseError(_261,_265.line,"unclosed, unmatched statement(s): "+_265.stack.join(","));
}
_264.push("}}; TrimPath_Template_TEMP");
return _264.join("");
};
var _275=function(_276,_277,_278,_279,etc){
var _27b=_276.slice(1,-1).split(" ");
var stmt=etc.statementDef[_27b[0]];
if(stmt==null){
_270(_276,_278);
return;
}
if(stmt.delta<0){
if(_277.stack.length<=0){
throw new etc.ParseError(_279,_277.line,"close tag does not match any previous statement: "+_276);
}
_277.stack.pop();
}
if(stmt.delta>0){
_277.stack.push(_276);
}
if(stmt.paramMin!=null&&stmt.paramMin>=_27b.length){
throw new etc.ParseError(_279,_277.line,"statement needs more parameters: "+_276);
}
if(stmt.prefixFunc!=null){
_278.push(stmt.prefixFunc(_27b,_277,_279,etc));
}else{
_278.push(stmt.prefix);
}
if(stmt.suffix!=null){
if(_27b.length<=1){
if(stmt.paramDefault!=null){
_278.push(stmt.paramDefault);
}
}else{
for(var i=1;i<_27b.length;i++){
if(i>1){
_278.push(" ");
}
_278.push(_27b[i]);
}
}
_278.push(stmt.suffix);
}
};
var _270=function(text,_27f){
if(text.length<=0){
return;
}
var _280=0;
var _281=text.length-1;
while(_280<text.length&&(text.charAt(_280)=="\n")){
_280++;
}
while(_281>=0&&(text.charAt(_281)==" "||text.charAt(_281)=="\t")){
_281--;
}
if(_281<_280){
_281=_280;
}
if(_280>0){
_27f.push("if (_FLAGS.keepWhitespace == true) _OUT.write(\"");
var s=text.substring(0,_280).replace("\n","\\n");
if(s.charAt(s.length-1)=="\n"){
s=s.substring(0,s.length-1);
}
_27f.push(s);
_27f.push("\");");
}
var _283=text.substring(_280,_281+1).split("\n");
for(var i=0;i<_283.length;i++){
_285(_283[i],_27f);
if(i<_283.length-1){
_27f.push("_OUT.write(\"\\n\");\n");
}
}
if(_281+1<text.length){
_27f.push("if (_FLAGS.keepWhitespace == true) _OUT.write(\"");
var s=text.substring(_281+1).replace("\n","\\n");
if(s.charAt(s.length-1)=="\n"){
s=s.substring(0,s.length-1);
}
_27f.push(s);
_27f.push("\");");
}
};
var _285=function(line,_287){
var _288="}";
var _289=-1;
while(_289+_288.length<line.length){
var _28a="${",_28b="}";
var _28c=line.indexOf(_28a,_289+_288.length);
if(_28c<0){
break;
}
if(line.charAt(_28c+2)=="%"){
_28a="${%";
_28b="%}";
}
var _28d=line.indexOf(_28b,_28c+_28a.length);
if(_28d<0){
break;
}
_272(line.substring(_289+_288.length,_28c),_287);
var _28e=line.substring(_28c+_28a.length,_28d).replace(/\|\|/g,"#@@#").split("|");
for(var k in _28e){
if(_28e[k].replace){
_28e[k]=_28e[k].replace(/#@@#/g,"||");
}
}
_287.push("_OUT.write(");
_290(_28e,_28e.length-1,_287);
_287.push(");");
_289=_28d;
_288=_28b;
}
_272(line.substring(_289+_288.length),_287);
};
var _272=function(text,_292){
if(text==null||text.length<=0){
return;
}
text=text.replace(/\\/g,"\\\\");
text=text.replace(/\n/g,"\\n");
text=text.replace(/"/g,"\\\"");
_292.push("_OUT.write(\"");
_292.push(text);
_292.push("\");");
};
var _290=function(_293,_294,_295){
var expr=_293[_294];
if(_294<=0){
_295.push(expr);
return;
}
var _297=expr.split(":");
_295.push("_MODIFIERS[\"");
_295.push(_297[0]);
_295.push("\"](");
_290(_293,_294-1,_295);
if(_297.length>1){
_295.push(",");
_295.push(_297[1]);
}
_295.push(")");
};
var _263=function(_298){
_298=_298.replace(/\t/g,"    ");
_298=_298.replace(/\r\n/g,"\n");
_298=_298.replace(/\r/g,"\n");
_298=_298.replace(/^(\s*\S*(\s+\S+)*)\s*$/,"$1");
return _298;
};
var _273=function(_299){
_299=_299.replace(/^\s+/g,"");
_299=_299.replace(/\s+$/g,"");
_299=_299.replace(/\s+/g," ");
_299=_299.replace(/^(\s*\S*(\s+\S+)*)\s*$/,"$1");
return _299;
};
TrimPath.parseDOMTemplate=function(_29a,_29b,_29c){
if(_29b==null){
_29b=document;
}
var _29d=_29b.getElementById(_29a);
var _29e=_29d.value;
if(_29e==null){
_29e=_29d.innerHTML;
}
_29e=_29e.replace(/&lt;/g,"<").replace(/&gt;/g,">");
return TrimPath.parseTemplate(_29e,_29a,_29c);
};
TrimPath.processDOMTemplate=function(_29f,_2a0,_2a1,_2a2,_2a3){
return TrimPath.parseDOMTemplate(_29f,_2a2,_2a3).process(_2a0,_2a1);
};
})();
TooltipManager={options:{cssClassName:"tooltip",delayOver:200,delayOut:1000,shiftX:10,shiftY:10,className:"alphacube",width:200,height:null,draggable:false,minimizable:false,maximizable:false,showEffect:Element.show,hideEffect:Element.hide},ajaxInfo:null,elements:null,showTimer:null,hideTimer:null,componentSpecificShiftX:new Object(),init:function(_2a4,_2a5,_2a6){
TooltipManager.options=Object.extend(TooltipManager.options,_2a6||{});
_2a4=TooltipManager.options.cssClassName||"tooltip";
TooltipManager.ajaxInfo=_2a5;
TooltipManager.elements=$$("."+_2a4);
TooltipManager.elements.each(function(_2a7){
_2a7=$(_2a7);
var info=TooltipManager._getInfo(_2a7);
if(info.ajax){
_2a7.ajaxId=info.id;
_2a7.ajaxInfo=_2a5;
}else{
_2a7.tooltipElement=$(info.id);
}
_2a7.observe("mouseover",TooltipManager._mouseOver);
_2a7.observe("mouseout",TooltipManager._mouseOut);
});
Windows.addObserver(this);
},addHTML:function(_2a9,_2aa){
_2a9=$(_2a9);
_2aa=$(_2aa);
_2a9.tooltipElement=_2aa;
_2a9.observe("mouseover",TooltipManager._mouseOver);
_2a9.observe("mouseout",TooltipManager._mouseOut);
},addComponentSpecificShiftX:function(_2ab,_2ac){
TooltipManager.componentSpecificShiftX[_2ab]=_2ac;
},addAjax:function(_2ad,_2ae){
_2ad=$(_2ad);
_2ad.ajaxInfo=_2ae;
_2ad.observe("mouseover",TooltipManager._mouseOver);
_2ad.observe("mouseout",TooltipManager._mouseOut);
},addURL:function(_2af,url,_2b1,_2b2){
_2af=$(_2af);
_2af.url=url;
_2af.frameWidth=_2b1;
_2af.frameHeight=_2b2;
_2af.observe("mouseover",TooltipManager._mouseOver);
_2af.observe("mouseout",TooltipManager._mouseOut);
},close:function(){
if(TooltipManager.tooltipWindow){
TooltipManager.tooltipWindow.hide();
}
},preloadImages:function(path,_2b4,_2b5){
if(!_2b5){
_2b5=".gif";
}
$A(_2b4).each(function(i){
var _2b7=new Image();
_2b7.src=path+"/"+i+_2b5;
});
},_showTooltip:function(_2b8){
if(this.element==_2b8){
return;
}
while(_2b8&&(!_2b8.tooltipElement&&!_2b8.ajaxInfo&&!_2b8.url)){
_2b8=_2b8.parentNode;
}
this.element=_2b8;
TooltipManager.showTimer=null;
if(TooltipManager.hideTimer){
clearTimeout(TooltipManager.hideTimer);
}
var _2b9=Position.cumulativeOffset(_2b8);
var _2ba=_2b8.getDimensions();
if(!this.tooltipWindow){
this.tooltipWindow=new Window("__tooltip__",TooltipManager.options);
}
var _2bb=TooltipManager.componentSpecificShiftX[_2b8.id];
if(_2bb==null){
_2bb=0;
}
var _2bc=getScreenCenterY();
var _2bd=_2b9[0]+TooltipManager.options.shiftX+_2bb;
this.tooltipWindow.setZIndex(11111);
this.tooltipWindow.hide();
this.tooltipWindow.setLocation(_2bc,_2bd);
Event.observe(this.tooltipWindow.element,"mouseover",function(_2be){
TooltipManager._tooltipOver(_2be,_2b8);
});
Event.observe(this.tooltipWindow.element,"mouseout",function(_2bf){
TooltipManager._tooltipOut(_2bf,_2b8);
});
this.tooltipWindow.height=TooltipManager.options.height;
this.tooltipWindow.width=TooltipManager.options.width;
if(_2b8.ajaxInfo){
var p=_2b8.ajaxInfo.options.parameters;
var _2c1=p;
if(_2b8.ajaxId){
if(p){
p+="&id="+_2b8.ajaxId;
}else{
p="id="+_2b8.ajaxId;
}
}
_2b8.ajaxInfo.options.parameters=p||"";
this.tooltipWindow.setHTMLContent("");
this.tooltipWindow.setAjaxContent(_2b8.ajaxInfo.url,_2b8.ajaxInfo.options);
_2b8.ajaxInfo.options.parameters=_2c1;
}else{
if(_2b8.url){
this.tooltipWindow.setURL(_2b8.url);
this.tooltipWindow.setSize(_2b8.frameWidth,_2b8.frameHeight);
this.tooltipWindow.height=_2b8.frameHeight;
this.tooltipWindow.width=_2b8.frameWidth;
}else{
this.tooltipWindow.setHTMLContent(_2b8.tooltipElement.innerHTML);
}
}
if(!_2b8.ajaxInfo){
this.tooltipWindow.show();
this.tooltipWindow.toFront();
}
},_hideTooltip:function(_2c2){
if(this.tooltipWindow){
this.tooltipWindow.hide();
this.element=null;
}
},_mouseOver:function(_2c3){
var _2c4=Event.element(_2c3);
if(TooltipManager.showTimer){
clearTimeout(TooltipManager.showTimer);
}
TooltipManager.showTimer=setTimeout(function(){
TooltipManager._showTooltip(_2c4);
},TooltipManager.options.delayOver);
},_mouseOut:function(_2c5){
var _2c6=Event.element(_2c5);
if(TooltipManager.showTimer){
clearTimeout(TooltipManager.showTimer);
TooltipManager.showTimer=null;
return;
}
if(TooltipManager.tooltipWindow){
TooltipManager.hideTimer=setTimeout(function(){
TooltipManager._hideTooltip(_2c6);
},TooltipManager.options.delayOut);
}
},_tooltipOver:function(_2c7,_2c8){
if(TooltipManager.hideTimer){
clearTimeout(TooltipManager.hideTimer);
TooltipManager.hideTimer=null;
}
},_tooltipOut:function(_2c9,_2ca){
if(TooltipManager.hideTimer==null){
TooltipManager.hideTimer=setTimeout(function(){
TooltipManager._hideTooltip(_2ca);
},TooltipManager.options.delayOut);
}
},_getInfo:function(_2cb){
var id=_2cb.className.split(" ").detect(function(name){
return name.indexOf("html_")==0;
});
var ajax=true;
if(id){
ajax=false;
}else{
id=_2cb.className.split(" ").detect(function(name){
return name.indexOf("ajax_")==0;
});
}
id=id.substr(id.indexOf("_")+1,id.length);
return id?{ajax:ajax,id:id}:null;
},onBeforeShow:function(_2d0,win){
var top=parseFloat(win.getLocation().top);
var dim=win.element.getDimensions();
if(top+dim.height>TooltipManager._getScrollTop()+TooltipManager._getPageHeight()){
var _2d4=Position.cumulativeOffset(this.element);
var top=_2d4[1]-TooltipManager.options.shiftY-dim.height;
var left=_2d4[0];
var _2d6=_2d4[0]+dim.width;
var _2d7=40;
var _2d8=10;
if(_2d6>TooltipManager._getPageWidth()-_2d7+TooltipManager._getScrollLeft()){
left=TooltipManager._getPageWidth()-dim.width-_2d7+TooltipManager._getScrollLeft();
}
if(top<TooltipManager._getScrollTop()+_2d8){
top=TooltipManager._getScrollTop()+_2d8;
}
var _2d9=TooltipManager.componentSpecificShiftX[this.element.id];
if(_2d9==null){
_2d9=0;
}
win.setLocation(top,left+TooltipManager.options.shiftX+_2d9);
}
},_getPageWidth:function(){
return window.innerWidth||document.documentElement.clientWidth||0;
},_getPageHeight:function(){
return window.innerHeight||document.documentElement.clientHeight||0;
},_getScrollTop:function(){
return document.documentElement.scrollTop||window.pageYOffset||0;
},_getScrollLeft:function(){
return document.documentElement.scrollLeft||window.pageXOffset||0;
}};
var EventSelectors={version:"1.0",cache:[],rules:{},autoEvents:[],addRules:function(_2da){
Object.extend(this.rules,_2da);
},addAutoEvents:function(_2db){
Object.extend(this.autoEvents,_2db);
},start:function(){
this.timer=new Array();
this._extendRules();
this.assign();
this._fireEvents();
},assign:function(){
var _2dc=null;
this._unloadCache();
this.rules._each(function(rule){
var _2de=$A(rule.key.split(","));
_2de.each(function(_2df){
var pair=_2df.split(":");
var _2e1=pair[1];
var _2e2=false;
$$(pair[0]).each(function(_2e3){
_2e2=true;
if(pair[1]==""||pair.length==1){
return rule.value(_2e3);
}
if(_2e1.toLowerCase()=="loaded"){
this.timer[pair[0]]=setInterval(this._checkLoaded.bind(this,_2e3,pair[0],rule),15);
}else{
_2dc=function(_2e4){
var _2e5=Event.element(_2e4);
if(_2e5.nodeType==3){
_2e5=_2e5.parentNode;
}
rule.value($(_2e5),_2e4);
};
this.cache.push([_2e3,_2e1,_2dc]);
Event.observe(_2e3,_2e1,_2dc);
}
}.bind(this));
if(!_2e2){
alert("The CSS declaration '"+pair[0]+"' was not found!\n"+"This could cause that the site loads too long.");
}
}.bind(this));
}.bind(this));
},_fireEvents:function(){
this.autoEvents.each(function(_2e6){
var _2e7=_2e6[0];
var _2e8=_2e6[1];
if(document.createEvent){
var evt=document.createEvent("Events");
evt.initEvent(_2e7,true,true);
$(_2e8).dispatchEvent(evt);
}else{
if(document.createEventObject){
var evt=document.createEventObject();
$(_2e8).fireEvent("on"+_2e7,evt);
}
}
});
},_unloadCache:function(){
if(!this.cache){
return;
}
for(var i=0;i<this.cache.length;i++){
Event.stopObserving.apply(this,this.cache[i]);
this.cache[i][0]=null;
}
this.cache=[];
},_checkLoaded:function(_2eb,_2ec,rule){
var node=$(_2eb);
if(_2eb.tagName!="undefined"){
clearInterval(this.timer[_2ec]);
rule.value(node);
}
},_extendRules:function(){
Object.extend(this.rules,{_each:function(_2ef){
for(key in this){
if(key=="_each"){
continue;
}
var _2f0=this[key];
var pair=[key,_2f0];
pair.key=key;
pair.value=_2f0;
_2ef(pair);
}
}});
}};
function startEventSelectors(){
EventSelectors.start();
}
Event.onReady(startEventSelectors,true);
var ddajaxtabssettings={};
ddajaxtabssettings.bustcachevar=1;
ddajaxtabssettings.loadstatustext="Requesting content...";
function ddajaxtabs(_2f2,_2f3){
this.tabinterfaceid=_2f2;
this.tabs=document.getElementById(_2f2).getElementsByTagName("a");
this.enabletabpersistence=true;
this.hottabspositions=[];
this.currentTabIndex=0;
this.contentdivid=_2f3;
this.defaultHTML="";
this.defaultIframe="<iframe src=\"about:blank\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\" vspace=\"0\" hspace=\"0\" class=\"tabcontentiframe\" style=\"width:100%; height:auto; min-height: 100px\"></iframe>";
this.defaultIframe=this.defaultIframe.replace(/<iframe/i,"<iframe name=\""+"_ddajaxtabsiframe-"+_2f3+"\" ");
this.revcontentids=[];
this.selectedClassTarget="link";
}
ddajaxtabs.connect=function(_2f4,_2f5){
var _2f6=false;
var _2f7="";
if(window.ActiveXObject){
try{
_2f6=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
try{
_2f6=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
}
}
}else{
if(window.XMLHttpRequest){
_2f6=new XMLHttpRequest();
}else{
return false;
}
}
var _2f8=_2f4.replace(/^http:\/\/[^\/]+\//i,"http://"+window.location.hostname+"/");
_2f6.onreadystatechange=function(){
ddajaxtabs.loadpage(_2f6,_2f4,_2f5);
};
if(ddajaxtabssettings.bustcachevar){
_2f7=(_2f8.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime();
}
_2f6.open("GET",_2f8+_2f7,true);
_2f6.send(null);
};
ddajaxtabs.loadpage=function(_2f9,_2fa,_2fb){
var _2fc=_2fb.contentdivid;
document.getElementById(_2fc).innerHTML=ddajaxtabssettings.loadstatustext;
if(_2f9.readyState==4&&(_2f9.status==200||window.location.href.indexOf("http")==-1)){
document.getElementById(_2fc).innerHTML=_2f9.responseText;
ddajaxtabs.ajaxpageloadaction(_2fa,_2fb);
}
};
ddajaxtabs.ajaxpageloadaction=function(_2fd,_2fe){
_2fe.onajaxpageload(_2fd);
};
ddajaxtabs.getCookie=function(Name){
var re=new RegExp(Name+"=[^;]+","i");
if(document.cookie.match(re)){
return document.cookie.match(re)[0].split("=")[1];
}
return "";
};
ddajaxtabs.setCookie=function(name,_302){
document.cookie=name+"="+_302+";path=/";
};
ddajaxtabs.prototype={expandit:function(_303){
this.cancelautorun();
var _304="";
try{
if(typeof _303=="string"&&document.getElementById(_303).getAttribute("rel")){
_304=document.getElementById(_303);
}else{
if(parseInt(_303)!=NaN&&this.tabs[_303].getAttribute("rel")){
_304=this.tabs[_303];
}
}
}
catch(err){
alert("Invalid Tab ID or position entered!");
}
if(_304!=""){
this.expandtab(_304);
}
},cycleit:function(dir,_306){
if(dir=="next"){
var _307=(this.currentTabIndex<this.hottabspositions.length-1)?this.currentTabIndex+1:0;
}else{
if(dir=="prev"){
var _307=(this.currentTabIndex>0)?this.currentTabIndex-1:this.hottabspositions.length-1;
}
}
if(typeof _306=="undefined"){
this.cancelautorun();
}
this.expandtab(this.tabs[this.hottabspositions[_307]]);
},setpersist:function(bool){
this.enabletabpersistence=bool;
},loadajaxpage:function(_309){
ddajaxtabs.connect(_309,this);
},loadiframepage:function(_30a){
this.iframedisplay(_30a,this.contentdivid);
},setselectedClassTarget:function(_30b){
this.selectedClassTarget=_30b||"link";
},getselectedClassTarget:function(_30c){
return (this.selectedClassTarget==("linkparent".toLowerCase()))?_30c.parentNode:_30c;
},urlparamselect:function(_30d){
var _30e=window.location.search.match(new RegExp(_30d+"=(\\d+)","i"));
return (_30e==null)?null:parseInt(RegExp.$1);
},onajaxpageload:function(_30f){
},expandtab:function(_310){
var _311=_310.getAttribute("rel");
var _312=(_310.getAttribute("rev"))?","+_310.getAttribute("rev").replace(/\s+/,"")+",":"";
if(_311=="#default"){
document.getElementById(this.contentdivid).innerHTML=this.defaultHTML;
}else{
if(_311=="#iframe"){
this.iframedisplay(_310.getAttribute("href"),this.contentdivid);
}else{
ddajaxtabs.connect(_310.getAttribute("href"),this);
}
}
this.expandrevcontent(_312);
for(var i=0;i<this.tabs.length;i++){
this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("href")==_310.getAttribute("href"))?"selected":"";
}
if(this.enabletabpersistence){
ddajaxtabs.setCookie(this.tabinterfaceid,_310.tabposition);
}
this.setcurrenttabindex(_310.tabposition);
},iframedisplay:function(_314,_315){
if(typeof window.frames["_ddajaxtabsiframe-"+_315]!="undefined"){
try{
delete window.frames["_ddajaxtabsiframe-"+_315];
}
catch(err){
}
}
document.getElementById(_315).innerHTML=this.defaultIframe;
window.frames["_ddajaxtabsiframe-"+_315].location.replace(_314);
},expandrevcontent:function(_316){
var _317=this.revcontentids;
for(var i=0;i<_317.length;i++){
document.getElementById(_317[i]).style.display=(_316.indexOf(","+_317[i]+",")!=-1)?"block":"none";
}
},setcurrenttabindex:function(_319){
for(var i=0;i<this.hottabspositions.length;i++){
if(_319==this.hottabspositions[i]){
this.currentTabIndex=i;
break;
}
}
},autorun:function(){
this.cycleit("next",true);
},cancelautorun:function(){
if(typeof this.autoruntimer!="undefined"){
clearInterval(this.autoruntimer);
}
},init:function(_31b){
var _31c=ddajaxtabs.getCookie(this.tabinterfaceid);
var _31d=-1;
var _31e=this.urlparamselect(this.tabinterfaceid);
this.automodeperiod=_31b||0;
this.defaultHTML=document.getElementById(this.contentdivid).innerHTML;
for(var i=0;i<this.tabs.length;i++){
this.tabs[i].tabposition=i;
if(this.tabs[i].getAttribute("rel")){
var _320=this;
this.hottabspositions[this.hottabspositions.length]=i;
this.tabs[i].onclick=function(){
_320.expandtab(this);
_320.cancelautorun();
return false;
};
if(this.tabs[i].getAttribute("rev")){
this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/));
}
if(_31e==i||this.enabletabpersistence&&_31d==-1&&parseInt(_31c)==i||!this.enabletabpersistence&&_31d==-1&&this.getselectedClassTarget(this.tabs[i]).className=="selected"){
_31d=i;
}
}
}
if(_31d!=-1){
this.expandtab(this.tabs[_31d]);
}else{
this.expandtab(this.tabs[this.hottabspositions[0]]);
}
if(parseInt(this.automodeperiod)>500&&this.hottabspositions.length>1){
this.autoruntimer=setInterval(function(){
_320.autorun();
},this.automodeperiod);
}
}};
function getScreenCenterY(){
var y=0;
y=getScrollOffset()+(getInnerHeight()/2);
return (y);
}
function getScreenCenterX(){
return (document.body.clientWidth/2);
}
function getInnerHeight(){
var y;
if(self.innerHeight){
y=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
y=document.documentElement.clientHeight;
}else{
if(document.body){
y=document.body.clientHeight;
}
}
}
return (y);
}
function getScrollOffset(){
var y;
if(self.pageYOffset){
y=self.pageYOffset;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
y=document.documentElement.scrollTop;
}else{
if(document.body){
y=document.body.scrollTop;
}
}
}
return (y);
}
function getCurrencyFormat(_324){
var _325;
if(_324=="DE"||_324=="ES"){
_325="###.###,###";
}else{
if(_324=="FR"){
_325="### ###,###";
}else{
_325="###,###.###";
}
}
return _325;
}
Number.prototype.formatCurrency=function(_326,_327){
var n=this;
_326=isNaN(_326=Math.abs(_326))?2:_326;
var _329=_327.split("###");
var _32a;
var _32b;
_32a=_329[2];
_32a=_32a==undefined?",":_32a;
_32b=_329[1];
_32b=_32b==undefined?".":_32b;
s=n<0?"-":"";
i=parseInt(n=Math.abs(+n||0).toFixed(_326))+"";
j=(j=i.length)>3?j%3:0;
return s+(j?i.substr(0,j)+_32b:"")+i.substr(j).replace(/(\d{3})(?=\d)/g,"$1"+_32b)+(_326?_32a+Math.abs(n-i).toFixed(_326).slice(2):"");
};



evt_getModel().number_of_children_text = "Children";
evt_getModel().child_max_age = 14;
evt_getModel().roomLabel = "Room";
evt_getModel().isShowChildrenConfig = true;
evt_getModel().maxAdults = 5;
evt_getModel().isRooms = true;
evt_getModel().maxChildren = 4;
evt_getModel().isSeperateChildrenFromAdults = true


evt_getModel().maxRoomNumber = 5;


  		if (!evt_getModel().rooms) {
  			evt_getModel().rooms = [];	
  		}
  		if (!evt_getModel().rooms.room) {
  			evt_getModel().rooms.room = [];	
  		}
  		if (!evt_getModel().prsNumChildren) {
  			evt_getModel().prsNumChildren = [];	
  		}

			evt_getModel().roomCount = "1";
			if (!evt_getModel().rooms.room[1]) {
				evt_getModel().rooms.room[1] = [];
			}	
			if (!evt_getModel().rooms.room[1].age) {
				evt_getModel().rooms.room[1].age = [];
			}
			;
			evt_getModel().rooms.room[1].text = "Room 1";
			
		 					
							if (!evt_getModel().rooms.room[1]) {
				evt_getModel().rooms.room[1] = [];
			}
			evt_getModel().rooms.room[1].numChildren = 0;
					
	

