var stayOpen=false;var counter=0;var slim={browserType:window.opera?"Opera":((navigator.userAgent.indexOf("WebKit")!=-1)?"Safari":((navigator.userAgent.indexOf("MSIE")!=-1)?"MSIE":"Gecko")),isBrowserIE6:(navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1),browserOS:(navigator.userAgent.indexOf("Windows")!=-1)?"Win":((navigator.userAgent.indexOf("Macintosh")!=-1)?"Mac":"Other"),domReady:[],each:function(d,b,a){var e=d.firstChild;while(e){if(!a){b(e)}if(e.firstChild){this.each(e,b,a)}if(a){b(e)}e=e.nextSibling}},sibling:function(c,b){var a=c;if(b=="next"){do{a=a.nextSibling}while(a&&a.nodeType==3)}else{if(b=="prev"){do{a=a.previousSibling}while(a&&a.nodeType==3)}}return(a==c)?false:a},parseSelectors:function(b){var k=this.trim(b).split("");var l=-1;var a="";var d=[],n=[],e=[];var m=false,g=false,h=false;for(var f=0,j=k.length;f<j;f++){if(m){if(g){switch(k[f]){case'"':h=!h;break;case"]":if(!h){n[l].push(a);g=false;a=""}break;case"\\":a+=k[++f];break;default:a+=k[f]}}else{switch(k[f]){case"[":g=true;break;case" ":case">":case",":m=false;e[l]=k[f];break;case"\\":d[l]+=k[++f];break;default:d[l]+=k[f]}}}else{switch(k[f]){case" ":case">":case",":e[l]+=k[f];break;default:m=true;d[++l]=k[f];n[l]=[]}}}return{elements:d,attrs:n,separators:e}},processAttrs:function(e,c,g){for(var f=0,d=c.length,b;f<d;f++){b=(c[f]=="class")?(e.className?e.className:null):e.getAttribute(c[f]);switch(typeof g[f]){case"undefined":if(b==null){return false}break;case"string":if(b==g[f]){return false}break;default:if(!g[f].test(b)){return false}}}return true},processPseudo:function(e,h,d,b){var a,f,g=[],l=0;if(!(f=e.parentNode.getAttribute("slimnodekey"))){e.parentNode.setAttribute("slimnodekey",f=Math.random().toString().substr(2))}if(a=this.pCache[f]){g=a.parentChildren,l=a.pI}else{var i=e.parentNode.firstChild;while(i){if(i.nodeType==1){g.push(i)}i=i.nextSibling}this.pCache[f]={parentChildren:g,pI:0}}var j=g.length;switch(h){case"first-child":if(e==g[0]){return true}break;case"last-child":if(e==g[j-1]){return true}break;case"only-child":if(j==1){return true}break}if(h=="nth-child"){var k=d*l+b;var m=-50;while(k>-50&&k<=j){if(k>=0&&g[k-1]==e){this.pCache[f]["pI"]=(d>=0)?l+1:0;return true}l++,k+=d;if(k==m){break}m=k}}},getMatches:function(u,k,t,m){this.pCache={};var b=[],h=[];var j,g,d,e,l,f,p,o;this.postProcess=function(i){if(!r&&!e){b.push(i);return}var a=true;if(r&&!this.processAttrs(i,t,h)){a=false}if(e&&!this.processPseudo(i,l,p,o)){a=false}if(a){b.push(i)}};for(var q=0,r=t.length;q<r;q++){j=t[q].match(/([a-z0-9_-]+)\s*([=^$*|~!]{0,2})\s*"?([^"]*)"?$/i);t[q]=j[1];switch(j[2]){case"=":h[q]=new RegExp("^"+j[3]+"$","i");break;case"^=":h[q]=new RegExp("^"+j[3],"i");break;case"$=":h[q]=new RegExp(j[3]+"$","i");break;case"*=":h[q]=new RegExp(j[3],"i");break;case"~=":h[q]=new RegExp("^"+j[3]+"$|^"+j[3]+"\\s|\\s"+j[3]+"\\s|\\s"+j[3]+"$","i");break;case"!=":h[q]=j[3]}}if(k.indexOf(":")!=-1){j=k.split(":");k=j[0];e=j[1].match(/([a-z-]+)\(?([a-z0-9+-]*)\)?/i);l=e[1].toLowerCase();switch(f=e[2].toLowerCase()){case"odd":f="2n+1";break;case"even":f="2n"}j=f.match(/([0-9+-]*)(n?)([0-9+-]*)/i);p=parseInt(j[2]?(j[1]?((j[1]=="-")?-1:j[1]):1):0);o=parseInt(j[3]?j[3]:((j[1]&&!j[2])?j[1]:0))}if(k.indexOf("#")!=-1){this.postProcess(document.getElementById(k.substr(k.indexOf("#")+1)))}else{if(k.indexOf(".")!=-1){j=k.split(".");var n=k.substr(j[0].length+1).replace("."," ");var c=new RegExp("^"+n+"$|^"+n+"\\s|\\s"+n+"\\s|\\s"+n+"$","i");g=u.getElementsByTagName(j[0]?j[0]:"*");for(q=0,d=g.length;q<d;q++){if((!m&&c.test(g[q].className))||(m&&c.test(g[q].className)&&g[q].parentNode==u)){this.postProcess(g[q])}}}else{if(k=="*"||/^[A-Za-z0-9]+$/.test(k)){for(q=0,g=u.getElementsByTagName(k),d=g.length;q<d;q++){if(!m||(m&&g[q].parentNode==u)){this.postProcess(g[q])}}}}}return b},get:function(selectorText,startAt){var selectors=this.parseSelectors(selectorText);var numS=selectors.elements.length;if(!startAt){startAt=document}if(numS==1){var idMatch=selectors.elements[0].match(/^[a-z0-9*]*#([^,:]+)$/i);if(idMatch&&selectors.attrs[0]==""&&selectors.separators==""){return document.getElementById(idMatch[1])}}var objs=this.getMatches(startAt,selectors.elements[0],selectors.attrs[0]);var allObjs=[],newObjs,separator;for(var i=1;i<numS;i++){newObjs=[];separator=this.trim(selectors.separators[i-1]);if(separator==","){allObjs=this.concatUnique(allObjs,objs);objs=this.getMatches(startAt,selectors.elements[i],selectors.attrs[i])}else{var oneLevelOnly=(separator==">")?true:false;for(var j=0,numObjs=objs.length;j<numObjs;j++){if(!this.inArray(objs[j],newObjs)){newObjs=this.concatUnique(newObjs,this.getMatches(objs[j],selectors.elements[i],selectors.attrs[i]),oneLevelOnly)}}objs=newObjs}}allObjs=this.concatUnique(allObjs,objs);allObjs.apply=function(p){for(var i=0,numObjs=this.length;i<numObjs;i++){(typeof p=="function")?p(this[i]):eval("this[i]."+p)}};return allObjs},getCssRule:function(e,g,f){var b=[];var h=document.styleSheets[e];h=h.rules?h.rules:h.cssRules;g=g.toLowerCase();f=(this.browserType=="Safari")?f.replace(/([A-Z])/,"-$1").toLowerCase():f.toLowerCase();for(var d=0,a=h.length;d<a;d++){if(g=="*"||h[d].selectorText.toLowerCase()==g){for(var c in h[d].style){if(this.browserType=="Safari"){if(h[d].style[c].toLowerCase&&h[d].style[c].toLowerCase()==f){if(g=="*"){b[h[d].selectorText]=value}else{return h[d].style[h[d].style[c]]}}}else{if(c.toLowerCase()==f){if(g=="*"){b[h[d].selectorText]=h[d].style[c]}else{return h[d].style[c]}}}}}}return b},setStyles:function(c,b){for(var a in b){(a=="float")?this.setFloat(c,b[a]):c.style[a]=b[a]}},setAttributes:function(c,b){for(var a in b){(a=="className")?c.className=b[a]:c.setAttribute(a,b[a])}},removeNode:function(a){return a.parentNode.removeChild(a)},addEventListener:function(e,d,b,a){if(e.addEventListener){e.addEventListener(d,b,a);return true}else{if(e.attachEvent){var c=e.attachEvent("on"+d,b);return c}else{}}},removeEventListener:function(e,d,b,a){if(e.removeEventListener){e.removeEventListener(d,b,a);return true}else{if(e.detachEvent){var c=e.detachEvent("on"+d,b);return c}else{}}},runReadyEvents:function(){if(this.readyTimer){clearInterval(this.readyTimer)}for(var a=0,b=this.domReady.length;a<b;a++){this.domReady[a]()}},getEventTarget:function(a){var b=a.target?a.target:a.srcElement;if(b.nodeType==3){b=b.parentNode}return b},getMousePos:function(a){if(a.pageX||a.pageY){return{x:a.pageX,y:a.pageY}}else{return{x:a.clientX+document.documentElement.scrollLeft-document.body.clientLeft,y:a.clientY+document.documentElement.scrollTop-document.body.clientTop}}},preventBubble:function(a){a.stopPropagation?a.stopPropagation():window.event.cancelBubble=true},preventDefault:function(a){a.preventDefault?a.preventDefault():window.event.returnValue=false},getFloat:function(a){return((this.browserType=="MSIE")?a.style.styleFloat:a.style.cssFloat)},setFloat:function(b,a){(this.browserType=="MSIE")?b.style.styleFloat=a:b.style.cssFloat=a},ieObjectFix:function(b,a){b.innerHTML=a},getSelection:function(a){if(this.browserType!="MSIE"){return a.getSelection()}if(a==window){a=document}var b=a.selection.createRange();if(a.selection.type!="Control"){return b}},getSelectionText:function(a){return(this.browserType=="MSIE")?a.htmlText:a.toString()},getCookie:function(e){var c=document.cookie.split("; ");for(var a=0,b=c.length;a<b;a++){var d=c[a].split("=");if(d[0]==e){return unescape(d[1].replace(/\+/g," "))}}},setCookie:function(c,e,a,f,d){var b=new Date();document.cookie=c+"="+escape(e)+"; expires="+b.toUTCString(b.setSeconds(a))+(f?"; path="+f:"")+(d?"; domain="+d:"")},convertToFields:function(b,f,c){for(var d in c){if(typeof c[d]=="object"){this.convertToFields(b,f+"["+d+"]",c[d])}else{var e=document.createElement("input");this.setAttributes(e,{type:"hidden",name:f+"["+d+"]",value:c[d]});b.appendChild(e)}}},replace:function(a,e){var d=a.match(/:[A-Za-z0-9_]+/g).sort().reverse();for(var b=0,c=d.length;b<c;b++){a=a.replace(d[b],e[d[b].substr(1)])}return a},trim:function(a){return a.replace(/^\s+|\s+$/g,"")},uniqid:function(a){return Math.floor(Math.random()*(a?a:100000))},concatUnique:function(c,b){var a=[];for(var d=0,e=b.length;d<e;d++){if(!this.inArray(b[d],c)){a.push(b[d])}}return c.concat(a)},implode:function(f,b){if(typeof b!="object"){return b}var g="";if(b.length&&!b.propertyIsEnumerable("length")){for(var e=0,d=b.length;e<d;e++){g+=f+b[e]}}else{for(var c in b){g+=f+b[c]}}return g.substr(f.length)},inArray:function(c,b){for(var e=0,d=b.length;e<d;e++){if((c!=null&&b[e].constructor==Array&&c.constructor==Array&&b[e].toString()==c.toString())||(b[e]==c)){return true}}},saveCheckboxState:function(b,a,c){a.checked?b.innerHTML++:(--b.innerHTML==0)?b.innerHTML="":{};if(c){c(b.innerHTML)}},checkRequiredFields:function(h){h.required=h.required.split(",");var b=this.get("#"+h.formId);var a=false;var k,j,g,e;for(var f=0,d=h.required.length;f<d;f++){if(k=this.trim(h.required[f])){j=this.get("#"+k);g=(j.type.toLowerCase()=="checkbox")?"c":"t";e=(g=="c")?j.parentNode.style:j.style;e.backgroundColor="";if((g=="c"&&!j.checked)||(this.trim(j.value)=="")){e.backgroundColor="#FAA";a=true}}}this.get("#"+h.formId+"-status").innerHTML=a?h.message:"";var c=h.callback?h.callback():"";if(c===false||a){if(h.event){this.preventDefault(h.event)}return false}else{if(!h.event){b.submit()}}},getWindowDims:function(){if(this.browserType=="MSIE"){return{windowWidth:document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||document.body&&document.body.parentNode&&document.body.parentNode.clientWidth||0,windowHeight:document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||document.body&&document.body.parentNode&&document.body.parentNode.clientHeight||0,scrollTop:document.documentElement.scrollTop}}else{return{windowWidth:document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||document.body&&document.body.parentNode&&document.body.parentNode.clientWidth||0,windowHeight:document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||document.body&&document.body.parentNode&&document.body.parentNode.clientHeight||0,scrollTop:window.scrollY}}},getPos:function(b){var c=0,a=0;while(b.offsetParent!=null){c+=b.offsetLeft,a+=b.offsetTop-b.scrollTop,b=b.offsetParent}return{x:c,y:a}},highlightRow:function(c,a,b){this.get("td",c).apply(function(e){var d=e.className.split(" ");e.className=(d[d.length-1]==a)?e.className.substr(0,e.className.length-a.length-1):b?e.className:e.className+" "+a})},serializeForm:function(e){this.form=this.get("#"+e);var d="";var b=this.form.getElementsByTagName("*");for(var a=0;a<b.length;a++){var c=b[a];if(!c.disabled&&c.name&&c.name.length>0){switch(c.tagName.toLowerCase()){case"input":switch(c.type){case"checkbox":case"radio":if(c.checked){if(d.length>0){d+="&"}d+=c.name+"="+encodeURIComponent(c.value)}break;case"hidden":case"password":case"text":if(d.length>0){d+="&"}d+=c.name+"="+encodeURIComponent(c.value);break}break;case"select":case"textarea":if(d.length>0){d+="&"}d+=c.name+"="+encodeURIComponent(c.value);break}}}return d}};var slimFX={intervals:{},fadeScreen:function(a,j){var j=j||{};var i=j.zindex||50;var f=j.opacity||40;var e=(f/100);var k=j.bgcolor||"#000000";var g=document.getElementById("darkenScreenObject");if(!g){var d=document.getElementsByTagName("body")[0];var b=document.createElement("div");b.style.position="absolute";b.style.top="0px";b.style.left="0px";b.style.overflow="hidden";b.style.display="none";b.id="darkenScreenObject";d.appendChild(b);g=document.getElementById("darkenScreenObject")}if(a){if(document.body&&(document.body.scrollWidth||document.body.scrollHeight)){var h=document.body.scrollWidth+"px";var c=document.body.scrollHeight+"px"}else{if(document.body.offsetWidth){var h=document.body.offsetWidth+"px";var c=document.body.offsetHeight+"px"}else{var h="100%";var c="100%"}}g.style.opacity=e;g.style.MozOpacity=e;g.style.filter="alpha(opacity="+f+")";g.style.zIndex=i;g.style.backgroundColor=k;g.style.width=h;g.style.height=c;g.style.display="block"}else{g.style.display="none"}},getOutsideSize:function(c,d){var b=d=="width"?c.offsetWidth:c.offsetHeight;c.style[d]=b.toString()+"px";var a=(d=="width"?c.offsetWidth:c.offsetHeight)-b;c.style[d]=(b-a).toString()+"px";return a},show:function(b){var a=slim.get("#"+b);slim.setStyles(a,{overflow:"hidden",display:"block",visibility:"visible"})},hide:function(h,g,c,f){var e=f?"width":"height";var b=slim.get("#"+h);var a=this.getOutsideSize(b,e);var d={intervalKey:Math.random(),element:b,outsideSize:a,elementSize:(f?b.offsetWidth:b.offsetHeight)-a,callback:g,constantSpeed:c,what:e};b.style.overflow="hidden";b.style.display="none"},scrollToWithAnim:function(b,a){if(Math.abs(a-this.intervals[b].scrollPos)>10){this.intervals[b].scrollPos+=Math.round((a-this.intervals[b].scrollPos)/8);scrollTo(0,this.intervals[b].scrollPos)}else{clearInterval(this.intervals[b].intervalId)}},scrollTo:function(e,a){var c=slim.getPos(slim.get("#"+e)).y+(a?a:0);var b=Math.random();var d=slim.getWindowDims();this.intervals[b]={scrollPos:d.scrollTop,intervalId:setInterval(function(){slimFX.scrollToWithAnim(b,c)},25)}},fadeIn:function(a){slimFX.fadeX(a,1,500,500)},fadeOut:function(a){slimFX.fadeX(a,0,500,500)},animate:function(d,a){var b=new Date().getTime();var f=b-d;var c=document.getElementById(a);if(c.fadeState==3){c.fadeState=1}if(c.fadeState==-3){c.fadeState=-1}if(c.fadeTimeLeft<=f){c.style.opacity=c.fadeState==1?"1":"0";c.style.filter="alpha(opacity = "+(c.fadeState==1?"100":"0")+")";c.fadeState=c.fadeState==1?2:-2;return}c.fadeTimeLeft-=f;var e=c.fadeTimeLeft/c.timeToFade;if(c.fadeState==1){e=1-e}c.style.opacity=e;c.style.filter="alpha(opacity = "+(e*100)+")";setTimeout("slimFX.animate("+b+",'"+a+"')",10)},fadeX:function(d,f,g,c){var e=document.getElementById(d);if(e==null){return}var a=f==1?1:-1;if((g==0)&&(c==0)){e.style.opacity=1*f;e.style.filter="alpha(opacity = "+100*f+")";e.fadeState=2*a;return}if(c==null){c=0}if(f){e.OriginalFadeInTime=g}else{e.OriginalFadeOutTime=g}if(e.fadeState!=null){if((e.fadeState==1*a)||(e.fadeState==2*a)||(e.fadeState==3*a)){return}else{if(e.fadeState==-1*a){e.fadeState=1*a;e.timeToFade=g;if(f){e.fadeTimeLeft=g*(1-e.fadeTimeLeft/e.OriginalFadeOutTime)}else{e.fadeTimeLeft=g*(1-e.fadeTimeLeft/e.OriginalFadeInTime)}return}else{if(e.fadeState==-3*a){e.fadeState=3*a;e.timeToFade=g;if(f){e.fadeTimeLeft=g*(1-e.fadeTimeLeft/e.OriginalFadeOutTime)}else{e.fadeTimeLeft=g*(1-e.fadeTimeLeft/e.OriginalFadeInTime)}return}}}}e.timeToFade=g;e.fadeTimeLeft=g;e.fadeState=3*a;var b=new Date();b.setMilliseconds(b.getMilliseconds()+c);setTimeout("slimFX.animate("+b.getTime()+",'"+d+"')",10+c)}};var slimPopup={show:function(h){if(slim.isBrowserIE6&&window.top.location.href.indexOf("notebook")<0){disableDropDowns()}if(h.stayOpen){stayOpen=true}else{stayOpen=false}if(typeof h.x=="undefined"){h.x=5}if(typeof h.y=="undefined"){h.y=-5}this.popupId=h.popupId;var a=slim.get("#"+h.popupId);var i=slim.getWindowDims();var j;if(h.obj){h.obj.style.opacity=1;j=h.showAtMousePos?slim.getMousePos(h.event):slim.getPos(h.obj);h.obj.blur();if(i.windowWidth<j.x+a.offsetWidth+h.x){j.x-=a.offsetWidth}while(j.y+a.offsetHeight+h.y-i.scrollTop>i.windowHeight){j.y-=40}var f=j.y+h.y+h.obj.offsetHeight;if(this.popupId.indexOf("slim_suggestions")==0){f=f-13}slim.setStyles(a,{left:(j.x+h.x)+"px",top:f+"px"})}else{a.style.opacity=1;var b=i.windowWidth;var e=i.windowHeight;var c=(b/2)-(h.popupWidth/2)-10;var f=140;var g=140;if(h.y<-5){f=f+h.y}slim.setStyles(a,{left:(c)+"px",top:(f)+"px"})}a.style.display="block";if(this.activePopup){this.activePopup.style.display="none"}this.activePopup=a;if(h.modal){slimFX.fadeScreen(true)}slimFX.show(this.popupId);if(h.event){slim.preventDefault(h.event)}if(h.showCallback){h.showCallback(this)}this.hideCallback=h.hideCallback?h.hideCallback:false;if(!stayOpen){slim.addEventListener(document,"mouseup",closeSlimPopup)}},hide:function(){slim.removeEventListener(document,"mouseup",closeSlimPopup);if(slim.isBrowserIE6){enableDropDowns()}slimFX.fadeScreen(false);if(this.activePopup==null){return}if(this.hideCallback){this.hideCallback(this)}slimFX.hide(this.popupId);this.activePopup=null},fadeOut:function(){if(this.activePopup==null){return}slimFX.fadeX(this.popupId,0,800,800);this.activePopup=null}};function slimAjax(f,d,a){var c=this;this.cache={};this.callback=f;try{this.request=new XMLHttpRequest()}catch(b){try{this.request=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){this.request=new ActiveXObject("Microsoft.XMLHTTP")}}this.runCallback=function(g,e){if(!e){if(c.request.readyState!=4){return}c.responseText=c.request.responseText;c.cache[c.cacheKey]=c.responseText}c.callback(d)};this.post=function(e,h){var g;this.cacheKey=e+"?"+h;if(a&&((g=this.cache[this.cacheKey])!=null)){this.responseText=g;this.runCallback("",true);return}this.request.open("post",e,true);this.request.onreadystatechange=this.runCallback;this.request.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");this.request.send(h)}}function slimAutoComplete(vars){var thisObj=this;this.process=function(event){if(this.popup){switch(event.keyCode){case 27:case 37:case 39:slimPopup.hide();break;case 13:this.replaceSnippet(this.snippet);slimPopup.hide();break;case 38:if(this.suggestionPos!=1){this.highlightSuggestion(this.suggestionPos-1)}break;case 40:if(this.suggestionPos!=this.numSuggestions){this.highlightSuggestion(this.suggestionPos+1)}break}}this.content=this.obj.value;if(this.content==this.oldContent){return}var changed=false;for(var i=0,len=this.content.length;i<len;i++){if(this.content.charAt(i)!=this.oldContent.charAt(i)){changed=true;break}}if(!changed&&this.oldContent.length<len){return}if(this.content.charAt(i)==vars.separator){(event.keyCode==8)?i--:i++}for(var j=i;j>0;j--){if(this.content.charAt(j)==vars.separator){j++;break}}var snippet=this.content.substr(j,i-j);for(var j=i;j<len;j++){if(this.content.charAt(j)==vars.separator){break}}snippet+=this.content.substr(i,j-i);snippet=slim.trim(snippet);if(snippet.length>=vars.minChars){this.ajax.post(vars.fileName,vars.params+slim.trim(snippet))}this.oldContent=this.content};this.addProperties=function(id,snippet){var obj=slim.get("#slim_suggestion"+this.uniqid+"_"+id);slim.addEventListener(obj,"mouseover",function(e){thisObj.highlightSuggestion(id)});slim.addEventListener(obj,"click",function(e){thisObj.replaceSnippet(snippet);slim.preventDefault(e)})};this.showSuggestions=function(snippet){var suggestions=this.suggestions[snippet],html="",properties=[],i=0,j=0,k="";for(i in suggestions){if(vars.htmlTemplate){for(k in suggestions[i]){properties[k]=suggestions[i][k]}}html+='<a id="slim_suggestion'+this.uniqid+"_"+(++j)+'" class="'+vars.suggestionClass+'" href="#">'+(vars.htmlTemplate?slim.replace(vars.htmlTemplate,properties):suggestions[i])+"</a>\n"}if(!html){slimPopup.hide();return}this.snippet=snippet;this.suggestionPos=0;this.numSuggestions=j;if(this.popup){slim.removeNode(this.popup)}this.popupId="slim_suggestions"+this.uniqid;this.popup=document.createElement("div");var isBannerVisible=(document.getElementById("topbnr")&&document.getElementById("topbnr").style.display=="block");var popupClass=(isBannerVisible)?"popupWithBanner":"popup";slim.setAttributes(this.popup,{id:this.popupId,className:popupClass});this.obj.parentNode.appendChild(this.popup);this.popup.innerHTML=html;j=0;for(var i in this.suggestions[snippet]){this.addProperties(++j,snippet)}slimPopup.show({obj:this.obj,popupId:this.popupId,x:0,y:0});this.obj.focus()};this.highlightSuggestion=function(suggestionPos){slim.get("#"+this.popupId+" ."+vars.suggestionSelectedClass.replace(" ",".")).apply("className = '"+vars.suggestionClass+"'");slim.get("#slim_suggestion"+this.uniqid+"_"+suggestionPos).className=vars.suggestionSelectedClass;this.suggestionPos=suggestionPos};this.replaceSnippet=function(snippet){var pos=0;for(var i in this.suggestions[snippet]){if(++pos==this.suggestionPos){this.obj.value=this.obj.value.replace(snippet,vars.callback?vars.callback(this.suggestions[snippet][i]):this.suggestions[snippet][i]);break}}this.content=this.obj.value;this.oldContent=this.content};this.init=function(){if(!vars.separator){vars.separator=""}this.uniqid=slim.uniqid();this.obj=slim.get("#"+vars.id);this.content=this.obj.value;this.oldContent=this.content;this.suggestions=[];this.ajax=new slimAjax(function(){if(thisObj.ajax.responseText){var response=eval("("+thisObj.ajax.responseText+")");thisObj.suggestions[response.snippet]=response.result;thisObj.showSuggestions(response.snippet)}},"",true);this.obj.setAttribute("autocomplete","off");slim.addEventListener(this.obj,"keyup",function(e){thisObj.process(e)})};this.init()}function closeSlimPopup(){slimPopup.hide()};
