
if(!Function.prototype.apply){Function.prototype.apply=function(o,a){var r;if(!o){o={};}
o.___apply=this;switch((a&&a.length)||0){case 0:r=o.___apply();break;case 1:r=o.___apply(a[0]);break;case 2:r=o.___apply(a[0],a[1]);break;case 3:r=o.___apply(a[0],a[1],a[2]);break;case 4:r=o.___apply(a[0],a[1],a[2],a[3]);break;case 5:r=o.___apply(a[0],a[1],a[2],a[3],a[4]);break;case 6:r=o.___apply(a[0],a[1],a[2],a[3],a[4],a[5]);break;default:for(var i=0,s="";i<a.length;i++){if(i!=0){s+=",";}
s+="a["+i+"]";}
r=eval("o.___apply("+s+")");}
o.__apply=null;return r;}};if(!Function.prototype.call){Function.prototype.call=function(o){var args=new Array(arguments.length-1);for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i];}
return this.apply(o,args);}};Function_bind=function(_this,object){var __method=_this;return function(){__method.apply(object,arguments);}};Function_bindEventListener=function(_this,object){var __method=_this;return function(event){__method.call(object,event||window.event);}};if(!Array.prototype.push){Array_push=function(_this,obj){for(var i=1;i<arguments.length;i++){_this[_this.length]=arguments[i];}
return _this.length;}}else{Array_push=function(_this,obj){for(var i=1;i<arguments.length;i++){_this.push(arguments[i]);}
return _this.length;}};if(!Array.prototype.pop){Array_pop=function(_this){if(_this.length==0){try{return undefined;}catch(e){return null;}}
return _this[_this.length--];}}else{Array_pop=function(_this){return _this.pop();}};if(!Array.prototype.shift){Array_shift=function(_this){_this.reverse();var lastv=Array_pop(_this);_this.reverse();return lastv;};}else{Array_shift=function(_this){return _this.shift();};};if(!Array.prototype.splice){Array_splice=function(_this,start,deleteCount){var len=parseInt(_this.length);start=start?parseInt(start):0;start=(start<0)?Math.max(start+len,0):Math.min(len,start);deleteCount=deleteCount?parseInt(deleteCount):0;deleteCount=Math.min(Math.max(parseInt(deleteCount),0),len);var deleted=_this.slice(start,start+deleteCount);var insertCount=Math.max(arguments.length-1,1);var new_len=_this.length+insertCount-deleteCount;var start_slide=start+insertCount;var nslide=len-start_slide;for(var i=new_len-1;i>=start_slide;--i){_this[i]=_this[i-nslide];}
for(i=start;i<start+insertCount;++i){_this[i]=arguments[i-start+3];}
return deleted;};}else{Array_splice=function(_this,start,deleteCount){var args=[];var s='';for(var i=3;i<arguments.length;i++){args[i-3]=arguments[i];s+=', '+'args['+(i-3)+']';}
s='var ret = _this.splice(start, deleteCount'+s+')';eval(s);return ret;};};Object_toArray=function(_this,delim){var result;if(typeof(delim)=='undefined'){delim=',';}
switch(typeof(_this)){case'array':result=_this;break;case'string':if(_this.indexOf(delim)){result=_this.split(delim);}else{result.push(_this);}
break;default:result.push(_this);break;}};Object_weave=function(_this,source){for(property in source){_this[property]=source[property];}
return _this;};Object_weave_safe=function(_this,source){for(property in source){if(typeof _this[property]=='undefined'){_this[property]=source[property];}}
return _this;};Array_indexOf=function(_this,x){for(var i=0;i<_this.length;i++){if(_this[i]==x){return i;}}
return-1;};Array_lastIndexOf=function(_this,x){for(var i=_this.length-1;i>=0;i--){if(_this[i]==x){return i;}}
return-1;};Array_last=function(_this){if(_this.length>0){return _this[_this.length-1];}};String_trim=function(_this,str){if(!str)str=_this;return str.replace(/^\s*/,"").replace(/\s*$/,"");};String_normalize_space=function(_this,str){if(!str)str=_this;return String_trim(str).replace(/\s+/g," ");};String_htmlencode=function(_this,str){if(!str)str=_this;return str.replace(/\&/g,"&amp;").replace(/\</g,"&lt;").replace(/\>/g,"&gt;").replace(/\"/g,"&quot;");};String_htmldecode=function(_this,str){if(!str)str=_this;return str.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,"\"").replace(/&amp;/g,"&");};Array_each=function(_this,block){for(var index=0;index<_this.length;++index){var item=_this[index];block(item,index)}
return _this;};Number_times=function(_this,block){for(var i=0;i<_this;i++)block(i)};Array_min=function(_this){if(_this.length==0)return false;if(_this.length==1)return _this[0];var min,me,val;min=0;me=_this;Array_each(me,function(val,i){if(val<me[min]){min=i;}});return _this[min];};String_min=function(_this){return Array_min(_this.split(','));};function min(){var a=[];Array_each(arguments,function(val,i){Array_push(a,val);});return Array_min(a);};Array_max=function(_this){if(_this.length==0)return false;if(_this.length==1)return _this[0];var max,me,val;max=0;me=_this;Array_each(me,function(val,i){if(val>me[max]){max=i;}});return _this[max];};String_max=function(_this){return Array_max(_this.split(','));};function max(){var a=[];Array_each(arguments,function(val,i){Array_push(a,val);});return Array_max(a);};


var is=new BrowserCheck();if(typeof utility=='undefined')utility={};Object_weave_safe(utility,{math:{}});utility.math.intbgr2hexrgb=function(a){d2h=utility.math.dec2hex;pad=utility.math.zeroPad;return"#"+pad(d2h(a%256),2)+pad(d2h((a/256)%256),2)+pad(d2h((a/65536)%256),2);}
utility.math.mozcolor2rgb=function(color){return color;}
utility.math.dec2hex=function(x){return Number(parseInt(x)).toString(16);}
utility.math.hex2dec=function(x){return parseInt(x,16);}
utility.math.zeroPad=function(str,length){if(!str)str="";str=str.toString();while(str.length<length){str="0"+str;}
return str;}
utility.math.rgb2hexcolor=function(color){var arr=[];if(arr=color.match(/^rgb\(([0-9]+),\s*([0-9]+),\s*([0-9]+)\)/i)){var ret='';for(var i=1;i<4;i++){var tmp=utility.math.dec2hex(arr[i]);while(tmp.length<2){tmp="0"+tmp;}
ret+=tmp;}
return"#"+ret;}else{return color;}}
Object_weave_safe(utility,{js:{}});utility.js.build=function(fun1,fun2){var me=function(){if(fun2){fun2();}
if(fun1){fun1();}}
return me;}
utility.js.empty_func=function(){};Object_weave_safe(utility,{debug:{}});utility.debug.dump=function(obj,sep){if(sep==undefined){sep='';}
tm="";if(typeof(obj)=="object"){for(var i in obj){tm+=sep+i+":{\n"+utility.debug.dump(obj[i],sep+'  ')+"}\n";}
return tm;}
if(typeof(obj)=="function")return sep+typeof(obj)+"\n";return sep+obj+"\n";}
function al(obj,rx){alert(utility.debug.dumpone(obj,rx));}
utility.debug.dumpone=function(obj,rx,sep){if(rx==undefined){rx=new RegExp("","");}
if(sep==undefined){sep='';}
tm="";if(typeof(obj)=="object"&&obj!=null){if(typeof(obj.push)!="undefined"&&obj.push.toString().indexOf("[native code]")>0){tm=sep+"Array["+obj.length+"]\n";}else{for(i in obj){if(i.toUpperCase()==i){continue;}
if(!rx.test(i)){continue;}
try{if(typeof obj[i]!='function'){tm+=sep+i+":{"+obj[i]+"}\n";}else{}}catch(err){tm+=sep+i+":ERROR{"+err.message+"}\n";}}}
return tm;}
if(typeof(obj)=="function")return sep+typeof(obj)+"\n";return sep+obj+"\n";}
utility.debug.breakpoint=function(evalFunc,msg,initialExprStr){if(evalFunc==null)
evalFunc=function(e){return eval(e)};if(msg==null)
msg="";var result=initialExprStr||"1+2";while(true){var expr=prompt("BREAKPOINT: "+msg+"\nEnter an expression to evaluate, or Cancel to continue.",result);if(expr==null||expr=="")
return;try{result=evalFunc(expr);}catch(e){result=e;}}}
Object_weave_safe(utility,{string:{}});utility.string.htmlspecialchars=function(str){Array_each([['>','&gt;'],['<','&lt;'],['\xA0','&nbsp;'],['"','&quot;']],function(repl,idx){str=str.replace(new RegExp('['+repl[0]+']',"g"),repl[1]);});return str;}
utility.string.getInnerText=function(str){if(typeof getInnerText_tmpDiv=='undefined'){getInnerText_tmpDiv=document.createElement('div');}
var oldstr=str;try{getInnerText_tmpDiv.innerHTML=str;if(is.safari){str=getInnerText_tmpDiv.innerHTML;getInnerText_tmpDiv.innerHTML="";}else{str=getInnerText_tmpDiv.innerText;getInnerText_tmpDiv.innerHTML="";}}catch(e){return oldstr;}
if(typeof str=='undefined'){return oldstr;}
return str;}
utility.string.sprintf=function(){if(!arguments||arguments.length<1||!RegExp){return;}
var str=arguments[0];var oldstr=arguments[0];var re=/([^%]*)%('.|0|\x20)?(-)?(\d+)?(\.\d+)?(%|b|c|d|u|f|o|s|x|X)(.*)/;var a=b=[],numSubstitutions=0,numMatches=0;while(a=re.exec(str)){var leftpart=a[1],pPad=a[2],pJustify=a[3],pMinLength=a[4];var pPrecision=a[5],pType=a[6],rightPart=a[7];numMatches++;if(pType=='%'){subst='%';}else{numSubstitutions++;if(numSubstitutions>=arguments.length){return oldstr;}
var param=arguments[numSubstitutions];var subst=param;if(pType=='c')subst=String.fromCharCode(parseInt(param));else if(pType=='d')subst=parseInt(param)?parseInt(param):0;else if(pType=='s')subst=param;}
str=leftpart+subst+rightPart;}
return str;}
Object_weave_safe(utility,{dom:{}});utility.dom.setUnselectable=function(el){if(is.ie){for(var i=0;i<el.all.length;i++){if(el.all[i].tagName!="INPUT"&&el.all[i].tagName!="TEXTAREA"){var oldCurr=utility.dom.getStyleProperty(el.all[i],"cursor");el.all[i].unselectable="On";if(oldCurr=="auto"){el.all[i].style.cursor="default";}}else if(el.all[i].type=="text"||el.all[i].tagName=="TEXTAREA"){el.all[i].style.cursor="text";}}}else{var allChilds=utility.dom.getElementsByTagName(el,'*');Array_each(allChilds,function(child){var oldCurr=utility.dom.getStyleProperty(child,"cursor");var isHtmlEl=(child.nodeType==1)?true:false;if(true){var isInput=((child.nodeName.toLowerCase()=="input")&&(child.getAttribute('type')&&child.getAttribute('type').toLowerCase()=='text')||(child.getAttribute('type')&&child.getAttribute('type').toLowerCase()=='password'))?true:false;var isTxtArea=(child.nodeName.toLowerCase()=="textarea")?true:false;if(!isInput&&!isTxtArea){if(oldCurr=="auto"){child.style.cursor="default";}
var hasHTMLChilds=utility.dom.getElementsByTagName(child,'*').length?true:false;if(!hasHTMLChilds){child.style.MozUserSelect='none';}}else{child.style.cursor="text !important";}};});}};utility.dom.getPixels=function(m,s){var v=utility.dom.getStyleProperty(m,s);if(v=="medium"){v=2;}else{v=parseInt(v,10);}
v=isNaN(v)?0:v;return v;};utility.dom.getBorderBox=function(el,doc){doc=doc||document;if(typeof(el)=='string'){el=doc.getElementById(el);}
if(!el){return false;}
if(el.parentNode===null||utility.dom.getStyleProperty(el,'display')=='none'){return false;}
var ret={x:0,y:0,width:0,height:0};var parent=null;var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var scrollTop=doc.documentElement.scrollTop||doc.body.scrollTop;var scrollLeft=doc.documentElement.scrollLeft||doc.body.scrollLeft;ret.x=box.left+scrollLeft;ret.y=box.top+scrollTop;ret.width=box.right-box.left;ret.height=box.bottom-box.top;}else if(doc.getBoxObjectFor){box=doc.getBoxObjectFor(el);ret.x=box.x;ret.y=box.y;ret.width=box.width;ret.height=box.height;var btw=utility.dom.getPixels(el,"border-top-width");var blw=utility.dom.getPixels(el,"border-left-width");ret.x-=blw;ret.y-=btw;}else{ret.x=el.offsetLeft;ret.y=el.offsetTop;ret.width=el.offsetWidth;ret.height=el.offsetHeight;parent=el.offsetParent;if(parent!=el){while(parent){ret.x+=parent.offsetLeft;ret.y+=parent.offsetTop;parent=parent.offsetParent;}}
var blw=utility.dom.getPixels(el,"border-left-width");var btw=utility.dom.getPixels(el,"border-top-width");ret.x-=blw;ret.y-=btw;var ua=navigator.userAgent.toLowerCase();if(is.opera||is.safari&&utility.dom.getStyleProperty(el,'position')=='absolute'){ret.y-=doc.body.offsetTop;}}
if(el.parentNode){parent=el.parentNode;}else{parent=null;}
while(parent&&parent.tagName!='BODY'&&parent.tagName!='HTML'){ret.x-=parent.scrollLeft;ret.y-=parent.scrollTop;if(parent.parentNode){parent=parent.parentNode;}else{parent=null;}}
return ret;};utility.dom.setBorderBox=function(el,box){var pos=utility.dom.getBorderBox(el,el.ownerDocument);if(pos===false){return false;}
var delta={x:utility.dom.getPixels(el,'left'),y:utility.dom.getPixels(el,'top')};var new_pos={x:0,y:0};if(box.x!==null){new_pos.x=box.x-pos.x+delta.x;}
if(box.y!==null){new_pos.y=box.y-pos.y+delta.y;}
if(box.x!==null){el.style.left=new_pos.x+'px';}
if(box.y!==null){el.style.top=new_pos.y+'px';}
return true;};utility.dom.bringIntoView=function(source){var box=utility.dom.getBorderBox(source,source.ownerDocument);if(box===false){return false;}
var current={x:utility.dom.getPixels(source,'left'),y:utility.dom.getPixels(source,'top')};var delta={x:0,y:0};var offset_fix={x:0,y:0};var strictm=source.ownerDocument.compatMode=="CSS1Compat";var doc=(is.ie&&strictm||is.mozilla)?source.ownerDocument.documentElement:source.ownerDocument.body;offset_fix.x=utility.dom.getPixels(doc,'border-left-width');offset_fix.y=utility.dom.getPixels(doc,'border-top-width');var st=doc.scrollTop;var ch=doc.clientHeight;var t=box.y+(is.ie?-offset_fix.y:offset_fix.y);var b=box.y+box.height+(is.ie?-offset_fix.y:offset_fix.y);if(b-st>ch){delta.y=ch-(b-st);if(t+delta.y<st){delta.y=st-t;}}else if(t<st){delta.y=st-t;}
if(delta.y!=0){source.style.top=(current.y+delta.y)+'px';}
var sl=doc.scrollLeft;var cw=doc.clientWidth;var l=box.x+(is.ie?-offset_fix.x:offset_fix.x);var r=box.x+box.width+(is.ie?-offset_fix.x:offset_fix.x);if(r-sl>cw){delta.x=cw-(r-sl);if(l+delta.x<sl){delta.x=sl-l;}}else if(l<sl){delta.x=sl-l;}
if(delta.x!=0){source.style.left=(current.x+delta.x)+'px';}};utility.dom.putElementAt=function(source,target,relative,offset,biv){offset=util_defaultValue(offset,{x:0,y:0});biv=util_defaultValue(biv,true);var si=parseInt(relative.charAt(0),10);var ti=parseInt(relative.charAt(1),10);var source_box=utility.dom.getBorderBox(source,source.ownerDocument);var target_box=utility.dom.getBorderBox(target,target.ownerDocument);var sx=['0','-source_box.width','-source_box.width','0','-source_box.width/2','-source_box.width','-source_box.width/2','0','-source_box.width/2'];var tx=['target_box.x','target_box.x+target_box.width','target_box.x+target_box.width','target_box.x','target_box.x+target_box.width/2','target_box.x+target_box.width','target_box.x+target_box.width/2','target_box.x','target_box.x+target_box.width/2'];var sy=['0','0','-source_box.height','-source_box.height','0','-source_box.height/2','-source_box.height','-source_box.height/2','-source_box.height/2'];var ty=['target_box.y','target_box.y','target_box.y+target_box.height','target_box.y+target_box.height','target_box.y','target_box.y+target_box.height/2','target_box.y+target_box.height','target_box.y+target_box.height/2','target_box.y+target_box.height/2'];var box={x:0,y:0};box.x=eval(sx[si]+' + '+tx[ti])+offset.x;box.y=eval(sy[si]+' + '+ty[ti])+offset.y;utility.dom.setBorderBox(source,box);if(biv){utility.dom.bringIntoView(source);}
return true;};utility.dom.put=function(el,left,top){el.style.left=left+'px';el.style.top=top+'px';}
utility.dom.resize=function(el,width,height){el.style.width=width+'px';el.style.height=height+'px';}
utility.dom.focusElem=function(elem){var d;d=this.getElem(elem);if(!d)return;if(d.focus)d.focus();}
utility.dom.hideElem=function(elem){this.setCssProperty(elem,"display","none");}
utility.dom.showElem=function(elem,force){var tag_display={table:'table',tr:'table-row',td:'table-cell'}
elem=utility.dom.getElem(elem);var tn=elem.tagName.toLowerCase();var t;if(!force){if(typeof tag_display[tn]!='undefined'){t=tag_display[tn];}else{t="block";}}else{t='force';}
try{this.setCssProperty(elem,"display",t);}catch(e){this.setCssProperty(elem,"display","block");}}
utility.dom.toggleElem=function(elem,force){elem=utility.dom.getElem(elem);try{if(!elem.style.display||elem.style.display=='none'){utility.dom.showElem(elem,force);}else{utility.dom.hideElem(elem);}}catch(e){}}
utility.dom.selectOption=function(sel,val){var i;if(!sel)return;for(i=0;i<sel.options.length;i++){sel.options[i].removeAttribute('selected');}
for(i=0;i<sel.options.length;i++){if(sel.options[i].value==val){sel.options[i].setAttribute('selected','selected');sel.options[i].selected=true;return;}else{sel.options[i].removeAttribute('selected');}}}
utility.dom.getSelected=function(sel){return sel.options[sel.selectedIndex].value;}
utility.dom.getPositionRelativeTo00=function(x,y,w,h){var bw,bh,sw,sh,d;if(is.mozilla){bw=document.width;bh=document.height;sw=window.pageXOffset;sh=window.pageYOffset;}else{var strictm=document.compatMode=="CSS1Compat";d=strictm?document.documentElement:document.body;bw=d.offsetWidth-20;bh=d.offsetHeight;sw=d.scrollLeft;sh=d.scrollTop;}
if(x+w>bw+sw){x=bw+sw-w;}
if(y+h>bh+sh){y=bh+sh-h;}
if(x<0)x=0;if(y<0)y=0;return{x:x,y:y};}
utility.dom.setCssProperty=function(elem,name,value){var d;if(!elem||!name||!value)return;d=this.getElem(elem);if(!d)return;d.style[name]=value;}
utility.dom.getElem=function(elem){var d;if(typeof(elem)=="string"){d=document.getElementById(elem);}else{d=elem;}
return d;}
utility.dom.getClassNames=function(o){o=utility.dom.getElem(o);if(!o)return false;var className=typeof(o.className)=='undefined'?'':o.className;var cn=String_trim(String_normalize_space(className));if(cn==''){return[];}
return cn.split(" ");}
utility.dom.classNameAdd=function(obj,toadd){var cls=utility.dom.getClassNames(obj);if(typeof toadd=='string'){toadd=toadd.split(',');}
Array_each(toadd,function(item,i){if(Array_indexOf(cls,item)==-1){Array_push(cls,item);}});cls=String_trim(cls.join(' '));var className=typeof(obj.className)=='undefined'?'':obj.className;if(String_trim(className)!=cls){obj.className=cls;}}
utility.dom.classNameRemove=function(obj,toremove){var cls=utility.dom.getClassNames(obj);var result=[];if(typeof toremove=='string'){toremove=toremove.split(',');}
Array_each(cls,function(item,i){if(Array_indexOf(toremove,item)==-1){Array_push(result,item);}});cls=String_trim(result.join(' '));var className=typeof(obj.className)=='undefined'?'':obj.className;if(String_trim(className)!=cls){obj.className=cls;}}
utility.dom.insertAfter=function(newElement,targetElement){var sibling=targetElement.nextSibling
var parent=targetElement.parentNode;if(sibling==null){var toret=parent.appendChild(newElement);}else{var toret=parent.insertBefore(newElement,sibling);}
return toret;}
utility.dom.getPreviousSiblingByTagName=function(t,siblingName,allowSameTag){if((t.nodeName.toLowerCase()==siblingName.toLowerCase())&&!allowSameTag){return t;}
while(t.previousSibling&&t.previousSibling.nodeName.toLowerCase()!=siblingName.toLowerCase()){t=t.previousSibling;}
if(t.previousSibling&&t.previousSibling.nodeName.toLowerCase()==siblingName.toLowerCase()){return t.previousSibling;}else{return null;}}
utility.dom.getNextSiblingByTagName=function(t,siblingName,allowSameTag){if((t.nodeName.toLowerCase()==siblingName.toLowerCase())&&!allowSameTag){return t;}
while(t.nextSibling&&t.nextSibling.nodeName.toLowerCase()!=siblingName.toLowerCase()){t=t.nextSibling;}
if(t.nextSibling&&t.nextSibling.nodeName.toLowerCase()==siblingName.toLowerCase()){return t.nextSibling;}else{return null;}}
utility.dom.getParentByTagName=function(t,parentName){if(t.nodeName.toLowerCase()==parentName.toLowerCase()){return t;}
while(t.parentNode&&t.parentNode.nodeName.toLowerCase()!=parentName.toLowerCase()&&t.parentNode.nodeName!='BODY'){t=t.parentNode;}
if(t.parentNode&&t.parentNode.nodeName.toLowerCase()==parentName.toLowerCase()){return t.parentNode;}else{return null;}}
utility.dom.getElementsByTagName=function(o,sTagName){var el;if(typeof o=='undefined'){o=document;}else{o=utility.dom.getElem(o);}
if(sTagName=='*'||typeof sTagName=='undefined'){el=utility.dom.getAllChildren(o);}else{el=o.getElementsByTagName(sTagName.toLowerCase());}
return el;}
utility.dom.getElementsByClassName=function(o,sClassName,sTagName){var elements=[];Array_each(utility.dom.getElementsByTagName(o,sTagName),function(elem,i){if(Array_indexOf(utility.dom.getClassNames(elem),sClassName)!=-1){Array_push(elements,elem);}});return elements;}
utility.dom.getElementById=function(o,sId,sTagName){var elements=[];Array_each(utility.dom.getElementsByTagName(o,sTagName),function(elem,i){if(typeof elem.id!="undefined"&&elem.id!=null&&elem.id.toString()==sId){Array_push(elements,elem);}});return elements;}
utility.dom.getElementsByProps=function(start,props_hash){var unfiltered,toret=[];if(typeof(start)=='undefined'){start=document;}else{start=utility.dom.getElem(o);}
if(o.all){unfiltered=o.all;}else{unfiltered=o.getElementsByTagName('*');}
Array_each(unfiltered,function(item){var cond=true;for(i in props_hash){try{var value=item[i];}catch(e){value=null;}
cond=cond&&(value==props_hash[i]);}
if(cond){Array_push(toret,item);}});return toret;}
utility.dom.getChildrenByTagName=function(elem,tag){var result=[];var x;if(typeof(tag)=='undefined')tag='*';tag=tag.toLowerCase();if(!elem.childNodes)return result;for(var i=0;i<elem.childNodes.length;i++){x=elem.childNodes[i];try{if((typeof(x)!='undefined'&&typeof(x.tagName)!='undefined'&&x.tagName.toLowerCase()==tag)||tag=='*'){Array_push(result,x);}}catch(e){}}
return result;}
utility.dom.getChildrenByClassName=function(elem,sClassName,sTagName){var result=[];result=Array_each(utility.dom.getChildrenByTagName(sTagName),function(elem,i){if(Array_indexOf(utility.dom.getClassNames(item),sClassName)!=-1){Array_push(result,elem);}});}
utility.dom.getAllChildren=function(e){return e.all?e.all:e.getElementsByTagName('*');}
utility.dom.getElementsBySelector=function(selector,startfrom){if(typeof startfrom=='undefined'){startfrom=document;}
if(!document.getElementsByTagName){return[];}
var tokens=selector.split(' ');var currentContext=new Array(startfrom);for(var i=0;i<tokens.length;i++){token=tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');if(token.indexOf('#')>-1){var bits=token.split('#');var tagName=bits[0];var id=bits[1];var element=document.getElementById(id);if(element&&tagName&&element.nodeName.toLowerCase()!=tagName){return[];}
currentContext=new Array(element);continue;}
if(token.indexOf('.')>-1){var bits=token.split('.');var tagName=bits[0];var className=bits[1];if(!tagName){tagName='*';}
var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements;if(tagName=='*'){elements=utility.dom.getAllChildren(currentContext[h]);}else{elements=currentContext[h].getElementsByTagName(tagName);}
for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}
currentContext=new Array;var currentContextIndex=0;for(var k=0;k<found.length;k++){var cclassName=typeof(found[k].className)=='undefined'?'':found[k].className;if(cclassName&&cclassName.match(new RegExp('\\b'+className+'\\b'))){currentContext[currentContextIndex++]=found[k];}}
continue;}
if(token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)){var tagName=RegExp.$1;var attrName=RegExp.$2;var attrOperator=RegExp.$3;var attrValue=RegExp.$4;if(!tagName){tagName='*';}
var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements;if(tagName=='*'){elements=utility.dom.getAllChildren(currentContext[h]);}else{elements=currentContext[h].getElementsByTagName(tagName);}
for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}
currentContext=new Array;var currentContextIndex=0;var checkFunction;switch(attrOperator){case'=':checkFunction=function(e){try{return(e.getAttribute(attrName).toString()==attrValue);}catch(ex){}};break;case'~':checkFunction=function(e){try{return(e.getAttribute(attrName).toString().match(new RegExp(attrValue)));}catch(ex){return false;}};break;case'|':checkFunction=function(e){return(e.getAttribute(attrName).toString().match(new RegExp('^'+attrValue+'-?')));};break;case'^':checkFunction=function(e){return(e.getAttribute(attrName).toString().indexOf(attrValue)==0);};break;case'$':checkFunction=function(e){return(e.getAttribute(attrName).toString().lastIndexOf(attrValue)==e.getAttribute(attrName).length-attrValue.length);};break;case'*':checkFunction=function(e){return(e.getAttribute(attrName).toString().indexOf(attrValue)>-1);};break;default:checkFunction=function(e){return e.getAttribute(attrName);};}
currentContext=new Array;var currentContextIndex=0;for(var k=0;k<found.length;k++){if(checkFunction(found[k])){currentContext[currentContextIndex++]=found[k];}}
continue;}
tagName=token;var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){if(currentContext[h]!=null){var elements=currentContext[h].getElementsByTagName(tagName);for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}}
currentContext=found;}
return currentContext;}
utility.dom.createForm=function(options,inputs,doc){if(typeof options=='undefined')options={};if(typeof inputs=='undefined')inputs=[];if(typeof doc=='undefined')doc=document;var default_options={name:'',id:'',action:'',method:'POST',target:''}
options=Object_weave_safe(options,default_options);var frm=utility.dom.createElement("FORM",{name:options.name,id:options.id,action:options.action,method:options.method,style:"display: none"});Array_each(inputs,function(input,i){frm.appendChild(utility.dom.createElement('INPUT',{'type':'hidden','id':input[0],'name':input[0],'value':input[1]}));});frm=doc.body.appendChild(frm);frm.target=options.target;return frm;}
utility.dom.createIframe=function(options,doc){if(typeof options=='undefined')options={};if(typeof doc=='undefined')doc=document;var default_options={name:'',id:'',src:options.src}
options=Object_weave_safe(options,default_options);if(is.mozilla){var ifr=utility.dom.createElement('iframe',{'id':options.id,'name':options.name,'style':'display: none;'});ifr.src=options.src;ifr=doc.body.appendChild(ifr);ifr.name=options.name;ifr.id=options.id;}else if(is.ie){var str='<iframe name="'+options.name+'" src="'+options.src+'" id="'+options.id+'" style="display: none;"></iframe>';var dv=doc.createElement('div');doc.body.appendChild(dv);dv.innerHTML=str;}
var ifr=doc.getElementById(options.id);return ifr;}
utility.dom.addIframeLoad=function(ifr,functor){if(is.mozilla){ifr.onload=function(){functor();}}else{ifr.onreadystatechange=function(){if(ifr.readyState=='complete'){functor();}}}}
utility.dom.removeIframeLoad=function(ifr){if(is.ie){ifr.onreadystatechange=function(){};}
if(is.mozilla){ifr.onload=function(){};}}
utility.dom.buildUrl=function(){}
utility.dom.stripAttributes=function(el,additional_arr){var cearElementProps=['onload','data','onmouseover','onmouseout','onmousedown','onmouseup','ondblclick','onclick','onselectstart','oncontextmenu','onkeydown','onkeypress','onkeyup','onblur','onfocus','onbeforedeactivate','onchange'];if(typeof el=='undefined'||el==null){return true;}
for(var c=cearElementProps.length;c--;){el[cearElementProps[c]]=null;}
if(typeof additional_arr!='undefined'){for(var c=additional_arr.length;c--;){el[additional_arr[c]]=null;}}}
utility.dom.attachEvent2=function(where,type,what,when){utility.dom.attachEvent_base(where,type,what,when,1);}
utility.dom.attachEvent=function(where,type,what,when){utility.dom.attachEvent_base(where,type,what,when,0);}
utility.dom.attachEvent_base=function(where,type,what,when,add_first){if(typeof(when)=='undefined')when=1;var doNotAdd=type.match(/unload$/i);var real_type=type.match(/^on/)?type:'on'+type;var logical_type=type.replace(/^on/,'');if(typeof where.__eventHandlers=='undefined'){where.__eventHandlers={};}
var place=null;if(typeof where.__eventHandlers[logical_type]=='undefined'){where.__eventHandlers[logical_type]=[];place=where.__eventHandlers[logical_type];var raiseEvent=function(e){if(!e&&window.event){e=window.event;}
for(var i=0;i<where.__eventHandlers[logical_type].length;i++){var f=where.__eventHandlers[logical_type][i];if(typeof f=='function'){f.apply(where,[e]);f=null;}}}
if(where.addEventListener){where.addEventListener(logical_type,raiseEvent,false);}
else if(where.attachEvent){where.attachEvent("on"+logical_type,raiseEvent);}
else{where["on"+logical_type]=raiseEvent;}
if((!(is.ie&&is.mac))&&!doNotAdd){EventCache.add(where,logical_type,raiseEvent,1);}}else{place=where.__eventHandlers[logical_type];}
for(var i=0;i<place.length;i++){if(place[i]==what){return;}
try{if(place[i]&&what&&place[i].toString()==what.toString()){return;}}catch(err){}}
place[place.length]=what;}
var EventCache=function(){var listEvents=[];return{listEvents:listEvents,add:function(node,sEventName,fHandler,bCapture){Array_push(listEvents,arguments);},flush:function(){var i,item;for(i=listEvents.length-1;i>=0;i=i-1){item=listEvents[i];if(!item){continue;}
if(item[0].removeEventListener){item[0].removeEventListener(item[1],item[2],item[3]);};var logical_type='';if(item[1].substring(0,2)!="on"){logical_type=item[1];item[1]="on"+item[1];}else{logical_type=item[1].substring(2,event_name_without_on.length);};if(typeof item[0].__eventHandlers!='undefined'&&typeof item[0].__eventHandlers[logical_type]!='undefined'){item[0].__eventHandlers[logical_type]=null;}
if(item[0].detachEvent){item[0].detachEvent(item[1],item[2]);};item[0][item[1]]=null;};listEvents=null;}};}();utility.dom.getStyleProperty=function(el,property){try{var value=el.style[property];}catch(e){return"";}
if(!value){if(el.ownerDocument.defaultView&&typeof(el.ownerDocument.defaultView.getComputedStyle)=="function"){value=el.ownerDocument.defaultView.getComputedStyle(el,"").getPropertyValue(property);}else if(el.currentStyle){var m=property.split(/-/);if(m.length>0){property=m[0];for(var i=1;i<m.length;i++){property+=m[i].charAt(0).toUpperCase()+m[i].substring(1);}}
value=el.currentStyle[property];}else if(el.style){value=el.style[property];}}
return value;}
utility.dom.getLink=function(link){if(!is.ie){href=link.getAttribute('href');}else{if(!is.mac){href=link.outerHTML.toString().replace(/.*href="([^"]*)".*/,"$1");}else{href=link.getAttribute('href');}}
return href;}
utility.dom.getDisplay=function(el){return utility.dom.getStyleProperty(el,'display');}
utility.dom.getVisibility=function(el){return utility.dom.getStyleProperty(el,'visibility');}
var first_getAbsolutePos_caller_element=null;utility.dom.getAbsolutePos=function(el){var scrollleft=0,scrolltop=0,tn=el.tagName.toUpperCase();if(utility.dom.getAbsolutePos.caller!=utility.dom.getAbsolutePos){first_getAbsolutePos_caller_element=el;}
if(Array_indexOf(['BODY','HTML'],tn)==-1&&first_getAbsolutePos_caller_element!=el){if(el.scrollLeft){scrollleft=el.scrollLeft;}
if(el.scrollTop){scrolltop=el.scrollTop;}}
var r={x:el.offsetLeft-scrollleft,y:el.offsetTop-scrolltop};if(el.offsetParent&&tn!='BODY'){var tmp=utility.dom.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}
return r;}
utility.dom.setEventVars=function(e){var targ;var relTarg;var posx=0;var posy=0;if(!e){e=window.event;}
if(!e){return{'e':null,'relTarg':null,'targ':null,'posx':0,'posy':0,'leftclick':false,'middleclick':false,'rightclick':false,'type':''};}
if(e.relatedTarget){relTarg=e.relatedTarget;}else if(e.fromElement){relTarg=e.fromElement;}
if(e.target){targ=e.target;}else if(e.srcElement){targ=e.srcElement;}
var st=utility.dom.getPageScroll();if(e.pageX||e.pageY){posx=e.pageX;posy=e.pageY;}else if(e.clientX||e.clientY){posx=e.clientX+st.x;posy=e.clientY+st.y;}
if(window.event){var leftclick=(e.button==1);var middleclick=(e.button==4);var rightclick=(e.button==2);}else{var leftclick=(e.button==0);var middleclick=(e.button==1);var rightclick=(e.button==2||e.button==0&&is.mac&&e.ctrlKey);}
var o={'e':e,'relTarg':relTarg,'targ':targ,'posx':posx,'posy':posy,'leftclick':leftclick,'middleclick':middleclick,'rightclick':rightclick}
try{o.type=e.type;}catch(err){o.type='';}
return o;}
utility.dom.stopEvent=function(e){if(typeof is=='undefined'){is=new BrowserCheck();}
if(typeof e!="undefined"&&e!=null){if(is.ie){e.cancelBubble=true;}
if(e.stopPropagation){e.stopPropagation();}
if(is.ie){e.returnValue=false;}
if(e.preventDefault){e.preventDefault();}}
return false;}
utility.dom.toggleSpecialTags=function(el,exclude,mode,documentObject,boxRecipient){var hide_tags=['select'];if(mode==1){var boxObject=utility.dom.getBox(el);}
for(var i=0;i<hide_tags.length;i++){var _document=null;if(documentObject&&documentObject.nodeType&&(documentObject.nodeType==9)){_document=documentObject;utility.dom.toggleSpecialTags._saved_DOC=documentObject;}else if(documentObject&&utility.dom.toggleSpecialTags._saved_DOC&&utility.dom.toggleSpecialTags._saved_DOC.nodeType&&(utility.dom.toggleSpecialTags._saved_DOC.nodeType==9)){_document=utility.dom.toggleSpecialTags._saved_DOC;}else{_document=document;};var arr=_document.getElementsByTagName(hide_tags[i]);for(var j=0;j<arr.length;j++){if(exclude==arr[j]){continue;}
if(mode==1){var cVisibility=utility.dom.getVisibility(arr[j]);var cDisplay=utility.dom.getDisplay(arr[j]);if(cDisplay=="none"||cVisibility=="hidden"){continue;}
var boxSelect=utility.dom.getBox(arr[j]);if(boxRecipient){var parentBox=utility.dom.getBox(boxRecipient);boxSelect.x+=parentBox.x;boxSelect.y+=parentBox.y;}
var overlap=utility.dom.boxOverlap(boxObject,boxSelect);if(overlap){if(documentObject&&boxRecipient){if(!arr[j].oldPosition){var cPosition=utility.dom.getStyleProperty(arr[j],"position");arr[j].oldPosition=cPosition;}
if(!arr[j].oldLeft){var cLeft=utility.dom.getStyleProperty(arr[j],"left");arr[j].oldLeft=cLeft;}
arr[j].style.position="relative";arr[j].style.left="-1000px";}
else{if(!arr[j].oldvisibility){arr[j].oldvisibility=cVisibility;}
arr[j].style.visibility='hidden';}}}else{if(documentObject&&boxRecipient){if(arr[j].oldPosition){arr[j].style.position=arr[j].oldPosition;arr[j].removeAttribute("oldPosition");}
if(arr[j].oldLeft){arr[j].style.left=arr[j].oldLeft;arr[j].removeAttribute("oldLeft");}}
else{if(arr[j].oldvisibility){arr[j].style.visibility=arr[j].oldvisibility;}}}}}}
utility.dom.boxOverlap=function(b1,b2){if((b1.x+b1.width)<b2.x||b1.x>(b2.x+b2.width)||(b1.y+b1.height)<b2.y||b1.y>(b2.y+b2.height)||false){return false;}
return true;}
utility.dom.getBox=function(el){var box={"x":0,"y":0,"width":0,"height":0,"scrollTop":0,"scrollLeft":0};var strictm=el.ownerDocument.compatMode=="CSS1Compat";if(el.ownerDocument.getBoxObjectFor){var rect=el.ownerDocument.getBoxObjectFor(el);box.x=rect.x-el.parentNode.scrollLeft;box.y=rect.y-el.parentNode.scrollTop;box.width=rect.width;box.height=rect.height;box.scrollLeft=(strictm?el.ownerDocument.documentElement:el.ownerDocument.body).scrollLeft;box.scrollTop=(strictm?el.ownerDocument.documentElement:el.ownerDocument.body).scrollTop;}else if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();box.x=rect.left;box.y=rect.top;box.width=rect.right-rect.left;box.height=rect.bottom-rect.top;box.scrollLeft=0;box.scrollTop=0;}else{var tmp=utility.dom.getAbsolutePos(el);box.x=tmp.x-el.parentNode.scrollLeft;box.y=tmp.y-el.parentNode.scrollTop;box.width=utility.dom.getStyleProperty(el,'width');box.height=utility.dom.getStyleProperty(el,'height');box.scrollLeft=el.ownerDocument.body.scrollLeft;box.scrollTop=el.ownerDocument.body.scrollTop;}
return box;}
utility.dom.getBBox=function(el){var box={"x":0,"y":0,"width":0,"height":0,"scrollTop":0,"scrollLeft":0};var strictm=el.ownerDocument.compatMode=="CSS1Compat";if(el.ownerDocument.getBoxObjectFor){var doc=strictm?el.ownerDocument.documentElement:document;var bt=parseInt(utility.dom.getStyleProperty(el,"border-top-width"));var bl=parseInt(utility.dom.getStyleProperty(el,"border-left-width"));var br=parseInt(utility.dom.getStyleProperty(el,"border-right-width"));var bb=parseInt(utility.dom.getStyleProperty(el,"border-bottom-width"));var rect=el.ownerDocument.getBoxObjectFor(el);var sl=0;var st=0;while(el.parentNode){if(el.scrollTop){st+=el.scrollTop;}
if(el.scrollLeft){sl+=el.scrollLeft;}
el=el.parentNode;}
box.scrollLeft=sl;box.scrollTop=st;box.x=rect.x-bl-sl;box.y=rect.y-bt-st;box.width=rect.width;box.height=rect.height;}else if(el.getBoundingClientRect){var pel=strictm?el.ownerDocument.documentElement:document.body;var bt=parseInt(utility.dom.getStyleProperty(el,"border-top-width"))||0;var bl=parseInt(utility.dom.getStyleProperty(el,"border-left-width"))||0;var rect=el.getBoundingClientRect();box.x=rect.left-bl;box.y=rect.top-bt;box.width=rect.right-rect.left;box.height=rect.bottom-rect.top;box.scrollLeft=0;box.scrollTop=0;}else{var pel=el.ownerDocument.documentElement;var mt=parseInt(utility.dom.getStyleProperty(pel,"margin-top"));var ml=parseInt(utility.dom.getStyleProperty(pel,"margin-left"));var bt=parseInt(utility.dom.getStyleProperty(pel,"border-top-width"));var bl=parseInt(utility.dom.getStyleProperty(pel,"border-left-width"));var pt=parseInt(utility.dom.getStyleProperty(pel,"padding-top"));var pl=parseInt(utility.dom.getStyleProperty(pel,"padding-left"));pel=el.offsetParent;var mt2=parseInt(utility.dom.getStyleProperty(pel,"margin-top"));var ml2=parseInt(utility.dom.getStyleProperty(pel,"margin-left"));var bt2=0;var bl2=0;var pt2=0;var pl2=0;var tmp=utility.dom.getAbsolutePos(el);box.x=tmp.x;box.y=tmp.y;box.width=parseInt(utility.dom.getStyleProperty(el,'width'));box.height=parseInt(utility.dom.getStyleProperty(el,'height'));box.scrollLeft=el.ownerDocument.body.scrollLeft;box.scrollTop=el.ownerDocument.body.scrollTop;if(is.opera){box.x-=(ml+bl+pl+ml2);box.y-=mt+bt+pt+mt2;}}
return box;}
utility.dom.getPageInnerSize=function(){var x,y;if(typeof self.innerHeight!="undefined"){x=self.innerWidth;y=self.innerHeight;}else if(typeof document.compatMode!='undefined'&&document.compatMode=='CSS1Compat'){x=document.documentElement.clientWidth;y=document.documentElement.clientHeight;}else if(document.body){x=document.body.clientWidth;y=document.body.clientHeight;}
return{x:x,y:y};}
utility.dom.getPageScroll=function(){var x,y;if(typeof self.pageYOffset!='undefined'){x=self.pageXOffset;y=self.pageYOffset;}else if(typeof document.compatMode!='undefined'&&document.compatMode=='CSS1Compat'){x=document.documentElement.scrollLeft;y=document.documentElement.scrollTop;}
else if(document.body){x=document.body.scrollLeft;y=document.body.scrollTop;}
return{x:x,y:y};}
utility.dom.createElement=function(type,attribs,wnd){if(typeof is=='undefined'){is=new BrowserCheck();}
if(typeof wnd!='undefined'){var elem=wnd.document.createElement(type);}else{var elem=document.createElement(type);}
if(typeof attribs!='undefined'){for(var i in attribs){switch(true){case(i=='text'):elem.appendChild(document.createTextNode(attribs[i]));break;case(i=='class'):elem.className=attribs[i];break;case(i=='id'):elem.id=attribs[i];break;case(i=='type'):if(type.toLowerCase()=="input"&&is.ie&&is.mac){var tspn=document.createElement("SPAN");document.body.appendChild(tspn);tspn.style.display="none";tspn.innerHTML=elem.outerHTML.replace(/<input/i,"<input type=\""+attribs[i]+"\"");elem=tspn.firstChild;document.body.removeChild(tspn);}else if(type.toLowerCase()=="input"&&is.mac&&is.safari){elem.setAttribute('type',attribs[i]);}else{elem.type=attribs[i];}
break;case(i=='style'):elem.style.cssText=attribs[i];break;default:try{elem.setAttribute(i,attribs[i]);elem[i]=attribs[i];}catch(e){}}}}
if(attribs['value']){elem.value=attribs['value'];}
return elem;};utility.dom.getImports=function(s){try{if(is.ie){return s.imports;}else{var toret=[];for(var i=0;i<s.cssRules.length;i++){if(is.safari){if(typeof s.cssRules[i].href!='undefined'){Array_push(toret,s.cssRules[i].styleSheet);}}else{if(s.cssRules[i].toString().match('CSSImportRule')){Array_push(toret,s.cssRules[i].styleSheet);}}}
return toret;}}catch(e){return[];}}
utility.dom.getRuleBySelector=function(s,rx){try{var koll=[];if(is.ie){koll=s.rules;}else{koll=s.cssRules;}
var toret=[];for(var i=0;i<koll.length;i++){var rule=koll[i];if(rule.selectorText.toString().match(rx)){Array_push(toret,rule);}}
return toret;}catch(e){return[];}}
utility.dom.createStyleSheet=function(doc,path){if(is.ie){return doc.createStyleSheet(path);}else if(is.mozilla){var theHeadNode=doc.getElementsByTagName("head")[0];var theStyleNode=doc.createElement('style');theStyleNode.type="text/css"
theStyleNode.rules=new Array();theHeadNode.appendChild(theStyleNode);if(path!=""){var xmlHttp=new XMLHttpRequest();try{xmlHttp.open("GET",path,false);xmlHttp.send(null);}
catch(e){alert('Cannot load a stylesheet from a server other than the current server.\r\nThe current server is "'+doc.location.hostname+'".\r\nThe requested stylesheet URL is "'+path+'".');return null;}
if(xmlHttp.status==404){prompt('Stylesheet was not found:',path);return null;}
var theTextNode=doc.createTextNode(xmlHttp.responseText);theStyleNode.appendChild(theTextNode);var re=/\s*\{([^\}]*)\}\s*/;nameList=xmlHttp.responseText.split(re);for(var i=0;i<nameList.length;i=i+2){var rul=new Object();rul.selectorText=nameList[i];rul.cssText=nameList[i+1]
theStyleNode.rules.push(rul);}}else{var theTextNode=doc.createTextNode('u');theStyleNode.appendChild(theTextNode);}
return theStyleNode;}}
Object_weave_safe(utility,{date:{}});$UNI_DATETIME_MASK_SEPARATORS=['-','/','[',']','(',')','*','+','.','\s',':'];$UNI_DATETIME_MASK_REGEXP='[';for(var zi=0;zi<$UNI_DATETIME_MASK_SEPARATORS.length;zi++){$UNI_DATETIME_MASK_REGEXP+="\\"+$UNI_DATETIME_MASK_SEPARATORS[zi]+'|';}
$UNI_DATETIME_MASK_REGEXP+=']';$UNI_DATETIME_MASK_REGEXP=new RegExp($UNI_DATETIME_MASK_REGEXP,"g");utility.date.date2regexp=function(txt){txt=txt.replace(/[\/\-\.]/g,'DATESEPARATOR');txt=txt.replace(/([-\/\[\]\(\)\*\+\.\:])/g,'\\$1');txt=txt.replace(/DATESEPARATOR/g,'[\\/\\-\\.]');txt=txt.replace(/(\\s)/g,'\s');txt=txt.replace(/yyyy/gi,'([0-9]{1,4})');txt=txt.replace(/yy/gi,'([0-9]{1,4})');txt=txt.replace(/y/gi,'([0-9]{1,4})');txt=txt.replace(/mm/g,'([0-9]{1,2})');txt=txt.replace(/m/g,'([0-9]{1,2})');txt=txt.replace(/dd/g,'([0-9]{1,2})');txt=txt.replace(/d/g,'([0-9]{1,2})');txt=txt.replace(/HH/g,'([0-9]{1,2})*');txt=txt.replace(/H/g,'([0-9]{1,2})*');txt=txt.replace(/hh/g,'([0-9]{1,2})*');txt=txt.replace(/h/g,'([0-9]{1,2})*');txt=txt.replace(/ii/g,'([0-9]{1,2})*');txt=txt.replace(/i/g,'([0-9]{1,2})*');txt=txt.replace(/ss/g,'([0-9]{1,2})*');txt=txt.replace(/s/g,'([0-9]{1,2})*');txt=txt.replace(/tt/g,'(AM|PM|am|pm|A|P|a|p)*');txt=txt.replace(/t/g,'(AM|PM|am|pm|A|P|a|p)*');txt=txt.replace(/ /g,' *');txt=txt.replace(/:/g,':*');var re=new RegExp('^'+txt+'$');return re;}
utility.date.parse_date=function(arr,dateMask){var vYear=vMonth=vDay=null;var vHour=vHour12h=vHour24H=vMinutes=vSeconds=vTimeMarker1C=vTimeMarker2C=null;var groups=dateMask.split($UNI_DATETIME_MASK_REGEXP);var groupIdx=0;var vTimeMarkerUpdate=0;for(var i=0;i<groups.length;i++){var currentGroupMask=groups[i];groupIdx++;var groupValue=arr[groupIdx];if(Array_indexOf('HH,H,ii,i,ss,s'.split(','),currentGroupMask)>=0){if(groupValue==''||typeof groupValue=='undefined'){groupValue='0';}}
if(Array_indexOf('hh,h'.split(','),currentGroupMask)>=0){var tmpValue=parseInt(groupValue,10);if(groupValue==''||typeof groupValue=='undefined'){groupValue='12';}else if(tmpValue>12&&tmpValue<24){var index=(Array_indexOf(groups,'t')>=0?Array_indexOf(groups,'t')+1:Array_indexOf(groups,'tt')+1);if(arr[index]==''){groupValue=tmpValue-12;vTimeMarkerUpdate=1;}}}
if(Array_indexOf('tt,t'.split(','),currentGroupMask)>=0){if(groupValue==''){groupValue=[['A','AM'],['P','PM']][vTimeMarkerUpdate][currentGroupMask.length-1];}}
switch(currentGroupMask){case'yyyy':case'YYYY':vYear=parseInt(groupValue,10);break;case'yy':case'YY':case'y':vYear=parseInt(groupValue,10);if(vYear<1000){if(vYear<10){vYear=2000+vYear;}else{if(vYear<70){vYear=2000+vYear;}else{vYear=1900+vYear;}}}
break;case'mm':case'm':vMonth=parseInt(groupValue,10);break;case'dd':case'd':vDay=parseInt(groupValue,10);break;case'HH':case'H':vHour24H=parseInt(groupValue,10);break;case'hh':case'h':vHour12h=parseInt(groupValue,10);break;case'ii':case'i':vMinutes=parseInt(groupValue,10);break;case'ss':case's':vSeconds=parseInt(groupValue,10);break;case't':vTimeMarker1C=groupValue;break;case'tt':vTimeMarker2C=groupValue;break;}}
vYear=vYear==null?1900:vYear;vMonth=vMonth==null?0:vMonth;vDay=vDay==null?1:vDay;vMinutes=vMinutes==null?0:vMinutes;vSeconds=vSeconds==null?0:vSeconds;var vHourOffset=0;if(vHour12h!=null){if(vHour12h>=1&&vHour12h<=12){vHour=vHour12h;if((vTimeMarker1C||vTimeMarker2C||"").charAt(0)=="P"){if(vHour12h<12){vHour=vHour12h+12;}}else{if(vHour12h==12){vHour=0;}}}else{vHour=-1000;}}else if(vHour24H!=null){vHour=vHour24H;}else{vHour=0;}
var o={'year':vYear,'month':vMonth,'day':vDay,'hour':vHour,'minutes':vMinutes,'seconds':vSeconds};if(dateMask.indexOf('y')<0&&dateMask.indexOf('m')<0&&dateMask.indexOf('d')<0){o['year']='1900';o['month']='1';o['day']=1;}
return o;}
Object_weave_safe(utility,{window:{}});utility.window.openWindow=function(target,url,width,height){var wndHandler;var left=(screen.width-width)/2;var top=(screen.height-height)/2;var winargs="width="+width+",height="+height+",resizable=No,scrollbars=No,status=Yes,modal=yes,dependent=yes,dialog=yes,left="+left+",top="+top;wndHandler=window.open(url,target,winargs);if(wndHandler){utility.window.reference=wndHandler;var ctrlModalBlocker=document.getElementById('modalBlocker');if(!ctrlModalBlocker){var ctrlModalBlocker=utility.dom.createElement("DIV",{'id':'modalBlocker','style':'display: block'});var pos=utility.dom.getPageInnerSize();ctrlModalBlocker.style.zIndex=999;ctrlModalBlocker.style.width=(pos.x)+'px';ctrlModalBlocker.style.height=(pos.y)+'px';prepfixieinsertnodescrollup();ctrlModalBlocker=document.body.insertBefore(ctrlModalBlocker,document.body.firstChild);utility.dom.attachEvent(ctrlModalBlocker,'onmousedown',function(){return utility.window.focusmodal();});utility.dom.attachEvent(ctrlModalBlocker,'ondblclick',function(){return utility.window.focusmodal();});utility.dom.attachEvent(ctrlModalBlocker,is.ie?'onbeforeactivate':'onfocus',function(){return utility.window.focusmodal();});utility.dom.attachEvent(is.mozilla?window.document.body:window,is.ie?'onbeforeactivate':'focus',function(){return utility.window.focusmodal();});fixieinsertnodescrollup();}else{ctrlModalBlocker.style.display='block';}
wndHandler.focus();}
if(!wndHandler){alert(translate('Cannot open dialog. Please allow site popups.'));}
return wndHandler;};function prepfixieinsertnodescrollup(){if(is.ie&&typeof(ktmls)!="undefined"){prepfixieinsertnodescrollup.scrolls=[];for(var i=0;i<ktmls.length;i++){if(ktmls[i].destroyed){continue;}
prepfixieinsertnodescrollup.scrolls[i]=ktmls[i].edit.body.scrollTop;}}}
function fixieinsertnodescrollup(){window.setTimeout("fixieinsertnodescrollup_late()",1);};function fixieinsertnodescrollup_late(){if(is.ie&&typeof(ktmls)!="undefined"){for(var i=ktmls.length-1;i>=0;i--){if(ktmls[i].destroyed){continue;}
ktmls[i].edit.body.scrollTop=prepfixieinsertnodescrollup.scrolls[i];}}};utility.window.focusmodal=function(){if(utility.window.reference&&!utility.window.reference.closed){utility.window.reference.focus();return;}
utility.window.hideModalBlocker();};utility.window.hideModalBlocker=function(wnd){if(!wnd){wnd=window;}
utility.window.reference=null;if(wnd.closed){return;}
var ctrlModalBlocker=wnd.document.getElementById('modalBlocker');if(ctrlModalBlocker){ctrlModalBlocker.style.display='none';}};utility.window.close=function(){window.close();};utility.popup={};utility.popup.stiva=[];utility.popup.makeModal=function(clickCallBack,elementOnTop,stopEvents){if(typeof(stopEvents)=="undefined"){stopEvents=true;}
utility.popup.stiva.push({'element':elementOnTop,'callback':clickCallBack,'stopEvents':stopEvents});};utility.popup.removeModal=function(e){if(utility.popup.stiva.length==0){return;}
if(utility.popup.force||e){var tmp=utility.popup.stiva[utility.popup.stiva.length-1];if(e){var o=utility.dom.setEventVars(e);var clickedElement=o.targ;while(clickedElement){if(tmp.element&&clickedElement==tmp.element){break;}
if(clickedElement.mi&&clickedElement.mi['action_event']!='mousedown'){break;}
clickedElement=clickedElement.parentNode;}
if(clickedElement){return;}}
if(tmp.callback){tmp.callback();}
utility.popup.stiva.pop();utility.popup.removeModal(e);}
utility.dom.toggleSpecialTags(null,false,0,true,true);};utility.popup.escapeModal=function(e){if(utility.popup.stiva.length>0){if(!utility.popup.stiva[utility.popup.stiva.length-1].stopEvents){return true;}
var o=utility.dom.setEventVars(e);if(e.keyCode==27){utility.popup.force=true;utility.popup.removeModal(o.e);utility.popup.force=false;}
if(is.ie&&!o.e.ctrlKey){try{o.e.keyCode=90909090;}catch(e){};}
utility.dom.stopEvent(o.e);return false;}
return true;}
utility.window.blockInterface=function(cursor,el,customId){if(typeof(cursor)=="undefined"){cursor="wait";}
var ctrlInterfaceBlocker=utility.dom.createElement('div',{});ctrlInterfaceBlocker.className='interfaceBlocker';ctrlInterfaceBlocker.id=customId||'interfaceBlocker';prepfixieinsertnodescrollup();ctrlInterfaceBlocker=document.body.appendChild(ctrlInterfaceBlocker);fixieinsertnodescrollup();ctrlInterfaceBlocker.style.cursor=cursor;var pos;if(!el){pos=utility.dom.getPageInnerSize();ctrlInterfaceBlocker.style.width=pos.x+'px';ctrlInterfaceBlocker.style.height=pos.y+'px';}
else{pos=utility.dom.getBox(el);ctrlInterfaceBlocker.style.top=pos.y+'px';ctrlInterfaceBlocker.style.left=pos.x+'px';ctrlInterfaceBlocker.style.width=pos.width+'px';ctrlInterfaceBlocker.style.height=pos.height+'px';}};utility.window.unblockInterface=function(){var ctrlInterfaceBlocker=document.getElementById('interfaceBlocker');if(ctrlInterfaceBlocker){document.body.removeChild(ctrlInterfaceBlocker);}};utility.window.setModal=function(set_unselectable){if(typeof set_unselectable=="undefined"){set_unselectable=true;}
window.isloading=false;window.focus();if(!window.dialogArguments){window.onbeforeunload=function(){if(!window.opener.closed){utility.window.hideModalBlocker(window.opener);}}
if(set_unselectable){utility.dom.setUnselectable(window.document.body);}}else{window.opener=dialogArguments;}
if(!window.opener){document.body.innerHTML="<center>Invalid context! No opener.</center>"+'<div style="display:none !important">'+document.body.innerHTML+'</div>';return;}
if(window.opener.topOpener){window.topOpener=window.opener.topOpener;}else{window.topOpener=window.opener;}
utility.dom.attachEvent(is.ie?window.document.body:window,'keydown',function(e){var ret=utility.popup.escapeModal(e);if(ret&&e.keyCode==27){utility.window.close();}});utility.dom.attachEvent2(window.document.body,'mousedown',utility.popup.removeModal);};Object_weave_safe(utility,{cookie:{}});utility.cookie.set=function(name,value,lifespan,access_path){var cookietext=name+"="+escape(value);if(lifespan!=null){var date=new Date();date.setTime(date.getTime()+(1000*60*60*24*lifespan));cookietext+="; expires="+date.toGMTString();}
if(access_path!=null){cookietext+="; path="+access_path;}
document.cookie=cookietext;return null;}
utility.cookie.get=function(name){var nameeq=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1,c.length);}
if(c.indexOf(nameeq)==0){return unescape(c.substring(nameeq.length,c.length));}}
return null;}
utility.cookie.del=function(name,path){utility.cookie.set(name,"",-1,path);}
UIDGenerator=function(name){if(typeof(name)=='undefined'){name='iaktuid_'+Math.random().toString().substring(2,6)+'_';}
this.name=name;this.counter=1;}
UIDGenerator.prototype.generate=function(detail){if(typeof(detail)=='undefined'){detail='';}
return(this.name+detail+this.counter+++'_');}
ObjectStorage=function(name){this.storage={};this.gen=new UIDGenerator(name+"_reference_by_id_");}
ObjectStorage.prototype.add=ObjectStorage.prototype.storeObject=function(obj){var type=obj.constructor.toString().match(/^\s*function\s*([^\s\(]*)\s*\(/i);if(!type){type="unknown_contructor";}else{type=type[1];}
var newId=this.gen.generate(type);obj.id=newId;this.storage[newId]=obj;}
ObjectStorage.prototype.get=ObjectStorage.prototype.getObject=function(id){return this.storage[id];}
ObjectStorage.prototype.deleteObject=function(id){delete this.storage[id];}
ObjectStorage.prototype.dispose=function(){this.storage=null;}
QueryString=function(str){if(typeof str=='undefined'){var str=window.location.search.toString();}
this.keys=new Array();this.values=new Array();var query=str;if(str.indexOf('?')==0){query=str.substring(1);}
query=query.replace(/&amp;/g,'&');var pairs=query.split("&");for(var i=0;i<pairs.length;i++){var pos=pairs[i].indexOf('=');if(pos>=0){var argname=pairs[i].substring(0,pos);var value=pairs[i].substring(pos+1);this.keys[this.keys.length]=argname;this.values[this.values.length]=value;}}}
QueryString.prototype.find=function(key){var value=null;for(var i=0;i<this.keys.length;i++){if(this.keys[i]==key){value=this.values[i];break;}}
return value;}
KT_Tooltips={cname:'kt_add_tooltips',worked:[],cancel:false,gen:new UIDGenerator(),show:function(id,x,y){var div=document.getElementById(id);if(!div){return;}
div.style.left='-1000px';div.style.top='-1000px';div.style.display='block';var pos=utility.dom.getBBox(div);var pos2=utility.dom.getPositionRelativeTo00(x,y,pos.width+2,pos.height+2);div.style.left=pos2.x+'px';div.style.top=pos2.y+'px';},hide:function(id){var div=document.getElementById(id);if(!div){return;}
div.style.display='none';},clear_timeout:function(id,mode){var to=id+mode+"timeout";if(typeof window[to]!='undefined'){clearTimeout(window[to]);}},clear_showtimeout:function(id){KT_Tooltips.clear_timeout(id,'show');},clear_hidetimeout:function(id){KT_Tooltips.clear_timeout(id,'hide');},set_timeout:function(id,mode,time){var params_str='',params_arr=[];if(arguments.length>3){for(var i=3;i<arguments.length;i++){Array_push(params_arr,arguments[i]);}}
params_str=params_arr.join(', ');if(params_str!=''){params_str=', '+params_str;}
var str="KT_Tooltips."+mode+"('"+id+"'"+params_str+")";var to=id+mode+"timeout";window[to]=setTimeout(str,time);},set_showtimeout:function(id,vars){KT_Tooltips.set_timeout(id,"show",1000,vars.x,vars.y);},set_hidetimeout:function(id){KT_Tooltips.set_timeout(id,"hide",250);},attach_single:function(link){if(is.ie||is.safari){return;}
var title=link.title;var mytip=null;if(link.getAttribute('divid')){mytip=document.getElementById(link.getAttribute('divid'));if(mytip){document.body.removeChild(mytip);}
link.removeAttribute('divid');}
if(/[\r\n]/.test(title)){var divid=KT_Tooltips.gen.generate("tooltip");var div=utility.dom.createElement("div",{'class':'tooltip_div','id':divid});div.innerHTML=link.getAttribute("title").toString().replace(/\r\n/g,"<br />").replace(/[\r|\n]/g,"<br />");link.divid=divid;div=document.body.appendChild(div);link.removeAttribute("title");link.setAttribute("divid",divid);if(!mytip){utility.dom.attachEvent(link,'mouseover',function(e){var id=link.getAttribute("divid");var pos=utility.dom.getBBox(link);var vars=utility.dom.setEventVars(e);KT_Tooltips.clear_hidetimeout(id);var obj={x:pos.x+Math.round(pos.width/2),y:pos.y+Math.round(pos.height/2)+10};KT_Tooltips.set_showtimeout(id,obj);utility.dom.stopEvent(e);});utility.dom.attachEvent(link,'mouseout',function(e){var id=link.getAttribute("divid");KT_Tooltips.clear_showtimeout(id);KT_Tooltips.set_hidetimeout(id);utility.dom.stopEvent(e);});}}},attach:function(){KT_Tooltips.worked=[];if(is.ie||is.safari){return;}
Array_each(utility.dom.getElementsByClassName(document.body,KT_Tooltips.cname),function(el){Array_each(el.getElementsByTagName('a'),KT_Tooltips.attach_single);})}};utility.dom.attachEvent(window,'load',KT_Tooltips.attach);function getDomDocumentPrefix(){if(getDomDocumentPrefix.prefix)return getDomDocumentPrefix.prefix;var prefixes=["MSXML2","Microsoft","MSXML","MSXML3"];var o;for(var i=0;i<prefixes.length;i++){try{o=new ActiveXObject(prefixes[i]+".DomDocument");return getDomDocumentPrefix.prefix=prefixes[i];}catch(ex){}}
throw new Error("Could not find an installed XML parser");}
function getXmlHttpPrefix(){if(getXmlHttpPrefix.prefix)return getXmlHttpPrefix.prefix;var prefixes=["MSXML2","Microsoft","MSXML","MSXML3"];var o;for(var i=0;i<prefixes.length;i++){try{o=new ActiveXObject(prefixes[i]+".XmlHttp");return getXmlHttpPrefix.prefix=prefixes[i];}catch(ex){}}
throw new Error("Could not find an installed XML parser");}
function XmlHttp(){}
XmlHttp.create=function(){try{if(window.XMLHttpRequest){var req=new XMLHttpRequest();if(req.readyState==null){req.readyState=1;req.addEventListener("load",function(){req.readyState=4;if(typeof req.onreadystatechange=="function")
req.onreadystatechange();},false);}
return req;}
if(window.ActiveXObject){var ax=new ActiveXObject(getXmlHttpPrefix()+".XmlHttp");return ax;}}catch(ex){}
throw new Error("Your browser does not support XmlHttp objects");}
XmlHttp.post=function(rpc,url,postStr){try{rpc.open("POST",url,false);rpc.setRequestHeader("Content-Type","application/x-www-form-urlencoded");rpc.send(postStr);}catch(e){return false;}
return rpc;}
XmlHttp.get=function(rpc,url,getStr){try{rpc.open("GET",getStr,false);rpc.send(null);}catch(e){return false;}
return rpc;}
function XmlDocument(){}
XmlDocument.create=function(){try{if(document.implementation&&document.implementation.createDocument){var doc=document.implementation.createDocument("","",null);if(doc.readyState==null){doc.readyState=1;doc.addEventListener("load",function(){doc.readyState=4;if(typeof doc.onreadystatechange=="function")
doc.onreadystatechange();},false);}
return doc;}
if(window.ActiveXObject)
return new ActiveXObject(getDomDocumentPrefix()+".DomDocument");}
catch(ex){}
throw new Error("Your browser does not support XmlDocument objects");};if(window.DOMParser&&window.XMLSerializer&&window.Node&&Node.prototype&&Node.prototype.__defineGetter__){Document.prototype.loadXML=function(s){var doc2=(new DOMParser()).parseFromString(s,"text/xml");while(this.hasChildNodes())
this.removeChild(this.lastChild);var ret=false;for(var i=0;i<doc2.childNodes.length;i++){this.appendChild(this.importNode(doc2.childNodes[i],true));ret=true;}
return ret;};var documentProto=Document.prototype;var documentGrandProto=documentProto.__proto__={__proto__:documentProto.__proto__};if(documentGrandProto){documentGrandProto.__defineGetter__('xml',function(){return(new XMLSerializer()).serializeToString(this);});}
var elementProto=Element.prototype;var elementGrandProto=elementProto.__proto__={__proto__:elementProto.__proto__};if(elementGrandProto){elementGrandProto.__defineGetter__('text',function(){return this.textContent;});elementGrandProto.__defineGetter__('innerText',function(){return this.textContent;});elementGrandProto.__defineSetter__('innerText',function(new_value){var tn=this.ownerDocument.createTextNode(new_value);this.innerHTML="";this.appendChild(tn);});}}
function evaluateXPath(aNode,aExpr){var found=[];if(is.mozilla){if(typeof evaluateXPath.xpe=="undefined"){evaluateXPath.xpe=new XPathEvaluator();}
var result=evaluateXPath.xpe.evaluate(aExpr,aNode,null,XPathResult.ANY_TYPE,null);while(res=result.iterateNext()){found.push(res);}}else if(is.ie){var result=aNode.selectNodes(aExpr);for(var i=0;i<result.length;i++){found.push(result[i]);}}
if(found.length==0){found=false;}
return found;};function BrowserCheck(){var b=navigator.appName.toString();var up=navigator.platform.toString();var ua=navigator.userAgent.toString();this.mozilla=this.ie=this.opera=r=false;var re_opera=/Opera.([0-9\.]*)/i;var re_msie=/MSIE.([0-9\.]*)/i;var re_gecko=/gecko/i;var re_safari=/safari\/([\d\.]*)/i;if(ua.match(re_opera)){r=ua.match(re_opera);this.opera=true;this.version=parseFloat(r[1]);}else if(ua.match(re_msie)){r=ua.match(re_msie);this.ie=true;this.version=parseFloat(r[1]);}else if(ua.match(re_safari)){this.mozilla=true;this.safari=true;this.version=1.4;}else if(ua.match(re_gecko)){var re_gecko_version=/rv:\s*([0-9\.]+)/i;r=ua.match(re_gecko_version);this.mozilla=true;this.version=parseFloat(r[1]);}
this.windows=this.mac=this.linux=false;this.Platform=ua.match(/windows/i)?"windows":(ua.match(/linux/i)?"linux":(ua.match(/mac/i)?"mac":ua.match(/unix/i)?"unix":"unknown"));this[this.Platform]=true;this.v=this.version;this.valid=this.ie&&this.v>=6||this.mozilla&&this.v>=1.4;if(this.safari&&this.mac&&this.mozilla){this.mozilla=false;}};function sortFormHandlers(arr){for(var i=0;i<arr.length;i++){var fh1=arr[i];for(var j=i+1;j<arr.length;j++){var fh2=arr[j];if(fh2[0]<fh1[0]){var tmp=fh1;arr[i]=fh2;arr[j]=tmp;}}}};function GLOBAL_registerFormSubmitEventHandler(function_name,priority){var frms=document.getElementsByTagName('form');for(var i=0;i<frms.length;i++){var frm=frms[i];if(typeof frm.onsubmit!='undefined'&&frm.onsubmit!=null){var form_handlers=frm.form_handlers;if(form_handlers){form_handlers[form_handlers.length]=[priority,function_name];sortFormHandlers(form_handlers);}else{frm.__kt_onsubmit=frm.onsubmit;frm.onsubmit=new Function('e','if (!KT_formSubmittalHandler(e)) return false;');form_handlers=[];form_handlers[form_handlers.length]=[priority,function_name];}
frm.form_handlers=form_handlers;}else{frm.onsubmit=new Function('e','return KT_formSubmittalHandler(e);');var form_handlers=[];form_handlers[form_handlers.length]=[priority,function_name];frm.form_handlers=form_handlers;}}};var fire_starter=null;var global_form_submit_lock=false;function KT_formSubmittalHandler(e){var frm=null;var o=utility.dom.setEventVars(e);if(!o.e){return true;}
try{if(global_form_submit_lock){utility.dom.stopEvent(o.e);return false;}
frm=o.targ;if(!frm){return true;}
if(!frm.tagName){return true;}
if(frm.tagName.toLowerCase()!="form"){frm=frm.form;}}catch(err){}
if(!frm){frm=fire_starter;}
if(!frm){return true;}
if(typeof(UNI_disableButtons)!='undefined'){UNI_disableButtons(frm,/.*/,true);}
var ret=true;var form_handlers=frm.form_handlers;if(form_handlers){for(var i=0;i<form_handlers.length;i++){var fun=form_handlers[i];eval("ret = "+fun[1]+"(o.e);");if(!ret){break;}}}
if(is.ie&&is.mac&&typeof(UNI_disableButtons)!='undefined'){UNI_disableButtons(frm,/.*/,false);}
if(!ret){try{utility.dom.stopEvent(o.e);}catch(err){}
if(!global_form_submit_lock&&typeof(UNI_disableButtons)!='undefined'){UNI_disableButtons(frm,/.*/,false);}
return false;}else{if(frm.__kt_onsubmit){var ret=frm.__kt_onsubmit(o.e);if(typeof(ret)=='undefined'||ret){return true;}else{return false;}}
return true;}};utility.dom.attachEvent(window,'unload',EventCache.flush);


function show_as_buttons_func() {
	var toret = false;
	if (!(typeof $NXT_LIST_SETTINGS == 'undefined' || typeof $NXT_LIST_SETTINGS['show_as_buttons'] == 'undefined' || $NXT_LIST_SETTINGS['show_as_buttons'] == false)) {
		toret = true;
	}
 	if (!(typeof $NAV_SETTINGS == 'undefined' || typeof $NAV_SETTINGS['show_as_buttons'] == 'undefined' || $NAV_SETTINGS['show_as_buttons'] == false)) {
		toret = true;
	}
	return toret;
}
show_as_buttons = "show_as_buttons_func()";
not_show_as_buttons = "!" + show_as_buttons;
/*
 * transforms a link to a button, keeping the link inner text, and adding the onclick event
 */
function KT_style_replace_with_button(el, add_event) {
	if (typeof add_event == 'undefined') {
		add_event = false;
	}
	var elnou = utility.dom.createElement('input', {
		'type' : 'button', 
		'value': el.innerHTML
	});

	el.style.display = 'none';
	elnou = utility.dom.insertAfter(elnou, el);

	if (add_event) {
		var onclick = el.onclick;
		elnou.onclick = onclick;
	}

	elnou.style.visibility = el.style.visibility;
	if (el.innerHTML == '') {
		elnou.style.display = 'none';
	}

	return elnou;
}

function KT_style_modify_custom_links(el) {
    var classes = utility.dom.getClassNames(el);
    if (1
    &&  Array_indexOf(classes, 'KT_link') < 0
    ) {
        return;
    }

    var elnou = KT_style_replace_with_button(el);
    /*utility.dom.attachEvent(*/elnou.onclick = function(e) {
        var a = this.previousSibling;
        if (!a.onclick) {
            var act = utility.dom.getLink(a);
            var parts = act.toString().split('?');
            if (parts.length == 1) {
                parts[1] = '';
            }
            var qs = new QueryString(parts[1]); var action_url = parts[0], variables = [];
            Array_each(qs.keys, function(key, i) {
                Array_push(variables, [key, qs.values[i]]);
            });

            var frm = utility.dom.createElement(
                "FORM", 
                {'action': act, 'method': 'GET', 'style': "display: none"}
            );
            Array_each(variables, function(input, i){
                frm.appendChild(utility.dom.createElement('INPUT', {'type': 'hidden', 'id': input[0], 'name': input[0], 'value': input[1]}));
            });

            frm = document.body.appendChild(frm);
            frm.submit();
        } else {
            var to_exec = a.onclick;
            a.onclick();
        }
    };/*);*/
    //elnou.className = 'button_big';
}

//[mtm]_[detail_key_value]
var tng_mtm_detail_key_re = /^mtm_(\d+)$/;
function tng_form_enable_details (checkbox_name) {
	var cbx = document.getElementById(checkbox_name);
	var state = !cbx.checked;
	var parts = checkbox_name.match(tng_mtm_detail_key_re);
	var related_input_re = new RegExp("^mtm_(.+?)_" + parts[1] + "$", "");

	Array_each(cbx.form.elements, function(input) {
		var input_name = input.name;
		if (input_name && related_input_re.test(input_name)) {
			if (typeof(input.widget_id) == 'undefined') {
				if (input.disabled != state) {
					input.disabled = state;
				}
			} else {
				try {
					window[input.widget_type][input.widget_id].setEnabled(!state);
				} catch(err) {}
			}
		}
	});
}


/*
 * this array holds the transformations for the list / form elements
 * each array item is an object with tthe following properties:
 * 	* selector : the string passwd to utility.dom.getElementsBySelector
 * 	* transform : transformation function whichch has a single parameter : the element to handle
 * 	* eval : condition which tells if the transformation is executed
 */
$TRANSFORMATIONS = [
	{
		'selector': function() {
			//'div.KT_tnglist div.KT_bottombuttons a.KT_edit_op_link'
			//'div.KT_tnglist div.KT_bottombuttons a.KT_delete_op_link', 
			//'div.KT_tnglist div.KT_bottombuttons a.KT_additem_op_link', 
			//'div.KT_tnglist div.KT_opbuttons a.KT_edit_op_link'
			//'div.KT_tnglist div.KT_opbuttons a.KT_delete_op_link', 
			//'div.KT_tnglist div.KT_opbuttons a.KT_additem_op_link', 
			var toret = [];
			for (var i = 0; i < $lists.length; i++) {
				if ($lists[i].kt_styles_attached) {
					continue;
				}
				var as = $lists[i].bottombuttons.getElementsByTagName('a');
				for (var j = 0; j < as.length; j++) {
					if (/(KT_edit_op_link|KT_delete_op_link|KT_additem_op_link)/.test(as[j].className)) {
						toret.push(as[j]);
					}
				}
				if ($lists[i].topbuttons) {
					var as = $lists[i].topbuttons.getElementsByTagName('a');
					for (var j = 0; j < as.length; j++) {
						if (/(KT_edit_op_link|KT_delete_op_link|KT_additem_op_link)/.test(as[j].className)) {
							toret.push(as[j]);
						}
					}
				}
			}
			return toret;
		}, 
		'transform': function(el) { 
			var elnou = KT_style_replace_with_button(el, true);
		}, 
		'eval': show_as_buttons
	}, 
	{
		'selector': function() {
			//'div.KT_tnglist th.KT_sorter a.KT_move_op_link', 
			var toret = [];
			for (var i = 0; i < $lists.length; i++) {
				if ($lists[i].kt_styles_attached) {
					continue;
				}
				var ths = $lists[i].table.getElementsByTagName('th');
				for (var j = 0; j < ths.length; j++) {
					if (/KT_sorter/.test(ths[i].className)) {
						var as = ths[i].getElementsByTagName('a');
						for (var k = 0; k < as.length; k++) {
							if (/KT_move_op_link/.test(as[k].className)) {
								toret.push(as[k]);
								break;
							}
						}
					}
				}
			}
			return toret;
		}, 
		'transform': function(el) {
			var elnou = KT_style_replace_with_button(el, true);
			elnou.style.display = 'none';
		}, 
		'eval': show_as_buttons
	}, 
	{
		'selector' : function() {
			var toret = [];
			for (var i = 0; i < $lists.length; i++) {
				if ($lists[i].kt_styles_attached) {
					continue;
				}
				var as = $lists[i].table.getElementsByTagName('a');
				for (var j = 0; j < as.length; j++) {
					if (/(KT_edit_link|KT_moveup_link|KT_movedown_link|KT_delete_link|KT_link)/.test(as[j].className)) {
						toret.push(as[j]);
					}
				}
			}
			return toret;
		}, 
		'transform': function(el) {
			var elnou = KT_style_replace_with_button(el);
			elnou.onclick = function(e) {
				var a = this.previousSibling;
				if (/(KT_movedown_link|KT_moveup_link|KT_delete_link)/.test(a.className)) {
					var to_exec = a.onclick;
					try {
						a.onclick(e);
					} catch(e) { }
				} else if (/(KT_link)/.test(a.className)) {
					if (!a.onclick) {
						var act = utility.dom.getLink(a);
						var parts = act.toString().split('?');
						if (parts.length == 1) {
							parts[1] = '';
						}
						var qs = new QueryString(parts[1]); var action_url = parts[0], variables = [];
						Array_each(qs.keys, function(key, i) {
							Array_push(variables, [key, qs.values[i]]);
						});

						var frm = utility.dom.createElement(
							"FORM", 
							{'action': act, 'method': 'GET', 'style': "display: none"}
						);
						Array_each(variables, function(input, i){
							frm.appendChild(utility.dom.createElement('INPUT', {'type': 'hidden', 'id': input[0], 'name': input[0], 'value': input[1]}));
						});

						frm = document.body.appendChild(frm);
						if (typeof PanelForm_overrideSubmit == 'function') {
							frm.submit = PanelForm_overrideSubmit;
						}
						frm.submit();
					} else {
						var to_exec = a.onclick;
						a.onclick();
					}
				} else if (/(KT_edit_link)/.test(a.className)) {
					try {
						var o = utility.dom.setEventVars(e);
						var table = utility.dom.getParentByTagName(this, 'table');
						var row = utility.dom.getParentByTagName(this, 'tr');

						var tmp = utility.dom.getElementsByClassName(row, 'id_checkbox')[0];
						var myinput = null;
						if (tmp.type && tmp.type.toLowerCase() == 'checkbox' && tmp.name.toString().match(/^kt_pk/)) {
							myinput = tmp;
						}

						var inputs = utility.dom.getElementsByClassName(table, 'id_checkbox');
						Array_each(inputs, function(input) {
							if (input.type && input.type.toLowerCase() == 'checkbox' && 
								input.name.toString().match(/^kt_pk/)) {
								input.checked = (input == myinput);
							}
						});
						nxt_list_edit_link_form(this);
					} catch(e) {
						window.location.href = a.href;
					}					
				} else {
					window.location.href = a.href;
				}
			};/*);*/
			var move_up = /KT_moveup_link/.test(el.className);
			var move_down = /KT_movedown_link/.test(el.className);
			if (move_up || move_down) {
				if (move_up && typeof $nxt_move_up_background_image != 'undefined' || move_down && typeof $nxt_move_down_background_image != 'undefined') {
					elnou.value = "";
				}
				elnou.className = 'button_smallest KT_button_move_' + (move_up?'up':'down');
			} else {
				elnou.className = 'button_big';
			}

		}, 
		'eval': show_as_buttons
	},
	{
		/* ajaxify the back to master link*/
		'selector' : function() {
			var toret = [];
			if (typeof $ctrl != 'undefined') {
				for (var i = 0; i < $lists.length; i++) {
					if ($lists[i].kt_styles_attached) {
						continue;
					}
					var trs = utility.dom.getElementsByClassName($lists[i].inner, "KT_masterlink", "TR");
					for (var j=0; j<trs.length; j++) {
						var links = trs[j].getElementsByTagName("A");
						for (var k=0; k < links.length; k++) {
							if (links[k].href.indexOf('includes/nxt/back.php') != -1) {
								toret.push(links[k]);
							}
						}
					}
				}
			}
			return toret;
		},
		'transform': function(el) {
			el.onclick = function() {
				$ctrl.loadPanels(el.href);	
				return false;
			}
		},
		'eval': 1
	},
	{
		'selector' : function() {
			var toret = [];
			for (var i = 0; i < $lists.length; i++) {
				if ($lists[i].kt_styles_attached) {
					continue;
				}
				var as = $lists[i].bottombuttons.getElementsByTagName('a');
				for (var j = 0; j < as.length; j++) {
					if (/KT_link/.test(as[j].className)) {
						toret.push(as[j]);
					}
				}
				if ($lists[i].topbuttons) {
					var as = $lists[i].topbuttons.getElementsByTagName('a');
					for (var j = 0; j < as.length; j++) {
						if (/KT_link/.test(as[j].className)) {
							toret.push(as[j]);
						}
					}
				}
			}
			return toret;
		}, 
		'transform': KT_style_modify_custom_links, 
		'eval': show_as_buttons
	}, 
	{
		'selector' : function() {
			var toret = [];
			if ($lists.length > 0) {
				for (var i = 0; i < $lists.length; i++) {
					if ($lists[i].kt_styles_attached) {
						continue;
					}
					if ($lists[i].toptextnav) {
						var as = $lists[i].toptextnav.getElementsByTagName('a');
						for (var j = 0; j < as.length; j++) {
							if (/(first|prev|next|last)/.test(as[j].parentNode.className)) {
								toret.push(as[j]);
							}
						}
					}
					if ($lists[i].bottomtextnav.getAttribute("kt_styles_attached")) {
						continue;
					}
					$lists[i].bottomtextnav.setAttribute("kt_styles_attached", true);
					var as = $lists[i].bottomtextnav.getElementsByTagName('a');
					for (var j = 0; j < as.length; j++) {
						if (/(first|prev|next|last)/.test(as[j].parentNode.className)) {
							toret.push(as[j]);
						}
					}
				}
			} else {
				var divs = utility.dom.getElementsByClassName(document, 'KT_textnav', 'div');
				if (divs) {
					for (var i = 0; i < divs.length; i++) {
						if (divs[i].getAttribute("kt_styles_attached")) {
							continue;
						}
						divs[i].setAttribute("kt_styles_attached", true);
						var as = divs[i].getElementsByTagName('a');
						for (var j = 0; j < as.length; j++) {
							if (/(first|prev|next|last)/.test(as[j].parentNode.className)) {
								toret.push(as[j]);
							}
						}
					}
				}
			}
			return toret;		
		}, 
		'transform' : function(el) {
			var li = el.parentNode;
			var elnou = KT_style_replace_with_button(el);
			if (!el.href.match(/void\(0\)/)) {
				elnou.onclick = function(e) {
					if (typeof $ctrl != 'undefined') {
						$ctrl.loadPanels(el.href);
					} else {
						window.location.href = el.href;
					}
				};
			} else {
				//utility.dom.classNameAdd(el.parentNode, 'disabled');
				var inp = el.parentNode.getElementsByTagName('input');
				if (inp.length > 0) {
					inp[0].disabled = true;
				}
			}
			var values = {'first': '<<', 'prev': '<', 'next': '>', 'last': '>>'};
			elnou.value = values[li.className.toString().replace(/ disabled/, '')];
			elnou.className = 'button_smallest' + (el.href.match(/void\(0\)/) ? ' disabled' : '');
		}, 
		'eval': show_as_buttons
	}, 
	{
		'selector' : function() {
			var toret = [];
			if ($lists.length > 0) {
				for (var i = 0; i < $lists.length; i++) {
					if ($lists[i].kt_styles_attached) {
						continue;
					}
					if ($lists[i].toptextnav) {
						var as = $lists[i].toptextnav.getElementsByTagName('a');
						for (var j = 0; j < as.length; j++) {
							if (/(first|prev|next|last)/.test(as[j].parentNode.className)) {
								toret.push(as[j]);
							}
						}
					}
					var as = $lists[i].bottomtextnav.getElementsByTagName('a');
					for (var j = 0; j < as.length; j++) {
						if (/(first|prev|next|last)/.test(as[j].parentNode.className)) {
							toret.push(as[j]);
						}
					}
				}
			} else {
				var divs = utility.dom.getElementsByClassName(document, 'KT_textnav', 'div');
				if (divs) {
					for (var i = 0; i < divs.length; i++) {
						if (divs[i].getAttribute("kt_styles_attached")) {
							continue;
						}
						divs[i].setAttribute("kt_styles_attached", true);
						var as = divs[i].getElementsByTagName('a');
						for (var j = 0; j < as.length; j++) {
							if (/(first|prev|next|last)/.test(as[j].parentNode.className)) {
								toret.push(as[j]);
							}
						}
					}
				}
			}
			return toret;		
		}, 
		'transform' : function(el) {
			if (!el.href.match(/void\(0\)/)) {
			} else {
				utility.dom.classNameAdd(el, 'disabled');
			}
		}, 
		'eval': not_show_as_buttons
	}, 
	{
		'selector': function() { 
			//'div#KT_tngdeverror a'
			var toret = [];
			var div = document.getElementById('KT_tngdeverror');
			if (div && !div.getAttribute("kt_styles_attached")) {
				div.setAttribute("kt_styles_attached", true);
				var as = div.getElementsByTagName('a');
				for (var i = 0; i < as.length; i++) {
					if (as[i].href == 'javascript:needHelp()') {
						as[i].onclick = function() { needHelp();}
					}
					toret.push(as[i]);
				}
			}
			var div = document.getElementById('KT_tngtrace');
			if (div && !div.getAttribute("kt_styles_attached")) {
				div.setAttribute("kt_styles_attached", true);
				var as = div.getElementsByTagName('a');
				for (var i = 0; i < as.length; i++) {
					toret.push(as[i]);
				}
			}
			return toret;
		}, 
		'transform': function(el) { 
			var elnou = KT_style_replace_with_button(el, true);
		}, 
		'eval': show_as_buttons
	}, 
	{
		'selector_text': 'div.KT_tnglist table.KT_tngtable tr.KT_row_filter input[type="submit"]', 
		'selector' : function() {
			var toret = [];
			for (var i = 0; i < $lists.length; i++) {
				if ($lists[i].kt_styles_attached) {
					continue;
				}
				var inps = $lists[i].table.getElementsByTagName('input');
				for (var j = 0; j < $lists[i].table.rows.length; j++) {
					var row = $lists[i].table.rows[i];
					if (/KT_row_filter/.test(row.className)) {
						var inps = row.getElementsByTagName('input');
						var type = '';
						for (var k = 0; k < inps.length; k++) {
							type = inps[k].getAttribute('type');
							if (type == null) {
								type = 'text';
							}
							if (type.toString().toLowerCase == 'submit') {
								toret.push(inps[k]);
							}
						}
					}
				}
			}
			return toret;
		}, 
		'transform': function(el) {
			el.className = 'KT_row_filter_submit_button';
		}, 
		'eval': "1"
	}, 
	{
		'selector' : function() {
			//'div.KT_tng input[type="text"]'
			//'div.KT_tng input[type="widget"]'
			//'div.KT_tng input[type="password"]'
			var toret = [];
			for (var i = 0; i < $lists.length; i++) {
				if ($lists[i].kt_styles_attached) {
					continue;
				}
				var inps = $lists[i].main.getElementsByTagName('input');
				var type = '';
				for (var j = 0; j < inps.length; j++) {
					type = inps[j].getAttribute('type');
					if (type == null) {
						type = 'text';
					}
					if (/(text|widget|password)/i.test(type.toString())) {
						toret.push(inps[j]);
					}
				}
			}
			return toret;
		}, 
		'transform': function(el) {
			utility.dom.classNameAdd(el, 'input_text');
		}, 
		'eval': "1"
	}, 
	{
		'selector' : 'table.KT_tngtable', 
		'transform' : function(el) {
			if (el.getAttribute("kt_checkboxes_attached")) {
				return;
			}
			el.setAttribute("kt_checkboxes_attached", true);
			var labels = utility.dom.getElementsByTagName(el, 'label');
			var visited_labels = [];
			//ZZZZ
			Array_each(labels, function(label) {
				var normal = label.htmlFor.toString().replace(/_\d+$/, '');
				var normal_re = new RegExp('^' + normal + "_\\d+$", 'g');
			
				var first = document.getElementById(normal+'_1');
				if (typeof first == 'undefined' || first == null || !first.tagName || first.tagName == 'undefined') {
					return;
				}
				if (first.tagName.toLowerCase() == 'input' && first.type && first.type.toLowerCase() == 'file') {
					return;
				}
			
				var inp = document.getElementById(label.htmlFor.toString());
			
				var show_cond = true;
				if (typeof inp == 'undefined' || inp == null) {
					show_cond = false;
				}
				if (show_cond && typeof inp.type != 'undefined' && inp.type != null) {
					if (inp.type.toString().toLowerCase() == 'radio') {
						show_cond = false;
					}
				}
				if (!show_cond) {
					return;
				}
			
				if (tng_mtm_detail_key_re.test(label.htmlFor)) {
					// this is a detail checkbox
					// attach the onclick disable/enable detail row behavior 
					inp.onclick = function(e) {
						tng_form_enable_details(inp.name);
					}
					if (!inp.checked) {
						tng_form_enable_details(inp.name);
					}
				}
			});
		},
		'eval': "1"
	},
	{
		'selector' : 'div.KT_tngform', 
		'transform' : function(el) {
			if (el.getAttribute("kt_styles_attached")) {
				return;
			}
			el.setAttribute("kt_styles_attached", true);
			if (is.mozilla) {
				utility.dom.classNameAdd(el, 'fix_content_enlarge');
			}

			if (typeof window['ktmls'] != 'undefined' && is.mozilla && typeof(ktml_isElementVisible) == 'undefined') {
				return;
			}

			multiple_edits = false;
			var tables = utility.dom.getElementsBySelector('div.KT_tngform table.KT_tngtable');
			if (tables.length && tables.length > 1) {
				multiple_edits = true;
			}
			var show_as_grid = !(typeof $NXT_FORM_SETTINGS == 'undefined' || typeof $NXT_FORM_SETTINGS['show_as_grid'] == 'undefined' || $NXT_FORM_SETTINGS['show_as_grid'] == false);
			if (tables.length == 1 || !show_as_grid) {
				return true;
			}
			multiple_edits = true;
			var num_of_columns = tables[0].rows.length;

			var tbl = document.createElement('table', {
				'className' : 'KT_tngtable'
			});
			tbl.className = 'KT_tngtable';
			
			//el.appendChild(tbl);
			//	STEP n-3 : create the header table
			var row_head = tbl.insertRow(-1);
			var cell_head = row_head.insertCell(-1);
			cell_head.innerHTML = NXT_Messages['Record_FH'];
			cell_head.className = 'KT_th';
			Array_each(tables[0].rows, function(row) {
				var label = row.getElementsByTagName('label')[0];

				var cell_head = row_head.insertCell(-1);
				cell_head.className = 'KT_th';
				if (label) {
					cell_head.appendChild(label);
				} else {
					cell_head.innerHTML = row.getElementsByTagName('td')[0].innerHTML;
				}
			})


			//	STEP n-2 : create the new table and hide it
			var hidden_ids = utility.dom.getElementsByClassName(el, 'id_field');
			var hidden_ids_index = 0;
			Array_each(tables, function(table_to_copy, index) {
				var row_content = tbl.insertRow(-1);
				
				var cell_record_no = row_content.insertCell(-1);
				cell_record_no.innerHTML = (index+1)+'';
				cell_record_no.noWrap = true;
				cell_record_no.style.verticalAlign = "top";

				Array_each(table_to_copy.rows, function(row) {
					//var cell_content = row_content.insertCell(-1);
					//cell_content.innerHTML = row.getElementsByTagName('td')[1].innerHTML;
					var td = row_content.appendChild(row.getElementsByTagName('td')[1]);//.cloneNode(true)
					td.style.verticalAlign = "top";
					var hint = utility.dom.getElementsByClassName(td, 'KT_field_hint', 'span');
					if (hint.length) {
						for (var i = 0; i < hint.length; i++) {
							hint[i].parentNode.removeChild(hint[i]);
						}
					}
				})

				var hidden = hidden_ids[hidden_ids_index++];
				/*
				while (hidden && (hidden.nodeType == 3 || hidden.tagName.toLowerCase() != 'input')) {
					hidden = hidden.nextSibling;
				}
				*/
				if (hidden) {
					cell_record_no.appendChild(hidden);
				} else {
					alert('could not find hidden !');
				}

			})

			// STEP n-1 : delete the old tables 
			Array_each(tables, function(table_to_copy, index) {
				//remove previous h2
				var heading = table_to_copy.previousSibling;
				try {
					while (heading.previousSibling && (heading.nodeType == 3 ||  heading.tagName.toLowerCase() != 'h2')) {
						heading = heading.previousSibling;
					}
				} catch(e) { heading = null; } 
				if (heading) {
					heading.parentNode.removeChild(heading);
				}

				//remove next input
				var hidden = table_to_copy.nextSibling;
				try {
					while (hidden && hidden.nodeType != 3 && hidden.tagName.toLowerCase() != 'input') {
						hidden = hidden.nextSibling;
					}
				} catch(e) { hidden = null; }
				if (hidden) {
					hidden.parentNode.removeChild(hidden);
				}
				table_to_copy.parentNode.removeChild(table_to_copy);
			})

			//	STEP 4 : find the bottombuttons div, and add the element
			var bottom_buttons = utility.dom.getElementsBySelector('div.KT_bottombuttons')[0];
			bottom_buttons.parentNode.insertBefore(tbl, bottom_buttons);
		}, 
		'eval': '(true)'
	}
];

function nxt_style_set_globals() {
	$lists = [];
	var tmp = utility.dom.getElementsByClassName(document, 'KT_tng', 'div');
	for (var k = 0; k < tmp.length; k++) {
		var list_obj = {};
		var kt_styles_attached = tmp[k].getAttribute("kt_styles_attached");
		if (kt_styles_attached) {
			continue;
		}
		list_obj.kt_styles_attached = false;
		list_obj.name = tmp[k].id;
		list_obj.main = tmp[k];
		list_obj.inner = utility.dom.getElementsByClassName(tmp[k], 'KT_tnglist', 'div');
		if (typeof list_obj.inner == 'object' && list_obj.inner != null && list_obj.inner.length && list_obj.inner.length > 0) {
			list_obj.inner = list_obj.inner[0];
			if (is.mozilla) {
				utility.dom.classNameAdd(list_obj.inner, 'fix_content_enlarge');
			}
		
			var frm = list_obj.inner.getElementsByTagName('form')[0];
			for (var i = 0; i < frm.childNodes.length; i++) {
				if (frm.childNodes[i].nodeType == 1) {
					var n = frm.childNodes[i];
					var t = n.tagName.toLowerCase();
					var c = n.className;
					if (t == 'table') {
						list_obj.table = n;
					}
					if (/KT_topbuttons/.test(c)) {
						list_obj.topbuttons = n;
					}
					if (/KT_bottombuttons/.test(c)) {
						list_obj.bottombuttons = n;
					}
					if (/KT_topnav/.test(c)) {
						list_obj.topnav = n;
						var divs = list_obj.topnav.getElementsByTagName('div');
						for (var j = 0; j < divs.length; j++) {
							if (/KT_textnav/.test(divs[j].className)) {
								list_obj.toptextnav = divs[j];
								break;
							}
						}
					}
					if (/KT_bottomnav/.test(c)) {
						list_obj.bottomnav = n;
						var divs = list_obj.bottomnav.getElementsByTagName('div');
						for (var j = 0; j < divs.length; j++) {
							if (/KT_textnav/.test(divs[j].className)) {
								list_obj.bottomtextnav = divs[j];
								break;
							}
						}
					}
				}
			}
			$lists.push(list_obj);
		}
	}
}

function nxt_style_attach() {
	if (is.ie && is.mac) {
		return;
	}
	styles_arr = [];
	nxt_style_set_globals();
	nxt_perform_transformations = function() {
		Array_each($TRANSFORMATIONS, function(t) {
			var obj = {};
			obj.selector = t;
			obj.start = new Date();
			if (eval(t['eval'])) {
				var sel = t.selector;
				if (typeof sel == 'function') {
					var arr = sel();
				} else {
					var arr = utility.dom.getElementsBySelector(t['selector']);
				}
				Array_each(arr, t['transform']);
			}
			obj.end = new Date();
			obj.diff = obj.end - obj.start;
			styles_arr.push(obj);
		});
		for(var i=0; i<$lists.length; i++) {
			$lists[i].kt_styles_attached = true;
			$lists[i].main.setAttribute("kt_styles_attached", true);
		}
		KT_style_executed = true;
		$style_executed = true;
		if (typeof nxt_list_attach != 'undefined') {
			nxt_list_attach();
		}
	}
	nxt_perform_transformations();
}

utility.dom.attachEvent2(window, 'onload', nxt_style_attach);



if(!Function.prototype.apply){Function.prototype.apply=function(o,a){var r;if(!o){o={};}
o.__a=this;switch((a&&a.length)||0){case 0:r=o.__a();break;case 1:r=o.__a(a[0]);break;case 2:r=o.__a(a[0],a[1]);break;case 3:r=o.__a(a[0],a[1],a[2]);break;case 4:r=o.__a(a[0],a[1],a[2],a[3]);break;case 5:r=o.__a(a[0],a[1],a[2],a[3],a[4]);break;case 6:r=o.__a(a[0],a[1],a[2],a[3],a[4],a[5]);break;default:for(var i=0,s="";i<a.length;i++){if(i!=0){s+=",";}
s+="a["+i+"]";}
r=eval("o.__a("+s+")");}
o.__apply=null;return r;};}
_St=function(_t,_6){if(!_6){_6=_t;}
return _6.replace(/^\s*/,"").replace(/\s*$/,"");};_Sns=function(_t,_8){if(!_8){_8=_t;}
return _St(_8).replace(/\s+/g," ");};_Ae=function(_t,_a){for(var _b=0;_b<_t.length;++_b){var _c=_t[_b];_a(_c,_b);}
return _t;};_Ai=function(_t,x){for(var i=0;i<_t.length;i++){if(_t[i]==x){return i;}}
return-1;};_Ap=function(_t,obj){for(var i=1;i<arguments.length;i++){_t[_t.length]=arguments[i];}
return _t.length;};function browserReport(){var b=navigator.appName.toString();var up=navigator.platform.toString();var ua=navigator.userAgent.toString();this.mozilla=this.ie=this.opera=r=false;var _16=/Opera.([0-9\.]*)/i;var _17=/MSIE.([0-9\.]*)/i;var _18=/gecko/i;var _19=/safari\/([\d\.]*)/i;if(ua.match(_16)){r=ua.match(_16);this.opera=true;this.version=parseFloat(r[1]);}else{if(ua.match(_17)){r=ua.match(_17);this.ie=true;this.version=parseFloat(r[1]);}else{if(ua.match(_19)){this.mozilla=true;this.safari=true;this.version=1.4;}else{if(ua.match(_18)){var _1a=/rv:\s*([0-9\.]+)/i;r=ua.match(_1a);this.mozilla=true;this.version=parseFloat(r[1]);}}}}
this.windows=this.mac=this.linux=false;this.Platform=ua.match(/windows/i)?"windows":(ua.match(/linux/i)?"linux":(ua.match(/mac/i)?"mac":ua.match(/unix/i)?"unix":"unknown"));this[this.Platform]=true;this.v=this.version;this.valid=this.ie&&this.v>=6||this.mozilla&&this.v>=1.4;if(this.safari&&this.mac&&this.mozilla){this.mozilla=false;}}
var is=new browserReport();getElRef=function(_1b){var d;if(typeof(_1b)=="string"){d=document.getElementById(_1b);}else{d=_1b;}
return d;};getClasses=function(o){o=getElRef(o);if(!o){return false;}
var cn=_St(_Sns(o.className));if(cn==""){return[];}
return cn.split(" ");};_gAC=function(e){return e.all?e.all:e.getElementsByTagName("*");};_getOwnChildrenOnly=function(e){var _21=[];var _22=e.childNodes;for(var i=0;i<_22.length;i++){var _24=_22[i];if(_24.nodeType==1){_Ap(_21,_24);}}
return _21;};_gEBTN=function(o,_26){var el;if(typeof o=="undefined"){o=document;}else{o=getElRef(o);}
if(_26=="*"||typeof _26=="undefined"){el=_gAC(o);}else{el=o.getElementsByTagName(_26.toLowerCase());}
return el;};_attachEvent2=function(_28,_29,_2a,_2b){_aEB(_28,_29,_2a,_2b,1);};_aE=function(_2c,_2d,_2e,_2f){_aEB(_2c,_2d,_2e,_2f,0);};_aEB=function(_30,_31,_32,_33,_34){if(typeof(_33)=="undefined"){_33=1;}
var _35=_31.match(/unload$/i);var _36=_31.match(/^on/)?_31:"on"+_31;var _37=_31.replace(/^on/,"");if(typeof _30._eH=="undefined"){_30._eH={};}
var _38=null;if(typeof _30._eH[_37]=="undefined"){_30._eH[_37]=[];_38=_30._eH[_37];var _39=function(e){if(!e&&window.event){e=window.event;}
for(var i=0;i<_30._eH[_37].length;i++){var f=_30._eH[_37][i];if(typeof f=="function"){f.apply(_30,[e]);f=null;}}};if(_30.addEventListener){_30.addEventListener(_37,_39,false);}else{if(_30.attachEvent){_30.attachEvent("on"+_37,_39);}else{_30["on"+_37]=_39;}}
if((!(is.ie&&is.mac))&&!_35){_EventCache.add(_30,_37,_39,1);}}else{_38=_30._eH[_37];}
for(var i=0;i<_38.length;i++){if(_38[i]==_32){return;}}
_38[_38.length]=_32;};var _EventCache=function(){var _3e=[];return{listEvents:_3e,add:function(_3f,_40,_41,_42){_Ap(_3e,arguments);},flush:function(){var i,item;if(_3e){for(i=_3e.length-1;i>=0;i=i-1){item=_3e[i];if(item[0].removeEventListener){item[0].removeEventListener(item[1],item[2],item[3]);}
var _44="";if(item[1].substring(0,2)!="on"){_44=item[1];item[1]="on"+item[1];}else{_44=item[1].substring(2,event_name_without_on.length);}
if(typeof item[0]._eH!="undefined"&&typeof item[0]._eH[_44]!="undefined"){item[0]._eH[_44]=null;}
if(item[0].detachEvent){item[0].detachEvent(item[1],item[2]);}
item[0][item[1]]=null;}
_3e=null;}}};}();_aE(window,"unload",function(){_EventCache.flush();});_bO=function(b1,b2){if((b1.x+b1.width)<b2.x){return false;}
if(b1.x>(b2.x+b2.width)){return false;}
if((b1.y+b1.height)<b2.y){return false;}
if(b1.y>(b2.y+b2.height)){return false;}
return true;};gCP=function(el,_48,_49){try{var _4a=el.style[_48];if(!_4a){if((typeof el.ownerDocument!="undefined")&&(typeof el.ownerDocument.defaultView!="undefined")&&(typeof(el.ownerDocument.defaultView.getComputedStyle)=="function")){_4a=el.ownerDocument.defaultView.getComputedStyle(el,"").getPropertyValue(_48);}else{if(el.currentStyle){var m=_48.split(/-/);if(m.length>0){_48=m[0];for(var i=1;i<m.length;i++){_48+=m[i].charAt(0).toUpperCase()+m[i].substring(1);}}
_4a=el.currentStyle[_48];}else{if(el.style){_4a=el.style[_48];}}}}
_49=_49||"string";if(_49=="number"){if(/\./.test(_4a)){_4a=parseFloat(_4a);}else{_4a=parseInt(_4a);}
_4a=isNaN(_4a)?0:_4a;}else{if(_49=="boolean"){_4a=(_49&&(_49!="none")&&(_49!="auto"))?true:false;}else{if(_49=="string"){_4a=(!_4a||(_4a=="none")||(_4a=="auto"))?"":_4a;}}}
return _4a;}
catch(err){if(_48=="width"){_4a=el.width||0;}
if(_48=="height"){_4a=el.height||0;}
return _4a;}};var fgce=null;gLOW=function(el,_4e){var _4f=0;var _50=0;var tn=el.tagName.toUpperCase();if(!_4e){fgce=el;}
if(_Ai(["BODY","HTML"],tn)==-1&&fgce!==el){if(el.scrollLeft){_4f=el.scrollLeft;}
if(el.scrollTop){_50=el.scrollTop;}}
var r={x:!isNaN(el.offsetLeft)?(el.offsetLeft-_4f):el.offsetParent?el.offsetParent.offsetLeft?el.offsetParent.offsetLeft:0:0,y:!isNaN(el.offsetTop)?(el.offsetTop-_50):el.offsetParent?el.offsetParent.offsetTop?el.offsetParent.offsetTop:0:0};if(el.offsetParent&&tn!="BODY"){var tmp=gLOW(el.offsetParent,true);r.x+=isNaN(tmp.x)?0:tmp.x;r.y+=isNaN(tmp.y)?0:tmp.y;}
return r;};var rm;getLayout=function(el){var box={"x":0,"y":0,"width":0,"height":0};rm=((typeof el.ownerDocument!="undefined")&&(typeof el.ownerDocument.compatMode!="undefined")&&(el.ownerDocument.compatMode=="CSS1Compat"));if((typeof el.ownerDocument!="undefined")&&(typeof el.ownerDocument.getBoxObjectFor!="undefined")){var _56=el.ownerDocument.getBoxObjectFor(el);box.x=_56.x-el.parentNode.scrollLeft;box.y=_56.y-el.parentNode.scrollTop;box.width=_56.width;box.height=_56.height;box.scrollLeft=(rm?el.ownerDocument.documentElement:el.ownerDocument.body).scrollLeft;box.scrollTop=(rm?el.ownerDocument.documentElement:el.ownerDocument.body).scrollTop;box.x-=box.scrollLeft;box.y-=box.scrollTop;}else{if(typeof el.getBoundingClientRect!="undefined"){var _56=el.getBoundingClientRect();box.x=_56.left;box.y=_56.top;box.width=_56.right-_56.left;box.height=_56.bottom-_56.top;}else{var tmp=gLOW(el);box.x=parseInt(tmp.x)-parseInt(el.parentNode.scrollLeft);box.y=parseInt(tmp.y)-parseInt(el.parentNode.scrollTop);box.width=(typeof el.offsetWidth!="undefined")?el.offsetWidth:gCP(el,"width","number");box.height=(typeof el.offsetHeight!="undefined")?el.offsetHeight:gCP(el,"height","number");}}
return box;};aCN=function(obj,_59){var cls=getClasses(obj);if(typeof _59=="string"){_59=_59.split(",");}
_Ae(_59,function(_5b,i){if(_Ai(cls,_5b)==-1){_Ap(cls,_5b);}});cls=_St(cls.join(" "));if(_St(obj.className)!=cls){obj.className=cls;}};_rC=function(obj,_5e){var cls=getClasses(obj);var _60=[];if(typeof _5e=="string"){_5e=_5e.split(",");}
_Ae(cls,function(_61,i){if(_Ai(_5e,_61)==-1){_Ap(_60,_61);}});cls=_St(_60.join(" "));if(_St(obj.className)!=cls){obj.className=cls;}};function AA(){this.length=0;this.doubles=0;this.sRef={};this.nRef=[];this.runEach=true;}
AA.prototype.push=function(el,key){var num=this.length++;var key=key||("unnamed_el_"+num);this.doubles=0;while(this.sRef[key]){key+="_"+this.doubles++;}
var _rf={"index":num,"key":key,"content":el};this.sRef[key]=_rf;this.nRef[num]=_rf;};AA.prototype.get=function(_67){return(typeof _67=="number")?(typeof this.nRef[_67]!="undefined")?this.nRef[_67].content:null:(typeof _67=="string")?(typeof this.sRef[_67]!="undefined")?this.sRef[_67].content:null:null;};AA.prototype.isSet=function(_68){return(typeof _68=="number")?((typeof this.nRef[_68]!="undefined")&&(this.nRef[_68]!==null))?true:false:(typeof _68=="string")?((typeof this.sRef[_68]!="undefined")&&(this.nRef[_68]!==null))?true:false:false;};AA.prototype.set=function(el,_6a,_6b){var num=_6a;var key=_6b;if((typeof num=="undefined")||(num===null)){if(this.sRef[key]){num=this.sRef[key].index;}}
if((typeof key=="undefined")||(key===null)){if(this.nRef[num]){key=this.nRef[num].key;}}
var _6e=((typeof num=="number")&&(num>=0))?true:false;var _6f=((typeof key=="string")&&(key.length>0))?true:false;if(!_6e&&_6f){this.push(el,key);return;}
if(_6e&&!_6f){this.push(el,num);return;}
if(!_6e&&!_6f){this.push(el);return;}
var _rf={"index":num,"key":key,"content":el};this.sRef[key]=_rf;if((typeof this.nRef[num]=="undefined")||(this.nRef[num]===null)){this.length++;}
this.nRef[num]=_rf;};AA.prototype.gF=function(){return(typeof this.nRef[0]!="undefined")?this.nRef[0].content:null;};AA.prototype.gL=function(){return(typeof this.nRef[this.nRef.length-1]!="undefined")?this.nRef[this.nRef.length-1].content:null;};AA.prototype.getAssoc=function(_71){return(typeof _71=="number")?(typeof this.nRef[_71]!="undefined")?this.nRef[_71].key:null:(typeof _71=="string")?(typeof this.sRef[_71]!="undefined")?this.sRef[_71].index:null:null;};AA.prototype.each=function(_72){for(var i=0;i<this.length;i++){if(!this.runEach){this.runEach=true;break;}
var _rf=this.nRef[i];var _75=_rf.index;var _76=_rf.key;var _77=_rf.content;var _78=_72(_77,_75,_76);if(_78){return _78;}}};AA.prototype.reverseEach=function(_79){for(var i=this.length-1;i>=0;i--){if(!this.runEach){this.runEach=true;break;}
var _rf=this.nRef[i];var _7c=_rf.index;var _7d=_rf.key;var _7e=_rf.content;var _7f=_79(_7e,_7c,_7d);if(_7f){return _7f;}}};AA.prototype.Break=function(){this.runEach=false;};AA.prototype.getFirstDefined=function(){for(var i=0;i<this.nRef.length;i++){var _81=this.nRef[i];if((_81.content!="undefined")&&(_81.content!==null)){return _81.content;}}
return null;};AA.prototype.gH=function(){var _82={};for(var i=0;i<this.nRef.length;i++){_82[this.nRef[i].key]=this.nRef[i].content;}
return _82;};function _P(){this.run=true;this.counter=0;this.root=null;this.currentParent=null;this.nodeFilter=null;this.onStartCallback=null;this.onNodeCallback=null;this.onCompleteCallback=null;this.runs=0;this.small_memory_stack=true;}
_P.prototype.rR=function(_84){this.root=_84;};_P.prototype.registerNodeFilter=function(_85){this.nodeFilter=_85.toLowerCase();};_P.prototype.registerOnStartCallback=function(_86){this.onStartCallback=_86;};_P.prototype.registerOnNodeCallback=function(_87){this.onNodeCallback=_87;};_P.prototype.rOCC=function(_88){this.onCompleteCallback=_88;};_P.prototype.start=function(){this.run=true;if(typeof this.onStartCallback=="function"){this.onStartCallback();}
var _89=this.GFC(this.root);if(_89){this.PS(_89);}};_P.prototype.abort=function(){this.run=false;};function R(_8a){if(!this.small_memory_stack){this.PS(_8a);return;}
var _t=this;if(this.runs>10){this.runs=0;window.setTimeout(function(){_t.PS(_8a);},0);}else{this.runs++;this.PS(_8a);}}
_P.prototype.R=R;function GFC(_8c){var _8d=_8c.firstChild;if(_8d){var _8e=(_8d.nodeType==1);while(!_8e){_8d=_8d.nextSibling;if(!_8d){break;}
_8e=(_8d.nodeType==1);}
if(_8e){return _8d;}}
return null;}
_P.prototype.GFC=GFC;function GNS(_8f){var _90=_8f.nextSibling;if(_90){var _91=(_90.nodeType==1);while(!_91){_90=_90.nextSibling;if(!_90){break;}
_91=(_90.nodeType==1);}
if(_91){return _90;}}
return null;}
_P.prototype.GNS=GNS;function gp(_92){var _93=_92.parentNode;if(_93){return _93;}
return null;}
_P.prototype.gp=gp;function gsp(_94){var _95=this.gp(_94);if(_95){var _96=this.GNS(_95);if(_96){return _96;}}
return null;}
_P.prototype.gsp=gsp;function GNSP(_97){var _98=this.gsp(_97);while(!_98){_97=this.gp(_97);_98=this.gsp(_97);}
if(_98){return _98;}
return null;}
_P.prototype.GNSP=GNSP;function CHAF(_99){var _9a=_99.nodeName.toLowerCase();if(_9a!=this.nodeFilter){return false;}
return true;}
_P.prototype.CHAF=CHAF;function II(_9b){if(!this.CHAF(_9b)){return;}
var _9c=this.currentParent;if(this.onNodeCallback!==null){this.onNodeCallback(_9b,_9c,this.counter++);}}
_P.prototype.II=II;function RAP(_9d){this.currentParent=_9d;}
_P.prototype.RAP=RAP;function PS(_9e){if(!this.run){return null;}
if(_9e.nodeName&&(_9e.nodeName.toLowerCase()=="br")){if(typeof this.onCompleteCallback=="function"){this.onCompleteCallback();}
return;}
this.II(_9e);var _9f=this.GFC(_9e);if(_9f){this.RAP(_9e);this.R(_9f);return;}else{var _a0=this.GNS(_9e);if(_a0){this.R(_a0);return;}else{var _a1=this.GNSP(_9e);if(_a1){this.R(_a1);return;}}}}
_P.prototype.PS=PS;function mI(_id,_a3,_a4){this.owner=null;this.id=_id;this.element=_a3;this.parent_node=_a4;this.pi=null;this.children=new AA();this.isHeader=null;this.isParent=null;this.image=null;this.link=null;this.holder=null;this.gHo=null;this.selected=null;this.mouse_state="out";this.eS=false;this.visibleState=false;this.path=null;}
function CSSMenu(_a5){this.id=_a5;this.container=document.getElementById(this.id);if(!this.container){return;}
ALL.push(this,this.id);this.root=this.container.getElementsByTagName("ul")[0];this.first=this.root.getElementsByTagName("li")[0];if(!this.root){return;}
this.type=gMT(this.root);this.config={"sH":400,"hT":200,"eT":1000,"hP":"{name}_hover.{ext}","hCF":true,"hCP":"{name}_selected.{ext}","hOO":true,"pT":false,"eB":"accordion","aE":null,"sB":[0,0],"oX1":0,"oY1":0,"oX2":0,"oY2":0};this.classes={"hover":"hover","selected":"selected","arrow":"arrow","sss":"ktselected"};this.iTL=((this.type=="tab")||(this.type=="expandable"));this.aI=new AA();this.headers=new AA();this.visibles=new AA();this.expandedHeight=new AA();this.parser={};this.attachOffset=null;this.lM=null;var _a6=navigator.userAgent.match(/firefox.([\d\.]{3,8})/i);if(_a6){this.isSomeFirefox=true;var _a7=parseFloat(_a6[1]);if(_a7){this.ff_flag=true;this.ff_vers=_a7;}}
this.lastHighlightedPath=new AA();this.bfBox={};this.bfBox.Static={};this.bfBox.Absolute={};this.bfBox.Static.x1=is.ie?-2:is.mozilla?-1:is.opera?0:is.safari?-8:0;this.bfBox.Static.y1=is.ie?-2:is.mozilla?-1:is.opera?0:is.safari?-6:0;this.bfBox.Static.x2=is.ie?0:is.mozilla?0:is.opera?0:is.safari?-7:0;this.bfBox.Static.y2=is.ie?0:is.mozilla?0:is.opera?0:is.safari?-8:0;this.bfBox.Absolute.x1=is.ie?-2:is.mozilla?-1:is.opera?0:is.safari?0:0;this.bfBox.Absolute.y1=is.ie?-2:is.mozilla?-1:is.opera?0:is.safari?0:0;this.bfBox.Absolute.x2=is.ie?0:is.mozilla?0:is.opera?0:is.safari?0:0;this.bfBox.Absolute.y2=is.ie?0:is.mozilla?0:is.opera?0:is.safari?0:0;this.sg_Pos_Check_Flag=(is.ie&&is.version<5.5)?true:(is.ie&&is.version>=5.5)?false:(is.mozilla&&!is.safari)?false:(is.opera&&is.version<8.4)?true:(is.opera&&(is.version>8.4)&&(is.version<9))?false:(is.opera&&is.version>=9)?true:(is.safari)?true:true;this.abs_Pos_Flag=false;var _a8=this.container.parentNode;while(_a8&&!this.abs_Pos_Flag){var _a9=/absolute/i.test(gCP(_a8,"position","string"));if(_a9){this.abs_Pos_Flag=true;break;}
_a8=_a8.parentNode;if(!_a8){break;}}
if(this.abs_Pos_Flag){this.sg_Pos_Check_Flag=false;}
this.setTimeouts=function(_aa,_ab,_ac){this.config.sH=_aa;this.config.hT=_ab;this.config.eT=_ac;};this.setImageHoverPattern=function(_ad){this.config.hP=_ad||null;};this.setHighliteCurrent=function(_ae,_af){this.config.hCF=_ae?true:false;this.config.hCP=_ae?(_af||""):null;};this.setAnimation=function(_b0){var _b1=false;if(is.ie&&(is.version>=6)){_b1=true;}
if(is.mozilla){_b1=true;}
if(this.ff_flag&&(this.ff_vers<1.5)){_b1=false;}
if(!_b1){return;}
this.config.aE=_b0||null;};this.setSubMenuOffset=function(oX1,oY1,oX2,oY2){this.config.oX1=oX1;this.config.oY1=oY1;this.config.oX2=oX2;this.config.oY2=oY2;};this.setHideOverlayObjects=function(_b6){this.config.hOO=_b6?true:false;};this.setPersistentTab=function(_b7){this.config.pT=_b7?true:false;};this.setExpandableBehaviour=function(_b8){this.eB=(_b8=="multiple")?"multiple":"accordion";};this.show=function(){this.cRS();};}
function cRS(){var _b9=gEB(this.root);var _ba=_b9.width;if(!_ba){var _bb=this;window.setTimeout(function(){_bb.cRS();},1);return;}
this.beforeALL();var _t=this;this.parser=new _P();this.parser.registerNodeFilter("a");this.parser.rR(this.root);this.parser.registerOnNodeCallback(function(a,b,c){_t.cCR(a,b,c);});this.parser.rOCC(function(){_t.oTPC();});this.parser.start();}
CSSMenu.prototype.cRS=cRS;function cCR(_c0,_c1,_c2){var _c3=this.id+"_item_"+_c2;var _c4=_c0.parentNode;var _c5=(_c1&&_c1.parentNode&&_c1.parentNode.parentNode)?_c1.parentNode.parentNode:null;_c5=(_c5&&(_c5.nodeName.toLowerCase()=="li"))?_c5:null;_c4.id=_c3;aCN(_c4,(this.id+"_el"));var _c6=new mI(_c3,_c4,_c5);this.aI.push(_c6,_c3);_c6.owner=this;if(_c5){var _c7=_c5.id;if(_c7){_c6.pi=this.aI.get(_c7);_c6.pi.isParent=true;_c6.pi.children.push(_c6,_c3);_c6.pi.holder=_c4.parentNode;}}else{this.headers.push(_c6,_c3);_c6.isHeader=true;var img=_c4.getElementsByTagName("img")[0];if(img){aCN(img,(this.id+"_el"));}
_c6.image=img||null;}
var _c9=_c4.getElementsByTagName("a")[0];aCN(_c9,(this.id+"_el"));_c6.link=_c9;}
CSSMenu.prototype.cCR=cCR;function oTPC(){if(this.type=="tab"){this.config.eT*=2;}
this.MAIN();var _t=this;}
CSSMenu.prototype.oTPC=oTPC;function MAIN(){var _t=this;this.headers.each(function(_cc,_cd,id){var _li=_cc.element;var _a=_cc.link;var _d1=_cc.image;if(_d1){var _d2=_d1.getAttribute("width")||null;var _d3=_d1.getAttribute("height")||null;if(_d2&&_d3){_li.style.width=(_d2+"px");_li.style.height=(_d3+"px");_a.style.width=(_d2+"px");_a.style.height=(_d3+"px");}else{_li.style.width="auto";_a.style.width="auto";_a.style.height="auto";}
_rC(_li,"hasImg");_li.style.padding="0px";_li.style.margin="0px";_li.style.border="none";_li.style.backgroundImage="none";_li.style.backgroundColor="transparent";_d1.style.padding="0px";_d1.style.margin="0px";_d1.style.border="none";_a.style.padding="0px";_a.style.margin="0px";_a.style.border="none";aCN(_li,"imgFlag");}
_t.mIC(_cc);_cc.visibleState=true;if(_t.type=="expandable"){var _d4=(is.ie&&(is.version<=6));var _d5=(_cc.gHo)?_cc.holder:_t.mS(_cc);if(_d5){if(_d4){_d5.style.display="none";}}}});var _d6=this.headers.gF();aCN(_d6.element,"first");var _d7=this.headers.gL();aCN(_d7.element,"last");var _d8=this;window.setTimeout(function(){_d8.mHi();},10);}
CSSMenu.prototype.MAIN=MAIN;function mHo(mI,_da){if(mI.image){var el=mI.element;var _dc=mI.selected;var img=el.getElementsByTagName("img")[0];var src=img.src;if(this.config.hP){var _df=this.config.hP.match(/\}(\w+)/)[1];}
if(this.config.hCF&&this.config.hCP){var _e0=this.config.hCP.match(/\}(\w+)/)[1];}
switch(_da){case"in":if(_e0){src=src.replace(new RegExp(_e0,"g"),"");}
if(_df){src=src.replace(new RegExp(_df,"g"),"");src=src.replace(/([^\.]+)(\.\w+)$/,"$1"+_df+"$2");el.getElementsByTagName("img")[0].src=src;}
break;case"out":if(_df){src=src.replace(new RegExp(_df,"g"),(_dc?(_e0||""):""));el.getElementsByTagName("img")[0].src=src;}
break;}
return;}
var box=mI.element;var _e2=mI.link;switch(_da){case"in":aCN(box,"hover");aCN(_e2,"hover");break;case"out":_rC(box,"hover");_rC(_e2,"hover");break;}}
CSSMenu.prototype.mHo=mHo;function mouse_in(mI){var _t=this;this.lM=mI;switch(this.type){case"horizontal":var _e5=mI.isHeader?false:true;var _e6=true;break;case"vertical":var _e5=true;var _e6=true;break;case"tab":var _e7=mI.isHeader?false:true;var _e6=true;break;case"expandable":var _e7=true;var _e6=false;break;}
this.mHo(mI,"in");mI.mouse_state="in";this.lastHighlightedPath.each(function(_e8,_e9,id){if(!mI.path.get(id)){_t.mHo(_e8,"out");}});this.lastHighlightedPath=mI.path;mI.path.each(function(_eb,_ec,id){_t.mHo(_eb,"in");});var _ee=_t.id+"_HIDDING";if(window[_ee]){window.clearTimeout(window[_ee]);window[_ee]=null;}
var _ef=this.id+"_HOVER_OUT";if(window[_ef]){window.clearTimeout(window[_ef]);window[_ef]=null;}
var _f0=_t.id+"_SHOWING_SUB_TIMER";if(window[_f0]){window.clearTimeout(window[_f0]);window[_f0]=null;}
if(_e6){var _f1=this.id+"_HIDING_SUB_PANNEL";if(_e5){window[_f1]=setTimeout(function(){_t.hideAll(_t.lM);},_t.config.hT);}else{this.hideAll(mI);}}
if(_e7){return;}
var _f2=(mI.gHo)?mI.holder:this.mS(mI);if(_f2){if(_e5){var _f0=this.id+"_SHOWING_SUB_TIMER";window[_f0]=window.setTimeout(function(){_t.showSub(mI);},_t.config.sH);}else{this.showSub(mI);}}}
CSSMenu.prototype.mouse_in=mouse_in;function mouse_out(mI){var _t=this;switch(this.type){case"horizontal":var _f5=true;break;case"vertical":var _f5=true;break;case"tab":var _f5=true;var _f6=this.config.pT?true:false;break;case"expandable":var _f5=false;break;}
var _f7=this.id+"_SHOWING_SUB_TIMER";if(window[_f7]){window.clearTimeout(window[_f7]);}
var _f8=this.id+"_HOVER_OUT";window[_f8]=window.setTimeout(function(){_t.lastHighlightedPath.each(function(_f9,_fa,id){_t.mHo(_f9,"out");});},this.config.eT);if(_f6){return;}
if(_f5){var _fc=this.id+"_HIDDING";window[_fc]=window.setTimeout(function(){_t.hideAll();_t.hO(mI,true);},this.config.eT);}}
CSSMenu.prototype.mouse_out=mouse_out;function mouse_click(mI,_fe){var _t=this;switch(this.type){case"horizontal":break;case"vertical":break;case"tab":break;case"expandable":var _100=true;break;}
if(_100){this.cE(mI);if(mI.isHeader){if(this.config.eB=="accordion"){this.headers.each(function(_101,_102,id){if(id!=mI.id){if(_101.isParent){_101.eS=true;_t.cE(_101);}}});}}
this.lastRequestedAction=null;}
this.hideAll();this.mHi(mI,true);var _104=(is.ie&&(is.version<=6));if(_104){if(_fe!="a"){var link=mI.link;var _106=!_100||(_100&&!mI.isHeader)||(_100&&mI.isHeader&&!mI.isParent);if(_106){link.click();}}}}
CSSMenu.prototype.mouse_click=mouse_click;function computeExpandedHeight(mI,eS){this.expandedHeight.set((eS?mI.holderBox.height:0),null,mI.id);var _109=0;this.expandedHeight.each(function(_10a){_109+=_10a;});var _10b=this._height+_109;return _10b;}
CSSMenu.prototype.computeExpandedHeight=computeExpandedHeight;function cE(mI){var _10d=(is.ie&&(is.version<=6));var _10e=this;if(mI.isHeader){if(!mI.gHo){mI.holder=_10e.mS(mI);setBox(mI.holder,mI.holderBox,"width height");}
if(mI.holder){if(!mI.eS){if(!_10d){var _10f=gCP(mI.element,"width","number");_10f=Math.round(_10f)+"px";mI.element.style.minWidth=_10f;mI.element.style.width="";if(is.opera){var _110=_10e.computeExpandedHeight(mI,true);_10e.root.style.height=_110+"px";_10e.container.style.height=_110+"px";}}
_10e.showSub(mI);mI.eS=true;}else{if(!_10d){var _mw=_10e.expandableWidth||(_10e.expandableWidth=gCP(mI.element,"min-width","number"));if(_mw>0){mI.element.style.minWidth="0px";mI.element.style.width=_mw+"px";}
if(is.opera){var _110=_10e.computeExpandedHeight(mI,false);_10e.root.style.height=_110+"px";_10e.container.style.height=_110+"px";}}
mI.holder.style.marginTop="-5000px";if(_10d){mI.holder.style.display="none";}
mI.eS=false;}}}}
CSSMenu.prototype.cE=cE;function collapseAll(){if(this.type!="expandable"){return;}
var _t=this;this.headers.each(function(_113){if(_113.isParent){_113.eS=true;_t.cE(_113);}});this.config.eB="accordion";}
CSSMenu.prototype.collapseAll=collapseAll;function expandAll(){if(this.type!="expandable"){return;}
var _t=this;this.headers.each(function(_115){if(_115.isParent){_115.eS=false;_t.cE(_115);}});this.config.eB="multiple";}
CSSMenu.prototype.expandAll=expandAll;function mS(mI){var _t=this;mI.children.each(function(_118){_t.mIC(_118);});var _119=mI.children.gF();var _11a=mI.children.gL();if(_119){aCN(_119.element,"first");}
if(_11a){aCN(_11a.element,"last");}
var _11b=mI.holder;if(_11b){aCN(_11b,(this.id+"_el"));var _11c=(this.type!="tab")?"V":"H";mI.holderBox=gHB(_11b,mI.children.gH(),_11c);if(!is.ie||(is.ie&&(this.type=="tab"))){setBox(_11b,mI.holderBox,"width");if(this.type=="tab"){var _11d=function(){if((typeof _11b.clientHeight!="undefined")&&(_11b.clientHeight>mI.holderBox.height)){mI.holderBox.width+=1;setBox(_11b,mI.holderBox,"width");if(_11b.offsetHeight>mI.holderBox.height){window.setTimeout(_11d,0);}}};window.setTimeout(_11d,0);}}
if(typeof AN!="undefined"){if((this.type=="horizontal")||(this.type=="vertical")){if(this.config.aE){mI.animator=new AN(this.config.aE);if(mI.animator){mI.animator.attachTo(mI.holder);mI.animator.relateTo(mI.element);}}}}}
mI.gHo=true;return _11b;}
CSSMenu.prototype.mS=mS;function applySubOffs(mI){var _11f={"x":0,"y":0};var _120=(this.type=="horizontal")||(this.type=="tab");var _121=mI.isHeader;if(_120){if(_121){_11f.y+=this.attachOffset.borders.ROOT.BOTTOM;}else{_11f.x+=this.attachOffset.borders.HOLDER.LEFT;}}else{_11f.x+=this.attachOffset.borders.HOLDER.LEFT;if(_121){_11f.x+=this.attachOffset.borders.ROOT.RIGHT;}}
if(_121){_11f.x+=this.config.oX1;_11f.y+=this.config.oY1;}else{_11f.x+=this.config.oX2;_11f.y+=this.config.oY2;}
return _11f;}
CSSMenu.prototype.applySubOffs=applySubOffs;function showSub(mI){if(this.attachOffset===null){this.attachOffset={};this.attachOffset.borders={};this.attachOffset.borders.HOLDER={};this.attachOffset.borders.ROOT={};if(gCP(mI.holder,"border-left-style","boolean")){this.attachOffset.borders.HOLDER.LEFT=gCP(mI.holder,"border-left-width","number");}else{mI.holder.style.borderLeftWidth="0px";}
if(gCP(mI.holder,"border-top-style","boolean")){this.attachOffset.borders.HOLDER.TOP=gCP(mI.holder,"border-top-width","number");}else{mI.holder.style.borderTopWidth="0px";}
if(gCP(this.root,"border-right-style","boolean")){this.attachOffset.borders.ROOT.RIGHT=gCP(this.root,"border-right-width","number");}else{this.root.style.borderRightWidth="0px";}
if(gCP(this.root,"border-bottom-style","boolean")){this.attachOffset.borders.ROOT.BOTTOM=gCP(this.root,"border-bottom-width","number");}else{this.root.style.borderBottomWidth="0px";}}
switch(this.type){case"horizontal":case"vertical":case"tab":var _123=mI.corner||(mI.corner=getCorner(mI));var _124=mI.stack||(mI.stack=gS(mI));var _125=gEB(mI.element);var _126=getAtPoint(_125,_123,mI);mI.holder.style.zIndex=_124;mI.holder.style.visibility="hidden";_126=gBS(_126,this.applySubOffs(mI));var _127=mI.isHeader&&(is.safari||this.sg_Pos_Check_Flag);var _128=!mI.isHeader&&(is.safari);if(_127){_126.x+=this.abs_Pos_Flag?this.bfBox.Absolute.x1:this.bfBox.Static.x1;_126.y+=this.abs_Pos_Flag?this.bfBox.Absolute.y1:this.bfBox.Static.y1;}
if(_128){_126.x+=this.abs_Pos_Flag?this.bfBox.Absolute.x2:this.bfBox.Static.x2;_126.y+=this.abs_Pos_Flag?this.bfBox.Absolute.y2:this.bfBox.Static.y2;}
if(mI.isHeader){if(this.sg_Pos_Check_Flag){setBox(mI.holder,_126,"x y");}else{setBox(mI.holder,_126,"x y");setBox(mI.holder,dC(mI,_126),"x y");}}else{setBox(mI.holder,_126,"x y");setBox(mI.holder,dC(mI,_126),"x y");}
var ie50=(is.ie&&is.version<5.5);var op9=(is.opera&&is.version<=9);if(!ie50&&!is.safari&&!op9){var _12b=pIV(mI);if(_12b){setBox(mI.holder,_12b,"x y");setBox(mI.holder,dC(mI,_12b),"x y");}}
mI.visibleState=true;break;case"expandable":mI.holder.style.margin="0px";var _12c=this.isIe6Max||(this.isIe6Max=(is.ie&&(is.version<=6)));if(_12c){mI.holder.style.display="block";}
if(is.opera){mI.holder.style.marginTop="0px";if(!mI.expandedOnce){mI.children.each(function(item){item.element.style.position="static";});mI.expandedOnce=true;}}
break;}
this.hO(mI);if(mI.animator){mI.animator._start(true);}
mI.holder.style.visibility="visible";this.visibles.set(mI,null,mI.id);}
CSSMenu.prototype.showSub=showSub;function hideAll(_12e){var path=_12e?getPath(_12e):null;var _t=this;this.visibles.each(function(item,_132,id){if(item.visibleState){if(!path||(path&&!path.get(id))){_t.mHo(item,"out");item.mouse_state="out";if(_t.type!="expandable"){item.holder.style.visibility="hidden";if(item.animator){item.animator.state=-1;}
setBox(item.holder,{"x":-5000,"y":-5000},"x y");item.visibleState=false;}}}});}
CSSMenu.prototype.hideAll=hideAll;function mHi(_134,_135){if(!this.config.hCF){return;}
var _136=this;if(_134==null){var _137=this.aI.gF();var _138=_137.image?true:false;var _139=this.config.hCP?true:false;if(_138&&!_139){return;}
var _134;var _13a=window.location.href.toLowerCase();var _134=null;var _13b=null;var _13c=null;this.aI.reverseEach(function(item){var LI=item.element;if(new RegExp(_136.classes["sss"]).test(LI.className)){_13b=item;}
var A=item.link;var href=A.href.toLowerCase();if(!(/#$/.test(href))){if(href.indexOf(_13a)>=0){_13c=item;}}});_134=_13b?_13b:_13c;}
if(_134){if(this.selected!=null){var _141=getPath(this.selected);_141.each(function(item,_143,id){if(item.image){var el=item.element;var img=item.image;var src=img.src;if(item.mouse_state!="in"){if(_136.config.hCP){var _148=_136.config.hCP.match(/\}(\w+)/)[1];src=src.replace(new RegExp(_148,"g"),"");el.getElementsByTagName("img")[0].src=src;}}}else{var LI=item.element;var A=item.link;_rC(LI,_136.classes["selected"]);_rC(A,_136.classes["selected"]);}});}
this.selected=_134;var _141=getPath(_134);_141.each(function(item,_14c,id){item.selected=true;if(item.image){var el=item.element;var img=item.image;var src=img.src;if(item.mouse_state!="in"){if(_136.config.hP){var _151=_136.config.hP.match(/\}(\w+)/)[1];}
if(_151){src=src.replace(new RegExp(_151,"g"),"");}
if(_136.config.hCP){var _152=_136.config.hCP.match(/\}(\w+)/)[1];src=src.replace(new RegExp(_152,"g"),"");src=src.replace(/([^\.]+)(\.\w+)$/,"$1"+_152+"$2");el.getElementsByTagName("img")[0].src=src;}}}else{var LI=item.element;var A=item.link;aCN(LI,_136.classes["selected"]);aCN(A,_136.classes["selected"]);}
if(item.isHeader){if(_136.type=="expandable"){if(!_135){_136.cE(item);}}
if((_136.type=="tab")&&_136.config.pT){_136.mouse_in(item);}}});}}
CSSMenu.prototype.mHi=mHi;CSSMenu.prototype.iRW=function(){var _155;if(!this.dpt){return;}
if(((typeof this.dpt.offsetTop!="undefined")?this.dpt.offsetTop:gEB(current).y)>=this.currentY){this.root.style.width=(this._width+=1)+"px";var _t=this;if(!is.mac&&(is.ie||is.mozilla)){_t.iRW();}else{window.setTimeout(function(){_t.iRW();},0);}}else{this.root.style.overflow="visible";this.container.style.overflow="visible";}};function beforeALL(){this._width=0;this._height=0;this._margins=0;this.iR=[];this.cachedImageList=false;this.gotMargins=false;this.aIL=true;var last=null;var _158=0;var _t=this;var _15a=this.first;var _15b=/(hasImg)|(imgFlag)/.test(_15a.className);while(_15a){if((_15a.nodeType==1)&&(_15a.nodeName.toLowerCase()=="li")){last=_15a;if(!_15b){if((this.type=="horizontal")||(this.type=="tab")){if(!this.addedFirst){aCN(_15a,"first");this.addedFirst=true;this._width+=(typeof _15a.offsetWidth!="undefined")?_15a.offsetWidth:gEB(_15a).width;}else{this._width+=(_158=((typeof _15a.offsetWidth!="undefined")?_15a.offsetWidth:gEB(_15a).width));}}else{if(!is.safari&&!is.mozilla){this._width=Math.max(this._width,(typeof _15a.offsetWidth!="undefined")?_15a.offsetWidth:gEB(_15a).width);}}
if(!this.gotMargins){var mL=gCP(_15a,"margin-left","number");var mR=gCP(_15a,"margin-right","number");var mB=mL+mR;this._margins=mB;this.gotMargins=true;}
if((this.type=="horizontal")||(this.type=="tab")){this._width+=this._margins;if(!this._height){this._height+=(typeof _15a.offsetHeight!="undefined")?_15a.offsetHeight:gEB(_15a).height;}}else{if(!is.safari&&!is.mozilla){this._height+=(typeof _15a.offsetHeight!="undefined")?_15a.offsetHeight:gEB(_15a).height;}}}else{if(!this.cachedImageList){_Ap(this.iR,[_15a,false]);}}}
_15a=_15a.nextSibling;}
this.cachedImageList=true;if(!this.addedLast){aCN(last,"last");this.addedLast=true;if((this.type=="horizontal")||(this.type=="tab")){this._width-=_158;this._width+=this.widthOfLastClass||(this.widthOfLastClass=((typeof last.offsetWidth!="undefined")?last.offsetWidth:gEB(last).width));}}
if(_15b){this._width-=this.widthOfLastClass;this.widthOfLastClass=0;_Ae(this.iR,function(_15f,_160){var _161=_15f[1];var _162=_15f[0].getElementsByTagName("img")[0];if(_162.getAttribute("width")){_162.removeAttribute("width");}
if(_162.getAttribute("height")){_162.removeAttribute("height");}
if(!_161){if(_162.complete){_t.iR[_160][1]=true;var __w=_162.width;var __h=_162.height;if((_t.type=="horizontal")||(_t.type=="tab")){_t._width+=__w;}else{if(!is.safari&&!is.mozilla){_t._width=Math.max(_t._width,__w);}}
if((_t.type=="horizontal")||(_t.type=="tab")){if(!_t._height){_t._height=__h;}}else{if(!is.safari&&!is.mozilla){_t._height+=__h;}}
if(__w){_15f[0].style.width=__w+"px";_162.setAttribute("width",__w);}
if(__h){if(!(_t.type=="expandable"&&(is.mozilla||is.opera))){_15f[0].style.height=__h+"px";_162.setAttribute("height",__h);}else{_15f[0].getElementsByTagName("a")[0].style.height=__h+"px";}}}else{_t.aIL=false;}}});if(!this.aIL){window.setTimeout(function(){_t.beforeALL();},10);}}else{var _165=(is.ie&&!rm)?(this.root.offsetWidth-this.root.clientWidth):0;var _166=(is.ie&&!rm)?(this.root.offsetHeight-this.root.clientHeight):0;if(this._width){this._width+=_165;}
if(this._height){this._height+=_166;}}
if(this._width&&this.aIL){this.root.style.width=this._width+"px";this.container.style.width=this._width+"px";}
if(this._height&&this.aIL){_t.root.style.height=_t._height+"px";_t.container.style.height=_t._height+"px";}
if((this.type!="horizontal")&&(this.type!="tab")){return;}
if(!_15b||(_15b&&this.aIL)){var y=null;this.dpt=null;this.currentY=null;var _15a=this.first;while(_15a){if((_15a.nodeType==1)&&(_15a.nodeName.toLowerCase()=="li")){this.currentY=(typeof _15a.offsetTop!="undefined")?_15a.offsetTop:gEB(_15a).y;if(y===null){y=this.currentY;}
if(this.currentY!=y){this.dpt=_15a;}}
_15a=_15a.nextSibling;}
if(this.dpt){if(!is.mac&&is.mozilla){_t.iRW();}else{window.setTimeout(function(){_t.iRW();},0);}}}}
CSSMenu.prototype.beforeALL=beforeALL;function processEvent(e){if(typeof e.stopPropagation=="function"){e.stopPropagation();}
if(typeof e.cancelBubble!="undefined"){e.cancelBubble=true;}
var _169;switch(e.type){case"mouseover":_169="mouse_in";break;case"mouseout":_169="mouse_out";break;case"click":_169="mouse_click";var _16a=true;break;}
var _16b=e.currentTarget||e.srcElement;if(_16b&&_16b.nodeName){switch(_16b.nodeName.toLowerCase()){case"li":var _LI=_16b;break;case"a":var _LI=_16b.parentNode;break;case"img":var _LI=_16b.parentNode.parentNode;}
if(_LI){var mI=this.aI.get(_LI.id);}
if(_16a){var _16e=_16b.nodeName.toLowerCase();}}
if(!mI){return;}
var _16f=e.relatedTarget||e.toElement;if(!is.safari){if(this.lRI&&(this.lRI.link==_16f)){return;}}else{if(_169!="mouse_click"){if(this.lRI&&(this.lRI.link==_16f)){return;}}}
if(this.lRI&&(this.lRI.element==_16f)){return;}
this.lRI=mI;if(this.lRI&&(this.lRI===mI)&&this.lastRequestedAction&&(this.lastRequestedAction===_169)){return;}
if(this.safetyRequestDelay){return;}
this.lastRequestedAction=_169;if(e.type=="mouseout"){this.lRI=null;}
if(_16a){this[_169](mI,_16e);}else{this[_169](mI);}}
CSSMenu.prototype.processEvent=processEvent;function mIC(mI){if(!mI.path){mI.path=getPath(mI);}
this.dL(mI);var _171=this;_aE(mI.element,"mouseover",function(e){_171.processEvent(e);});_aE(mI.element,"mouseout",function(e){_171.processEvent(e);});_aE(mI.element,"click",function(e){_171.processEvent(e);});if(!mI.image){if(mI.isParent){if(!this.iTL||(this.iTL&&mI.isHeader)){aCN(mI.link,_171.classes["arrow"]);}}}
concealLink(mI.link);if(is.mozilla){mI.element.style.MozUserSelect="none";}else{if(is.ie){_aE(mI.element,"selectstart",function(e){e.returnValue=false;return false;});}}}
CSSMenu.prototype.mIC=mIC;function getPageBox(){var _176={"x":0,"y":0,"width":0,"height":0};if(typeof self.innerWidth!="undefined"){_176.width=self.innerWidth;}
if(!_176.width){if((typeof document.documentElement!="undefined")&&(typeof document.documentElement.clientWidth!="undefined")){_176.width=document.documentElement.clientWidth;}}
if(!_176.width){if(typeof document.body!="undefined"){_176.width=document.body.clientWidth;}}
if(typeof self.innerHeight!="undefined"){_176.height=self.innerHeight;}
if(!_176.height){if((typeof document.documentElement!="undefined")&&(typeof document.documentElement.clientHeight!="undefined")){_176.height=document.documentElement.clientHeight;}}
if(!_176.height){if(typeof document.body!="undefined"){_176.height=document.body.clientHeight;}}
return _176;}
function gBD(_177,_178){var _179={};for(var k in _177){if(!isNaN(parseInt(_178[k]))){_179[k]=_177[k]-_178[k];}}
return _179;}
function gBS(_17b,_17c){var _17d={};for(var k in _17b){if(typeof _17c[k]!="undefined"){}
_17d[k]=_17b[k]+_17c[k];}
return _17d;}
function gBm(_17f,_180){var _181={};for(var k in _17f){if(typeof _180[k]!="undefined"){}
_181[k]=Math.min(_17f[k],_180[k]);}
return _181;}
function gBM(_183,_184){var _185={};for(var k in _183){if(typeof _184[k]!="undefined"){}
_185[k]=Math.max(_183[k],_184[k]);}
return _185;}
function gEB(el){var _188=is.safari?true:false;var _189=gCP(el,"position","string");var _18a=gCP(el,"top","string");var _18b=gCP(el,"left","string");var _18c,boxAfter;switch(_189){case"":case"static":case"relative":case"absolute":case"fixed":_18c=getLayout(el);for(var k in _18c){_18c[k]=parseInt(_18c[k]);}
if(_188){return _18c;}
el.style.top="auto";el.style.left="auto";el.style.position="absolute";boxAfter=getLayout(el);for(var L in boxAfter){boxAfter[L]=parseInt(boxAfter[L]);}
el.style.position=_189;el.style.top=_18a;el.style.left=_18b;break;}
var _18f=gBD(_18c,boxAfter);var _190=gBS(boxAfter,_18f);return _190;}
function setBox(el,box,crt){if(!box){return;}
var _194={"x":["left",false],"y":["top",false],"z":["zIndex",false],"width":["width",false],"height":["height",false]};for(var k in _194){var _196=new RegExp("\\b"+k+"\\b|\\ball\\b","i");if(_196.test(crt)){_194[k][1]=true;}}
for(var L in _194){if(_194[L][1]){el.style[_194[L][0]]=box[L]+"px";}}}
function getBoxInc(boxA,boxB){var _19a={"horizontal":false,"vertical":false};var _19b=(boxB.x==boxA.x)?true:false;var _19c=(boxB.y==boxA.y)?true:false;var _19d=((boxB.x+boxB.width)==(boxA.x+boxA.width))?true:false;var _19e=((boxB.y+boxB.height)==(boxA.y+boxA.height))?true:false;var _19f=B_XstartsInside=((boxB.x>boxA.x)&&(boxB.x<boxA.x+boxA.width))?true:false;var _1a0=((boxB.y>boxA.y)&&(boxB.y<boxA.y+boxA.height))?true:false;var _1a1=(((boxB.x+boxB.width)>boxA.x)&&((boxB.x+boxB.width)<(boxA.x+boxA.width)))?true:false;var _1a2=(((boxB.y+boxB.height)>boxA.y)&&((boxB.y+boxB.height)<(boxA.y+boxA.height)))?true:false;if((_19f||_19b)&&(_1a1||_19d)){_19a.horizontal=true;}
if((_1a0||_19c)&&(_1a2||_19e)){_19a.vertical=true;}
return _19a;}
function getAtPoint(box,_1a4,mI){var _1a6=is.safari?true:false;var _1a7=mI.owner;var _1a8={"x":null,"y":null};switch(_1a4){case"TL":_1a8.x=box.x;_1a8.y=box.y;break;case"TR":_1a8.x=(box.x+box.width);_1a8.y=box.y;break;case"BR":_1a8.x=(box.x+box.width);_1a8.y=(box.y+box.height);break;case"BL":_1a8.x=box.x;_1a8.y=(box.y+box.height);break;case"FBL":var _1a9=_1a7.first;var _1aa=gEB(_1a9);_1a8.x=_1aa.x;_1a8.y=(_1aa.y+_1aa.height);}
if(_1a6){_1a8.x+=gCP(document.body,"margin-left","number");_1a8.y+=gCP(document.body,"margin-top","number");}
return _1a8;}
function getCorner(mI){var _1ac;var _1ad=mI.owner.type;var _1ae=mI.isHeader;if(_1ae){switch(_1ad){case"vertical":_1ac="TR";break;case"horizontal":case"expandable":_1ac="BL";break;case"tab":_1ac="FBL";break;}}else{_1ac="TR";}
return _1ac;}
function getPath(mI){var _1b0=new AA();var _1b1=mI.owner;var EL=mI;while(EL){if(typeof EL.nodeType!="undefined"){EL=_1b1.aI.get(EL.id);}
_1b0.push(EL,EL.id);EL=EL.parent_node;}
return _1b0;}
function gMT(root){var _1b4;var _1b5=root.parentNode.className;_1b4=_1b5.split(" ")[0];_1b4=_1b4.replace(/^kt/,"");_1b4=_1b4.toLowerCase();return _1b4;}
function dL(mI){var link=mI.link;var href=link.href;var _1b9=((this.type=="expandable")&&mI.isParent&&mI.isHeader);if(_1b9||(/#$/.test(href))){mI._href=href;link.removeAttribute("href");link.style.cursor="default";mI.element.style.cursor="default";}else{if(is.ie){link.style.cursor="hand";mI.element.style.cursor="hand";}else{link.style.cursor="pointer";mI.element.style.cursor="pointer";}}}
CSSMenu.prototype.dL=dL;function concealLink(el){if(is.mozilla){el.style.MozOutline="none";}
if(is.ie){el.hideFocus=true;}
el.style.outline="none";}
function pIV(mI){var _1bc=gEB(mI.holder);var _1bd=getPageBox();var _1be=mI.owner;_1bd.width+=_1be.config.sB[0];_1bd.height+=_1be.config.sB[1];var _1bf=getBoxInc(_1bd,_1bc);var _1c0=(_1bf.horizontal&&_1bf.vertical);if(_1c0){return null;}
var _1c1={"x":_1bc.x,"y":_1bc.y};var _1c2=(_1be.type!="tab")?"V":"H";var _1c3=mI.holderBox||(mI.holderBox=gHB(mI.holder,mI.children.gH(),_1c2));if(!_1bf.horizontal){_1bc.width=_1c3.width;var _1c4=_1bc.x+_1bc.width;var _1c5=_1bd.width;var _1c6=_1c4-_1c5;_1c1.x-=_1c6;_1c1.x=Math.max(0,_1c1.x);}
if(!_1bf.vertical){_1bc.height=_1c3.height;var _1c4=_1bc.y+_1bc.height;var _1c5=_1bd.height;var _1c6=_1c4-_1c5;_1c1.y-=_1c6;_1c1.y=Math.max(0,_1c1.y);}
return _1c1;}
function dC(mI,_1c8,_1c9){var _1ca=mI.holder;var _1cb=_1c9||_1ca.getElementsByTagName("li")[0];if(!_1cb){return;}
var _1cc=is.safari?gLOW(_1cb):gEB(_1cb);var _1cd=gBD(_1cc,_1c8);if(is.safari){mI.DELTA=_1cd;}
var _1ce=gBD(_1c8,_1cd);return _1ce;}
function gS(mI){var path=getPath(mI);response=path.length*100;return response;}
function gTE(_1d1){var _1d2=(typeof _1d1.relatedTarget!="undefined")?_1d1.relatedTarget:(typeof _1d1.toElement!="undefined")?_1d1.toElement:null;return _1d2;}
function getSubHold(el,_1d4){var _1d5=null;if(getSubs(el,_1d4)){for(var i=0;i<_1d4.length;i++){var _1d7=_1d4[i];if(_1d7[0]===el){_1d5=_1d7[2];break;}}}
return _1d5;}
function gHB(_1d8,_1d9,_1da){var box={"width":0,"height":0};if(is.safari){var _1dc={"T":null,"R":null,"B":null,"L":null};}
if(_1da=="H"){for(var k in _1d9){var LI=_1d9[k].element;var _1df=gEB(LI);if(is.safari){var _1e0=(_1dc.L!==null)?_1dc.L:(_1dc.L=gCP(LI,"margin-left-width","number"));var _1e1=(_1dc.R!==null)?_1dc.R:(_1dc.R=gCP(LI,"margin-right-width","number"));}
box.width+=_1df.width;box.height=Math.max(box.height,_1df.height);}}else{if(_1da=="V"){for(var k in _1d9){var LI=_1d9[k].element;var _1df=gEB(LI);if(is.safari){var _1e0=(_1dc.L!==null)?_1dc.L:(_1dc.L=gCP(LI,"border-left-width","number"));var _1e1=(_1dc.R!==null)?_1dc.R:(_1dc.R=gCP(LI,"border-right-width","number"));}
box.width=Math.max(box.width,_1df.width);box.height+=_1df.height;}}}
if(is.safari){box.width+=(_1e0+_1e1);}
return box;}
function gCE(_1e2){var el=(typeof _1e2.currentTarget!="undefined")?_1e2.currentTarget:(typeof _1e2.srcElement!="undefined")?_1e2.srcElement:null;return el||null;}
function hO(mI,_1e5){var _t=this;if(!mI){return;}
if(!this.config.hOO){return;}
if(!_1e5){var _1e7=getPath(mI);var _1e8=new AA();_1e7.each(function(_1e9,_1ea,id){var _1ec=_1e9.holder;var _1ed=getLayout(_1ec);var _1ee=new AA();_1ee.push(parseInt(_1ed.y),"top");_1ee.push(parseInt(_1ed.x),"left");_1ee.push(parseInt(_1ed.y+_1ed.height),"bottom");_1ee.push(parseInt(_1ed.x+_1ed.width),"right");_1e8.push(_1ee,id);});var _1ef=function(_1f0){var _1f1={"pc":{"ie":{"50100":["OPAQUE","TRANSPARENT"],"55000":["OPAQUE","TRANSPARENT"],"60000":["OPAQUE","TRANSPARENT"],"70000":["OPAQUE","TRANSPARENT"],"W3C_compliant":true},"firefox":{"10000":["OPAQUE","TRANSPARENT"],"15000":["OPAQUE"],"W3C_compliant":false},"opera":{"85000":["OPAQUE","TRANSPARENT"],"90000":["OPAQUE","TRANSPARENT"],"W3C_compliant":true},"netscape":{"17000":["OPAQUE"],"W3C_compliant":false}},"mac":{"safari":{"13200":["OPAQUE","TRANSPARENT"],"14000":["OPAQUE","TRANSPARENT"],"W3C_compliant":true},"mozilla":{"17000":["OPAQUE","TRANSPARENT"],"W3C_compliant":false},"firefox":{"15000":["OPAQUE","TRANSPARENT"],"W3C_compliant":true}}};if(!_1f0){return _1f1;}
var _1f2="none";var _1f3=_t.allObjectParams||(_t.allObjectParams=document.getElementsByTagName("param"));if(_1f0.nodeName.toLowerCase()=="object"){for(var i=0;i<_1f3.length;i++){if(_1f3[i].parentNode.id==_1f0.id){var _1f5=_1f3[i];if(_1f5.getAttribute("name")&&_1f5.getAttribute("name").toLowerCase()=="wmode"){var _1f6=_1f5;if(_1f6.getAttribute("value")){var _1f2=_1f6.getAttribute("value").toLowerCase();}}}}}else{if(_1f0.nodeName.toLowerCase()=="embed"){_1f2=_1f0.getAttribute("wmode")||_1f2;}}
var _1f7=_t._platform||(_t._platform=(is.mac?"mac":"pc"));var _1f8=_t._browser||(_t._browser=(_t.isSomeFirefox?"firefox":(navigator.userAgent.match(/netscape.([\d\.]{3,8})/i))?"netscape":function(){for(var _1f9 in _1f1[_1f7]){if(is[_1f9]){return _1f9;}}}()));var _1fa=_t._version||(_t._version=(function(){var _1fb="0";var _1fc=(_t.ff_vers||is.version).toString().replace(/\./g,"");while(_1fc.length<5){_1fc+="0";}
var _1fd=parseInt(_1fc.substr(0,5));for(var _1fe in _1f1[_1f7][_1f8]){var rV=parseInt(_1fe);if(rV<=_1fd){_1fb=rV;}}
return _1fb.toString();}()));var _200=_1f1[_1f7][_1f8][_1fa];var _201=new RegExp(_1f2,"i").test(_200);return _201;};var _202=function(){var _203=(!is.ie)?false:(is.version<7)?true:false;return _203;};var _204=function(){var _205=(is.ie||(is.mozilla&&!is.safari))?true:false;return _205;};var _206=new AA();_206.push(_1ef,"object");_206.push(_1ef,"embed");_206.push(_202,"select");_206.push(_204,"iframe");_206.each(function(_207,_208,_209){var _20a=document.getElementsByTagName(_209);var VETO=_207;for(var i=0;i<_20a.length;i++){var EL=_20a[i];if(_t._browser=="opera"){if(/embed/i.test(EL.nodeName)){if(/object/i.test(EL.parentNode.nodeName)){var _20e=_1ef();var w3c=_20e[_t._platform][_t._browser]["W3C_compliant"];if(w3c){continue;}}}}
var _210=getLayout(EL);var _211=new AA();_211.push(parseInt(_210.y),"top");_211.push(parseInt(_210.x+_210.width),"right");_211.push(parseInt(_210.y+_210.height),"bottom");_211.push(parseInt(_210.x),"left");var _212=function(){var _213=false;_1e8.each(function(_214){var t=Math.max(_214.get("top"),_211.get("top"));var r=Math.min(_214.get("right"),_211.get("right"));var b=Math.min(_214.get("bottom"),_211.get("bottom"));var l=Math.max(_214.get("left"),_211.get("left"));if(b>=t&&r>=l){_213=true;}else{_213=false;}});return _213;}();if(_212){var _219=VETO(EL);if(!_219){EL.style.visibility="hidden";}}else{EL.style.visibility="";}}});}else{var _206=new Array("object","embed","select","iframe");_Ae(_206,function(EL){var _21b=document.getElementsByTagName(EL);_Ae(_21b,function(_21c){_21c.style.visibility="";});});}}
CSSMenu.prototype.hO=hO;var ALL=new AA();function gMI(id){return ALL.get(id);}
function Expandable_hideAll(_21e){var _mnu=gMI(_21e);_mnu.collapseAll();}
function Expandable_showAll(_220){var _mnu=gMI(_220);_mnu.expandAll();}