var ProtoView={$childById:function(el,id){
if(!el){
return null;
}
id=id.toLowerCase();
el=el.firstChild;
while(el){
try{
if(el.getAttribute("id").toLowerCase()==id){
break;
}
}
catch(e){
}
el=el.nextSibling;
}
return el;
},$childByName:function(el,_4){
if(!el){
return null;
}
_4=_4.toLowerCase();
el=el.firstChild;
while(el){
if(el.nodeName.toLowerCase()==_4){
break;
}
el=el.nextSibling;
}
return el;
},$childrenByName:function(el,_6){
if(!el){
return null;
}
_6=_6.toLowerCase();
var _7=[];
el=el.firstChild;
while(el){
if(el.nodeName.toLowerCase()==_6){
_7.push(el);
}
el=el.nextSibling;
}
return _7;
},$childByClass:function(el,_9){
if(!el){
return null;
}
el=el.firstChild;
while(el){
if(el.nodeType==1){
if(el.className&&el.className.indexOf(_9)>=0){
break;
}
}
el=el.nextSibling;
}
return el;
},$childrenByClass:function(el,_b){
if(!el){
return null;
}
var _c=[];
el=el.firstChild;
while(el){
if(el.className&&el.className.indexOf(_b)>=0){
_c.push(el);
}
el=el.nextSibling;
}
return _c;
},$parentByClass:function(el,_e){
while(el){
if(el.className&&el.className.indexOf(_e)>=0){
return el;
}
if(el.parentNode==document){
return null;
}
el=el.parentNode||null;
}
return el;
},makeNode:function(_f){
var _10=$("a-invisible-span");
_10.innerHTML=_f;
return _10.firstChild;
},makeNodes:function(_11){
var _12=$("a-invisible-span");
_12.innerHTML=_11;
return $A(_12.childNodes).findAll(function(_13){
return (_13.nodeType==1);
});
}};
var LightBoxView={};
Object.extend(LightBoxView,ProtoView);
Object.extend(LightBoxView,{lightbox:null,clsName:null,refreshOnDismiss:false,$lightbox:function(){
return $("lightbox");
},$overlay:function(){
return $("overlay");
},$content:function(){
return $("lbContent");
},$title:function(){
return $("lbTitle");
},$headerLink:function(){
return $("lbHeader-link");
},$yesLink:function(){
return $("lbContent-link-yes");
},$noLink:function(){
return $("lbContent-link-no");
},create:function(){
this.lightbox=new lightbox();
FEvent.observe(this.$headerLink(),"click",this.dismiss.bindAsObserver(this));
FEvent.observe(this.$noLink(),"click",this.dismiss.bindAsObserver(this));
FEvent.observe(this.$yesLink(),"click",this.handleAndDismiss.bindAsObserver(this));
},getView:function(el){
return LightBoxView;
},showPage:function(url,_16,_17,_18,_19){
if(this.isVisible()){
return false;
}
this.setClassName(this.$lightbox(),_17,"s-info-lightbox");
var _1a;
if(_18){
_1a=this.handleReturn.bindAsObserver(this,_16,_18);
}else{
_1a=this.handleReturn.bindAsObserver(this,_16);
}
var _1b="get";
if(_19){
_1b=_19;
}
new Ajax.Request(url,{method:_1b,onComplete:_1a});
return false;
},handleReturn:function(t,_1d,_1e){
var _1f=$("a-invisible-span");
_1f.innerHTML=t.responseText;
var _20=_1f.firstChild;
if(WizardView&&WizardView.is(_20)){
WizardController.main.setup(_20,_1e);
if(Element.hasClassName(_20,"f-custom-palette-wizard")&&checkIt("msie")){
LightBoxView.refreshOnDismiss=true;
}
}else{
if(Util.isDefined(window.SwitchControlView)&&SwitchControlView.is(_20)){
UberController.setup(_20);
SwitchControlController.setupChildren(_20);
}else{
if(Element.hasClassName(_20,"f-schemas")){
if(checkIt("msie")){
LightBoxView.refreshOnDismiss=true;
}
SchemasController.setup(ProtoView.$childByClass(_20,"c-schemas"));
}
}
}
this.showElement(_1f.firstChild,_1d);
if(_1e&&_1e.absolutePosition&&_1e.refEl){
AbsolutePositioner.display(_1e.refEl,this.$lightbox(),$("form-container"),10);
}
var _21=ProtoView.$childByName(_1f,"script");
if(_21){
eval(_21.innerHTML);
}
},showWaitDialog:function(el,_23){
if(this.isVisible()){
return false;
}
this.setClassName(this.$lightbox(),"s-wait-lightbox");
if(el==null){
el=document.createElement("div");
}
this.showElement(el,_23);
},hideWaitDialog:function(){
this.dismiss(null);
},showLimitedHeightInfoDialog:function(el,_25){
if(this.isVisible()){
return false;
}
this.setClassName(this.$lightbox(),"s-medium-lightbox");
this.showInfoDialog(el,_25);
},showInfoDialog:function(el,_27,_28,_29){
el=$(el);
if(this.isVisible()){
return false;
}
this.setClassName(this.$lightbox(),_28,"s-info-lightbox");
if(_29&&_29.absolutePosition&&_29.refEl){
AbsolutePositioner.display(_29.refEl,this.$lightbox(),$("form-container"),10);
}
this.showElement(el,_27);
return false;
},yesHandler:null,showYesNoDialog:function(el,_2b,_2c){
if(this.isVisible()){
return false;
}
this.setClassName(this.$lightbox(),"s-yesno-lightbox");
if(_2c){
this.yesHandler=_2c;
}
this.showElement(el,_2b);
},showElement:function(el,_2e){
if(this.lightbox==null){
this.create();
}
if(_2e){
this.$title().innerHTML=_2e;
}
this.lightbox.setElement(el);
this.lightbox.activate();
},setClassName:function(el,_30,_31){
if(!_30){
_30=_31;
}
Element.addClassName(this.$lightbox(),_30);
this.clsName=_30;
},isVisible:function(){
if(this.clsName!=null){
return true;
}
return false;
},dismiss:function(evt){
if(evt){
Event.stop(evt);
}
if(LightBoxView.refreshOnDismiss){
window.location.reload(true);
}
var lb=this.$lightbox();
Element.removeClassName(lb,this.clsName);
this.clsName=null;
AbsolutePositioner.undisplay(lb);
this.hide();
},handleAndDismiss:function(evt){
if(this.yesHandler){
this.yesHandler(evt);
this.yesHandler=null;
}
this.dismiss(evt);
},hide:function(){
if(this.lightbox){
this.lightbox.deactivate();
}
}});
var WizardView={};
Object.extend(WizardView,ProtoView);
Object.extend(WizardView,{$panels:function(el){
},getLiteral:function(el){
return "f-wizard";
},is:function(el){
return (el.className&&el.className.indexOf(this.getLiteral(el))>=0);
}});

