var selectedTab="";var screenHeight=window.screen.availHeight;var screenWidth=window.screen.availWidth;var colorDepth=window.screen.colorDepth;var timeNow=new Date();var referrer=escape(document.referrer);var windows,mac,linux;var ie,op,moz,misc,browsercode,browsername,browserversion,operatingsys;var dom,ienew,ie4,ie5,ie6,moz_rv,moz_rv_sub,ie5mac,ie5xwin,opnu,op4,op5,op6,op7,saf,konq;var appName,appVersion,userAgent;var appname=navigator.appName;var appVersion=navigator.appVersion;var userAgent=navigator.userAgent.toLowerCase();var title=document.title;var checktoggle=1;var DOMBROWSER="default";windows=(appVersion.indexOf('Win')!=-1);mac=(appVersion.indexOf('Mac')!=-1);linux=(appVersion.indexOf('Linux')!=-1);if(!document.layers)
{dom=(document.getElementById)?document.getElementById:false;}else{dom=false;}
if(document.getElementById)
{DOMBROWSER="default";}else if(document.layers){DOMBROWSER="NS4";}else if(document.all){DOMBROWSER="IE4";}
misc=(appVersion.substring(0,1)<4);op=(userAgent.indexOf('opera')!=-1);moz=(userAgent.indexOf('gecko')!=-1);ie=(document.all&&!op);saf=((userAgent.indexOf('safari')!=-1)||(navigator.vendor=="Apple Computer, Inc."));konq=(userAgent.indexOf('konqueror')!=-1);if(op){op_pos=userAgent.indexOf('opera');opnu=userAgent.substr((op_pos+6),4);op5=(opnu.substring(0,1)==5);op6=(opnu.substring(0,1)==6);op7=(opnu.substring(0,1)==7);}else if(moz){rv_pos=userAgent.indexOf('rv');moz_rv=userAgent.substr((rv_pos+3),3);moz_rv_sub=userAgent.substr((rv_pos+7),1);if(moz_rv_sub==' '||isNaN(moz_rv_sub)){moz_rv_sub='';}
moz_rv=moz_rv+moz_rv_sub;}else if(ie){ie_pos=userAgent.indexOf('msie');ienu=userAgent.substr((ie_pos+5),3);ie4=(!dom);ie5=(ienu.substring(0,1)==5);ie6=(ienu.substring(0,1)==6);}
if(konq){browsercode="KO";browserversion=appVersion;browsername="Knoqueror";}else if(saf){browsercode="SF";browserversion=appVersion;browsername="Safari";}else if(op){browsercode="OP";if(op5){browserversion="5";}else if(op6){browserversion="6";}else if(op7){browserversion="7";}else{browserversion=appVersion;}
browsername="Opera";}else if(moz){browsercode="MO";browserversion=appVersion;browsername="Mozilla";}else if(ie){browsercode="IE";if(ie4){browserversion="4";}else if(ie5){browserversion="5";}else if(ie6){browserversion="6";}else{browserversion=appVersion;}
browsername="Internet Explorer";}
if(windows){operatingsys="Windows";}else if(linux){operatingsys="Linux";}else if(mac){operatingsys="Mac";}else{operatingsys="Unkown";}
function browserObject(objid)
{if(DOMBROWSER=="default")
{return document.getElementById(objid);}else if(DOMBROWSER=="NS4"){return document.layers[objid];}else if(DOMBROWSER=="IE4"){return document.all[objid];}}
var xmlhttp;var xmlaction="";function loadXMLHTTPRequest(url){if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();xmlhttp.onreadystatechange=processStatusChange;try{xmlhttp.open("GET",url,true);xmlhttp.send(null);}catch(e){alert("XMLHttpRequest Open Failed!\nThis can happen if the URL you are accessing the product from (http://www.domain.com/support) is different than the one specified under Admin CP > Settings > General (Ex: http://support.domain.com/). Due to limitations of AJAX, The URL should be *exactly* the same as specified under Product URL setting.");}}else if(window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");if(xmlhttp){xmlhttp.onreadystatechange=processStatusChange;try{xmlhttp.open("GET",url,true);xmlhttp.send();}catch(e){alert("XMLHttpRequest Open Failed!\nThis can happen if the URL you are accessing the product from (http://www.domain.com/support) is different than the one specified under Admin CP > Settings > General (Ex: http://support.domain.com/). Due to limitations of AJAX, The URL should be *exactly* the same as specified under Product URL setting.");}}}}
var oldKeyword="";function processStatusChange(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){formname=getActiveFormName();if(window.$IRS.isThreadRunning==true&&xmlhttp.responseText!=""){window.$IRS.render(xmlhttp.responseText);}else{window.$IRS.changeSearchBoxClass('staffcpirs');}}else{alert("There was a problem retrieving the XML data from Server:\n"+xmlhttp.statusText);}}}
function getActiveFormName()
{var formname="form1";return formname;}
function fetchData(args){loadXMLHTTPRequest('searchIRS.php?string='+args);}
function arrayCopy(input)
{var output=new Array(input.length);for(i in input){if(typeof(input[i])=='array'){output[i]=arrayCopy(input[i]);}else{output[i]=input[i];}}
return output;}
function TreeMenu(iconpath,myname,linkTarget,defaultClass,usePersistence,noTopLevelImages)
{this.iconpath=iconpath;this.myname=myname;this.linkTarget=linkTarget;this.defaultClass=defaultClass;this.usePersistence=usePersistence;this.noTopLevelImages=noTopLevelImages;this.n=new Array();this.output='';this.nodeRefs=new Array();this.branches=new Array();this.branchStatus=new Array();this.layerRelations=new Array();this.childParents=new Array();this.cookieStatuses=new Array();this.preloadImages();}
TreeMenu.prototype.addItem=function(newNode)
{newIndex=this.n.length;this.n[newIndex]=newNode;return this.n[newIndex];}
TreeMenu.prototype.preloadImages=function()
{var plustop=new Image;plustop.src=this.iconpath+'/plustop.gif';var plusbottom=new Image;plusbottom.src=this.iconpath+'/plusbottom.gif';var plus=new Image;plus.src=this.iconpath+'/plus.gif';var minustop=new Image;minustop.src=this.iconpath+'/minustop.gif';var minusbottom=new Image;minusbottom.src=this.iconpath+'/minusbottom.gif';var minus=new Image;minus.src=this.iconpath+'/minus.gif';var branchtop=new Image;branchtop.src=this.iconpath+'/branchtop.gif';var branchbottom=new Image;branchbottom.src=this.iconpath+'/branchbottom.gif';var branch=new Image;branch.src=this.iconpath+'/branch.gif';var linebottom=new Image;linebottom.src=this.iconpath+'/linebottom.gif';var line=new Image;line.src=this.iconpath+'/line.gif';}
TreeMenu.prototype.drawMenu=function()
{var output='';var modifier='';var layerID='';var parentLayerID='';var nodes=arguments[0]?arguments[0]:this.n
var level=arguments[1]?arguments[1]:[];var prepend=arguments[2]?arguments[2]:'';var expanded=arguments[3]?arguments[3]:false;var visibility=arguments[4]?arguments[4]:'inline';var parentLayerID=arguments[5]?arguments[5]:null;var currentlevel=level.length;for(var i=0;i<nodes.length;i++){level[currentlevel]=i+1;layerID=this.myname+'_'+'node_'+this.implode('_',level);this.nodeRefs[layerID]=nodes[i];this.childParents[layerID]=parentLayerID;if(i==0&&parentLayerID==null){modifier=nodes.length>1?"top":'single';}else if(i==(nodes.length-1)){modifier="bottom";}else{modifier="";}
if(!this.doesMenu()||(parentLayerID==null&&(nodes.length==1||this.noTopLevelImages))){expanded=true;}else if(nodes[i].expanded){expanded=true;}else{expanded=false;}
visibility=this.checkParentVisibility(layerID)?visibility:'none';if(nodes[i].n.length>0){this.branchStatus[layerID]=expanded;this.branches[this.branches.length]=layerID;}
if(!this.layerRelations[parentLayerID]){this.layerRelations[parentLayerID]=new Array();}
this.layerRelations[parentLayerID][this.layerRelations[parentLayerID].length]=layerID;var gifname=nodes[i].n.length&&this.doesMenu()&&nodes[i].isDynamic?(expanded?'minus':'plus'):'branch';var iconName=expanded&&nodes[i].expandedIcon?nodes[i].expandedIcon:nodes[i].icon;var iconimg=nodes[i].icon?this.stringFormat('<img src="{0}/{1}" align="top" id="icon_{2}">',this.iconpath,iconName,layerID):'';var eventHandlers="";for(j in nodes[i].events){eventHandlers+=this.stringFormat('{0}="{1}" ',j,nodes[i].events[j]);}
var layerTag=this.doesMenu()?this.stringFormat('<div id="{0}" style="display: {1}" class="{2}">',layerID,visibility,(nodes[i].cssClass?nodes[i].cssClass:this.defaultClass)):this.stringFormat('<div class="{0}">',nodes[i].cssClass?nodes[i].cssClass:this.defaultClass);var onMDown=this.doesMenu()&&nodes[i].n.length&&nodes[i].isDynamic?this.stringFormat('onmousedown="{0}.toggleBranch(\'{1}\', true)" style="cursor: pointer; cursor: hand"',this.myname,layerID):'';var imgTag=this.stringFormat('<img src="{0}/{1}{2}.gif" align="top" border="0" name="img_{3}" {4}>',this.iconpath,gifname,modifier,layerID,onMDown);var linkTarget=nodes[i].linkTarget?nodes[i].linkTarget:this.linkTarget;var linkStart=nodes[i].link?this.stringFormat('<a href="{0}" target="{1}">',nodes[i].link,linkTarget):'';var linkEnd=nodes[i].link?'</a>':'';this.output+=this.stringFormat('{0}<nobr>{1}{2}{3}{4}<span {5}>{6}</span>{7}</nobr><br></div>',layerTag,prepend,parentLayerID==null&&(nodes.length==1||this.noTopLevelImages)?'':imgTag,iconimg,linkStart,eventHandlers,nodes[i].title,linkEnd);if(nodes[i].n.length){if(parentLayerID==null&&(nodes.length==1||this.noTopLevelImages)){var newPrepend='';}else if(i<(nodes.length-1)){var newPrepend=prepend+this.stringFormat('<img src="{0}/line.gif" align="top">',this.iconpath);}else{var newPrepend=prepend+this.stringFormat('<img src="{0}/linebottom.gif" align="top">',this.iconpath);}
this.drawMenu(nodes[i].n,arrayCopy(level),newPrepend,nodes[i].expanded,expanded?'inline':'none',layerID);}}}
TreeMenu.prototype.writeOutput=function(customdiv)
{if(customdiv!="")
{customDivObj=browserObject(customdiv);if(customDivObj)
{customDivObj.innerHTML=this.output;}}else{document.write(this.output);}}
TreeMenu.prototype.expandAllNodes=function()
{var nodes=this.n;var level=new Array();var currentlevel=level.length;var parentLayerID=null;var visibility='inline';for(var i=0;i<nodes.length;i++){level[currentlevel]=i+1;layerID=this.myname+'_'+'node_'+this.implode('_',level);if(this.layerRelations[layerID]){this.toggleBranch(layerID,true);}}
return true;}
TreeMenu.prototype.toggleBranch=function(layerID,updateStatus)
{var currentDisplay=this.getLayer(layerID).style.display;var newDisplay=(this.branchStatus[layerID]&&currentDisplay=='inline')?'none':'inline';var fireEvents=arguments[2]!=null?arguments[2]:true;for(var i=0;i<this.layerRelations[layerID].length;i++){if(this.branchStatus[this.layerRelations[layerID][i]]){this.toggleBranch(this.layerRelations[layerID][i],false);}
this.getLayer(this.layerRelations[layerID][i]).style.display=newDisplay;}
if(updateStatus){this.branchStatus[layerID]=!this.branchStatus[layerID];if(this.doesPersistence()&&!arguments[2]&&this.usePersistence){this.setExpandedStatusForCookie(layerID,this.branchStatus[layerID]);}
if(fireEvents){nodeObject=this.nodeRefs[layerID];if(nodeObject.ontoggle!=null){eval(nodeObject.ontoggle);}
if(newDisplay=='none'&&nodeObject.oncollapse!=null){eval(nodeObject.oncollapse);}else if(newDisplay=='inline'&&nodeObject.onexpand!=null){eval(nodeObject.onexpand);}}
this.swapImage(layerID);}
this.swapIcon(layerID);}
TreeMenu.prototype.swapImage=function(layerID)
{var imgSrc=document.images['img_'+layerID].src;var re=/^(.*)(plus|minus)(bottom|top|single)?.gif$/if(matches=imgSrc.match(re)){document.images['img_'+layerID].src=this.stringFormat('{0}{1}{2}{3}',matches[1],matches[2]=='plus'?'minus':'plus',matches[3]?matches[3]:'','.gif');}}
TreeMenu.prototype.swapIcon=function(layerID)
{if(document.images['icon_'+layerID]){var imgSrc=document.images['icon_'+layerID].src;if(this.nodeRefs[layerID].icon&&this.nodeRefs[layerID].expandedIcon){var newSrc=(imgSrc.indexOf(this.nodeRefs[layerID].expandedIcon)==-1?this.nodeRefs[layerID].expandedIcon:this.nodeRefs[layerID].icon);document.images['icon_'+layerID].src=this.iconpath+'/'+newSrc;}}}
TreeMenu.prototype.doesMenu=function()
{return(is_ie4up||is_nav6up||is_gecko||is_opera7);}
TreeMenu.prototype.doesPersistence=function()
{return(is_ie4up||is_gecko||is_nav6up||is_opera7);}
TreeMenu.prototype.getLayer=function(layerID)
{if(is_ie4){return document.all(layerID);}else if(document.getElementById(layerID)){return document.getElementById(layerID);}else if(document.all(layerID)){return document.all(layerID);}}
TreeMenu.prototype.setExpandedStatusForCookie=function(layerID,expanded)
{this.cookieStatuses[layerID]=expanded;this.saveCookie();}
TreeMenu.prototype.getExpandedStatusFromCookie=function(layerID)
{if(this.cookieStatuses[layerID]){return this.cookieStatuses[layerID];}
return false;}
TreeMenu.prototype.saveCookie=function()
{var cookieString=new Array();for(var i in this.cookieStatuses){if(this.cookieStatuses[i]==true){cookieString[cookieString.length]=i;}}
var expire=new Date();expire.setTime(expire.getTime()+365*24*60*60*1000);document.cookie='TreeMenuBranchStatus='+cookieString.join(':')+"; expires="+expire.toUTCString();}
TreeMenu.prototype.loadCookie=function()
{var cookie=document.cookie.split('; ');for(var i=0;i<cookie.length;i++){var crumb=cookie[i].split('=');if('TreeMenuBranchStatus'==crumb[0]&&crumb[1]){var expandedBranches=crumb[1].split(':');for(var j=0;j<expandedBranches.length;j++){this.cookieStatuses[expandedBranches[j]]=true;}}}}
TreeMenu.prototype.resetBranches=function()
{if(!this.doesPersistence()){return false;}
this.loadCookie();for(var i=0;i<this.branches.length;i++){var status=this.getExpandedStatusFromCookie(this.branches[i]);if(status==true&&this.branchStatus[this.branches[i]]!=true){if(this.checkParentVisibility(this.branches[i])){this.toggleBranch(this.branches[i],true,false);}else{this.branchStatus[this.branches[i]]=true;this.swapImage(this.branches[i]);}}}}
TreeMenu.prototype.checkParentVisibility=function(layerID)
{if(this.in_array(this.childParents[layerID],this.branches)&&this.branchStatus[this.childParents[layerID]]&&this.checkParentVisibility(this.childParents[layerID])){return true;}else if(this.childParents[layerID]==null){return true;}
return false;}
TreeMenu.prototype.stringFormat=function(strInput)
{var idx=0;for(var i=1;i<arguments.length;i++){while((idx=strInput.indexOf('{'+(i-1)+'}',idx))!=-1){strInput=strInput.substring(0,idx)+arguments[i]+strInput.substr(idx+3);}}
return strInput;}
TreeMenu.prototype.implode=function(seperator,input)
{var output='';for(var i=0;i<input.length;i++){if(i==0){output+=input[i];}else{output+=seperator+input[i];}}
return output;}
TreeMenu.prototype.in_array=function(item,arr)
{for(var i=0;i<arr.length;i++){if(arr[i]==item){return true;}}
return false;}
function TreeNode(title,icon,link,expanded,isDynamic,cssClass,linkTarget,expandedIcon)
{this.title=title;this.icon=icon;this.expandedIcon=expandedIcon;this.link=link;this.expanded=expanded;this.isDynamic=isDynamic;this.cssClass=cssClass;this.linkTarget=linkTarget;this.n=new Array();this.events=new Array();this.handlers=null;this.oncollapse=null;this.onexpand=null;this.ontoggle=null;}
TreeNode.prototype.addItem=function(newNode)
{newIndex=this.n.length;this.n[newIndex]=newNode;return this.n[newIndex];}
TreeNode.prototype.setEvent=function(eventName,eventHandler)
{switch(eventName.toLowerCase()){case'onexpand':this.onexpand=eventHandler;break;case'oncollapse':this.oncollapse=eventHandler;break;case'ontoggle':this.ontoggle=eventHandler;break;default:this.events[eventName]=eventHandler;}}
var agt=navigator.userAgent.toLowerCase();var is_major=parseInt(navigator.appVersion);var is_minor=parseFloat(navigator.appVersion);var is_nav=((agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)&&(agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1)&&(agt.indexOf('hotjava')==-1));var is_nav6up=(is_nav&&(is_major>=5));var is_gecko=(agt.indexOf('gecko')!=-1);var is_ie=((agt.indexOf("msie")!=-1)&&(agt.indexOf("opera")==-1));var is_ie4=(is_ie&&(is_major==4)&&(agt.indexOf("msie 4")!=-1));var is_ie4up=(is_ie&&(is_major>=4));var is_opera=(agt.indexOf("opera")!=-1);var is_opera7=is_opera&&(agt.indexOf("opera 7")!=-1);if(agt.indexOf('konqueror')!=-1){var is_nav=false;var is_nav6up=false;var is_gecko=false;var is_ie=true;var is_ie4=true;var is_ie4up=true;}
function print_r(theObj){if(theObj.constructor==Array||theObj.constructor==Object){document.write("<ul>")
for(var p in theObj){if(theObj[p].constructor==Array||theObj[p].constructor==Object){document.write("<li>["+p+"] => "+typeof(theObj)+"</li>");document.write("<ul>")
print_r(theObj[p]);document.write("</ul>")}else{document.write("<li>["+p+"] => "+theObj[p]+"</li>");}}
document.write("</ul>")}}
function addEvent(obj,event_name,func_name){if(obj.attachEvent){obj.attachEvent("on"+event_name,func_name);}else if(obj.addEventListener){obj.addEventListener(event_name,func_name,true);}else{obj["on"+event_name]=func_name;}}
function removeEvent(obj,event_name,func_name){if(obj.detachEvent){obj.detachEvent("on"+event_name,func_name);}else if(obj.removeEventListener){obj.removeEventListener(event_name,func_name,true);}else{obj["on"+event_name]=null;}}
function stopEvent(evt){evt||window.event;if(evt.stopPropagation){evt.stopPropagation();evt.preventDefault();}else if(typeof evt.cancelBubble!="undefined"){evt.cancelBubble=true;evt.returnValue=false;}
return false;}
function getElement(evt){if(window.event){return window.event.srcElement;}else{return evt.currentTarget;}}
function getTargetElement(evt){if(window.event){return window.event.srcElement;}else{return evt.target;}}
function stopSelect(obj){if(typeof obj.onselectstart!='undefined'){addEvent(obj,"selectstart",function(){return false;});}}
function getCaretEnd(obj){if(typeof obj.selectionEnd!="undefined"){return obj.selectionEnd;}else if(document.selection&&document.selection.createRange){var M=document.selection.createRange();try{var Lp=M.duplicate();Lp.moveToElementText(obj);}catch(e){var Lp=obj.createTextRange();}
Lp.setEndPoint("EndToEnd",M);var rb=Lp.text.length;if(rb>obj.value.length){return-1;}
return rb;}}
function getCaretStart(obj){if(typeof obj.selectionStart!="undefined"){return obj.selectionStart;}else if(document.selection&&document.selection.createRange){var M=document.selection.createRange();try{var Lp=M.duplicate();Lp.moveToElementText(obj);}catch(e){var Lp=obj.createTextRange();}
Lp.setEndPoint("EndToStart",M);var rb=Lp.text.length;if(rb>obj.value.length){return-1;}
return rb;}}
function setCaret(obj,l){obj.focus();if(obj.setSelectionRange){obj.setSelectionRange(l,l);}else if(obj.createTextRange){m=obj.createTextRange();m.moveStart('character',l);m.collapse();m.select();}}
function setSelection(obj,s,e){obj.focus();if(obj.setSelectionRange){obj.setSelectionRange(s,e);}else if(obj.createTextRange){m=obj.createTextRange();m.moveStart('character',s);m.moveEnd('character',e);m.select();}}
String.prototype.addslashes=function(){return this.replace(/(["\\\.\|\[\]\^\*\+\?\$\(\)])/g,'\\$1');}
String.prototype.trim=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1");};function curTop(obj){toreturn=0;while(obj){toreturn+=obj.offsetTop;obj=obj.offsetParent;}
return toreturn;}
function curLeft(obj){toreturn=0;while(obj){toreturn+=obj.offsetLeft;obj=obj.offsetParent;}
return toreturn;}
function isNumber(a){return typeof a=='number'&&isFinite(a);}
function replaceHTML(obj,text){while(el=obj.childNodes[0]){obj.removeChild(el);};obj.appendChild(document.createTextNode(text));}
function IRSAutoComplete(obj)
{this.textObject=obj;this.isThreadRunning=false;this.cachedContents;this.itemMap=new Array();this.selectedItem=0;this.itemRange=0;this.isIRSDisplayed=false;var keyHandled=false;var thisObject=this;addEvent(this.textObject,"focus",_startIRS);function _startIRS()
{addEvent(document,"keydown",_keyDown);addEvent(thisObject.textObject,"blur",_clear);addEvent(document,"keypress",_keyPress);if(thisObject.isThreadRunning==false)
{setTimeout('window.$IRS.lookupThread()',2000);}}
function _keyDown(evt)
{if(!evt)evt=event;var currentKeyCode=evt.keyCode;keyHandled=false;switch(currentKeyCode){case 38:if(!window.$IRS.isIRSDisplayed)
{return true;}
window.$IRS.moveSelectionUp();keyHandled=true;return true;break;case 40:case 9:if(!window.$IRS.isIRSDisplayed)
{return true;}
window.$IRS.moveSelectionDown();keyHandled=true;return true;break;case 13:window.$IRS.clickHandler();keyHandled=true;return true;break;case 27:window.$IRS.cleanup();return true;break;default:break;}}
function _clear(evt)
{if(!evt)evt=event;removeEvent(document,"keydown",_keyDown);removeEvent(thisObject.textObject,"blur",_clear);removeEvent(document,"keypress",_keyPress);window.$IRS.cleanup();}
function _keyPress(evt)
{if(!evt)evt=event;if(keyHandled)stopEvent(evt);return!keyHandled;}}
IRSAutoComplete.prototype.lookupThread=function(x){this.isThreadRunning=true;var currentValue=document.getElementById('staffirs').value;if(currentValue==""&&this.cachedContents!="")
{window.$IRS.cleanup();}else if(currentValue!=this.cachedContents&&currentValue!=""){this.changeSearchBoxClass('staffcpirsloading');fetchData(currentValue);}
this.cachedContents=currentValue;setTimeout('window.$IRS.lookupThread()',2000);}
IRSAutoComplete.prototype.render=function(rawdata){var listMain=rawdata.split("\n");if(browserObject("coreIRSTable"))
{document.body.removeChild(document.getElementById('coreIRSTable'));}
this.selectedItem=0;this.itemMap=new Array();this.itemRange=0;this.changeSearchBoxClass('staffcpirs');a=document.createElement('div');a.style.position='absolute';a.style.top=eval(curTop(this.textObject)+this.textObject.offsetHeight-1)+"px";a.style.left=curLeft(this.textObject)+"px";a.id='coreIRSTable';a.className='IRSCoreDiv';document.body.appendChild(a);this.isIRSDisplayed=true;if(rawdata=="0")
{return;}
var itemOffset=1;for(var ii=0;ii<listMain.length;ii++){if(listMain[ii]==""||!listMain[ii])
{continue;}
this.itemRange=itemOffset;var listItem=listMain[ii].split(";");var itemSubject=listItem[0];var itemID=listItem[1];var itemState=listItem[2];row=document.createElement('div');row.className='IRSCoreItem';row.id='coreIRSItem'+itemOffset;row.innerHTML='<div style="FLOAT: left" class="IRSCoreItemRel">'+itemSubject+'</div>';row.onmousedown=new Function('return window.$IRS.clickHandler("'+itemID+'","'+itemState+'");');row.onmouseover=new Function('return window.$IRS.hoverHandler("'+itemOffset+'");');a.appendChild(row);this.itemMap[itemOffset]=itemID;itemOffset++;}
this.changeSearchBoxClass('staffcpirs');}
IRSAutoComplete.prototype.cleanup=function(x){if(browserObject("coreIRSTable"))
{document.body.removeChild(document.getElementById('coreIRSTable'));}
this.isIRSDisplayed=false;this.changeSearchBoxClass('staffcpirs');}
IRSAutoComplete.prototype.moveSelectionUp=function(x){if(this.selectedItem==0||(this.selectedItem-1)==0)
{return false;}
var previousItem=browserObject("coreIRSItem"+this.selectedItem);if(previousItem)
{previousItem.className='IRSCoreItem';}
this.selectedItem--;var newItem=browserObject("coreIRSItem"+this.selectedItem);if(newItem)
{newItem.className='IRSCoreItemHighlight';}}
IRSAutoComplete.prototype.moveSelectionDown=function(customSelectedItem){if((this.selectedItem-1)>=this.itemRange&&this.itemRange>=1)
{return false;}
if(this.itemRange==1)
{this.selectedItem=0;}
var previousSelectedItem=this.selectedItem;var previousItem=browserObject("coreIRSItem"+this.selectedItem);if(customSelectedItem)
{this.selectedItem=customSelectedItem;}else{this.selectedItem++;}
var newItem=browserObject("coreIRSItem"+this.selectedItem);if(previousItem&&newItem)
{previousItem.className='IRSCoreItem';}else if(previousItem&&!newItem){this.selectedItem=previousSelectedItem;previousItem.className='IRSCoreItemHighlight';}
if(newItem)
{newItem.className='IRSCoreItemHighlight';}}
IRSAutoComplete.prototype.hoverHandler=function(x){this.moveSelectionDown(x);}
IRSAutoComplete.prototype.clickHandler=function(x,y){this.changeSearchBoxClass('staffcpirsloading');xajax_loadYourLocation(x,y);window.$IRS.cleanup();this.changeSearchBoxClass('staffcpirs');document.getElementById('staffirs').value='';return false;}
IRSAutoComplete.prototype.changeSearchBoxClass=function(newClass){this.textObject.className=newClass;}
function focusIRS()
{if(window.$IRS)
{window.$IRS.textObject.focus();}}