/*!
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(a,b){return new jQuery.fn.init(a,b)},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(a,b){a=a||document;if(a.nodeType){this[0]=a;this.length=1;this.context=a;return this}if(typeof a==="string"){var c=quickExpr.exec(a);if(c&&(c[1]||!b)){if(c[1])a=jQuery.clean([c[1]],b);else{var d=document.getElementById(c[3]);if(d&&d.id!=c[3])return jQuery().find(a);var e=jQuery(d||[]);e.context=document;e.selector=a;return e}}else return jQuery(b).find(a)}else if(jQuery.isFunction(a))return jQuery(document).ready(a);if(a.selector&&a.context){this.selector=a.selector;this.context=a.context}return this.setArray(jQuery.isArray(a)?a:jQuery.makeArray(a))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(a){return a===undefined?Array.prototype.slice.call(this):this[a]},pushStack:function(a,b,c){var d=jQuery(a);d.prevObject=this;d.context=this.context;if(b==="find")d.selector=this.selector+(this.selector?" ":"")+c;else if(b)d.selector=this.selector+"."+b+"("+c+")";return d},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this},each:function(a,b){return jQuery.each(this,a,b)},index:function(a){return jQuery.inArray(a&&a.jquery?a[0]:a,this)},attr:function(a,b,c){var d=a;if(typeof a==="string")if(b===undefined)return this[0]&&jQuery[c||"attr"](this[0],a);else{d={};d[a]=b}return this.each(function(i){for(a in d)jQuery.attr(c?this.style:this,a,jQuery.prop(this,d[a],c,i,a))})},css:function(a,b){if((a=='width'||a=='height')&&parseFloat(b)<0)b=undefined;return this.attr(a,b,"curCSS")},text:function(a){if(typeof a!=="object"&&a!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(a));var b="";jQuery.each(a||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)b+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])})});return b},wrapAll:function(b){if(this[0]){var c=jQuery(b,this[0].ownerDocument).clone();if(this[0].parentNode)c.insertBefore(this[0]);c.map(function(){var a=this;while(a.firstChild)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(function(){jQuery(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){jQuery(this).wrapAll(a)})},append:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1)this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1)this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},push:[].push,sort:[].sort,splice:[].splice,find:function(b){if(this.length===1){var c=this.pushStack([],"find",b);c.length=0;jQuery.find(b,this[0],c);return c}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(a){return jQuery.find(b,a)})),"find",b)}},clone:function(d){var e=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var a=this.outerHTML;if(!a){var b=this.ownerDocument.createElement("div");b.appendChild(this.cloneNode(true));a=b.innerHTML}return jQuery.clean([a.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else return this.cloneNode(true)});if(d===true){var f=this.find("*").andSelf(),i=0;e.find("*").andSelf().each(function(){if(this.nodeName!==f[i].nodeName)return;var a=jQuery.data(f[i],"events");for(var b in a){for(var c in a[b]){jQuery.event.add(this,b,a[b][c],a[b][c].data)}}i++})}return e},filter:function(b){return this.pushStack(jQuery.isFunction(b)&&jQuery.grep(this,function(a,i){return b.call(a,i)})||jQuery.multiFilter(b,jQuery.grep(this,function(a){return a.nodeType===1})),"filter",b)},closest:function(b){var c=jQuery.expr.match.POS.test(b)?jQuery(b):null,closer=0;return this.map(function(){var a=this;while(a&&a.ownerDocument){if(c?c.index(a)>-1:jQuery(a).is(b)){jQuery.data(a,"closest",closer);return a}a=a.parentNode;closer++}})},not:function(a){if(typeof a==="string")if(isSimple.test(a))return this.pushStack(jQuery.multiFilter(a,this,true),"not",a);else a=jQuery.multiFilter(a,this);var b=a.length&&a[a.length-1]!==undefined&&!a.nodeType;return this.filter(function(){return b?jQuery.inArray(this,a)<0:this!=a})},add:function(a){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof a==="string"?jQuery(a):jQuery.makeArray(a))))},is:function(a){return!!a&&jQuery.multiFilter(a,this).length>0},hasClass:function(a){return!!a&&this.is("."+a)},val:function(b){if(b===undefined){var c=this[0];if(c){if(jQuery.nodeName(c,'option'))return(c.attributes.value||{}).specified?c.value:c.text;if(jQuery.nodeName(c,"select")){var d=c.selectedIndex,values=[],options=c.options,one=c.type=="select-one";if(d<0)return null;for(var i=one?d:0,max=one?d+1:options.length;i<max;i++){var e=options[i];if(e.selected){b=jQuery(e).val();if(one)return b;values.push(b)}}return values}return(c.value||"").replace(/\r/g,"")}return undefined}if(typeof b==="number")b+='';return this.each(function(){if(this.nodeType!=1)return;if(jQuery.isArray(b)&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,b)>=0||jQuery.inArray(this.name,b)>=0);else if(jQuery.nodeName(this,"select")){var a=jQuery.makeArray(b);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,a)>=0||jQuery.inArray(this.text,a)>=0)});if(!a.length)this.selectedIndex=-1}else this.value=b})},html:function(a){return a===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(a)},replaceWith:function(a){return this.after(a).remove()},eq:function(i){return this.slice(i,+i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(b){return this.pushStack(jQuery.map(this,function(a,i){return b.call(a,i,a)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(c,d,e){if(this[0]){var f=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(c,(this[0].ownerDocument||this[0]),f),first=f.firstChild;if(first)for(var i=0,l=this.length;i<l;i++)e.call(root(this[i],first),this.length>1||i>0?f.cloneNode(true):f);if(scripts)jQuery.each(scripts,evalScript)}return this;function root(a,b){return d&&jQuery.nodeName(a,"table")&&jQuery.nodeName(b,"tr")?(a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody"))):a}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,a){if(a.src)jQuery.ajax({url:a.src,async:false,dataType:"script"});else jQuery.globalEval(a.text||a.textContent||a.innerHTML||"");if(a.parentNode)a.parentNode.removeChild(a)}function now(){return+new Date}jQuery.extend=jQuery.fn.extend=function(){var a=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof a==="boolean"){deep=a;a=arguments[1]||{};i=2}if(typeof a!=="object"&&!jQuery.isFunction(a))a={};if(length==i){a=this;--i}for(;i<length;i++)if((options=arguments[i])!=null)for(var b in options){var c=a[b],copy=options[b];if(a===copy)continue;if(deep&&copy&&typeof copy==="object"&&!copy.nodeType)a[b]=jQuery.extend(deep,c||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)a[b]=copy}return a};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(a){window.$=_$;if(a)window.jQuery=_jQuery;return jQuery},isFunction:function(a){return toString.call(a)==="[object Function]"},isArray:function(a){return toString.call(a)==="[object Array]"},isXMLDoc:function(a){return a.nodeType===9&&a.documentElement.nodeName!=="HTML"||!!a.ownerDocument&&jQuery.isXMLDoc(a.ownerDocument)},globalEval:function(a){if(a&&/\S/.test(a)){var b=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval)script.appendChild(document.createTextNode(a));else script.text=a;b.insertBefore(script,b.firstChild);b.removeChild(script)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()==b.toUpperCase()},each:function(a,b,c){var d,i=0,length=a.length;if(c){if(length===undefined){for(d in a)if(b.apply(a[d],c)===false)break}else for(;i<length;)if(b.apply(a[i++],c)===false)break}else{if(length===undefined){for(d in a)if(b.call(a[d],d,a[d])===false)break}else for(var e=a[0];i<length&&b.call(e,i,e)!==false;e=a[++i]){}}return a},prop:function(a,b,c,i,d){if(jQuery.isFunction(b))b=b.call(a,i);return typeof b==="number"&&c=="curCSS"&&!exclude.test(d)?b+"px":b},className:{add:function(b,c){jQuery.each((c||"").split(/\s+/),function(i,a){if(b.nodeType==1&&!jQuery.className.has(b.className,a))b.className+=(b.className?" ":"")+a})},remove:function(b,c){if(b.nodeType==1)b.className=c!==undefined?jQuery.grep(b.className.split(/\s+/),function(a){return!jQuery.className.has(c,a)}).join(" "):""},has:function(a,b){return a&&jQuery.inArray(b,(a.className||a).toString().split(/\s+/))>-1}},swap:function(a,b,c){var d={};for(var e in b){d[e]=a.style[e];a.style[e]=b[e]}c.call(a);for(var e in b)a.style[e]=d[e]},css:function(a,b,c,d){if(b=="width"||b=="height"){var e,props={position:"absolute",visibility:"hidden",display:"block"},which=b=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){e=b=="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return;jQuery.each(which,function(){if(!d)e-=parseFloat(jQuery.curCSS(a,"padding"+this,true))||0;if(d==="margin")e+=parseFloat(jQuery.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(jQuery.curCSS(a,"border"+this+"Width",true))||0})}if(a.offsetWidth!==0)getWH();else jQuery.swap(a,props,getWH);return Math.max(0,Math.round(e))}return jQuery.curCSS(a,b,c)},curCSS:function(c,d,e){var f,style=c.style;if(d=="opacity"&&!jQuery.support.opacity){f=jQuery.attr(style,"opacity");return f==""?"1":f}if(d.match(/float/i))d=styleFloat;if(!e&&style&&style[d])f=style[d];else if(defaultView.getComputedStyle){if(d.match(/float/i))d="float";d=d.replace(/([A-Z])/g,"-$1").toLowerCase();var g=defaultView.getComputedStyle(c,null);if(g)f=g.getPropertyValue(d);if(d=="opacity"&&f=="")f="1"}else if(c.currentStyle){var h=d.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()});f=c.currentStyle[d]||c.currentStyle[h];if(!/^\d+(px)?$/i.test(f)&&/^\d/.test(f)){var i=style.left,rsLeft=c.runtimeStyle.left;c.runtimeStyle.left=c.currentStyle.left;style.left=f||0;f=style.pixelLeft+"px";style.left=i;c.runtimeStyle.left=rsLeft}}return f},clean:function(h,k,l){k=k||document;if(typeof k.createElement==="undefined")k=k.ownerDocument||k[0]&&k[0].ownerDocument||document;if(!l&&h.length===1&&typeof h[0]==="string"){var m=/^<(\w+)\s*\/?>$/.exec(h[0]);if(m)return[k.createElement(m[1])]}var n=[],scripts=[],div=k.createElement("div");jQuery.each(h,function(i,d){if(typeof d==="number")d+='';if(!d)return;if(typeof d==="string"){d=d.replace(/(<(\w+)[^>]*?)\/>/g,function(a,b,c){return c.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?a:b+"></"+c+">"});var e=d.replace(/^\s+/,"").substring(0,10).toLowerCase();var f=!e.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!e.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||e.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!e.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!e.indexOf("<td")||!e.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!e.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=f[1]+d+f[2];while(f[0]--)div=div.lastChild;if(!jQuery.support.tbody){var g=/<tbody/i.test(d),tbody=!e.indexOf("<table")&&!g?div.firstChild&&div.firstChild.childNodes:f[1]=="<table>"&&!g?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j])}if(!jQuery.support.leadingWhitespace&&/^\s/.test(d))div.insertBefore(k.createTextNode(d.match(/^\s*/)[0]),div.firstChild);d=jQuery.makeArray(div.childNodes)}if(d.nodeType)n.push(d);else n=jQuery.merge(n,d)});if(l){for(var i=0;n[i];i++){if(jQuery.nodeName(n[i],"script")&&(!n[i].type||n[i].type.toLowerCase()==="text/javascript")){scripts.push(n[i].parentNode?n[i].parentNode.removeChild(n[i]):n[i])}else{if(n[i].nodeType===1)n.splice.apply(n,[i+1,0].concat(jQuery.makeArray(n[i].getElementsByTagName("script"))));l.appendChild(n[i])}}return scripts}return n},attr:function(c,d,e){if(!c||c.nodeType==3||c.nodeType==8)return undefined;var f=!jQuery.isXMLDoc(c),set=e!==undefined;d=f&&jQuery.props[d]||d;if(c.tagName){var g=/href|src|style/.test(d);if(d=="selected"&&c.parentNode)c.parentNode.selectedIndex;if(d in c&&f&&!g){if(set){if(d=="type"&&jQuery.nodeName(c,"input")&&c.parentNode)throw"type property can't be changed";c[d]=e}if(jQuery.nodeName(c,"form")&&c.getAttributeNode(d))return c.getAttributeNode(d).nodeValue;if(d=="tabIndex"){var h=c.getAttributeNode("tabIndex");return h&&h.specified?h.value:c.nodeName.match(/(button|input|object|select|textarea)/i)?0:c.nodeName.match(/^(a|area)$/i)&&c.href?0:undefined}return c[d]}if(!jQuery.support.style&&f&&d=="style")return jQuery.attr(c.style,"cssText",e);if(set)c.setAttribute(d,""+e);var i=!jQuery.support.hrefNormalized&&f&&g?c.getAttribute(d,2):c.getAttribute(d);return i===null?undefined:i}if(!jQuery.support.opacity&&d=="opacity"){if(set){c.zoom=1;c.filter=(c.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(e)+''=="NaN"?"":"alpha(opacity="+e*100+")")}return c.filter&&c.filter.indexOf("opacity=")>=0?(parseFloat(c.filter.match(/opacity=([^)]*)/)[1])/100)+'':""}d=d.replace(/-([a-z])/ig,function(a,b){return b.toUpperCase()});if(set)c[d]=e;return c[d]},trim:function(a){return(a||"").replace(/^\s+|\s+$/g,"")},makeArray:function(a){var b=[];if(a!=null){var i=a.length;if(i==null||typeof a==="string"||jQuery.isFunction(a)||a.setInterval)b[0]=a;else while(i)b[--i]=a[i]}return b},inArray:function(a,b){for(var i=0,length=b.length;i<length;i++)if(b[i]===a)return i;return-1},merge:function(a,b){var i=0,elem,pos=a.length;if(!jQuery.support.getAll){while((elem=b[i++])!=null)if(elem.nodeType!=8)a[pos++]=elem}else while((elem=b[i++])!=null)a[pos++]=elem;return a},unique:function(a){var b=[],done={};try{for(var i=0,length=a.length;i<length;i++){var c=jQuery.data(a[i]);if(!done[c]){done[c]=true;b.push(a[i])}}}catch(e){b=a}return b},grep:function(a,b,c){var d=[];for(var i=0,length=a.length;i<length;i++)if(!c!=!b(a[i],i))d.push(a[i]);return d},map:function(a,b){var c=[];for(var i=0,length=a.length;i<length;i++){var d=b(a[i],i);if(d!=null)c[c.length]=d}return c.concat.apply([],c)}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,'0'])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(a){return a.parentNode},parents:function(a){return jQuery.dir(a,"parentNode")},next:function(a){return jQuery.nth(a,2,"nextSibling")},prev:function(a){return jQuery.nth(a,2,"previousSibling")},nextAll:function(a){return jQuery.dir(a,"nextSibling")},prevAll:function(a){return jQuery.dir(a,"previousSibling")},siblings:function(a){return jQuery.sibling(a.parentNode.firstChild,a)},children:function(a){return jQuery.sibling(a.firstChild)},contents:function(a){return jQuery.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)}},function(c,d){jQuery.fn[c]=function(a){var b=jQuery.map(this,d);if(a&&typeof a=="string")b=jQuery.multiFilter(a,b);return this.pushStack(jQuery.unique(b),c,a)}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(d,e){jQuery.fn[d]=function(a){var b=[],insert=jQuery(a);for(var i=0,l=insert.length;i<l;i++){var c=(i>0?this.clone(true):this).get();jQuery.fn[e].apply(jQuery(insert[i]),c);b=b.concat(c)}return this.pushStack(b,d,a)}});jQuery.each({removeAttr:function(a){jQuery.attr(this,a,"");if(this.nodeType==1)this.removeAttribute(a)},addClass:function(a){jQuery.className.add(this,a)},removeClass:function(a){jQuery.className.remove(this,a)},toggleClass:function(a,b){if(typeof b!=="boolean")b=!jQuery.className.has(this,a);jQuery.className[b?"add":"remove"](this,a)},remove:function(a){if(!a||jQuery.filter(a,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode)this.parentNode.removeChild(this)}},empty:function(){jQuery(this).children().remove();while(this.firstChild)this.removeChild(this.firstChild)}},function(a,b){jQuery.fn[a]=function(){return this.each(b,arguments)}});function num(a,b){return a[0]&&parseInt(jQuery.curCSS(a[0],b,true),10)||0}var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(a,b,c){a=a==window?windowData:a;var d=a[expando];if(!d)d=a[expando]=++uuid;if(b&&!jQuery.cache[d])jQuery.cache[d]={};if(c!==undefined)jQuery.cache[d][b]=c;return b?jQuery.cache[d][b]:d},removeData:function(a,b){a=a==window?windowData:a;var c=a[expando];if(b){if(jQuery.cache[c]){delete jQuery.cache[c][b];b="";for(b in jQuery.cache[c])break;if(!b)jQuery.removeData(a)}}else{try{delete a[expando]}catch(e){if(a.removeAttribute)a.removeAttribute(expando)}delete jQuery.cache[c]}},queue:function(a,b,c){if(a){b=(b||"fx")+"queue";var q=jQuery.data(a,b);if(!q||jQuery.isArray(c))q=jQuery.data(a,b,jQuery.makeArray(c));else if(c)q.push(c)}return q},dequeue:function(a,b){var c=jQuery.queue(a,b),fn=c.shift();if(!b||b==="fx")fn=c[0];if(fn!==undefined)fn.call(a)}});jQuery.fn.extend({data:function(a,b){var c=a.split(".");c[1]=c[1]?"."+c[1]:"";if(b===undefined){var d=this.triggerHandler("getData"+c[1]+"!",[c[0]]);if(d===undefined&&this.length)d=jQuery.data(this[0],a);return d===undefined&&c[1]?this.data(c[0]):d}else return this.trigger("setData"+c[1]+"!",[c[0],b]).each(function(){jQuery.data(this,a,b)})},removeData:function(a){return this.each(function(){jQuery.removeData(this,a)})},queue:function(b,c){if(typeof b!=="string"){c=b;b="fx"}if(c===undefined)return jQuery.queue(this[0],b);return this.each(function(){var a=jQuery.queue(this,b,c);if(b=="fx"&&a.length==1)a[0].call(this)})},dequeue:function(a){return this.each(function(){jQuery.dequeue(this,a)})}});(function(){var k=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var o=function(a,b,c,d){c=c||[];b=b||document;if(b.nodeType!==1&&b.nodeType!==9)return[];if(!a||typeof a!=="string"){return c}var e=[],m,set,checkSet,check,mode,extra,prune=true;k.lastIndex=0;while((m=k.exec(a))!==null){e.push(m[1]);if(m[2]){extra=RegExp.rightContext;break}}if(e.length>1&&q.exec(a)){if(e.length===2&&p.relative[e[0]]){set=x(e[0]+e[1],b)}else{set=p.relative[e[0]]?[b]:o(e.shift(),b);while(e.length){a=e.shift();if(p.relative[a])a+=e.shift();set=x(a,set)}}}else{var f=d?{expr:e.pop(),set:t(d)}:o.find(e.pop(),e.length===1&&b.parentNode?b.parentNode:b,w(b));set=o.filter(f.expr,f.set);if(e.length>0){checkSet=t(set)}else{prune=false}while(e.length){var g=e.pop(),pop=g;if(!p.relative[g]){g=""}else{pop=e.pop()}if(pop==null){pop=b}p.relative[g](checkSet,pop,w(b))}}if(!checkSet){checkSet=set}if(!checkSet){throw"Syntax error, unrecognized expression: "+(g||a);}if(toString.call(checkSet)==="[object Array]"){if(!prune){c.push.apply(c,checkSet)}else if(b.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&v(b,checkSet[i]))){c.push(set[i])}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){c.push(set[i])}}}}else{t(checkSet,c)}if(extra){o(extra,b,c,d);if(u){hasDuplicate=false;c.sort(u);if(hasDuplicate){for(var i=1;i<c.length;i++){if(c[i]===c[i-1]){c.splice(i--,1)}}}}}return c};o.matches=function(a,b){return o(a,null,null,b)};o.find=function(a,b,c){var d,match;if(!a){return[]}for(var i=0,l=p.order.length;i<l;i++){var e=p.order[i],match;if((match=p.match[e].exec(a))){var f=RegExp.leftContext;if(f.substr(f.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");d=p.find[e](match,b,c);if(d!=null){a=a.replace(p.match[e],"");break}}}}if(!d){d=b.getElementsByTagName("*")}return{set:d,expr:a}};o.filter=function(a,b,c,d){var e=a,result=[],curLoop=b,match,anyFound,isXMLFilter=b&&b[0]&&w(b[0]);while(a&&b.length){for(var f in p.filter){if((match=p.match[f].exec(a))!=null){var g=p.filter[f],found,item;anyFound=false;if(curLoop==result){result=[]}if(p.preFilter[f]){match=p.preFilter[f](match,curLoop,c,result,d,isXMLFilter);if(!match){anyFound=found=true}else if(match===true){continue}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=g(item,match,i,curLoop);var h=d^!!found;if(c&&found!=null){if(h){anyFound=true}else{curLoop[i]=false}}else if(h){result.push(item);anyFound=true}}}}if(found!==undefined){if(!c){curLoop=result}a=a.replace(p.match[f],"");if(!anyFound){return[]}break}}}if(a==e){if(anyFound==null){throw"Syntax error, unrecognized expression: "+a;}else{break}}e=a}return curLoop};var p=o.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")}},relative:{"+":function(a,b,c){var d=typeof b==="string",isTag=d&&!/\W/.test(b),isPartStrNotTag=d&&!isTag;if(isTag&&!c){b=b.toUpperCase()}for(var i=0,l=a.length,elem;i<l;i++){if((elem=a[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}a[i]=isPartStrNotTag||elem&&elem.nodeName===b?elem||false:elem===b}}if(isPartStrNotTag){o.filter(b,a,true)}},">":function(a,b,c){var d=typeof b==="string";if(d&&!/\W/.test(b)){b=c?b:b.toUpperCase();for(var i=0,l=a.length;i<l;i++){var e=a[i];if(e){var f=e.parentNode;a[i]=f.nodeName===b?f:false}}}else{for(var i=0,l=a.length;i<l;i++){var e=a[i];if(e){a[i]=d?e.parentNode:e.parentNode===b}}if(d){o.filter(b,a,true)}}},"":function(a,b,c){var d=done++,checkFn=dirCheck;if(!b.match(/\W/)){var e=b=c?b:b.toUpperCase();checkFn=dirNodeCheck}checkFn("parentNode",b,d,a,e,c)},"~":function(a,b,c){var d=done++,checkFn=dirCheck;if(typeof b==="string"&&!b.match(/\W/)){var e=b=c?b:b.toUpperCase();checkFn=dirNodeCheck}checkFn("previousSibling",b,d,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var m=b.getElementById(a[1]);return m?[m]:[]}},NAME:function(a,b,c){if(typeof b.getElementsByName!=="undefined"){var d=[],results=b.getElementsByName(a[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===a[1]){d.push(results[i])}}return d.length===0?null:d}},TAG:function(a,b){return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(/\\/g,"")+" ";if(f){return a}for(var i=0,elem;(elem=b[i])!=null;i++){if(elem){if(e^(elem.className&&(" "+elem.className+" ").indexOf(a)>=0)){if(!c)d.push(elem)}else if(c){b[i]=false}}}return false},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a,b){for(var i=0;b[i]===false;i++){}return b[i]&&w(b[i])?a[1]:a[1].toUpperCase()},CHILD:function(a){if(a[1]=="nth"){var b=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(a[2]=="even"&&"2n"||a[2]=="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=(b[1]+(b[2]||1))-0;a[3]=b[3]-0}a[0]=done++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1].replace(/\\/g,"");if(!f&&p.attrMap[g]){a[1]=p.attrMap[g]}if(a[2]==="~="){a[4]=" "+a[4]+" "}return a},PSEUDO:function(a,b,c,d,e){if(a[1]==="not"){if(a[3].match(k).length>1||/^\w/.test(a[3])){a[3]=o(a[3],null,null,b)}else{var f=o.filter(a[3],b,c,true^e);if(!c){d.push.apply(d,f)}return false}}else if(p.match.POS.test(a[0])||p.match.CHILD.test(a[0])){return true}return a},POS:function(a){a.unshift(true);return a}},filters:{enabled:function(a){return a.disabled===false&&a.type!=="hidden"},disabled:function(a){return a.disabled===true},checked:function(a){return a.checked===true},selected:function(a){a.parentNode.selectedIndex;return a.selected===true},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,i,b){return!!o(b[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toUpperCase()==="BUTTON"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,i){return i===0},last:function(a,i,b,c){return i===c.length-1},even:function(a,i){return i%2===0},odd:function(a,i){return i%2===1},lt:function(a,i,b){return i<b[3]-0},gt:function(a,i,b){return i>b[3]-0},nth:function(a,i,b){return b[3]-0==i},eq:function(a,i,b){return b[3]-0==i}},filter:{PSEUDO:function(a,b,i,c){var d=b[1],filter=p.filters[d];if(filter){return filter(a,i,b,c)}else if(d==="contains"){return(a.textContent||a.innerText||"").indexOf(b[3])>=0}else if(d==="not"){var e=b[3];for(var i=0,l=e.length;i<l;i++){if(e[i]===a){return false}}return true}},CHILD:function(a,b){var c=b[1],node=a;switch(c){case'only':case'first':while(node=node.previousSibling){if(node.nodeType===1)return false}if(c=='first')return true;node=a;case'last':while(node=node.nextSibling){if(node.nodeType===1)return false}return true;case'nth':var d=b[2],last=b[3];if(d==1&&last==0){return true}var e=b[0],parent=a.parentNode;if(parent&&(parent.sizcache!==e||!a.nodeIndex)){var f=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++f}}parent.sizcache=e}var g=a.nodeIndex-last;if(d==0){return g==0}else{return(g%d==0&&g/d>=0)}}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return(b==="*"&&a.nodeType===1)||a.nodeName===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],result=p.attrHandle[c]?p.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),value=result+"",s=b[2],check=b[4];return result==null?s==="!=":s==="="?value===check:s==="*="?value.indexOf(check)>=0:s==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:s==="!="?value!=check:s==="^="?value.indexOf(check)===0:s==="$="?value.substr(value.length-check.length)===check:s==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(a,b,i,c){var d=b[2],filter=p.setFilters[d];if(filter){return filter(a,i,b,c)}}}};var q=p.match.POS;for(var s in p.match){p.match[s]=RegExp(p.match[s].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var t=function(a,b){a=Array.prototype.slice.call(a);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(e){t=function(a,b){var c=b||[];if(toString.call(a)==="[object Array]"){Array.prototype.push.apply(c,a)}else{if(typeof a.length==="number"){for(var i=0,l=a.length;i<l;i++){c.push(a[i])}}else{for(var i=0;a[i];i++){c.push(a[i])}}}return c}}var u;if(document.documentElement.compareDocumentPosition){u=function(a,b){var c=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(c===0){hasDuplicate=true}return c}}else if("sourceIndex"in document.documentElement){u=function(a,b){var c=a.sourceIndex-b.sourceIndex;if(c===0){hasDuplicate=true}return c}}else if(document.createRange){u=function(a,b){var c=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();c.selectNode(a);c.collapse(true);bRange.selectNode(b);bRange.collapse(true);var d=c.compareBoundaryPoints(Range.START_TO_END,bRange);if(d===0){hasDuplicate=true}return d}}(function(){var d=document.createElement("form"),id="script"+(new Date).getTime();d.innerHTML="<input name='"+id+"'/>";var e=document.documentElement;e.insertBefore(d,e.firstChild);if(!!document.getElementById(id)){p.find.ID=function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var m=b.getElementById(a[1]);return m?m.id===a[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===a[1]?[m]:undefined:[]}};p.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}}e.removeChild(d)})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){p.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var i=0;c[i];i++){if(c[i].nodeType===1){d.push(c[i])}}c=d}return c}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){p.attrHandle.href=function(a){return a.getAttribute("href",2)}}})();if(document.querySelectorAll)(function(){var f=o,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return}o=function(a,b,c,d){b=b||document;if(!d&&b.nodeType===9&&!w(b)){try{return t(b.querySelectorAll(a),c)}catch(e){}}return f(a,b,c,d)};o.find=f.find;o.filter=f.filter;o.selectors=f.selectors;o.matches=f.matches})();if(document.getElementsByClassName&&document.documentElement.getElementsByClassName)(function(){var d=document.createElement("div");d.innerHTML="<div class='test e'></div><div class='test'></div>";if(d.getElementsByClassName("e").length===0)return;d.lastChild.className="e";if(d.getElementsByClassName("e").length===1)return;p.order.splice(1,0,"CLASS");p.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c){return b.getElementsByClassName(a[1])}}})();function dirNodeCheck(a,b,c,d,e,f){var g=a=="previousSibling"&&!f;for(var i=0,l=d.length;i<l;i++){var h=d[i];if(h){if(g&&h.nodeType===1){h.sizcache=c;h.sizset=i}h=h[a];var j=false;while(h){if(h.sizcache===c){j=d[h.sizset];break}if(h.nodeType===1&&!f){h.sizcache=c;h.sizset=i}if(h.nodeName===b){j=h;break}h=h[a]}d[i]=j}}}function dirCheck(a,b,c,d,e,f){var g=a=="previousSibling"&&!f;for(var i=0,l=d.length;i<l;i++){var h=d[i];if(h){if(g&&h.nodeType===1){h.sizcache=c;h.sizset=i}h=h[a];var j=false;while(h){if(h.sizcache===c){j=d[h.sizset];break}if(h.nodeType===1){if(!f){h.sizcache=c;h.sizset=i}if(typeof b!=="string"){if(h===b){j=true;break}}else if(o.filter(b,[h]).length>0){j=h;break}}h=h[a]}d[i]=j}}}var v=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var w=function(a){return a.nodeType===9&&a.documentElement.nodeName!=="HTML"||!!a.ownerDocument&&w(a.ownerDocument)};var x=function(a,b){var c=[],later="",match,root=b.nodeType?[b]:b;while((match=p.match.PSEUDO.exec(a))){later+=match[0];a=a.replace(p.match.PSEUDO,"")}a=p.relative[a]?a+"*":a;for(var i=0,l=root.length;i<l;i++){o(a,root[i],c)}return o.filter(later,c)};jQuery.find=o;jQuery.filter=o.filter;jQuery.expr=o.selectors;jQuery.expr[":"]=jQuery.expr.filters;o.selectors.filters.hidden=function(a){return a.offsetWidth===0||a.offsetHeight===0};o.selectors.filters.visible=function(a){return a.offsetWidth>0||a.offsetHeight>0};o.selectors.filters.animated=function(b){return jQuery.grep(jQuery.timers,function(a){return b===a.elem}).length};jQuery.multiFilter=function(a,b,c){if(c){a=":not("+a+")"}return o.matches(a,b)};jQuery.dir=function(a,b){var c=[],cur=a[b];while(cur&&cur!=document){if(cur.nodeType==1)c.push(cur);cur=cur[b]}return c};jQuery.nth=function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType==1&&++e==b)break;return a};jQuery.sibling=function(n,a){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=a)r.push(n)}return r};return;window.Sizzle=o})();jQuery.event={add:function(e,f,g,h){if(e.nodeType==3||e.nodeType==8)return;if(e.setInterval&&e!=window)e=window;if(!g.guid)g.guid=this.guid++;if(h!==undefined){var i=g;g=this.proxy(i);g.data=h}var j=jQuery.data(e,"events")||jQuery.data(e,"events",{}),handle=jQuery.data(e,"handle")||jQuery.data(e,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined});handle.elem=e;jQuery.each(f.split(/\s+/),function(a,b){var c=b.split(".");b=c.shift();g.type=c.slice().sort().join(".");var d=j[b];if(jQuery.event.specialAll[b])jQuery.event.specialAll[b].setup.call(e,h,c);if(!d){d=j[b]={};if(!jQuery.event.special[b]||jQuery.event.special[b].setup.call(e,h,c)===false){if(e.addEventListener)e.addEventListener(b,handle,false);else if(e.attachEvent)e.attachEvent("on"+b,handle)}}d[g.guid]=g;jQuery.event.global[b]=true});e=null},guid:1,global:{},remove:function(f,g,h){if(f.nodeType==3||f.nodeType==8)return;var i=jQuery.data(f,"events"),ret,index;if(i){if(g===undefined||(typeof g==="string"&&g.charAt(0)=="."))for(var j in i)this.remove(f,j+(g||""));else{if(g.type){h=g.handler;g=g.type}jQuery.each(g.split(/\s+/),function(a,b){var c=b.split(".");b=c.shift();var d=RegExp("(^|\\.)"+c.slice().sort().join(".*\\.")+"(\\.|$)");if(i[b]){if(h)delete i[b][h.guid];else for(var e in i[b])if(d.test(i[b][e].type))delete i[b][e];if(jQuery.event.specialAll[b])jQuery.event.specialAll[b].teardown.call(f,c);for(ret in i[b])break;if(!ret){if(!jQuery.event.special[b]||jQuery.event.special[b].teardown.call(f,c)===false){if(f.removeEventListener)f.removeEventListener(b,jQuery.data(f,"handle"),false);else if(f.detachEvent)f.detachEvent("on"+b,jQuery.data(f,"handle"))}ret=null;delete i[b]}}})}for(ret in i)break;if(!ret){var k=jQuery.data(f,"handle");if(k)k.elem=null;jQuery.removeData(f,"events");jQuery.removeData(f,"handle")}}},trigger:function(a,b,c,d){var f=a.type||a;if(!d){a=typeof a==="object"?a[expando]?a:jQuery.extend(jQuery.Event(f),a):jQuery.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!c){a.stopPropagation();if(this.global[f])jQuery.each(jQuery.cache,function(){if(this.events&&this.events[f])jQuery.event.trigger(a,b,this.handle.elem)})}if(!c||c.nodeType==3||c.nodeType==8)return undefined;a.result=undefined;a.target=c;b=jQuery.makeArray(b);b.unshift(a)}a.currentTarget=c;var g=jQuery.data(c,"handle");if(g)g.apply(c,b);if((!c[f]||(jQuery.nodeName(c,'a')&&f=="click"))&&c["on"+f]&&c["on"+f].apply(c,b)===false)a.result=false;if(!d&&c[f]&&!a.isDefaultPrevented()&&!(jQuery.nodeName(c,'a')&&f=="click")){this.triggered=true;try{c[f]()}catch(e){}}this.triggered=false;if(!a.isPropagationStopped()){var h=c.parentNode||c.ownerDocument;if(h)jQuery.event.trigger(a,b,h,true)}},handle:function(a){var b,handlers;a=arguments[0]=jQuery.event.fix(a||window.event);a.currentTarget=this;var c=a.type.split(".");a.type=c.shift();b=!c.length&&!a.exclusive;var d=RegExp("(^|\\.)"+c.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[a.type];for(var j in handlers){var e=handlers[j];if(b||d.test(e.type)){a.handler=e;a.data=e.data;var f=e.apply(this,arguments);if(f!==undefined){a.result=f;if(f===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[expando])return a;var b=a;a=jQuery.Event(b);for(var i=this.props.length,prop;i;){prop=this.props[--i];a[prop]=b[prop]}if(!a.target)a.target=a.srcElement||document;if(a.target.nodeType==3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement==a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){var c=document.documentElement,body=document.body;a.pageX=a.clientX+(c&&c.scrollLeft||body&&body.scrollLeft||0)-(c.clientLeft||0);a.pageY=a.clientY+(c&&c.scrollTop||body&&body.scrollTop||0)-(c.clientTop||0)}if(!a.which&&((a.charCode||a.charCode===0)?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button)a.which=(a.button&1?1:(a.button&2?3:(a.button&4?2:0)));return a},proxy:function(a,b){b=b||function(){return a.apply(this,arguments)};b.guid=a.guid=a.guid||b.guid||this.guid++;return b},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(a,b){jQuery.event.add(this,b[0],liveHandler)},teardown:function(a){if(a.length){var b=0,name=RegExp("(^|\\.)"+a[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type))b++});if(b<1)jQuery.event.remove(this,a[0],liveHandler)}}}}};jQuery.Event=function(a){if(!this.preventDefault)return new jQuery.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=now();this[expando]=true};function returnFalse(){return false}function returnTrue(){return true}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e)return;if(e.preventDefault)e.preventDefault();e.returnValue=false},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e)return;if(e.stopPropagation)e.stopPropagation();e.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation()},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(a){var b=a.relatedTarget;while(b&&b!=this)try{b=b.parentNode}catch(e){b=this}if(b!=this){a.type=a.data;jQuery.event.handle.apply(this,arguments)}};jQuery.each({mouseover:'mouseenter',mouseout:'mouseleave'},function(a,b){jQuery.event.special[b]={setup:function(){jQuery.event.add(this,a,withinElement,b)},teardown:function(){jQuery.event.remove(this,a,withinElement)}}});jQuery.fn.extend({bind:function(a,b,c){return a=="unload"?this.one(a,b,c):this.each(function(){jQuery.event.add(this,a,c||b,c&&b)})},one:function(b,c,d){var e=jQuery.event.proxy(d||c,function(a){jQuery(this).unbind(a,e);return(d||c).apply(this,arguments)});return this.each(function(){jQuery.event.add(this,b,e,d&&c)})},unbind:function(a,b){return this.each(function(){jQuery.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){jQuery.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var c=jQuery.Event(a);c.preventDefault();c.stopPropagation();jQuery.event.trigger(c,b,this[0]);return c.result}},toggle:function(b){var c=arguments,i=1;while(i<c.length)jQuery.event.proxy(b,c[i++]);return this.click(jQuery.event.proxy(b,function(a){this.lastToggle=(this.lastToggle||0)%i;a.preventDefault();return c[this.lastToggle++].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b)},ready:function(a){bindReady();if(jQuery.isReady)a.call(document,jQuery);else jQuery.readyList.push(a);return this},live:function(a,b){var c=jQuery.event.proxy(b);c.guid+=this.selector+a;jQuery(document).bind(liveConvert(a,this.selector),this.selector,c);return this},die:function(a,b){jQuery(document).unbind(liveConvert(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});function liveHandler(c){var d=RegExp("(^|\\.)"+c.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,a){if(d.test(a.type)){var b=jQuery(c.target).closest(a.data)[0];if(b)elems.push({elem:b,fn:a})}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest")});jQuery.each(elems,function(){if(this.fn.call(this.elem,c,this.fn.data)===false)return(stop=false)});return stop}function liveConvert(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"|")].join(".")}jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready()},false)}else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready()}});if(document.documentElement.doScroll&&window==window.top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return}jQuery.ready()})()}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,"+"change,select,submit,keydown,keypress,keyup,error").split(","),function(i,b){jQuery.fn[b]=function(a){return a?this.bind(b,a):this.trigger(b)}});jQuery(window).bind('unload',function(){for(var a in jQuery.cache)if(a!=1&&jQuery.cache[a].handle)jQuery.event.remove(jQuery.cache[a].handle.elem)});(function(){jQuery.support={};var b=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var c=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!c||!c.length||!a){return}jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"))}catch(e){}b.insertBefore(script,b.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id]}b.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee)});div.cloneNode(true).fireEvent("onclick")}jQuery(function(){var a=document.createElement("div");a.style.width=a.style.paddingLeft="1px";document.body.appendChild(a);jQuery.boxModel=jQuery.support.boxModel=a.offsetWidth===2;document.body.removeChild(a).style.display='none'})})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(c,d,e){if(typeof c!=="string")return this._load(c);var f=c.indexOf(" ");if(f>=0){var g=c.slice(f,c.length);c=c.slice(0,f)}var h="GET";if(d)if(jQuery.isFunction(d)){e=d;d=null}else if(typeof d==="object"){d=jQuery.param(d);h="POST"}var i=this;jQuery.ajax({url:c,type:h,dataType:"html",data:d,complete:function(a,b){if(b=="success"||b=="notmodified")i.html(g?jQuery("<div/>").append(a.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(g):a.responseText);if(e)i.each(e,[a.responseText,b,a])}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(i,b){var c=jQuery(this).val();return c==null?null:jQuery.isArray(c)?jQuery.map(c,function(a,i){return{name:b.name,value:a}}):{name:b.name,value:c}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=now();jQuery.extend({get:function(a,b,c,d){if(jQuery.isFunction(b)){c=b;b=null}return jQuery.ajax({type:"GET",url:a,data:b,success:c,dataType:d})},getScript:function(a,b){return jQuery.get(a,null,b,"script")},getJSON:function(a,b,c){return jQuery.get(a,b,c,"json")},post:function(a,b,c,d){if(jQuery.isFunction(b)){c=b;b={}}return jQuery.ajax({type:"POST",url:a,data:b,success:c,dataType:d})},ajaxSetup:function(a){jQuery.extend(jQuery.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var c,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){c="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+c+"$1");s.url=s.url.replace(jsre,"="+c+"$1");s.dataType="script";window[c]=function(a){data=a;success();complete();window[c]=undefined;try{delete window[c]}catch(e){}if(h)h.removeChild(i)}}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var d=now();var f=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+d+"$2");s.url=f+((f==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+d:"")}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var g=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&g&&(g[1]&&g[1]!=location.protocol||g[2]!=location.host)){var h=document.getElementsByTagName("head")[0];var i=document.createElement("script");i.src=s.url;if(s.scriptCharset)i.charset=s.scriptCharset;if(!c){var j=false;i.onload=i.onreadystatechange=function(){if(!j&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){j=true;success();complete();i.onload=i.onreadystatechange=null;h.removeChild(i)}}}h.appendChild(i);return undefined}var k=false;var l=s.xhr();if(s.username)l.open(type,s.url,s.async,s.username,s.password);else l.open(type,s.url,s.async);try{if(s.data)l.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)l.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");l.setRequestHeader("X-Requested-With","XMLHttpRequest");l.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend&&s.beforeSend(l,s)===false){if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");l.abort();return false}if(s.global)jQuery.event.trigger("ajaxSend",[l,s]);var m=function(a){if(l.readyState==0){if(n){clearInterval(n);n=null;if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop")}}else if(!k&&l&&(l.readyState==4||a=="timeout")){k=true;if(n){clearInterval(n);n=null}status=a=="timeout"?"timeout":!jQuery.httpSuccess(l)?"error":s.ifModified&&jQuery.httpNotModified(l,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(l,s.dataType,s)}catch(e){status="parsererror"}}if(status=="success"){var b;try{b=l.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&b)jQuery.lastModified[s.url]=b;if(!c)success()}else jQuery.handleError(s,l,status);complete();if(a)l.abort();if(s.async)l=null}};if(s.async){var n=setInterval(m,13);if(s.timeout>0)setTimeout(function(){if(l&&!k)m("timeout")},s.timeout)}try{l.send(s.data)}catch(e){jQuery.handleError(s,l,null,e)}if(!s.async)m();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[l,s])}function complete(){if(s.complete)s.complete(l,status);if(s.global)jQuery.event.trigger("ajaxComplete",[l,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop")}return l},handleError:function(s,a,b,e){if(s.error)s.error(a,b,e);if(s.global)jQuery.event.trigger("ajaxError",[a,s,e])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol=="file:"||(a.status>=200&&a.status<300)||a.status==304||a.status==1223}catch(e){}return false},httpNotModified:function(a,b){try{var c=a.getResponseHeader("Last-Modified");return a.status==304||c==jQuery.lastModified[b]}catch(e){}return false},httpData:function(a,b,s){var c=a.getResponseHeader("content-type"),xml=b=="xml"||!b&&c&&c.indexOf("xml")>=0,data=xml?a.responseXML:a.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(s&&s.dataFilter)data=s.dataFilter(data,b);if(typeof data==="string"){if(b=="script")jQuery.globalEval(data);if(b=="json")data=window["eval"]("("+data+")")}return data},param:function(a){var s=[];function add(a,b){s[s.length]=encodeURIComponent(a)+'='+encodeURIComponent(b)};if(jQuery.isArray(a)||a.jquery)jQuery.each(a,function(){add(this.name,this.value)});else for(var j in a)if(jQuery.isArray(a[j]))jQuery.each(a[j],function(){add(j,this)});else add(j,jQuery.isFunction(a[j])?a[j]():a[j]);return s.join("&").replace(/%20/g,"+")}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(a,b){var c={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,b)),function(){c[this]=a});return c}jQuery.fn.extend({show:function(a,b){if(a){return this.animate(genFx("show",3),a,b)}else{for(var i=0,l=this.length;i<l;i++){var c=jQuery.data(this[i],"olddisplay");this[i].style.display=c||"";if(jQuery.css(this[i],"display")==="none"){var d=this[i].tagName,display;if(elemdisplay[d]){display=elemdisplay[d]}else{var e=jQuery("<"+d+" />").appendTo("body");display=e.css("display");if(display==="none")display="block";e.remove();elemdisplay[d]=display}jQuery.data(this[i],"olddisplay",display)}}for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||""}return this}},hide:function(a,b){if(a){return this.animate(genFx("hide",3),a,b)}else{for(var i=0,l=this.length;i<l;i++){var c=jQuery.data(this[i],"olddisplay");if(!c&&c!=="none")jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"))}for(var i=0,l=this.length;i<l;i++){this[i].style.display="none"}return this}},_toggle:jQuery.fn.toggle,toggle:function(b,c){var d=typeof b==="boolean";return jQuery.isFunction(b)&&jQuery.isFunction(c)?this._toggle.apply(this,arguments):b==null||d?this.each(function(){var a=d?b:jQuery(this).is(":hidden");jQuery(this)[a?"show":"hide"]()}):this.animate(genFx("toggle",3),b,c)},fadeTo:function(a,b,c){return this.animate({opacity:b},a,c)},animate:function(g,h,i,j){var k=jQuery.speed(h,i,j);return this[k.queue===false?"each":"queue"](function(){var f=jQuery.extend({},k),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in g){if(g[p]=="hide"&&hidden||g[p]=="show"&&!hidden)return f.complete.call(this);if((p=="height"||p=="width")&&this.style){f.display=jQuery.css(this,"display");f.overflow=this.style.overflow}}if(f.overflow!=null)this.style.overflow="hidden";f.curAnim=jQuery.extend({},g);jQuery.each(g,function(a,b){var e=new jQuery.fx(self,f,a);if(/toggle|show|hide/.test(b))e[b=="toggle"?hidden?"show":"hide":b](g);else{var c=b.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(c){var d=parseFloat(c[2]),unit=c[3]||"px";if(unit!="px"){self.style[a]=(d||1)+unit;start=((d||1)/e.cur(true))*start;self.style[a]=start+unit}if(c[1])d=((c[1]=="-="?-1:1)*d)+start;e.custom(start,d,unit)}else e.custom(start,b,"")}});return true})},stop:function(a,b){var c=jQuery.timers;if(a)this.queue([]);this.each(function(){for(var i=c.length-1;i>=0;i--)if(c[i].elem==this){if(b)c[i](true);c.splice(i,1)}});if(!b)this.dequeue();return this}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(c,d){jQuery.fn[c]=function(a,b){return this.animate(d,a,b)}});jQuery.extend({speed:function(a,b,c){var d=typeof a==="object"?a:{complete:c||!c&&b||jQuery.isFunction(a)&&a,duration:a,easing:c&&b||b&&!jQuery.isFunction(b)&&b};d.duration=jQuery.fx.off?0:typeof d.duration==="number"?d.duration:jQuery.fx.speeds[d.duration]||jQuery.fx.speeds._default;d.old=d.complete;d.complete=function(){if(d.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(d.old))d.old.call(this)};return d},easing:{linear:function(p,n,a,b){return a+b*p},swing:function(p,n,a,b){return((-Math.cos(p*Math.PI)/2)+0.5)*b+a}},timers:[],fx:function(a,b,c){this.options=b;this.elem=a;this.prop=c;if(!b.orig)b.orig={}}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,a));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(b,c,d){this.startTime=now();this.start=b;this.end=c;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;function t(a){return e.step(a)}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var a=jQuery.timers;for(var i=0;i<a.length;i++)if(!a[i]())a.splice(i--,1);if(!a.length){clearInterval(timerId);timerId=undefined}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var t=now();if(a||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var b=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)b=false;if(b){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block"}if(this.options.hide)jQuery(this.elem).hide();if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){jQuery.attr(a.elem.style,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=a.now+a.unit;else a.elem[a.prop]=a.now}}});if(document.documentElement["getBoundingClientRect"])jQuery.fn.offset=function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return jQuery.offset.bodyOffset(this[0]);var a=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=a.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=a.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left}};else jQuery.fn.offset=function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return jQuery.offset.bodyOffset(this[0]);jQuery.offset.initialized||jQuery.offset.initialize();var a=this[0],offsetParent=a.offsetParent,prevOffsetParent=a,doc=a.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(a,null),top=a.offsetTop,left=a.offsetLeft;while((a=a.parentNode)&&a!==body&&a!==docElem){computedStyle=defaultView.getComputedStyle(a,null);top-=a.scrollTop,left-=a.scrollLeft;if(a===offsetParent){top+=a.offsetTop,left+=a.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(a.tagName)))top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;prevOffsetParent=offsetParent,offsetParent=a.offsetParent}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible")top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;prevComputedStyle=computedStyle}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static")top+=body.offsetTop,left+=body.offsetLeft;if(prevComputedStyle.position==="fixed")top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft);return{top:top,left:left}};jQuery.offset={initialize:function(){if(this.initialized)return;var a=document.body,container=document.createElement('div'),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=a.style.marginTop,html='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:'absolute',top:0,left:0,margin:0,border:0,width:'1px',height:'1px',visibility:'hidden'};for(prop in rules)container.style[prop]=rules[prop];container.innerHTML=html;a.insertBefore(container,a.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow='hidden',innerDiv.style.position='relative';this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);a.style.marginTop='1px';this.doesNotIncludeMarginInBodyOffset=(a.offsetTop===0);a.style.marginTop=bodyMarginTop;a.removeChild(container);this.initialized=true},bodyOffset:function(a){jQuery.offset.initialized||jQuery.offset.initialize();var b=a.offsetTop,left=a.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset)b+=parseInt(jQuery.curCSS(a,'marginTop',true),10)||0,left+=parseInt(jQuery.curCSS(a,'marginLeft',true),10)||0;return{top:b,left:left}}};jQuery.fn.extend({position:function(){var a=0,top=0,results;if(this[0]){var b=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(b[0].tagName)?{top:0,left:0}:b.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(b,'borderTopWidth');parentOffset.left+=num(b,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var a=this[0].offsetParent||document.body;while(a&&(!/^body|html$/i.test(a.tagName)&&jQuery.css(a,'position')=='static'))a=a.offsetParent;return jQuery(a)}});jQuery.each(['Left','Top'],function(i,b){var c='scroll'+b;jQuery.fn[c]=function(a){if(!this[0])return null;return a!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?a:jQuery(window).scrollLeft(),i?a:jQuery(window).scrollTop()):this[c]=a}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[c]||document.body[c]:this[0][c]}});jQuery.each(["Height","Width"],function(i,b){var c=i?"Left":"Top",br=i?"Right":"Bottom",lower=b.toLowerCase();jQuery.fn["inner"+b]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null};jQuery.fn["outer"+b]=function(a){return this[0]?jQuery.css(this[0],lower,false,a?"margin":"border"):null};var d=b.toLowerCase();jQuery.fn[d]=function(a){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+b]||document.body["client"+b]:this[0]==document?Math.max(document.documentElement["client"+b],document.body["scroll"+b],document.documentElement["scroll"+b],document.body["offset"+b],document.documentElement["offset"+b]):a===undefined?(this.length?jQuery.css(this[0],d):null):this.css(d,typeof a==="string"?a:a+"px")}})})();(function($){$.fn.ajaxSubmit=function(u){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this}if(typeof u=='function')u={success:u};u=$.extend({url:this.attr('action')||window.location.toString(),type:this.attr('method')||'GET'},u||{});var v={};this.trigger('form-pre-serialize',[this,u,v]);if(v.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this}var a=this.formToArray(u.semantic);if(u.data){u.extraData=u.data;for(var n in u.data)a.push({name:n,value:u.data[n]})}if(u.beforeSubmit&&u.beforeSubmit(a,this,u)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this}this.trigger('form-submit-validate',[a,this,u,v]);if(v.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this}var q=$.param(a);if(u.type.toUpperCase()=='GET'){u.url+=(u.url.indexOf('?')>=0?'&':'?')+q;u.data=null}else u.data=q;var w=this,callbacks=[];if(u.resetForm)callbacks.push(function(){w.resetForm()});if(u.clearForm)callbacks.push(function(){w.clearForm()});if(!u.dataType&&u.target){var x=u.success||function(){};callbacks.push(function(a){$(u.target).html(a).each(x,arguments)})}else if(u.success)callbacks.push(u.success);u.success=function(a,b){for(var i=0,max=callbacks.length;i<max;i++)callbacks[i].call(this,a,b,w)};var y=$('input:file',this).fieldValue();var z=false;for(var j=0;j<y.length;j++)if(y[j])z=true;if(u.iframe||z){if($.browser.safari&&u.closeKeepAlive)$.get(u.closeKeepAlive,fileUpload);else fileUpload()}else $.ajax(u);this.trigger('form-submit-notify',[this,u]);return this;function fileUpload(){var h=w[0];if($(':input[name=submit]',h).length){alert('Error: Form elements must not be named "submit".');return}var i=$.extend({},$.ajaxSettings,u);var j='jqFormIO'+(new Date().getTime());var k=$('<iframe id="'+j+'" name="'+j+'" />');var l=k[0];if($.browser.msie||$.browser.opera)l.src='javascript:false;document.write("");';k.css({position:'absolute',top:'-1000px',left:'-1000px'});var m={responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=i.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[m,i]);var o=0;var p=0;var q=0;var r=h.clk;if(r){var n=r.name;if(n&&!r.disabled){u.extraData=u.extraData||{};u.extraData[n]=r.value;if(r.type=="image"){u.extraData[name+'.x']=h.clk_x;u.extraData[name+'.y']=h.clk_y}}}setTimeout(function(){var t=w.attr('target'),a=w.attr('action');w.attr({target:j,encoding:'multipart/form-data',enctype:'multipart/form-data',method:'POST',action:i.url});if(i.timeout)setTimeout(function(){p=true;cb()},i.timeout);var b=[];try{if(u.extraData)for(var n in u.extraData)b.push($('<input type="hidden" name="'+n+'" value="'+u.extraData[n]+'" />').appendTo(h)[0]);k.appendTo('body');l.attachEvent?l.attachEvent('onload',cb):l.addEventListener('load',cb,false);h.submit()}finally{w.attr('action',a);t?w.attr('target',t):w.removeAttr('target');$(b).remove()}},10);function cb(){if(o++)return;l.detachEvent?l.detachEvent('onload',cb):l.removeEventListener('load',cb,false);var c=true;try{if(p)throw'timeout';var d,doc;doc=l.contentWindow?l.contentWindow.document:l.contentDocument?l.contentDocument:l.document;if((!doc||(i.dataType!='xml'&&!doc.body))&&!q&&$.browser.opera){q=1;o--;setTimeout(cb,100);return}m.responseText=doc.body?doc.body.innerHTML:null;m.responseXML=doc.XMLDocument?doc.XMLDocument:doc;m.getResponseHeader=function(a){var b={'content-type':i.dataType};return b[a]};if(i.dataType=='json'||i.dataType=='script'){var f=doc.getElementsByTagName('textarea')[0];m.responseText=f?f.value:m.responseText}else if(i.dataType=='xml'&&!m.responseXML&&m.responseText!=null){m.responseXML=toXml(m.responseText)}d=$.httpData(m,i.dataType)}catch(e){c=false;$.handleError(i,m,'error',e)}if(c){i.success(d,'success');if(g)$.event.trigger("ajaxSuccess",[m,i])}if(g)$.event.trigger("ajaxComplete",[m,i]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(i.complete)i.complete(m,c?'success':'error');setTimeout(function(){k.remove();m.responseXML=null},100)};function toXml(s,a){if(window.ActiveXObject){a=new ActiveXObject('Microsoft.XMLDOM');a.async='false';a.loadXML(s)}else a=(new DOMParser()).parseFromString(s,'text/xml');return(a&&a.documentElement&&a.documentElement.tagName!='parsererror')?a:null}}};$.fn.ajaxForm=function(c){return this.ajaxFormUnbind().bind('submit.form-plugin',function(){$(this).ajaxSubmit(c);return false}).each(function(){$(":submit,input:image",this).bind('click.form-plugin',function(e){var a=this.form;a.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){a.clk_x=e.offsetX;a.clk_y=e.offsetY}else if(typeof $.fn.offset=='function'){var b=$(this).offset();a.clk_x=e.pageX-b.left;a.clk_y=e.pageY-b.top}else{a.clk_x=e.pageX-this.offsetLeft;a.clk_y=e.pageY-this.offsetTop}}setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},10)})})};$.fn.ajaxFormUnbind=function(){this.unbind('submit.form-plugin');return this.each(function(){$(":submit,input:image",this).unbind('click.form-plugin')})};$.fn.formToArray=function(b){var a=[];if(this.length==0)return a;var c=this[0];var d=b?c.getElementsByTagName('*'):c.elements;if(!d)return a;for(var i=0,max=d.length;i<max;i++){var e=d[i];var n=e.name;if(!n)continue;if(b&&c.clk&&e.type=="image"){if(!e.disabled&&c.clk==e)a.push({name:n+'.x',value:c.clk_x},{name:n+'.y',value:c.clk_y});continue}var v=$.fieldValue(e,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)a.push({name:n,value:v[j]})}else if(v!==null&&typeof v!='undefined')a.push({name:n,value:v})}if(!b&&c.clk){var f=c.getElementsByTagName("input");for(var i=0,max=f.length;i<max;i++){var g=f[i];var n=g.name;if(n&&!g.disabled&&g.type=="image"&&c.clk==g)a.push({name:n+'.x',value:c.clk_x},{name:n+'.y',value:c.clk_y})}}return a};$.fn.formSerialize=function(a){return $.param(this.formToArray(a))};$.fn.fieldSerialize=function(b){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,b);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++)a.push({name:n,value:v[i]})}else if(v!==null&&typeof v!='undefined')a.push({name:this.name,value:v})});return $.param(a)};$.fn.fieldValue=function(a){for(var b=[],i=0,max=this.length;i<max;i++){var c=this[i];var v=$.fieldValue(c,a);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length))continue;v.constructor==Array?$.merge(b,v):b.push(v)}return b};$.fieldValue=function(b,c){var n=b.name,t=b.type,tag=b.tagName.toLowerCase();if(typeof c=='undefined')c=true;if(c&&(!n||b.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!b.checked||(t=='submit'||t=='image')&&b.form&&b.form.clk!=b||tag=='select'&&b.selectedIndex==-1))return null;if(tag=='select'){var d=b.selectedIndex;if(d<0)return null;var a=[],ops=b.options;var e=(t=='select-one');var f=(e?d+1:ops.length);for(var i=(e?d:0);i<f;i++){var g=ops[i];if(g.selected){var v=$.browser.msie&&!(g.attributes['value'].specified)?g.text:g.value;if(e)return v;a.push(v)}}return a}return b.value};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields()})};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=='text'||t=='password'||tag=='textarea')this.value='';else if(t=='checkbox'||t=='radio')this.checked=false;else if(tag=='select')this.selectedIndex=-1})};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType))this.reset()})};$.fn.enable=function(b){if(b==undefined)b=true;return this.each(function(){this.disabled=!b})};$.fn.select=function(b){if(b==undefined)b=true;return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio')this.checked=b;else if(this.tagName.toLowerCase()=='option'){var a=$(this).parent('select');if(b&&a[0]&&a[0].type=='select-one'){a.find('option').select(false)}this.selected=b}})};function log(){if($.fn.ajaxSubmit.debug&&window.console&&window.console.log)window.console.log('[jquery.form] '+Array.prototype.join.call(arguments,''))}})(jQuery);(function($){var g=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};g.defaults={axis:'y',duration:1};g.window=function(a){return $(window).scrollable()};$.fn.scrollable=function(){return this.map(function(){var a=this.parentWindow||this.defaultView,elem=this.nodeName=='#document'?a.frameElement||a:this,doc=elem.contentDocument||(elem.contentWindow||elem).document,isWin=elem.setInterval;return elem.nodeName=='IFRAME'||isWin&&$.browser.safari?doc.body:isWin?doc.documentElement:this})};$.fn.scrollTo=function(d,e,f){if(typeof e=='object'){f=e;e=0}if(typeof f=='function')f={onAfter:f};f=$.extend({},g.defaults,f);e=e||f.speed||f.duration;f.queue=f.queue&&f.axis.length>1;if(f.queue)e/=2;f.offset=both(f.offset);f.over=both(f.over);return this.scrollable().each(function(){var c=this,$elem=$(c),targ=d,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(f.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=c[key],Dim=a=='x'?'Width':'Height',dim=Dim.toLowerCase();if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(f.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=f.offset[pos]||0;if(f.over[pos])attr[key]+=targ[dim]()*f.over[pos]}else attr[key]=targ[pos];if(/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max(Dim));if(!i&&f.queue){if(old!=attr[key])animate(f.onAfterFirst);delete attr[key]}});animate(f.onAfter);function animate(a){$elem.animate(attr,e,f.easing,a&&function(){a.call(this,d,f)})};function max(a){var b='scroll'+a,doc=c.ownerDocument;return win?Math.max(doc.documentElement[b],doc.body[b]):c[b]}}).end()};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);jQuery.fn.bgIframe=jQuery.fn.bgiframe=function(){if(!(jQuery.browser.msie&&typeof XMLHttpRequest=='function'))return this;var a='<iframe class="bgiframe" src="javascript:;" tabindex="-1" '+'style="display:block; position:absolute; '+'top: expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)  || 0) * -1) + \'px\'); '+'left:expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth) || 0) * -1) + \'px\'); '+'z-index:-1; filter:Alpha(Opacity=\'0\'); '+'width:expression(this.parentNode.offsetWidth + \'px\'); '+'height:expression(this.parentNode.offsetHeight + \'px\')"/>';return this.each(function(){if(!jQuery('iframe.bgiframe',this)[0])this.insertBefore(document.createElement(a),this.firstChild)})};(function($){var j=$.preload=function(c,d){if(c.split)c=$(c);d=$.extend({},j.defaults,d);var f=$.map(c,function(a){if(!a)return;if(a.split)return d.base+a+d.ext;var b=a.src||a.href;if(typeof d.placeholder=='string'&&a.src)a.src=d.placeholder;if(b&&d.find)b=b.replace(d.find,d.replace);return b||null});var g={loaded:0,failed:0,next:0,done:0,total:f.length};if(!g.total)return finish();var h='<img/>',thres=d.threshold;while(--thres>0)h+='<img/>';h=$(h).load(handler).error(handler).bind('abort',handler).each(fetch);function handler(e){g.found=e.type=='load';g.image=this.src;var a=g.original=c[this.index];g[g.found?'loaded':'failed']++;g.done++;if(d.placeholder&&a.src)a.src=g.found?g.image:d.notFound||a.src;if(d.onComplete)d.onComplete(g);if(g.done<g.total)fetch(0,this);else{if(h.unbind)h.unbind('load').unbind('error').unbind('abort');h=null;finish()}};function fetch(i,a,b){if($.browser.msie&&g.next&&g.next%j.gap==0&&!b){setTimeout(function(){fetch(i,a,true)},0);return false}if(g.next==g.total)return false;a.index=g.next;a.src=f[g.next++];if(d.onRequest){g.image=a.src;g.original=c[g.next-1];d.onRequest(g)}};function finish(){if(d.onFinish)d.onFinish(g)}};j.gap=14;j.defaults={threshold:2,base:'',ext:'',replace:''};$.fn.preload=function(a){j(this,a);return this}})(jQuery);//!!!!
function _uGetOffset(obj){if(!obj)return{'left':0,'top':0};var left_offset=obj.offsetLeft;var top_offset=obj.offsetTop;if(!left_offset&&!top_offset&&obj.offsetParent==null){left_offset=parseInt(obj.style.left);top_offset=parseInt(obj.style.top);}else while((obj=obj.offsetParent)!=null){left_offset+=obj.offsetLeft;top_offset+=obj.offsetTop;}return{'left':left_offset,'top':top_offset};}function _uMenu(id,par,group){this.init(id,par,group);}_uMenu.get=function(id){var o=$('#'+id)[0];if(o)return o._umenu;return null;};_uMenu.show=function(id,par,tp,mid,dy,dx){var o=_uMenu.get(id);if(o)o.show_menu(par,tp,mid,dy,dx);};_uMenu.hide=function(id,c){var o=_uMenu.get(id);if(o)if(!c)o.hide_menu();else o.hide_child();};_uMenu.hideAll=function(e){var gr;with(_uMenu.prototype){for(gr in have_active){if(have_active[gr]&&!donothide[gr])for(var i in all_menus[gr])_uMenu.hide(i);have_active[gr]='';donothide[gr]=false;}}};_uMenu.showOver=function(id,par,tp,mid,dy,dx){var o=_uMenu.get(id);if(o){var gr=o.group;with(_uMenu.prototype){if(timerid2[gr])clearTimeout(timerid2[gr]);if(have_active[gr].length>0&&have_active[gr].indexOf(","+id+",")==-1)o.show_menu(par,tp,mid,dy,dx);}}};_uMenu.schedule_hidechild=function(id){var o=_uMenu.get(id);if(o){var gr=o.group;with(_uMenu.prototype){if(timerid2[gr])clearTimeout(timerid2[gr]);timerid2[gr]=setTimeout("_uMenu.hide('"+id+"',1);_uMenu.prototype.timerid2['"+gr+"']=0;",800);}}};_uMenu.prototype={donothide:[],all_menus:[],have_active:[],timerid:[],timerid2:[],global_set:false,init:function(id,par,group){this.id=id;this.obj=$('#'+id)[0];if(!this.obj)return;this.obj._umenu=this;if(!par)par=id;this.parentid=par;if(!group)group='def';this.group=group;this.obj.style.display='none';$(this.obj).bind("click",this,function(e){e.data.donothide[e.data.group]=true;});if(this.all_menus[group]==undefined)this.all_menus[group]=[];if(this.have_active[group]==undefined)this.have_active[group]='';this.all_menus[group][id]=this;if(!this.global_set){$(document).bind("click",_uMenu.hideAll);$(window).bind("resize",_uMenu.hideAll);_uMenu.prototype.global_set=true;}},show_menu:function(par,tp,mid,dy,dx){var ddX=0;var ddY=0;if(this.timerid2[this.group])clearTimeout(this.timerid2[this.group]);if(this.have_active[this.group].indexOf(","+this.id+",")>=0){this.hide_menu();return;}if(!dy)dy=0;if(!dx)dx=0;if(mid){ddX=$('#'+mid)[0].offsetLeft;ddY=$('#'+mid)[0].offsetTop;}this.allmenus_hidenp();if(!par)par=this.obj.parentNode;else par=$('#'+par)[0];var pos=_uGetOffset(par);pos['left']+=dx-ddX;pos['top']+=dy-ddY;if(tp=='r')pos['left']+=par.offsetWidth-4;else pos['top']+=par.offsetHeight+1;var ww=$(window).width();with(this.obj.style){left=pos['left']+'px';top=pos['top']+'px';display='';visibility='visible';};try{if(pos['left']+this.obj.offsetWidth>ww){pos['left']=ww-this.obj.offsetWidth-5;this.obj.style.left=pos['left']+'px';}}catch(e){}if(!this.have_active[this.group])this.have_active[this.group]='';this.have_active[this.group]+=','+this.id+',';if(this.timerid[this.group])clearTimeout(this.timerid[this.group]);this.donothide[this.group]=true;this.timerid[this.group]=setTimeout("with(_uMenu.prototype){donothide['"+this.group+"']=false;timerid['"+this.group+"']=null;};",100);},allmenus_hidenp:function(){var parents={};var id=this.id;while(this.all_menus[this.group][id]&&this.all_menus[this.group][id].parentid!=id&&id){parents[this.all_menus[this.group][id].parentid]=1;id=this.all_menus[this.group][id].parentid;}for(var i in this.all_menus[this.group]){if(parents[i]==1)continue;this.all_menus[this.group][i].hide_menu();}},hide_menu:function(){with(this){hide_child();var x=have_active[group].indexOf(","+id+",");if(x>=0)have_active[group]=have_active[group].substring(0,x);obj.style.display='none';obj.style.visibility='hidden';}},hide_child:function(){with(this){for(var i in all_menus[group])if(all_menus[group][i].parentid==id&&i!=id)all_menus[group][i].hide_menu();}}};function _uMENU(name,pos,opts,elems,noinit){this.constructor=_uMENU;this.name=name;this.pos=$.extend({pos:null,alignObj:null,align:'d',parent:null,dx:0,dy:0,childdy:0,childdx:0},pos||{});this.props=$.extend({parentnode:null,design:_uMENU.defdesign||'std',hidden:opts.statical&&elems&&elems.length>0?0:1,shadow:1,addclass:'',withmarks:null,highlight:1,statical:opts.horiz?1:0,hidetimer:0,horiz:0,noabs:0,width:0,onshow:null,onhide:null,ondestroy:null,onitem:null,onldown:null,onrdown:null,thispar:null,wnd:null,rtl:0},opts||{});this.state={visible:false,init:false,destroyed:false};this.design=this.props.design&&_uMENU.designs[this.props.design]?_uMENU.designs[this.props.design]:_uMENU.designs['std'];this.idx=_uMENU.nextidx++;_uMENU.all[this.idx]=this;if(!this.pos.parent)this.zpos=_uMENU.defz;else this.zpos=this.pos.parent.zpos+5;this.xpos=this.ypos=0;this.width=10;this.height=10;this.elems=[];this.add_elems=elems&&elems.length>0?[elems]:[];this.del_elems=[];this.pend_show=null;this.appendtimer=null;this.decor={w:0,h:0};this.frame=null;this.childtimer=null;this.sh=null;this.have_active=null;this.hidetimer=null;var t=document.createElement("div");t.id="_umenu"+this.idx;if(!this.props.parentnode)$($("body")[0]).prepend(t);else this.props.parentnode.appendChild(t);this.top=t;$(t).addClass("x-unselectable").css({visibility:'hidden',display:'block'});var m=document.createElement("div");t.appendChild(m);this.menu=m;if(!this.props.noabs){$(t).css({position:'absolute',zIndex:this.zpos});if($.browser.msie&&parseFloat($.browser.version)<7){var html='<iframe tabindex="-1" '+'style="display:block; position:absolute; '+'filter:Alpha(Opacity=\'0\'); '+'width:'+this.width+'px'+'height:'+this.height+'px;border:0"/>';this.frame=document.createElement(html);t.appendChild(this.frame);}if(this.props.shadow&&!this.props.horiz&&(!$.browser.msie||$.browser.version>6)){this.shadow_init();this._resizeSh();}$(m).css({position:"absolute",zIndex:2,left:0});}$(m).css("width","50px").bind("mousedown",this,_uMENU._onmenumousedown);this.parts=this.design.menu_init(m,this.props.horiz?10:50,this.props,this.pos.parent);if(!_uMENU.globalset){_uMENU.globalset=true;$(document).bind("mousedown",_uMENU.hideallmenus);$(window).bind("resize",_uMENU.hideallmenus);}this.toinit=[];this.tocalcsize=[];this.createsubmenus();if(!this.props.hidden)this.show();if(!noinit)setTimeout("var m=_uMENU.all["+this.idx+"];if(m)m.init1();",10);}_uMENU.all=[];_uMENU.nextidx=0;_uMENU.lastz=0;_uMENU.defz=20050;_uMENU.defdesign='std';_uMENU.globalset=false;_uMENU.ignoreclick=null;_uMENU.getbyname=function(name){var a=this.all;for(var i=0;i<a.length;i++)if(a[i]&&a[i].name==name)return a[i];return null;};_uMENU.designs={std:{sh_sz:[4,2],shadow_init:function(top){var sh=[];for(var i=0;i<3;i++){sh[i]=document.createElement("div");top.appendChild(sh[i]);$(sh[i]).attr("class","x-sh").css("position","absolute").css("z-index",1);}$(sh[0]).addClass("xsl").css({width:(this.sh_sz[0]+this.sh_sz[1])+"px",left:(-this.sh_sz[0])+"px",top:"0px"}).html('<div class="xstl"><div class="xsml"></div></div>');$(sh[1]).addClass("xsr").css({width:(this.sh_sz[0]+this.sh_sz[1])+"px",top:"0px"}).html('<div class="xstr"><div class="xsmr"></div></div>');$(sh[2]).addClass("xsb").css({height:(this.sh_sz[0]+this.sh_sz[1])+"px",left:(-this.sh_sz[0])+"px"}).html('<div class="xsbl"><div class="xsbr"><div class="xsbc"></div></div></div>');return sh;},shadow_resize:function(sh,w,h){$(sh[0]).css({height:(h-this.sh_sz[1])+"px"});$(sh[1]).css({height:(h-this.sh_sz[1])+"px",left:(w-this.sh_sz[1])+"px"});$(sh[2]).css({width:(w+this.sh_sz[0]*2)+"px",top:(h-this.sh_sz[1])+"px"});},shadow_hide:function(sh){$(sh[0]).add(sh[1]).add(sh[2]).hide();},shadow_show:function(sh){$(sh[0]).add(sh[1]).add(sh[2]).show();},menu_init:function(menu,inith,props,parent){var p={};if(!props.horiz){$(menu).attr("class","u-menu"+(props.addclass?' '+String(props.addclass):'')+(props.withmarks?' u-menumarks':''));if($.browser.msie)$(menu).css("overflow","hidden");$(menu).html((parent&&parent.props.horiz?'':'<div class="xw-tl"><div class="xw-tr"><div class="xw-tc xw-tsps"></div></div></div>')+'<div class="xw-ml"><div class="xw-mr"><div class="xw-mc"><div class="u-menubody">'+'<div class="u-menucont" style="overflow:visible;height:'+inith+'px"></div></div></div></div></div>'+'<div class="xw-bl"><div class="xw-br"><div class="xw-bc"><div class="xw-footer"></div></div></div></div>');}else{$(menu).attr("class","u-menuh"+(props.addclass?' '+String(props.addclass):'')+(props.withmarks?' u-menumarks':'')).css("overflow","hidden");$(menu).html('<div class="u-menubody"><div class="u-menucont" style="overflow:hidden;height:'+inith+'px"></div></div>');}p.content=$(".u-menucont",menu)[0];p.elems=[];p.marks=[];$(menu).find("div,span").andSelf().attr("unselectable","on");return p;},append_item:function(o,el,hl){var i=o.elems.length,a,txt,act=null,mark,actl,actr;act=el[1]||el[2].action||o.props.onitem;actl=el[2].onldown||o.props.onldown;actr=el[2].onrdown||o.props.onrdown;txt=el[0];if(el[2].hl!=undefined)hl=el[2].hl;if(o.props.withmarks&&txt!='sep'&&el[2].mark!=undefined){txt='<div class="u-menumark"></div>'+txt;mark=1;}if(act&&(act=='a'||el[2].action=='a')){a=document.createElement('a');$(a).css('display','block');}else a=document.createElement('div');if(!o.props.horiz){if(txt=='sep')a.className='u-menuvsep';else{a.className='u-menuvitem';if(!act||act.constructor!=_uMENU){$(a).html(txt);if(hl)$(a).bind("mouseover",{hl:hl,item:-1,obj:o},_uMENU._onitemmouseover).bind("mouseout",{hl:hl,item:-1,obj:o},_uMENU._onitemmouseout);if(act)$(a).bind("click",{act:act,obj:o,item:i,itemobj:el},_uMENU._onitemclick);if(actl||actr)$(a).bind("mousedown",{actl:actl,actr:actr,obj:o,item:i,itemobj:el},_uMENU._onitemmousedown);}else{$(a).addClass('u-menuvitemparent').html('<div class="u-menuarrow"></div>'+txt);$(a).bind("mouseover",{hl:hl,item:i,obj:o},_uMENU._onitemmouseover).bind("mouseout",{hl:hl,item:i,obj:o},_uMENU._onitemmouseout);$(a).bind("mousedown",{child:act,obj:o,item:i,itemobj:el},_uMENU._onitemclick);if(el[2].action)$(a).bind("click",{act:el[2].action,obj:o,item:i,itemobj:el},_uMENU._onitemclick);if(actl||actr)$(a).bind("mousedown",{actl:actl,actr:actr,obj:o,item:i,itemobj:el},_uMENU._onitemmousedown);}}}else{$(a).css("float","left");if(txt=='sep')a.className='u-menuhsep';else{a.className='u-menuhitem';if(!act||act.constructor!=_uMENU){$(a).html(txt);if(hl)$(a).bind("mouseover",{hl:hl,item:i,obj:o},_uMENU._onitemmouseover).bind("mouseout",{hl:hl,item:i,obj:o},_uMENU._onitemmouseout);if(act)$(a).bind("click",{act:act,obj:o,item:i,itemobj:el},_uMENU._onitemclick);if(actl||actr)$(a).bind("mousedown",{actl:actl,actr:actr,obj:o,item:i,itemobj:el},_uMENU._onitemmousedown);}else{$(a).addClass('u-menuhitemparent').html(txt);$(a).bind("mouseover",{hl:hl,item:i,obj:o},_uMENU._onitemmouseover).bind("mouseout",{hl:hl,item:i,obj:o},_uMENU._onitemmouseout);$(a).bind("mousedown",{child:act,obj:o,item:i,itemobj:el},_uMENU._onitemclick);if(el[2].action)$(a).bind("click",{act:el[2].action,obj:o,item:i,itemobj:el},_uMENU._onitemclick);if(actl||actr)$(a).bind("mousedown",{actl:actl,actr:actr,obj:o,item:i,itemobj:el},_uMENU._onitemmousedown);}}}if(hl)$(a).find("*").andSelf().filter('[nodeType=1]').attr("unselectable","on");o.elems[i]=el;o.parts.elems[i]=a;if(mark)o.parts.marks[i]=$('.u-menumark',a)[0];if(o.props.horiz&&(o.props.rtl||window._rtl))o.parts.content.insertBefore(a,o.parts.content.firstChild);else o.parts.content.appendChild(a);},calc_size:function(o){var w=0,h=0,hm=0,prevm=0;if(!o.props.horiz){for(var i=0;i<o.parts.elems.length;i++){w=Math.max(w,Math.max(o.parts.elems[i].offsetWidth,o.parts.elems[i].scrollWidth));hm+=Math.max(prevm,parseInt('0'+$(o.parts.elems[i]).css('margin-top'),10));prevm=parseInt('0'+$(o.parts.elems[i]).css('margin-bottom'),10);h+=o.parts.elems[i].offsetHeight;}h+=hm+prevm;}else for(var i=0;i<o.parts.elems.length;i++){w+=Math.max(o.parts.elems[i].offsetWidth,o.parts.elems[i].scrollWidth);h=Math.max(h,o.parts.elems[i].offsetHeight);}return{w:w,h:h};},_onitemmouseover:function(e){$(this).addClass("u-menuitemhl");},_onitemmouseout:function(e){$(this).removeClass("u-menuitemhl");}}};_uMENU._onitemmouseover=function(e){var d=e.data;if(d.hl)d.obj.design._onitemmouseover.apply(this,[e]);if(d.obj.hidetimer)clearTimeout(d.obj.hidetimer);d.obj.hidetimer=null;if(d.item>=0)if(!d.obj.props.horiz||d.obj.have_active)d.obj.schedule_childopen(d.item);};_uMENU._onitemmouseout=function(e){var d=e.data;if(d.hl)d.obj.design._onitemmouseout.apply(this,[e]);d.obj.reset_childopen();};_uMENU._onitemclick=function(e){var d=e.data,act=d.itemobj[1]||d.itemobj[2].action||d.obj.props.onitem;if(!d.child&&act){if(!d.obj.props.statical)d.obj.hide(true);else d.obj.hidechildren();if(act.constructor==Function)act.apply(d.itemobj[2].thispar||d.obj.props.thispar,[d.item,d.obj,d.itemobj[2].id,d.itemobj[2],e]);else if(act=='a'){var l=null;if(this==e.target||e.target.tagName.toLowerCase()!='a'){if(this!=e.target){var c1=$(e.target).find('*').andSelf(),c2=$(this).find('*').not(c1);if(c2.filter("A").length==0)l=$("a",this)[0];else l=null;}else l=$("a",this)[0];if(l){this.target=l.target;this.href=l.href;if(l.onclick)return l.onclick();}}if(!l)this.removeAttribute('href');}return;}if(!d.child)return;_uMENU.ignoreclick=d.child;d.obj.reset_childopen();d.obj.hidechildren(d.child);if(d.child.state.visible)d.child.hide();else d.obj.childopen(d.item,d.itemobj[2]);};_uMENU._onitemmousedown=function(e){var d=e.data,actl=d.actl||d.obj.props.onldown,actr=d.actr||d.obj.props.onrdown;if(e.which==1&&e.ctrlKey)e.which=3;if(e.which==1&&actl){_uWnd.globalmousedown();actl.apply(d.itemobj[2].thispar||d.obj.props.thispar,[d.item,d.obj,d.itemobj[2].id,d.itemobj[2],e]);e.stopPropagation();}else if(e.which==3&&actr){actr.apply(d.itemobj[2].thispar||d.obj.props.thispar,[d.item,d.obj,d.itemobj[2].id,d.itemobj[2],e]);_uWnd.globalmousedown();e.preventDefault();e.stopPropagation();}};_uMENU.hideallmenus=function(){var i,m,ig;loop:for(i=0;i<_uMENU.all.length;i++){m=_uMENU.all[i];if(!m||!m.state.visible||m.props.statical)continue;ig=_uMENU.ignoreclick;while(ig){if(ig==m)continue loop;ig=ig.pos.parent;}m.hide();}if(_uMENU.ignoreclick)setTimeout("_uMENU.ignoreclick=null;",10);};_uMENU._onmenumousedown=function(e){if(!_uMENU.ignoreclick)_uMENU.ignoreclick=e.data;};_uMENU.prototype={shadow_init:function(){this.sh=this.design.shadow_init(this.top);},_resizeSh:function(){if(this.sh)this.design.shadow_resize(this.sh,this.width,this.height);},moveTo:function(x,y){with(this){$(top).css("left",x+'px').css("top",y+'px');xpos=x;ypos=y;}},resizeTo:function(w,h){with(this){if(props.width==0)$(menu).css("width",w+'px');else if(props.width!='auto')$(menu).css("width",props.width);else $(menu).css("width",'auto');if(props.horiz){$(menu).css("height",h+'px');$(parts.content).css("width",(w-decor.w)+'px').css("height",(h-decor.h)+'px');}else{$(parts.content).css("width",(w-decor.w)+'px');}if(frame)$(frame).css("width",w+'px').css("height",h+'px');width=w;height=h;_resizeSh();}},init1:function(nocalcsize){with(this){decor.w=50-parts.content.offsetWidth;decor.h=menu.offsetHeight-(props.horiz?10:50);state.init=true;_initsubmenus();if(add_elems)appendItems(null,0,nocalcsize);else if(pend_show)show(pend_show);}},show:function(pos){if(this.state.destroyed)return;if(!this.state.init){this.pend_show=pos||{};return;}this.pend_show=null;this.pos=$.extend(this.pos,pos||{});if(!this.pos.parent)this.zpos=_uMENU.defz;else this.zpos=this.pos.parent.zpos+5;$(this.top).css("z-index",this.zpos);if(this.pos.pos||this.pos.alignObj){var a,pos,ow,oh;if(this.pos.alignObj){a=this.pos.alignObj;pos=$(a).offset();ow=a.offsetWidth;oh=a.offsetHeight;}else{pos={left:this.pos.pos.x,top:this.pos.pos.y};ow=oh=0;}var ppos,x,y,d=_uWnd.getdims(),ww=d.clientW,wh=d.clientH,wl=d.clientLeft,wt=d.clientTop,al=this.pos.align||'d';if(this.props.wnd&&this.props.wnd.desktop){d=this.props.wnd.desktop;ww=d.width;wh=d.height;wl=0;wt=0;}if(this.props.rtl||window._rtl)x=pos.left+ow+this.pos.dx-this.width;else x=pos.left+this.pos.dx;y=pos.top+this.pos.dy;if(al=='r'||al=='R')x=pos.left+ow+this.pos.dx;else if(al=='l'||al=='L')x=pos.left-this.width+this.pos.dx;else if(al=='d'||al=='D')y=pos.top+oh+this.pos.dy;else if(al=='u'||al=='U')y=pos.top-this.height+this.pos.dy;if(x-wl+this.width>ww-3-this.design.sh_sz[0]||x-wl<1)if(al=='R'||al=='U')x=pos.left-this.width-this.pos.dx;else if(al=='L')x=pos.left+ow-this.pos.dx;if(x-wl+this.width>ww-3)x=ww-3-this.design.sh_sz[0]-this.width+wl;if(x-wl<1)x=1+wl;if(y-wt+this.height>wh-3-this.design.sh_sz[1]||y-wt<1)if(al=='D')y=pos.top-this.height-this.pos.dy;else if(al=='U')y=pos.top+oh-this.pos.dy;if(y-wt+this.height>wh-3)y=wh-3-this.design.sh_sz[1]-this.height+wt;if(y-wt<1)y=1+wt;if(this.props.parentnode){ppos=$(this.props.parentnode).offset();x-=ppos.left;y-=ppos.top;}this.moveTo(x,y);}if(this.props.onshow)this.props.onshow.apply(this.props.thispar,[this,this.idx]);if(this.props.withmarks){for(var i=0;i<this.elems.length;i++){var c=this.elems[i];if(c&&c[2]&&this.parts.marks[i]){if(!c[2].mark)this.parts.marks[i].style.display='none';else{var m=c[2].marktext||this.props.withmarks;if(typeof m=='object'&&m.constructr!=String)m=m[c[2].mark];this.parts.marks[i].innerHTML=String(m);this.parts.marks[i].style.display='block';}}}}$(this.top).show();this.state.visible=true;if(this.pos.parent)this.pos.parent.have_active=this;if(this.props.hidetimer>0)this.hidetimer=setTimeout("var m=_uMENU.all["+this.idx+"];if(m)m.hide();",this.props.hidetimer);},hidechildren:function(except){if(this.state.destroyed)return;var e=this.elems;for(var i=0;i<e.length;i++)if(e[i]&&e[i].constructor==Array&&e[i][1]&&e[i][1].constructor==_uMENU)if(e[i][1]!=except)e[i][1].hide();},hide:function(withpar){if(this.state.destroyed)return;if(!this.state.visible)return;$(this.top).hide();this.state.visible=false;if(this.hidetimer)clearTimeout(this.hidetimer);this.hidetimer=null;this.pend_show=null;this.hidechildren();if(this.pos.parent&&this.pos.parent.have_active==this)this.pos.parent.have_active=null;if(this.props.onhide)this.props.onhide.apply(this.props.thispar,[this,this.idx]);if(withpar){var p=this.pos.parent;while(p&&!p.props.statical&&p!=this){p.hide(false);p=p.pos.parent;}}},childopen:function(i){if(this.state.destroyed)return;if(this.childtimer)clearTimeout(this.childtimer);this.childtimer=null;var h=this.parts.elems[i];var c=this.elems[i];if(!c)return;c=c[1];if(!c||c.constructor!=_uMENU){if(this.props.horiz){this.hidechildren(c);this.have_active=this;}return;}this.hidechildren(c);c.show({dx:(this.props.horiz?0:-3*(this.props.rtl||window._rtl?-1:1)),alignObj:h,align:(this.props.horiz?'D':(this.props.rtl||window._rtl?'L':'R')),parent:this});},schedule_childopen:function(i){if(this.state.destroyed)return;if(this.childtimer)clearTimeout(this.childtimer);this.childtimer=setTimeout("var m=_uMENU.all["+this.idx+"];if(m)m.childopen("+i+");",100);},reset_childopen:function(){if(this.childtimer)clearTimeout(this.childtimer);},_initsubmenus:function(){with(this){for(var i=0;i<toinit.length;i++){toinit[i].init1(true);tocalcsize[tocalcsize.length]=toinit[i];}toinit.length=0;}},_calcsizesubmenus:function(){with(this){for(var i=0;i<tocalcsize.length;i++)tocalcsize[i]._setsize();tocalcsize.length=0;}},createsubmenus:function(){var i,was=false;for(i=0;i<this.add_elems.length;i++){var el=this.add_elems[i];var n=el.length;for(var j=0;j<n;j++){if(el[j]&&el[j].constructor==Array&&el[j][1]&&el[j][1].constructor==Array){var o={},pos,opts,s;if(el[j][2]&&(typeof el[j][2])=='object')o=el[j][2];else if((typeof el[j][2])=='number')o={hl:el[j][2]};else if((typeof el[j][2])=='string')o={id:el[j][2]};el[j][2]=o;pos=$.extend({parent:this,dx:this.props.horiz?this.pos.childdx:0,dy:this.props.horiz?this.pos.childdy:0},o.pos||{});opts=$.extend({shadow:this.props.shadow,rtl:this.props.rtl?1:0,parentnode:this.props.wnd?this.props.wnd.top:this.props.parentnode,wnd:this.props.wnd,onitem:this.props.onitem,thispar:this.props.thispar},o.opts||{});s=new _uMENU('',pos,opts,el[j][1],true);el[j][1]=s;this.toinit[this.toinit.length]=s;was=true;}}}return was;},indexById:function(id){id=String(id);for(var i=0;i<this.elems.length;i++)if(this.elems[i][2].id==id)return i;return-1;},removeItems:function(idx,nodestroy,norecalc){var i,p,e;if(idx==undefined||idx==null){idx=[];for(i=0;i<this.elems.length;i++)idx[i]=this.elems.length-1-i;}else if(idx.constructor!=Array)idx=[idx];for(i=0;i<idx.length;i++)if(idx[i]==undefined||idx[i]==null||idx[i].constructor!=Number)idx[i]=this.indexById(idx[i]);idx.sort(function(a,b){return b-a;});p=-1;for(i=0;i<idx.length;i++){if(idx[i]==p||idx[i]<0||idx[i]>=this.elems.length)continue;e=this.elems[idx[i]];if(!nodestroy&&e&&e.constructor==Array&&e[1]&&e[1].constructor==_uMENU)e[1].destroy();this.elems.splice(idx[i],1);this.parts.elems[idx[i]].parentNode.removeChild(this.parts.elems[idx[i]]);this.parts.elems.splice(idx[i],1);p=idx[i];}if(!norecalc)this.appendItems(null,0);},appendItems:function(el,idx,nocalcsize){if(this.state.destroyed)return;if(el&&el.constructor==Array&&el.length>0)this.add_elems[this.add_elems.length]=el;if(!this.state.init)return;if(this.createsubmenus()){setTimeout("var m=_uMENU.all["+this.idx+"];if(m){m._initsubmenus();m.appendItems(null,0,"+nocalcsize+");}",10);return;}if(this.appendtimer)clearTimeout(this.appendtimer);this.appendtimer=null;$(this.top).css("visibility",'hidden').css("display",'block');if(this.props.horiz){if(!this.props.noabs)$(this.menu).css("width","2100px").css("height","auto");else $(this.menu).css("width",this.props.width==0?"auto":this.props.width=='auto'?'auto':this.props.width+"px");$(this.parts.content).css("width","2000px").css("height","auto");}else{$(this.menu).css("width","auto").css("height","auto");$(this.parts.content).css("width",$.browser.msie?"50px":"auto").css("height","auto");}var i;for(i=0;i<this.add_elems.length;i++){el=this.add_elems[i];var n=el.length;for(var j=0;j<n;j++){if(!el[j]||el[j].constructor!=Array)el[j]=[''+el[j]];var o={};if(el[j][2]&&(typeof el[j][2])=='object')o=el[j][2];else if((typeof el[j][2])=='number')o={hl:el[j][2]};else if((typeof el[j][2])=='string')o={id:el[j][2]};el[j][2]=o;this.design.append_item(this,el[j],this.props.highlight);}}this.add_elems.splice(0,i);if(!nocalcsize)this.appendtimer=setTimeout("var m=_uMENU.all["+this.idx+"];if(m){m.appendtimer=null;m._setsize();}",10);},_setsize:function(){var d=this.design.calc_size(this);this.resizeTo(d.w+this.decor.w,d.h+this.decor.h);this._calcsizesubmenus();$(this.top).css("display",'none').css("visibility",'visible');if(this.pend_show||this.state.visible)this.show(this.pend_show);if(this.onsetsize){var a=this.onsetsize;this.onsetsize=null;if(this.props.wnd)a.apply(this.props.wnd);}},destroy:function(){if(this.state.destroyed)return;this.top.parentNode.removeChild(this.top);_uMENU.all[this.idx]=null;this.state.destroyed=true;if(this.props.ondestroy)this.props.ondestroy.apply(this.props.thispar,[this,this.idx]);}};function _uComboBox(name,inputId,opts,cols,vals){this.constructor=_uComboBox;this.name=name;this.obj=document.getElementById(inputId);if(!this.obj)return null;this.props=$.extend({design:'std',readonly:false,noicons:-1,deficon:null,maxlistheight:'auto',colwidth:null,onchange:null,rtl:0},opts||{});this.textvals=cols>0?cols:0;this.tablecols=cols<=0?1:cols;this.colwidth=this.props.colwidth||[];this.destroyed=false;this.design=this.props.design&&_uComboBox.designs[this.props.design]?_uComboBox.designs[this.props.design]:_uComboBox.designs['std'];this.idx=_uComboBox.nextidx++;_uComboBox.all[this.idx]=this;this.data=vals||[];var defIdx=-1;for(var i=0;i<this.data.length;i++)if(this.data[i][2]){defIdx=i;break;}this.userInput=this.prevInput=this.obj.value;if(this.props.readonly){this.obj.readOnly=true;this.valobj=$('<input type="hidden" name="'+this.obj.name+'" value="">')[0];this.obj.removeAttribute('name');if(this.obj.form)this.obj.form.appendChild(this.valobj);if(defIdx<0||defIdx>=this.data.length)defIdx=0;}else{this.obj.readOnly=false;this.valobj=this.obj;if(defIdx<0||defIdx>=this.data.length)defIdx=-1;}this.selected=this.userIdx=defIdx;this.changetimer=null;this.haveicons=this.props.noicons>0;if(this.props.noicons<0)for(var i=0;i<this.data.length;i++)if(this.data[i][1]){this.haveicons=true;break;}this.frame=null;this.opened=false;this.updated=true;this.showtimer=null;this.blurtimer=null;this.cancelblur=false;this.combo=null;var t=document.createElement("div");t.id="_ucombolist"+this.idx;this.toplist=t;$(t).css({position:'absolute',zIndex:5,display:'none'});if($.browser.msie&&parseFloat($.browser.version)<7){var html='<iframe tabindex="-1" '+'style="display:block; position:absolute; '+'filter:Alpha(Opacity=\'0\'); '+'width:1px;height:1px;border:0"/>';this.frame=document.createElement(html);t.appendChild(this.frame);}this.parts=this.design.combo_init(this);$(this.obj).attr("autocomplete","off").bind("focus",this,_uComboBox._onobjfocus).bind("blur",this,_uComboBox._onobjblur).bind("beforedeactivate",this,_uComboBox._onobjdeact).bind("keydown",this,function(e){return e.data.onkeydown(e);}).bind("keyup",this,function(e){return e.data.onkeyup(e);});$(this.combo).bind("mousedown",this,_uComboBox._oncombomousedown);$(this.toplist).bind("mousedown",this,_uComboBox._onlistmousedown);for(var i=0;i<this.data.length;i++)this.appendItem(this.data[i]);if(!_uComboBox.globalset){_uComboBox.globalset=true;$(document).bind("mousedown",_uComboBox.hideall);$(window).bind("resize",_uComboBox.hideall);}if(defIdx>=0)this.select(defIdx,false,true);}_uComboBox.all=[];_uComboBox.nextidx=0;_uComboBox.defz=20015;_uComboBox.globalset=false;_uComboBox.ignoreclick=null;_uComboBox.getbyname=function(name){var a=this.all;for(var i=0;i<a.length;i++)if(a[i]&&a[i].name==name)return a[i];return null;};_uComboBox.hideall=function(){var a=_uComboBox.all;for(var i=0;i<a.length;i++)if(a[i]&&!a[i].destroyed&&_uComboBox.ignoreclick!=a[i])a[i].hidelist();if(_uComboBox.ignoreclick)setTimeout("_uComboBox.ignoreclick=null;",10);};_uComboBox.designs={std:{combo_init:function(o){var p={};o.combo=$('<table id="_ucombo'+o.idx+'" style="position:relative" cellspacing="0" cellpadding="0" border="0" class="x-unselectable u-combo" align="left">'+'<tr><td class="u-comboeditcell"></td><td class="u-combobutcell"><div class="u-combobut"></td></tr>'+'</table>')[0];o.obj.parentNode.insertBefore(o.combo,o.obj);o.obj.parentNode.insertBefore(o.toplist,o.obj);p.editcell=$(o.combo).find(".u-comboeditcell")[0];p.button=$(o.combo).find(".u-combobut")[0];p.butcell=$(o.combo).find(".u-combobutcell")[0];p.editcell.appendChild(o.obj);$(o.obj).attr("class","x-selectable u-comboedit"+(o.haveicons?" u-comboeditimg":"")+" "+$(o.obj).attr("class"));$(o.toplist).append('<div class="u-combolist"><div style="zoom:1"><table border="0" cellspacing="0" class="x-unselectable u-combocont" width="100%"></table></div></div>');p.list=$(o.toplist).find(".u-combolist")[0];p.content=$(o.toplist).find(".u-combocont")[0];if(!o.props.readonly)$(p.button).bind("mousedown",o,_uComboBox._onbutclick);else{$(o.obj).bind("mousedown",function(e){e.preventDefault();return 0;});}$(p.button).bind("mouseover",o.design._onbutmouseover).bind("mouseout",o.design._onbutmouseout);p.items=[];$(o.toplist).find("div,span,table").andSelf().attr("unselectable","on");return p;},append_item:function(o,el){var row,cell,t=o.parts.content,i=t.rows.length,txt;row=o.parts.items[i]=t.insertRow(i);$(row).attr("class","u-comborow").bind("mouseover",{item:i,obj:o},_uComboBox._onitemmouseover).bind("mouseout",{item:i,obj:o},_uComboBox._onitemmouseout).bind("click",{obj:o,item:i},_uComboBox._onitemclick);for(var j=0;j<o.tablecols;j++){cell=row.insertCell(j);txt=j+3<o.data[i].length?o.data[i][j+3]:(j==0?o.data[i][0]:' ');if(j==0&&o.data[i][1])txt='<img class="u-comborowicon" border="0" src="'+o.data[i][1]+'">'+txt;$(cell).attr("class","u-combocell"+j).html(txt);if(o.colwidth[j])$(cell).attr("width",o.colwidth[j]);}$(row).find("*").andSelf().attr("unselectable","on");},calc_size:function(o){var w=0,h=0;if(!o.props.horiz){for(var i=0;i<o.parts.elems.length;i++){w=Math.max(w,Math.max(o.parts.elems[i].offsetWidth,o.parts.elems[i].scrollWidth));h+=o.parts.elems[i].offsetHeight;}}else{for(var i=0;i<o.parts.elems.length;i++){w+=Math.max(o.parts.elems[i].offsetWidth,o.parts.elems[i].scrollWidth);h=Math.max(h,o.parts.elems[i].offsetHeight);}}return{w:w,h:h};},_onitemmouseover:function(e){$(this).addClass("u-comborowhl");},_onitemmouseout:function(e){$(this).removeClass("u-comborowhl");},_onbutmouseover:function(){$(this).addClass("u-combobuthl");},_onbutmouseout:function(){$(this).removeClass("u-combobuthl");},_onlistopen:function(o){$(o.combo).addClass("u-comboopen");},_onlisthide:function(o){$(o.combo).removeClass("u-comboopen");},_onfocus:function(o,e){$(o.combo).addClass("u-combofocus");},_onblur:function(o,e){$(o.combo).removeClass("u-combofocus");},_select:function(o,i){$(o.parts.items[i]).addClass("u-comborowsel");},_deselect:function(o,i){$(o.parts.items[i]).removeClass("u-comborowsel");},seticon:function(o,icon){if(icon)$(o.obj).css("background-image","url("+icon+")");else $(o.obj).css("background-image",o.props.deficon?"url("+o.props.deficon+")":"none")}}};_uComboBox._onitemmouseover=function(e){var d=e.data;d.obj.design._onitemmouseover.apply(this,[e]);};_uComboBox._onitemmouseout=function(e){var d=e.data;d.obj.design._onitemmouseout.apply(this,[e]);};_uComboBox._onitemclick=function(e){var d=e.data;d.obj.select(d.item);d.obj.hidelist();d.obj.obj.focus();e.stopPropagation();e.preventDefault();};_uComboBox._onbutclick=function(e){var o=e.data;if(o.opened)o.hidelist();else o.showlist();o.obj.focus();if($.browser.msie&&!e.data.cancelblur){e.data.cancelblur=true;setTimeout("var c=_uComboBox.all["+e.data.idx+"];if(c)c.cancelblur=false;",10);}e.preventDefault();};_uComboBox._onlistmousedown=function(e){_uComboBox.ignoreclick=e.data;e.data.obj.focus();if($.browser.msie&&!e.data.cancelblur){e.data.cancelblur=true;setTimeout("var c=_uComboBox.all["+e.data.idx+"];if(c)c.cancelblur=false;",10);}e.preventDefault();};_uComboBox._oncombomousedown=function(e){_uComboBox.ignoreclick=e.data;if(e.which!=1)return;var o=e.data;if(o.props.readonly)if(o.opened)o.hidelist();else o.showlist();o.obj.focus();if($.browser.msie&&!o.cancelblur){o.cancelblur=true;setTimeout("var c=_uComboBox.all["+o.idx+"];if(c)c.cancelblur=false;",10);}if(e.target!=o.obj)e.preventDefault();};_uComboBox._onobjfocus=function(e){var o=e.data;if(o.blurtimer)clearTimeout(o.blurtimer);o.blurtimer=null;o.design._onfocus(o,e);};_uComboBox._onobjblur=function(e){e.data.onblur();};_uComboBox._onobjdeact=function(e){var o=e.data;if(o.cancelblur)e.preventDefault();};_uComboBox.isUpKey=function(code){return code==38||code==63232;};_uComboBox.isDownKey=function(code){return code==40||code==63233;};_uComboBox.prototype={_setvalue:function(i){with(this){if(i>=0&&i<data.length){valobj.value=prevInput=data[i][0];if(props.readonly)obj.value=data[i].length>3?data[i][3]:data[i][0];if(haveicons)design.seticon(this,data[i][1]);}else{if(props.readonly){valobj.value='';obj.value=userInput;}else{valobj.value=prevInput=userInput;}if(haveicons)this.design.seticon(this,null);}}},_selectitem:function(i){with(this){if(selected>=0&&selected<data.length){design._deselect(this,selected);selected=-1;}if(i>=0&&i<data.length){design._select(this,i);selected=i;}}},setvalue:function(v){with(this){var ch=false;if(changetimer)clearTimeout(changetimer);if(props.readonly)return;if(valobj.value!=v)ch=true;valobj.value=prevInput=userInput=v;if(selected!=-1)ch=true;_selectitem(-1);userIdx=-1;if(haveicons)this.design.seticon(this,null);if(props.onchange&&ch)props.onchange.apply(this,[selected,v]);}},select:function(i,soft){with(this){var ch=false;if(changetimer)clearTimeout(changetimer);changetimer=null;_selectitem(i);_setvalue(selected);if(!soft){if(selected!=userIdx)ch=true;userIdx=selected;if(props.onchange&&ch)props.onchange.apply(this,[selected,valobj.value]);}}},onblur:function(e){if(this.blurtimer)clearTimeout(this.blurtimer);this.blurtimer=setTimeout("var c=_uComboBox.all["+this.idx+"];if(c)c._onblur2();",10);},_onblur2:function(e){this.blurtimer=null;this.design._onblur(this,e);},onkeydown:function(e){var i;with(this){var c=e.keyCode;if(c==27&&opened){select(userIdx,true);hidelist();return false;}if(data.length==0)return;if(c==13){select(selected);hidelist();obj.focus();e.preventDefault();e.stopPropagation();return false;}if(c==9){if(changetimer)select(selected);return;}if(_uComboBox.isDownKey(c)||_uComboBox.isUpKey(c)){i=selected+(_uComboBox.isDownKey(c)?1:-1);if(props.readonly){if(i>=data.length)i=0;else if(i<0)i=data.length-1;}else{if(i>=data.length)i=-1;else if(i<-1)i=data.length-1;}select(i,true);if(!opened)changetimer=setTimeout("var c=_uComboBox.all["+this.idx+"];if(c)c.select("+i+");",500);return false;}}},onkeyup:function(e){with(this){if(props.readonly||obj.value==prevInput)return;if(changetimer)clearTimeout(changetimer);prevInput=userInput=obj.value;_selectitem(-1);userIdx=-1;if(haveicons)this.design.seticon(this,null);if(props.onchange)props.onchange.apply(this,[-1,obj.value]);}},appendItem:function(elem){this.design.append_item(this,elem);this.updated=true;},hidelist:function(){this.toplist.style.display='none';this.opened=false;this.design._onlisthide(this);},showlist:function(){var w=this.combo.offsetWidth;$(this.toplist).css({left:this.combo.offsetLeft+'px',top:this.combo.offsetTop+this.combo.offsetHeight+'px',width:w+'px'});if(this.frame)$(this.frame).css({width:w+'px'});if(this.updated){$(this.parts.list).css({height:'auto',overflow:'hidden'});$(this.toplist).css({visibility:'hidden'}).css({display:'block'});if(this.showtimer)clearTimeout(this.showtimer);this.showtimer=setTimeout("var c=_uComboBox.all["+this.idx+"];if(c)c._showlist();",10);}else{this.toplist.style.display='block';}this.design._onlistopen(this);this.opened=true;this.updated=false;},_showlist:function(){this.showtimer=null;var o=this.parts.list,h,maxh,pos,d=_uWnd.getdims();h=Math.max(o.scrollHeight,o.offsetHeight);pos=$(this.toplist).offset();if(this.props.maxlistheight>0)maxh=Math.max(50,Math.min(this.props.maxlistheight,d.clientH-pos.top));else maxh=Math.max(50,d.clientH-pos.top);if(h>maxh){$(this.parts.list).css({height:maxh+'px',overflow:'auto'});h=maxh;}if(this.frame)$(this.frame).css({height:h+'px'});$(this.toplist).css({visibility:'visible'});}};function _uSuggestList(name,inputId,opts,vals){this.constructor=_uSuggestList;this.name=name;this.obj=typeof inputId=='string'?document.getElementById(inputId):inputId;if(!this.obj)return null;this.props=$.extend({design:'std',maxlistheight:'auto',colwidth:null,cachegroup:'def',minlen:2,url:null,separator:null},opts||{});this.colwidth=this.props.colwidth||[];this.design=this.props.design&&_uSuggestList.designs[this.props.design]?_uSuggestList.designs[this.props.design]:_uSuggestList.designs['std'];this.idx=_uSuggestList.nextidx++;_uSuggestList.all[this.idx]=this;this.cacheGroup=this.props.cachegroup;if(!this.queryCache[this.cacheGroup])this.queryCache[this.cacheGroup]=[];if(vals)this.queryCache[this.cacheGroup]=vals;this.visible=true;this.hlIndex=-1;this.hlRow=null;this.blockMouseOver=false;this.userInput=this.obj.value;this.previousInput=this.obj.value;this.resultInput="";this.requestedInput="";this.ignoreInput="";this.sep_pos=-1;this.remoteReqTimer=null;this.hideTimer=null;this.AJAXretries=0;this.AJAXTimer=null;this.frame=null;var t=document.createElement("div");t.id="_usuggest"+this.idx;this.top=t;var wnd;if(wnd=_uWnd.findparent(this.obj)){this.parent=wnd.top;this.parent.appendChild(t);}else{this.parent=this.obj.parentNode;this.parent.insertBefore(t,this.obj);}$(t).css({position:'absolute',zIndex:5,display:'none',zoom:1});if(0&&$.browser.msie&&parseFloat($.browser.version)<7){var html='<iframe tabindex="-1" '+'style="display:block; position:absolute;'+'filter:Alpha(Opacity=\'100\'); '+'width:1px;height:20px;border:0"/>';this.frame=document.createElement(html);t.appendChild(this.frame);}this.parts=this.design.suggest_init(this);$(this.obj).attr("autocomplete","off").css("position","relative").bind("blur",this,function(e){return e.data.onblur(e);}).bind("keydown",this,function(e){return e.data.onkeydown(e);}).bind("keyup",this,function(e){return e.data.onkeyup(e);});if(!_uSuggestList.globalset){_uSuggestList.globalset=true;$(document).bind("mousedown",_uSuggestList.hideall);$(window).bind("resize",_uSuggestList.hideall);}this.hide();if(this.obj.form){$(this.obj.form).bind("submit."+this.idx,this,function(e){return e.data.onsubmitform(e);});}}_uSuggestList.all=[];_uSuggestList.nextidx=0;_uSuggestList.defz=20015;_uSuggestList.globalset=false;_uSuggestList.ignoreclick=null;_uSuggestList.getbyname=function(name){var a=this.all;for(var i=0;i<a.length;i++)if(a[i]&&a[i].name==name)return a[i];return null;};_uSuggestList.hideall=function(){var a=_uSuggestList.all;for(var i=0;i<a.length;i++)if(a[i]&&!a[i].destroyed&&_uSuggestList.ignoreclick!=a[i])a[i].hide();if(_uSuggestList.ignoreclick)setTimeout("_uSuggestList.ignoreclick=null;",10);};_uSuggestList.designs={std:{suggest_init:function(o){var p={};$(o.obj).attr("class","x-selectable u-suggedit "+$(o.obj).attr("class"));$(o.top).append('<div class="u-sugglist" style="zoom:1"><div style="zoom:1"><table border="0" cellspacing="0" class="x-unselectable u-suggcont" width="100%"></table></div></div>');p.list=$(o.top).find(".u-sugglist")[0];p.content=$(o.top).find(".u-suggcont")[0];$(o.top).find("div,span,table").andSelf().attr("unselectable","on");return p;},append_row:function(o,item,cols,key){var row=o.parts.content.insertRow(-1);$(row).bind("mousedown",o,o._onrowmousedown).bind("mousemove",o,o._onrowmousemove).bind("mouseover",o,o._onrowmouseover).addClass('u-suggrow').attr("usuggeststr",item[0]);var v=String(item[0]);if(v.toLowerCase().substr(0,key.length)==key.toLowerCase())v='<span class="u-suggmark">'+v.substr(0,key.length)+'</span>'+v.substr(key.length);for(var j=0;j<cols;j++){$(row).append("<td unselectable='on' class='u-suggcell"+j+"'>"+(j==0?v:item[j])+"</td>");}},_select:function(o,row){$(row).addClass("u-suggrowhl");},_deselect:function(o,row){$(row).removeClass("u-suggrowhl");}}};_uSuggestList.prototype={queryCache:[],onsubmitform:function(e){if(this.visible){if(this.resultInput!="")this.obj.value=this.userInput;this.hide();}},hide:function(){with(this){top.style.display='none';visible=false;if(hlRow)design._deselect(this,hlRow);hlRow=null;hlIndex=-1;}},show:function(){with(this){if(!visible&&numItems()>0){var w=obj.offsetWidth,x,y,off,offp;off=$(obj).offset();offp=$(parent).offset();$(top).css({left:off.left-offp.left+'px',top:off.top-offp.top+obj.offsetHeight+'px',width:w+'px'});if(frame)$(frame).css({width:w+'px'});top.style.display='block';visible=true;blockMouseOver=true;}}},numItems:function(){return this.parts.content?this.parts.content.rows.length:0;},onblur:function(e){with(this){if(visible){if(hlIndex>=0)obj.value=userInput;hide();}}},onkeydown:function(e){with(this){var c=e.keyCode;if(c==27&&visible){if(resultInput!="")_setvalue_sep(userInput);hide();return false;}if(resultInput=="")return;if(c==13&&hlIndex>=0&&visible){previousInput=obj.value;userInput=_getvalue_sep();resetRequest(userInput);hide();if(userInput!=resultInput)clearResult();obj.focus();e.preventDefault();e.stopPropagation();return false;}if(isDownKey(c)){moveSelection(hlIndex+1);return false;}if(isUpKey(c)){moveSelection(hlIndex-1);return false;}}},onkeyup:function(e){with(this){if(ignoreInput!=""&&_getvalue_sep()==ignoreInput)return;if(obj.value==previousInput)return;ignoreInput=resultInput="";previousInput=obj.value;userInput=_getvalue_sep();if(hideTimer)clearTimeout(hideTimer);hideTimer=setTimeout("var c=_uSuggestList.all["+idx+"];if(c)c.clearResult(true);",2000);procRequest(userInput);}},_setvalue_sep:function(v){with(this){if(sep_pos>=0)obj.value=obj.value.substr(0,sep_pos)+props.separator+' '+v;else obj.value=v;}},_getvalue_sep:function(){with(this){if(props.separator)sep_pos=obj.value.lastIndexOf(props.separator);if(sep_pos>=0){var t=obj.value.substr(sep_pos+props.separator.length);t=t.replace(/^\s+/,"");return t;}else return obj.value;}},moveSelection:function(newi){with(this){if(resultInput==""&&ignoreInput!=""&&_getvalue_sep()==ignoreInput){procRequest(_getvalue_sep(),true);return;}if(!visible&&resultInput.length>0&&resultInput==_getvalue_sep()){show();return;}if(!visible)return;if(hlRow)design._deselect(this,hlRow);hlRow=null;var cnt=numItems();if(newi>=cnt)newi=-1;else if(newi<-1)newi=cnt-1;if(newi==-1){hlIndex=-1;_setvalue_sep(userInput);obj.focus();return;}hlIndex=newi;hlRow=parts.content.rows[newi];design._select(this,hlRow);ignoreInput=$(hlRow).attr("usuggeststr");_setvalue_sep(ignoreInput);}},isUpKey:function(code){return code==38||code==63232;},isDownKey:function(code){return code==40||code==63233;},resetRequest:function(txt){with(this){if(remoteReqTimer&&requestedInput==txt)return;clearTimeout(remoteReqTimer);remoteReqTimer=null;requestedInput=txt;clearTimeout(AJAXTimer);AJAXTimer=null;try{if(AJAXObj)AJAXObj.abort();AJAXObj=null;}catch(e){};}},procRequest:function(txt,nopause){with(this){resetRequest(txt);if(txt.length<props.minlen){clearResult(true);return;}if(queryCache[cacheGroup][txt]){setResult(txt,queryCache[cacheGroup][txt]);return;}AJAXretries=0;if(!props.url)return;if(nopause)remoteRequest();else remoteReqTimer=setTimeout("var c=_uSuggestList.all["+this.idx+"];if(c)c.remoteRequest();",350);}},remoteRequest:function(){with(this){clearTimeout(remoteReqTimer);remoteReqTimer=null;try{if(AJAXObj)AJAXObj.abort();AJAXObj=null;}catch(e){};if(AJAXretries>1)return;clearTimeout(AJAXTimer);AJAXTimer=setTimeout("var c=_uSuggestList.all["+this.idx+"];if(c){c.AJAXretries++;c.remoteRequest();}",12000);AJAXObj=$.ajax({type:"GET",dataType:"text",cache:false,url:props.url,data:{tag:requestedInput},success:new Function("resp","status","var c=_uSuggestList.all["+this.idx+"];if(c)c.parseRequest(resp,status);"),timeout:10000});}},parseRequest:function(resp,status){clearTimeout(this.AJAXTimer);this.AJAXTimer=null;this.AJAXretries=0;var res=[];try{res=eval("res="+resp);}catch(e){}this.AJAXObj=req=null;if(!res||res.length<2||res[1]<1||res[1]>10){this.clearResult();return;}var n=res[1],idx=0;var data=[];for(var i=2;i<res.length;i+=n,idx++){data[idx]=[];for(var j=0;j<n;j++){data[idx][j]=res[i+j];}}this.queryCache[this.cacheGroup][res[0]]=data;if(res[0]==this.requestedInput)this.setResult(res[0],this.queryCache[this.cacheGroup][res[0]]);},_onrowmousemove:function(e){return e.data.onrowmousemove(e);},_onrowmouseover:function(e){return e.data.onrowmouseover(e);},_onrowmousedown:function(e){return e.data.onrowmousedown(e);},onrowmousemove:function(e){if(this.blockMouseOver){this.blockMouseOver=false;this.onrowmouseover(e);}},onrowmouseover:function(e){with(this){if(blockMouseOver)return;if(hlRow)design._deselect(this,hlRow);hlRow=null;hlIndex=-1;for(var i=0;i<parts.content.rows.length;i++){if(parts.content.rows[i]==e.target||jQuery.inArray(e.target,$(parts.content.rows[i]).contents())>=0){hlIndex=i;hlRow=parts.content.rows[i];design._select(this,hlRow);break;}}}},onrowmousedown:function(e){with(this){if(numItems()<=0||!hlIndex<0||!hlRow)return;ignoreInput=userInput=$(hlRow).attr("usuggeststr");_setvalue_sep(userInput);previousInput=obj.value;resetRequest(userInput);hide();if(userInput!=resultInput)clearResult();obj.focus();}},setResult:function(phrase,table){with(this){if(hideTimer)clearTimeout(hideTimer);hideTimer=null;clearResult();hlIndex=-1;hlRow=null;resultInput=phrase;var cnt=table.length;if(cnt<=0){hide();return;}var cols=table[0].length;for(var i=0;i<cnt;i++){design.append_row(this,table[i],cols,phrase);}show();}},clearResult:function(hide){with(this){if(hide)hide();resultInput="";hlRow=null;hlIndex=-1;while(parts.content.rows.length>0)parts.content.deleteRow(-1);}}};function _uDraggable(obj,onmove,oninitdrag,onstartdrag,onstopdrag){this.par=obj;this.x=this.y=this.w=this.h=this.m=0;this.moved=false;this.active=false;this.onmove=onmove||_uDraggable.dummy;this.oninitdrag=oninitdrag||_uDraggable.dummy;this.onstartdrag=onstartdrag||_uDraggable.dummy;this.onstopdrag=onstopdrag||_uDraggable.dummy;if(!_uDraggable.globalset){_uDraggable.globalset=true;$(document).bind("mouseup",_uDraggable.onmouseup);$(document).bind("mousemove",_uDraggable.onmousemove);}}_uDraggable.dummy=function(){};_uDraggable.obj=null;_uDraggable.clkX=0;_uDraggable.clkY=0;_uDraggable.scrL=0;_uDraggable.scrT=0;_uDraggable.globalset=false;_uDraggable.onmousemove=function(e){with(_uDraggable){var o=obj;if(!o)return;if(e.which!=1){o.stop();obj=null;return;}e.stopPropagation();e.preventDefault();var d=_uWnd.getdims();o.event=e;if(!o.moved&&(e.clientX!=clkX||e.clientY!=clkY)){o.onstartdrag.apply(o.par,[o.x,o.y,o.w,o.h,o.m]);o.moved=true;}o.onmove.apply(o.par,[e.clientX-clkX-(scrL-d.clientLeft),e.clientY-clkY-(scrT-d.clientTop),o.x,o.y,o.w,o.h,o.m]);o.event=null;return false;}};_uDraggable.onmouseup=function(e){if(e.which!=1)return;with(_uDraggable){var o=obj;if(!o)return;if(o.moved)onmousemove(e);o.event=e;o.stop();o.event=null;obj=null;}};_uDraggable.prototype={start:function(e,x,y,w,h,m){var r=_uDraggable;if(r.obj)r.obj.onstopdrag.apply(r.obj.par);this.x=x;this.y=y;this.w=w;this.h=h;this.m=m;this.active=true;this.moved=false;r.obj=this;var d=_uWnd.getdims();r.clkX=e.clientX;r.clkY=e.clientY;r.scrL=d.clientLeft;r.scrT=d.clientTop;this.oninitdrag.apply(this.par,[x,y,w,h,m]);},stop:function(){var r=_uDraggable;if(r.obj==this)r.obj=null;if(this.active){this.onstopdrag.apply(this.par,[this.x,this.y,this.w,this.h,this.m]);this.active=false;}}};function _uTabCtrl(name,ntabs,opts,titles,datas,topts){this.constructor=_uTabCtrl;this.name=name;this.ntabs=ntabs;this.props=$.extend({parentnode:null,wnd:null,app:opts&&opts.wnd&&opts.wnd.app||null,width:'auto',height:'auto',min_height:50,active_tab:-1,close:0,design:'std',noinit:false,markload:'<div align="left"><div class="myWinLoad"></div></div>',emptycontent:'',onload:null,onshow:null,onhide:null,onbeforechange:null,onchange:null,onbeforeclose:null,onclose:null,ondestroy:null,onresize:null,rtl:0},opts||{});this.app=this.props.app;this.state={init:false,destroyed:false};this.design=this.props.design&&_uTabCtrl.designs[this.props.design]?_uTabCtrl.designs[this.props.design]:_uTabCtrl.designs['std'];this.idx=_uTabCtrl.nextidx++;_uTabCtrl.all[this.idx]=this;this.width=parseInt(this.props.width)||0;this.height=parseInt(this.props.height)||0;this.data=[];this.pend_show=null;this.decor={cdw:0,cdh:0,pdw:0,pdh:0,ph:0};this.maxid=0;this.wnd=null;this.active_tab=this.props.active_tab;this.scrollpos={tabswidth:0,havewidth:0,pos:null};for(var i=0;i<ntabs;i++){var opt=(topts&&topts[i])||{};var id=opt.id||'';if(!id||id.length==0)id='_tc'+this.idx+'tb'+(this.maxid++);this.data[i]={id:id,title:(titles&&titles[i])||'.',dat:(datas&&datas[i])||'',cont:null,markloadcont:null,obj:null,ishidden:opt.hidden,clbut:null,link:null,href:opt.href,target:opt.target,label:null,close:opt.close==undefined?this.props.close:opt.close,icon:opt.icon,markload:opt.markload,firstload:0,onload:opt.onload==undefined?this.props.onload:opt.onload,onshow:opt.onshow==undefined?this.props.onshow:opt.onshow,onhide:opt.onhide==undefined?this.props.onhide:opt.onhide,onbeforechange:opt.onbeforechange==undefined?this.props.onbeforechange:opt.onbeforechange,onchange:opt.onchange==undefined?this.props.onchange:opt.onchange,onbeforeclose:opt.onbeforeclose==undefined?this.props.onbeforeclose:opt.onbeforeclose,onclose:opt.onclose==undefined?this.props.onclose:opt.onclose};}if(!_uTabCtrl.globalset){_uTabCtrl.globalset=true;}this.butdown=new _uDraggable(this,null,null,null,function(but,tab){this.design._onbuttonup(this,but,tab);});if(!this.props.noinit)this.init();}_uTabCtrl.all=[];_uTabCtrl.nextidx=0;_uTabCtrl.globalset=false;_uTabCtrl.getbyname=function(name){var a=this.all;for(var i=0;i<a.length;i++)if(a[i]&&a[i].name==name)return a[i];return null;};_uTabCtrl.closeTab=function(name,idx){var w=this.getbyname(name);if(w)w.closeTab(idx);};_uTabCtrl.content=function(name,idx,c){var w=this.getbyname(name);if(w)w.content(idx,c)};_uTabCtrl.setTitle=function(name,idx,t){var w=this.getbyname(name);if(w)w.setTitle(idx,t)};_uTabCtrl.designs={std:{tabctrl_init:function(o){var p={};$(o.top).attr('class',"x-unselectable u-tabc").html('<div class="u-tabc-p"><div class="u-tabc-listp"><div class="u-tabc-list"></div><div class="u-tabc-pbot"></div></div><div class="u-tabc-scrbut"><div class="u-tabc-tabl"><div class="u-tabc-label"><div class="u-tabc-scrl"></div><div class="u-tabc-scrr"></div></div></div></div></div>'+'<div class="u-tabc-body"><div class="u-tabc-content" style="height:'+o.props.min_height+'px">'+o.props.emptycontent+'</div></div>');p.pane=$(o.top).find(".u-tabc-p")[0];p.panebot=$(o.top).find(".u-tabc-pbot")[0];p.listp=$(o.top).find(".u-tabc-listp")[0];p.list=$(o.top).find(".u-tabc-list")[0];p.scrbut=$(o.top).find(".u-tabc-scrbut")[0];p.scrl=$(o.top).find(".u-tabc-scrl")[0];p.scrr=$(o.top).find(".u-tabc-scrr")[0];p.body=$(o.top).find(".u-tabc-body")[0];p.emptycontent=p.content=$(o.top).find(".u-tabc-content")[0];$(o.top).find("div,span").andSelf().attr("unselectable","on");$(p.scrl).bind("click mousedown mouseover mouseout",{obj:o,but:0},_uTabCtrl._onscrbutevent);$(p.scrr).bind("click mousedown mouseover mouseout",{obj:o,but:1},_uTabCtrl._onscrbutevent);return p;},remove_item:function(o,idx){o.parts.list.removeChild(o.data[idx].obj);},set_title:function(o,idx){$(o.data[idx].label).html((o.data[idx].icon?'<img class="u-tabc-icon" border="0" src="'+o.data[idx].icon+'">':($.browser.msie&&$.browser.version<8?'<img class="u-tabc-spacer" src="/img/1px.gif" width="1" height="1" border="0">':''))+o.data[idx].title);},insert_item:function(o,idx){var a=document.createElement('div');$(a).attr('class','u-tabc-tab'+(o.data[idx].close?' u-tabc-wcl':'')).html((o.data[idx].href?'<a '+(o.data[idx].target?'target="'+o.data[idx].target+'" ':'')+'href="'+o.data[idx].href+'" class="u-tabc-tabl" style="display:block">':'<div class="u-tabc-tabl">')+(o.data[idx].close?'<div class="u-tabc-closebut"></div>':'')+'<div class="u-tabc-tabr"><div class="u-tabc-label">'+(o.data[idx].icon?'<img class="u-tabc-icon" border="0" src="'+o.data[idx].icon+'">':($.browser.msie&&$.browser.version<8?'<img class="u-tabc-spacer" src="/img/1px.gif" width="1" height="1" border="0">':''))+o.data[idx].title+'</div></div>'+(o.data[idx].href?'</a>':'</div>'));o.data[idx].obj=a;o.data[idx].label=$(a).find(".u-tabc-label")[0];o.data[idx].link=$(a).find(".u-tabc-tabl")[0];if(o.data[idx].close){o.data[idx].clbut=$(a).find(".u-tabc-closebut")[0];$(o.data[idx].clbut).bind("mouseover",this._onclbutmouseover).bind("mouseout",this._onclbutmouseout).bind("click",{obj:o,tab:o.data[idx]},_uTabCtrl._onclbutclick).bind("mousedown",{obj:o,tab:o.data[idx]},_uTabCtrl._onclbutdown);}$(o.data[idx].link).bind("mouseover",this._ontabmouseover).bind("mouseout",this._ontabmouseout).bind("mousedown",{obj:o,tab:o.data[idx]},_uTabCtrl._ontabclick);$(a).find("div,span,a,img").andSelf().attr("unselectable","on");if(o.data[idx].ishidden)a.style.display='none';var nc=o.parts.list.childNodes.length;o.parts.list.insertBefore(a,idx>=nc?null:o.parts.list.childNodes[idx]);},_ontabmouseover:function(e){$(this.parentNode).addClass("u-tabc-tab-over");},_ontabmouseout:function(e){$(this.parentNode).removeClass("u-tabc-tab-over");},_onclbutmouseover:function(e){$(this).addClass("u-tabc-closebut-over");},_onclbutmouseout:function(e){$(this).removeClass("u-tabc-closebut-over");},_onclbutmousedown:function(b,v){if(v)$(b).addClass("u-tabc-closebut-down");else $(b).removeClass("u-tabc-closebut-down");},_ontabactivate:function(o,idx){$(o.data[idx].obj).addClass("u-tabc-tab-act");},_ontabdeactivate:function(o,idx){$(o.data[idx].obj).removeClass("u-tabc-tab-act");},_onscrbutactivate:function(o,but,v){if(v)$(!but?o.parts.scrl:o.parts.scrr).removeClass("u-tabc-scr-dis");else $(!but?o.parts.scrl:o.parts.scrr).addClass("u-tabc-scr-dis");},_onscrbutover:function(o,but,v){var b=!but?o.parts.scrl:o.parts.scrr;if(v)$(b).addClass("u-tabc-scr-over");else $(b).removeClass("u-tabc-scr-over");},_onscrbutdown:function(o,but,v){var b=!but?o.parts.scrl:o.parts.scrr;if(v)$(b).addClass("u-tabc-scr-down");else $(b).removeClass("u-tabc-scr-down");},_onbuttonup:function(o,but,tab){if(but<2)this._onscrbutdown(o,but,0);else this._onclbutmousedown(tab.clbut,0);}}};_uTabCtrl._onclbutdown=function(e){if(e.which==1){e.stopPropagation();e.data.obj.design._onclbutmousedown(e.data.tab.clbut,1);e.data.obj.butdown.start(e,2,e.data.tab);}_uWnd.globalmousedown();};_uTabCtrl._onscrbutevent=function(e){var o=e.data.obj,but=e.data.but;if(e.type=='click'&&e.which==1)o.scrollTabPane(but?40:-40);else if(e.type=='mouseover')o.design._onscrbutover(o,but,1);else if(e.type=='mouseout')o.design._onscrbutover(o,but,0);else if(e.type=='mousedown'&&e.which==1){o.design._onscrbutdown(o,but,1);o.butdown.start(e,but);}};_uTabCtrl._onclbutclick=function(e){var d=e.data,o=d.obj;for(var i=0;i<o.data.length;i++)if(o.data[i]==d.tab){if(typeof o.data[i].onbeforeclose=='function')if(!o.data[i].onbeforeclose.call(o.app,o,i,o.data[i].id))break;o.closeTab(i);break;}e.preventDefault();e.stopPropagation();};_uTabCtrl._ontabclick=function(e){var d=e.data,o=d.obj;e.preventDefault();for(var i=0;i<o.data.length;i++)if(o.data[i]==e.data.tab){if(i==o.active_tab)return;if(typeof o.data[i].onbeforechange=='function')if(!o.data[i].onbeforechange.call(o.app,o,i,o.data[i].id))break;o.activateTab(i);break;}};_uTabCtrl.prototype={init:function(noinit){var t=document.createElement("div");t.id="_utabctrl"+this.idx;if(this.props.parentnode)this.props.parentnode.appendChild(t);else if(this.props.wnd){var ww=this.props.wnd.parts.wndcont;while(ww.firstChild)ww.removeChild(ww.firstChild);ww.appendChild(t);this.wnd=this.props.wnd;this.wnd.tabctrl=this;this.wnd.state.loaded=true;}else $($("body")[0]).append(t);this.top=t;$(t).css({visibility:'hidden',display:'block'});if(this.width>0)$(t).css('width',this.width+'px');this.parts=this.design.tabctrl_init(this);this.parts.markloadcont=null;this.show();if(!noinit)setTimeout("var m=_uTabCtrl.all["+this.idx+"];if(m)m.init1();",10);},init1:function(noresize){var p=this.parts,d=this.decor;if(!(this.width>0))this.width=this.top.offsetWidth;if(!(this.height>0))this.height=this.top.offsetHeight;d.cdw=this.top.offsetWidth-p.content.offsetWidth;d.cdh=this.top.offsetHeight-p.content.offsetHeight;d.pdw=this.top.offsetWidth-p.listp.offsetWidth;if(!this.props.wnd&&!noresize){$(this.top).css('height',this.height+'px');$(p.content).css({width:(this.top.offsetWidth-d.cdw)+'px',height:(this.top.offsetHeight-d.cdh)+'px'});$(p.listp).css({width:(this.top.offsetWidth-d.pdw)+'px'});}$(p.listp).css({overflow:'hidden'});$(p.panebot).css('width','4000px');$(p.list).css('width','4000px');for(var i=0;i<this.ntabs;i++)this.design.insert_item(this,i);if(this.props.wnd)this.resizeTo(this.props.wnd.width-this.props.wnd.decor.w,this.props.wnd.height-this.props.wnd.decor.h);var at=this.active_tab;this.active_tab=-1;if(at=='auto')if(this.name&&this.name.length>0&&self.location.hash.length>1){var u=self.location.hash.substr(1).split(';');var s='T_'+this.name+'=';for(var ui=0;ui<u.length;ui++)if(u[ui].length>s.length&&u[ui].substr(0,s.length)==s){var tb=this.idxbyid(u[ui].substr(s.length));if(tb>=0&&tb<this.data.length){at=tb;break;}}}else at=-1;$(this.top).css("display",'block').css("visibility",'visible');if(at==-1&&this.data.length>0)at=0;if(at>=0&&at<this.ntabs){for(var i=0;i<this.ntabs;i++){var j=(at+i)%this.ntabs;if(!this.data[j].ishidden&&(!this.data[j].onbeforechange||!!this.data[j].onbeforechange(this,j,this.data[j].id))){this.activateTab(j,true);break;}}}else this.activateTab(-1,true);$(this.top).css("display",'none').css("visibility",'visible');this.state.init=true;if(pend_show)this.show(pend_show[0]);if(this.props.wnd)this.props.wnd.onexternalload();},scrollTabPane:function(dx){var pos=this.scrollpos.pos+=dx;var w=this.scrollpos.tabswidth,havew=this.scrollpos.havewidth;if(w<havew){this.design._onscrbutactivate(this,0,0);this.design._onscrbutactivate(this,1,0);if((this.props.rtl||window._rtl)&&this.data.length>0){pos=this.data[this.data.length-1].obj.offsetLeft+havew-w;}else pos=0;this.scrollpos.pos=pos;this.parts.listp.scrollLeft=pos;}else{if(this.props.rtl||window._rtl){var ol=this.data[this.data.length-1].obj.offsetLeft;if(pos<ol)pos=ol;else if(pos>ol+w-havew)pos=ol+w-havew;}else if(pos<0)pos=0;else if(pos>w-havew)pos=w-havew;this.scrollpos.pos=pos;this.parts.listp.scrollLeft=pos;if(pos>0)this.design._onscrbutactivate(this,0,1);else this.design._onscrbutactivate(this,0,0);if(pos<w-havew)this.design._onscrbutactivate(this,1,1);else this.design._onscrbutactivate(this,1,0);}},_setscrolls:function(){var w=0,havew=this.parts.listp.offsetWidth;if(this.parts.listp.clientWidth>0&&this.parts.listp.clientWidth<havew)havew=this.parts.listp.clientWidth;if(this.data.length>0){var o=this.data[this.data.length-1];if(this.props.rtl||window._rtl){var o2=this.data[0];w=o2.obj.offsetLeft+o2.obj.offsetWidth-o.obj.offsetLeft;}else w=o.obj.offsetLeft+o.obj.offsetWidth;}if(havew<w){this.parts.scrbut.style.display='block';havew-=this.parts.scrbut.offsetWidth;}else this.parts.scrbut.style.display='none';if(this.scrollpos.pos==null){if((this.props.rtl||window._rtl)&&this.data.length>0)this.scrollpos.pos=this.data[this.data.length-1].obj.offsetLeft+w-havew;else this.scrollpos.pos=0;}else if(this.scrollpos.havewidth!=havew)if(this.props.rtl||window._rtl)this.scrollpos.pos+=this.scrollpos.havewidth-havew;this.scrollpos.havewidth=havew;this.scrollpos.tabswidth=w;this.scrollTabPane(0);},show:function(rel){if(!this.state.init){pend_show=[rel];return;}$(this.top).show();this.state.visible=true;},resizeTo:function(w,h){this.width=w;this.height=h;var d=this.decor;$(this.top).width(w).height(h);$(this.parts.content).css({width:(w-d.cdw)+'px',height:(h-d.cdh)+'px'});$(this.parts.listp).css({width:(w-d.pdw)+'px'});if(this.props.onresize)this.props.onresize(w-d.cdw,h-d.cdh,this,this.name);this._setscrolls();},addTab:function(title,dat,topt,idx){var i=idx!=undefined&&idx>=0&&idx<this.data.length?idx:this.data.length;var opt=topt||{};var id=opt.id||'';if(!id||id.length==0)id='_tc'+this.idx+'tb'+(maxid++);var data={id:id,title:title||'.',dat:dat||'',cont:null,markloadcont:null,obj:null,ishidden:opt.hidden,clbut:null,link:null,href:opt.href,target:opt.target,label:null,close:opt.close==undefined?this.props.close:opt.close,icon:opt.icon,markload:opt.markload,firstload:0,onload:opt.onload==undefined?this.props.onload:opt.onload,onshow:opt.onshow==undefined?this.props.onshow:opt.onshow,onhide:opt.onhide==undefined?this.props.onhide:opt.onhide,onbeforechange:opt.onbeforechange==undefined?this.props.onbeforechange:opt.onbeforechange,onchange:opt.onchange==undefined?this.props.onchange:opt.onchange,onbeforeclose:opt.onbeforeclose==undefined?this.props.onbeforeclose:opt.onbeforeclose,onclose:opt.onclose==undefined?this.props.onclose:opt.onclose};if(i<this.data.length)this.data.splice(i,0,data);else this.data[i]=data;this.design.insert_item(this,i);this._setscrolls();return i;},tabHidden:function(idx,ishidden){idx=this.idxbyid(idx);if(idx<0||idx>=this.data.length)return;var a=this.data[idx];a.obj.style.display=ishidden?'none':'';a.ishidden=!!ishidden;this._setscrolls();},activateTab:function(idx,first){idx=this.idxbyid(idx);if(idx<0||idx>=this.data.length||this.active_tab==idx)if(first&&this.data.length>0)idx=0;else return;this.design._ontabactivate(this,idx);if(this.active_tab>=0&&this.active_tab<this.data.length){if(typeof this.data[this.active_tab].onhide=='function')this.data[this.active_tab].onhide.call(this.app,this,this.active_tab,this.data[this.active_tab].id);this.design._ontabdeactivate(this,this.active_tab);}this.active_tab=idx;this._setscrolls();if(typeof this.data[idx].onchange=='function')if(!this.data[idx].onchange.call(this.app,this,idx,this.data[idx].id))return;this.load(idx);},closeTab:function(idx){idx=this.idxbyid(idx);if(idx<0||idx>=this.data.length)return;if(idx==this.active_tab&&typeof this.data[idx].onhide=='function')this.data[idx].onhide.call(this.app,this,idx,this.data[idx].id);this.design.remove_item(this,idx);var id=this.data[idx].id;var f=this.data[idx].onclose;this.data.splice(idx,1);if(idx==this.active_tab){this.active_tab=-1;if(idx==this.data.length)if(idx==0)this._assign_content(-1);else this.activateTab(idx-1);else this.activateTab(idx);}else if(idx<this.active_tab)this.active_tab--;this._setscrolls();if(f)f(this,idx,id);},setTitle:function(idx,title){idx=this.idxbyid(idx);if(idx<0||idx>=this.data.length)return;this.data[idx].title=title;this.design.set_title(this,idx);this._setscrolls();},content:function(idx,c){idx=this.idxbyid(idx);if(idx<0||idx>=this.data.length)return;if(!this.data[idx].cont){this.data[idx].cont=document.createElement('DIV');$(this.data[idx].cont).addClass("u-tabc-content");}$(this.data[idx].cont).html(c);this.data[idx].firstload=1;if(idx==this.active_tab)this._assign_content(idx);},_assign_content:function(idx,altcont){if(altcont)this.parts.content=altcont;else if(idx<0)this.parts.content=this.parts.emptycontent;else this.parts.content=this.data[idx].cont;$(this.parts.content).css({width:(this.width-this.decor.cdw)+'px',height:(this.height-this.decor.cdh)+'px'});this.parts.body.replaceChild(this.parts.content,this.parts.body.firstChild);if(!altcont&&idx>=0&&typeof this.data[idx].onload=='function'&&this.data[idx].firstload)this.data[idx].onload.call(this.app,this,idx,this.data[idx].id);if(!altcont&&idx>=0&&typeof this.data[idx].onshow=='function')this.data[idx].onshow.call(this.app,this,idx,this.data[idx].id);this.data[idx].firstload=0;},markload:function(idx,txt){idx=this.idxbyid(idx);if(idx<0||idx>=this.data.length)return;var c;if(this.data[idx].markload){if(!this.data[idx].markloadcont){this.data[idx].markloadcont=document.createElement('DIV');$(this.data[idx].markloadcont).addClass("u-tabc-content").html(this.data[idx].markload);}c=this.data[idx].markloadcont;}else{if(!this.parts.markloadcont){this.parts.markloadcont=document.createElement('DIV');$(this.parts.markloadcont).addClass("u-tabc-content").html(this.props.markload);}c=this.parts.markloadcont;}this._assign_content(idx,c);},idxbyid:function(id){if(typeof id=='string'){for(var i=0;i<this.data.length;i++)if(this.data[i].id==id)return i;return-1;}else return id;},load:function(idx,reload){idx=this.idxbyid(idx);if(idx<0||idx>=this.data.length)return;if(this.data[idx].cont!=null&&!reload){this._assign_content(idx);return;}var c=this.data[idx].dat;if(typeof(c)=='string')this.content(idx,c);else if(typeof c=='function')this.content(idx,c());else if(typeof c=='object'){this.markload(idx);if(!c.success&&c.xml===false){c.dataType='text';c.success=new Function("data","st","var w=_uTabCtrl.all["+this.idx+"];if(w)w.content('"+this.data[idx].id+"',data);");}else if(!c.success&&c.xml!==false)c.success=new Function("data","st","var w=_uTabCtrl.all["+this.idx+"];_uParseXML(data,w,'"+this.data[idx].id+"');");if(!c.error)c.error=new Function("xml","st","er","var w=_uTabCtrl.all["+this.idx+"];if(w)w._onerror('"+this.data[idx].id+"',xml,st,er);");try{if(c.form&&(c.form.length>0||c.form.nodeType))_uPostForm(c.form,c);else if(c.url)_uAjaxRequest(c.url,c);}catch(e){this._onerror(this.data[idx].id,null,'',e);}}return true;},_onerror:function(id,xml,st,er){var idx=this.idxbyid(id);if(idx<0||idx>=this.data.length)return;var o=this.props.onerror;if(o&&typeof(o)=='function')o.apply(this.app,arguments);else this.content(idx,'Error during load. Try to <a href="javascript://" onclick="var w=_uTabCtrl.all[\''+this.idx+'\'];if(w)w.load(\''+this.data[idx].id+'\',1);">reload</a>.');},destroy:function(){this.data.splice(0,this.data.length);this.parts=null;this.top.parentNode.removeChild(this.top);this.top=null;if(this.props.ondestroy)this.props.ondestroy(this,this.name);}};function _uWnd(name,title,width,height,opts,content,menuitems,app){if(name&&name.length>0){var t=_uWnd.getbyname(name);if(t){t.reload(content);return false;}}this.desktop=this.opts&&this.opts.desktop||_uWnd.defdesktop;this.props=$.extend({x:'auto',y:'auto',header:title?1:0,min:this.desktop?1:0,max:this.desktop?1:0,session:null,close:1,center:0,customButtons:null,hidden:0,modal:0,parent:null,nomove:0,resize:1,fixed:_uWnd.defdesktop||opts.desktop?0:1,autosize:1,autosizewidth:0,autosizeonimages:0,hideonresize:0,waitimages:0,markload:'<div align="left"><div class="myWinLoad"></div></div>',markdisablecont:'<div class="myWinLoad"></div>',markdisableclass:'myWinGrid',popup:0,alert:0,align:'center',shadow:1,design:'std',fadetype:1,fadespeed:800,fadeclosetype:2,fadeclosespeed:350,minh:50,minw:0,maxh:parseInt(screen.availHeight*.7),maxw:0,icon:'',havemenu:menuitems?1:0,menuopts:null,desktop:null,onerror:null,onclose:null,onbeforeclose:null,oninit:null,oncontent:null,onmousemove:null,onposchange:null,onactivate:null,ondeactivate:null,notaskbar:0,trayicon:null,traymenu:null,notabdestroy:0},opts||{});if(this.props.modal)this.props.min=0;if(this.props.session){this.props.x=this.props.session.x;this.props.y=this.props.session.y;}$.extend(this,{name:name,title:title?title:'',letsize:1,width:width&&width>10?width:300,height:height&&height>10?height:200,decor:{w:0,h:0,th:0},_content:content,state:{visible:false,minimized:false,maximized:false,loaded:false,init:false,disabled:false,grided:false,noshadow:false,resizing:false,destroyed:false},grid:null,frame:null,sh:null,sh_sz:[4,2],xpos:0,ypos:0,zpos:this.props.modal||this.props.alert?_uWnd.getModalTopZ():_uWnd.getTopZ(),_drag:new _uDraggable(this,this._ondragmousemove,null,this.onstartdrag,this.onstopdrag),_resize:new _uDraggable(this,this._onrsmousemove,null,this.onstartrs,this.onstoprs),restRect:null,minheight:this.props.minh,minwidth:this.props.minw,maxheight:this.props.maxh,maxwidth:this.props.maxw,pend_show:null,autosz:{active:false},imgloader:{timer:null,active:false},menu:null,app:app||null,tabctrl:null});this.design=this.props.design&&_uWnd.designs[this.props.design]||_uWnd.designs['std'];this.idx=_uWnd.nextidx++;_uWnd.all[this.idx]=this;if(!_uWnd.globalset){_uWnd.globalset=true;$(document).bind("mousedown",_uWnd.closepopup);$(window).bind("scroll",_uWnd._onscroll);$(window).bind("resize",_uWnd._onresize);}this.init(menuitems);}_uWnd.all={};_uWnd.nextidx=0;_uWnd.zchilds=[];_uWnd.lastz=0;_uWnd.minz=10000;_uWnd.maxz=20000;_uWnd.lastmodalz=0;_uWnd.minmodalz=21000;_uWnd.maxmodalz=25000;_uWnd.globalset=false;_uWnd.defdesktop=null;_uWnd.activewnd=null;_uWnd.globalmousedown=function(){_uMENU.hideallmenus();_uSuggestList.hideall();_uComboBox.hideall();_uWnd.closepopup();};_uWnd.alerts=null;_uWnd.alert=function(txt,title,opts){opts=$.extend({w:150,h:100,tm:5000,close:1,align:'center',icon:'',name:''},opts||{});var d,x,y,by,p,maxy;if(!(d=_uWnd.defdesktop)){d=_uWnd.getdims();x=d.clientW-opts.w-5;by=d.clientH-opts.h-5;p=_uWnd.alerts;maxy=0;d=null;}else{x=d.width-d.calcexclude(1)-opts.w-5;by=d.height-d.calcexclude(3)-opts.h-5;p=d.alerts;maxy=d.calcexclude(2);}y=by;if(p){if(p.y-(opts.h+5)>=0)y=p.y-(opts.h+5);while(p){if(p.y>maxy)maxy=p.y;p=p.prev;}if(maxy>0&&by-maxy>=opts.h+5)y=by;}var w=new _uWnd(opts.name,title,opts.w,opts.h,{close:opts.close,min:0,max:0,icon:opts.icon,align:opts.align,x:x,y:y,alert:1,autosize:0,fixed:1,shadow:0,resize:0,nomove:1,hidden:0,notaskbar:1,fadetype:2,fadespeed:500,fadeclosetype:2,fadeclosespeed:500,onclose:function(w,idx){_uWnd.rmalert(w,idx);}},txt);if(!d)_uWnd.alerts={prev:_uWnd.alerts,wnd:w,y:y};else d.alerts={prev:d.alerts,wnd:w,y:y};if(opts.tm>0)setTimeout("var w=_uWnd.all["+w.idx+"];if(w)w.close();",opts.tm);return w;};_uWnd.rmalert=function(w,idx){var a=w.desktop?w.desktop.alerts:_uWnd.alerts,p=null;while(a&&a.wnd!==w){p=a;a=a.prev;}if(a&&a.wnd===w)if(p)p.prev=a.prev;else{if(w.desktop)w.desktop.alerts=a.prev;else _uWnd.alerts=a.prev;}};_uWnd._onscroll=function(e){if(!$.browser.msie)return;var d=_uWnd.getdims(),a=_uWnd.all;for(var i in a)if(a[i])if(a[i].props.fixed||a[i].grid)a[i].moveTo(a[i].xpos,a[i].ypos);};_uWnd._onresize=function(e,dsk){var d=_uWnd.getdims(),a=_uWnd.all;for(var i in a)if(a[i])if((!dsk&&!a[i].desktop)||a[i].desktop==dsk)a[i]._onresize(d);};_uWnd.closepopup=function(){var a=_uWnd.all;for(var i in a)if(a[i]&&a[i].props.popup)a[i].closeevent();};_uWnd.findparent=function(elem){var p=elem;while(p&&p!=document.body){if(p.id&&p.id.indexOf&&p.id.indexOf('_uwndTop')==0&&p._uwndobj)return p._uwndobj;p=p.parentNode;}return null;};_uWnd.getbyname=function(name){var a=this.all;for(var i in a)if(a[i]&&a[i].name==name)return a[i];return null;};_uWnd.getTopZ=function(){with(_uWnd){var z=lastz;if(z<minz)z=minz;else z+=5;if(z+5>maxz){var x=minz;var ar=[];for(var i in all)if(all[i])ar[ar.length]=all[i];for(var i=0;i<zchilds.length;i++)if(zchilds[i])ar[ar.length]=zchilds[i];ar.sort(function(a,b){return a.zpos-b.zpos});for(var i=0;i<ar.length;i++){ar[i].setZ(x);x+=5;}z=x;}lastz=z;return z;}};_uWnd.getModalTopZ=function(){with(_uWnd){var z=lastmodalz;if(z<minmodalz)z=minmodalz;else z+=5;if(z+5>maxmodalz){var x=minmodalz;var ar=[];for(var i in all)if(all[i]&&all[i].props&&(all[i].props.modal||all[i].props.alert))ar[ar.length]=all[i];ar.sort(function(a,b){return a.zpos-b.zpos});for(var i=0;i<ar.length;i++){ar[i].setZ(x);x+=5;}z=x;}lastmodalz=z;return z;}};_uWnd.getdims=function(){var d=document;var s='';return{clientW:Math.min($.browser.opera&&window.innerWidth||$(window).width(),$.browser.safari&&d.body.clientWidth||$(window).width(),$(window).width()),clientH:Math.min($.browser.opera&&window.innerHeight||$(window).height(),$.browser.safari&&d.body.clientHeight||$(window).height(),$(window).height()),clientLeft:$(d).scrollLeft(),clientTop:$(d).scrollTop(),docW:$(d).width(),docH:$(d).height()};};_uWnd.csize=function(elem,name){if(name!="width"&&name!="height")return 0;var val,which=name=="width"?["Left","Right"]:["Top","Bottom"];val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);return Math.max(0,val);};_uWnd.close=function(name){var w=_uWnd.getbyname(name);if(w)w.close()};_uWnd.content=function(name,c){var w=_uWnd.getbyname(name);if(w)w.content(c)};_uWnd.reload=function(name,c){var w=_uWnd.getbyname(name);if(w)w.reload(c)};_uWnd.setTitle=function(name,t){var w=_uWnd.getbyname(name);if(w)w.setTitle(t)};_uWnd.activatetopwnd=function(dsk){var maxz=0,maxw=null,a=_uWnd.all;for(var i in a){if(!a[i]||(dsk&&a[i].desktop!=dsk)||!a[i].state.visible||a[i].state.minimized)continue;if(a[i].zpos>maxz){maxz=a[i].zpos;maxw=a[i];}}if(maxw)maxw.activate();else if(dsk)dsk.activewnd=null;else _uWnd.activewnd=null;};_uWnd.designs={std:{sh_sz:[4,2],altcloseclass:'xt-close2',shadow_init:function(top){var sh=[];for(var i=0;i<3;i++){sh[i]=document.createElement("div");top.appendChild(sh[i]);$(sh[i]).attr("class","x-sh").css({position:"absolute",zIndex:1});}$(sh[0]).addClass("xsl").css({width:(this.sh_sz[0]+this.sh_sz[1])+"px",left:(-this.sh_sz[0])+"px",top:"0px"}).html('<div class="xstl"><div class="xsml"></div></div>');$(sh[1]).addClass("xsr").css({width:(this.sh_sz[0]+this.sh_sz[1])+"px",top:"0px"}).html('<div class="xstr"><div class="xsmr"></div></div>');$(sh[2]).addClass("xsb").css({height:(this.sh_sz[0]+this.sh_sz[1])+"px",left:(-this.sh_sz[0])+"px"}).html('<div class="xsbl"><div class="xsbr"><div class="xsbc"></div></div></div>');return sh;},shadow_resize:function(sh,w,h){$(sh[0]).css({height:(h-this.sh_sz[1])+"px"});$(sh[1]).css({height:(h-this.sh_sz[1])+"px",left:(w-this.sh_sz[1])+"px"});$(sh[2]).css({width:(w+this.sh_sz[0]*2)+"px",top:(h-this.sh_sz[1])+"px"});},shadow_hide:function(sh){$(sh[0]).add(sh[1]).add(sh[2]).hide();},shadow_show:function(sh){$(sh[0]).add(sh[1]).add(sh[2]).show();},custButMargin:5,wnd_init:function(o,wnd,title,align,inith,head,icon,resize,menu){$(wnd).addClass("xw-plain").addClass("x-unselectable");if(resize)$(wnd).addClass("xw-resize");var custbuts='';if(o.props.customButtons)for(var i in o.props.customButtons)custbuts+='<div class="xt xt-'+i+'"></div>';$(wnd).html((head?'<div class="xw-tl"><div class="xw-tr"><div class="xw-tc">'+'<div class="xw-sps"></div><div class="xw-hdr">'+'<div class="xt xt-close"></div><div class="xt xt-maxi"></div><div class="xt xt-rest"></div><div class="xt xt-mini"></div>'+custbuts+(icon?'<img unselectable="on" onmousedown="return false;" class="xw-icon x-unselectable" src="'+icon+'">':'')+'<span class="xw-hdr-text">'+title+'</span></div></div></div></div>':'<div class="xw-tl"><div class="xw-tr"><div class="xw-tc xw-tsps"></div></div></div>')+'<div class="xw-ml"><div class="xw-mr"><div class="xw-mc">'+(menu?'<div class="u-wndmenufr"><div class="u-wndmenu" style="position:relative"></div></div>':'')+'<div class="xw-body">'+'<div style="overflow:scroll;height:'+inith+'px">'+'<div class="myWinCont" style="display:none;overflow:hidden"'+(align?' align="'+align+'"':'')+'></div><div class="'+o.props.markdisableclass+'" style="display:none;overflow:hidden;position:absolute;z-index:30000"></div><div class="myWinCont" style="overflow:hidden"'+(align?' align="'+align+'"':'')+'></div></div></div></div></div></div>'+'<div class="xw-bl"><div class="xw-br"><div class="xw-bc"></div></div></div>'+'<div class="xw-bl" style="display:none"><div class="xw-br"><div class="xw-bcm"></div></div></div>'+'<div class="xw-blank" style="display:none"></div>');var p={};p.upper=$(wnd).find(".xw-tl")[0];p.center=$(wnd).find(".xw-ml")[0];p.bottom=$(wnd).find(".xw-bl")[0];p.bottomc=$(wnd).find(".xw-bc")[1];$(wnd).find(".xw-mc").bind("mousedown",o,function(e){e.stopPropagation();e.data.activate(e);_uWnd.globalmousedown();});p.markload=$(wnd).find(".myWinCont")[0];$(p.markload).html(o.props.markload);p.wndcont=$(wnd).find(".myWinCont")[1];p.markdis=$(wnd).find("."+o.props.markdisableclass)[0];$(p.markdis).html(o.props.markdisablecont);p.hwndcont=p.wndcont.parentNode;if(head){p.hdr=$(wnd).find(".xw-hdr")[0];p.htitle=$(wnd).find(".xw-hdr-text")[0];var buts={cbut:"xt-close",mbut:"xt-mini",xbut:"xt-maxi",rbut:"xt-rest",icon:"xw-icon"};for(var i in buts){p[i]=$(p.hdr).find("."+buts[i])[0];}p.custom={};for(var i in o.props.customButtons){p.custom[i]=$(p.hdr).find(".xt-"+i)[0];}}else{p.hdr=p.htitle=p.cbut=p.mbut=p.xbut=p.rbut=p.icon=null;}if(menu)p.menu=$(wnd).find(".u-wndmenu")[0];else p.menu=null;$(wnd).find("div,span").andSelf().attr("unselectable","on");return p;},onstartautosz:function(o){o.parts.wndcont.style.overflow="hidden";o.parts.wndcont.style.height="auto";},onstopautosz:function(o,onlyscroll){if(!onlyscroll)o.parts.hwndcont.style.visibility="visible";o.parts.wndcont.style.overflow="auto";o.parts.wndcont.style.height="100%";},get_szbuts:function(wnd){var rs={nw:"xw-tl",n:"xw-sps",ne:"xw-tr",w:"xw-ml",e:"xw-mr",sw:"xw-bl",s:"xw-bc",se:"xw-br"};for(var i in rs){rs[i]=$(wnd).find("."+rs[i])[0];}if(!rs.n)rs.n=$(wnd).find(".xw-tsps")[0];return rs;},onbuttonover:function(e){var cls=e.data.cls;if(e.data.state)$(this).addClass(cls+'-over');else $(this).removeClass(cls+'-over');},onstartdrag:function(o){if($.browser.msie)o.parts.upper.style.filter="Alpha(Opacity='70')";else o.parts.upper.style.opacity=0.7;if(!o.state.minimized){o.hideSh();$(o.parts.center).add(o.parts.bottom).hide();$(o.wnd).find(".xw-blank").css('width',o.width+'px').css('height',(o.height-o.decor.th)+'px').show();}},onstopdrag:function(o){if($.browser.msie)o.parts.upper.style.filter="Alpha(Opacity='100')";else o.parts.upper.style.opacity=1;if(!o.state.minimized){o.showSh();$(o.parts.center).add(o.parts.bottom).show();$(o.wnd).find(".xw-blank").hide();}},onactivate:function(o){$(o.wnd).addClass("xw-active");},ondeactivate:function(o){$(o.wnd).removeClass("xw-active");},onstartresize:function(o){},onstopresize:function(o){},onminimize:function(o){$(o.parts.center).css("display","none");$(o.parts.bottomc).addClass("xw-bcm");o.hideSh();},onrestore:function(o){$(o.parts.bottomc).removeClass("xw-bcm");$(o.parts.center).css("display","block");o.showSh();}}};_uWnd.prototype={setZ:function(z){with(this){zpos=z;$(top).css("z-index",z);if(grid)$(grid).css("z-index",z-1);}},saveSession:function(){var r;if(this.state.maximized||this.state.minimized)r=this.restRect;else r=[this.xpos,this.ypos,this.width,this.height];return{x:r[0],y:r[1],w:r[2]-this.decor.w,h:r[3]-this.decor.h,s:this.state.maximized?'max':(this.state.minimized?'min':'')};},moveTo:function(_x,_y,frominit){var d=_uWnd.getdims();with(this){if(_x=='auto'&&_y=='auto'&&desktop&&!props.fixed&&!props.autosize&&!props.center){var p=desktop.getwndcoord(width,height);_x=p.x;_y=p.y;}else{if(_x=='auto'){if(desktop&&!props.fixed)_x=Math.floor((desktop.calcwidth()-width)/2);else _x=Math.floor((d.clientW-width)/2)+(props.fixed?0:d.clientLeft);if(_x<0)_x=0;}if(_y=='auto'){if(desktop&&!props.fixed)_y=Math.floor((desktop.calcheight()-height)/2);else _y=Math.floor((d.clientH-height)/2)+(props.fixed?0:d.clientTop);if(_y<0)_y=0;}}if(props.fixed&&$.browser.msie)$(top).css("left",(d.clientLeft+_x)+'px').css("top",(d.clientTop+_y)+'px');else $(top).css("left",_x+'px').css("top",_y+'px');if(grid)if($.browser.msie)$(grid).css("left",d.clientLeft+'px').css("top",d.clientTop+'px');else $(grid).css("left",'0px').css("top",'0px');xpos=_x;ypos=_y;if(this.props.onposchange&&!frominit)this.props.onposchange.apply(this.app,[this]);}},setTitle:function(t){if(t!=null)this.title=t;if(!this.title)this.title='';with(this){if(!props.header)return;var ts=width-decor.w,l;ts-=_countbuttonwidth();l=title.length;if(l*letsize>ts)l=Math.floor(ts/letsize)-2;if(l<title.length)$(parts.htitle).attr("title",title).text(title.substr(0,l)+'...');else $(parts.htitle).attr("title",'').text(title);}},resizeTo:function(w,h,center,frominit){with(this){if(center){var d=_uWnd.getdims();var _x=xpos,_y=ypos;if(props.x=='auto'){if(desktop&&!props.fixed)_x=Math.floor((desktop.calcwidth()-w)/2);else _x=Math.floor((d.clientW-w)/2)+(props.fixed?0:d.clientLeft);if(_x<0)_x=0;}if(props.y=='auto'){if(desktop&&!props.fixed)_y=Math.floor((desktop.calcheight()-h)/2);else _y=Math.floor((d.clientH-h)/2)+(props.fixed?0:d.clientTop);if(_y<0)_y=0;}if(_x!=xpos|_y!=ypos)moveTo(_x,_y,1);}$(wnd).css("width",w+'px');$(parts.wndcont).css("width",(w-decor.w)+'px');$(parts.hwndcont).css("height",(h-decor.h)+'px');if(parts.markdis)$(parts.markdis).css({height:(h-decor.h)+'px',width:(w-decor.w)+'px'});if(menu)$(parts.menu).css("width",(w-decor.w)+'px');if(tabctrl)tabctrl.resizeTo(w-decor.w,h-decor.h);if(frame)$(frame).css("width",w+'px').css("height",h+'px');width=w;height=h;if(this.props.onposchange&&!frominit&&!this.state.maximized&&!this.state.minimized)this.props.onposchange.apply(this.app,[this]);_resizeSh();setTitle();}},_onresize:function(d){if(this.state.maximized)if(this.desktop&&!this.props.fixed){this.moveTo(this.desktop.calcexclude(0),this.desktop.calcexclude(2),1);this.resizeTo(this.desktop.calcwidth(),this.desktop.calcheight(),0,1);}else this.resizeTo(d.clientW,d.clientH);if(this.grid)$(this.grid).css("width",d.clientW+'px').css("height",d.clientH+'px');},_resizeSh:function(){if(this.sh)this.design.shadow_resize(this.sh,this.width,this.height);},hideSh:function(){if(this.sh)this.design.shadow_hide(this.sh);},showSh:function(){if(this.sh&&!this.state.noshadow)this.design.shadow_show(this.sh);},shadow_init:function(){this.sh=this.design.shadow_init(this.top);},showcustombutton:function(name,state){if(!this.props.customButtons[name])return;this.props.customButtons[name][0]=state;if(!this.parts.custom[name])return;if(!state)$(this.parts.custom[name]).css("display","none");else $(this.parts.custom[name]).css("display","block");},init:function(menuitems){var p=this.props,t=document.createElement("div"),w;t.id="_uwndTop"+this.idx;t._uwndobj=this;if(!this.desktop)$($("body")[0]).prepend(t);else this.desktop.dsk.appendChild(t);this.top=t;if(!p.fixed||$.browser.msie)$(t).css("position","absolute");else $(t).css("position","fixed");$(t).css("visibility",'hidden').css("display",'block').css("z-index",this.zpos);if(p.modal){var g=document.createElement("div"),d=_uWnd.getdims();$(g).addClass('myWinGrid').css("width",d.clientW+'px').css("height",d.clientH+'px').css("z-index",this.zpos-1).hide().bind('mousedown',function(e){e.stopPropagation();e.preventDefault();_uWnd.globalmousedown();});if($.browser.msie)$(g).css("position","absolute");else $(g).css("position","fixed");if(!this.desktop)$($("body")[0]).prepend(g);else this.desktop.dsk.appendChild(g);this.grid=g;}if($.browser.msie&&parseFloat($.browser.version)<7){this.frame=document.createElement("iframe");with(this.frame.style){filter="Alpha(Opacity='0')";display="block";position="absolute";borderWidth=0;width=this.width+'px';height=this.height+'px';}t.appendChild(this.frame);}if(p.shadow&&!($.browser.msie&&parseFloat($.browser.version)<7)){this.shadow_init();this._resizeSh();}this.moveTo(p.x,p.y,1);w=document.createElement("div");w.id="_uwndWnd"+this.idx;t.appendChild(w);this.wnd=w;$(w).css({position:"absolute",width:this.width+'px',zIndex:2,left:0});if(!_uWnd._activateonmousedown)_uWnd._activateonmousedown=function(e){e.stopPropagation();e.data.activate(e);_uWnd.globalmousedown();};if(!_uWnd._activateonmousedownign)_uWnd._activateonmousedownign=function(e){e.data.activate(e);_uWnd.globalmousedown();};this.parts=this.design.wnd_init(this,w,this.title,p.align,60,p.header,p.icon,p.resize,p.havemenu);if(p.header){var bb={cbut:"xt-close",mbut:"xt-mini",xbut:"xt-maxi",rbut:"xt-rest"};if(!_uWnd._retfalse)_uWnd._retfalse=function(e){return false;};if(!_uWnd._onclickcustom)_uWnd._onclickcustom=function(e){var d=e.data;d.wnd.activate(e);d.func.call(d.thispar,d.wnd,d.name);};if(!_uWnd._onbuttonclose)_uWnd._onbuttonclose=function(e){e.data.activate(e);e.data.closeevent();};if(!_uWnd._onbuttonmin)_uWnd._onbuttonmin=function(e){e.data.activate(e);e.data.minimize()};if(!_uWnd._onbuttonmax)_uWnd._onbuttonmax=function(e){e.data.activate(e);e.data.maximize()};if(!_uWnd._onbuttonrest)_uWnd._onbuttonrest=function(e){e.data.activate(e);e.data.restore()};for(var i in bb)$(this.parts[i]).bind("dblclick",_uWnd._retfalse).bind("mouseover",{cls:bb[i],state:1},this.design.onbuttonover).bind("mouseout",{cls:bb[i],state:0},this.design.onbuttonover).bind("mousedown",this,_uWnd._activateonmousedown);for(var i in p.customButtons){$(this.parts.custom[i]).bind("dblclick",_uWnd._retfalse).bind("mouseover",{cls:'xt-'+i,state:1},this.design.onbuttonover).bind("mouseout",{cls:'xt-'+i,state:0},this.design.onbuttonover).bind("mousedown",this,_uWnd._activateonmousedown);if(!p.customButtons[i][0])$(this.parts.custom[i]).css("display","none");if(p.customButtons[i][1])$(this.parts.custom[i]).bind("click",{wnd:this,name:i,func:p.customButtons[i][1],thispar:p.customButtons[i][2]},_uWnd._onclickcustom);}if(!p.close)$(this.parts.cbut).css("display","none");$(this.parts.cbut).bind("click",this,_uWnd._onbuttonclose);if(!p.min)$(this.parts.mbut).css("display","none");$(this.parts.mbut).bind("click",this,_uWnd._onbuttonmin);if(!p.max)$(this.parts.xbut).css("display","none");$(this.parts.xbut).bind("click",this,_uWnd._onbuttonmax);$(this.parts.rbut).css("display","none").bind("click",this,_uWnd._onbuttonrest);if(p.close&&!p.min&&!p.max&&this.design.altcloseclass){$(this.parts.cbut).addClass(this.design.altcloseclass);}if(!p.nomove)$(this.parts.hdr).addClass("xw-draggable");$(this.parts.hdr).add(this.parts.htitle).bind("mousedown",this,function(e){e.stopPropagation();e.data.activate(e);_uWnd.globalmousedown();return e.data._ondragmousedown(e);});if(p.max||p.min)$(this.parts.hdr).bind("dblclick",this,function(e){var a=e.data;if(a.state.maximized||a.state.minimized)a.restore();else a.maximize();});}var rs=this.design.get_szbuts(w);if(!_uWnd._onresizebuttondown)_uWnd._onresizebuttondown=function(e){e.stopPropagation();e.data.w.activate(e);_uWnd.globalmousedown();return e.data.w._onrsmousedown(e,e.data.tp);};for(var i in rs){$(rs[i]).bind("mousedown",{w:this,tp:i},_uWnd._onresizebuttondown);}$(this.parts.wndcont).bind("mousedown",this,_uWnd._activateonmousedown);$(w).bind("mousedown",this,_uWnd._activateonmousedownign);if(p.havemenu){var mopts=$.extend({parentnode:this.parts.menu,wnd:this,noabs:1,horiz:1,statical:1,width:'auto'},p.menuopts||{});this.menu=new _uMENU('',{},mopts,menuitems,true);}if(typeof this._content=='object'&&this._content.constructor==_uTabCtrl){this.tabctrl=this._content;this.tabctrl.props.parentnode=this.parts.wndcont;this.tabctrl.wnd=this;this.tabctrl.init(true);}else this.tabctrl=null;if(p.trayicon&&this.desktop){var to={};if(p.trayicon.contructor==String)to.img=p.trayicon;else if(p.trayicon.contructor!=Object)if(p.icon)to.img=p.icon;if(to.img){if(!p.trayicon.thisobj){to.thisobj=this;if(!p.trayicon.ondown)to.ondown=this.ontrayicondown;if(!p.trayicon.onrdown)to.onrdown=this.ontrayiconrdown;to.param=p.trayicon.param;}else $.extend(to,p.trayicon);if(!to.title)to.title=this.title||'';this.trayicon=this.desktop.addTrayIcon(to.img,to.title,to.thisobj,to.ondown,to.onclick,to.onrdown,to.param);if(p.traymenu){this.traymenu=new _uMENU('',{align:'U'},{hidden:1},p.traymenu);}}}if(!p.hidden)this.show(false);if(this.desktop&&!p.modal&&!p.popup&&!p.alert&&p.header&&!p.notaskbar)this.desktop._addwindow(this);if(!p.alert)this.activate();if(p.header||this.menu)setTimeout("var w=_uWnd.all["+this.idx+"];if(w)w.init1();",10);else setTimeout("var w=_uWnd.all["+this.idx+"];if(w)w.init2();",10);},init1:function(){if(this.props.header){if(!this.title)this.letsize=8;else with(this){if(title.length==0)letsize=8;else letsize=parts.htitle.offsetWidth/title.length;parts.htitle.innerHTML='...';}}if(this.menu)this.menu.init1(true);setTimeout("var w=_uWnd.all["+this.idx+"];if(w)w.init2();",10);},init2:function(){with(this){decor.sbw=parts.hwndcont.offsetWidth-parts.hwndcont.clientWidth;decor.sbh=parts.hwndcont.offsetHeight-parts.hwndcont.clientHeight;decor.w=width-_uWnd.csize(parts.wndcont,"width")-decor.sbw;decor.h=wnd.offsetHeight-60;decor.th=parts.upper.offsetHeight;parts.hwndcont.style.overflow='hidden';if(tabctrl)tabctrl.init1(true);if(props.session)resizeTo(props.session.w+decor.w,props.session.h+decor.h,0,1);else resizeTo(width,height,0,1);if(menu)menu._setsize();state.init=true;var rel=pend_show?pend_show[0]:false;if(props.oninit)if(!props.oninit.call(app,this,name))rel=false;$(top).css("display",'none').css("visibility",'visible');var s=props.session;if(s&&s.s=='min')minimize(1);else if(s&&s.s=='max')maximize(1);else if(pend_show)show(rel,pend_show[1],pend_show[2]);}},deactivate:function(){var o=this.desktop?this.desktop:_uWnd;if(o.activewnd&&o.activewnd==this)o.activewnd=null;this.design.ondeactivate(this);if(this.desktop)this.desktop._onwnddeactivate(this);if(this.props.ondeactivate)this.props.ondeactivate.apply(this.app,[this]);},activate:function(e){if(this.state.disabled)return;var o=this.desktop?this.desktop:_uWnd;if(o.activewnd&&o.activewnd!=this)o.activewnd.deactivate();o.activewnd=this;this.design.onactivate(this);if(this.desktop)this.desktop._onwndactivate(this);if(this.props.onactivate)this.props.onactivate.apply(this.app,[this]);if(this.props.modal||this.props.alert){if(this.zpos==_uWnd.lastmodalz)return;this.setZ(_uWnd.getModalTopZ());}else{if(this.zpos==_uWnd.lastz)return;this.setZ(_uWnd.getTopZ());}},ontrayicondown:function(anim,icon,e){if(!this.state.visible&&!this.state.minimized)if(anim)this.show(false);else this.show(false,0,0);else if(this.state.minimized){if(this.state.beforemin=='max')this.maximize();else this.restore();}else if(this.props.min&&!this.props.notaskbar)this.minimize();else if(anim)this.hide();else this.hide(0,0);},ontrayiconrdown:function(pp,icon,e){if(!this.traymenu)return;this.traymenu.show({pos:{x:e.pageX,y:e.pageY}});_uMENU.ignoreclick=this.traymenu;},show:function(rel,fadetp,fadesp){if(arguments.length<2||fadetp==undefined)fadetp=this.props.fadetype;if(arguments.length<3||fadesp==undefined)fadesp=this.props.fadespeed;with(this){if(!state.init){pend_show=[rel,fadetp,fadesp];return;}if(grid)$(grid).show();if(fadetp==1){state.disabled=true;if($.browser.safari)hideSh();if($.browser.msie){state.noshadow=true;hideSh();$(wnd).hide();$(top).show();$(wnd).css("opacity","0").show().animate({opacity:1},{duration:fadesp,complete:new Function("var w=_uWnd.all["+idx+"];if(w){w.state.noshadow=false;w.state.disabled=false;w.showSh();}")});}else $(top).fadeIn(fadesp,new Function("var w=_uWnd.all["+idx+"];if(w)w.state.disabled=false;if($.browser.safari)w.showSh();"));}else if(fadetp==2){state.disabled=true;var endy=parseInt($(top).css("top"));$(top).css("top",(endy+(height>100?100:height))+'px');if($.browser.msie){state.noshadow=true;hideSh();$(wnd).hide();$(top).show().animate({top:endy+"px"},{duration:fadesp,complete:new Function("var w=_uWnd.all["+idx+"];if(w){w.state.noshadow=false;w.state.disabled=false;w.showSh();}")});$(wnd).css("opacity","0").show().animate({opacity:1},fadesp);}else $(top).css("opacity","0").show().animate({top:endy+"px",opacity:1},{duration:fadesp,complete:new Function("var w=_uWnd.all["+idx+"];if(w)w.state.disabled=false;")});}else{$(top).show();state.disabled=false;}state.visible=true;if(!state.loaded||rel)load();}},hide:function(fadetp,fadesp,doclose){if(arguments.length<1||fadetp==undefined)fadetp=this.props.fadeclosetype;if(arguments.length<2||fadesp==undefined)fadesp=this.props.fadeclosespeed;this.state.disabled=true;if(fadetp==1)if($.browser.msie){this.state.noshadow=true;this.hideSh();$(this.wnd).animate({opacity:0},{duration:fadesp,complete:doclose?new Function("var w=_uWnd.all["+this.idx+"];if(w)w.close(true);"):null});}else $(this.top).fadeOut(fadesp,doclose?new Function("var w=_uWnd.all["+this.idx+"];if(w)w.close(true);"):null);else if(fadetp==2){var endy=parseInt($(this.top).css("top"))+(this.height>100?100:this.height);if($.browser.msie){this.state.noshadow=true;this.hideSh();$(this.top).animate({top:endy+"px"},{duration:fadesp,complete:doclose?new Function("var w=_uWnd.all["+this.idx+"];if(w)w.close(true);"):null});$(this.wnd).animate({opacity:0},fadesp);}else $(this.top).animate({top:endy+"px",opacity:0},{duration:fadesp,complete:doclose?new Function("var w=_uWnd.all["+this.idx+"];if(w)w.close(true);"):null});}else{$(this.top).hide();doclose=false;}if(this.grid)$(this.grid).hide();this.state.visible=false;_uWnd.activatetopwnd(this.desktop);if(doclose)return 1;return 0;},markload:function(){this.parts.wndcont.style.display='none';this.parts.markload.style.display='block';},showgrid:function(){if(this.parts.markdis)this.parts.markdis.style.display='block';},hidegrid:function(){if(this.parts.markdis)this.parts.markdis.style.display='none';},reload:function(c){this._content=c;if(typeof c=='object'&&c.constructor==_uTabCtrl)this.tabctrl=c;else this.tabctrl=null;this.state.loaded=false;this.state.disabled=false;this.load();if(!this.props.hidden&&!this.state.visible)this.show(false);},load:function(){if(this.tabctrl)return;var c=this._content;if(typeof(c)=='string')this.content(c);else if(typeof c=='function')this.content(c.apply(this.app,[]));else if(typeof c=='object'){this.markload();if(!c.success&&c.xml===false){c.dataType='text';c.success=new Function("data","st","var w=_uWnd.all["+this.idx+"];if(w)w.content(data);");}else if(!c.success&&c.xml!==false)c.success=new Function("data","st","var w=_uWnd.all["+this.idx+"];_uParseXML(data,w);");if(!c.error)c.error=new Function("xml","st","er","var w=_uWnd.all["+this.idx+"];if(w)w._onerror(xml,st,er);");try{if(c.form&&c.form.length>0)_uPostForm(c.form,c);else if(c.url)_uAjaxRequest(c.url,c);}catch(e){this._onerror(null,'',e);}}},_onerror:function(xml,st,er){var o=this.props.onerror;if(o&&typeof(o)=='function')o.apply(this,arguments);else this.close();},_checkimgload:function(load){var im=this.imgloader;var i;if(!im.active)return;if(load)im.count++;if(im.images)for(i=0;i<im.images.length;i++)if(!im.images[i].complete)break;if(i>=im.images.length){this._stopimgload(true);return;}if(im.count>=im.images.length){if(im.timer)clearTimeout(im.timer);im.timer=setTimeout("var w=_uWnd.all["+this.idx+"];if(w){w.imgloader.timer=null;w._checkimgload();}",100);}if($.browser.opera&&im.images2){for(i=0;i<im.images2.length;i++)if(!im.images2[i].complete)return;$(im.images2).unbind();im.images2=null;this.parts.hwndcont.style.visibility='hidden';this.parts.markload.style.display='none';$(this.parts.wndcont).css("display","block");}},_stopimgload:function(start){var im=this.imgloader;if(im.active){im.active=false;if(im.stoptimer){clearTimeout(im.stoptimer);im.stoptimer=null;}if(im.timer){clearTimeout(im.timer);im.timer=null;}if(im.images){im.images.unbind();im.images=null;}if(im.images2){$(im.images2).unbind();im.images2=null;}if(start){if(this.props.hideonresize)this.parts.hwndcont.style.visibility='hidden';this.parts.markload.style.display='none';$(this.parts.wndcont).css("display","block");this.autosz.load=true;this.delaychecksize();}}},content:function(c){this._stopimgload();this.stopautosize();var a=this.autosz,w=this.parts.wndcont,p=this.props,im=this.imgloader;this.state.loaded=true;if(p.autosize&&p.waitimages>0){this.markload();$(w).html(c);if(this.props.oncontent)this.props.oncontent.apply(this.app,[this,w]);im.active=true;im.stoptimer=setTimeout("var w=_uWnd.all["+this.idx+"];if(w)w._stopimgload(true);",p.waitimages);if(!_uWnd.waitimagesfunc)_uWnd.waitimagesfunc=function(e){var im=e.data.imgloader;if(im.timer)clearTimeout(im.timer);im.timer=setTimeout("var w=_uWnd.all["+e.data.idx+"];if(w){w.imgloader.timer=null;w._checkimgload(1);}",10);};im.count=0;im.images=$(w).find("img").bind('error',this,_uWnd.waitimagesfunc).bind('load',this,_uWnd.waitimagesfunc);if($.browser.opera&&im.images.length>0){im.images2=[];for(var i=0;i<im.images.length;i++)im.images2[i]=$("<img>").attr("src",im.images[i].src).bind('load',this,_uWnd.waitimagesfunc)[0];}this._checkimgload();}else{if(p.autosize&&p.hideonresize)this.parts.hwndcont.style.visibility='hidden';this.parts.markload.style.display='none';$(w).css("display","block").html(c);if(this.props.oncontent)this.props.oncontent.apply(this.app,[this,w]);a.load=true;if(p.autosize)this.delaychecksize();else this.design.onstopautosz(this);}},onexternalload:function(){this._stopimgload();this.stopautosize();this.state.loaded=true;this.autosz.load=true;if(this.props.autosize)this.delaychecksize();},stopautosize:function(){var a=this.autosz;if(a.inittimer){clearTimeout(a.inittimer);a.inittimer=null;}if(a.timer){clearTimeout(a.timer);a.timer=null;}if(a.images){$(a.images).unbind();a.images=null;}if(a.active)this.design.onstopautosz(this);a.active=false;},delaychecksize:function(d){d=d||10;var a=this.autosz;if(a.inittimer)clearTimeout(a.inittimer);a.inittimer=setTimeout("var w=_uWnd.all["+this.idx+"];if(w);w.checksize();",d);},_countbuttonwidth:function(){var w=0;var buts={cbut:1,mbut:1,xbut:1,rbut:1,icon:1};for(var i in buts)if(this.parts[i])w+=this.parts[i].offsetWidth;for(var i in this.props.customButtons)w+=this.parts.custom[i].offsetWidth+this.design.custButMargin;return w;},checksize:function(autoload){var a=this.autosz,w=this.parts.wndcont;a.inittimer=null;if(this.state.maximized||this.state.minimized)return;this.stopdrag();this.stopresize();if(a.load){a.load=false;if(a.images){$(a.images).unbind();a.images=null;}if(this.props.autosizeonimages){if(!_uWnd.autosizeonimagesfunc)_uWnd.autosizeonimagesfunc=function(e){e.data.delaychecksize();};a.images=$(w).find("img").bind('load',this,_uWnd.autosizeonimagesfunc);}}a.active=true;this.design.onstartautosz(this);if(a.timer){clearTimeout(a.timer);a.timer=null;}var d=_uWnd.getdims(),minw=10,minh=10,maxw,maxh;if(this.props.header){minw+=this._countbuttonwidth();}minw=Math.max(minw,this.minwidth);minh=Math.max(minh,this.minheight);maxw=this.maxwidth;if(maxw==0)maxw=d.clientW-this.decor.w;maxh=this.maxheight;if(maxh==0)maxh=d.clientH-this.decor.h;var contW,contH;if(this.props.autosizewidth){$(this.parts.wndcont).css("width",'10px');contW=w.scrollWidth;$(this.parts.wndcont).css({width:(this.width-this.decor.w)+'px'});}else contW=w.scrollWidth;contH=w.scrollHeight;a.tw=Math.max(contW,minw);a.th=Math.max(contH,minh);var havescroll=false;if(a.tw>maxw){a.tw=maxw;a.th+=this.decor.sbh;havescroll=true;}if(a.th>maxh){a.th=maxh;if(a.tw+this.decor.sbw<=maxw){a.tw+=this.decor.sbw;havescroll=true;}else a.tw=maxw;}if(havescroll)this.design.onstopautosz(this,true);a.timer=setTimeout("try{_uWnd.all["+this.idx+"]._checksize();}catch(e){}",10);},_checksize:function(){this.stopdrag();this.stopresize();var a=this.autosz,dw=a.tw-(this.width-this.decor.w),dh=a.th-(this.height-this.decor.h),ws=10,hs=10;if(dw!=0){if(dw>0)ws=Math.min(ws,dw);else if(dw<0)ws=Math.max(-ws,dw);this.resizeTo(this.width+ws,this.height,true,1);}else if(dh!=0){if(dh>0)hs=Math.min(hs,dh);else if(dh<0)hs=Math.max(-hs,dh);this.resizeTo(this.width,this.height+hs,true,1);}else{a.timer=null;a.active=false;this.design.onstopautosz(this);return;}a.timer=setTimeout("try{_uWnd.all["+this.idx+"]._checksize();}catch(e){}",10);},closeevent:function(){if(this.props.onbeforeclose)if(this.props.onbeforeclose.apply(this.app,[this]))return;this.close();},close:function(nohide){if(this.state.destroyed)return;if(this.desktop)this.desktop._removewindow(this);if(!nohide&&this.state.visible){var a=this.hide(this.props.fadeclosetype,this.props.fadeclosespeed,true);if(a==1)return;}this.top.parentNode.removeChild(this.top);if(this.grid)this.grid.parentNode.removeChild(this.grid);if(this.tabctrl&&!this.props.notabdestroy)this.tabctrl.destroy();_uWnd.all[this.idx]=null;this.state.destroyed=true;this.state.visible=false;if(this.props.onclose)this.props.onclose.apply(this.app,[this,this.idx]);if(this.app)this.app._ondestroywnd(this);},minimize:function(frominit){with(this){if(autosz.active||!props.min||!props.header||props.modal||props.alert||props.popup)return;state.beforemin=state.maximized?'max':'';stopdrag();stopresize();if(!state.maximized&&!state.minimized)restRect=[xpos,ypos,width,height,props.fixed];if(props.onposchange&&!state.minimized&&!frominit)props.onposchange.apply(app,[this]);state.maximized=false;state.minimized=true;this.deactivate();if(!frominit)_uWnd.activatetopwnd(this.desktop);if(!desktop){$(parts.mbut).css("display","none");if(props.max)$(parts.xbut).css("display","block");$(parts.rbut).css("display","block");$(wnd).removeClass("xw-resize");if(!props.fixed&&!$.browser.msie)$(top).css("position","fixed");design.onminimize(this);props.fixed=true;moveTo(0,0,1);resizeTo(200,30,0,1);}else{if(!frominit){hide(0);desktop._onwndminimize(this,xpos,ypos,width,height);}}}},maximize:function(frominit){with(this){if(autosz.active||!props.max||!props.header)return;stopdrag();stopresize();if(!state.maximized&&!state.minimized)restRect=[xpos,ypos,width,height,props.fixed];if(state.minimized){this.design.onrestore(this);if(desktop)show(false,0);}if(props.onposchange&&!state.maximized&&!frominit)props.onposchange.apply(app,[this]);state.maximized=true;state.minimized=false;$(parts.hdr).removeClass("xw-draggable");$(wnd).removeClass("xw-resize");$(parts.xbut).css("display","none");if(props.min)$(parts.mbut).css("display","block");$(parts.rbut).css("display","block");if(!desktop&&!props.fixed&&!$.browser.msie)$(top).css("position","fixed");hideSh();if(desktop&&!props.fixed){moveTo(desktop.calcexclude(0),desktop.calcexclude(2),1);resizeTo(desktop.calcwidth(),desktop.calcheight(),0,1);}else{var d=_uWnd.getdims();props.fixed=true;moveTo(0,0,1);resizeTo(d.clientW,d.clientH,0,1);}if(frominit){show(false,0);}}},restore:function(){with(this){if(!props.header)return;stopdrag();stopresize();if(this.props.onposchange&&(state.minimized||state.maximized))props.onposchange.apply(app,[this]);$(parts.rbut).css("display","none");if(state.maximized)$(parts.xbut).css("display","block");if(state.minimized)$(parts.mbut).css("display","block");if(!props.nomove)$(parts.hdr).addClass("xw-draggable");if(props.resize)$(wnd).addClass("xw-resize");if(!desktop){if(state.minimized)design.onrestore(this);}else{if(state.minimized)show(false,0);}showSh();state.maximized=state.minimized=false;var r=restRect;if(r){props.fixed=r[4];if(!props.fixed&&!$.browser.msie)$(top).css("position","absolute");moveTo(r[0],r[1],1);resizeTo(r[2],r[3],0,1);}}},_ondragmousemove:function(dx,dy,x,y){var d=_uWnd.getdims();x+=dx;y+=dy;if(x+this.width<30)x=30-this.width;if(y<-5)y=-5;if(this.desktop&&!this.props.fixed){if(x>this.desktop.width-20)x=this.desktop.width-20;if(y>this.desktop.height-20)y=this.desktop.height-20;}else if(this.props.fixed){if(x>d.clientW-20)x=d.clientW-20;if(y>d.clientH-20)y=d.clientH-20;}else{if(x>d.docW-20)x=d.docW-20;if(y>d.docH-20)y=d.docH-20;}this.moveTo(x,y);},onstartdrag:function(){this.design.onstartdrag(this);},onstopdrag:function(){this.design.onstopdrag(this);},_ondragmousedown:function(e){with(this){if(props.nomove||state.resizing||state.maximized||state.disabled||e.which!=1)return;_drag.start(e,xpos,ypos);props.x=xpos;props.y=ypos;}},stopdrag:function(){this._drag.stop();},_onrsmousemove:function(dx,dy,tx,ty,tw,th,m){var x,y,w,h,d=_uWnd.getdims(),minw=10,minh=10,maxw,maxh;x=tx;y=ty;w=tw;h=th;if(this.props.header){minw+=this._countbuttonwidth();}minw=Math.max(minw,this.minwidth)+this.decor.w;minh=Math.max(minh,this.minheight)+this.decor.h;maxw=this.maxwidth;if(maxw==0)maxw=d.clientW;else maxw+=this.decor.w;maxh=this.maxheight;if(maxh==0)maxh=d.clientH;else maxh+=this.decor.h;if(m.indexOf('n')>=0){y=ty+dy;if(y<0)y=0;h=ty+th-y;if(h<minh){h=minh;y=ty+th-h;}else if(h>maxh){h=maxh;y=ty+th-h;}}if(m.indexOf('s')>=0){h=th+dy;if(h<minh)h=minh;else if(h>maxh)h=maxh;}if(m.indexOf('w')>=0){x=tx+dx;if(x<0)x=0;w=tx+tw-x;if(w<minw){w=minw;x=tx+tw-w;}else if(w>maxw){w=maxw;x=tx+tw-w;}}if(m.indexOf('e')>=0){w=tw+dx;if(w<minw)w=minw;else if(w>maxw)w=maxw;}this.moveTo(x,y);this.resizeTo(w,h);},_onrsmousedown:function(e,b){with(this){if(_drag.active||state.disabled||state.maximized||state.minimized||autosz.active||!props.resize||e.which!=1)return;props.x=xpos;props.y=ypos;this.stopautosize();_resize.start(e,xpos,ypos,width,height,b);}},onstartrs:function(){this.design.onstartresize(this);},onstoprs:function(){this.design.onstopresize(this);},stopresize:function(){this._resize.stop();}};function _txt(sign){var lng=window._uDeflang,a,p=arguments;if(!lng)a=sign;else{var db=window._uSigns;if(!db||!db[lng])a=sign;else{if(sign in db[lng])a=db[lng][sign];else a=sign;}}function _txtproc(str,param){return p[param];}if(p.length>1){a=a.replace(/%([1-9])/g,_txtproc);}return a;}function _uColorBox(did,fid){var hex_Red=new Array("00","33","66","99","CC","FF");var hex_Green=new Array("00","33","66","99","CC","FF");var hex_Blue=new Array("00","33","66","99","CC","FF");var hex_Gray=new Array("909090","939393","969696","999999","9C9C9C","9F9F9F","C0C0C0","C3C3C3","C6C6C6","C9C9C9","CCCCCC","CFCFF","F0F0F0","F3F3F3","F6F6F6","F9F9F9","FCFCFC","FFFFFF");var hexred="00",hexgreen="00",hexblue="00",hexgray="00";var red=0,green=0,blue=0;var x=0,y=0,z=0;var xyz=0;var ctable='<table border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">';while(y<6){ctable+='<tr>';var x=0;var hexblue=hex_Blue[blue];while(x<6){var z=0;var hexgreen=hex_Green[green];while(z<6){var hexred=hex_Red[red];var hexadecimal=""+hexred+hexgreen+hexblue;ctable+='<td style="width:8px;height:8px;cursor:pointer;" onclick="$(\'#'+did+'\').hide(); getElementById(\''+fid+'\').value=\''+hexadecimal+'\'" bgcolor="'+hexadecimal+'"></td>';z++;red++;if(red==6){red=0;}}x++;green++;if(green==6)green=0;xyz++;if(xyz==3){ctable+='</tr>';xyz=0;}}y++;blue++;if(blue==6)blue=0;}for(var i=0;i<hex_Gray.length;i++){ctable+='<td style="width:8px;height:8px;cursor:pointer;" onclick="$(\'#'+did+'\').hide(); getElementById(\''+fid+'\').value=\''+hex_Gray[i]+'\'" bgcolor="'+hex_Gray[i]+'"></td>';}ctable+='</table>';$('#'+did).html(ctable);}function _uParseXML(a,b,c){a=a.documentElement;var d=null,app=null;if(typeof b=='object'&&b.constructor==_uTabCtrl){d=b;b=null}else if(typeof _uApp!='undefined'&&typeof b=='object'&&b.appname){app=b;b=null}if(a==null){alert("Server connection Error. Sorry.")}for(var i=0;i<a.childNodes.length;i++){if(a.childNodes[i].nodeName=="cmd"){var e='';var f='';var g;for(var j=0;j<a.childNodes[i].attributes.length;j++){if(a.childNodes[i].attributes[j].name=="p")e=a.childNodes[i].attributes[j].value;if(a.childNodes[i].attributes[j].name=="t")f=a.childNodes[i].attributes[j].value}if(a.childNodes[i].firstChild&&a.childNodes[i].firstChild.data)g=a.childNodes[i].firstChild.data;else g='';if(e=='innerHTML'&&f.match(/^layerContent(.+)/))_uWnd.content(RegExp.$1,g);if(e=='innerHTML'&&f.match(/^layerTitle(.+)/))_uWnd.setTitle(RegExp.$1,g);if(e=='innerHTML')$('#'+f).html(g);else if(e=='+innerHTML')$('#'+f).prepend(g);else if(e=='innerHTML+')$('#'+f).append(g);else if(e=='innerHTMLspanAll')$("span."+f).html(g);else if(e=='innerHTMLdivAll')$("div."+f).html(g);else if(e=='value')$('#'+f).val(g);else if(e=='jsa')includeJSfile(g,f);else if(e=='js')eval(g);else if(e=='content'&&f.length>0){var r=f.match(/^([^:]+):(.+)/);if(r)_uTabCtrl.content(r[1],r[2],g);else _uWnd.content(f,g)}else if(e=='title'&&f.length>0){var r=f.match(/^([^:]+):(.+)/);if(r)_uTabCtrl.setTitle(r[1],r[2],g);else _uWnd.setTitle(f,g)}else if(e=='close'&&f.length>0){var r=f.match(/^([^:]+):(.+)/);if(r)if(!g||parseInt(g)==NaN)_uTabCtrl.closeTab(r[1],r[2]);else setTimeout("_uTabCtrl.closeTab('"+r[1]+"','"+r[2]+"');",parseInt(g));else if(!g||parseInt(g)==NaN)_uWnd.close(f);else setTimeout("_uWnd.close('"+f+"');",parseInt(g))}else if(b){if(e=='content')b.content(g);else if(e=='title')b.setTitle(g);else if(e=='close')if(!g||parseInt(g)==NaN)b.close();else setTimeout("var w=_uWnd.all["+b.idx+"];if(w)w.close();",parseInt(g))}else if(d&&c){if(e=='content')d.content(c,g);else if(e=='title'){d.setTitle(c,g)}else if(e=='close')if(!g||parseInt(g)==NaN)d.closeTab(c);else setTimeout("var w=_uTabCtrl.all["+d.idx+"];if(w)w.closeTab('"+c+"');",parseInt(g))}}}}var _defAjaxError = function(a,b,c){try{_show_log_form();return}catch(e){};window.location.reload()};var _hookAjaxError=null;function _uAjaxRequest(a,b){if(!a)return null;var o=$.extend({app:0,async:1,cache:true,dataType:'xml',error:_defAjaxError,type:'GET',success:_defAjaxSuccess,timeout:25000},b||{});if(_hookAjaxError&&!o.noerrorhook){o.prev_error=o.error;o.error=_hookAjaxError}o.url=a;return jQuery.ajax(o)}var _hookAjaxSuccess=function(a,b){if(!this.prev_success)return;if(this.app>0&&typeof _uApp!='undefined'&&_uApp.all[this.app]&&!_uApp.all[this.app].exited&&this.prev_success!=_defAjaxSuccess)this.prev_success.call(_uApp.all[this.app],a,b);else this.prev_success.call(this,a,b)};var _defAjaxSuccess=function(a,b){if(this.dataType=='xml'){if(this.app>0&&typeof _uApp!='undefined'&&_uApp.all[this.app]&&!_uApp.all[this.app].exited)_uParseXML(a,_uApp.all[this.app]);else _uParseXML(a)}};var _defAjaxFormError=function(b,c,d){if(!this._formobj)return;var a=this._formobj.onerror||this._formobj.getAttribute('onerror');if(!a)return;if(typeof a=='string'){try{a=new Function(a)}catch(e){return}}if(typeof a=='function'||typeof a=='object'){try{a.call(this._formobj,b,c,d)}catch(e){return}}};function _uPostForm(a,b){if(!a&&b&&b.url){_uAjaxRequest(b.url,b);return}var f;if(typeof(a)!='object')f=$('#'+a);else f=$(a);if(!f.length)return;var o=$.extend({app:0,url:f.attr('action')||window.location.toString(),type:f.attr('method')||'GET',error:_defAjaxFormError,success:_defAjaxSuccess,dataType:'xml',semantic:false},b||{});if(_hookAjaxError&&!o.noerrorhook){o.prev_error=o.error;o.error=_hookAjaxError}o._formobj=f[0];if(o.app>0&&!o.nosuccesshook){o.prev_success=o.success;o.success=_hookAjaxSuccess}f.ajaxSubmit(o)}function includeJSfile(a,b){if(b&&document.getElementById(b))return;var c=document.createElement('script');c.setAttribute('type','text/javascript');if(b)c.setAttribute('id',b);c.setAttribute('src',a);document.getElementsByTagName('head').item(0).appendChild(c)}var _entrRm={};function _entrRem(a,u,b,c){if(!c)c='Are you sure?';if(!_entrRm[a]&&confirm(c)){_entrRm[a]=1;document.getElementById(a).src=b+'/img/fr/EmnAjax.gif';_uPostForm('',{url:u})}}function _coloredTDs(r,c){var a='';if(typeof(r)!='object'){r=document.getElementById(r)}if(typeof(document.getElementsByTagName)!='undefined'){a=r.getElementsByTagName('td')}else if(typeof(r.cells)!='undefined'){a=r.cells}else{return false}for(var i=0;i<a.length;i++){a[i].className=c}}function openLayerB(n,f,a,t,w,h,b,c,d,e,g){new _uWnd(n,t,w,h,{autosize:b?1:0,modal:d?1:0,align:g?g:'center'},{url:a,form:f,cache:1})}function _showOnTop(n,f){var z=_uWnd.getTopZ();if(f)document.getElementById(n).style.zIndex=z+1;else document.getElementById('outLayer'+n).style.zIndex=z+1}function encodeHtmlVal(s){return String(s).replace(/&/g,'&'+'amp;').replace(/'/g,'&'+'#39;').replace(/"/g,'&'+'quot;').replace(/</g,'&'+'lt;').replace(/>/g,'&'+'gt;')}function dumpObject(o,a,b){var f=typeof o,s;if(arguments.length<2)a=10;function hexencode(n,s){var j,d=[0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f'],v='';for(j=0;j<s;j++){v=''+d[n%16]+v;n>>>=4}return v}if(f=='object')if(!o)f='null';else if(o.constructor==String)f='string';else if(o.constructor==Number)f='number';else if(o.constructor==Boolean)f='boolean';else if(o.constructor==Array)f='array';switch(f){case'number':case'boolean':case'null':case'undefined':return String(o);case'string':return'"'+o.replace(/([\\"])/g,"\\$1").replace(/\n/g,"\\n").replace(/([\x00-\x1f])/g,function(s,c){return'\\x'+hexencode(c.charCodeAt(0),2)}).replace(/([\u2028\u2029])/g,function(s,c){return'\\u'+hexencode(c.charCodeAt(0),4)})+'"';case'array':if(a<=0)return'[?]';s='';for(var i=0;i<o.length;i++){if(i>0)s+=',';s+=dumpObject(o[i])}return'['+s+']';case'object':if(a<=0)return'{?}';s='';for(var i in o){if(b&&b[i])continue;if(s)s+=',';try{s+=dumpObject(i)+':'+dumpObject(o[i],a-1)}catch(e){s+=dumpObject(i)+':?'}}return'{'+s+'}'}}function _uHighlightA(a,b,c){var d=$("a",a).get(),o=null,l=0;for(var j in d){if(d[j].href&&b.indexOf(d[j].href)>=0){if(!o||l<d[j].href.length){o=d[j];l=d[j].href.length}}}if(o)$(o).addClass(c)}function _uBuildMenu(a,b,c,d,g,h){var p,i,subs,m,al,t,it,f;p=$(a)[0];if(!p)return;h=h||2000;f=function(e){_uMENU.hideallmenus();this.__umenu.show()};if($.browser.msie)p.style.zoom='1';subs=$(a+">ul").children("li").children("ul");for(i=0;i<subs.length;i++){m=_ubuild_submenus(subs[i]);al=it=subs[i].parentNode;if(!b&&g&&(t=$(al).children("."+g)[0]))al=t;it.__umenu=new _uMENU('',{alignObj:al,align:b?'D':(window._rtl?'L':'R')},{parentnode:p,hidetimer:h},m);$(it).bind("mouseover",f);it.removeChild(subs[i])}if(!c||!d)return;setTimeout("_uHighlightA($('"+a+"')[0],'"+c+"','"+d+"');",100)}function _uReplaceMenu(a,b,c,d,e){var p,m,mm;p=$(a)[0];if(!p)return;if($.browser.msie)p.style.zoom='1';mm=$(a).children("ul")[0];if(!mm)return;if(e)$("."+e,mm).remove();m=_ubuild_submenus(mm);mm.parentNode.__umenu=new _uMENU('',{},{width:'auto',horiz:b,statical:1,parentnode:p,noabs:1},m);mm.parentNode.removeChild(mm);if(!c||!d)return;setTimeout("_uHighlightA($('"+a+"')[0],'"+c+"','"+d+"');",100)}function _ubuild_submenus(a){var b=$(a).children("li"),i,res=[],subul,m,ls;for(i=0;i<b.length;i++){subul=$(b[i]).children("ul")[0];if(subul){m=_ubuild_submenus(subul);subul.parentNode.removeChild(subul);ls=$("a",b[i]).get();res[res.length]=[$(b[i]).html(),m,ls.length>0?{action:'a'}:null]}else{ls=$("a",b[i]).get();res[res.length]=[$(b[i]).html(),ls.length>0?'a':'']}}return res}function _uColorBox(a,b){var c=["00","33","66","99","CC","FF"],hex_Green=["00","33","66","99","CC","FF"],hex_Blue=["00","33","66","99","CC","FF"],hex_Gray=["909090","939393","969696","999999","9C9C9C","9F9F9F","C0C0C0","C3C3C3","C6C6C6","C9C9C9","CCCCCC","CFCFCF","F0F0F0","F3F3F3","F6F6F6","F9F9F9","FCFCFC","FFFFFF"],e="00",d="00",hexblue="00",hexgray="00",red=0,green=0,blue=0,x=0,y=0,z=0,xyz=0,ctable='<table border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">';while(y<6){ctable+='<tr>';var x=0,hexblue=hex_Blue[blue];while(x<6){var z=0;var d=hex_Green[green];while(z<6){var e=c[red];var f=""+e+d+hexblue;ctable+='<td style="width:8px;height:8px;cursor:pointer;" onclick="$(\'#'+a+'\').hide(); getElementById(\''+b+'\').value=\''+f+'\'" bgcolor="'+f+'"></td>';z++;red++;if(red==6)red=0}x++;green++;if(green==6)green=0;xyz++;if(xyz==3){ctable+='</tr>';xyz=0}}y++;blue++;if(blue==6)blue=0}for(var i=0;i<hex_Gray.length;i++)ctable+='<td style="width:8px;height:8px;cursor:pointer;" onclick="$(\'#'+a+'\').hide(); getElementById(\''+b+'\').value=\''+hex_Gray[i]+'\'" bgcolor="'+hex_Gray[i]+'"></td>';ctable+='</table>';$('#'+a).html(ctable)};function _uButton(a,b,c){var d=$.extend({text:'Ok',content:'',style:0},c||{});var e={'s':'onclick="if (this.dis){return;} this.className=\'myBtnCont x-unselectable myBtnDis\'; this.dis=true; document.getElementById(\'subm'+a+'\').click();"','r':'onclick="document.getElementById(\''+a+'\').reset();"'};var t=(e[b]!='undefined')?e[b]:'';var s=(d.style==1)?['myBtnLeft','myBtnCenter','myBtnRight']:['myBtnLeftA','myBtnCenterA','myBtnRightA'];var f=(b=='s')?'<input type="image" src="/.s/img/1px.gif" style="width:1px;" name="subm'+a+'" id="subm'+a+'" />':'';var g=(d.style==2)?'myBtnCont x-unselectable myBtnDis':'myBtnCont x-unselectable';var h='<table border="0" cellpadding="0" cellspacing="0" onmousedown="this.className=\'downBtn\'" onmouseover="this.className=\'overBtn\'" onmouseout="this.className=\'outBtn\'">'+'<tr><td class="'+s[0]+'"><img border="0" src="/.s/img/1px.gif"></td>'+'<td class="'+s[1]+'"><div class="'+g+'" unselectable="on" '+t+' '+d.content+'><a href="javascript://" onclick="return false;">'+d.text+'</a></div></td>'+'<td class="'+s[2]+'"><img border="0" src="/.s/img/1px.gif"></td>'+'<td style="visibility:hidden;">'+f+'</td></tr></table>';return h}