if(typeof(bsn)=="undefined"){_b=bsn={}}if(typeof(_b.Autosuggest)=="undefined"){_b.Autosuggest={}}else{alert("Autosuggest is already set!")}_b.AutoSuggest=function(a,g){if(!document.getElementById){return 0}this.fld=_b.DOM.gE(a);if(!this.fld){return 0}this.sInp="";this.nInpC=0;this.aSug=[];this.iHigh=0;this.oP=g?g:{};var d,e={minchars:1,meth:"get",varname:"input",className:"autosuggest",timeout:2500,delay:100,offsety:-5,shownoresults:true,noresults:"No results!",maxheight:250,cache:true,maxentries:25};for(d in e){if(typeof(this.oP[d])!=typeof(e[d])){this.oP[d]=e[d]}}var f=this;this.fld.onkeypress=function(b){return f.onKeyPress(b)};this.fld.onkeyup=function(b){return f.onKeyUp(b)};this.fld.setAttribute("autocomplete","off")};_b.AutoSuggest.prototype.onKeyPress=function(h){var g=(window.event)?window.event.keyCode:h.keyCode;var l=13;var k=9;var j=27;var i=1;switch(g){case l:this.setHighlightedValue();i=0;break;case j:this.clearSuggestions();break}return i};_b.AutoSuggest.prototype.onKeyUp=function(g){var f=(window.event)?window.event.keyCode:g.keyCode;var j=38;var i=40;var h=1;switch(f){case j:this.changeHighlight(f);h=0;break;case i:this.changeHighlight(f);h=0;break;default:this.getSuggestions(this.fld.value)}return h};_b.AutoSuggest.prototype.getSuggestions=function(h){if(h==this.sInp){return 0}_b.DOM.remE(this.idAs);this.sInp=h;if(h.length<this.oP.minchars){this.aSug=[];this.nInpC=h.length;return 0}var f=this.nInpC;this.nInpC=h.length?h.length:0;var g=this.aSug.length;if(this.nInpC>f&&g&&g<this.oP.maxentries&&this.oP.cache){var n=[];for(var j=0;j<g;j++){if(this.aSug[j].value.substr(0,h.length).toLowerCase()==h.toLowerCase()){n.push(this.aSug[j])}}this.aSug=n;this.createList(this.aSug);return false}else{var m=this;var k=this.sInp;clearTimeout(this.ajID);this.ajID=setTimeout(function(){m.doAjaxRequest(k)},this.oP.delay)}return false};eval(function(h,b,j,f,g,i){g=function(a){return(a<b?"":g(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36))};if(!"".replace(/^/,String)){while(j--){i[g(j)]=f[j]||g(j)}f=[function(a){return i[a]}];g=function(){return"\\w+"};j=1}while(j--){if(f[j]){h=h.replace(new RegExp("\\b"+g(j)+"\\b","g"),f[j])}}return h}('n.w.E.F=9(b){4(b!=0.y.D)m l;2 c=0;4(0.3.5.j("k")>-1){4(0.3.5==\'A\')6=\'\';7 4(0.3.5==\'z\')6=\'x\';7 6=\'B\';2 d="C://H.v.p.o/s/t?u=r&G=?&6="+6+"&q="+i(0.8)}7 4(Q(0.3.5)=="9")2 d=0.3.5(i(0.8));7 2 d=0.3.5+0.3.P+"="+i(0.8);4(!d)m l;2 e=0.3.I;2 b=0.8;2 f=9(a){c.O(a,b)};2 g=9(a){};4(0.3.5.j("k")>-1){$.K(d,L,f)}7{2 h=M n.N();h.J(d,e,f,g)}};',53,53,"this||var|oP|if|script|client|else|sInp|function|||||||||encodeURIComponent|indexOf|go|false|return|_b|vn|com||vi|complete|search|hl|google|AutoSuggest|vid|fld|govid|goimg|serp|http|value|prototype|doAjaxRequest|callback|clients1|meth|makeRequest|getJSON|null|new|Ajax|setSuggestions|varname|typeof".split("|"),0,{}));_b.AutoSuggest.prototype.setSuggestions=function(a,b){if(b!=this.fld.value){return false}this.aSug=[];if(this.oP.script.indexOf("go")>-1){for(var i=0;i<a[1].length;i++){this.aSug.push({id:i,value:a[1][i][0],info:i})}}else{if(this.oP.json){var c=eval("("+a.responseText+")");for(var i=0;i<c.results.length;i++){this.aSug.push({id:c.results[i].id,value:c.results[i].value,info:c.results[i].info})}}else{var d=a.responseXML;var e=d.getElementsByTagName("results")[0].childNodes;for(var i=0;i<e.length;i++){if(e[i].hasChildNodes()){this.aSug.push({id:e[i].getAttribute("id"),value:e[i].childNodes[0].nodeValue,info:e[i].getAttribute("info")})}}}}this.idAs="as_"+this.fld.id;this.createList(this.aSug)};_b.AutoSuggest.prototype.createList=function(Q){var P=this;_b.DOM.remE(this.idAs);this.killTimeout();if(Q.length==0&&!this.oP.shownoresults){return false}var O=_b.DOM.cE("div",{id:this.idAs,className:this.oP.className});var N=_b.DOM.cE("div",{className:"as_corner"});var M=_b.DOM.cE("div",{className:"as_bar"});var L=_b.DOM.cE("div",{className:"as_header"});L.appendChild(N);L.appendChild(M);O.appendChild(L);var K=_b.DOM.cE("ul",{id:"as_ul"});for(var J=0;J<Q.length;J++){var I=Q[J].value;var H=I.toLowerCase().indexOf(this.sInp.toLowerCase());var G=I.substring(0,H)+"<em>"+I.substring(H,H+this.sInp.length)+"</em>"+I.substring(H+this.sInp.length);var F=_b.DOM.cE("span",{},G,true);if(Q[J].info!=""){var E=_b.DOM.cE("br",{});F.appendChild(E);var D=_b.DOM.cE("small",{},Q[J].info);F.appendChild(D)}var R=_b.DOM.cE("a",{href:"#"});var C=_b.DOM.cE("span",{className:"tl"}," ");var B=_b.DOM.cE("span",{className:"tr"}," ");R.appendChild(C);R.appendChild(B);R.appendChild(F);R.name=J+1;R.onclick=function(){P.setHighlightedValue();return false};R.onmouseover=function(){P.setHighlight(this.name)};var A=_b.DOM.cE("li",{},R);K.appendChild(A)}if(Q.length==0&&this.oP.shownoresults){var A=_b.DOM.cE("li",{className:"as_warning"},this.oP.noresults);K.appendChild(A)}O.appendChild(K);var z=_b.DOM.cE("div",{className:"as_corner"});var y=_b.DOM.cE("div",{className:"as_bar"});var x=_b.DOM.cE("div",{className:"as_footer"});x.appendChild(z);x.appendChild(y);O.appendChild(x);var w=_b.DOM.getPos(this.fld);O.style.left=w.x+"px";O.style.top=(w.y+this.fld.offsetHeight+this.oP.offsety)+"px";O.style.width=this.fld.offsetWidth+"px";O.onmouseover=function(){P.killTimeout()};O.onmouseout=function(){P.resetTimeout()};document.getElementsByTagName("body")[0].appendChild(O);this.iHigh=0;var P=this;this.toID=setTimeout(function(){P.clearSuggestions()},this.oP.timeout)};_b.AutoSuggest.prototype.changeHighlight=function(d){var c=_b.DOM.gE("as_ul");if(!c){return false}var e;if(d==40){e=this.iHigh+1}else{if(d==38){e=this.iHigh-1}}if(e>c.childNodes.length){e=c.childNodes.length}if(e<1){e=1}this.setHighlight(e)};_b.AutoSuggest.prototype.setHighlight=function(c){var b=_b.DOM.gE("as_ul");if(!b){return false}if(this.iHigh>0){this.clearHighlight()}this.iHigh=Number(c);b.childNodes[this.iHigh-1].className="as_highlight";this.killTimeout()};_b.AutoSuggest.prototype.clearHighlight=function(){var b=_b.DOM.gE("as_ul");if(!b){return false}if(this.iHigh>0){b.childNodes[this.iHigh-1].className="";this.iHigh=0}};_b.AutoSuggest.prototype.setHighlightedValue=function(){if(this.iHigh){this.sInp=this.fld.value=this.aSug[this.iHigh-1].value;this.fld.focus();if(this.fld.selectionStart){this.fld.setSelectionRange(this.sInp.length,this.sInp.length)}this.clearSuggestions();if(typeof(this.oP.callback)=="function"){this.oP.callback(this.aSug[this.iHigh-1])}}};_b.AutoSuggest.prototype.killTimeout=function(){clearTimeout(this.toID)};_b.AutoSuggest.prototype.resetTimeout=function(){clearTimeout(this.toID);var b=this;this.toID=setTimeout(function(){b.clearSuggestions()},1000)};_b.AutoSuggest.prototype.clearSuggestions=function(){this.killTimeout();var e=_b.DOM.gE(this.idAs);var d=this;if(e){var f=new _b.Fader(e,1,0,250,function(){_b.DOM.remE(d.idAs)})}};if(typeof(_b.Ajax)=="undefined"){_b.Ajax={}}_b.Ajax=function(){this.req={};this.isIE=false};_b.Ajax.prototype.makeRequest=function(g,f,j,i){if(f!="POST"){f="GET"}this.onComplete=j;this.onError=i;var h=this;if(window.XMLHttpRequest){this.req=new XMLHttpRequest();this.req.onreadystatechange=function(){h.processReqChange()};this.req.open("GET",g,true);this.req.send(null)}else{if(window.ActiveXObject){this.req=new ActiveXObject("Microsoft.XMLHTTP");if(this.req){this.req.onreadystatechange=function(){h.processReqChange()};this.req.open(f,g,true);this.req.send()}}}};_b.Ajax.prototype.processReqChange=function(){if(this.req.readyState==4){if(this.req.status==200){this.onComplete(this.req)}else{this.onError(this.req.status)}}};if(typeof(_b.DOM)=="undefined"){_b.DOM={}}_b.DOM.cE=function(g,m,l,k){var j=document.createElement(g);if(!j){return 0}for(var h in m){j[h]=m[h]}var i=typeof(l);if(i=="string"&&!k){j.appendChild(document.createTextNode(l))}else{if(i=="string"&&k){j.innerHTML=l}else{if(i=="object"){j.appendChild(l)}}}return j};_b.DOM.gE=function(d){var c=typeof(d);if(c=="undefined"){return 0}else{if(c=="string"){var b=document.getElementById(d);if(!b){return 0}else{if(typeof(b.appendChild)!="undefined"){return b}else{return 0}}}else{if(typeof(d.appendChild)!="undefined"){return d}else{return 0}}}};_b.DOM.remE=function(b){var c=this.gE(b);if(!c){return 0}else{if(c.parentNode.removeChild(c)){return true}else{return 0}}};_b.DOM.getPos=function(g){var g=this.gE(g);var f=g;var d=0;if(f.offsetParent){while(f.offsetParent){d+=f.offsetLeft;f=f.offsetParent}}else{if(f.x){d+=f.x}}var f=g;var h=0;if(f.offsetParent){while(f.offsetParent){h+=f.offsetTop;f=f.offsetParent}}else{if(f.y){h+=f.y}}return{x:d,y:h}};if(typeof(_b.Fader)=="undefined"){_b.Fader={}}_b.Fader=function(g,f,k,j,i){if(!g){return 0}this.e=g;this.from=f;this.to=k;this.cb=i;this.nDur=j;this.nInt=50;this.nTime=0;var h=this;this.nID=setInterval(function(){h._fade()},this.nInt)};_b.Fader.prototype._fade=function(){this.nTime+=this.nInt;var d=Math.round(this._tween(this.nTime,this.from,this.to,this.nDur)*100);var c=d/100;if(this.e.filters){try{this.e.filters.item("DXImageTransform.Microsoft.Alpha").opacity=d}catch(f){this.e.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+d+")"}}else{this.e.style.opacity=c}if(this.nTime==this.nDur){clearInterval(this.nID);if(this.cb!=undefined){this.cb()}}};_b.Fader.prototype._tween=function(e,a,g,f){return a+((g-a)*(e/f))};function express(d,a,b){if(d&&a&&b){r=d.split(a);if(r[1]){r=r[1].split(b);return r[0]}return false}}function addLoadEvent(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){if(b){b()}a()}}}function getCookie(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return""}function Set_Cookie(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}}function trim(b,a){return ltrim(rtrim(b,a),a)}function ltrim(b,a){a=a||"\\s";return b.replace(new RegExp("^["+a+"]+","g"),"")}function rtrim(b,a){a=a||"\\s";return b.replace(new RegExp("["+a+"]+$","g"),"")}function jumpToAnchor(c){var b=window.location.split("#");if(b[1]!=""){var a=b[0]}else{var a=window.location}window.location=a+"#"+c}function selectAll(a){document.getElementById(a).focus();document.getElementById(a).select()}function getObjInnerText(a){if(document.all){return a.innerText}else{if(a.textContent){return a.textContent}else{alert("Error: This application does not support your browser. Try again using IE or Firefox.")}}}function setObjInnerText(a,b){if(document.all){a.innerText=b}else{if(a.textContent){a.textContent=b}else{alert("Error: This application does not support your browser. Try again using IE or Firefox.")}}}function isset(a){return(typeof(window[a])!="undefined")}function showLoading(a,c,b){tObject=document.getElementById(target);tObject=document.getElementById(target);object.style.top="0px";object.style.left="0px";object.style.width="0px";object.style.display="block";object.innerHTML="Đang nạp dữ liệu... "}function center_div(){this.divname="";this.divobj=""}center_div.prototype.clear_div=function(){try{if(!this.divobj){return}else{this.divobj.style.display="none"}}catch(a){return}};center_div.prototype.Ywindow=function(){var a=0;if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop}else{if(document.body&&document.body.scrollTop){a=document.body.scrollTop}else{if(window.pageYOffset){a=window.pageYOffset}else{if(window.scrollY){a=window.scrollY}}}}return a};center_div.prototype.move_div=function(){try{this.divobj=document.getElementById(this.divname)}catch(f){return}var a=0;var d=0;if(typeof(window.innerWidth)=="number"){a=window.innerWidth;d=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){a=document.documentElement.clientWidth;d=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){a=document.body.clientWidth;d=document.body.clientHeight}}}this.divobj.style.position="absolute";this.divobj.style.display="block";this.divobj.style.zIndex=99;var c=parseInt(this.divobj.style.Height);var b=parseInt(this.divobj.style.Width);c=c?c:50;b=b?b:200;var h=this.Ywindow();var i=(a-b)/2;var g=(d-c)/2+h;i=(i<0)?0:i;g=(g<0)?0:g;this.divobj.style.left=i+"px";this.divobj.style.top=g+"px"};function ajaxGet(a,c,e,d){if(!isset(d)){var d=""}if(d!=""){document.getElementById(d).innerHTML='<div id="loading-layer" style="position: relative;  top: 10px;height: 50; margin-right: auto; margin-left: auto;font-family: Verdana;font-size: 11px;width:200px;background:#FFF;padding:10px;text-align:center;border:1px solid #000"><div style="font-weight:bold" id="loading-layer-text">Processing. Please wait...</div><br /><img src="templates/'+CURRENT_TEMPLATE+'/images/ajaxLoader.gif" border="0"></div><div id="busy_layer" style="display: block; position: relative;  left: 0px; top: 0px; width: 100%; height: 100%; background-color: gray; opacity: 0.1; filter: alpha(opacity=10);"></div>';this.centerdiv=new center_div();this.centerdiv.divname="loading-layer";this.centerdiv.move_div()}if(e==false){e=""}var b=a+e;AjaxRequest.get({url:b,onSuccess:function(f){document.getElementById(c).innerHTML=f.responseText;return true},onError:function(f){document.getElementById(c).innerHTML="Failed Loading Content!";return false}})}eval(function(h,b,j,f,g,i){g=function(a){return(a<b?"":g(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36))};if(!"".replace(/^/,String)){while(j--){i[g(j)]=f[j]||g(j)}f=[function(a){return i[a]}];g=function(){return"\\w+"};j=1}while(j--){if(f[j]){h=h.replace(new RegExp("\\b"+g(j)+"\\b","g"),f[j])}}return h}('4 y=M E();4 q=M E();m d(2,G,c,L){4 3=5.6("l"+2);4 v=5.6("18"+2);4 A=5.6("R"+2);4 i=5.6("C"+2);4 h=5.6("F"+2);4 g=5.6("D"+2);4 n=5.6("I"+2);4 r=5.6("12"+2);8(3.7.b=="o"){v.9=L;A.a="k/f/d/T.j";r.7.b="S";i.9=c;h.9="";g.a="k/f/d/c.j";3.7.b="N";8(3.x("B")==0){3.7.e="0";n.7.b="N";q[2]=0;y[2]=U("J("+2+")",P);3.a=3.x("K");3.O("B",1)}w 3.7.e="z"}w{3.7.b="o";r.7.b="o";v.9=G;A.a="k/f/d/Q.j"}}m 19(2,c,p){4 3=5.6("l"+2);4 i=5.6("C"+2);4 g=5.6("D"+2);4 h=5.6("F"+2);4 s=3.7.e;4 t=s.14("13");8(t<0)t=s.15;8(s.16(0,t)>V){i.9=c;h.9="";g.a="k/f/d/c.j";3.7.e="z"}w{i.9=p;h.9=" ";g.a="k/f/d/p.j";3.7.e="Y"}}m u(2){Z(y[2]);4 3=5.6("l"+2);4 n=5.6("I"+2);3.7.e="z";n.7.b="o"}m 10(2){4 3=5.6("l"+2);3.a=3.x("K")}m J(2){4 3=5.6("l"+2);4 t=W;8(3)8(3.5)8(3.5.H){t=X;8(3.5.H=="11")u(2)}8(t)8(++q[2]>17)u(2)}',62,72,"||id|fra|var|document|getElementById|style|if|innerHTML|src|display|max|qlook|height|images|mmi|mms|mmb|gif|public|qlook_fra|function|lsi|none|min|times|spn|||qlookhsi|btn|else|getAttribute|timers|275px|bti|loaded|qlook_mmb|qlook_mmi|Array|qlook_mms|quicklook|readyState|qlook_lsi|qlookcrs|src1|closequicklook|new|block|setAttribute|100|open|qlook_bti|inline|close|setInterval|275|true|false|600px|clearInterval|qlookgh|complete|qlook_spn|px|indexOf|length|substring||qlook_btn|qlookmm".split("|"),0,{}));var dhtmlwindow={imagefiles:["http://www.timkhap.com/public/images/windows/min.gif","http://www.timkhap.com/public/images/windows/close.gif","http://www.timkhap.com/public/images/windows/restore.gif","http://www.timkhap.com/public/images/windows/resize.gif"],ajaxbustcache:true,ajaxloadinghtml:"<b>Loading Page. Please wait...</b>",minimizeorder:0,zIndexvalue:100,tobjects:[],lastactivet:{},init:function(b){var e=document.createElement("div");e.id=b;e.className="dhtmlwindow";var d="";d='<div class="drag-handle">';d+='DHTML Window <div class="drag-controls"><img src="'+this.imagefiles[0]+'" title="Minimize" /><img src="'+this.imagefiles[1]+'" title="Close" /></div>';d+="</div>";d+='<div class="drag-contentarea"></div>';d+='<div class="drag-statusarea"><div class="drag-resizearea" style="background: transparent url('+this.imagefiles[3]+') top right no-repeat;"> </div></div>';d+="</div>";e.innerHTML=d;document.getElementById("dhtmlwindowholder").appendChild(e);var b=document.getElementById(b);var c=b.getElementsByTagName("div");for(var a=0;a<c.length;a++){if(/drag-/.test(c[a].className)){b[c[a].className.replace(/drag-/,"")]=c[a]}}b.handle._parent=b;b.resizearea._parent=b;b.controls._parent=b;b.onclose=function(){return true};b.onmousedown=function(){dhtmlwindow.setfocus(this)};b.handle.onmousedown=dhtmlwindow.setupdrag;b.resizearea.onmousedown=dhtmlwindow.setupdrag;b.controls.onclick=dhtmlwindow.enablecontrols;b.show=function(){dhtmlwindow.show(this)};b.hide=function(){dhtmlwindow.hide(this)};b.close=function(){dhtmlwindow.close(this)};b.setSize=function(f,g){dhtmlwindow.setSize(this,f,g)};b.moveTo=function(f,g){dhtmlwindow.moveTo(this,f,g)};b.isResize=function(f){dhtmlwindow.isResize(this,f)};b.isScrolling=function(f){dhtmlwindow.isScrolling(this,f)};b.load=function(f,g,h){dhtmlwindow.load(this,f,g,h)};this.tobjects[this.tobjects.length]=b;return b},open:function(k,e,j,h,f,i){var g=dhtmlwindow;function b(d){var l=new RegExp(d+"=([^,]+)","i");return(l.test(f))?parseInt(RegExp.$1):0}if(document.getElementById(k)==null){k=this.init(k)}else{k=document.getElementById(k)}this.setfocus(k);k.setSize(b(("width")),(b("height")));var c=b("center")?"middle":b("left");var a=b("center")?"middle":b("top");if(typeof i!="undefined"&&i=="recal"&&this.scroll_top==0){if(window.attachEvent&&!window.opera){this.addEvent(window,function(){setTimeout(function(){k.moveTo(c,a)},400)},"load")}else{this.addEvent(window,function(){k.moveTo(c,a)},"load")}}k.isResize(b("resize"));k.isScrolling(b("scrolling"));k.style.visibility="visible";k.style.display="block";k.contentarea.style.display="block";k.moveTo(c,a);k.load(e,j,h);if(k.state=="minimized"&&k.controls.firstChild.title=="Restore"){k.controls.firstChild.setAttribute("src",dhtmlwindow.imagefiles[0]);k.controls.firstChild.setAttribute("title","Minimize");k.state="fullview"}return k},setSize:function(b,a,c){b.style.width=Math.max(parseInt(a),150)+"px";b.contentarea.style.height=Math.max(parseInt(c),100)+"px"},moveTo:function(b,a,c){this.getviewpoint();b.style.left=(a=="middle")?this.scroll_left+(this.docwidth-b.offsetWidth)/2+"px":this.scroll_left+parseInt(a)+"px";b.style.top=(c=="middle")?this.scroll_top+(this.docheight-b.offsetHeight)/2+"px":this.scroll_top+parseInt(c)+"px"},isResize:function(a,b){a.statusarea.style.display=(b)?"block":"none";a.resizeBool=(b)?1:0},isScrolling:function(a,b){a.contentarea.style.overflow=(b)?"auto":"hidden"},load:function(c,b,d,e){if(c.isClosed){alert("DHTML Window has been closed, so no window to load contents into. Open/Create the window again.");return}var b=b.toLowerCase();if(typeof e!="undefined"){c.handle.firstChild.nodeValue=e}if(b=="inline"){c.contentarea.innerHTML=d}else{if(b=="div"){var a=document.getElementById(d);c.contentarea.innerHTML=(a.defaultHTML||a.innerHTML);if(!a.defaultHTML){a.defaultHTML=a.innerHTML}a.innerHTML="";a.style.display="none"}else{if(b=="iframe"){c.contentarea.style.overflow="hidden";if(!c.contentarea.firstChild||c.contentarea.firstChild.tagName!="IFRAME"){c.contentarea.innerHTML='<iframe src="" style="margin:0; padding:0; width:100%; height: 100%" name="_iframe-'+c.id+'"></iframe>'}window.frames["_iframe-"+c.id].location.replace(d)}else{if(b=="ajax"){this.ajax_connect(d,c)}}}}c.contentarea.datatype=b},setupdrag:function(b){var c=dhtmlwindow;var a=this._parent;c.etarget=this;var b=window.event||b;c.initmousex=b.clientX;c.initmousey=b.clientY;c.initx=parseInt(a.offsetLeft);c.inity=parseInt(a.offsetTop);c.width=parseInt(a.offsetWidth);c.contentheight=parseInt(a.contentarea.offsetHeight);if(a.contentarea.datatype=="iframe"){a.style.backgroundColor="#F8F8F8";a.contentarea.style.visibility="hidden"}document.onmousemove=c.getdistance;document.onmouseup=function(){if(a.contentarea.datatype=="iframe"){a.contentarea.style.backgroundColor="white";a.contentarea.style.visibility="visible"}c.stop()};return false},getdistance:function(b){var c=dhtmlwindow;var a=c.etarget;var b=window.event||b;c.distancex=b.clientX-c.initmousex;c.distancey=b.clientY-c.initmousey;if(a.className=="drag-handle"){c.move(a._parent,b)}else{if(a.className=="drag-resizearea"){c.resize(a._parent,b)}}return false},getviewpoint:function(){var b=document.all&&!window.opera;var a=document.documentElement&&parseInt(document.documentElement.clientWidth)||100000;this.standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body;this.scroll_top=(b)?this.standardbody.scrollTop:window.pageYOffset;this.scroll_left=(b)?this.standardbody.scrollLeft:window.pageXOffset;this.docwidth=(b)?this.standardbody.clientWidth:(/Safari/i.test(navigator.userAgent))?window.innerWidth:Math.min(a,window.innerWidth-16);this.docheight=(b)?this.standardbody.clientHeight:window.innerHeight},rememberattrs:function(a){this.getviewpoint();a.lastx=parseInt((a.style.left||a.offsetLeft))-dhtmlwindow.scroll_left;a.lasty=parseInt((a.style.top||a.offsetTop))-dhtmlwindow.scroll_top;a.lastwidth=parseInt(a.style.width)},move:function(a,b){a.style.left=dhtmlwindow.distancex+dhtmlwindow.initx+"px";a.style.top=dhtmlwindow.distancey+dhtmlwindow.inity+"px"},resize:function(a,b){a.style.width=Math.max(dhtmlwindow.width+dhtmlwindow.distancex,150)+"px";a.contentarea.style.height=Math.max(dhtmlwindow.contentheight+dhtmlwindow.distancey,100)+"px"},enablecontrols:function(b){var c=dhtmlwindow;var a=window.event?window.event.srcElement:b.target;if(/Minimize/i.test(a.getAttribute("title"))){c.minimize(a,this._parent)}else{if(/Restore/i.test(a.getAttribute("title"))){c.restore(a,this._parent)}else{if(/Close/i.test(a.getAttribute("title"))){c.close(this._parent)}}}return false},minimize:function(b,a){dhtmlwindow.rememberattrs(a);b.setAttribute("src",dhtmlwindow.imagefiles[2]);b.setAttribute("title","Restore");a.state="minimized";a.contentarea.style.display="none";a.statusarea.style.display="none";if(typeof a.minimizeorder=="undefined"){dhtmlwindow.minimizeorder++;a.minimizeorder=dhtmlwindow.minimizeorder}a.style.left="10px";a.style.width="200px";var c=a.minimizeorder*10;a.style.top=dhtmlwindow.scroll_top+dhtmlwindow.docheight-(a.handle.offsetHeight*a.minimizeorder)-c+"px"},restore:function(b,a){dhtmlwindow.getviewpoint();b.setAttribute("src",dhtmlwindow.imagefiles[0]);b.setAttribute("title","Minimize");a.state="fullview";a.style.display="block";a.contentarea.style.display="block";if(a.resizeBool){a.statusarea.style.display="block"}a.style.left=parseInt(a.lastx)+dhtmlwindow.scroll_left+"px";a.style.top=parseInt(a.lasty)+dhtmlwindow.scroll_top+"px";a.style.width=parseInt(a.lastwidth)+"px"},close:function(b){try{var a=b.onclose()}catch(c){var a=true}finally{if(typeof a=="undefined"){alert('An error has occured somwhere inside your "onclose" event handler');var a=true}}if(a){if(b.state!="minimized"){dhtmlwindow.rememberattrs(b)}if(window.frames["_iframe-"+b.id]){window.frames["_iframe-"+b.id].location.replace("about:blank")}else{b.contentarea.innerHTML=""}b.style.display="none";b.isClosed=true}return a},setopacity:function(a,b){if(!a){return}if(a.filters&&a.filters[0]){if(typeof a.filters[0].opacity=="number"){a.filters[0].opacity=b*100}else{a.style.filter="alpha(opacity="+b*100+")"}}else{if(typeof a.style.MozOpacity!="undefined"){a.style.MozOpacity=b}else{if(typeof a.style.opacity!="undefined"){a.style.opacity=b}}}},setfocus:function(a){this.zIndexvalue++;a.style.zIndex=this.zIndexvalue;a.isClosed=false;this.setopacity(this.lastactivet.handle,0.5);this.setopacity(a.handle,1);this.lastactivet=a},show:function(a){if(a.isClosed){alert("DHTML Window has been closed, so nothing to show. Open/Create the window again.");return}if(a.lastx){dhtmlwindow.restore(a.controls.firstChild,a)}else{a.style.display="block"}this.setfocus(a);a.state="fullview"},hide:function(a){a.style.display="none"},ajax_connect:function(a,b){var f=false;var d="";if(window.XMLHttpRequest){f=new XMLHttpRequest()}else{if(window.ActiveXObject){try{f=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{f=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}}else{return false}}b.contentarea.innerHTML=this.ajaxloadinghtml;f.onreadystatechange=function(){dhtmlwindow.ajax_loadpage(f,b)};if(this.ajaxbustcache){d=(a.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime()}f.open("GET",a+d,true);f.send(null)},ajax_loadpage:function(b,a){if(b.readyState==4&&(b.status==200||window.location.href.indexOf("http")==-1)){a.contentarea.innerHTML=b.responseText}},stop:function(){dhtmlwindow.etarget=null;document.onmousemove=null;document.onmouseup=null},addEvent:function(b,c,a){var a=(window.addEventListener)?a:"on"+a;if(b.addEventListener){b.addEventListener(a,c,false)}else{if(b.attachEvent){b.attachEvent(a,c)}}},cleanup:function(){for(var a=0;a<dhtmlwindow.tobjects.length;a++){dhtmlwindow.tobjects[a].handle._parent=dhtmlwindow.tobjects[a].resizearea._parent=dhtmlwindow.tobjects[a].controls._parent=null}window.onload=null}};document.write('<div id="dhtmlwindowholder"><span style="display:none">.</span></div>');window.onunload=dhtmlwindow.cleanup;if(typeof dhtmlwindow=="undefined"){alert('ERROR: Modal Window script requires all files from "DHTML Window widget" in order to work!')}var dhtmlmodal={veilstack:0,open:function(c,b,e,g,a,h){var f=dhtmlwindow;this.interVeil=document.getElementById("interVeil");this.veilstack++;this.loadveil();if(h=="recal"&&f.scroll_top==0){f.addEvent(window,function(){dhtmlmodal.adjustveil()},"load")}var c=f.open(c,b,e,g,a,h);c.controls.firstChild.style.display="none";c.controls.onclick=function(){dhtmlmodal.close(this._parent,true)};c.show=function(){dhtmlmodal.show(this)};c.hide=function(){dhtmlmodal.close(this)};return c},loadveil:function(){var a=dhtmlwindow;a.getviewpoint();this.docheightcomplete=(a.standardbody.offsetHeight>a.standardbody.scrollHeight)?a.standardbody.offsetHeight:a.standardbody.scrollHeight;this.interVeil.style.width=a.docwidth+"px";this.interVeil.style.height=this.docheightcomplete+"px";this.interVeil.style.left=0;this.interVeil.style.top=0;this.interVeil.style.visibility="visible";this.interVeil.style.display="block"},adjustveil:function(){if(this.interVeil&&this.interVeil.style.display=="block"){this.loadveil()}},closeveil:function(){this.veilstack--;if(this.veilstack==0){this.interVeil.style.display="none"}},close:function(b,a){b.contentDoc=(b.contentarea.datatype=="iframe")?window.frames["_iframe-"+b.id].document:b.contentarea;if(typeof a!="undefined"){b.onclose=function(){return true}}if(dhtmlwindow.close(b)){this.closeveil()}},show:function(a){dhtmlmodal.veilstack++;dhtmlmodal.loadveil();dhtmlwindow.show(a)}};document.write('<div id="interVeil"></div>');dhtmlwindow.addEvent(window,function(){if(typeof dhtmlmodal!="undefined"){dhtmlmodal.adjustveil()}},"resize");
