if(typeof (vjo)=="undefined"){
var vjo={};
}
vjo.global=this;
vjo._bScope=null;
vjo.createPkg=function(_1){
var _2=_1.split("."),len=_2.length;
var _3=this.global;
for(var i=0;i<len-1&&_3&&_2[i];i++){
_3=(_3[_2[i]])?_3[_2[i]]:_3[_2[i]]={};
}
return {pkg:_3,className:(len>0)?_2[len-1]:""};
};
vjo.needs=function(_5,_6){
if(!_5){
return;
}
if(!vjo._bScope){
vjo._bScope={};
}
var _7=vjo.createPkg(_5);
if(_7.pkg[_7.className]){
if(typeof _6=="string"&&_6!=""){
vjo._bScope[_6]=_7.pkg[_7.className];
}else{
vjo._bScope[_7.className]=_7.pkg[_7.className];
}
}
};
vjo.needsLib=function(){
};
vjo.type=function(_8){
var _9=function(){
this.b=_9.b;
if(this.base){
this.base.parent=this;
}
if(this.constructs){
var rv=this.constructs.apply(this,arguments);
if(rv){
return rv;
}
}
return null;
};
_9.props=function(_b){
for(var i in _b){
if(i!="props"&&i!="protos"&&i!="inherits"&&i!="prototype"&&i!="inits"&&i!="satisfies"&&i!="satisfiers"&&i!="b"){
_9[i]=_b[i];
}
}
return _9;
};
function createBaseMethod(_d,_e,_f){
_d.prototype.base[_f]=function(){
var _10=this.parent,supBase=(_e.prototype&&_e.prototype.base)?_e.prototype.base[_f]:null,curBase;
if(supBase){
curBase=_10.base[_f];
_10.base[_f]=supBase;
}
var scp=(this.parent)?this.parent:this;
var rv=_e.prototype[_f].apply(scp,arguments);
if(curBase){
_10.base[_f]=curBase;
}
return rv;
};
}
_9.protos=function(obj,_14){
for(var i in obj){
if(i!="base"&&i!="b"&&(!_14||i!="constructs")){
if(_14&&_14.prototype&&_14.prototype[i]&&typeof obj[i]=="function"){
createBaseMethod(_9,_14,i);
}
if((!_14&&!_9.prototype[i])&&_9.prototype.base&&_9.prototype.base[i]){
_9.prototype[i]=function(){
_9.prototype.base[i].apply(this,arguments);
};
}else{
if(!(_14&&_9.prototype[i])){
_9.prototype[i]=obj[i];
}
}
}
}
return _9;
};
function createBase(clz,_17){
return (function(){
var _18=_17.prototype.base||_17,constructs=this.constructs,curBase=this.base;
if(_17.prototype.constructs&&constructs){
this.constructs=_17.prototype.constructs;
}
this.base=function(){
_18.apply(this,arguments);
};
_17.apply(this,arguments);
if(constructs){
this.constructs=constructs;
}
this.base=curBase;
});
}
_9.inherits=function(_19){
var _1a=vjo.createPkg(_19);
var _1b=_1a.pkg[_1a.className];
_9.prototype.base=createBase(_9,_1b);
_9.protos(_1b.prototype,_1b);
_9.props(_1b);
return _9;
};
_9.singleton=function(){
return _9;
};
_9.inits=function(_1c){
var _1d=vjo.createPkg(_8);
if(typeof _1d.pkg[_1d.className]=="function"){
_1c.call(this);
}
return _9;
};
_9.satisfies=function(_1e){
return _9;
};
_9.satisfiers=function(_1f){
return _9;
};
_9.makeFinal=function(){
return _9;
};
_9.b=vjo._bScope;
vjo._bScope=null;
if(!_8){
return _9;
}
var _20=vjo.createPkg(_8);
return (_20.pkg[_20.className])?_9:(_20.pkg[_20.className]=_9);
};

vjo.type("vjo.Registry").singleton().protos({constructs:function(){
this.controls=[];
},put:function(_1,_2){
this.controls[_1]=_2;
if(this.isKeyValid(_1)){
this["_"+_1]=this.controls[_1];
}
return this.controls[_1];
},get:function(_3){
return this.controls[_3];
},dump:function(){
var _4=this.controls;
var _5="controls on page:\n";
for(var i in _4){
_5+="key = "+i;
_5+="controlName = "+_4[i].objtype;
_5+="\n";
}
return _5;
},isKeyValid:function(_7){
if(typeof _7!="string"){
return false;
}
return /^([a-zA-Z0-9_$]+)$/.test(_7);
}}).inits(function(){
vjo.Registry=new vjo.Registry();
});

vjo.type("vjo.dsf.Event").protos({constructs:function(_1,_2,_3){
this.src=_1;
this.eventType=_2;
this.nativeEvent=_3;
}});

vjo.type("vjo.dsf.Element").props({get:function(_1){
var d=document,e=null;
if(typeof (d.getElementById)!="undefined"){
e=d.getElementById(_1);
}
if(!e&&d.all){
e=d.all[_1];
}
return e;
},toggleHideShow:function(_3,_4){
var e=this.get(_3),s,d,u="undefined";
if(e){
s=e.style;
d=s.display;
if(typeof (_4)===u){
_4=(d===""||d==="block")?false:true;
}
e.bIsShown=_4;
s.display=(_4)?"block":"none";
}
},promoteToBody:function(_6){
var e=this.get(_6),b=document.body;
if(e&&b&&e.parentNode){
e.parentNode.removeChild(e);
b.appendChild(e);
}
},toggleVisibility:function(_8,_9){
var e=this.get(_8),v,s,u="undefined";
if(e){
s=e.style;
v=s.visibility;
if(typeof (_9)===u){
_9=(v==="")?false:true;
}
e.bIsVisible=_9;
s.visibility=(_9)?"":"hidden";
}
},enable:function(_b,_c){
var e=this.get(_b);
if(e){
e.disabled=!_c;
}
},left:function(_e,_f){
return this.setLTWH(_e,_f,"Left");
},top:function(_10,_11){
return this.setLTWH(_10,_11,"Top");
},width:function(_12,_13){
return this.setLTWH(_12,_13,"Width");
},height:function(_14,_15){
return this.setLTWH(_14,_15,"Height");
},setLTWH:function(_16,_17,_18){
var e=this.get(_16);
if(e){
if((_17!=null)&&!isNaN(parseInt(_17))){
e.style[_18.toLowerCase()]=_17;
}
return e["offset"+_18];
}
},createElement:function(_1a){
return document.standardCreateElement?document.standardCreateElement(_1a):document.createElement(_1a);
},containsElement:function(_1b,_1c){
while((_1c!=null)&&(_1c!=_1b)&&(_1c.parentNode!=null)){
_1c=_1c.parentNode;
}
return (_1c==_1b);
},getElementByTagClass:function(_1d,tag,_1f){
var _20=_1d.getElementsByTagName(tag);
for(var ndx=0;((ndx<_20.length)&&(_20[ndx].className.match(_1f)==null));ndx++){
}
return (ndx<_20.length)?_20[ndx]:null;
},getElementsByTagClass:function(_22,tag,_24){
var _25=new Array();
var _26=_22.getElementsByTagName(tag);
for(var ndx=0;(ndx<_26.length);ndx++){
if(_26[ndx].className.match(_24)){
_25.push(_26[ndx]);
}
}
return _25;
}});

vjo.needs("vjo.dsf.Event");
vjo.needs("vjo.dsf.Element");
vjo.type("vjo.dsf.EventDispatcher").singleton().protos({constructs:function(){
this.eventHandlers={};
this.nativeEventHandlers={};
this.unboundElems=[];
this.fCustomLoad={};
},process:function(_1,_2){
var _3=this.eventHandlers[_1];
if(!_3){
return true;
}
var _4=_3[_2.eventType];
if(!_4){
return true;
}
var _5;
for(var i=0;i<_4.length;i++){
var _7=_4[i].handle(_2);
if(_7&&_7.objType=="dsf_Message"){
if(vjo.dsf.ServiceEngine){
vjo.dsf.ServiceEngine.handleRequest(_7);
}
if(_7.returnData===false){
_5=false;
}
}else{
if(_5!=false&&typeof _7!="undefined"){
_5=_7;
}
}
}
return _5;
},register:function(id,_9,_a,_b){
if(!id||!_9||!_a){
return this;
}else{
if(typeof _a.handle!="function"){
if(typeof _a=="function"){
var _c=_a,scp=_b||this;
var _d={handle:function(){
return _c.apply(scp,arguments);
}};
_a=_d;
}else{
return this;
}
}
}
var _e=this.eventHandlers[id];
if(!_e){
_e=this.eventHandlers[id]={};
}
if(!_e[_9]){
_e[_9]=[];
}
var _f=_e[_9].length;
_e[_9][_f]=_a;
return _a;
},unregister:function(id,_11){
if(!this.eventHandlers[id]){
return;
}
this.eventHandlers[id][_11]=[];
},registerNative:function(_12,_13,_14){
var id=(_12==window)?"body":_12.id;
var _16=this.nativeEventHandlers[id];
if(!_16){
_16=this.nativeEventHandlers[id]={};
}
if(!_16[_13]){
_16[_13]=[];
}
var len=_16[_13].length;
_16[_13][len]=_14;
},add:function(id,_19,_1a,_1b){
if(!id||!_19||!_1a){
return this;
}
var b=this.isBound(id,_19),rv=this.register(id,_19,_1a,_1b);
if(!b){
var b=this.bind(id,_19);
if(b==null){
var len=this.unboundElems.length;
this.unboundElems[len]=id;
}
}
return rv;
},addEventListener:function(_1e,_1f,_20,_21,_22){
var scp=_21||vjo.global;
if(typeof _1e=="string"){
_1e=this.b.Element.get(_1e);
}
if(!_1e){
return false;
}
var _24=function(_25){
var ev=window.event||_25;
var rv=_20.call(scp,ev);
if(rv===false){
vjo.dsf.EventDispatcher.stopEvent(ev);
}
if(typeof rv!="undefined"){
return rv;
}
};
if(window.addEventListener){
_1e.addEventListener(_1f,_24,_22||false);
this.registerNative(_1e,_1f,_24);
return _24;
}else{
if(window.attachEvent){
_1e.attachEvent("on"+_1f,_24);
this.registerNative(_1e,_1f,_24);
return _24;
}
}
_1e["on"+_1f]=_20;
return false;
},bind:function(id,_29){
var _2a=this.b.Element.get(id);
if(id=="body"||_2a==document.body){
_2a=document.body;
if(_29=="load"||_29=="unload"){
var rv=this.addEventListener(window,_29,function(){
var oED=vjo.dsf.EventDispatcher;
if(typeof oED.fCustomLoad[_29]=="function"){
oED.fCustomLoad[_29]();
}
oED[_29]("body");
oED.unregister("body",_29);
oED.fCustomLoad={};
});
if(rv===false){
if(_2a.vjLoadSet){
return this;
}else{
_2a.vjLoadSet=true;
var _2d=window["on"+_29]||"";
if(_2d){
this.fCustomLoad[_29]=_2d;
}
}
}
return this;
}
}
if(_2a){
this.addEventListener(_2a,_29,function(_2e){
return vjo.dsf.EventDispatcher[_29](this,_2e||window.event);
},_2a);
return this;
}
return null;
},reBind:function(){
var eH=this.eventHandlers,uE=this.unboundElems,len=uE.length,tmp=[];
for(var i=0;i<len;i++){
var id=uE[i],hdls=eH[id];
if(hdls){
for(var _32 in hdls){
if(!this.hasBinding(id,_32)){
var rv=this.bind(id,_32);
if(rv==null){
tmp[tmp.length]=id;
}
}
}
}
}
this.unboundElems=tmp;
},isBound:function(id,_35){
var _36=this.eventHandlers[id];
return (_36&&_36[_35]&&_36[_35].length>0)?true:false;
},hasBinding:function(id,_38){
var nEH=this.nativeEventHandlers;
if(nEH[id]&&nEH[id][_38]){
var aH=nEH[id][_38],len=aH.length,rv=false;
for(var i=0;i<len;i++){
var str=aH[i].toString();
if(str&&str.indexOf("vjo.dsf.EventDispatcher")!=-1){
return true;
}
}
}
return false;
},removeEventListener:function(_3d,_3e,_3f){
if(!_3d||!_3e){
return;
}else{
if(typeof _3d=="string"){
_3d=this.b.Element.get(_3d);
}
}
if(window.addEventListener&&_3f){
_3d.removeEventListener(_3e,_3f,false);
}else{
if(window.attachEvent&&_3f){
_3d.detachEvent("on"+_3e,_3f);
}else{
_3d["on"+_3e]=null;
}
}
},detachNativeHandlers:function(_40,_41){
var id=(_40==window)?"body":_40.id;
var _43=this.nativeEventHandlers[id];
if(_43&&_43[_41]){
var h=_43[_41];
for(var i=0;i<h.length;i++){
this.removeEventListener(_40,_41,_43[_41][i]);
}
_43[_41]=[];
}
},detachHandler:function(id,_47,_48){
var _49=this.eventHandlers[id];
if(!_49||!_49[_47]){
return;
}
var h=[],len=_49[_47].length;
for(var i=0;i<len;i++){
if(_48!=_49[_47][i]){
h[h.length]=_49[_47][i];
}
}
this.eventHandlers[id][_47]=h;
},detachHandlers:function(id,_4d){
this.unregister(id,_4d);
var _4e=this.b.Element.get(id);
if(id=="body"){
_4e=window;
}
if(_4e){
this.detachNativeHandlers(_4e,_4d);
}
},stopEvent:function(evt){
this.stopPropagation(evt);
this.preventDefault(evt);
},stopPropagation:function(evt){
if(evt.stopPropagation){
evt.stopPropagation();
}else{
evt.cancelBubble=true;
}
},preventDefault:function(evt){
if(evt.preventDefault){
evt.preventDefault();
}else{
evt.returnValue=false;
}
},target:function(_52){
return this.resolveTextNode((_52.target)?_52.target:_52.srcElement);
},relatedTarget:function(_53){
if(_53.relatedTarget){
return this.resolveTextNode(_53.relatedTarget);
}else{
if((_53.type=="mouseover")&&_53.fromElement){
return this.resolveTextNode(_53.fromElement);
}else{
if((_53.type=="mouseout")&&_53.toElement){
return this.resolveTextNode(_53.toElement);
}else{
return null;
}
}
}
},resolveTextNode:function(_54){
return (_54&&(_54.nodeType==3))?_54.parentNode:_54;
},cleanUp:function(){
var _55=this.nativeEventHandlers;
for(var id in _55){
for(var ev in _55[id]){
if(ev!="unload"){
this.detachHandlers(id,ev,true);
}
}
}
},getId:function(src,id){
var _5a=id;
if(_5a===null||!_5a){
_5a=src.id;
}
return _5a;
},getBodyId:function(src,id){
var _5d=this.getId(src,id);
if(!_5d||src==document.body){
_5d="body";
}
return _5d;
},load:function(src,_5f){
var id=this.getBodyId(src);
var rv=this.process(id,new vjo.dsf.Event(src,"load",_5f));
if(id==="body"){
this.unregister("body","load");
}
return rv;
},unload:function(src,_63){
return this.process(this.getBodyId(src),new vjo.dsf.Event(src,"unload",_63));
},change:function(src,_65){
return this.process(this.getId(src),new vjo.dsf.Event(src,"change",_65));
},submit:function(src,_67){
return this.process(this.getId(src),new vjo.dsf.Event(src,"submit",_67));
},reset:function(src,_69){
return this.process(this.getId(src),new vjo.dsf.Event(src,"reset",_69));
},select:function(src,_6b){
return this.process(this.getId(src),new vjo.dsf.Event(src,"select",_6b));
},blur:function(src,_6d){
return this.process(this.getId(src),new vjo.dsf.Event(src,"blur",_6d));
},focus:function(src,_6f){
return this.process(this.getId(src),new vjo.dsf.Event(src,"focus",_6f));
},keydown:function(src,_71){
return this.process(this.getBodyId(src),new vjo.dsf.Event(src,"keydown",_71));
},keypress:function(src,_73){
return this.process(this.getBodyId(src),new vjo.dsf.Event(src,"keypress",_73));
},keyup:function(src,_75){
return this.process(this.getBodyId(src),new vjo.dsf.Event(src,"keyup",_75));
},click:function(src,_77){
return this.process(this.getBodyId(src),new vjo.dsf.Event(src,"click",_77));
},dblclick:function(src,_79){
return this.process(this.getBodyId(src),new vjo.dsf.Event(src,"dblclick",_79));
},mousedown:function(src,_7b){
return this.process(this.getBodyId(src),new vjo.dsf.Event(src,"mousedown",_7b));
},mousemove:function(src,_7d){
return this.process(this.getBodyId(src),new vjo.dsf.Event(src,"mousemove",_7d));
},mouseout:function(src,_7f){
return this.process(this.getBodyId(src),new vjo.dsf.Event(src,"mouseout",_7f));
},mouseover:function(src,_81){
return this.process(this.getBodyId(src),new vjo.dsf.Event(src,"mouseover",_81));
},mouseup:function(src,_83){
return this.process(this.getBodyId(src),new vjo.dsf.Event(src,"mouseup",_83));
}}).inits(function(){
vjo.dsf.EventDispatcher=new vjo.dsf.EventDispatcher();
vjo.dsf.EventDispatcher.addEventListener(window,"load",function(){
vjo.dsf.EventDispatcher.addEventListener(window,"unload",function(){
vjo.dsf.EventDispatcher.cleanUp();
});
});
});

vjo.type("vjo.dsf.Enc").inits(function(){
if(typeof (vjo.dsf.Enc.unescape)!="undefined"){
return;
}
vjo.dsf.Enc.unescape=window.unescape;
vjo.dsf.Enc.decodeURI=window.decodeURI;
vjo.dsf.Enc.decodeURIComponent=window.decodeURIComponent;
vjo.dsf.Enc.encodeURIComponent=window.encodeURIComponent;
vjo.dsf.Enc.encodeURI=window.encodeURI;
});

// @JsDoNotOptimize

/*
 *
 * Handling Encoding/Decoding more efficently when switching from ISO to UTF-8 
 * for encoding
 *
 */
 vjo.needs("vjo.dsf.Enc"); // not using but these two classes are related do not remove dependency
 
 vjo.type("vjo.darwin.core.encoding.Enc")
 .props({
    /**
      *
      * @access public
      * @return boolean
      */
      
 	isUTF8:function(){
 		// Ebay specific global variable
 		if(typeof(_GlobalNavHeaderUtf8Encoding)!="undefined"){
 			return _GlobalNavHeaderUtf8Encoding;
 		}
 		return false;
 	}
 
 }).inits(function(){
	if (vjo.darwin.core.encoding.Enc.loaded) { 
		return;
	}
	
 	vjo.darwin.core.encoding.Enc.loaded = true;
  	//http://support.microsoft.com/kb/944397
	// ALLOW for backward compatibility between ISO encoding and UTF-8 encoding
	var vjoEscape = window.escape;
	
	// ALLOW for backward compatibility between ISO encoding and UTF-8 encoding
	var vjoUnescape = window.unescape;
	window.unescape  = function(str){
			return decodeURIComponent(str); // might be safest may be problems with partial uris.
			// THIS is a bridget from ISO to UTF-8
	};
 
	// ALLOW for backward compatibility between ISO encoding and UTF-8 encoding
	var vjoDecodeURI = window.decodeURI;
	window.decodeURI = function(str){
	 try {
      		return vjoDecodeURI(str);
        }catch(e){
        	return vjoUnescape(str);
        }
	};
	
	// ALLOW for backward compatibility between ISO encoding and UTF-8 encoding
	var vjoDecodeURIComponent = window.decodeURIComponent;
	window.decodeURIComponent = function(str){
	 try {
      	return vjoDecodeURIComponent(str);
        }catch(e){
        return vjoUnescape(str);
        }
	};

	// ALLOW for backward compatibility between ISO encoding and UTF-8 encoding
	var vjoEncodeURIComponent = window.encodeURIComponent;
	window.encodeURIComponent  = function(str){
		
		var utf8 = vjo.darwin.core.encoding.Enc.isUTF8();
		if(utf8){
			return vjoEncodeURIComponent(str); // might be safest may be problems with partial uris.
		}
		return vjoEscape(str);
	};

	// ALLOW for backward compatibility between ISO encoding and UTF-8 encoding
	var vjoEncodeURI = window.encodeURI;
	window.encodeURI  = function(str){
		
		var utf8 = vjo.darwin.core.encoding.Enc.isUTF8();
		if(utf8){
			return vjoEncodeURI(str); // migh