function JSONscriptRequest(_1,_2){
this.fullUrl=_1;
this.headLoc=document.getElementsByTagName("head").item(0);
this.timeStamp = (new Date()).getTime();
this.scriptId="JscriptId"+this.timeStamp;
};
JSONscriptRequest.scriptCounter=1;
JSONscriptRequest.prototype.buildScriptTag=function(){
this.scriptObj=document.createElement("script");
this.scriptObj.setAttribute("type","text/javascript");
this.scriptObj.setAttribute("charset","utf-8");
this.scriptObj.setAttribute("src",this.fullUrl+"&reqID="+this.scriptId);
this.scriptObj.setAttribute("id",this.scriptId);
return this.scriptId;
};
JSONscriptRequest.prototype.removeScriptTag=function(){
this.headLoc.removeChild(this.scriptObj);
};
JSONscriptRequest.removeScriptTagById=function(id){
var _4=document.getElementById(id);
var _5=_4.parentNode;
_5.removeChild(_4);
};
JSONscriptRequest.prototype.addScriptTag=function(){
this.headLoc.appendChild(this.scriptObj);
};
function ISuggest(){
var _6="114";
var _7=null;
var _8=null;
var _9=null;
var _a=null;
var _b=null;
var _c=new function(){
this.query=null;
this.response=null;
};
var _d=500;
var _e=-1;
var _f=null;
var _10=null;
var _11=null;
var _12=function(obj){
var _14=curtop=0;
try{
if(obj.offsetParent){
do{
_14+=obj.offsetLeft;
curtop+=obj.offsetTop;
}while(obj=obj.offsetParent);
return {left:_14,top:curtop};
}
}
catch(e){
}
return null;
};
var _15=function(){
for(var j=0;j<_8.length;j++){
_8[j].value=_6;
}
};
var _17=function(){
for(var j=0;j<_8.length;j++){
_8[j].value=_7;
}
};
var _19=function(){
if(_e>=0){
_10.childNodes[_e].className="suggest_link";
}
if(_e==0||_e==-1){
_e=_10.childNodes.length-1;
}else{
_e--;
}
_10.childNodes[_e].className="suggest_link_over";
if(_e>-1){
var _1a=_10.childNodes[_e].childNodes[0].nodeValue;
_c.query=_1a;
_c.response=null;
_b.value=_1a;
_f=_1a;
_15();
}
};
var _1b=function(){
if(_e>=0){
_10.childNodes[_e].className="suggest_link";
}
if(_e==(_10.childNodes.length-1)){
_e=0;
}else{
++_e;
}
_10.childNodes[_e].className="suggest_link_over";
if(_e>-1){
var _1c=_10.childNodes[_e].childNodes[0].nodeValue;
_c.query=_1c;
_c.response=null;
_b.value=_1c;
_f=_1c;
_15();
}
};
var _1d=function(){
_10.style["display"]="block";
_e=-1;
var pos=_12(_a);
_10.style["left"]=pos.left+"px";
_10.style["top"]=pos.top+_a.offsetHeight+"px";
_10.style["width"]=_a.offsetWidth+"px";
};
var _1f=function(){
_10.innerHTML="";
_10.style["display"]="none";
};
this.insertScriptTag=function(){
if(!_b||_b.value==_c.query){
return;
}
_a=_b;
var str=escape(_b.value);
if(str==""){
_10.style["display"]="none";
return;
}
_c.query=str;
var req="http://suggest.infospace.com/QuerySuggest/SuggestServlet?prefix="+str;
jsonClient=new JSONscriptRequest(req,str);
jsonClient.buildScriptTag();
jsonClient.addScriptTag();
};
var _22=function(e){
if(!e){
var e=window.event;
}
var _24;
if(e.keyCode){
_24=e.keyCode;
}else{
if(e.which){
_24=e.which;
}
}
if(_b.value==""){
_17();
}else{
if(_f!=null){
if(_f.indexOf(_b.value)!=0){
_17();
}
}
}
if(_24!=27&&_24!=40&&_24!=38&&_24!=13){
window.setTimeout("iSuggest.insertScriptTag()",_d);
}
};
this.onKeyUp=function(e){
if(_10.style["display"]!="block"&&_10.childNodes.length==0){
return;
}
var _26;
if(e.keyCode){
_26=e.keyCode;
}else{
if(e.which){
_26=e.which;
}
}
switch(_26){
case 40:
_1b();
break;
case 38:
_19();
break;
case 27:
_1f();
_c.query=null;
_c.response=null;
break;
}
};
this.PopulateResults=function(_27,_28){
_10.innerHTML="";
_e=-1;
if(_27){
for(var i=0;i<_27.length;i++){
var _2a="<div onmouseover=\"javascript:iSuggest.suggestOver(this);\" onmouseout=\"javascript:iSuggest.suggestOut(this);\" onclick=\"javascript:iSuggest.setSearch(this.childNodes[0].nodeValue);\" class=\"suggest_link\">"+_27[i]+"</div>";
_10.innerHTML+=_2a;
}
}
JSONscriptRequest.removeScriptTagById(_28);
if(_10.innerHTML==""||_27==null){
_1f();
}else{
_1d();
}
};
this.onMouseClick=function(){
_1f();
_c.query=null;
_c.response=null;
};
this.suggestOver=function(_2b){
_2b.className="suggest_link_over";
};
this.suggestOut=function(_2c){
_2c.className="suggest_link";
};
this.setSearch=function(_2d){
_c.query=_2d;
_c.response=null;
_1f();
_b.value=_2d;
_15();
_b.defaultButton.click();
return false;
};
this.init=function(_2e,_2f){
_8=new Array();
for(var j=0;j<_2f.length;j++){
_8[j]=document.getElementById(_2f[j]);
}
_7=_8[0].value;
_10=document.createElement("div");
_10.className="suggestPanel";
document.body.insertBefore(_10,document.body.firstChild);
for(var i=0;i<_2e.length;i++){
var _32=document.getElementById(_2e[i].txt);
var _33=document.getElementById(_2e[i].btn);
_32.defaultButton=_33;
_32._34=(_32.onfocus)?_32.onfocus:function(){
};
function _35(e){
_b=this;
this._34();
};
_32.onfocus=_35;
_32._37=(_32.onblur)?_32.onblur:function(){
};
function _38(e){
if(_10.style["display"]!="block"){
_b=null;
}
this._37();
};
_32.onblur=_38;
_32._3a=(_32.onkeyup)?_32.onkeyup:function(){
};
function _3b(e){
_b=this;
this._3a();
if(!e){
var e=window.event;
}
_22(e);
};
_32.onkeyup=_3b;
}
};
};
var iSuggest;
function Initialize(){
iSuggest=new ISuggest();
iSuggest.init(txtElements,rfcIDElements);
var _3d=(document.onclick)?document.onclick:function(){
};
function _3e(e){
_3d();
if(!e){
var e=window.event;
}
iSuggest.onMouseClick(e);
};
document.onclick=_3e;
var _40=(document.onkeyup)?document.onkeyup:function(){
};
function _41(e){
_40();
if(!e){
var e=window.event;
}
iSuggest.onKeyUp(e);
};
document.onkeyup=_41;
};

