var onSubmitFunctions=new Array();
function addOnSubmitFunction(_1){
onSubmitFunctions[onSubmitFunctions.length]=_1;
}
function onSubmitFormHandler(){
for(var i=0;i<onSubmitFunctions.length;i++){
onSubmitFunctions[i]();
}
return true;
}
var onloadFunctionArray=new Array();
function addOnloadFunction(_3){
if(_3!=null){
onloadFunctionArray[onloadFunctionArray.length]=_3;
}
}
function doOnload(){
for(var i=0;i<onloadFunctionArray.length;i++){
onloadFunctionArray[i]();
}
}
window.onload=doOnload;


var onunloadFunctionArray=new Array();
function addOnunloadFunction(_1){
if(_1!=null){
onunloadFunctionArray[onunloadFunctionArray.length]=_1;
}
}
function doOnunload(){
for(var i=0;i<onunloadFunctionArray.length;i++){
onunloadFunctionArray[i]();
}
}
window.onunload=doOnunload;


if(window&&window.top&&(window!=window.top)){
top.location.href=location.href;
}
String.prototype.trim=function(){
return this.replace(/^\s+|\s+$/g,"");
};
function getElementByIdIndependant(_1){
var _2=null;
if(document.getElementById){
_2=document.getElementById(_1);
}else{
if(document.all){
_2=document.all[_1];
}
}
return _2;
}
function getElementsByTagNameIndependant(_3,_4){
var _5=null;
if(document.all){
alert("here: "+document+"  / "+_3);
alert("here: "+document.getElementsByTagName);
alert("here: "+_3.getElementsByTagName);
_5=_3.tags(_4);
}
}
function ie_getElementsByTagName(_6){
if(_6=="*"){
return document.all;
}else{
return document.all.tags(_6);
}
}
function getElementsByTagNameAndIdPrefix(_7,_8){
var _9=document.getElementsByTagName(_7);
var _a=new Array();
for(var i=0;i<_9.length;i++){
var _c=_9[i];
if(_c.id.indexOf(_8)==0){
_a[_a.length]=_c;
}
}
return _a;
}
function getChildNodesByTagName(_d,_e){
var _f=_e.toLowerCase();
var _10=_d.childNodes;
var _11=new Array();
for(var i=0;i<_10.length;i++){
var _13=_10[i];
if(_13.nodeName.toLowerCase()==_f){
_11[_11.length]=_13;
}
}
return _11;
}
function getMultipleFormElements(_14,_15){
var _16=_14.elements;
var _17=new Array();
for(var i=0;i<_16.length;i++){
var _19=_16[i];
if((_19!=null)&&(_19.name==_15)){
_17[_17.length]=_19;
}
}
return _17;
}
function hideElement(_1a){
if(_1a==null){
}else{
_1a.style.display="none";
}
}
function showElement(_1b){
if(_1b==null){
}else{
_1b.style.display="";
}
}
function clearSelectOptions(_1c){
if(_1c==null){
}else{
if(_1c.options!=null){
var _1d=_1c.options.length;
for(var j=(_1d-1);j>=0;j--){
_1c.options[j]=null;
}
}
}
}
function setDivText(_1f,_20){
var _21=getElementByIdIndependant(_1f);
_21.innerHTML=_20;
}
function simpleToggleElementDisplay(_22){
var el=getElementByIdIndependant(_22);
if(el==null){
return;
}
if(el.style.display=="none"){
el.style.display="";
}else{
el.style.display="none";
}
}
function toggleDisplay(_24,_25,_26,_27){
var el=null;
var _29;
if(document.getElementById){
el=document.getElementById(_25);
_29=document.getElementById(_24);
}else{
if(document.all){
el=document.all[_25];
_29=document.all[_24];
}
}
if(el==null||_29==null){
return;
}
if(el.style.display=="none"){
el.style.display="";
_29.innerHTML=_26;
}else{
el.style.display="none";
_29.innerHTML=_27;
}
}
function toggleStyle(_2a,_2b,_2c,_2d,_2e,_2f){
if(_2b.substr){
toggleIndividualStyle(_2a,_2b,_2c,_2d,_2e,_2f);
}else{
if(_2b.join){
for(var i=0;i<_2b.length;i++){
var _31=_2b[i];
toggleIndividualStyle(_2a,_31,_2c,_2d,_2e,_2f);
}
}else{
}
}
}
function toggleIndividualStyle(_32,_33,_34,_35,_36,_37){
el=getElementByIdIndependant(_33);
elLink=getElementByIdIndependant(_32);
if(el==null||elLink==null){
return;
}
if(el.className.indexOf(_37)>=0){
elLink.innerHTML=_34;
el.className=substituteText(el.className,_37,_36);
}else{
if(el.className.indexOf(_36)>=0){
elLink.innerHTML=_35;
el.className=substituteText(el.className,_36,_37);
}else{
el.className=el.className+" "+_36;
}
}
}
function substituteText(_38,_39,_3a){
var _3b=_38;
var _3c=_38.indexOf(_39);
if(_3c>=0){
var _3d=_38.substring(0,_3c);
var _3e=_38.substring(_3c+_39.length,_38.length);
_3b=_3d+_3a+_3e;
}else{
_3b=_38;
}
return _3b;
}
function addStyleClass(_3f,_40){
if(_3f&&_3f.className&&_40){
var _41=_40.trim();
var _42=_3f.className.trim();
if(!((_42.indexOf(_41)>=0))){
_3f.className+=" "+_41;
}
}else{
}
}
function removeStyleClass(_43,_44){
if(_43&&_43.className&&_44){
var _45=_43.className.trim();
var _46=_44.trim();
if(_45.indexOf(_46)>=0){
_43.className=substituteText(_45,_46,"");
_43.className=_43.className.trim();
}
}else{
}
}
function closewin(_47){
window.opener.focus();
window.opener.document.location.href=_47;
window.close();
}
function openwin(_48){
var _49=window.open(_48,"openwin","height=400,width=550,resizable=1,scrollbars=1,status=0,location=0,menubar=1,toolbar=0");
_49.focus();
}
function openwinMoreImages(_4a){
var _4b=window.open(_4a,"openwin","height=640,width=640,resizable=0,scrollbars=0,status=0,location=0,menubar=0,toolbar=0");
_4b.focus();
}
function openwinSmall(_4c){
var _4d=window.open(_4c,"openwin","height=350,width=500,resizable=1,scrollbars=1,status=0,location=0,menubar=1,toolbar=0");
_4d.focus();
}
function openwinTall(_4e){
var _4f=window.open(_4e,"openwin","height=850,width=800,resizable=1,scrollbars=1,status=0,location=0,menubar=1,toolbar=0");
_4f.focus();
}
function openwinWide(_50){
var _51=window.open(_50,"openwin","height=730,width=920,resizable=1,scrollbars=1,status=0,location=0,menubar=1,toolbar=0");
_51.focus();
}
function openwin(_52,_53){
var _54=window.open(_52,_53,"height=400,width=550,resizable=1,scrollbars=1,status=0,location=0,menubar=1,toolbar=0");
_54.focus();
}
function openwin(_55,_56,_57,_58){
var _59="height="+_57+",width="+_58;
var _5a=window.open(_55,_56,_59+",resizable=1,scrollbars=1,status=0,location=0,menubar=1,toolbar=0");
_5a.focus();
}
function formSubmit(_5b,_5c,_5d,_5e,_5f,_60,_61,_62,_63,_64){
if(onSubmitFormHandler!=null){
onSubmitFormHandler();
}else{
}
if(document.forms[_5b]==null){
}
var _65=document.forms[_5b];
_65.elements["step"].value=_5c;
_65.elements["op_action"].value=_5d;
if(_5e!=null){
_65.elements["op_flavour"].value=_5e;
}
if(_5f!=null&&_60!=null){
if(_65.elements[_5f]==null){
}
_65.elements[_5f].value=_60;
}
if(_61!=null&&_62!=null){
_65.elements[_61].value=_62;
}
if(_63!=null&&_64!=null){
_65.elements[_63].value=_64;
}
_65.submit();
}
function toggleRadioControlledDisplay(_66){
var _67=_66.name;
var _68=_66.value;
var _69=_67+"_"+_68;
var _6a=null;
if(is_ie){
_6a=document.all.tags("div");
}else{
_6a=document.getElementsByTagName("div");
}
if(_6a!=null){
for(var i=0;i<_6a.length;i++){
var _6c=_6a[i];
if(_6c.id.indexOf(_67)>=0){
if(_6c.id==_69){
_6c.style.display="";
}else{
_6c.style.display="none";
}
}
}
}else{
}
}
var preloadedImages=new Array();
function preloadImages(){
var _6d=arguments;
for(var i=0;i<_6d.length;i++){
var _6f=new Image();
_6f.src=_6d[i];
preloadedImages[preloadedImages.length]=_6f;
}
}
function doTextFormElementMouseover(_70){
this.className="textFormFocus";
return false;
}
function doTextFormElementMouseout(_71){
if(!(this.hasFocus)||(!this.hasFocus)){
this.className="textFormBlur";
}
return false;
}
function doTextFormElementFocus(_72){
this.hasFocus=true;
this.className="textFormFocus";
return false;
}
function doTextFormElementBlur(_73){
this.hasFocus=false;
this.className="textFormBlur";
return false;
}
function link(_74){
window.location.href=_74;
}
function doNothing(){
return false;
}


function createOption(_1,_2){
var _3=new Option();
_3.value=_1;
_3.text=_2;
return _3;
}
function addOptions(_4,_5){
for(var i=0;i<_5.length;i++){
_4.options[i]=_5[i];
}
}
function getSelectedOptionValue(_7){
var _8;
var _9=getSelectedOption(_7);
if(_9){
_8=_9.value;
}else{
_8="";
}
return _8;
}
function getSelectedOption(_a){
var _b;
if(_a.selectedIndex>-1){
_b=_a.options[_a.selectedIndex];
}else{
_b=null;
}
return _b;
}
function clearSelect(_c){
if(!_c){
return;
}
var _d=_c.options;
for(var i=(_d.length-1);i>=0;i--){
_c.options[i]=null;
}
}
function doFormSubmit(_f){
var _10=_f.form;
if(!_10){
return;
}
if(onSubmitFormHandler!=null){
onSubmitFormHandler();
}
var _11=_f.action;
if(_11&&_10.op_action){
_10.op_action.value=action;
}
var _12=_f.step;
if(_12&&_10.step){
_10.step.value=_12;
}
var _13=_f.flavour;
if(_13&&_10.op_flavour){
_10.op_flavour.value=_13;
}
_10.submit();
}
function submitTheForm(_14,_15,_16){
if(onSubmitFormHandler!=null){
onSubmitFormHandler();
}
_14.op_action.value=_15;
_14.step.value=_16;
_14.submit();
}
function submitTheForm(_17,_18,_19,_1a){
if(onSubmitFormHandler!=null){
onSubmitFormHandler();
}
_17.op_action.value=_18;
_17.step.value=_19;
_17.op_flavour.value=_1a;
_17.submit();
}
function getRadioCheckedValue(_1b){
var _1c=null;
if(!_1b){
_1c="";
}else{
var _1d=_1b.length;
if(_1d==null){
if(_1b.checked){
_1c=_1b.value;
}else{
_1c="";
}
}
for(var i=0;i<_1d;i++){
if(_1b[i].checked){
_1c=_1b[i].value;
}
}
}
return _1c;
}
function getPleaseWaitOnSubmitButtonClosure(_1f,_20,_21){
var _22=function(){
var _23=document.forms[_1f];
pleaseWaitOnSubmitButton(_23,_20,_21);
};
return _22;
}
function pleaseWaitOnSubmitButton(_24,_25,_26){
if((!_24)||(!_25)){
}else{
var _27=getButtonSubmit(_24);
if(_27){
var _28=createPleaseWaitButton(_26);
_28.disabled=true;
_28.className=_27.className;
replaceNode(_28,_27);
}
}
}
function getPleaseWaitOnSubmitClosure(_29,_2a){
var _2b=function(){
var _2c=document.forms[_29];
pleaseWaitOnSubmit(_2c,_2a);
};
return _2b;
}
function pleaseWaitOnSubmit(_2d,_2e,_2f){
if((!_2d)||(!_2e)){
}else{
var _30=getImageInput(_2d);
if(_30){
var _31=null;
if(_2f){
_31=createImage(_2f);
}else{
_31=createImage("/images/please-wait-"+_2e+".gif");
}
if(!_30){
return true;
}
if(_30.className){
_31.className=_30.className;
}
if(_30){
replaceNode(_31,_30);
}
}
}
return true;
}
function getButtonSubmit(_32){
var _33=null;
var _34=_32.getElementsByTagName("input");
for(var i=0;i<_34.length;i++){
var _36=_34[i];
if((_36.type.toLowerCase()=="submit")||(_36.className&&((_36.className=="submitbutton")&&(_36.type.toLowerCase()=="button")))){
_33=_36;
break;
}
}
return _33;
}
function getImageInput(_37){
var _38=null;
var _39=_37.getElementsByTagName("input");
for(var i=0;i<_39.length;i++){
var _3b=_39[i];
if(_3b.type.toLowerCase()=="image"){
_38=_3b;
break;
}
}
return _38;
}
function replaceNode(_3c,_3d){
if(_3c&&_3d){
var _3e=_3d.parentNode;
if(_3e){
_3e.replaceChild(_3c,_3d);
}
}
}
function createPleaseWaitButton(_3f){
var _40=document.createElement("input");
_40.type="button";
_40.value=_3f;
return _40;
}
function createImage(_41){
var img=document.createElement("img");
img.src=_41;
return img;
}
function toggleBooleanRadioDisplay(_43,_44){
var _45=getRadioCheckedValue(_43);
var _46=getElementByIdIndependant(_44);
if(_46){
if(_45=="true"){
showElement(_46);
}else{
hideElement(_46);
}
}
}
function clearInputWithValue(_47,_48){
if(_47&&(_47.value==_48)){
_47.value="";
}
}
function checkInputWithValue(_49,_4a){
if(_49&&(new String(_49.value).trim()=="")){
_49.value=_4a;
}
}
function setRadioInnerHTML(_4b,_id,_4d){
var _4e=getElementByIdIndependant(_id);
if(_4e){
_4e.innerHTML=_4d;
}
}


function AjaxUtil(){
}
AjaxUtil.getElementByTagName=function(_1,_2){
var _3=null;
var _4=_1.getElementsByTagName(_2);
if(_4&&(_4.length>0)){
_3=_4[0];
}else{
_3=null;
}
return _3;
};
AjaxUtil.clearDivElement=function(_5){
if(_5&&_5.childNodes){
var _6=_5.childNodes.length-1;
for(var i=_6;i>=0;i--){
var _8=_5.childNodes[i];
_5.removeChild(_8);
}
}
};
AjaxUtil.createDivElement=function(_9,_a){
var _b=document.createElement("div");
if(_9){
_b.id=_9;
}
if(_a){
_b.className=_a;
}
return _b;
};
AjaxUtil.createLinkElement=function(_c,_d,_e,_f){
var _10=document.createElement("a");
_10.href=_d;
if(_f){
_10.target=_f;
}
if(_e&&(_e!=null)){
var _11=document.createTextNode(_e);
_10.appendChild(_11);
}
if(_c&&(_c!=null)){
_10.className=_c;
}
return _10;
};
AjaxUtil.createImageElement=function(_id,_13,_14,_15){
var _16=document.createElement("img");
AjaxUtil.setNodeIdAndClass(_16,_id,_13);
_16.src=_14;
if(_15&&(_15!=null)){
_16.alt=_15;
}
return _16;
};
AjaxUtil.setNodeIdAndClass=function(_17,_id,_19){
if(_17&&_id&&(_id!=null)){
_17.id=_id;
}
if(_17&&_19&&(_19!=null)){
_17.className=_19;
}
};
AjaxUtil.getText=function(_1a){
var _1b="";
if(_1a!=null){
if(_1a.nodeValue){
_1b+=_1a.nodeValue;
}else{
if(_1a.childNodes){
for(var i=0;i<_1a.childNodes.length;i++){
var _1d=_1a.childNodes[i];
if(_1d.nodeValue!=null){
_1b+=_1d.nodeValue;
}
}
}
}
}
return _1b;
};
AjaxUtil.disableButton=function(_1e,_1f){
if(_1e&&_1f){
_1e.disabled=true;
_1e.value=_1f;
}
};
AjaxUtil.enableButton=function(_20,_21){
if(_20&&_21){
_20.disabled=false;
_20.value=_21;
}
};
AjaxUtil.createBrElement=function(){
return document.createElement("br");
};
AjaxUtil.createBoldElement=function(_22){
var _23=document.createElement("b");
if(_22){
var _24=document.createTextNode(_22);
_23.appendChild(_24);
}
return _23;
};
AjaxUtil.appendSimpleNameValueDisplayPair=function(_25,_26,_27,_28){
_25.appendChild(AjaxUtil.createBoldElement(_26));
_25.appendChild(document.createTextNode(_27));
if(_28){
_25.appendChild(AjaxUtil.createBrElement());
_25.appendChild(AjaxUtil.createBrElement());
}
};
AjaxUtil.appendNameLinkDisplayPair=function(_29,_2a,_2b,_2c){
_29.appendChild(AjaxUtil.createBoldElement(_2a));
_29.appendChild(_2b);
if(_2c){
_29.appendChild(AjaxUtil.createBrElement());
_29.appendChild(AjaxUtil.createBrElement());
}
};
AjaxUtil.READY_STATE_UNINITIALIZED=0;
AjaxUtil.READY_STATE_LOADING=1;
AjaxUtil.READY_STATE_LOADED=2;
AjaxUtil.READY_STATE_INTERACTIVE=3;
AjaxUtil.READY_STATE_COMPLETE=4;
AjaxUtil.ContentLoader=function(_2d,_2e,_2f,_30,_31,_32){
this.url=_2d;
this.onload=_2e;
this.onerror=(_2f)?_2f:this.defaultError;
this.method=(_30)?_30:"GET";
this.data=_31;
this.req=null;
this.asynchronous=(_32!=null)&&(_32!=undefined)?_32:true;
this.loadContent();
};
AjaxUtil.ContentLoader.prototype={loadContent:function(){
if(window.XMLHttpRequest){
this.req=new XMLHttpRequest();
}else{
if(window.ActiveXObject){
this.req=new ActiveXObject("Microsoft.XMLHTTP");
}
}
if(this.req){
try{
var _33=this;
this.req.onreadystatechange=function(){
_33.onReadyState.call(_33);
};
this.req.open(this.method,this.url,this.asynchronous);
this.req.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=iso-8859-1");
this.req.send(this.data);
}
catch(err){
this.onerror.call(this);
}
}
},onReadyState:function(){
var _34=this.req.readyState;
if(_34==AjaxUtil.READY_STATE_COMPLETE){
var _35=this.req.status;
if(_35==200||_35==0){
this.onload.call(this);
}else{
this.onerror.call(this);
}
}
},defaultError:function(){
alert("error fetching data: "+"\n\nreadState: "+this.req.readyState+"\nstatus: "+this.req.status+"\nheaders: "+this.req.getAllResponseHeaders());
}};
AjaxUtil.setElementId=function(_36,_id){
if(_id&&(_id!=null)){
_36.id=_id;
}
};
AjaxUtil.setElementOnclick=function(_38,_39){
if(_39&&(_39!=null)){
_38.onclick=_39;
}
};
AjaxUtil.setElementClassName=function(_3a,_3b){
if(_3b&&(_3b!=null)){
_3a.className=_3b;
}
};


function doSsoCookie(_1){
var _2=_1.width;
if(_2==1){
updateSessionCookie(".tomcatA");
}else{
if(_2==2){
updateSessionCookie(".tomcatB");
}else{
if(_2==3){
updateSessionCookie(".tomcatC");
}else{
if(_2==42){
updateSessionCookie(".tomcatS");
}else{
window.locationBar="unknown : "+_2+" / "+_1.src;
}
}
}
}
}
function updateSessionCookie(_3){
var _4=new Cookie(document,"JSESSIONID");
_4.load();
var _5=_4.getValue();
var _6=false;
var _7=_5.substr(_5.indexOf(".tomcat"));
var _8=_5.indexOf(_3)<0;
if(_8||_6){
_4.remove();
_4=new Cookie(document,"JSESSIONID");
_4.load();
_5=_4.getValue();
var _9=document.location.href;
var _a=_9.replace(/^(http\:\/\/[a-z-]+\.[a-z-]+\.com?(?:\.[a-z]{2,6})?\/).*/,"$1");
var _b=_a+"setsession.do;jsessionid="+_3+"?t="+new Date().getTime();
var _c=new AjaxUtil.ContentLoader(_b,redoTracker,redoTrackerError,"GET",null,true);
}else{
}
}
function redoTracker(){
var _d=this.req.responseXML;
var _e=AjaxUtil.getText(AjaxUtil.getElementByTagName(_d,"result"));
var _f=new Cookie(document,"JSESSIONID");
_f.load();
var _10=_f.getValue();
var img=document.getElementById("tracker");
if(img){
var _12=img.src.replace(/^(http\:\/\/[a-z-]+\.[a-z-]+\.com?(?:\.[a-z]{2,6})?\/[a-z-]+\.[a-z]+).*/,"$1");
var _13=new Image();
_13.src=_12+"?sid="+_e+"&t="+new Date().getTime();
}
}
function redoTrackerError(){
window.locationBar="issue with the content loading: "+this.url;
}


function Cookie(_1,_2,_3,_4,_5,_6){
this.$document=_1;
this.$name=_2;
if(_3){
this.$expiration=new Date((new Date()).getTime()+_3*3600000);
}else{
this.$expiration=null;
}
if(_4){
this.$path=_4;
}else{
this.$path=null;
}
if(_5){
this.$domain=_5;
}else{
this.$domain=null;
}
if(_6){
this.$secure=true;
}else{
this.$secure=false;
}
}
function _Cookie_store(){
var _7="";
for(var _8 in this){
if((_8.charAt(0)=="$")||((typeof this[_8])=="function")){
continue;
}
if(_7!=""){
_7+="&";
}
_7+=_8+":"+escape(this[_8]);
}
var _9="";
if(this.$value){
_9=this.$name+"="+this.$value;
}else{
_9=this.$name+"="+_7;
}
if(this.$expiration){
_9+="; expires="+this.$expiration.toGMTString();
}
if(this.$path){
_9+="; path="+this.$path;
}
if(this.$domain){
_9+="; domain="+this.$domain;
}
if(this.$secure){
_9+="; secure";
}
this.$document.cookie=_9;
}
function _Cookie_load(){
var _a=this.$document.cookie;
if(_a==""){
return false;
}
var _b=_a.indexOf(this.$name+"=");
if(_b==-1){
return false;
}
_b+=this.$name.length+1;
var _c=_a.indexOf(";",_b);
if(_c==-1){
_c=_a.length;
}
var _d=_a.substring(_b,_c);
this.$value=_d;
var a=_d.split("&");
for(var i=0;i<a.length;i++){
a[i]=a[i].split(":");
}
for(var i=0;i<a.length;i++){
this[a[i][0]]=unescape(a[i][1]);
}
return true;
}
function _Cookie_remove(){
var _10;
_10=this.$name+"=";
if(this.$path){
_10+="; path="+this.$path;
}
if(this.$domain){
_10+="; domain="+this.$domain;
}
_10+="; expires=Fri, 02-Jan-1970 00:00:00 GMT";
this.$document.cookie=_10;
}
function _Cookie_setValue(_11){
if(_11!=null){
this.$value=_11;
}
}
function _Cookie_getValue(){
var _12="";
if(this.$value){
_12=this.$value;
}else{
_12="";
}
return _12;
}
new Cookie();
Cookie.prototype.store=_Cookie_store;
Cookie.prototype.load=_Cookie_load;
Cookie.prototype.remove=_Cookie_remove;
Cookie.prototype.setValue=_Cookie_setValue;
Cookie.prototype.getValue=_Cookie_getValue;


var gObjTs=new TextSelect();
var gObjLastActive;
var gBoolNoResults=false;
var gBoolIsTiming;
function AddHandler(_1){
_1.onkeyup=GiveOptions;
_1.onblur=function(){
if(this.conf.useTimeout){
StartTimeout();
}
};
if(gObjTs.getIsOpera()){
_1.onkeypress=GiveOptions;
}
}
function SetProperties(_2,_3,_4,_5,_6,_7,_8,_9,_a,_b){
var _c={inputTextbox:_2,inputHidden:_3,serverUrl:_4,regExFlags:((_5)?"i":""),regExAny:((_6)?"":"^"),matchAnywhere:_6,matchTextBoxWidth:_7,theVisibleTime:_b,showNoMatchMessage:_8,noMatchingDataMessage:_9,useTimeout:_a};
AddHandler(_2);
return _c;
}
function GiveOptions(e){
var _e=-1;
if(window.event){
_e=event.keyCode;
gObjTs.setInputTextbox(event.srcElement);
}else{
_e=e.which;
gObjTs.setInputTextbox(e.target);
}
if(gObjTs.getInputTextbox().conf.useTimeOut){
if(gBoolIsTiming){
StartTimeout();
}
}
if(gObjTs.getInputTextbox().value.length==0&&!gObjTs.getIsOpera()){
gObjTs.setAllMatches(new Array());
HideTheBox();
gObjTs.setLastInputValue("");
gObjTs.setLastRequestedValue("cualquier-cosa");
return false;
}
gObjTs.getInputTextbox().conf.inputHidden.value="";
if(gObjLastActive==gObjTs.getInputTextbox()){
if(_e==13){
GrabHighlighted();
gObjTs.getInputTextbox().blur();
return false;
}else{
if(_e==38){
MoveHighLight(-1);
return false;
}else{
if(_e==40){
MoveHighLight(1);
return false;
}
}
}
}
if((gObjTs.getInputTextbox().value.length>=2)&&(!gObjTs.getMadeRequest())&&((gObjLastActive!=gObjTs.getInputTextbox())||(gObjTs.getInputTextbox().value.indexOf(gObjTs.getLastRequestedValue())<0)||(((gObjTs.getAllMatches().length==0)||(gObjTs.getAllMatches().length==15))&&!gBoolNoResults))){
gObjLastActive=gObjTs.getInputTextbox();
gObjTs.setMadeRequest(true);
TypeAhead(gObjTs.getInputTextbox().value);
gObjTs.setLastRequestedValue(gObjTs.getInputTextbox().value);
}else{
if(!gObjTs.getMadeRequest()){
BuildList(gObjTs.getInputTextbox().value);
}
}
gObjTs.setLastInputValue(gObjTs.getInputTextbox().value);
}
function TypeAhead(_f){
var _10="bpl_name="+_f;
var _11=new AjaxUtil.ContentLoader(gObjTs.getInputTextbox().conf.serverUrl,BuildChoices,null,"POST",_10);
}
function BuildError(){
alert("issue loading: ");
gObjTs.setMadeRequest(true);
setTimeout("UnsetBooMadeRequest()",2000);
}
function UnsetBoolMadeRequest(){
gObjTs.setMadeRequest(false);
}
function BuildChoices(){
var _12=this.req.responseText;
eval(_12);
BuildList(gObjTs.getLastInputValue());
gObjTs.setMadeRequest(false);
}
function BuildList(_13){
SetElementPosition(gObjTs.getInputTextbox());
gObjTs.setMatches(_13);
var _14=gObjTs.getDisplayMatches();
_14=_14.join().replace(/\,/gi,"");
if(_14.length>0){
document.getElementById("spanOutput").innerHTML=_14;
document.getElementById("OptionsList_0").className="spanHighElement";
gObjTs.setCurrentMatchSelected(0);
gBoolNoResults=false;
}else{
currentValueSelect=-1;
gBoolNoResults=true;
if(gObjTs.getInputTextbox().conf.showNomatchMessage){
document.getElementById("spanOutput").innerHTML="<span class=\"noMatchData\">"+gObjTs.getInputTextbox().conf.noMatchingMessage+"</span>";
}else{
HideTheBox();
}
}
}
function SetElementPosition(_15){
var _16=0;
var _17=0;
var _18=_15;
if(!_18){
return;
}
var _19=_18.offsetHeight;
var _1a=_18.offsetWidth;
while(_18!=null){
_16+=_18.offsetLeft;
_17+=_18.offsetTop;
_18=_18.offsetParent;
}
var _1b=document.getElementById("spanOutput");
_1b.style.left=_16+"px";
_1b.style.top=(_17+_19)+"px";
if(_15.conf.matchTextBoxWidth){
_1b.style.width=_1a;
}
_1b.style.display="block";
if(_15.conf.useTimeout){
_1b.onmouseout=StartTimeout;
_1b.onmouseover=EraseTimeout;
}else{
_1b.onmouseout=null;
_1b.onmouseover=null;
}
}
function MoveHighLight(_1c){
if(gObjTs.getCurrentMatchSelected()>=0){
var _1d=parseInt(gObjTs.getCurrentMatchSelected())+parseInt(_1c);
if((_1d>-1)&&(_1d<gObjTs.getDisplayMatchesCount())){
gObjTs.setCurrentMatchSelected(_1d);
SetHighColor(null);
}
}
}
function SetHighColor(_1e){
if(_1e){
gObjTs.setCurrentMatchSelected(_1e.id.slice(_1e.id.indexOf("_")+1,_1e.id.length));
}
for(var i=0;i<gObjTs.getDisplayMatchesCount();i++){
try{
document.getElementById("OptionsList_"+i).className="spanNormalElement";
}
catch(err){
alert("issue with i: "+i);
}
}
document.getElementById("OptionsList_"+gObjTs.getCurrentMatchSelected()).className="spanHighElement";
}
function SetText(_20){
gObjTs.getInputTextbox().value=gObjTs.getAllMatches()[_20][0];
var _21=gObjTs.getAllMatches()[_20][1];
gObjTs.getInputTextbox().conf.inputHidden.value=_21;
document.getElementById("spanOutput").style.display="none";
gObjTs.setCurrentMatchSelected(-1);
gObjTs.getInputTextbox().form.submit();
}
function GrabHighlighted(){
if(gObjTs.getCurrentMatchSelected()>=0){
var _22=document.getElementById("OptionsList_"+gObjTs.getCurrentMatchSelected()).getAttribute("theArrayNumber");
SetText(_22);
HideTheBox();
}
}
function HideTheBox(){
document.getElementById("spanOutput").style.display="none";
gObjTs.setCurrentMatchSelected(-1);
EraseTimeout();
}
function EraseTimeout(){
clearTimeout(gBoolIsTiming);
gBoolIsTiming=false;
}
function StartTimeout(){
gBoolIsTiming=setTimeout("HideTheBox()",gObjTs.getInputTextbox().conf.theVisibleTime*1000);
}
function TextSelect(){
this.displayMatchesLimit=15;
this.requestedOptions=new Array();
this.allMatches=new Array();
this.displayMatches=new Array();
this.isOperat=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);
this.lastInputValue="";
this.lastRequestedValue="cualquier-cosa";
this.inputTextbox=null;
this.madeRequest=false;
this.currentMatchSelected="0";
this.displayMatchesCount=0;
}
TextSelect.UNDERLINE_START="<span class=\"spanMatchText\">";
TextSelect.UNDERLINE_END="</span>";
TextSelect.SELECT_SPAN_START="<span style=\"width:100%;display:block;\" class=\"spanNormalElement\" onmouseover=\"SetHighColor(this)\" ";
TextSelect.SELECT_SPAN_END="</span>";
TextSelect.prototype.getMadeRequest=function(){
return this.madeRequest;
};
TextSelect.prototype.setMadeRequest=function(_23){
return this.madeRequest=_23;
};
TextSelect.prototype.getRequestedOptions=function(){
return this.requestedOptions;
};
TextSelect.prototype.setRequestedOptions=function(){
return this.requestedOptions;
};
TextSelect.prototype.getLastInputValue=function(){
return this.lastInputValue;
};
TextSelect.prototype.setLastInputValue=function(_24){
this.lastInputValue=_24;
};
TextSelect.prototype.getLastRequestedValue=function(){
return this.lastRequestedValue;
};
TextSelect.prototype.setLastRequestedValue=function(_25){
this.lastRequestedValue=_25;
};
TextSelect.prototype.getInputTextbox=function(){
return this.inputTextbox;
};
TextSelect.prototype.setInputTextbox=function(_26){
this.inputTextbox=_26;
};
TextSelect.prototype.getAllMatches=function(){
return this.allMatches;
};
TextSelect.prototype.setAllMatches=function(_27){
this.allMatches=_27;
};
TextSelect.prototype.getDisplayMatches=function(){
return this.displayMatches;
};
TextSelect.prototype.setDisplayMatches=function(_28){
this.displayMatches=_28;
};
TextSelect.prototype.getDisplayMatchesCount=function(){
return this.displayMatchesCount;
};
TextSelect.prototype.setDisplayMatchesCount=function(_29){
this.displayMatchesCount=_29;
};
TextSelect.prototype.getDisplayMatchesLimit=function(){
return this.displayMatchesLimit;
};
TextSelect.prototype.setDisplayMatchesLimit=function(_2a){
this.displayMatchesLimit=_2a;
};
TextSelect.prototype.getCurrentMatchSelected=function(){
return this.currentMatchSelected;
};
TextSelect.prototype.setCurrentMatchSelected=function(_2b){
this.currentMatchSelected=_2b;
};
TextSelect.prototype.getIsOpera=function(){
return this.isOpera;
};
TextSelect.prototype.setMatches=function(_2c){
var _2d=new Array();
var _2e=new RegExp(this.getInputTextbox().conf.regExAny+_2c,this.getInputTextbox().conf.regExFlags);
var _2f=this.getAllMatches();
var _30=0;
for(var i=0;i<_2f.length;i++){
var _32=_2f[i][0].match(_2e);
if(_32){
_2d[_2d.length]=this.createUnderline(_2f[i][0],_2c,i,_30);
_30++;
}
}
var _2f=new Array();
if(_2d.length>this.getDisplayMatchesLimit()){
for(var i=0;i<this.getDisplayMatchesLimit();i++){
_2f[_2f.length]=_2d[i];
}
_2f[_2f.length]=CreateMoreOptions(_2d.length-this.getDisplayMatchesLimit());
this.setDisplayMatchesCount(this.getDisplayMatchesLimit());
}else{
_2f=_2d;
this.setDisplayMatchesCount(_2f.length);
}
this.setDisplayMatches(_2f);
};
TextSelect.prototype.createUnderline=function(_33,_34,_35,_36){
var _37=" onclick=\"SetText("+_35+")\" id=\"OptionsList_"+_36+"\" theArrayNumber=\""+_35+"\">";
var _38=new RegExp(this.getInputTextbox().conf.regExAny+_34,this.getInputTextbox().conf.regExFlags);
var _39=_33.search(_38);
var _3a=_33.substring(_39,_39+_34.length);
return TextSelect.SELECT_SPAN_START+_37+_33.replace(_38,TextSelect.UNDERLINE_START+_3a+TextSelect.UNDERLINE_END)+TextSelect.SELECT_SPAN_END;
};
function CreateMoreOptions(_3b){
return "<span style=\"width:100%;display:block;\" class=\"spanNormalElement\">... "+_3b+" more options</span>";
}


function searchPage(_1){
var _2=getSelectorForm();
if(_2){
_2.results_page.value=_1;
_2.submit();
}else{
alert("issue no profile selector form!: "+document.forms.length);
}
}
function getSelectorForm(){
var _3=null;
if(document.forms&&(document.forms.length>0)){
for(var i=0;i<document.forms.length;i++){
var _5=document.forms[i];
if(_5.results_page){
_3=_5;
}
}
}
return _3;
}
function saveSearch(_6){
if(_6){
document.forms[0].action="/search-profile-submit-clear_"+_6+".html";
}else{
document.forms[0].action="/search-profile-submit-clear_es_AR.html";
}
document.forms[0].step.value="0";
document.forms[0].submit();
}


function getXmlRequest(){
var _1=null;
try{
_1=new XMLHttpRequest();
}
catch(trymicrosft){
try{
_1=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(othermicrosoft){
try{
_1=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(failed){
_1=null;
}
}
}
return _1;
}
var errorRequest=getXmlRequest();
var errorUrl="/ajax/error-handler.jsp";
function handleError(_2,_3,_4){
try{
var _5="err_message="+escape(_2);
_5+="&err_url="+escape(_3);
_5+="&err_line="+escape(_4);
errorRequest.open("POST",errorUrl,true);
errorRequest.onreadystatechange=goToErrorPage;
errorRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=iso-8859-1");
errorRequest.send(_5);
}
catch(_error){
}
}
function goToErrorPage(){
if(errorRequest.readyState==4){
if(errorRequest.status==200){
}else{
}
}
}
window.onerror=handleError;
function getElementByTagName(_6,_7){
var _8=null;
var _9=_6.getElementsByTagName(_7);
if(_9&&(_9.length>0)){
_8=_9[0];
}else{
_8=null;
}
return _8;
}
function getText(_a){
var _b="";
if(_a!=null){
if(_a.nodeValue){
_b+=_a.nodeValue;
}else{
if(_a.childNodes){
for(var i=0;i<_a.childNodes.length;i++){
var _d=_a.childNodes[i];
if(_d.nodeValue!=null){
_b+=_d.nodeValue;
}
}
}
}
}
return _b;
}


function AreaSelector(_1,_2,_3,_4,_5){
this.dataRequest=getXmlRequest();
this.targetSelectId=_1;
this.pleaseSelectOption=_3;
this.provinceElem=_4;
this.clientLocale=_2;
this.countryElem=_5;
}
AreaSelector.prototype.getDataRequest=function(){
return this.dataRequest;
};
AreaSelector.prototype.getTargetSelectId=function(){
return this.targetSelectId;
};
AreaSelector.prototype.getPleaseSelectOption=function(){
return this.pleaseSelectOption;
};
AreaSelector.prototype.getProvinceElem=function(){
return this.provinceElem;
};
AreaSelector.prototype.getCountryElem=function(){
return this.countryElem;
};
AreaSelector.prototype.getClientLocale=function(){
return this.clientLocale;
};
AreaSelector.prototype.setAreas=function(_6){
var _7=_6.form;
var _8=_7.elements[this.getProvinceElem()].value;
var _9=_7.elements[this.getCountryElem()].value;
var _a=getSelectedOptionValue(_6);
var _b=this.getClientLocale();
var _c="/data/"+_9+"/"+_8+"/"+_a+"-"+_b+".xml";
this.dataRequest.open("GET",_c,true);
var _d=this;
this.dataRequest.onreadystatechange=function(){
_d.updateAreas.call(_d);
};
this.dataRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=iso-8859-1");
this.dataRequest.send(null);
};
AreaSelector.prototype.updateAreas=function(){
var _e="";
if(this.getDataRequest().readyState==4){
if(this.getDataRequest().status==200){
var _f=this.getDataRequest().responseXML;
var _10=getElementByIdIndependant(this.getTargetSelectId());
clearSelect(_10);
var _11=getElementByTagName(_f,"city");
var _12=new Array();
if(_11){
var _13=this.getPleaseSelectOption();
if(_13&&(_13!=null)){
_12[_12.length]=_13;
}
var _14=getElementByTagName(_11,"areas");
var _15=_14.getElementsByTagName("area");
for(var i=0;i<_15.length;i++){
var _17=_15[i];
var _18=getText(_17.getAttributeNode("id"));
var _19=getText(_17);
var _1a=createOption(_18,_19);
_12[_12.length]=_1a;
}
addOptions(_10,_12);
}else{
}
}else{
alert("issue with request status: "+this.getDataRequest().status+" / "+_e);
}
}
};


