
var disappeardelay=0
var verticaloffset=0
var enablearrowhead=1
var arrowheadimg=["/images/arrowdown.gif","/images/arrowup.gif"]
var arrowheadheight=10
var ie=document.all
var ns6=document.getElementById&&!document.all
verticaloffset=(enablearrowhead)?verticaloffset+arrowheadheight:verticaloffset
function getposOffset(what,offsettype){var totaloffset=(offsettype=="left")?what.offsetLeft:what.offsetTop;var parentEl=what.offsetParent;while(parentEl!=null){totaloffset=(offsettype=="left")?totaloffset+parentEl.offsetLeft:totaloffset+parentEl.offsetTop;parentEl=parentEl.offsetParent;}
return totaloffset;}
function showhide(obj,e){dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if(e.type=="mouseover")
obj.visibility="visible"}
function iecompattest(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}
function clearbrowseredge(obj,whichedge){if(whichedge=="rightedge"){edgeoffsetx=0
var windowedge=ie&&!window.opera?iecompattest().scrollLeft+iecompattest().clientWidth-15:window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if(windowedge-dropmenuobj.x<dropmenuobj.contentmeasure)
edgeoffsetx=dropmenuobj.contentmeasure-obj.offsetWidth
return edgeoffsetx}
else{edgeoffsety=0
var topedge=ie&&!window.opera?iecompattest().scrollTop:window.pageYOffset
var windowedge=ie&&!window.opera?iecompattest().scrollTop+iecompattest().clientHeight-15-65:window.pageYOffset+window.innerHeight-18-65
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if(windowedge-dropmenuobj.y<dropmenuobj.contentmeasure)
edgeoffsety=dropmenuobj.contentmeasure+obj.offsetHeight+(verticaloffset*2)
return edgeoffsety}}
function displayballoontip(obj,e){if(window.event)event.cancelBubble=true
else if(e.stopPropagation)e.stopPropagation()
if(typeof dropmenuobj!="undefined")
dropmenuobj.style.visibility="hidden"
clearhidemenu()
dropmenuobj=document.getElementById(obj.getAttribute("rel"))
showhide(dropmenuobj.style,e)
dropmenuobj.onmouseover=function(){clearhidemenu()};dropmenuobj.onmouseout=function(){delayhidemenu()};dropmenuobj.x=getposOffset(obj,"left")
dropmenuobj.y=getposOffset(obj,"top")+verticaloffset
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj,"rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj,"bottomedge")+obj.offsetHeight+"px"
if(enablearrowhead)
displaytiparrow()}
function displaytiparrow(){tiparrow=document.getElementById("arrowhead")
tiparrow.src=(edgeoffsety!=0)?arrowheadimg[0]:arrowheadimg[1]
var ieshadowwidth=(dropmenuobj.filters&&dropmenuobj.filters[0])?dropmenuobj.filters[0].Strength-1:0
tiparrow.style.left=(edgeoffsetx!=0)?parseInt(dropmenuobj.style.left)+dropmenuobj.offsetWidth-tiparrow.offsetWidth-5+"px":parseInt(dropmenuobj.style.left)+10+"px"
tiparrow.style.top=(edgeoffsety!=0)?parseInt(dropmenuobj.style.top)+dropmenuobj.offsetHeight-tiparrow.offsetHeight-ieshadowwidth+arrowheadheight+"px":parseInt(dropmenuobj.style.top)-arrowheadheight+"px"
tiparrow.style.visibility="visible"}
function delayhidemenu(){try{delayhide=setTimeout("dropmenuobj.style.visibility='hidden'; dropmenuobj.style.left=0; if (enablearrowhead) tiparrow.style.visibility='hidden'",disappeardelay)}catch(e){}}
function clearhidemenu(){if(typeof delayhide!="undefined")
clearTimeout(delayhide)}
function reltoelement(linkobj){var relvalue=linkobj.getAttribute("rel")
return(relvalue!=null&&relvalue!=""&&document.getElementById(relvalue)!=null&&document.getElementById(relvalue).className=="balloonstyle")?true:false}
function initalizetooltip(){var all_links=document.getElementsByTagName("div")
if(enablearrowhead){tiparrow=document.createElement("img")
tiparrow.setAttribute("src",arrowheadimg[0])
tiparrow.setAttribute("id","arrowhead")
document.body.appendChild(tiparrow)}
for(var i=0;i<all_links.length;i++){if(reltoelement(all_links[i])){all_links[i].onmouseover=function(e){var evtobj=window.event?window.event:e
displayballoontip(this,evtobj)}
all_links[i].onmouseout=delayhidemenu}}}
if(typeof window.jQuery=="undefined"){window.undefined=window.undefined;var jQuery=function(a,c){if(window==this)
return new jQuery(a,c);a=a||document;if(jQuery.isFunction(a))
return new jQuery(document)[jQuery.fn.ready?"ready":"load"](a);if(typeof a=="string"){var m=/^[^<]*(<(.|\s)+>)[^>]*$/.exec(a);if(m)
a=jQuery.clean([m[1]]);else
return new jQuery(c).find(a);}
return this.setArray(a.constructor==Array&&a||(a.jquery||a.length&&a!=window&&!a.nodeType&&a[0]!=undefined&&a[0].nodeType)&&jQuery.makeArray(a)||[a]);};if(typeof $!="undefined")
jQuery._$=$;var $=jQuery;jQuery.fn=jQuery.prototype={jquery:"1.1.2",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(a){var ret=jQuery(a);ret.prevObject=this;return ret;},setArray:function(a){this.length=0;[].push.apply(this,a);return this;},each:function(fn,args){return jQuery.each(this,fn,args);},index:function(obj){var pos=-1;this.each(function(i){if(this==obj)pos=i;});return pos;},attr:function(key,value,type){var obj=key;if(key.constructor==String)
if(value==undefined)
return this.length&&jQuery[type||"attr"](this[0],key)||undefined;else{obj={};obj[key]=value;}
return this.each(function(index){for(var prop in obj)
jQuery.attr(type?this.style:this,prop,jQuery.prop(this,obj[prop],type,index,prop));});},css:function(key,value){return this.attr(key,value,"curCSS");},text:function(e){if(typeof e=="string")
return this.empty().append(document.createTextNode(e));var t="";jQuery.each(e||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)
t+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return t;},wrap:function(){var a=jQuery.clean(arguments);return this.each(function(){var b=a[0].cloneNode(true);this.parentNode.insertBefore(b,this);while(b.firstChild)
b=b.firstChild;b.appendChild(this);});},append:function(){return this.domManip(arguments,true,1,function(a){this.appendChild(a);});},prepend:function(){return this.domManip(arguments,true,-1,function(a){this.insertBefore(a,this.firstChild);});},before:function(){return this.domManip(arguments,false,1,function(a){this.parentNode.insertBefore(a,this);});},after:function(){return this.domManip(arguments,false,-1,function(a){this.parentNode.insertBefore(a,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(t){return this.pushStack(jQuery.map(this,function(a){return jQuery.find(t,a);}),t);},clone:function(deep){return this.pushStack(jQuery.map(this,function(a){var a=a.cloneNode(deep!=undefined?deep:true);a.$events=null;return a;}));},filter:function(t){return this.pushStack(jQuery.isFunction(t)&&jQuery.grep(this,function(el,index){return t.apply(el,[index])})||jQuery.multiFilter(t,this));},not:function(t){return this.pushStack(t.constructor==String&&jQuery.multiFilter(t,this,true)||jQuery.grep(this,function(a){return(t.constructor==Array||t.jquery)?jQuery.inArray(a,t)<0:a!=t;}));},add:function(t){return this.pushStack(jQuery.merge(this.get(),t.constructor==String?jQuery(t).get():t.length!=undefined&&(!t.nodeName||t.nodeName=="FORM")?t:[t]));},is:function(expr){return expr?jQuery.filter(expr,this).r.length>0:false;},val:function(val){return val==undefined?(this.length?this[0].value:null):this.attr("value",val);},html:function(val){return val==undefined?(this.length?this[0].innerHTML:null):this.empty().append(val);},domManip:function(args,table,dir,fn){var clone=this.length>1;var a=jQuery.clean(args);if(dir<0)
a.reverse();return this.each(function(){var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(a[0],"tr"))
obj=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"));jQuery.each(a,function(){fn.apply(obj,[clone?this.cloneNode(true):this]);});});}};jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0],a=1;if(arguments.length==1){target=this;a=0;}
var prop;while(prop=arguments[a++])
for(var i in prop)target[i]=prop[i];return target;};jQuery.extend({noConflict:function(){if(jQuery._$)
$=jQuery._$;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&typeof fn[0]=="undefined"&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},each:function(obj,fn,args){if(obj.length==undefined)
for(var i in obj)
fn.apply(obj[i],args||[i,obj[i]]);else
for(var i=0,ol=obj.length;i<ol;i++)
if(fn.apply(obj[i],args||[i,obj[i]])===false)break;return obj;},prop:function(elem,value,type,index,prop){if(jQuery.isFunction(value))
value=value.call(elem,[index]);var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(prop)?value+"px":value;},className:{add:function(elem,c){jQuery.each(c.split(/\s+/),function(i,cur){if(!jQuery.className.has(elem.className,cur))
elem.className+=(elem.className?" ":"")+cur;});},remove:function(elem,c){elem.className=c?jQuery.grep(elem.className.split(/\s+/),function(cur){return!jQuery.className.has(c,cur);}).join(" "):"";},has:function(t,c){t=t.className||t;c=c.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1");return t&&new RegExp("(^|\\s)"+c+"(\\s|$)").test(t);}},swap:function(e,o,f){for(var i in o){e.style["old"+i]=e.style[i];e.style[i]=o[i];}
f.apply(e,[]);for(var i in o)
e.style[i]=e.style["old"+i];},css:function(e,p){if(p=="height"||p=="width"){var old={},oHeight,oWidth,d=["Top","Bottom","Right","Left"];jQuery.each(d,function(){old["padding"+this]=0;old["border"+this+"Width"]=0;});jQuery.swap(e,old,function(){if(jQuery.css(e,"display")!="none"){oHeight=e.offsetHeight;oWidth=e.offsetWidth;}else{e=jQuery(e.cloneNode(true)).find(":radio").removeAttr("checked").end().css({visibility:"hidden",position:"absolute",display:"block",right:"0",left:"0"}).appendTo(e.parentNode)[0];var parPos=jQuery.css(e.parentNode,"position");if(parPos==""||parPos=="static")
e.parentNode.style.position="relative";oHeight=e.clientHeight;oWidth=e.clientWidth;if(parPos==""||parPos=="static")
e.parentNode.style.position="static";e.parentNode.removeChild(e);}});return p=="height"?oHeight:oWidth;}
return jQuery.curCSS(e,p);},curCSS:function(elem,prop,force){var ret;if(prop=="opacity"&&jQuery.browser.msie)
return jQuery.attr(elem.style,"opacity");if(prop=="float"||prop=="cssFloat")
prop=jQuery.browser.msie?"styleFloat":"cssFloat";if(!force&&elem.style[prop])
ret=elem.style[prop];else if(document.defaultView&&document.defaultView.getComputedStyle){if(prop=="cssFloat"||prop=="styleFloat")
prop="float";prop=prop.replace(/([A-Z])/g,"-$1").toLowerCase();var cur=document.defaultView.getComputedStyle(elem,null);if(cur)
ret=cur.getPropertyValue(prop);else if(prop=="display")
ret="none";else
jQuery.swap(elem,{display:"block"},function(){var c=document.defaultView.getComputedStyle(this,"");ret=c&&c.getPropertyValue(prop)||"";});}else if(elem.currentStyle){var newProp=prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});ret=elem.currentStyle[prop]||elem.currentStyle[newProp];}
return ret;},clean:function(a){var r=[];jQuery.each(a,function(i,arg){if(!arg)return;if(arg.constructor==Number)
arg=arg.toString();if(typeof arg=="string"){var s=jQuery.trim(arg),div=document.createElement("div"),tb=[];var wrap=!s.indexOf("<opt")&&[1,"<select>","</select>"]||(!s.indexOf("<thead")||!s.indexOf("<tbody")||!s.indexOf("<tfoot"))&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];div.innerHTML=wrap[1]+s+wrap[2];while(wrap[0]--)
div=div.firstChild;if(jQuery.browser.msie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0)
tb=div.firstChild&&div.firstChild.childNodes;else if(wrap[1]=="<table>"&&s.indexOf("<tbody")<0)
tb=div.childNodes;for(var n=tb.length-1;n>=0;--n)
if(jQuery.nodeName(tb[n],"tbody")&&!tb[n].childNodes.length)
tb[n].parentNode.removeChild(tb[n]);}
arg=[];for(var i=0,l=div.childNodes.length;i<l;i++)
arg.push(div.childNodes[i]);}
if(arg.length===0&&!jQuery.nodeName(arg,"form"))
return;if(arg[0]==undefined||jQuery.nodeName(arg,"form"))
r.push(arg);else
r=jQuery.merge(r,arg);});return r;},attr:function(elem,name,value){var fix=jQuery.isXMLDoc(elem)?{}:{"for":"htmlFor","class":"className","float":jQuery.browser.msie?"styleFloat":"cssFloat",cssFloat:jQuery.browser.msie?"styleFloat":"cssFloat",innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected"};if(name=="opacity"&&jQuery.browser.msie&&value!=undefined){elem.zoom=1;return elem.filter=elem.filter.replace(/alpha\([^\)]*\)/gi,"")+
(value==1?"":"alpha(opacity="+value*100+")");}else if(name=="opacity"&&jQuery.browser.msie)
return elem.filter?parseFloat(elem.filter.match(/alpha\(opacity=(.*)\)/)[1])/100:1;if(name=="opacity"&&jQuery.browser.mozilla&&value==1)
value=0.9999;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))
return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined)elem.setAttribute(name,value);if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))
return elem.getAttribute(name,2);return elem.getAttribute(name);}else{name=name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(t){return t.replace(/^\s+|\s+$/g,"");},makeArray:function(a){var r=[];if(a.constructor!=Array)
for(var i=0,al=a.length;i<al;i++)
r.push(a[i]);else
r=a.slice(0);return r;},inArray:function(b,a){for(var i=0,al=a.length;i<al;i++)
if(a[i]==b)
return i;return-1;},merge:function(first,second){var r=[].slice.call(first,0);for(var i=0,sl=second.length;i<sl;i++)
if(jQuery.inArray(second[i],r)==-1)
first.push(second[i]);return first;},grep:function(elems,fn,inv){if(typeof fn=="string")
fn=new Function("a","i","return "+fn);var result=[];for(var i=0,el=elems.length;i<el;i++)
if(!inv&&fn(elems[i],i)||inv&&!fn(elems[i],i))
result.push(elems[i]);return result;},map:function(elems,fn){if(typeof fn=="string")
fn=new Function("a","return "+fn);var result=[],r=[];for(var i=0,el=elems.length;i<el;i++){var val=fn(elems[i],i);if(val!==null&&val!=undefined){if(val.constructor!=Array)val=[val];result=result.concat(val);}}
var r=result.length?[result[0]]:[];check:for(var i=1,rl=result.length;i<rl;i++){for(var j=0;j<i;j++)
if(result[i]==r[j])
continue check;r.push(result[i]);}
return r;}});new function(){var b=navigator.userAgent.toLowerCase();jQuery.browser={safari:/webkit/.test(b),opera:/opera/.test(b),msie:/msie/.test(b)&&!/opera/.test(b),mozilla:/mozilla/.test(b)&&!/(compatible|webkit)/.test(b)};jQuery.boxModel=!jQuery.browser.msie||document.compatMode=="CSS1Compat";};jQuery.each({parent:"a.parentNode",parents:"jQuery.parents(a)",next:"jQuery.nth(a,2,'nextSibling')",prev:"jQuery.nth(a,2,'previousSibling')",siblings:"jQuery.sibling(a.parentNode.firstChild,a)",children:"jQuery.sibling(a.firstChild)"},function(i,n){jQuery.fn[i]=function(a){var ret=jQuery.map(this,n);if(a&&typeof a=="string")
ret=jQuery.multiFilter(a,ret);return this.pushStack(ret);};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after"},function(i,n){jQuery.fn[i]=function(){var a=arguments;return this.each(function(){for(var j=0,al=a.length;j<al;j++)
jQuery(a[j])[n](this);});};});jQuery.each({removeAttr:function(key){jQuery.attr(this,key,"");this.removeAttribute(key);},addClass:function(c){jQuery.className.add(this,c);},removeClass:function(c){jQuery.className.remove(this,c);},toggleClass:function(c){jQuery.className[jQuery.className.has(this,c)?"remove":"add"](this,c);},remove:function(a){if(!a||jQuery.filter(a,[this]).r.length)
this.parentNode.removeChild(this);},empty:function(){while(this.firstChild)
this.removeChild(this.firstChild);}},function(i,n){jQuery.fn[i]=function(){return this.each(n,arguments);};});jQuery.each(["eq","lt","gt","contains"],function(i,n){jQuery.fn[n]=function(num,fn){return this.filter(":"+n+"("+num+")",fn);};});jQuery.each(["height","width"],function(i,n){jQuery.fn[n]=function(h){return h==undefined?(this.length?jQuery.css(this[0],n):null):this.css(n,h.constructor==String?h:h+"px");};});jQuery.extend({expr:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"i<m[3]-0",gt:"i>m[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","nth-child":"jQuery.nth(a.parentNode.firstChild,m[3],'nextSibling',a)==a","first-child":"jQuery.nth(a.parentNode.firstChild,1,'nextSibling')==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"jQuery.sibling(a.parentNode.firstChild).length==1",parent:"a.firstChild",empty:"!a.firstChild",contains:"jQuery.fn.text.apply([a]).indexOf(m[3])>=0",visible:'a.type!="hidden"&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'a.type=="hidden"||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"a.type=='text'",radio:"a.type=='radio'",checkbox:"a.type=='checkbox'",file:"a.type=='file'",password:"a.type=='password'",submit:"a.type=='submit'",image:"a.type=='image'",reset:"a.type=='reset'",button:'a.type=="button"||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)"},".":"jQuery.className.has(a,m[2])","@":{"=":"z==m[4]","!=":"z!=m[4]","^=":"z&&!z.indexOf(m[4])","$=":"z&&z.substr(z.length - m[4].length,m[4].length)==m[4]","*=":"z&&z.indexOf(m[4])>=0","":"z",_resort:function(m){return["",m[1],m[3],m[2],m[5]];},_prefix:"z=a[m[3]];if(!z||/href|src/.test(m[3]))z=jQuery.attr(a,m[3]);"},"[":"jQuery.find(m[2],a).length"},parse:[/^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('?"?)(.*?)\4 *\]/i,/^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,/^(:)([a-z0-9_-]*)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/i,/^([:.#]*)([a-z0-9_*-]*)/i],token:[/^(\/?\.\.)/,"a.parentNode",/^(>|\/)/,"jQuery.sibling(a.firstChild)",/^(\+)/,"jQuery.nth(a,2,'nextSibling')",/^(~)/,function(a){var s=jQuery.sibling(a.parentNode.firstChild);return s.slice(jQuery.inArray(a,s)+1);}],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}
return cur;},find:function(t,context){if(typeof t!="string")
return[t];if(context&&!context.nodeType)
context=null;context=context||document;if(!t.indexOf("//")){context=context.documentElement;t=t.substr(2,t.length);}else if(!t.indexOf("/")){context=context.documentElement;t=t.substr(1,t.length);if(t.indexOf("/")>=1)
t=t.substr(t.indexOf("/"),t.length);}
var ret=[context],done=[],last=null;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t).replace(/^\/\//i,"");var foundToken=false;var re=/^[\/>]\s*([a-z0-9*-]+)/i;var m=re.exec(t);if(m){jQuery.each(ret,function(){for(var c=this.firstChild;c;c=c.nextSibling)
if(c.nodeType==1&&(jQuery.nodeName(c,m[1])||m[1]=="*"))
r.push(c);});ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{for(var i=0;i<jQuery.token.length;i+=2){var re=jQuery.token[i];var m=re.exec(t);if(m){r=ret=jQuery.map(ret,jQuery.isFunction(jQuery.token[i+1])?jQuery.token[i+1]:function(a){return eval(jQuery.token[i+1]);});t=jQuery.trim(t.replace(re,""));foundToken=true;break;}}}
if(t&&!foundToken){if(!t.indexOf(",")){if(ret[0]==context)ret.shift();jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=/^([a-z0-9_-]+)(#)([a-z0-9\\*_-]*)/i;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=/^([#.]?)([a-z0-9\\*_-]*)/i;m=re2.exec(t);}
if(m[1]=="#"&&ret[ret.length-1].getElementById){var oid=ret[ret.length-1].getElementById(m[2]);if(jQuery.browser.msie&&oid&&oid.id!=m[2])
oid=jQuery('[@id="'+m[2]+'"]',ret[ret.length-1])[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{if(m[1]==".")
var rec=new RegExp("(^|\\s)"+m[2]+"(\\s|$)");jQuery.each(ret,function(){var tag=m[1]!=""||m[0]==""?"*":m[2];if(jQuery.nodeName(this,"object")&&tag=="*")
tag="param";jQuery.merge(r,m[1]!=""&&ret.length!=1?jQuery.getAll(this,[],m[1],m[2],rec):this.getElementsByTagName(tag));});if(m[1]=="."&&ret.length==1)
r=jQuery.grep(r,function(e){return rec.test(e.className);});if(m[1]=="#"&&ret.length==1){var tmp=r;r=[];jQuery.each(tmp,function(){if(this.getAttribute("id")==m[2]){r=[this];return false;}});}
ret=r;}
t=t.replace(re2,"");}}
if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}
if(ret&&ret[0]==context)ret.shift();jQuery.merge(done,ret);return done;},filter:function(t,r,not){while(t&&/^[a-z[({<*:.#]/i.test(t)){var p=jQuery.parse,m;jQuery.each(p,function(i,re){m=re.exec(t);if(m){t=t.substring(m[0].length);if(jQuery.expr[m[1]]._resort)
m=jQuery.expr[m[1]]._resort(m);return false;}});if(m[1]==":"&&m[2]=="not")
r=jQuery.filter(m[3],r,true).r;else if(m[1]=="."){var re=new RegExp("(^|\\s)"+m[2]+"(\\s|$)");r=jQuery.grep(r,function(e){return re.test(e.className||"");},not);}else{var f=jQuery.expr[m[1]];if(typeof f!="string")
f=jQuery.expr[m[1]][m[2]];eval("f = function(a,i){"+
(jQuery.expr[m[1]]._prefix||"")+"return "+f+"}");r=jQuery.grep(r,f,not);}}
return{r:r,t:t};},getAll:function(o,r,token,name,re){for(var s=o.firstChild;s;s=s.nextSibling)
if(s.nodeType==1){var add=true;if(token==".")
add=s.className&&re.test(s.className);else if(token=="#")
add=s.getAttribute("id")==name;if(add)
r.push(s);if(token=="#"&&r.length)break;if(s.firstChild)
jQuery.getAll(s,r,token,name,re);}
return r;},parents:function(elem){var matched=[];var cur=elem.parentNode;while(cur&&cur!=document){matched.push(cur);cur=cur.parentNode;}
return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1)num++;if(num==result||result=="even"&&num%2==0&&num>1&&cur==elem||result=="odd"&&num%2==1&&cur==elem)return cur;}},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))
r.push(n);}
return r;}});jQuery.event={add:function(element,type,handler,data){if(jQuery.browser.msie&&element.setInterval!=undefined)
element=window;if(data)
handler.data=data;if(!handler.guid)
handler.guid=this.guid++;if(!element.$events)
element.$events={};var handlers=element.$events[type];if(!handlers){handlers=element.$events[type]={};if(element["on"+type])
handlers[0]=element["on"+type];}
handlers[handler.guid]=handler;element["on"+type]=this.handle;if(!this.global[type])
this.global[type]=[];this.global[type].push(element);},guid:1,global:{},remove:function(element,type,handler){if(element.$events){var i,j,k;if(type&&type.type){handler=type.handler;type=type.type;}
if(type&&element.$events[type])
if(handler)
delete element.$events[type][handler.guid];else
for(i in element.$events[type])
delete element.$events[type][i];else
for(j in element.$events)
this.remove(element,j);for(k in element.$events[type])
if(k){k=true;break;}
if(!k)element["on"+type]=null;}},trigger:function(type,data,element){data=jQuery.makeArray(data||[]);if(!element)
jQuery.each(this.global[type]||[],function(){jQuery.event.trigger(type,data,this);});else{var handler=element["on"+type],val,fn=jQuery.isFunction(element[type]);if(handler){data.unshift(this.fix({type:type,target:element}));if((val=handler.apply(element,data))!==false)
this.triggered=true;}
if(fn&&val!==false)
element[type]();this.triggered=false;}},handle:function(event){if(typeof jQuery=="undefined"||jQuery.event.triggered)return;event=jQuery.event.fix(event||window.event||{});var returnValue;var c=this.$events[event.type];var args=[].slice.call(arguments,1);args.unshift(event);for(var j in c){args[0].handler=c[j];args[0].data=c[j].data;if(c[j].apply(this,args)===false){event.preventDefault();event.stopPropagation();returnValue=false;}}
if(jQuery.browser.msie)event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return returnValue;},fix:function(event){if(!event.target&&event.srcElement)
event.target=event.srcElement;if(event.pageX==undefined&&event.clientX!=undefined){var e=document.documentElement,b=document.body;event.pageX=event.clientX+(e.scrollLeft||b.scrollLeft);event.pageY=event.clientY+(e.scrollTop||b.scrollTop);}
if(jQuery.browser.safari&&event.target.nodeType==3){var originalEvent=event;event=jQuery.extend({},originalEvent);event.target=originalEvent.target.parentNode;event.preventDefault=function(){return originalEvent.preventDefault();};event.stopPropagation=function(){return originalEvent.stopPropagation();};}
if(!event.preventDefault)
event.preventDefault=function(){this.returnValue=false;};if(!event.stopPropagation)
event.stopPropagation=function(){this.cancelBubble=true;};return event;}};jQuery.fn.extend({bind:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,fn||data,data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},toggle:function(){var a=arguments;return this.click(function(e){this.lastToggle=this.lastToggle==0?1:0;e.preventDefault();return a[this.lastToggle].apply(this,[e])||false;});},hover:function(f,g){function handleHover(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this)try{p=p.parentNode}catch(e){p=this;};if(p==this)return false;return(e.type=="mouseover"?f:g).apply(this,[e]);}
return this.mouseover(handleHover).mouseout(handleHover);},ready:function(f){if(jQuery.isReady)
f.apply(document,[jQuery]);else{jQuery.readyList.push(function(){return f.apply(this,[jQuery])});}
return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}
if(jQuery.browser.mozilla||jQuery.browser.opera)
document.removeEventListener("DOMContentLoaded",jQuery.ready,false);}}});new function(){jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,o){jQuery.fn[o]=function(f){return f?this.bind(o,f):this.trigger(o);};});if(jQuery.browser.mozilla||jQuery.browser.opera)
document.addEventListener("DOMContentLoaded",jQuery.ready,false);else if(jQuery.browser.msie){document.write("<scr"+"ipt id=__ie_init defer=true "+"src=//:><\/script>");var script=document.getElementById("__ie_init");if(script)
script.onreadystatechange=function(){if(this.readyState!="complete")return;this.parentNode.removeChild(this);jQuery.ready();};script=null;}else if(jQuery.browser.safari)
jQuery.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(jQuery.safariTimer);jQuery.safariTimer=null;jQuery.ready();}},10);jQuery.event.add(window,"load",jQuery.ready);};if(jQuery.browser.msie)
jQuery(window).one("unload",function(){var global=jQuery.event.global;for(var type in global){var els=global[type],i=els.length;if(i&&type!='unload')
do
jQuery.event.remove(els[i-1],type);while(--i);}});jQuery.fn.extend({loadIfModified:function(url,params,callback){this.load(url,params,callback,1);},load:function(url,params,callback,ifModified){if(jQuery.isFunction(url))
return this.bind("load",url);callback=callback||function(){};var type="GET";if(params)
if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}
var self=this;jQuery.ajax({url:url,type:type,data:params,ifModified:ifModified,complete:function(res,status){if(status=="success"||!ifModified&&status=="notmodified")
self.attr("innerHTML",res.responseText).evalScripts().each(callback,[res.responseText,status,res]);else
callback.apply(self,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this);},evalScripts:function(){return this.find("script").each(function(){if(this.src)
jQuery.getScript(this.src);else
jQuery.globalEval(this.text||this.textContent||this.innerHTML||"");}).end();}});if(!window.XMLHttpRequest)
XMLHttpRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP");};jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});jQuery.extend({get:function(url,data,callback,type,ifModified){if(jQuery.isFunction(data)){callback=data;data=null;}
return jQuery.ajax({url:url,data:data,success:callback,dataType:type,ifModified:ifModified});},getIfModified:function(url,data,callback,type){return jQuery.get(url,data,callback,type,1);},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}
return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxTimeout:function(timeout){jQuery.ajaxSettings.timeout=timeout;},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null},lastModified:{},ajax:function(s){s=jQuery.extend({},jQuery.ajaxSettings,s);if(s.data){if(s.processData&&typeof s.data!="string")
s.data=jQuery.param(s.data);if(s.type.toLowerCase()=="get"){s.url+=((s.url.indexOf("?")>-1)?"&":"?")+s.data;s.data=null;}}
if(s.global&&!jQuery.active++)
jQuery.event.trigger("ajaxStart");var requestDone=false;var xml=new XMLHttpRequest();xml.open(s.type,s.url,s.async);if(s.data)
xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)
xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");if(xml.overrideMimeType)
xml.setRequestHeader("Connection","close");if(s.beforeSend)
s.beforeSend(xml);if(s.global)
jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}
var status;try{status=jQuery.httpSuccess(xml)&&isTimeout!="timeout"?s.ifModified&&jQuery.httpNotModified(xml,s.url)?"notmodified":"success":"error";if(status!="error"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}
if(s.ifModified&&modRes)
jQuery.lastModified[s.url]=modRes;var data=jQuery.httpData(xml,s.dataType);if(s.success)
s.success(data,status);if(s.global)
jQuery.event.trigger("ajaxSuccess",[xml,s]);}else
jQuery.handleError(s,xml,status);}catch(e){status="error";jQuery.handleError(s,xml,status,e);}
if(s.global)
jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");if(s.complete)
s.complete(xml,status);if(s.async)
xml=null;}};var ival=setInterval(onreadystatechange,13);if(s.timeout>0)
setTimeout(function(){if(xml){xml.abort();if(!requestDone)
onreadystatechange("timeout");}},s.timeout);try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}
if(!s.async)
onreadystatechange();return xml;},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)
jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||jQuery.browser.safari&&r.status==undefined;}catch(e){}
return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}
return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var data=!type&&ct&&ct.indexOf("xml")>=0;data=type=="xml"||data?r.responseXML:r.responseText;if(type=="script")
jQuery.globalEval(data);if(type=="json")
eval("data = "+data);if(type=="html")
jQuery("<div>").html(data).evalScripts();return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)
jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)
if(a[j]&&a[j].constructor==Array)
jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&");},globalEval:function(data){if(window.execScript)
window.execScript(data);else if(jQuery.browser.safari)
window.setTimeout(data,0);else
window.eval(data);}});jQuery.fn.extend({show:function(speed,callback){var hidden=this.filter(":hidden");speed?hidden.animate({height:"show",width:"show",opacity:"show"},speed,callback):hidden.each(function(){this.style.display=this.oldblock?this.oldblock:"";if(jQuery.css(this,"display")=="none")
this.style.display="block";});return this;},hide:function(speed,callback){var visible=this.filter(":visible");speed?visible.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):visible.each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");if(this.oldblock=="none")
this.oldblock="block";this.style.display="none";});return this;},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var args=arguments;return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"].apply(jQuery(this),args);});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.each(function(){var state=jQuery(this).is(":hidden")?"show":"hide";jQuery(this).animate({height:state},speed,callback);});},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){return this.queue(function(){this.curAnim=jQuery.extend({},prop);var opt=jQuery.speed(speed,easing,callback);for(var p in prop){var e=new jQuery.fx(this,opt,p);if(prop[p].constructor==Number)
e.custom(e.cur(),prop[p]);else
e[prop[p]](prop);}});},queue:function(type,fn){if(!fn){fn=type;type="fx";}
return this.each(function(){if(!this.queue)
this.queue={};if(!this.queue[type])
this.queue[type]=[];this.queue[type].push(fn);if(this.queue[type].length==1)
fn.apply(this);});}});jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){jQuery.dequeue(this,"fx");if(jQuery.isFunction(opt.old))
opt.old.apply(this);};return opt;},easing:{},queue:{},dequeue:function(elem,type){type=type||"fx";if(elem.queue&&elem.queue[type]){elem.queue[type].shift();var f=elem.queue[type][0];if(f)f.apply(elem);}},fx:function(elem,options,prop){var z=this;var y=elem.style;var oldDisplay=jQuery.css(elem,"display");y.overflow="hidden";z.a=function(){if(options.step)
options.step.apply(elem,[z.now]);if(prop=="opacity")
jQuery.attr(y,"opacity",z.now);else if(parseInt(z.now))
y[prop]=parseInt(z.now)+"px";y.display="block";};z.max=function(){return parseFloat(jQuery.css(elem,prop));};z.cur=function(){var r=parseFloat(jQuery.curCSS(elem,prop));return r&&r>-10000?r:z.max();};z.custom=function(from,to){z.startTime=(new Date()).getTime();z.now=from;z.a();z.timer=setInterval(function(){z.step(from,to);},13);};z.show=function(){if(!elem.orig)elem.orig={};elem.orig[prop]=this.cur();options.show=true;z.custom(0,elem.orig[prop]);if(prop!="opacity")
y[prop]="1px";};z.hide=function(){if(!elem.orig)elem.orig={};elem.orig[prop]=this.cur();options.hide=true;z.custom(elem.orig[prop],0);};z.toggle=function(){if(!elem.orig)elem.orig={};elem.orig[prop]=this.cur();if(oldDisplay=="none"){options.show=true;if(prop!="opacity")
y[prop]="1px";z.custom(0,elem.orig[prop]);}else{options.hide=true;z.custom(elem.orig[prop],0);}};z.step=function(firstNum,lastNum){var t=(new Date()).getTime();if(t>options.duration+z.startTime){clearInterval(z.timer);z.timer=null;z.now=lastNum;z.a();if(elem.curAnim)elem.curAnim[prop]=true;var done=true;for(var i in elem.curAnim)
if(elem.curAnim[i]!==true)
done=false;if(done){y.overflow="";y.display=oldDisplay;if(jQuery.css(elem,"display")=="none")
y.display="block";if(options.hide)
y.display="none";if(options.hide||options.show)
for(var p in elem.curAnim)
if(p=="opacity")
jQuery.attr(y,p,elem.orig[p]);else
y[p]="";}
if(done&&jQuery.isFunction(options.complete))
options.complete.apply(elem);}else{var n=t-this.startTime;var p=n/options.duration;z.now=options.easing&&jQuery.easing[options.easing]?jQuery.easing[options.easing](p,n,firstNum,(lastNum-firstNum),options.duration):((-Math.cos(p*Math.PI)/2)+0.5)*(lastNum-firstNum)+firstNum;z.a();}};}});}
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+options.path:'';var domain=options.domain?'; domain='+options.domain:'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};(function($){$.expr[':'].taconiteTag='a.taconiteTag';if(typeof $.fn.replace=='undefined')
$.fn.replace=function(a){return this.after(a).remove();};if(typeof $.fn.replaceContent=='undefined')
$.fn.replaceContent=function(a){return this.empty().append(a);};$.taconite=$.xmlExec=function(xml){var status=true,ex;try{$.event.trigger('taconite.begin.notify',[xml])
status=$.taconite.impl.process(xml);}catch(e){status=ex=e;}
$.event.trigger('taconite.complete.notify',[xml,!!status,status===true?null:status]);if(ex)throw ex;};$.taconite.version=[2,1,7];$.taconite.debug=0;$.taconite.lastTime=0;$.taconite._httpData=$.httpData;$.httpData=$.taconite.detect=function(xhr,type){var ct=xhr.getResponseHeader('content-type');if($.taconite.debug){$.taconite.log('[AJAX response] content-type: ',ct,';  status: ',xhr.status,' ',xhr.statusText,';  has responseXML: ',xhr.responseXML!=null);$.taconite.log('type: '+type);$.taconite.log('responseXML: '+xhr.responseXML);}
var data=$.taconite._httpData(xhr,type);if(data&&data.documentElement){var root=data.documentElement.tagName;$.taconite.log('XML document root: ',root);if(root=='taconite'){$.taconite.log('taconite command document detected');$.taconite(data);}}
else{$.taconite.log('jQuery core httpData returned: '+data);$.taconite.log('httpData: response is not XML (or not "valid" XML)');}
return data;};$.taconite.enableAutoDetection=function(b){$.httpData=b?$.taconite.detect:$.taconite._httpData;};$.taconite.log=function(){if(!$.taconite.debug||!window.console||!window.console.log)return;if(!$.taconite.log.count++)
$.taconite.log('Plugin Version: '+$.taconite.version.join('.'));window.console.log('[taconite] '+[].join.call(arguments,''));};$.taconite.log.count=0;$.taconite.impl={trimHash:{wrap:1},convert:function(s){var doc;$.taconite.log('attempting string to document conversion');try{if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}
else{var parser=new DOMParser();doc=parser.parseFromString(s,'text/xml');}}
catch(e){if(window.console&&window.console.error)
window.console.error('[taconite] ERROR parsing XML string for conversion: '+e);throw e;}
var ok=doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror';$.taconite.log('conversion ',ok?'successful!':'FAILED');return doc;},process:function(xml){if(typeof xml=='string')
xml=this.convert(xml);if(!xml||!xml.documentElement){$.taconite.log('$.taconite invoked without valid document; nothing to process');return false;}
try{var t=new Date().getTime();$.taconite.impl.process1(xml.documentElement.childNodes);$.taconite.lastTime=(new Date().getTime())-t;$.taconite.log('time to process response: '+$.taconite.lastTime+'ms');}catch(e){if(window.console&&window.console.error)
window.console.error('[taconite] ERROR processing document: '+e);throw e;}
return true;},process1:function(commands){var doPostProcess=0;for(var i=0;i<commands.length;i++){if(commands[i].nodeType!=1)
continue;var cmdNode=commands[i],cmd=cmdNode.tagName;if(cmd=='eval'){var js=(cmdNode.firstChild?cmdNode.firstChild.nodeValue:null);$.taconite.log('invoking "eval" command: ',js);if(js)$.globalEval(js);continue;}
var q=cmdNode.getAttribute('select');var jq=$(q);if(!jq[0]){$.taconite.log('No matching targets for selector: ',q);continue;}
var a=[];if(cmdNode.childNodes.length>0){doPostProcess=1;for(var j=0,els=[];j<cmdNode.childNodes.length;j++)
els[j]=this.createNode(cmdNode.childNodes[j]);a.push(this.trimHash[cmd]?this.cleanse(els):els);}
else{var n=cmdNode.getAttribute('name');var v=cmdNode.getAttribute('value');if(n!==null)a.push(n);if(v!==null)a.push(v);for(var j=1;true;j++){v=cmdNode.getAttribute('arg'+j);if(v===null)
break;a.push(v);}}
if($.taconite.debug){var arg=els?'...':a.join(',');$.taconite.log("invoking command: $('",q,"').",cmd,'('+arg+')');}
jq[cmd].apply(jq,a);}
if(doPostProcess)this.postProcess();},postProcess:function(){if(!$.browser.opera&&!$.browser.msie)return;$('select:taconiteTag').each(function(){$('option:taconiteTag',this).each(function(){this.setAttribute('selected','selected');this.taconiteTag=null;});this.taconiteTag=null;});},cleanse:function(els){for(var i=0,a=[];i<els.length;i++)
if(els[i].nodeType==1)a.push(els[i]);return a;},createNode:function(node){var type=node.nodeType;if(type==1)return this.createElement(node);if(type==3)return this.fixTextNode(node.nodeValue);if(type==4)return this.handleCDATA(node.nodeValue);return null;},handleCDATA:function(s){var $div=$('<div>').html(s);return $div[0];},fixTextNode:function(s){if($.browser.msie)s=s.replace(/\n/g,'\r');return document.createTextNode(s);},createElement:function(node){var e,tag=node.tagName.toLowerCase();if($.browser.msie){var type=node.getAttribute('type');if(tag=='table'||type=='radio'||type=='checkbox'||tag=='button'||(tag=='select'&&node.getAttribute('multiple'))){e=document.createElement('<'+tag+' '+this.copyAttrs(null,node,true)+'>');}}
if(!e){e=document.createElement(tag);this.copyAttrs(e,node);}
if($.browser.msie&&!e.canHaveChildren){if(node.childNodes.length>0)
e.text=node.text;}
else{for(var i=0,max=node.childNodes.length;i<max;i++){var child=this.createNode(node.childNodes[i]);if(child)e.appendChild(child);}}
if($.browser.msie||$.browser.opera){if(tag=='select'||(tag=='option'&&node.getAttribute('selected')))
e.taconiteTag=1;}
return e;},copyAttrs:function(dest,src,inline){for(var i=0,attr='';i<src.attributes.length;i++){var a=src.attributes[i],n=$.trim(a.name),v=$.trim(a.value);if(inline)attr+=(n+'="'+v+'" ');else if(n=='style'){dest.style.cssText=v;dest.setAttribute(n,v);}
else $.attr(dest,n,v);}
return attr;}};})(jQuery);(function($){$.fn.extend({_height:$.fn.height,_width:$.fn.width,height:function(val){if(this[0]==window)
return self.innerHeight||$.boxModel&&document.documentElement.clientHeight||document.body.clientHeight;if(this[0]==document)
return Math.max(document.body.scrollHeight,document.body.offsetHeight);return this._height(val);},width:function(val){if(this[0]==window)
return self.innerWidth||$.boxModel&&document.documentElement.clientWidth||document.body.clientWidth;if(this[0]==document)
return Math.max(document.body.scrollWidth,document.body.offsetWidth);return this._width(val);},innerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(':visible')?this[0].offsetHeight-num(this,'borderTopWidth')-num(this,'borderBottomWidth'):this.height()+num(this,'paddingTop')+num(this,'paddingBottom');},innerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(':visible')?this[0].offsetWidth-num(this,'borderLeftWidth')-num(this,'borderRightWidth'):this.width()+num(this,'paddingLeft')+num(this,'paddingRight');},outerHeight:function(){return this[0]==window||this[0]==document?this.height():this.is(':visible')?this[0].offsetHeight:this.height()+num(this,'borderTopWidth')+num(this,'borderBottomWidth')+num(this,'paddingTop')+num(this,'paddingBottom');},outerWidth:function(){return this[0]==window||this[0]==document?this.width():this.is(':visible')?this[0].offsetWidth:this.width()+num(this,'borderLeftWidth')+num(this,'borderRightWidth')+num(this,'paddingLeft')+num(this,'paddingRight');},scrollLeft:function(val){if(val!=undefined)
return this.each(function(){if(this==window||this==document)
window.scrollTo(val,$(window).scrollTop());else
this.scrollLeft=val;});if(this[0]==window||this[0]==document)
return self.pageXOffset||$.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft;return this[0].scrollLeft;},scrollTop:function(val){if(val!=undefined)
return this.each(function(){if(this==window||this==document)
window.scrollTo($(window).scrollLeft(),val);else
this.scrollTop=val;});if(this[0]==window||this[0]==document)
return self.pageYOffset||$.boxModel&&document.documentElement.scrollTop||document.body.scrollTop;return this[0].scrollTop;},offset:function(options,returnObject){var x=0,y=0,sl=0,st=0,elem=this[0],parent=this[0],op,parPos,elemPos=$.css(elem,'position'),mo=$.browser.mozilla,ie=$.browser.msie,sf=$.browser.safari,oa=$.browser.opera,absparent=false,relparent=false,options=$.extend({margin:true,border:true,padding:false,scroll:true,lite:false},options||{});if(options.lite)return this.offsetLite(options,returnObject);if(elem.tagName.toLowerCase()=='body'){x=elem.offsetLeft;y=elem.offsetTop;if(mo){x+=num(elem,'marginLeft')+(num(elem,'borderLeftWidth')*2);y+=num(elem,'marginTop')+(num(elem,'borderTopWidth')*2);}else
if(oa){x+=num(elem,'marginLeft');y+=num(elem,'marginTop');}else
if(ie&&jQuery.boxModel){x+=num(elem,'borderLeftWidth');y+=num(elem,'borderTopWidth');}}else{do{parPos=$.css(parent,'position');x+=parent.offsetLeft;y+=parent.offsetTop;if(mo||ie){x+=num(parent,'borderLeftWidth');y+=num(parent,'borderTopWidth');if(mo&&parPos=='absolute')absparent=true;if(ie&&parPos=='relative')relparent=true;}
op=parent.offsetParent;do{if(options.scroll){sl+=parent.scrollLeft;st+=parent.scrollTop;}
if(mo&&parent!=elem&&$.css(parent,'overflow')!='visible'){x+=num(parent,'borderLeftWidth');y+=num(parent,'borderTopWidth');}
parent=parent.parentNode;}while(parent!=op);parent=op;if(parent.tagName.toLowerCase()=='body'||parent.tagName.toLowerCase()=='html'){if((sf||(ie&&$.boxModel))&&elemPos!='absolute'&&elemPos!='fixed'){x+=num(parent,'marginLeft');y+=num(parent,'marginTop');}
if((mo&&!absparent&&elemPos!='fixed')||(ie&&elemPos=='static'&&!relparent)){x+=num(parent,'borderLeftWidth');y+=num(parent,'borderTopWidth');}
break;}}while(parent);}
var returnValue=handleOffsetReturn(elem,options,x,y,sl,st);if(returnObject){$.extend(returnObject,returnValue);return this;}
else{return returnValue;}},offsetLite:function(options,returnObject){var x=0,y=0,sl=0,st=0,parent=this[0],op,options=$.extend({margin:true,border:true,padding:false,scroll:true},options||{});do{x+=parent.offsetLeft;y+=parent.offsetTop;op=parent.offsetParent;if(options.scroll){do{sl+=parent.scrollLeft;st+=parent.scrollTop;parent=parent.parentNode;}while(parent!=op);}
parent=op;}while(parent&&parent.tagName.toLowerCase()!='body'&&parent.tagName.toLowerCase()!='html');var returnValue=handleOffsetReturn(this[0],options,x,y,sl,st);if(returnObject){$.extend(returnObject,returnValue);return this;}
else{return returnValue;}}});var num=function(el,prop){return parseInt($.css(el.jquery?el[0]:el,prop))||0;};var handleOffsetReturn=function(elem,options,x,y,sl,st){if(!options.margin){x-=num(elem,'marginLeft');y-=num(elem,'marginTop');}
if(options.border&&($.browser.safari||$.browser.opera)){x+=num(elem,'borderLeftWidth');y+=num(elem,'borderTopWidth');}else if(!options.border&&!($.browser.safari||$.browser.opera)){x-=num(elem,'borderLeftWidth');y-=num(elem,'borderTopWidth');}
if(options.padding){x+=num(elem,'paddingLeft');y+=num(elem,'paddingTop');}
if(options.scroll){sl-=elem.scrollLeft;st-=elem.scrollTop;}
return options.scroll?{top:y-st,left:x-sl,scrollTop:st,scrollLeft:sl}:{top:y,left:x};};})(jQuery);jQuery.fn.corner=function(o){function hex2(s){var s=parseInt(s).toString(16);return(s.length<2)?'0'+s:s;};function gpc(node){for(;node&&node.nodeName.toLowerCase()!='html';node=node.parentNode){var v=jQuery.css(node,'backgroundColor');if(v.indexOf('rgb')>=0){rgb=v.match(/\d+/g);return'#'+hex2(rgb[0])+hex2(rgb[1])+hex2(rgb[2]);}
if(v&&v!='transparent')
return v;}
return'#ffffff';};function getW(i){switch(fx){case'round':return Math.round(width*(1-Math.cos(Math.asin(i/width))));case'cool':return Math.round(width*(1+Math.cos(Math.asin(i/width))));case'sharp':return Math.round(width*(1-Math.cos(Math.acos(i/width))));case'bite':return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));case'slide':return Math.round(width*(Math.atan2(i,width/i)));case'jut':return Math.round(width*(Math.atan2(width,(width-i-1))));case'curl':return Math.round(width*(Math.atan(i)));case'tear':return Math.round(width*(Math.cos(i)));case'wicked':return Math.round(width*(Math.tan(i)));case'long':return Math.round(width*(Math.sqrt(i)));case'sculpt':return Math.round(width*(Math.log((width-i-1),width)));case'dog':return(i&1)?(i+1):width;case'dog2':return(i&2)?(i+1):width;case'dog3':return(i&3)?(i+1):width;case'fray':return(i%2)*width;case'notch':return width;case'bevel':return i+1;}};o=(o||"").toLowerCase();var keep=/keep/.test(o);var cc=((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);var sc=((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);var width=parseInt((o.match(/(\d+)px/)||[])[1])||10;var re=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var fx=((o.match(re)||['round'])[0]);var edges={T:0,B:1};var opts={TL:/top|tl/.test(o),TR:/top|tr/.test(o),BL:/bottom|bl/.test(o),BR:/bottom|br/.test(o)};if(!opts.TL&&!opts.TR&&!opts.BL&&!opts.BR)
opts={TL:1,TR:1,BL:1,BR:1};var strip=document.createElement('div');strip.style.overflow='hidden';strip.style.height='1px';strip.style.backgroundColor=sc||'transparent';strip.style.borderStyle='solid';return this.each(function(index){var pad={T:parseInt(jQuery.css(this,'paddingTop'))||0,R:parseInt(jQuery.css(this,'paddingRight'))||0,B:parseInt(jQuery.css(this,'paddingBottom'))||0,L:parseInt(jQuery.css(this,'paddingLeft'))||0};if(jQuery.browser.msie)this.style.zoom=1;if(!keep)this.style.border='none';strip.style.borderColor=cc||gpc(this.parentNode);var cssHeight=jQuery.curCSS(this,'height');for(var j in edges){var bot=edges[j];strip.style.borderStyle='none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');var d=document.createElement('div');var ds=d.style;bot?this.appendChild(d):this.insertBefore(d,this.firstChild);if(bot&&cssHeight!='auto'){if(jQuery.css(this,'position')=='static')
this.style.position='relative';ds.position='absolute';ds.bottom=ds.left=ds.padding=ds.margin='0';if(jQuery.browser.msie)
ds.setExpression('width','this.parentNode.offsetWidth');else
ds.width='100%';}
else{ds.margin=!bot?'-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px':(pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px';}
for(var i=0;i<width;i++){var w=Math.max(0,getW(i));var e=strip.cloneNode(false);e.style.borderWidth='0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';bot?d.appendChild(e):d.insertBefore(e,d.firstChild);}}});};(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+
(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)
this.insertBefore(document.createElement(html),this.firstChild);});}
return this;};if(!$.browser.version)
$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1];})(jQuery);jQuery.fn.extend({selectbox:function(options,callback){return this.each(function(){new jQuery.SelectBox(this,options,callback);});}});jQuery.SelectBox=function(selectobj,options,callback){var opt=options||{};opt.inputClass=opt.inputClass||"selectbox";opt.containerClass=opt.containerClass||"selectbox-wrapper";opt.hoverClass=opt.hoverClass||"selected";opt.debug=opt.debug||false;var elm_id=selectobj.id;var active=-1;var inFocus=false;var hasfocus=0;var $select=$(selectobj);var $container=setupContainer(opt);var $input=setupInput(opt);var $callback=callback;$select.hide().before($input).before($container);init();$input.mousedown(function(){$container.toggle();}).focus(function(){if($container.not(':visible')){inFocus=true;$container.show();}}).keydown(function(event){switch(event.keyCode){case 38:event.preventDefault();moveSelect(-1);break;case 40:event.preventDefault();moveSelect(1);break;case 13:event.preventDefault();setCurrent();hideMe();break;}}).blur(function(){if($container.is(':visible')&&hasfocus>0){if(opt.debug)console.log('container visible and has focus')}else{hideMe();}});function hideMe(){hasfocus=0;$container.hide();}
function init(){$container.append(getSelectOptions()).hide();var width=$input.width()
$container.width(width+10);}
function setupContainer(options){var container=document.createElement("div");$container=$(container);$container.attr('id',elm_id+'_container');$container.addClass(options.containerClass);return $container;}
function setupInput(options){var input=document.createElement("input");var $input=$(input);$input.attr("id",elm_id+"_input");$input.attr("type","text");$input.addClass(options.inputClass);$input.attr("autocomplete","off");$input.attr("readonly","readonly");$input.attr("tabIndex",$select.attr("tabindex"));return $input;}
function moveSelect(step){var lis=$("li",$container);if(!lis)return;active+=step;if(active<0){active=0;}else if(active>=lis.size()){active=lis.size()-1;}
lis.removeClass(opt.hoverClass);$(lis[active]).addClass(opt.hoverClass);}
function setCurrent(){var li=$("li."+opt.hoverClass,$container).get(0);var el=li.id
$select.val(el);$callback();$input.val($(li).html());return true;}
function getCurrentSelected(){return $select.val();}
function getCurrentValue(){return $input.val();}
function getSelectOptions(){var select_options=new Array();var ul=document.createElement('ul');$select.children('option').each(function(){var li=document.createElement('li');li.setAttribute('id',$(this).val());li.innerHTML=$(this).html();if($(this).is(':selected')){$input.val($(this).html());$(li).addClass(opt.hoverClass);}
ul.appendChild(li);$(li).css("background-color",$(this).attr("bg"));$(li).addClass("opacity90");$(li).removeClass("opacity100");$(li).mouseover(function(event){hasfocus=1;if(opt.debug)console.log('out on : '+this.id);jQuery(event.target,$container).addClass(opt.hoverClass);jQuery(event.target,$container).addClass("opacity100");jQuery(event.target,$container).removeClass("opacity90");}).mouseout(function(event){hasfocus=-1;if(opt.debug)console.log('out on : '+this.id);jQuery(event.target,$container).removeClass(opt.hoverClass);jQuery(event.target,$container).addClass("opacity90");jQuery(event.target,$container).removeClass("opacity100");}).click(function(event){if(opt.debug)console.log('click on :'+this.id);$(this).addClass(opt.hoverClass);setCurrent();hideMe();});});return ul;}};jQuery.iUtil={getPosition:function(e)
{var x=0;var y=0;var es=e.style;var restoreStyles=false;if(jQuery(e).css('display')=='none'){var oldVisibility=es.visibility;var oldPosition=es.position;restoreStyles=true;es.visibility='hidden';es.display='block';es.position='absolute';}
var el=e;while(el){x+=el.offsetLeft+(el.currentStyle&&!jQuery.browser.opera?parseInt(el.currentStyle.borderLeftWidth)||0:0);y+=el.offsetTop+(el.currentStyle&&!jQuery.browser.opera?parseInt(el.currentStyle.borderTopWidth)||0:0);el=el.offsetParent;}
el=e;while(el&&el.tagName&&el.tagName.toLowerCase()!='body')
{x-=el.scrollLeft||0;y-=el.scrollTop||0;el=el.parentNode;}
if(restoreStyles==true){es.display='none';es.position=oldPosition;es.visibility=oldVisibility;}
return{x:x,y:y};},getPositionLite:function(el)
{var x=0,y=0;while(el){x+=el.offsetLeft||0;y+=el.offsetTop||0;el=el.offsetParent;}
return{x:x,y:y};},getSize:function(e)
{var w=jQuery.css(e,'width');var h=jQuery.css(e,'height');var wb=0;var hb=0;var es=e.style;if(jQuery(e).css('display')!='none'){wb=e.offsetWidth;hb=e.offsetHeight;}else{var oldVisibility=es.visibility;var oldPosition=es.position;es.visibility='hidden';es.display='block';es.position='absolute';wb=e.offsetWidth;hb=e.offsetHeight;es.display='none';es.position=oldPosition;es.visibility=oldVisibility;}
return{w:w,h:h,wb:wb,hb:hb};},getSizeLite:function(el)
{return{wb:el.offsetWidth||0,hb:el.offsetHeight||0};},getClient:function(e)
{var h,w,de;if(e){w=e.clientWidth;h=e.clientHeight;}else{de=document.documentElement;w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;}
return{w:w,h:h};},getScroll:function(e)
{var t=0,l=0,w=0,h=0,iw=0,ih=0;if(e&&e.nodeName.toLowerCase()!='body'){t=e.scrollTop;l=e.scrollLeft;w=e.scrollWidth;h=e.scrollHeight;iw=0;ih=0;}else{if(document.documentElement){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight;}else if(document.body){t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight;}
iw=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;ih=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;}
return{t:t,l:l,w:w,h:h,iw:iw,ih:ih};},getMargins:function(e,toInteger)
{var el=jQuery(e);var t=el.css('marginTop')||'';var r=el.css('marginRight')||'';var b=el.css('marginBottom')||'';var l=el.css('marginLeft')||'';if(toInteger)
return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else
return{t:t,r:r,b:b,l:l};},getPadding:function(e,toInteger)
{var el=jQuery(e);var t=el.css('paddingTop')||'';var r=el.css('paddingRight')||'';var b=el.css('paddingBottom')||'';var l=el.css('paddingLeft')||'';if(toInteger)
return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else
return{t:t,r:r,b:b,l:l};},getBorder:function(e,toInteger)
{var el=jQuery(e);var t=el.css('borderTopWidth')||'';var r=el.css('borderRightWidth')||'';var b=el.css('borderBottomWidth')||'';var l=el.css('borderLeftWidth')||'';if(toInteger)
return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)||0};else
return{t:t,r:r,b:b,l:l};},getPointer:function(event)
{var x=event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))||0;var y=event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop))||0;return{x:x,y:y};},traverseDOM:function(nodeEl,func)
{func(nodeEl);nodeEl=nodeEl.firstChild;while(nodeEl){jQuery.iUtil.traverseDOM(nodeEl,func);nodeEl=nodeEl.nextSibling;}},purgeEvents:function(nodeEl)
{jQuery.iUtil.traverseDOM(nodeEl,function(el)
{for(var attr in el){if(typeof el[attr]==='function'){el[attr]=null;}}});},centerEl:function(el,axis)
{var clientScroll=jQuery.iUtil.getScroll();var windowSize=jQuery.iUtil.getSize(el);if(!axis||axis=='vertically')
jQuery(el).css({top:clientScroll.t+((Math.max(clientScroll.h,clientScroll.ih)-clientScroll.t-windowSize.hb)/2)+'px'});if(!axis||axis=='horizontally')
jQuery(el).css({left:clientScroll.l+((Math.max(clientScroll.w,clientScroll.iw)-clientScroll.l-windowSize.wb)/2)+'px'});},fixPNG:function(el,emptyGIF){var images=jQuery('img[@src*="png"]',el||document),png;images.each(function(){png=this.src;this.src=emptyGIF;this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+png+"')";});}};[].indexOf||(Array.prototype.indexOf=function(v,n){n=(n==null)?0:n;var m=this.length;for(var i=n;i<m;i++)
if(this[i]==v)
return i;return-1;});jQuery.iDrag={helper:null,dragged:null,destroy:function()
{return this.each(function()
{if(this.isDraggable){this.dragCfg.dhe.unbind('mousedown',jQuery.iDrag.draginit);this.dragCfg=null;this.isDraggable=false;if(jQuery.browser.msie){this.unselectable="off";}else{this.style.MozUserSelect='';this.style.KhtmlUserSelect='';this.style.userSelect='';}}});},draginit:function(e)
{if(jQuery.iDrag.dragged!=null){jQuery.iDrag.dragstop(e);return false;}
var elm=this.dragElem;jQuery(document).bind('mousemove',jQuery.iDrag.dragmove).bind('mouseup',jQuery.iDrag.dragstop);elm.dragCfg.pointer=jQuery.iUtil.getPointer(e);elm.dragCfg.currentPointer=elm.dragCfg.pointer;elm.dragCfg.init=false;elm.dragCfg.fromHandler=this!=this.dragElem;jQuery.iDrag.dragged=elm;if(elm.dragCfg.si&&this!=this.dragElem){parentPos=jQuery.iUtil.getPosition(elm.parentNode);sliderSize=jQuery.iUtil.getSize(elm);sliderPos={x:parseInt(jQuery.css(elm,'left'))||0,y:parseInt(jQuery.css(elm,'top'))||0};dx=elm.dragCfg.currentPointer.x-parentPos.x-sliderSize.wb/2-sliderPos.x;dy=elm.dragCfg.currentPointer.y-parentPos.y-sliderSize.hb/2-sliderPos.y;jQuery.iSlider.dragmoveBy(elm,[dx,dy]);}
return jQuery.selectKeyHelper||false;},dragstart:function(e)
{var elm=jQuery.iDrag.dragged;elm.dragCfg.init=true;var dEs=elm.style;elm.dragCfg.oD=jQuery.css(elm,'display');elm.dragCfg.oP=jQuery.css(elm,'position');if(!elm.dragCfg.initialPosition)
elm.dragCfg.initialPosition=elm.dragCfg.oP;elm.dragCfg.oR={x:parseInt(jQuery.css(elm,'left'))||0,y:parseInt(jQuery.css(elm,'top'))||0};elm.dragCfg.diffX=0;elm.dragCfg.diffY=0;if(jQuery.browser.msie){var oldBorder=jQuery.iUtil.getBorder(elm,true);elm.dragCfg.diffX=oldBorder.l||0;elm.dragCfg.diffY=oldBorder.t||0;}
elm.dragCfg.oC=jQuery.extend(jQuery.iUtil.getPosition(elm),jQuery.iUtil.getSize(elm));if(elm.dragCfg.oP!='relative'&&elm.dragCfg.oP!='absolute'){dEs.position='relative';}
jQuery.iDrag.helper.empty();var clonedEl=elm.cloneNode(true);jQuery(clonedEl).css({display:'block',left:'0px',top:'0px'});clonedEl.style.marginTop='0';clonedEl.style.marginRight='0';clonedEl.style.marginBottom='0';clonedEl.style.marginLeft='0';jQuery.iDrag.helper.append(clonedEl);var dhs=jQuery.iDrag.helper.get(0).style;if(elm.dragCfg.autoSize){dhs.width='auto';dhs.height='auto';}else{dhs.height=elm.dragCfg.oC.hb+'px';dhs.width=elm.dragCfg.oC.wb+'px';}
dhs.display='block';dhs.marginTop='0px';dhs.marginRight='0px';dhs.marginBottom='0px';dhs.marginLeft='0px';jQuery.extend(elm.dragCfg.oC,jQuery.iUtil.getSize(clonedEl));if(elm.dragCfg.cursorAt){if(elm.dragCfg.cursorAt.left){elm.dragCfg.oR.x+=elm.dragCfg.pointer.x-elm.dragCfg.oC.x-elm.dragCfg.cursorAt.left;elm.dragCfg.oC.x=elm.dragCfg.pointer.x-elm.dragCfg.cursorAt.left;}
if(elm.dragCfg.cursorAt.top){elm.dragCfg.oR.y+=elm.dragCfg.pointer.y-elm.dragCfg.oC.y-elm.dragCfg.cursorAt.top;elm.dragCfg.oC.y=elm.dragCfg.pointer.y-elm.dragCfg.cursorAt.top;}
if(elm.dragCfg.cursorAt.right){elm.dragCfg.oR.x+=elm.dragCfg.pointer.x-elm.dragCfg.oC.x-elm.dragCfg.oC.hb+elm.dragCfg.cursorAt.right;elm.dragCfg.oC.x=elm.dragCfg.pointer.x-elm.dragCfg.oC.wb+elm.dragCfg.cursorAt.right;}
if(elm.dragCfg.cursorAt.bottom){elm.dragCfg.oR.y+=elm.dragCfg.pointer.y-elm.dragCfg.oC.y-elm.dragCfg.oC.hb+elm.dragCfg.cursorAt.bottom;elm.dragCfg.oC.y=elm.dragCfg.pointer.y-elm.dragCfg.oC.hb+elm.dragCfg.cursorAt.bottom;}}
elm.dragCfg.nx=elm.dragCfg.oR.x;elm.dragCfg.ny=elm.dragCfg.oR.y;if(elm.dragCfg.insideParent||elm.dragCfg.containment=='parent'){parentBorders=jQuery.iUtil.getBorder(elm.parentNode,true);elm.dragCfg.oC.x=elm.offsetLeft+(jQuery.browser.msie?0:jQuery.browser.opera?-parentBorders.l:parentBorders.l);elm.dragCfg.oC.y=elm.offsetTop+(jQuery.browser.msie?0:jQuery.browser.opera?-parentBorders.t:parentBorders.t);jQuery(elm.parentNode).append(jQuery.iDrag.helper.get(0));}
if(elm.dragCfg.containment){jQuery.iDrag.getContainment(elm);elm.dragCfg.onDragModifier.containment=jQuery.iDrag.fitToContainer;}
if(elm.dragCfg.si){jQuery.iSlider.modifyContainer(elm);}
dhs.left=elm.dragCfg.oC.x-elm.dragCfg.diffX+'px';dhs.top=elm.dragCfg.oC.y-elm.dragCfg.diffY+'px';dhs.width=elm.dragCfg.oC.wb+'px';dhs.height=elm.dragCfg.oC.hb+'px';jQuery.iDrag.dragged.dragCfg.prot=false;if(elm.dragCfg.gx){elm.dragCfg.onDragModifier.grid=jQuery.iDrag.snapToGrid;}
if(elm.dragCfg.zIndex!=false){jQuery.iDrag.helper.css('zIndex',elm.dragCfg.zIndex);}
if(elm.dragCfg.opacity){jQuery.iDrag.helper.css('opacity',elm.dragCfg.opacity);if(window.ActiveXObject){jQuery.iDrag.helper.css('filter','alpha(opacity='+elm.dragCfg.opacity*100+')');}}
if(elm.dragCfg.frameClass){jQuery.iDrag.helper.addClass(elm.dragCfg.frameClass);jQuery.iDrag.helper.get(0).firstChild.style.display='none';}
if(elm.dragCfg.onStart)
elm.dragCfg.onStart.apply(elm,[clonedEl,elm.dragCfg.oR.x,elm.dragCfg.oR.y]);if(jQuery.iDrop&&jQuery.iDrop.count>0){jQuery.iDrop.highlight(elm);}
if(elm.dragCfg.ghosting==false){dEs.display='none';}
return false;},getContainment:function(elm)
{if(elm.dragCfg.containment.constructor==String){if(elm.dragCfg.containment=='parent'){elm.dragCfg.cont=jQuery.extend({x:0,y:0},jQuery.iUtil.getSize(elm.parentNode));var contBorders=jQuery.iUtil.getBorder(elm.parentNode,true);elm.dragCfg.cont.w=elm.dragCfg.cont.wb-contBorders.l-contBorders.r;elm.dragCfg.cont.h=elm.dragCfg.cont.hb-contBorders.t-contBorders.b;}else if(elm.dragCfg.containment=='document'){var clnt=jQuery.iUtil.getClient();elm.dragCfg.cont={x:0,y:0,w:clnt.w,h:clnt.h};}}else if(elm.dragCfg.containment.constructor==Array){elm.dragCfg.cont={x:parseInt(elm.dragCfg.containment[0])||0,y:parseInt(elm.dragCfg.containment[1])||0,w:parseInt(elm.dragCfg.containment[2])||0,h:parseInt(elm.dragCfg.containment[3])||0};}
elm.dragCfg.cont.dx=elm.dragCfg.cont.x-elm.dragCfg.oC.x;elm.dragCfg.cont.dy=elm.dragCfg.cont.y-elm.dragCfg.oC.y;},hidehelper:function(dragged)
{if(dragged.dragCfg.insideParent||dragged.dragCfg.containment=='parent'){jQuery('body',document).append(jQuery.iDrag.helper.get(0));}
jQuery.iDrag.helper.empty().hide().css('opacity',1);if(window.ActiveXObject){jQuery.iDrag.helper.css('filter','alpha(opacity=100)');}},dragstop:function(e)
{jQuery(document).unbind('mousemove',jQuery.iDrag.dragmove).unbind('mouseup',jQuery.iDrag.dragstop);if(jQuery.iDrag.dragged==null){return;}
var dragged=jQuery.iDrag.dragged;jQuery.iDrag.dragged=null;if(dragged.dragCfg.init==false){return false;}
if(dragged.dragCfg.so==true){jQuery(dragged).css('position',dragged.dragCfg.oP);}
var dEs=dragged.style;if(dragged.si){jQuery.iDrag.helper.css('cursor','move');}
if(dragged.dragCfg.frameClass){jQuery.iDrag.helper.removeClass(dragged.dragCfg.frameClass);}
if(dragged.dragCfg.revert==false){if(dragged.dragCfg.fx>0){if(!dragged.dragCfg.axis||dragged.dragCfg.axis=='horizontally'){var x=new jQuery.fx(dragged,{duration:dragged.dragCfg.fx},'left');x.custom(dragged.dragCfg.oR.x,dragged.dragCfg.nRx);}
if(!dragged.dragCfg.axis||dragged.dragCfg.axis=='vertically'){var y=new jQuery.fx(dragged,{duration:dragged.dragCfg.fx},'top');y.custom(dragged.dragCfg.oR.y,dragged.dragCfg.nRy);}}else{if(!dragged.dragCfg.axis||dragged.dragCfg.axis=='horizontally')
dragged.style.left=dragged.dragCfg.nRx+'px';if(!dragged.dragCfg.axis||dragged.dragCfg.axis=='vertically')
dragged.style.top=dragged.dragCfg.nRy+'px';}
jQuery.iDrag.hidehelper(dragged);if(dragged.dragCfg.ghosting==false){jQuery(dragged).css('display',dragged.dragCfg.oD);}}else if(dragged.dragCfg.fx>0){dragged.dragCfg.prot=true;var dh=false;if(jQuery.iDrop&&jQuery.iSort&&dragged.dragCfg.so){dh=jQuery.iUtil.getPosition(jQuery.iSort.helper.get(0));}
jQuery.iDrag.helper.animate({left:dh?dh.x:dragged.dragCfg.oC.x,top:dh?dh.y:dragged.dragCfg.oC.y},dragged.dragCfg.fx,function()
{dragged.dragCfg.prot=false;if(dragged.dragCfg.ghosting==false){dragged.style.display=dragged.dragCfg.oD;}
jQuery.iDrag.hidehelper(dragged);});}else{jQuery.iDrag.hidehelper(dragged);if(dragged.dragCfg.ghosting==false){jQuery(dragged).css('display',dragged.dragCfg.oD);}}
if(jQuery.iDrop&&jQuery.iDrop.count>0){jQuery.iDrop.checkdrop(dragged);}
if(jQuery.iSort&&dragged.dragCfg.so){jQuery.iSort.check(dragged);}
if(dragged.dragCfg.onChange&&(dragged.dragCfg.nRx!=dragged.dragCfg.oR.x||dragged.dragCfg.nRy!=dragged.dragCfg.oR.y)){dragged.dragCfg.onChange.apply(dragged,dragged.dragCfg.lastSi||[0,0,dragged.dragCfg.nRx,dragged.dragCfg.nRy]);}
if(dragged.dragCfg.onStop)
dragged.dragCfg.onStop.apply(dragged);return false;},snapToGrid:function(x,y,dx,dy)
{if(dx!=0)
dx=parseInt((dx+(this.dragCfg.gx*dx/Math.abs(dx))/2)/this.dragCfg.gx)*this.dragCfg.gx;if(dy!=0)
dy=parseInt((dy+(this.dragCfg.gy*dy/Math.abs(dy))/2)/this.dragCfg.gy)*this.dragCfg.gy;return{dx:dx,dy:dy,x:0,y:0};},fitToContainer:function(x,y,dx,dy)
{dx=Math.min(Math.max(dx,this.dragCfg.cont.dx),this.dragCfg.cont.w+this.dragCfg.cont.dx-this.dragCfg.oC.wb);dy=Math.min(Math.max(dy,this.dragCfg.cont.dy),this.dragCfg.cont.h+this.dragCfg.cont.dy-this.dragCfg.oC.hb);return{dx:dx,dy:dy,x:0,y:0}},dragmove:function(e)
{if(jQuery.iDrag.dragged==null||jQuery.iDrag.dragged.dragCfg.prot==true){return;}
var dragged=jQuery.iDrag.dragged;dragged.dragCfg.currentPointer=jQuery.iUtil.getPointer(e);if(dragged.dragCfg.init==false){distance=Math.sqrt(Math.pow(dragged.dragCfg.pointer.x-dragged.dragCfg.currentPointer.x,2)+Math.pow(dragged.dragCfg.pointer.y-dragged.dragCfg.currentPointer.y,2));if(distance<dragged.dragCfg.snapDistance){return;}else{jQuery.iDrag.dragstart(e);}}
var dx=dragged.dragCfg.currentPointer.x-dragged.dragCfg.pointer.x;var dy=dragged.dragCfg.currentPointer.y-dragged.dragCfg.pointer.y;for(var i in dragged.dragCfg.onDragModifier){var newCoords=dragged.dragCfg.onDragModifier[i].apply(dragged,[dragged.dragCfg.oR.x+dx,dragged.dragCfg.oR.y+dy,dx,dy]);if(newCoords&&newCoords.constructor==Object){dx=i!='user'?newCoords.dx:(newCoords.x-dragged.dragCfg.oR.x);dy=i!='user'?newCoords.dy:(newCoords.y-dragged.dragCfg.oR.y);}}
dragged.dragCfg.nx=dragged.dragCfg.oC.x+dx-dragged.dragCfg.diffX;dragged.dragCfg.ny=dragged.dragCfg.oC.y+dy-dragged.dragCfg.diffY;if(dragged.dragCfg.si&&(dragged.dragCfg.onSlide||dragged.dragCfg.onChange)){jQuery.iSlider.onSlide(dragged,dragged.dragCfg.nx,dragged.dragCfg.ny);}
if(dragged.dragCfg.onDrag)
dragged.dragCfg.onDrag.apply(dragged,[dragged.dragCfg.oR.x+dx,dragged.dragCfg.oR.y+dy]);if(!dragged.dragCfg.axis||dragged.dragCfg.axis=='horizontally'){dragged.dragCfg.nRx=dragged.dragCfg.oR.x+dx;jQuery.iDrag.helper.get(0).style.left=dragged.dragCfg.nx+'px';}
if(!dragged.dragCfg.axis||dragged.dragCfg.axis=='vertically'){dragged.dragCfg.nRy=dragged.dragCfg.oR.y+dy;jQuery.iDrag.helper.get(0).style.top=dragged.dragCfg.ny+'px';}
if(jQuery.iDrop&&jQuery.iDrop.count>0){jQuery.iDrop.checkhover(dragged);}
return false;},build:function(o)
{if(!jQuery.iDrag.helper){jQuery('body',document).append('<div id="dragHelper"></div>');jQuery.iDrag.helper=jQuery('#dragHelper');var el=jQuery.iDrag.helper.get(0);var els=el.style;els.position='absolute';els.display='none';els.cursor='move';els.listStyle='none';els.overflow='hidden';if(window.ActiveXObject){el.unselectable="on";}else{els.mozUserSelect='none';els.userSelect='none';els.KhtmlUserSelect='none';}}
if(!o){o={};}
return this.each(function()
{if(this.isDraggable||!jQuery.iUtil)
return;if(window.ActiveXObject){this.onselectstart=function(){return false;};this.ondragstart=function(){return false;};}
var el=this;var dhe=o.handle?jQuery(this).find(o.handle):jQuery(this);if(jQuery.browser.msie){dhe.each(function()
{this.unselectable="on";});}else{dhe.css('-moz-user-select','none');dhe.css('user-select','none');dhe.css('-khtml-user-select','none');}
this.dragCfg={dhe:dhe,revert:o.revert?true:false,ghosting:o.ghosting?true:false,so:o.so?o.so:false,si:o.si?o.si:false,insideParent:o.insideParent?o.insideParent:false,zIndex:o.zIndex?parseInt(o.zIndex)||0:false,opacity:o.opacity?parseFloat(o.opacity):false,fx:parseInt(o.fx)||null,hpc:o.hpc?o.hpc:false,onDragModifier:{},pointer:{},onStart:o.onStart&&o.onStart.constructor==Function?o.onStart:false,onStop:o.onStop&&o.onStop.constructor==Function?o.onStop:false,onChange:o.onChange&&o.onChange.constructor==Function?o.onChange:false,axis:/vertically|horizontally/.test(o.axis)?o.axis:false,snapDistance:o.snapDistance?parseInt(o.snapDistance)||0:0,cursorAt:o.cursorAt?o.cursorAt:false,autoSize:o.autoSize?true:false,frameClass:o.frameClass||false};if(o.onDragModifier&&o.onDragModifier.constructor==Function)
this.dragCfg.onDragModifier.user=o.onDragModifier;if(o.onDrag&&o.onDrag.constructor==Function)
this.dragCfg.onDrag=o.onDrag;if(o.containment&&((o.containment.constructor==String&&(o.containment=='parent'||o.containment=='document'))||(o.containment.constructor==Array&&o.containment.length==4))){this.dragCfg.containment=o.containment;}
if(o.fractions){this.dragCfg.fractions=o.fractions;}
if(o.grid){if(typeof o.grid=='number'){this.dragCfg.gx=parseInt(o.grid)||1;this.dragCfg.gy=parseInt(o.grid)||1;}else if(o.grid.length==2){this.dragCfg.gx=parseInt(o.grid[0])||1;this.dragCfg.gy=parseInt(o.grid[1])||1;}}
if(o.onSlide&&o.onSlide.constructor==Function){this.dragCfg.onSlide=o.onSlide;}
this.isDraggable=true;dhe.each(function(){this.dragElem=el;});dhe.bind('mousedown',jQuery.iDrag.draginit);})}};jQuery.fn.extend({DraggableDestroy:jQuery.iDrag.destroy,Draggable:jQuery.iDrag.build});jQuery.preloadImages=function()
{for(var i=0;i<arguments.length;i++)
{jQuery("<img>").attr("src",arguments[i]);}}
jQuery.iDrop={fit:function(zonex,zoney,zonew,zoneh)
{return zonex<=jQuery.iDrag.dragged.dragCfg.nx&&(zonex+zonew)>=(jQuery.iDrag.dragged.dragCfg.nx+jQuery.iDrag.dragged.dragCfg.oC.w)&&zoney<=jQuery.iDrag.dragged.dragCfg.ny&&(zoney+zoneh)>=(jQuery.iDrag.dragged.dragCfg.ny+jQuery.iDrag.dragged.dragCfg.oC.h)?true:false;},intersect:function(zonex,zoney,zonew,zoneh)
{return!(zonex>(jQuery.iDrag.dragged.dragCfg.nx+jQuery.iDrag.dragged.dragCfg.oC.w)||(zonex+zonew)<jQuery.iDrag.dragged.dragCfg.nx||zoney>(jQuery.iDrag.dragged.dragCfg.ny+jQuery.iDrag.dragged.dragCfg.oC.h)||(zoney+zoneh)<jQuery.iDrag.dragged.dragCfg.ny)?true:false;},pointer:function(zonex,zoney,zonew,zoneh)
{return zonex<jQuery.iDrag.dragged.dragCfg.currentPointer.x&&(zonex+zonew)>jQuery.iDrag.dragged.dragCfg.currentPointer.x&&zoney<jQuery.iDrag.dragged.dragCfg.currentPointer.y&&(zoney+zoneh)>jQuery.iDrag.dragged.dragCfg.currentPointer.y?true:false;},overzone:false,highlighted:{},count:0,zones:{},highlight:function(elm)
{if(jQuery.iDrag.dragged==null){return;}
var i;jQuery.iDrop.highlighted={};var oneIsSortable=false;for(i in jQuery.iDrop.zones){if(jQuery.iDrop.zones[i]!=null){var iEL=jQuery.iDrop.zones[i].get(0);if(jQuery(jQuery.iDrag.dragged).is('.'+iEL.dropCfg.a)){if(iEL.dropCfg.m==false){iEL.dropCfg.p=jQuery.extend(jQuery.iUtil.getPositionLite(iEL),jQuery.iUtil.getSizeLite(iEL));iEL.dropCfg.m=true;}
if(iEL.dropCfg.ac){jQuery.iDrop.zones[i].addClass(iEL.dropCfg.ac);}
jQuery.iDrop.highlighted[i]=jQuery.iDrop.zones[i];if(jQuery.iSort&&iEL.dropCfg.s&&jQuery.iDrag.dragged.dragCfg.so){iEL.dropCfg.el=jQuery('.'+iEL.dropCfg.a,iEL);elm.style.display='none';jQuery.iSort.measure(iEL);iEL.dropCfg.os=jQuery.iSort.serialize(jQuery.attr(iEL,'id')).hash;elm.style.display=elm.dragCfg.oD;oneIsSortable=true;}
if(iEL.dropCfg.onActivate){iEL.dropCfg.onActivate.apply(jQuery.iDrop.zones[i].get(0),[jQuery.iDrag.dragged]);}}}}
if(oneIsSortable){jQuery.iSort.start();}},remeasure:function()
{jQuery.iDrop.highlighted={};for(i in jQuery.iDrop.zones){if(jQuery.iDrop.zones[i]!=null){var iEL=jQuery.iDrop.zones[i].get(0);if(jQuery(jQuery.iDrag.dragged).is('.'+iEL.dropCfg.a)){iEL.dropCfg.p=jQuery.extend(jQuery.iUtil.getPositionLite(iEL),jQuery.iUtil.getSizeLite(iEL));if(iEL.dropCfg.ac){jQuery.iDrop.zones[i].addClass(iEL.dropCfg.ac);}
jQuery.iDrop.highlighted[i]=jQuery.iDrop.zones[i];if(jQuery.iSort&&iEL.dropCfg.s&&jQuery.iDrag.dragged.dragCfg.so){iEL.dropCfg.el=jQuery('.'+iEL.dropCfg.a,iEL);elm.style.display='none';jQuery.iSort.measure(iEL);elm.style.display=elm.dragCfg.oD;}}}}},checkhover:function(e)
{if(jQuery.iDrag.dragged==null){return;}
jQuery.iDrop.overzone=false;var i;var applyOnHover=false;var hlt=0;for(i in jQuery.iDrop.highlighted)
{var iEL=jQuery.iDrop.highlighted[i].get(0);if(jQuery.iDrop.overzone==false&&jQuery.iDrop[iEL.dropCfg.t](iEL.dropCfg.p.x,iEL.dropCfg.p.y,iEL.dropCfg.p.wb,iEL.dropCfg.p.hb)){if(iEL.dropCfg.hc&&iEL.dropCfg.h==false){jQuery.iDrop.highlighted[i].addClass(iEL.dropCfg.hc);}
if(iEL.dropCfg.h==false&&iEL.dropCfg.onHover){applyOnHover=true;}
iEL.dropCfg.h=true;jQuery.iDrop.overzone=iEL;if(jQuery.iSort&&iEL.dropCfg.s&&jQuery.iDrag.dragged.dragCfg.so){jQuery.iSort.helper.get(0).className=iEL.dropCfg.shc;jQuery.iSort.checkhover(iEL);}
hlt++;}else if(iEL.dropCfg.h==true){if(iEL.dropCfg.onOut){iEL.dropCfg.onOut.apply(iEL,[e,jQuery.iDrag.helper.get(0).firstChild,iEL.dropCfg.fx]);}
if(iEL.dropCfg.hc){jQuery.iDrop.highlighted[i].removeClass(iEL.dropCfg.hc);}
iEL.dropCfg.h=false;}}
if(jQuery.iSort&&!jQuery.iDrop.overzone&&jQuery.iDrag.dragged.so){jQuery.iSort.helper.get(0).style.display='none';}
if(applyOnHover){jQuery.iDrop.overzone.dropCfg.onHover.apply(jQuery.iDrop.overzone,[e,jQuery.iDrag.helper.get(0).firstChild]);}},checkdrop:function(e)
{var i;for(i in jQuery.iDrop.highlighted){var iEL=jQuery.iDrop.highlighted[i].get(0);if(iEL.dropCfg.ac){jQuery.iDrop.highlighted[i].removeClass(iEL.dropCfg.ac);}
if(iEL.dropCfg.hc){jQuery.iDrop.highlighted[i].removeClass(iEL.dropCfg.hc);}
if(iEL.dropCfg.s){jQuery.iSort.changed[jQuery.iSort.changed.length]=i;}
if(iEL.dropCfg.onDrop&&iEL.dropCfg.h==true){iEL.dropCfg.h=false;iEL.dropCfg.onDrop.apply(iEL,[e,iEL.dropCfg.fx]);}
iEL.dropCfg.m=false;iEL.dropCfg.h=false;}
jQuery.iDrop.highlighted={};},destroy:function()
{return this.each(function()
{if(this.isDroppable){if(this.dropCfg.s){id=jQuery.attr(this,'id');jQuery.iSort.collected[id]=null;jQuery('.'+this.dropCfg.a,this).DraggableDestroy();}
jQuery.iDrop.zones['d'+this.idsa]=null;this.isDroppable=false;this.f=null;}});},build:function(o)
{return this.each(function()
{if(this.isDroppable==true||!o.accept||!jQuery.iUtil||!jQuery.iDrag){return;}
this.dropCfg={a:o.accept,ac:o.activeclass||false,hc:o.hoverclass||false,shc:o.helperclass||false,onDrop:o.ondrop||o.onDrop||false,onHover:o.onHover||o.onhover||false,onOut:o.onOut||o.onout||false,onActivate:o.onActivate||false,t:o.tolerance&&(o.tolerance=='fit'||o.tolerance=='intersect')?o.tolerance:'pointer',fx:o.fx?o.fx:false,m:false,h:false};if(o.sortable==true&&jQuery.iSort){id=jQuery.attr(this,'id');jQuery.iSort.collected[id]=this.dropCfg.a;this.dropCfg.s=true;if(o.onChange){this.dropCfg.onChange=o.onChange;this.dropCfg.os=jQuery.iSort.serialize(id).hash;}}
this.isDroppable=true;this.idsa=parseInt(Math.random()*10000);jQuery.iDrop.zones['d'+this.idsa]=jQuery(this);jQuery.iDrop.count++;});}};jQuery.fn.extend({DroppableDestroy:jQuery.iDrop.destroy,Droppable:jQuery.iDrop.build});jQuery.recallDroppables=jQuery.iDrop.remeasure;jQuery.iSlider={tabindex:1,set:function(values)
{var values=values;return this.each(function()
{this.slideCfg.sliders.each(function(key)
{jQuery.iSlider.dragmoveBy(this,values[key]);});});},get:function()
{var values=[];this.each(function(slider)
{if(this.isSlider){values[slider]=[];var elm=this;var sizes=jQuery.iUtil.getSize(this);this.slideCfg.sliders.each(function(key)
{var x=this.offsetLeft;var y=this.offsetTop;xproc=parseInt(x*100/(sizes.w-this.offsetWidth));yproc=parseInt(y*100/(sizes.h-this.offsetHeight));values[slider][key]=[xproc||0,yproc||0,x||0,y||0];});}});return values;},modifyContainer:function(elm)
{elm.dragCfg.containerMaxx=elm.dragCfg.cont.w-elm.dragCfg.oC.wb;elm.dragCfg.containerMaxy=elm.dragCfg.cont.h-elm.dragCfg.oC.hb;if(elm.SliderContainer.slideCfg.restricted){next=elm.SliderContainer.slideCfg.sliders.get(elm.SliderIteration+1);if(next){elm.dragCfg.cont.w=(parseInt(jQuery(next).css('left'))||0)+elm.dragCfg.oC.wb;elm.dragCfg.cont.h=(parseInt(jQuery(next).css('top'))||0)+elm.dragCfg.oC.hb;}
prev=elm.SliderContainer.slideCfg.sliders.get(elm.SliderIteration-1);if(prev){var prevLeft=parseInt(jQuery(prev).css('left'))||0;var prevTop=parseInt(jQuery(prev).css('left'))||0;elm.dragCfg.cont.x+=prevLeft;elm.dragCfg.cont.y+=prevTop;elm.dragCfg.cont.w-=prevLeft;elm.dragCfg.cont.h-=prevTop;}}
elm.dragCfg.maxx=elm.dragCfg.cont.w-elm.dragCfg.oC.wb;elm.dragCfg.maxy=elm.dragCfg.cont.h-elm.dragCfg.oC.hb;if(elm.dragCfg.fractions){elm.dragCfg.gx=((elm.dragCfg.cont.w-elm.dragCfg.oC.wb)/elm.dragCfg.fractions)||1;elm.dragCfg.gy=((elm.dragCfg.cont.h-elm.dragCfg.oC.hb)/elm.dragCfg.fractions)||1;elm.dragCfg.fracW=elm.dragCfg.maxx/elm.dragCfg.fractions;elm.dragCfg.fracH=elm.dragCfg.maxy/elm.dragCfg.fractions;}
elm.dragCfg.cont.dx=elm.dragCfg.cont.x-elm.dragCfg.oR.x;elm.dragCfg.cont.dy=elm.dragCfg.cont.y-elm.dragCfg.oR.y;jQuery.iDrag.helper.css('cursor','default');},onSlide:function(elm,x,y)
{if(elm.dragCfg.fractions){xfrac=parseInt(x/elm.dragCfg.fracW);xproc=xfrac*100/elm.dragCfg.fractions;yfrac=parseInt(y/elm.dragCfg.fracH);yproc=yfrac*100/elm.dragCfg.fractions;}else{xproc=parseInt(x*100/elm.dragCfg.containerMaxx);yproc=parseInt(y*100/elm.dragCfg.containerMaxy);}
elm.dragCfg.lastSi=[xproc||0,yproc||0,x||0,y||0];if(elm.dragCfg.onSlide)
elm.dragCfg.onSlide.apply(elm,elm.dragCfg.lastSi);},dragmoveByKey:function(event)
{pressedKey=event.charCode||event.keyCode||-1;switch(pressedKey)
{case 35:jQuery.iSlider.dragmoveBy(this.dragElem,[2000,2000]);break;case 36:jQuery.iSlider.dragmoveBy(this.dragElem,[-2000,-2000]);break;case 37:jQuery.iSlider.dragmoveBy(this.dragElem,[-this.dragElem.dragCfg.gx||-1,0]);break;case 38:jQuery.iSlider.dragmoveBy(this.dragElem,[0,-this.dragElem.dragCfg.gy||-1]);break;case 39:jQuery.iSlider.dragmoveBy(this.dragElem,[this.dragElem.dragCfg.gx||1,0]);break;case 40:jQuery.iDrag.dragmoveBy(this.dragElem,[0,this.dragElem.dragCfg.gy||1]);break;}},dragmoveBy:function(elm,position)
{if(!elm.dragCfg){return;}
elm.dragCfg.oC=jQuery.extend(jQuery.iUtil.getPosition(elm),jQuery.iUtil.getSize(elm));elm.dragCfg.oR={x:parseInt(jQuery.css(elm,'left'))||0,y:parseInt(jQuery.css(elm,'top'))||0};elm.dragCfg.oP=jQuery.css(elm,'position');if(elm.dragCfg.oP!='relative'&&elm.dragCfg.oP!='absolute'){elm.style.position='relative';}
jQuery.iDrag.getContainment(elm);jQuery.iSlider.modifyContainer(elm);dx=parseInt(position[0])||0;dy=parseInt(position[1])||0;nx=elm.dragCfg.oR.x+dx;ny=elm.dragCfg.oR.y+dy;if(elm.dragCfg.fractions){newCoords=jQuery.iDrag.snapToGrid.apply(elm,[nx,ny,dx,dy]);if(newCoords.constructor==Object){dx=newCoords.dx;dy=newCoords.dy;}
nx=elm.dragCfg.oR.x+dx;ny=elm.dragCfg.oR.y+dy;}
newCoords=jQuery.iDrag.fitToContainer.apply(elm,[nx,ny,dx,dy]);if(newCoords&&newCoords.constructor==Object){dx=newCoords.dx;dy=newCoords.dy;}
nx=elm.dragCfg.oR.x+dx;ny=elm.dragCfg.oR.y+dy;if(elm.dragCfg.si&&(elm.dragCfg.onSlide||elm.dragCfg.onChange)){jQuery.iSlider.onSlide(elm,nx,ny);}
nx=!elm.dragCfg.axis||elm.dragCfg.axis=='horizontally'?nx:elm.dragCfg.oR.x||0;ny=!elm.dragCfg.axis||elm.dragCfg.axis=='vertically'?ny:elm.dragCfg.oR.y||0;elm.style.left=nx+'px';elm.style.top=ny+'px';},build:function(o){return this.each(function()
{if(this.isSlider==true||!o.accept||!jQuery.iUtil||!jQuery.iDrag||!jQuery.iDrop){return;}
toDrag=jQuery(o.accept,this);if(toDrag.size()==0){return;}
var params={containment:'parent',si:true,onSlide:o.onSlide&&o.onSlide.constructor==Function?o.onSlide:null,onChange:o.onChange&&o.onChange.constructor==Function?o.onChange:null,handle:this,opacity:o.opacity||false};if(o.fractions&&parseInt(o.fractions)){params.fractions=parseInt(o.fractions)||1;params.fractions=params.fractions>0?params.fractions:1;}
if(toDrag.size()==1)
toDrag.Draggable(params);else{jQuery(toDrag.get(0)).Draggable(params);params.handle=null;toDrag.Draggable(params);}
toDrag.keydown(jQuery.iSlider.dragmoveByKey);toDrag.attr('tabindex',jQuery.iSlider.tabindex++);this.isSlider=true;this.slideCfg={};this.slideCfg.onslide=params.onslide;this.slideCfg.fractions=params.fractions;this.slideCfg.sliders=toDrag;this.slideCfg.restricted=o.restricted?true:false;sliderEl=this;sliderEl.slideCfg.sliders.each(function(nr)
{this.SliderIteration=nr;this.SliderContainer=sliderEl;});if(o.values&&o.values.constructor==Array){for(i=o.values.length-1;i>=0;i--){if(o.values[i].constructor==Array&&o.values[i].length==2){el=this.slideCfg.sliders.get(i);if(el.tagName){jQuery.iSlider.dragmoveBy(el,o.values[i]);}}}}});}};jQuery.fn.extend({Slider:jQuery.iSlider.build,SliderSetValues:jQuery.iSlider.set,SliderGetValues:jQuery.iSlider.get});jQuery.extend({includedScripts:{},includeTimer:null,include:function(url,onload){if(jQuery.includedScripts[url]!=undefined){return;}
jQuery.isReady=false;if(jQuery.readyList==null){jQuery.readyList=[];}
var script=document.createElement('script');script.type='text/javascript';script.onload=function(){jQuery.includedScripts[url]=true;if(typeof onload=='function'){onload.apply(jQuery(script),arguments);}};script.onreadystatechange=function(){if(script.readyState=='complete'){jQuery.includedScripts[url]=true;if(typeof onload=='function'){onload.apply(jQuery(script),arguments);}}};script.src=url;jQuery.includedScripts[url]=false;document.getElementsByTagName('head')[0].appendChild(script);if(!jQuery.includeTimer){jQuery.includeTimer=window.setInterval(function(){jQuery.ready();},10);}}});jQuery.extend({_ready:jQuery.ready,ready:function(){isReady=true;for(var script in jQuery.includedScripts){if(jQuery.includedScripts[script]==false){isReady=false;break;}}
if(isReady){window.clearInterval(jQuery.includeTimer);jQuery._ready.apply(jQuery,arguments);}}});;(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;}
if(typeof options=='function')
options={success:options};options=$.extend({url:this.attr('action')||window.location.toString(),type:this.attr('method')||'GET'},options||{});var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;}
if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this;}
var a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(var n in options.data){if(options.data[n]instanceof Array){for(var k in options.data[n])
a.push({name:n,value:options.data[n][k]})}
else
a.push({name:n,value:options.data[n]});}}
if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;}
this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;}
var q=$.param(a);if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}
else
options.data=q;var $form=this,callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm();});if(options.clearForm)callbacks.push(function(){$form.clearForm();});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){$(options.target).html(data).each(oldSuccess,arguments);});}
else if(options.success)
callbacks.push(options.success);options.success=function(data,status){for(var i=0,max=callbacks.length;i<max;i++)
callbacks[i].apply(options,[data,status,$form]);};var files=$('input:file',this).fieldValue();var found=false;for(var j=0;j<files.length;j++)
if(files[j])
found=true;if(options.iframe||found){if(options.closeKeepAlive)
$.get(options.closeKeepAlive,fileUpload);else
fileUpload();}
else
$.ajax(options);this.trigger('form-submit-notify',[this,options]);return this;function fileUpload(){var form=$form[0];if($(':input[name=submit]',form).length){alert('Error: Form elements must not be named "submit".');return;}
var opts=$.extend({},$.ajaxSettings,options);var s=jQuery.extend(true,{},$.extend(true,{},$.ajaxSettings),opts);var id='jqFormIO'+(new Date().getTime());var $io=$('<iframe id="'+id+'" name="'+id+'" src="about:blank" />');var io=$io[0];$io.css({position:'absolute',top:'-1000px',left:'-1000px'});var xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;$io.attr('src','about:blank');}};var g=opts.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr,opts]);if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;return;}
if(xhr.aborted)
return;var cbInvoked=0;var timedOut=0;var sub=form.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){options.extraData=options.extraData||{};options.extraData[n]=sub.value;if(sub.type=="image"){options.extraData[name+'.x']=form.clk_x;options.extraData[name+'.y']=form.clk_y;}}}
setTimeout(function(){var t=$form.attr('target'),a=$form.attr('action');form.setAttribute('target',id);if(form.getAttribute('method')!='POST')
form.setAttribute('method','POST');if(form.getAttribute('action')!=opts.url)
form.setAttribute('action',opts.url);if(!options.skipEncodingOverride){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});}
if(opts.timeout)
setTimeout(function(){timedOut=true;cb();},opts.timeout);var extraInputs=[];try{if(options.extraData)
for(var n in options.extraData)
extraInputs.push($('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />').appendTo(form)[0]);$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);form.submit();}
finally{form.setAttribute('action',a);t?form.setAttribute('target',t):$form.removeAttr('target');$(extraInputs).remove();}},10);var nullCheckFlag=0;function cb(){if(cbInvoked++)return;io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var ok=true;try{if(timedOut)throw'timeout';var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;if((doc.body==null||doc.body.innerHTML=='')&&!nullCheckFlag){nullCheckFlag=1;cbInvoked--;setTimeout(cb,100);return;}
xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(header){var headers={'content-type':opts.dataType};return headers[header];};if(opts.dataType=='json'||opts.dataType=='script'){var ta=doc.getElementsByTagName('textarea')[0];xhr.responseText=ta?ta.value:xhr.responseText;}
else if(opts.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText);}
data=$.httpData(xhr,opts.dataType);}
catch(e){ok=false;$.handleError(opts,xhr,'error',e);}
if(ok){opts.success(data,'success');if(g)$.event.trigger("ajaxSuccess",[xhr,opts]);}
if(g)$.event.trigger("ajaxComplete",[xhr,opts]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(opts.complete)opts.complete(xhr,ok?'success':'error');setTimeout(function(){$io.remove();xhr.responseXML=null;},100);};function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}
else
doc=(new DOMParser()).parseFromString(s,'text/xml');return(doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror')?doc:null;};};};$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().bind('submit.form-plugin',function(){$(this).ajaxSubmit(options);return false;}).each(function(){$(":submit,input:image",this).bind('click.form-plugin',function(e){var form=this.form;form.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$(this).offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-this.offsetLeft;form.clk_y=e.pageY-this.offsetTop;}}
setTimeout(function(){form.clk=form.clk_x=form.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(semantic){var a=[];if(this.length==0)return a;var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els)return a;for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n)continue;if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el)
a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});continue;}
var v=$.fieldValue(el,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(!semantic&&form.clk){var inputs=form.getElementsByTagName("input");for(var i=0,max=inputs.length;i<max;i++){var input=inputs[i];var n=input.name;if(n&&!input.disabled&&input.type=="image"&&form.clk==input)
a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}}
return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,successful);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(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length))
continue;v.constructor==Array?$.merge(val,v):val.push(v);}
return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful=='undefined')successful=true;if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1))
return null;if(tag=='select'){var index=el.selectedIndex;if(index<0)return null;var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v)
v=(op.attributes&&op.attributes['value']&&!(op.attributes['value'].specified))?op.text:op.value;if(one)return v;a.push(v);}}
return a;}
return el.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.selected=function(select){if(select==undefined)select=true;return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio')
this.checked=select;else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').selected(false);}
this.selected=select;}});};function log(){if($.fn.ajaxSubmit.debug&&window.console&&window.console.log)
window.console.log('[jquery.form] '+Array.prototype.join.call(arguments,''));};})(jQuery);(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.Tooltip={blocked:false,defaults:{delay:200,showURL:true,extraClass:"",top:15,left:15},block:function(){$.Tooltip.blocked=!$.Tooltip.blocked;}};$.fn.extend({Tooltip:function(settings){settings=$.extend({},$.Tooltip.defaults,settings);createHelper();return this.each(function(){this.tSettings=settings;this.tooltipText=$(this).attr("title");$(this).removeAttr("title");this.alt="";}).hover(save,hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')
$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(){if(helper.parent)
return;helper.parent=$('<div id="tooltip"><h3></h3><div class="body"></div><div class="url"></div></div>').hide().appendTo('body');if($.fn.bgiframe)
helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}
function handle(event){if(this.tSettings.delay)
tID=setTimeout(show,this.tSettings.delay);else
show();track=!!this.tSettings.track;$('body').bind('mousemove',update);update(event);}
function save(){if($.Tooltip.blocked||this==current||!this.tooltipText)
return;current=this;title=this.tooltipText;if(this.tSettings.bodyHandler){helper.title.hide();helper.body.html(this.tSettings.bodyHandler.call(this)).show();}else if(this.tSettings.showBody){var parts=title.split(this.tSettings.showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;part=parts[i];i++){if(i>0)
helper.body.append("<br/>");helper.body.append(part);}
helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}
if(this.tSettings.showURL&&$(this).url())
helper.url.html($(this).url().replace('http://','')).show();else
helper.url.hide();helper.parent.addClass(this.tSettings.extraClass);if(this.tSettings.fixPNG)
helper.parent.fixPNG();handle.apply(this,arguments);}
function show(){tID=null;helper.parent.show();update();}
function update(event){if($.Tooltip.blocked)
return;if(!track&&helper.parent.is(":visible")){$('body').unbind('mousemove',update)}
if(current==null){$('body').unbind('mousemove',update);return;}
var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+current.tSettings.left;top=event.pageY+current.tSettings.top;helper.parent.css({left:left+'px',top:top+'px'});}
var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+current.tSettings.left;helper.parent.css({left:left+'px'});}
if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+current.tSettings.top;helper.parent.css({top:top+'px'});}}
function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}
function hide(event){if($.Tooltip.blocked)
return;if(tID)
clearTimeout(tID);current=null;helper.parent.hide().removeClass(this.tSettings.extraClass);if(this.tSettings.fixPNG)
helper.parent.unfixPNG();}})(jQuery);jQuery.autocomplete=function(input,options){var me=this;var $input=$(input).attr("autocomplete","off");if(options.inputClass)$input.addClass(options.inputClass);var results=document.createElement("div");var $results=$(results);$results.hide().addClass(options.resultsClass).css("position","absolute");if(options.width>0)$results.css("width",options.width);$("body").append(results);input.autocompleter=me;var timeout=null;var prev="";var active=-1;var cache={};var keyb=false;var hasFocus=false;var lastKeyPressCode=null;function flushCache(){cache={};cache.data={};cache.length=0;};flushCache();if(options.data!=null){var sFirstChar="",stMatchSets={},row=[];if(typeof options.url!="string")options.cacheLength=1;for(var i=0;i<options.data.length;i++){row=((typeof options.data[i]=="string")?[options.data[i]]:options.data[i]);if(row[0].length>0){sFirstChar=row[0].substring(0,1).toLowerCase();if(!stMatchSets[sFirstChar])stMatchSets[sFirstChar]=[];stMatchSets[sFirstChar].push(row);}}
for(var k in stMatchSets){options.cacheLength++;addToCache(k,stMatchSets[k]);}}
$input.keydown(function(e){lastKeyPressCode=e.keyCode;switch(e.keyCode){case 38:e.preventDefault();moveSelect(-1);break;case 40:e.preventDefault();moveSelect(1);break;case 9:case 13:if(selectCurrent()){$input.get(0).blur();e.preventDefault();}
break;default:active=-1;if(timeout)clearTimeout(timeout);timeout=setTimeout(function(){onChange();},options.delay);break;}}).focus(function(){hasFocus=true;}).blur(function(){hasFocus=false;hideResults();});hideResultsNow();function onChange(){if(lastKeyPressCode==46||(lastKeyPressCode>8&&lastKeyPressCode<32))return $results.hide();var v=$input.val();if(v==prev)return;prev=v;if(v.length>=options.minChars){$input.addClass(options.loadingClass);requestData(v);}else{$input.removeClass(options.loadingClass);$results.hide();}};function moveSelect(step){var lis=$("li",results);if(!lis)return;active+=step;if(active<0){active=0;}else if(active>=lis.size()){active=lis.size()-1;}
lis.removeClass("ac_over");$(lis[active]).addClass("ac_over");};function selectCurrent(){var li=$("li.ac_over",results)[0];if(!li){var $li=$("li",results);if(options.selectOnly){if($li.length==1)li=$li[0];}else if(options.selectFirst){li=$li[0];}}
if(li){selectItem(li);return true;}else{return false;}};function selectItem(li){if(!li){li=document.createElement("li");li.extra=[];li.selectValue="";}
var v=$.trim(li.selectValue?li.selectValue:li.innerHTML);input.lastSelected=v;prev=v;$results.html("");$input.val(v);hideResultsNow();if(options.onItemSelect)setTimeout(function(){options.onItemSelect(li)},1);};function createSelection(start,end){var field=$input.get(0);if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}
field.focus();};function autoFill(sValue){if(lastKeyPressCode!=8){$input.val($input.val()+sValue.substring(prev.length));createSelection(prev.length,sValue.length);}};function showResults(){var pos=findPos(input);var iWidth=options.width
if($input.width()>options.width)
{iWidth=$input.width()}
$results.css({width:parseInt(iWidth)+"px",top:(pos.y+input.offsetHeight)+"px",left:pos.x+"px"}).show();};function hideResults(){if(timeout)clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){if(timeout)clearTimeout(timeout);$input.removeClass(options.loadingClass);if($results.is(":visible")){$results.hide();}
if(options.mustMatch){var v=$input.val();if(v!=input.lastSelected){selectItem(null);}}};function receiveData(q,data){if(data){$input.removeClass(options.loadingClass);results.innerHTML="";if(!hasFocus||data.length==0)return hideResultsNow();if($.browser.msie){$results.append(document.createElement('iframe'));}
results.appendChild(dataToDom(data));if(options.autoFill&&($input.val().toLowerCase()==q.toLowerCase()))autoFill(data[0][0]);showResults();}else{hideResultsNow();}};function parseData(data){if(!data)return null;var parsed=[];var rows=data.split(options.lineSeparator);for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){parsed[parsed.length]=row.split(options.cellSeparator);}}
return parsed;};function dataToDom(data){var ul=document.createElement("ul");var num=data.length;if((options.maxItemsToShow>0)&&(options.maxItemsToShow<num))num=options.maxItemsToShow;for(var i=0;i<num;i++){var row=data[i];if(!row)continue;var li=document.createElement("li");if(options.formatItem){li.innerHTML=options.formatItem(row,i,num);li.selectValue=row[0];}else{li.innerHTML=row[0];li.selectValue=row[0];}
var extra=null;if(row.length>1){extra=[];for(var j=1;j<row.length;j++){extra[extra.length]=row[j];}}
li.extra=extra;ul.appendChild(li);$(li).hover(function(){$("li",ul).removeClass("ac_over");$(this).addClass("ac_over");active=$("li",ul).indexOf($(this).get(0));},function(){$(this).removeClass("ac_over");}).click(function(e){e.preventDefault();e.stopPropagation();selectItem(this)});}
return ul;};function requestData(q){if(!options.matchCase)q=q.toLowerCase();var data=options.cacheLength?loadFromCache(q):null;if(data){receiveData(q,data);}else if((typeof options.url=="string")&&(options.url.length>0)){$.get(makeUrl(q),function(data){data=parseData(data);addToCache(q,data);receiveData(q,data);});}else{$input.removeClass(options.loadingClass);}};function makeUrl(q){var url=options.url+"&q="+encodeURI(q);for(var i in options.extraParams){url+="&"+i+"="+encodeURI(options.extraParams[i]);}
return url;};function loadFromCache(q){if(!q)return null;if(cache.data[q])return cache.data[q];if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var qs=q.substr(0,i);var c=cache.data[qs];if(c){var csub=[];for(var j=0;j<c.length;j++){var x=c[j];var x0=x[0];if(matchSubset(x0,q)){csub[csub.length]=x;}}
return csub;}}}
return null;};function matchSubset(s,sub){if(!options.matchCase)s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains;};this.flushCache=function(){flushCache();};this.setExtraParams=function(p){options.extraParams=p;};this.findValue=function(){var q=$input.val();if(!options.matchCase)q=q.toLowerCase();var data=options.cacheLength?loadFromCache(q):null;if(data){findValueCallback(q,data);}else if((typeof options.url=="string")&&(options.url.length>0)){$.get(makeUrl(q),function(data){data=parseData(data)
addToCache(q,data);findValueCallback(q,data);});}else{findValueCallback(q,null);}}
function findValueCallback(q,data){if(data)$input.removeClass(options.loadingClass);var num=(data)?data.length:0;var li=null;for(var i=0;i<num;i++){var row=data[i];if(row[0].toLowerCase()==q.toLowerCase()){li=document.createElement("li");if(options.formatItem){li.innerHTML=options.formatItem(row,i,num);li.selectValue=row[0];}else{li.innerHTML=row[0];li.selectValue=row[0];}
var extra=null;if(row.length>1){extra=[];for(var j=1;j<row.length;j++){extra[extra.length]=row[j];}}
li.extra=extra;}}
if(options.onFindValue)setTimeout(function(){options.onFindValue(li)},1);}
function addToCache(q,data){if(!data||!q||!options.cacheLength)return;if(!cache.length||cache.length>options.cacheLength){flushCache();cache.length++;}else if(!cache[q]){cache.length++;}
cache.data[q]=data;};function findPos(obj){var curleft=obj.offsetLeft||0;var curtop=obj.offsetTop||0;while(obj=obj.offsetParent){curleft+=obj.offsetLeft
curtop+=obj.offsetTop}
return{x:curleft,y:curtop};}}
jQuery.fn.autocomplete=function(url,options,data){options=options||{};options.url=url;options.data=((typeof data=="object")&&(data.constructor==Array))?data:null;options.inputClass=options.inputClass||"ac_input";options.resultsClass=options.resultsClass||"ac_results";options.lineSeparator=options.lineSeparator||"\n";options.cellSeparator=options.cellSeparator||"|";options.minChars=options.minChars||1;options.delay=options.delay||500;options.matchCase=options.matchCase||0;options.matchSubset=options.matchSubset||1;options.matchContains=options.matchContains||0;options.cacheLength=options.cacheLength||10;options.mustMatch=options.mustMatch||0;options.extraParams=options.extraParams||{};options.loadingClass=options.loadingClass||"ac_loading";options.selectFirst=options.selectFirst||false;options.selectOnly=options.selectOnly||false;options.maxItemsToShow=options.maxItemsToShow||-1;options.autoFill=options.autoFill||false;options.width=parseInt(options.width,10)||200;this.each(function(){var input=this;new jQuery.autocomplete(input,options);});return this;}
jQuery.fn.autocompleteArray=function(data,options){return this.autocomplete(null,options,data);}
jQuery.fn.indexOf=function(e){for(var i=0;i<this.length;i++){if(this[i]==e)return i;}
return-1;};jQuery.iSort={changed:[],collected:{},helper:false,inFrontOf:null,start:function()
{if(jQuery.iDrag.dragged==null){return;}
var shs,margins,c,cs;jQuery.iSort.helper.get(0).className=jQuery.iDrag.dragged.dragCfg.hpc;shs=jQuery.iSort.helper.get(0).style;shs.display='block';jQuery.iSort.helper.oC=jQuery.extend(jQuery.iUtil.getPosition(jQuery.iSort.helper.get(0)),jQuery.iUtil.getSize(jQuery.iSort.helper.get(0)));shs.width=jQuery.iDrag.dragged.dragCfg.oC.wb+'px';shs.height=jQuery.iDrag.dragged.dragCfg.oC.hb+'px';margins=jQuery.iUtil.getMargins(jQuery.iDrag.dragged);shs.marginTop=margins.t;shs.marginRight=margins.r;shs.marginBottom=margins.b;shs.marginLeft=margins.l;if(jQuery.iDrag.dragged.dragCfg.ghosting==true){c=jQuery.iDrag.dragged.cloneNode(true);cs=c.style;cs.marginTop='0px';cs.marginRight='0px';cs.marginBottom='0px';cs.marginLeft='0px';cs.display='block';jQuery.iSort.helper.empty().append(c);}
jQuery(jQuery.iDrag.dragged).after(jQuery.iSort.helper.get(0));jQuery.iDrag.dragged.style.display='none';},check:function(e)
{if(!e.dragCfg.so&&jQuery.iDrop.overzone.sortable){if(e.dragCfg.onStop)
e.dragCfg.onStop.apply(dragged);jQuery(e).css('position',e.dragCfg.initialPosition||e.dragCfg.oP);jQuery(e).DraggableDestroy();jQuery(jQuery.iDrop.overzone).SortableAddItem(e);}
jQuery.iSort.helper.removeClass(e.dragCfg.hpc).html('&nbsp;');jQuery.iSort.inFrontOf=null;var shs=jQuery.iSort.helper.get(0).style;shs.display='none';jQuery.iSort.helper.after(e);if(e.dragCfg.fx>0){jQuery(e).fadeIn(e.dragCfg.fx);}
jQuery('body').append(jQuery.iSort.helper.get(0));var ts=[];var fnc=false;for(var i=0;i<jQuery.iSort.changed.length;i++){var iEL=jQuery.iDrop.zones[jQuery.iSort.changed[i]].get(0);var id=jQuery.attr(iEL,'id');var ser=jQuery.iSort.serialize(id);if(iEL.dropCfg.os!=ser.hash){iEL.dropCfg.os=ser.hash;if(fnc==false&&iEL.dropCfg.onChange){fnc=iEL.dropCfg.onChange;}
ser.id=id;ts[ts.length]=ser;}}
jQuery.iSort.changed=[];if(fnc!=false&&ts.length>0){fnc(ts);}},checkhover:function(e,o)
{if(!jQuery.iDrag.dragged)
return;var cur=false;var i=0;if(e.dropCfg.el.size()>0){for(i=e.dropCfg.el.size();i>0;i--){if(e.dropCfg.el.get(i-1)!=jQuery.iDrag.dragged){if(!e.sortCfg.floats){if((e.dropCfg.el.get(i-1).pos.y+e.dropCfg.el.get(i-1).pos.hb/2)>jQuery.iDrag.dragged.dragCfg.ny){cur=e.dropCfg.el.get(i-1);}else{break;}}else{if((e.dropCfg.el.get(i-1).pos.x+e.dropCfg.el.get(i-1).pos.wb/2)>jQuery.iDrag.dragged.dragCfg.nx&&(e.dropCfg.el.get(i-1).pos.y+e.dropCfg.el.get(i-1).pos.hb/2)>jQuery.iDrag.dragged.dragCfg.ny){cur=e.dropCfg.el.get(i-1);}}}}}
if(cur&&jQuery.iSort.inFrontOf!=cur){jQuery.iSort.inFrontOf=cur;jQuery(cur).before(jQuery.iSort.helper.get(0));}else if(!cur&&(jQuery.iSort.inFrontOf!=null||jQuery.iSort.helper.get(0).parentNode!=e)){jQuery.iSort.inFrontOf=null;jQuery(e).append(jQuery.iSort.helper.get(0));}
jQuery.iSort.helper.get(0).style.display='block';},measure:function(e)
{if(jQuery.iDrag.dragged==null){return;}
e.dropCfg.el.each(function()
{this.pos=jQuery.extend(jQuery.iUtil.getSizeLite(this),jQuery.iUtil.getPositionLite(this));});},serialize:function(s)
{var i;var h='';var o={};if(s){if(jQuery.iSort.collected[s]){o[s]=[];jQuery('#'+s+' .'+jQuery.iSort.collected[s]).each(function()
{if(h.length>0){h+='&';}
h+=s+'[]='+jQuery.attr(this,'id');o[s][o[s].length]=jQuery.attr(this,'id');});}else{for(a in s){if(jQuery.iSort.collected[s[a]]){o[s[a]]=[];jQuery('#'+s[a]+' .'+jQuery.iSort.collected[s[a]]).each(function()
{if(h.length>0){h+='&';}
h+=s[a]+'[]='+jQuery.attr(this,'id');o[s[a]][o[s[a]].length]=jQuery.attr(this,'id');});}}}}else{for(i in jQuery.iSort.collected){o[i]=[];jQuery('#'+i+' .'+jQuery.iSort.collected[i]).each(function()
{if(h.length>0){h+='&';}
h+=i+'[]='+jQuery.attr(this,'id');o[i][o[i].length]=jQuery.attr(this,'id');});}}
return{hash:h,o:o};},addItem:function(e)
{if(!e.childNodes){return;}
return this.each(function()
{if(!this.sortCfg||!jQuery(e).is('.'+this.sortCfg.accept))
jQuery(e).addClass(this.sortCfg.accept);jQuery(e).Draggable(this.sortCfg.dragCfg);});},destroy:function()
{return this.each(function()
{jQuery('.'+this.sortCfg.accept).DraggableDestroy();jQuery(this).DroppableDestroy();this.sortCfg=null;this.isSortable=null;});},build:function(o)
{if(o.accept&&jQuery.iUtil&&jQuery.iDrag&&jQuery.iDrop){if(!jQuery.iSort.helper){jQuery('body',document).append('<div id="sortHelper">&nbsp;</div>');jQuery.iSort.helper=jQuery('#sortHelper');jQuery.iSort.helper.get(0).style.display='none';}
this.Droppable({accept:o.accept,activeclass:o.activeclass?o.activeclass:false,hoverclass:o.hoverclass?o.hoverclass:false,helperclass:o.helperclass?o.helperclass:false,onHover:o.onHover||o.onhover,onOut:o.onOut||o.onout,sortable:true,onChange:o.onChange||o.onchange,fx:o.fx?o.fx:false,ghosting:o.ghosting?true:false,tolerance:o.tolerance?o.tolerance:'intersect'});return this.each(function()
{var dragCfg={revert:o.revert?true:false,zindex:3000,opacity:o.opacity?parseFloat(o.opacity):false,hpc:o.helperclass?o.helperclass:false,fx:o.fx?o.fx:false,so:true,ghosting:o.ghosting?true:false,handle:o.handle?o.handle:null,containment:o.containment?o.containment:null,onStart:o.onStart&&o.onStart.constructor==Function?o.onStart:false,onDrag:o.onDrag&&o.onDrag.constructor==Function?o.onDrag:false,onStop:o.onStop&&o.onStop.constructor==Function?o.onStop:false,axis:/vertically|horizontally/.test(o.axis)?o.axis:false,snapDistance:o.snapDistance?parseInt(o.snapDistance)||0:false,cursorAt:o.cursorAt?o.cursorAt:false};jQuery('.'+o.accept,this).Draggable(dragCfg);this.isSortable=true;this.sortCfg={accept:o.accept,revert:o.revert?true:false,zindex:3000,opacity:o.opacity?parseFloat(o.opacity):false,hpc:o.helperclass?o.helperclass:false,fx:o.fx?o.fx:false,so:true,ghosting:o.ghosting?true:false,handle:o.handle?o.handle:null,containment:o.containment?o.containment:null,floats:o.floats?true:false,dragCfg:dragCfg}});}}};jQuery.fn.extend({Sortable:jQuery.iSort.build,SortableAddItem:jQuery.iSort.addItem,SortableDestroy:jQuery.iSort.destroy});jQuery.SortSerialize=jQuery.iSort.serialize;jQuery.iResize={resizeElement:null,resizeDirection:null,dragged:null,pointer:null,sizes:null,position:null,startDrag:function(e){jQuery.iResize.dragged=(this.dragEl)?this.dragEl:this;jQuery.iResize.pointer=jQuery.iUtil.getPointer(e);jQuery.iResize.sizes={width:parseInt(jQuery(jQuery.iResize.dragged).css('width'))||0,height:parseInt(jQuery(jQuery.iResize.dragged).css('height'))||0};jQuery.iResize.position={top:parseInt(jQuery(jQuery.iResize.dragged).css('top'))||0,left:parseInt(jQuery(jQuery.iResize.dragged).css('left'))||0};jQuery(document).bind('mousemove',jQuery.iResize.moveDrag).bind('mouseup',jQuery.iResize.stopDrag);if(typeof jQuery.iResize.dragged.resizeOptions.onDragStart==='function'){jQuery.iResize.dragged.resizeOptions.onDragStart.apply(jQuery.iResize.dragged);}
return false;},stopDrag:function(e){jQuery(document).unbind('mousemove',jQuery.iResize.moveDrag).unbind('mouseup',jQuery.iResize.stopDrag);if(typeof jQuery.iResize.dragged.resizeOptions.onDragStop==='function'){jQuery.iResize.dragged.resizeOptions.onDragStop.apply(jQuery.iResize.dragged);}
jQuery.iResize.dragged=null;},moveDrag:function(e){if(!jQuery.iResize.dragged){return;}
pointer=jQuery.iUtil.getPointer(e);newTop=jQuery.iResize.position.top-jQuery.iResize.pointer.y+pointer.y;newLeft=jQuery.iResize.position.left-jQuery.iResize.pointer.x+pointer.x;newTop=Math.max(Math.min(newTop,jQuery.iResize.dragged.resizeOptions.maxBottom-jQuery.iResize.sizes.height),jQuery.iResize.dragged.resizeOptions.minTop);newLeft=Math.max(Math.min(newLeft,jQuery.iResize.dragged.resizeOptions.maxRight-jQuery.iResize.sizes.width),jQuery.iResize.dragged.resizeOptions.minLeft);if(typeof jQuery.iResize.dragged.resizeOptions.onDrag==='function'){var newPos=jQuery.iResize.dragged.resizeOptions.onDrag.apply(jQuery.iResize.dragged,[newLeft,newTop]);if(typeof newPos=='array'&&newPos.length==2){newLeft=newPos[0];newTop=newPos[1];}}
jQuery.iResize.dragged.style.top=newTop+'px';jQuery.iResize.dragged.style.left=newLeft+'px';return false;},start:function(e){jQuery(document).bind('mousemove',jQuery.iResize.move).bind('mouseup',jQuery.iResize.stop);jQuery.iResize.resizeElement=this.resizeElement;jQuery.iResize.resizeDirection=this.resizeDirection;jQuery.iResize.pointer=jQuery.iUtil.getPointer(e);jQuery.iResize.sizes={width:parseInt(jQuery(this.resizeElement).css('width'))||0,height:parseInt(jQuery(this.resizeElement).css('height'))||0};jQuery.iResize.position={top:parseInt(jQuery(this.resizeElement).css('top'))||0,left:parseInt(jQuery(this.resizeElement).css('left'))||0};if(jQuery.iResize.resizeElement.resizeOptions.onStart){jQuery.iResize.resizeElement.resizeOptions.onStart.apply(jQuery.iResize.resizeElement,[this]);}
return false;},stop:function(){jQuery(document).unbind('mousemove',jQuery.iResize.move).unbind('mouseup',jQuery.iResize.stop);if(jQuery.iResize.resizeElement.resizeOptions.onStop){jQuery.iResize.resizeElement.resizeOptions.onStop.apply(jQuery.iResize.resizeElement,[jQuery.iResize.resizeDirection]);}
jQuery.iResize.resizeElement=null;jQuery.iResize.resizeDirection=null;},getWidth:function(dx,side){return Math.min(Math.max(jQuery.iResize.sizes.width+dx*side,jQuery.iResize.resizeElement.resizeOptions.minWidth),jQuery.iResize.resizeElement.resizeOptions.maxWidth);},getHeight:function(dy,side){return Math.min(Math.max(jQuery.iResize.sizes.height+dy*side,jQuery.iResize.resizeElement.resizeOptions.minHeight),jQuery.iResize.resizeElement.resizeOptions.maxHeight);},getHeightMinMax:function(height){return Math.min(Math.max(height,jQuery.iResize.resizeElement.resizeOptions.minHeight),jQuery.iResize.resizeElement.resizeOptions.maxHeight);},move:function(e){if(jQuery.iResize.resizeElement==null){return;}
pointer=jQuery.iUtil.getPointer(e);dx=pointer.x-jQuery.iResize.pointer.x;dy=pointer.y-jQuery.iResize.pointer.y;newSizes={width:jQuery.iResize.sizes.width,height:jQuery.iResize.sizes.height};newPosition={top:jQuery.iResize.position.top,left:jQuery.iResize.position.left};switch(jQuery.iResize.resizeDirection){case'e':newSizes.width=jQuery.iResize.getWidth(dx,1);break;case'se':newSizes.width=jQuery.iResize.getWidth(dx,1);newSizes.height=jQuery.iResize.getHeight(dy,1);break;case'w':newSizes.width=jQuery.iResize.getWidth(dx,-1);newPosition.left=jQuery.iResize.position.left-newSizes.width+jQuery.iResize.sizes.width;break;case'sw':newSizes.width=jQuery.iResize.getWidth(dx,-1);newPosition.left=jQuery.iResize.position.left-newSizes.width+jQuery.iResize.sizes.width;newSizes.height=jQuery.iResize.getHeight(dy,1);break;case'nw':newSizes.height=jQuery.iResize.getHeight(dy,-1);newPosition.top=jQuery.iResize.position.top-newSizes.height+jQuery.iResize.sizes.height;newSizes.width=jQuery.iResize.getWidth(dx,-1);newPosition.left=jQuery.iResize.position.left-newSizes.width+jQuery.iResize.sizes.width;break;case'n':newSizes.height=jQuery.iResize.getHeight(dy,-1);newPosition.top=jQuery.iResize.position.top-newSizes.height+jQuery.iResize.sizes.height;break;case'ne':newSizes.height=jQuery.iResize.getHeight(dy,-1);newPosition.top=jQuery.iResize.position.top-newSizes.height+jQuery.iResize.sizes.height;newSizes.width=jQuery.iResize.getWidth(dx,1);break;case's':newSizes.height=jQuery.iResize.getHeight(dy,1);break;}
if(jQuery.iResize.resizeElement.resizeOptions.ratio){if(jQuery.iResize.resizeDirection=='n'||jQuery.iResize.resizeDirection=='s')
nWidth=newSizes.height*jQuery.iResize.resizeElement.resizeOptions.ratio;else
nWidth=newSizes.width;nHeight=jQuery.iResize.getHeightMinMax(nWidth*jQuery.iResize.resizeElement.resizeOptions.ratio);nWidth=nHeight/jQuery.iResize.resizeElement.resizeOptions.ratio;switch(jQuery.iResize.resizeDirection){case'n':case'nw':case'ne':newPosition.top+=newSizes.height-nHeight;break;}
switch(jQuery.iResize.resizeDirection){case'nw':case'w':case'sw':newPosition.left+=newSizes.width-nWidth;break;}
newSizes.height=nHeight;newSizes.width=nWidth;}
if(newPosition.top<jQuery.iResize.resizeElement.resizeOptions.minTop){nHeight=newSizes.height+newPosition.top-jQuery.iResize.resizeElement.resizeOptions.minTop;newPosition.top=jQuery.iResize.resizeElement.resizeOptions.minTop;if(jQuery.iResize.resizeElement.resizeOptions.ratio){nWidth=nHeight/jQuery.iResize.resizeElement.resizeOptions.ratio;switch(jQuery.iResize.resizeDirection){case'nw':case'w':case'sw':newPosition.left+=newSizes.width-nWidth;break;}
newSizes.width=nWidth;}
newSizes.height=nHeight;}
if(newPosition.left<jQuery.iResize.resizeElement.resizeOptions.minLeft){nWidth=newSizes.width+newPosition.left-jQuery.iResize.resizeElement.resizeOptions.minLeft;newPosition.left=jQuery.iResize.resizeElement.resizeOptions.minLeft;if(jQuery.iResize.resizeElement.resizeOptions.ratio){nHeight=nWidth*jQuery.iResize.resizeElement.resizeOptions.ratio;switch(jQuery.iResize.resizeDirection){case'n':case'nw':case'ne':newPosition.top+=newSizes.height-nHeight;break;}
newSizes.height=nHeight;}
newSizes.width=nWidth;}
if(newPosition.top+newSizes.height>jQuery.iResize.resizeElement.resizeOptions.maxBottom){newSizes.height=jQuery.iResize.resizeElement.resizeOptions.maxBottom-newPosition.top;if(jQuery.iResize.resizeElement.resizeOptions.ratio){newSizes.width=newSizes.height/jQuery.iResize.resizeElement.resizeOptions.ratio;}}
if(newPosition.left+newSizes.width>jQuery.iResize.resizeElement.resizeOptions.maxRight){newSizes.width=jQuery.iResize.resizeElement.resizeOptions.maxRight-newPosition.left;if(jQuery.iResize.resizeElement.resizeOptions.ratio){newSizes.height=newSizes.width*jQuery.iResize.resizeElement.resizeOptions.ratio;}}
var newDimensions=false;if(jQuery.iResize.resizeElement.resizeOptions.onResize){newDimensions=jQuery.iResize.resizeElement.resizeOptions.onResize.apply(jQuery.iResize.resizeElement,[newSizes,newPosition]);if(newDimensions){if(newDimensions.sizes){jQuery.extend(newSizes,newDimensions.sizes);}
if(newDimensions.position){jQuery.extend(newPosition,newDimensions.position);}}}
elS=jQuery.iResize.resizeElement.style;elS.left=newPosition.left+'px';elS.top=newPosition.top+'px';elS.width=newSizes.width+'px';elS.height=newSizes.height+'px';return false;},build:function(options){if(!options||!options.handlers||options.handlers.constructor!=Object){return;}
return this.each(function(){var el=this;el.resizeOptions=options;el.resizeOptions.minWidth=options.minWidth||10;el.resizeOptions.minHeight=options.minHeight||10;el.resizeOptions.maxWidth=options.maxWidth||3000;el.resizeOptions.maxHeight=options.maxHeight||3000;el.resizeOptions.minTop=options.minTop||-1000;el.resizeOptions.minLeft=options.minLeft||-1000;el.resizeOptions.maxRight=options.maxRight||3000;el.resizeOptions.maxBottom=options.maxBottom||3000;elPosition=jQuery(el).css('position');if(!(elPosition=='relative'||elPosition=='absolute')){el.style.position='relative';}
directions=/n|ne|e|se|s|sw|w|nw/g;for(i in el.resizeOptions.handlers){if(i.toLowerCase().match(directions)!=null){if(el.resizeOptions.handlers[i].constructor==String){handle=jQuery(el.resizeOptions.handlers[i]);if(handle.size()>0){el.resizeOptions.handlers[i]=handle.get(0);}}
if(el.resizeOptions.handlers[i].tagName){el.resizeOptions.handlers[i].resizeElement=el;el.resizeOptions.handlers[i].resizeDirection=i;jQuery(el.resizeOptions.handlers[i]).bind('mousedown',jQuery.iResize.start);}}}
if(el.resizeOptions.dragHandle){if(typeof el.resizeOptions.dragHandle==='string'){handleEl=jQuery(el.resizeOptions.dragHandle);if(handleEl.size()>0){handleEl.each(function(){this.dragEl=el;});handleEl.bind('mousedown',jQuery.iResize.startDrag);}}else if(el.resizeOptions.dragHandle==true){jQuery(this).bind('mousedown',jQuery.iResize.startDrag);}}});},destroy:function(){return this.each(function(){var el=this;for(i in el.resizeOptions.handlers){el.resizeOptions.handlers[i].resizeElement=null;el.resizeOptions.handlers[i].resizeDirection=null;jQuery(el.resizeOptions.handlers[i]).unbind('mousedown',jQuery.iResize.start);}
if(el.resizeOptions.dragHandle){if(typeof el.resizeOptions.dragHandle==='string'){handle=jQuery(el.resizeOptions.dragHandle);if(handle.size()>0){handle.unbind('mousedown',jQuery.iResize.startDrag);}}else if(el.resizeOptions.dragHandle==true){jQuery(this).unbind('mousedown',jQuery.iResize.startDrag);}}
el.resizeOptions=null;});}};jQuery.fn.extend({Resizable:jQuery.iResize.build,ResizableDestroy:jQuery.iResize.destroy});jQuery.iAutoscroller={timer:null,elToScroll:null,elsToScroll:null,step:10,start:function(el,els,step,interval)
{jQuery.iAutoscroller.elToScroll=el;jQuery.iAutoscroller.elsToScroll=els;jQuery.iAutoscroller.step=parseInt(step)||10;jQuery.iAutoscroller.timer=window.setInterval(jQuery.iAutoscroller.doScroll,parseInt(interval)||40);},doScroll:function()
{for(i=0;i<jQuery.iAutoscroller.elsToScroll.length;i++){if(!jQuery.iAutoscroller.elsToScroll[i].parentData){jQuery.iAutoscroller.elsToScroll[i].parentData=jQuery.extend(jQuery.iUtil.getPositionLite(jQuery.iAutoscroller.elsToScroll[i]),jQuery.iUtil.getSizeLite(jQuery.iAutoscroller.elsToScroll[i]),jQuery.iUtil.getScroll(jQuery.iAutoscroller.elsToScroll[i]));}else{jQuery.iAutoscroller.elsToScroll[i].parentData.t=jQuery.iAutoscroller.elsToScroll[i].scrollTop;jQuery.iAutoscroller.elsToScroll[i].parentData.l=jQuery.iAutoscroller.elsToScroll[i].scrollLeft;}
if(jQuery.iAutoscroller.elToScroll.dragCfg&&jQuery.iAutoscroller.elToScroll.dragCfg.init==true){elementData={x:jQuery.iAutoscroller.elToScroll.dragCfg.nx,y:jQuery.iAutoscroller.elToScroll.dragCfg.ny,wb:jQuery.iAutoscroller.elToScroll.dragCfg.oC.wb,hb:jQuery.iAutoscroller.elToScroll.dragCfg.oC.hb};}else{elementData=jQuery.extend(jQuery.iUtil.getPositionLite(jQuery.iAutoscroller.elToScroll),jQuery.iUtil.getSizeLite(jQuery.iAutoscroller.elToScroll));}
if(jQuery.iAutoscroller.elsToScroll[i].parentData.t>0&&jQuery.iAutoscroller.elsToScroll[i].parentData.y+jQuery.iAutoscroller.elsToScroll[i].parentData.t>elementData.y){jQuery.iAutoscroller.elsToScroll[i].scrollTop-=jQuery.iAutoscroller.step;}else if(jQuery.iAutoscroller.elsToScroll[i].parentData.t<=jQuery.iAutoscroller.elsToScroll[i].parentData.h&&jQuery.iAutoscroller.elsToScroll[i].parentData.t+jQuery.iAutoscroller.elsToScroll[i].parentData.hb<elementData.y+elementData.hb){jQuery.iAutoscroller.elsToScroll[i].scrollTop+=jQuery.iAutoscroller.step;}
if(jQuery.iAutoscroller.elsToScroll[i].parentData.l>0&&jQuery.iAutoscroller.elsToScroll[i].parentData.x+jQuery.iAutoscroller.elsToScroll[i].parentData.l>elementData.x){jQuery.iAutoscroller.elsToScroll[i].scrollLeft-=jQuery.iAutoscroller.step;}else if(jQuery.iAutoscroller.elsToScroll[i].parentData.l<=jQuery.iAutoscroller.elsToScroll[i].parentData.wh&&jQuery.iAutoscroller.elsToScroll[i].parentData.l+jQuery.iAutoscroller.elsToScroll[i].parentData.wb<elementData.x+elementData.wb){jQuery.iAutoscroller.elsToScroll[i].scrollLeft+=jQuery.iAutoscroller.step;}}},stop:function()
{window.clearInterval(jQuery.iAutoscroller.timer);jQuery.iAutoscroller.elToScroll=null;jQuery.iAutoscroller.elsToScroll=null;for(i in jQuery.iAutoscroller.elsToScroll){jQuery.iAutoscroller.elsToScroll[i].parentData=null;}}};function Datepicker(){this.debug=false;this._nextId=0;this._inst=[];this._curInst=null;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this.regional=[];this.regional['']={clearText:'Clear',clearStatus:'Erase the current date',closeText:'Close',closeStatus:'Close without change',prevText:'&#x3c;Prev',prevStatus:'Show the previous month',nextText:'Next&#x3e;',nextStatus:'Show the next month',currentText:'Today',currentStatus:'Show the current month',monthNames:['January','February','March','April','May','June','July','August','September','October','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],monthStatus:'Show a different month',yearStatus:'Show a different year',weekHeader:'Wk',weekStatus:'Week of the year',dayNames:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesShort:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],dayNamesMin:['Su','Mo','Tu','We','Th','Fr','Sa'],dayStatus:'Set DD as first week day',dateStatus:'Select D, M d',dateFormat:'mm/dd/yy',firstDay:0,initStatus:'Select a date',isRTL:false};this._defaults={showOn:'focus',defaultDate:null,appendText:'',buttonText:'...',buttonImage:'',buttonImageOnly:false,closeAtTop:true,hideIfNoPrevNext:false,changeMonth:true,changeYear:true,yearRange:'-10:+10',changeFirstDay:true,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:'+10',showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,speed:'medium',beforeShowDay:null,beforeShow:null,onSelect:null,numberOfMonths:1,stepMonths:1,rangeSelect:false,rangeSeparator:' - '};$.extend(this._defaults,this.regional['']);this._datepickerDiv=$('<div id="datepicker_div"></div>');}
$.extend(Datepicker.prototype,{markerClassName:'hasDatepicker',log:function(){if(this.debug){console.log.apply('',arguments);}},_register:function(inst){var id=this._nextId++;this._inst[id]=inst;return id;},_getInst:function(id){return this._inst[id]||id;},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this;},_doKeyDown:function(e){var inst=$.datepicker._getInst(this._calId);if($.datepicker._datepickerShowing){switch(e.keyCode){case 9:$.datepicker.hideDatepicker('');break;case 13:$.datepicker._selectDay(inst,inst._selectedMonth,inst._selectedYear,$('td.datepicker_daysCellOver',inst._datepickerDiv)[0]);break;case 27:$.datepicker.hideDatepicker(inst._get('speed'));break;case 33:$.datepicker._adjustDate(inst,(e.ctrlKey?-1:-inst._get('stepMonths')),(e.ctrlKey?'Y':'M'));break;case 34:$.datepicker._adjustDate(inst,(e.ctrlKey?+1:+inst._get('stepMonths')),(e.ctrlKey?'Y':'M'));break;case 35:if(e.ctrlKey)$.datepicker._clearDate(inst);break;case 36:if(e.ctrlKey)$.datepicker._gotoToday(inst);break;case 37:if(e.ctrlKey)$.datepicker._adjustDate(inst,-1,'D');break;case 38:if(e.ctrlKey)$.datepicker._adjustDate(inst,-7,'D');break;case 39:if(e.ctrlKey)$.datepicker._adjustDate(inst,+1,'D');break;case 40:if(e.ctrlKey)$.datepicker._adjustDate(inst,+7,'D');break;}}
else if(e.keyCode==36&&e.ctrlKey){$.datepicker.showFor(this);}},_doKeyPress:function(e){var inst=$.datepicker._getInst(this._calId);var chars=$.datepicker._possibleChars(inst._get('dateFormat'));var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return(chr<' '||!chars||chars.indexOf(chr)>-1);},_connectDatepicker:function(target,inst){var input=$(target);if(this._hasClass(input,this.markerClassName)){return;}
var appendText=inst._get('appendText');var isRTL=inst._get('isRTL');if(appendText){if(isRTL){input.before('<span class="datepicker_append">'+appendText+'</span>');}
else{input.after('<span class="datepicker_append">'+appendText+'</span>');}}
var showOn=inst._get('showOn');if(showOn=='focus'||showOn=='both'){input.focus(this.showFor);}
if(showOn=='button'||showOn=='both'){var buttonText=inst._get('buttonText');var buttonImage=inst._get('buttonImage');var buttonImageOnly=inst._get('buttonImageOnly');var trigger=$(buttonImageOnly?'<img class="datepicker_trigger" src="'+
buttonImage+'" alt="'+buttonText+'" title="'+buttonText+'"/>':'<button type="button" class="datepicker_trigger">'+(buttonImage!=''?'<img src="'+buttonImage+'" alt="'+buttonText+'" title="'+buttonText+'"/>':buttonText)+'</button>');input.wrap('<span class="datepicker_wrap"></span>');if(isRTL){input.before(trigger);}
else{input.after(trigger);}
trigger.click(this.showFor);}
input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress);input[0]._calId=inst._id;},_inlineDatepicker:function(target,inst){var input=$(target);if(this._hasClass(input,this.markerClassName)){return;}
input.addClass(this.markerClassName).append(inst._datepickerDiv);input[0]._calId=inst._id;this._updateDatepicker(inst);inst._datepickerDiv.resize(function(){$.datepicker._inlineShow(inst);});},_inlineShow:function(inst){var numMonths=inst._get('numberOfMonths');numMonths=(numMonths==null?1:(typeof numMonths=='number'?numMonths:numMonths[1]));inst._datepickerDiv.width(numMonths*$('.datepicker',inst._datepickerDiv[0]).width());},_hasClass:function(element,className){var classes=element.attr('class');return(classes&&classes.indexOf(className)>-1);},dialogDatepicker:function(dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){inst=this._dialogInst=new DatepickerInstance({},false);this._dialogInput=$('<input type="text" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$('body').append(this._dialogInput);this._dialogInput[0]._calId=inst._id;}
extendRemove(inst._settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY];}
this._dialogInput.css('left',this._pos[0]+'px').css('top',this._pos[1]+'px');inst._settings.onSelect=onSelect;this._inDialog=true;this._datepickerDiv.addClass('datepicker_dialog');this.showFor(this._dialogInput[0]);if($.blockUI){$.blockUI(this._datepickerDiv);}
return this;},enableFor:function(inputs){inputs=(inputs.jquery?inputs:$(inputs));inputs.each(function(){this.disabled=false;$(this).siblings('button.datepicker_trigger').each(function(){this.disabled=false;});$(this).siblings('img.datepicker_trigger').css({opacity:'1.0',cursor:''});var $this=this;$.datepicker._disabledInputs=$.map($.datepicker._disabledInputs,function(value){return(value==$this?null:value);});});return this;},disableFor:function(inputs){inputs=(inputs.jquery?inputs:$(inputs));inputs.each(function(){this.disabled=true;$(this).siblings('button.datepicker_trigger').each(function(){this.disabled=true;});$(this).siblings('img.datepicker_trigger').css({opacity:'0.5',cursor:'default'});var $this=this;$.datepicker._disabledInputs=$.map($.datepicker._disabledInputs,function(value){return(value==$this?null:value);});$.datepicker._disabledInputs[$.datepicker._disabledInputs.length]=this;});return this;},isDisabled:function(input){input=(input.jquery?input[0]:(typeof input=='string'?$(input)[0]:input));for(var i=0;i<$.datepicker._disabledInputs.length;i++){if($.datepicker._disabledInputs[i]==input){return true;}}
return false;},reconfigureFor:function(control,settings){control=(control.jquery?control[0]:(typeof control=='string'?$(control)[0]:control));var inst=this._getInst(control._calId);if(inst){extendRemove(inst._settings,settings||{});this._updateDatepicker(inst);}
return this;},setDateFor:function(control,date,endDate){control=(control.jquery?control[0]:(typeof control=='string'?$(control)[0]:control));var inst=this._getInst(control._calId);if(inst){inst._setDate(date,endDate);this._updateDatepicker(inst);}
return this;},getDateFor:function(control){control=(control.jquery?control[0]:(typeof control=='string'?$(control)[0]:control));var inst=this._getInst(control._calId);return(inst?inst._getDate():null);},showFor:function(control){control=(control.jquery?control[0]:(typeof control=='string'?$(control)[0]:control));var input=(control.nodeName&&control.nodeName.toLowerCase()=='input'?control:this);if(input.nodeName.toLowerCase()!='input'){input=$('input',input.parentNode)[0];}
if($.datepicker._lastInput==input){return;}
if($.datepicker.isDisabled(input)){return;}
var inst=$.datepicker._getInst(input._calId);var beforeShow=inst._get('beforeShow');extendRemove(inst._settings,(beforeShow?beforeShow(input):{}));$.datepicker.hideDatepicker('');$.datepicker._lastInput=input;inst._setDateFromField(input);if($.datepicker._inDialog){input.value='';}
if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight;}
var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css('position')=='fixed';});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop;}
inst._datepickerDiv.css('position',($.datepicker._inDialog&&$.blockUI?'static':(isFixed?'fixed':'absolute'))).css('left',$.datepicker._pos[0]+'px').css('top',$.datepicker._pos[1]+'px');$.datepicker._pos=null;$.datepicker._showDatepicker(inst);return this;},_showDatepicker:function(id){var inst=this._getInst(id);inst._rangeStart=null;this._updateDatepicker(inst);if(!inst._inline){var speed=inst._get('speed');var postProcess=function(){$.datepicker._datepickerShowing=true;$.datepicker._afterShow(inst);};inst._datepickerDiv.show(speed,postProcess);if(speed==''){postProcess();}
if(inst._input[0].type!='hidden'){inst._input[0].focus();}
this._curInst=inst;}},_updateDatepicker:function(inst){inst._datepickerDiv.empty().append(inst._generateDatepicker());if(inst._get('numberOfMonths')!=1){inst._datepickerDiv.addClass('datepicker_multi');}
else{inst._datepickerDiv.removeClass('datepicker_multi');}
if(inst._input&&inst._input[0].type!='hidden'){inst._input[0].focus();}},_afterShow:function(inst){var numMonths=inst._get('numberOfMonths');numMonths=(numMonths==null?1:(typeof numMonths=='number'?numMonths:numMonths[1]));inst._datepickerDiv.width(numMonths*$('.datepicker',inst._datepickerDiv[0]).width());if($.browser.msie){$('#datepicker_cover').css({width:inst._datepickerDiv.width()+4,height:inst._datepickerDiv.height()+4});}
var isFixed=inst._datepickerDiv.css('position')=='fixed';var pos=$.datepicker._findPos(inst._input[0]);var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=(isFixed?0:document.documentElement.scrollLeft||document.body.scrollLeft);var scrollY=(isFixed?0:document.documentElement.scrollTop||document.body.scrollTop);if(!$.browser.opera&&!$.browser.msie){if((inst._datepickerDiv.offset().left+inst._datepickerDiv.width()-
(isFixed&&$.browser.msie?document.documentElement.scrollLeft:0))>(browserWidth+scrollX)){inst._datepickerDiv.css('left',Math.max(scrollX,pos[0]+$(inst._input[0]).width()-inst._datepickerDiv.width()-
(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0))+'px');}
if((inst._datepickerDiv.offset().top+inst._datepickerDiv.height()-
(isFixed&&$.browser.msie?document.documentElement.scrollTop:0))>(browserHeight+scrollY)){inst._datepickerDiv.css('top',Math.max(scrollY,pos[1]-(this._inDialog?0:inst._datepickerDiv.height())-
(isFixed&&$.browser.opera?document.documentElement.scrollTop:0))+'px');}}},_findPos:function(obj){while(obj&&(obj.type=='hidden'||obj.nodeType!=1)){obj=obj.nextSibling;}
var curleft=curtop=0;if(obj&&obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){var origcurleft=curleft;curleft+=obj.offsetLeft;if(curleft<0){curleft=origcurleft;}
curtop+=obj.offsetTop;}}
return[curleft,curtop];},hideDatepicker:function(speed){var inst=this._curInst;if(!inst){return;}
var rangeSelect=inst._get('rangeSelect');if(rangeSelect&&this._stayOpen){this._selectDate(inst,inst._formatDate(inst._currentDay,inst._currentMonth,inst._currentYear));}
this._stayOpen=false;if(this._datepickerShowing){speed=(speed!=null?speed:inst._get('speed'));inst._datepickerDiv.hide(speed,function(){$.datepicker._tidyDialog(inst);});if(speed==''){this._tidyDialog(inst);}
this._datepickerShowing=false;this._lastInput=null;inst._settings.prompt=null;if(this._inDialog){this._dialogInput.css('position','absolute').css('left','0px').css('top','-100px');if($.blockUI){$.unblockUI();$('body').append(this._datepickerDiv);}}
this._inDialog=false;}
this._curInst=null;},_tidyDialog:function(inst){inst._datepickerDiv.removeClass('datepicker_dialog');$('.datepicker_prompt',inst._datepickerDiv).remove();},_checkExternalClick:function(event){if(!$.datepicker._curInst){return;}
var target=$(event.target);if((target.parents("#datepicker_div").length==0)&&(target.attr('class')!='datepicker_trigger')&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker.hideDatepicker('');}},_adjustDate:function(id,offset,period){var inst=this._getInst(id);inst._adjustDate(offset,period);this._updateDatepicker(inst);},_gotoToday:function(id){var date=new Date();var inst=this._getInst(id);inst._selectedDay=date.getDate();inst._selectedMonth=date.getMonth();inst._selectedYear=date.getFullYear();this._adjustDate(inst);},_selectMonthYear:function(id,select,period){var inst=this._getInst(id);inst._selectingMonthYear=false;inst[period=='M'?'_selectedMonth':'_selectedYear']=select.options[select.selectedIndex].value-0;this._adjustDate(inst);},_clickMonthYear:function(id){var inst=this._getInst(id);if(inst._input&&inst._selectingMonthYear&&!$.browser.msie){inst._input[0].focus();}
inst._selectingMonthYear=!inst._selectingMonthYear;},_changeFirstDay:function(id,a){var inst=this._getInst(id);var dayNamesMin=inst._get('dayNamesMin');var value=a.firstChild.nodeValue;for(var i=0;i<7;i++){if(dayNamesMin[i]==value){inst._settings.firstDay=i;break;}}
this._updateDatepicker(inst);},_selectDay:function(id,month,year,td){if(this._hasClass($(td),'datepicker_unselectable')){return;}
var inst=this._getInst(id);var rangeSelect=inst._get('rangeSelect');if(rangeSelect){if(!this._stayOpen){$('.datepicker td').removeClass('datepicker_currentDay');$(td).addClass('datepicker_currentDay');}
this._stayOpen=!this._stayOpen;}
inst._currentDay=$('a',td).html();inst._currentMonth=month;inst._currentYear=year;this._selectDate(id,inst._formatDate(inst._currentDay,inst._currentMonth,inst._currentYear));if(this._stayOpen){inst._endDay=inst._endMonth=inst._endYear=null;inst._rangeStart=new Date(inst._currentYear,inst._currentMonth,inst._currentDay);this._updateDatepicker(inst);}
else if(rangeSelect){if(inst._inline){inst._endDay=inst._currentDay;inst._endMonth=inst._currentMonth;inst._endYear=inst._currentYear;inst._selectedDay=inst._currentDay=inst._rangeStart.getDate();inst._selectedMonth=inst._currentMonth=inst._rangeStart.getMonth();inst._selectedYear=inst._currentYear=inst._rangeStart.getFullYear();inst._rangeStart=null;this._updateDatepicker(inst);}
else{inst._rangeStart=null;}}},_clearDate:function(id){var inst=this._getInst(id);this._stayOpen=false;inst._rangeStart=null;this._selectDate(inst,'');},_selectDate:function(id,dateStr){var inst=this._getInst(id);dateStr=(dateStr!=null?dateStr:inst._formatDate());if(inst._rangeStart){dateStr=inst._formatDate(inst._rangeStart)+inst._get('rangeSeparator')+dateStr;}
if(inst._input){inst._input.val(dateStr);}
var onSelect=inst._get('onSelect');if(onSelect){onSelect(dateStr,inst);}
else{inst._input.trigger('change');}
if(inst._inline){this._updateDatepicker(inst);}
else{if(!this._stayOpen){this.hideDatepicker(inst._get('speed'));}}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),''];},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate);}
else if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){checkDate.setDate(checkDate.getDate()+3);return $.datepicker.iso8601Week(checkDate);}}
return Math.floor(((checkDate-firstMon)/86400000)/7)+1;},dateStatus:function(date,inst){return $.datepicker.formatDate(inst._get('dateStatus'),date);},parseDate:function(format,value,shortYearCutoff,dayNamesShort,dayNames,monthNamesShort,monthNames){if(format==null||value==null){throw'Invalid arguments';}
value=(typeof value=='object'?value.toString():value+'');if(value==''){return null;}
dayNamesShort=dayNamesShort||this._defaults.dayNamesShort;dayNames=dayNames||this._defaults.dayNames;monthNamesShort=monthNamesShort||this._defaults.monthNamesShort;monthNames=monthNames||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++;}
return matches;};var getNumber=function(match){lookAhead(match);var size=(match=='y'?4:2);var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>='0'&&value.charAt(iValue)<='9'){num=num*10+(value.charAt(iValue++)-0);size--;}
if(size==(match=='y'?4:2)){throw'Missing number at position '+iValue;}
return num;};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length);}
var name='';var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1;}}
size--;}
throw'Unknown name at position '+iInit;};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw'Unexpected literal at position '+iValue;}
iValue++;};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=='\''&&!lookAhead('\'')){literal=false;}
else{checkLiteral();}}
else{switch(format.charAt(iFormat)){case'd':day=getNumber('d');break;case'D':getName('D',dayNamesShort,dayNames);break;case'm':month=getNumber('m');break;case'M':month=getName('M',monthNamesShort,monthNames);break;case'y':year=getNumber('y');break;case'\'':if(lookAhead('\'')){checkLiteral();}
else{literal=true;}
break;default:checkLiteral();}}}
if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+
(year<=shortYearCutoff?0:-100);}
var date=new Date(year,month-1,day);if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw'Invalid date';}
return date;},formatDate:function(format,date,dayNamesShort,dayNames,monthNamesShort,monthNames){if(!date){return'';}
dayNamesShort=dayNamesShort||this._defaults.dayNamesShort;dayNames=dayNames||this._defaults.dayNames;monthNamesShort=monthNamesShort||this._defaults.monthNamesShort;monthNames=monthNames||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++;}
return matches;};var formatNumber=function(match,value){return(lookAhead(match)&&value<10?'0':'')+value;};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value]);};var output='';var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=='\''&&!lookAhead('\'')){literal=false;}
else{output+=format.charAt(iFormat);}}
else{switch(format.charAt(iFormat)){case'd':output+=formatNumber('d',date.getDate());break;case'D':output+=formatName('D',date.getDay(),dayNamesShort,dayNames);break;case'm':output+=formatNumber('m',date.getMonth()+1);break;case'M':output+=formatName('M',date.getMonth(),monthNamesShort,monthNames);break;case'y':output+=(lookAhead('y')?date.getFullYear():(date.getYear()%100<10?'0':'')+date.getYear()%100);break;case'\'':if(lookAhead('\'')){output+='\'';}
else{literal=true;}
break;default:output+=format.charAt(iFormat);}}}}
return output;},_possibleChars:function(format){var chars='';var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=='\''&&!lookAhead('\'')){literal=false;}
else{chars+=format.charAt(iFormat);}}
else{switch(format.charAt(iFormat)){case'd':case'm':case'y':chars+='0123456789';break;case'D':case'M':return null;case'\'':if(lookAhead('\'')){chars+='\'';}
else{literal=true;}
break;default:chars+=format.charAt(iFormat);}}}
return chars;}});function DatepickerInstance(settings,inline){this._id=$.datepicker._register(this);this._selectedDay=0;this._selectedMonth=0;this._selectedYear=0;this._input=null;this._inline=inline;this._datepickerDiv=(!inline?$.datepicker._datepickerDiv:$('<div id="datepicker_div_'+this._id+'" class="datepicker_inline"></div>'));this._settings=extendRemove({},settings||{});if(inline){this._setDate(this._getDefaultDate());}}
$.extend(DatepickerInstance.prototype,{_get:function(name){return(this._settings[name]!=null?this._settings[name]:$.datepicker._defaults[name]);},_setDateFromField:function(input){this._input=$(input);var dateFormat=this._get('dateFormat');var dates=this._input.val().split(this._get('rangeSeparator'));this._endDay=this._endMonth=this._endYear=null;var shortYearCutoff=this._get('shortYearCutoff');shortYearCutoff=(typeof shortYearCutoff!='string'?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));var date=this._getDefaultDate();if(dates.length>0){var dayNamesShort=this._get('dayNamesShort');var dayNames=this._get('dayNames');var monthNamesShort=this._get('monthNamesShort');var monthNames=this._get('monthNames');if(dates.length>1){date=$.datepicker.parseDate(dateFormat,dates[1],shortYearCutoff,dayNamesShort,dayNames,monthNamesShort,monthNames)||this._getDefaultDate();this._endDay=date.getDate();this._endMonth=date.getMonth();this._endYear=date.getFullYear();}
try{date=$.datepicker.parseDate(dateFormat,dates[0],shortYearCutoff,dayNamesShort,dayNames,monthNamesShort,monthNames)||this._getDefaultDate();}
catch(e){$.datepicker.log(e);date=this._getDefaultDate();}}
this._selectedDay=this._currentDay=date.getDate();this._selectedMonth=this._currentMonth=date.getMonth();this._selectedYear=this._currentYear=date.getFullYear();this._adjustDate();},_getDefaultDate:function(){var offsetDate=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date;};var defaultDate=this._get('defaultDate');return(defaultDate==null?new Date():(typeof defaultDate=='number'?offsetDate(defaultDate):defaultDate));},_setDate:function(date,endDate){this._selectedDay=this._currentDay=date.getDate();this._selectedMonth=this._currentMonth=date.getMonth();this._selectedYear=this._currentYear=date.getFullYear();if(this._get('rangeSelect')){if(endDate){this._endDay=endDate.getDate();this._endMonth=endDate.getMonth();this._endYear=endDate.getFullYear();}
else{this._endDay=this._currentDay;this._endMonth=this._currentMonth;this._endYear=this._currentYear;}}
this._adjustDate();},_getDate:function(){var startDate=(!this._currentYear||(this._input&&this._input.val()=='')?null:new Date(this._currentYear,this._currentMonth,this._currentDay));if(this._get('rangeSelect')){return[startDate,new Date(this._endYear,this._endMonth,this._endDay)];}
else{return startDate;}},_generateDatepicker:function(){var today=new Date();today=new Date(today.getFullYear(),today.getMonth(),today.getDate());var showStatus=this._get('showStatus');var controls='<div class="datepicker_control">'+'<div class="datepicker_clear"><a onclick="jQuery.datepicker._clearDate('+this._id+');"'+
(showStatus?this._addStatus(this._get('clearStatus')):'')+'>'+
this._get('clearText')+'</a></div>'+'<div class="datepicker_close"><a onclick="jQuery.datepicker.hideDatepicker();"'+
(showStatus?this._addStatus(this._get('closeStatus')):'')+'>'+
this._get('closeText')+'</a></div></div>';var prompt=this._get('prompt');var closeAtTop=this._get('closeAtTop');var hideIfNoPrevNext=this._get('hideIfNoPrevNext');var numMonths=this._get('numberOfMonths');var stepMonths=this._get('stepMonths');var isMultiMonth=(numMonths!=1);numMonths=(numMonths==null?[1,1]:(typeof numMonths=='number'?[1,numMonths]:numMonths));var html=(prompt?'<div class="datepicker_prompt">'+prompt+'</div>':'')+
(closeAtTop&&!this._inline?controls:'')+'<div class="datepicker_links"><div class="datepicker_prev">'+
(this._canAdjustMonth(-1)?'<a onclick="jQuery.datepicker._adjustDate('+this._id+', -'+stepMonths+', \'M\');"'+
(showStatus?this._addStatus(this._get('prevStatus')):'')+'>'+this._get('prevText')+'</a>':(hideIfNoPrevNext?'':'<label>'+this._get('prevText')+'</label>'))+'</div>'+
(this._isInRange(today)?'<div class="datepicker_current">'+'<a onclick="jQuery.datepicker._gotoToday('+this._id+');"'+
(showStatus?this._addStatus(this._get('currentStatus')):'')+'>'+this._get('currentText')+'</a></div>':'')+'<div class="datepicker_next">'+
(this._canAdjustMonth(+1)?'<a onclick="jQuery.datepicker._adjustDate('+this._id+', +'+stepMonths+', \'M\');"'+
(showStatus?this._addStatus(this._get('nextStatus')):'')+'>'+this._get('nextText')+'</a>':(hideIfNoPrevNext?'>':'<label>'+this._get('nextText')+'</label>'))+'</div></div>';var minDate=this._getMinDate();var maxDate=this._get('maxDate');var drawMonth=this._selectedMonth;var drawYear=this._selectedYear;var showWeeks=this._get('showWeeks');for(var row=0;row<numMonths[0];row++){for(var col=0;col<numMonths[1];col++){var selectedDate=new Date(drawYear,drawMonth,this._selectedDay);html+='<div class="datepicker_oneMonth'+(col==0?' datepicker_newRow':'')+'">'+
this._generateMonthYearHeader(drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0)+'<table class="datepicker" cellpadding="0" cellspacing="0"><thead>'+'<tr class="datepicker_titleRow">'+
(showWeeks?'<td>'+this._get('weekHeader')+'</td>':'');var firstDay=this._get('firstDay');var changeFirstDay=this._get('changeFirstDay');var dayNames=this._get('dayNames');var dayNamesShort=this._get('dayNamesShort');var dayNamesMin=this._get('dayNamesMin');for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;html+='<td>'+(!changeFirstDay?'<span':'<a onclick="jQuery.datepicker._changeFirstDay('+this._id+', this);"')+
(showStatus?this._addStatus(this._get('dayStatus').replace(/DD/,dayNames[day]).replace(/D/,dayNamesShort[day])):'')+' title="'+dayNames[day]+'">'+
dayNamesMin[day]+(changeFirstDay?'</a>':'</span>')+'</td>';}
html+='</tr></thead><tbody>';var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);this._selectedDay=Math.min(this._selectedDay,daysInMonth);var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var currentDate=new Date(this._currentYear,this._currentMonth,this._currentDay);var endDate=this._endDay?new Date(this._endYear,this._endMonth,this._endDay):currentDate;var printDate=new Date(drawYear,drawMonth,1-leadDays);var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var beforeShowDay=this._get('beforeShowDay');var showOtherMonths=this._get('showOtherMonths');var calculateWeek=this._get('calculateWeek')||$.datepicker.iso8601Week;var dateStatus=this._get('statusForDate')||$.datepicker.dateStatus;for(var dRow=0;dRow<numRows;dRow++){html+='<tr class="datepicker_daysRow">'+
(showWeeks?'<td class="datepicker_weekCol">'+calculateWeek(printDate)+'</td>':'');for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay(printDate):[true,'']);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);html+='<td class="datepicker_daysCell'+
((dow+firstDay+6)%7>=5?' datepicker_weekEndCell':'')+
(otherMonth?' datepicker_otherMonth':'')+
(printDate.getTime()==selectedDate.getTime()&&drawMonth==this._selectedMonth?' datepicker_daysCellOver':'')+
(unselectable?' datepicker_unselectable':'')+
(otherMonth&&!showOtherMonths?'':' '+daySettings[1]+
(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?' datepicker_currentDay':(printDate.getTime()==today.getTime()?' datepicker_today':'')))+'"'+
(unselectable||(otherMonth&&!showOtherMonths)?'':' onmouseover="'+(unselectable?'':'jQuery(this).addClass(\'datepicker_daysCellOver\');')+
(otherMonth&&!showOtherMonths?'':'jQuery(\'#datepicker_status_'+this._id+'\').html(\''+
dateStatus(printDate,this)+'\');"')+' onmouseout="'+(unselectable?'':'jQuery(this).removeClass(\'datepicker_daysCellOver\');')+
(otherMonth&&!showOtherMonths?'':'jQuery(\'#datepicker_status_'+this._id+'\').html(\'&#xa0;\');"'))+
(unselectable?'':' onclick="jQuery.datepicker._selectDay('+this._id+','+
drawMonth+','+drawYear+', this);"')+'>'+
(otherMonth?(showOtherMonths?printDate.getDate():'&#xa0;'):(unselectable?printDate.getDate():'<a>'+printDate.getDate()+'</a>'))+'</td>';printDate.setDate(printDate.getDate()+1);}
html+='</tr>';}
drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++;}
html+='</tbody></table></div>';}}
html+=(showStatus?'<div id="datepicker_status_'+this._id+'" class="datepicker_status">'+this._get('initStatus')+'</div>':'')+
(!closeAtTop&&!this._inline?controls:'')+'<div style="clear: both;"></div>'+(!$.browser.msie?'':'<!--[if lte IE 6.5]><iframe src="javascript:false;" class="datepicker_cover"></iframe><![endif]-->');return html;},_generateMonthYearHeader:function(drawMonth,drawYear,minDate,maxDate,selectedDate,secondary){minDate=(this._rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var showStatus=this._get('showStatus');var html='<div class="datepicker_header">';var monthNames=this._get('monthNames');if(secondary||!this._get('changeMonth')){html+=monthNames[drawMonth]+'&#xa0;';}
else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);html+='<select class="datepicker_newMonth" '+'onchange="jQuery.datepicker._selectMonthYear('+this._id+', this, \'M\');" '+'onclick="jQuery.datepicker._clickMonthYear('+this._id+');"'+
(showStatus?this._addStatus(this._get('monthStatus')):'')+'>';for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){html+='<option value="'+month+'"'+
(month==drawMonth?' selected="selected"':'')+'>'+monthNames[month]+'</option>';}}
html+='</select>';}
if(secondary||!this._get('changeYear')){html+=drawYear;}
else{var years=this._get('yearRange').split(':');var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10;}
else if(years[0].charAt(0)=='+'||years[0].charAt(0)=='-'){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10);}
else{year=parseInt(years[0],10);endYear=parseInt(years[1],10);}
year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="datepicker_newYear" '+'onchange="jQuery.datepicker._selectMonthYear('+this._id+', this, \'Y\');" '+'onclick="jQuery.datepicker._clickMonthYear('+this._id+');"'+
(showStatus?this._addStatus(this._get('yearStatus')):'')+'>';for(;year<=endYear;year++){html+='<option value="'+year+'"'+
(year==drawYear?' selected="selected"':'')+'>'+year+'</option>';}
html+='</select>';}
html+='</div>';return html;},_addStatus:function(text){return' onmouseover="jQuery(\'#datepicker_status_'+this._id+'\').html(\''+text+'\');" '+'onmouseout="jQuery(\'#datepicker_status_'+this._id+'\').html(\'&#xa0;\');"';},_adjustDate:function(offset,period){var year=this._selectedYear+(period=='Y'?offset:0);var month=this._selectedMonth+(period=='M'?offset:0);var day=Math.min(this._selectedDay,this._getDaysInMonth(year,month))+
(period=='D'?offset:0);var date=new Date(year,month,day);var minDate=this._getMinDate();var maxDate=this._get('maxDate');date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);this._selectedDay=date.getDate();this._selectedMonth=date.getMonth();this._selectedYear=date.getFullYear();},_getMinDate:function(){return this._get('minDate')||this._rangeStart;},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate();},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay();},_canAdjustMonth:function(offset){var date=new Date(this._selectedYear,this._selectedMonth+offset,1);if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));}
return this._isInRange(date);},_isInRange:function(date){var newMinDate=(!this._rangeStart?null:new Date(this._selectedYear,this._selectedMonth,this._selectedDay));newMinDate=(newMinDate&&this._rangeStart<newMinDate?this._rangeStart:newMinDate);var minDate=newMinDate||this._get('minDate');var maxDate=this._get('maxDate');return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate));},_formatDate:function(day,month,year){if(!day){this._currentDay=this._selectedDay;this._currentMonth=this._selectedMonth;this._currentYear=this._selectedYear;}
var date=(day?(typeof day=='object'?day:new Date(year,month,day)):new Date(this._currentYear,this._currentMonth,this._currentDay));return $.datepicker.formatDate(this._get('dateFormat'),date,this._get('dayNamesShort'),this._get('dayNames'),this._get('monthNamesShort'),this._get('monthNames'));}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=null;}}
return target;};$.fn.datepicker=function(settings){return this.each(function(){var inlineSettings=null;for(attrName in $.datepicker._defaults){var attrValue=this.getAttribute('date:'+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue);}
catch(err){inlineSettings[attrName]=attrValue;}}}
var nodeName=this.nodeName.toLowerCase();if(nodeName=='input'){var instSettings=(inlineSettings?$.extend($.extend({},settings||{}),inlineSettings||{}):settings);var inst=(inst&&!inlineSettings?inst:new DatepickerInstance(instSettings,false));$.datepicker._connectDatepicker(this,inst);}
else if(nodeName=='div'||nodeName=='span'){var instSettings=$.extend($.extend({},settings||{}),inlineSettings||{});var inst=new DatepickerInstance(instSettings,true);$.datepicker._inlineDatepicker(this,inst);}});};$(document).ready(function(){$.datepicker=new Datepicker();$(document.body).append($.datepicker._datepickerDiv).mousedown($.datepicker._checkExternalClick);});calendar_nl={clearText:'Wissen',clearStatus:'',closeText:'Sluiten',closeStatus:'',prevText:'&lt;Terug',prevStatus:'',nextText:'Verder&gt;',nextStatus:'',currentText:'Vandaag',currentStatus:'',monthNames:['Januari','Februari','Maart','April','Mei','Juni','Juli','Augustus','September','Oktober','November','December'],monthNamesShort:['Jan','Feb','Maa','Apr','Mei','Jun','Jul','Aug','Sep','Okt','Nov','Dec'],monthStatus:'',yearStatus:'',weekHeader:'Wk',weekStatus:'',dayNames:['Zondag','Maandag','Dinsdag','Woensdag','Donderdag','Vrijdag','Zaterdag'],dayNamesShort:['Zon','Maa','Din','Woe','Don','Vri','Zat'],dayNamesMin:['Zo','Ma','Di','Wo','Do','Vr','Za'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'dd.mm.yy',firstDay:0,initStatus:'',isRTL:false};calendar_ct={clearText:'Netejar',clearStatus:'',closeText:'Tancar',closeStatus:'',prevText:'&lt;Ant',prevStatus:'',nextText:'Seg&gt;',nextStatus:'',currentText:'Avui',currentStatus:'',monthNames:['Gener','Febrer','Mar&ccedil;','Abril','Maig','Juny','Juliol','Agost','Setembre','Octubre','Novembre','Decembre'],monthNamesShort:['Gen','Feb','Mar','Abr','Mai','Jun','Jul','Ago','Set','Oct','Nov','Dec'],monthStatus:'',yearStatus:'',weekHeader:'Sm',weekStatus:'',dayNames:['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'],dayNamesShort:['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'],dayNamesMin:['Dg','Dl','Dt','Dc','Dj','Dv','Ds'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'mm/dd/yy',firstDay:0,initStatus:'',isRTL:false};calendar_fr={clearText:'Effacer',clearStatus:'',closeText:'Fermer',closeStatus:'',prevText:'&lt;Préc',prevStatus:'',nextText:'Proch&gt;',nextStatus:'',currentText:'En cours',currentStatus:'',monthNames:['Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'],monthNamesShort:['Jan','Fév','Mar','Avr','Mai','Jun','Jul','Aoû','Sep','Oct','Nov','Déc'],monthStatus:'',yearStatus:'',weekHeader:'Sm',weekStatus:'',dayNames:['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],dayNamesShort:['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],dayNamesMin:['Di','Lu','Ma','Me','Je','Ve','Sa'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'dd/mm/yy',firstDay:0,initStatus:'',isRTL:false};calendar_cn={clearText:'清除',clearStatus:'清除已选日期',closeText:'关闭',closeStatus:'不改变当前选择',prevText:'&lt;上月',prevStatus:'显示上月',nextText:'下月&gt;',nextStatus:'显示下月',currentText:'今天',currentStatus:'显示本月',monthNames:['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'],monthNamesShort:['一','二','三','四','五','六','七','八','九','十','十一','十二'],monthStatus:'选择月份',yearStatus:'选择年份',weekHeader:'周',weekStatus:'年内周次',dayNames:['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],dayNamesShort:['周日','周一','周二','周三','周四','周五','周六'],dayNamesMin:['日','一','二','三','四','五','六'],dayStatus:'设置 DD 为一周起始',dateStatus:'选择 m月 d日, DD',dateFormat:'yy-mm-dd',firstDay:1,initStatus:'请选择日期',isRTL:false};calendar_cz={clearText:'Smazat',clearStatus:'',closeText:'Zavøít',closeStatus:'',prevText:'&lt;Døíve',prevStatus:'',nextText:'Pozdìji&gt;',nextStatus:'',currentText:'Nyní',currentStatus:'',monthNames:['Leden','Únor','Bøezen','Duben','Kvìten','Èerven','Èervenec','Srpen','Záøí','Øíjen','Listopad','Prosinec'],monthNamesShort:['Led','Úno','Bøe','Dub','Kvì','Èer','Èer','Srp','Záø','Øíj','Lis','Pro'],monthStatus:'',yearStatus:'',weekHeader:'Tý',weekStatus:'',dayNames:['Neděle','Pondělí','Úterý','Středa','Ètvrtek','Pátek','Sobota'],dayNamesShort:['Ned','Pon','Úte','Stř','Ètv','Pát','Sob'],dayNamesMin:['Ne','Po','Út','St','Èt','Pá','So'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'dd.mm.yy',firstDay:0,initStatus:'',isRTL:false};calendar_dk={clearText:'Nulstil',clearStatus:'',closeText:'Luk',closeStatus:'',prevText:'&laquo;Tilbage',prevStatus:'',nextText:'Frem&raquo;',nextStatus:'',currentText:'Idag',currentStatus:'',monthNames:['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'],monthStatus:'',yearStatus:'',weekHeader:'Ve',weekStatus:'',dayNames:['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],dayNamesShort:['Søn','Man','Tir','Ons','Tor','Fre','Lør'],dayNamesMin:['Sø','Ma','Ti','On','To','Fr','Lø'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'dd-mm-yy',firstDay:0,initStatus:'',isRTL:false};calendar_de={clearText:'Löschen',clearStatus:'',closeText:'Schließen',closeStatus:'',prevText:'&lt;Zurück',prevStatus:'',nextText:'Vor&gt;',nextStatus:'',currentText:'Heute',currentStatus:'',monthNames:['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],monthNamesShort:['Jan','Feb','Mär','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'],monthStatus:'',yearStatus:'',weekHeader:'Wo',weekStatus:'',dayNames:['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],dayNamesShort:['Son','Mon','Die','Mit','Don','Fre','Sam'],dayNamesMin:['So','Mo','Di','Mi','Do','Fr','Sa'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'dd.mm.yy',firstDay:0,initStatus:'',isRTL:false};calendar_hu={clearText:'törlés',clearStatus:'',closeText:'bezárás',closeStatus:'',prevText:'&laquo;&nbsp;vissza',prevStatus:'',nextText:'előre&nbsp;&raquo;',nextStatus:'',currentText:'ma',currentStatus:'',monthNames:['Január','Február','Március','Április','Május','Június','Július','Augusztus','Szeptember','Október','November','December'],monthNamesShort:['Jan','Feb','Már','Ápr','Máj','Jún','Júl','Aug','Szep','Okt','Nov','Dec'],monthStatus:'',yearStatus:'',weekHeader:'Hé',weekStatus:'',dayNames:['Vasámap','Hétfö','Kedd','Szerda','Csütörtök','Péntek','Szombat'],dayNamesShort:['Vas','Hét','Ked','Sze','Csü','Pén','Szo'],dayNamesMin:['V','H','K','Sze','Cs','P','Szo'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'yy-mm-dd',firstDay:1,initStatus:'',isRTL:false};calendar_it={clearText:'Svuota',clearStatus:'',closeText:'Chiudi',closeStatus:'',prevText:'&lt;Prec',prevStatus:'',nextText:'Succ&gt;',nextStatus:'',currentText:'Oggi',currentStatus:'',monthNames:['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],monthNamesShort:['Gen','Feb','Mar','Apr','Mag','Giu','Lug','Ago','Set','Ott','Nov','Dic'],monthStatus:'',yearStatus:'',weekHeader:'Sm',weekStatus:'',dayNames:['Domenica','Lunedi','Martedi','Mercoledi','Giovedi','Venerdi','Sabato'],dayNamesShort:['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],dayNamesMin:['Do','Lu','Ma','Me','Gio','Ve','Sa'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'dd/mm/yy',firstDay:0,initStatus:'',isRTL:false};calendar_jp={clearText:'&#21066;&#38500;',clearStatus:'',closeText:'&#38281;&#12376;&#12427;',closeStatus:'',prevText:'&lt;&#21069;&#26376;',prevStatus:'',nextText:'&#27425;&#26376;&gt;',nextStatus:'',currentText:'&#20170;&#26085;',currentStatus:'',monthNames:['1&#26376;','2&#26376;','3&#26376;','4&#26376;','5&#26376;','6&#26376;','7&#26376;','8&#26376;','9&#26376;','10&#26376;','11&#26376;','12&#26376;'],monthNamesShort:['1&#26376;','2&#26376;','3&#26376;','4&#26376;','5&#26376;','6&#26376;','7&#26376;','8&#26376;','9&#26376;','10&#26376;','11&#26376;','12&#26376;'],monthStatus:'',yearStatus:'',weekHeader:'Wk',weekStatus:'',dayNames:['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],dayNamesShort:['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],dayNamesMin:['&#26085;','&#26376;','&#28779;','&#27700;','&#26408;','&#37329;','&#22303;'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'yy/mm/dd',firstDay:0,initStatus:'',isRTL:false};calendar_kr={clearText:'지우기',clearStatus:'',closeText:'닫기',closeStatus:'',prevText:'이전달',prevStatus:'',nextText:'다음달',nextStatus:'',currentText:'오늘',currentStatus:'',monthNames:['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)','7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],monthNamesShort:['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)','7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],monthStatus:'',yearStatus:'',weekHeader:'Wk',weekStatus:'',dayNames:['일','월','화','수','목','금','토'],dayNamesShort:['일','월','화','수','목','금','토'],dayNamesMin:['일','월','화','수','목','금','토'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'yy-mm-dd',firstDay:0,initStatus:'',isRTL:false};calendar_pl={clearText:'Czyść',clearStatus:'',closeText:'Zamknij',closeStatus:'',prevText:'&lt;Poprzedni',prevStatus:'',nextText:'Następny&gt;',nextStatus:'',currentText:'Teraz',currentStatus:'',monthNames:['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec','Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],monthNamesShort:['Sty','Lut','Mar','Kwi','Maj','Cze','Lip','Sie','Wrz','Paź','Lis','Gru'],monthStatus:'',yearStatus:'',weekHeader:'Ty',weekStatus:'',dayNames:['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'],dayNamesShort:['Nie','Pon','Wto','Śro','Czw','Pią','Sob'],dayNamesMin:['Nie','Pn','Wt','Śr','Czw','Pt','So'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'dd/mm/yy',firstDay:0,initStatus:'',isRTL:false};calendar_br={clearText:'Limpar',clearStatus:'',closeText:'Fechar',closeStatus:'',prevText:'&lt;Anterior',prevStatus:'',nextText:'Pr&oacute;ximo&gt;',nextStatus:'',currentText:'Hoje',currentStatus:'',monthNames:['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],monthNamesShort:['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'],monthStatus:'',yearStatus:'',weekHeader:'Sm',weekStatus:'',dayNames:['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'],dayNamesShort:['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],dayNamesMin:['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'dd/mm/yy',firstDay:0,initStatus:'',isRTL:false};calendar_ro={clearText:'sterge',clearStatus:'',closeText:'inchide',closeStatus:'',prevText:'&laquo;&nbsp;inapoi',prevStatus:'',nextText:'inainte&nbsp;&raquo;',nextStatus:'',currentText:'Azi',currentStatus:'',monthNames:['Januarie','Februarie','Martie','Aprilie','Mai','Junie','Julie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],monthNamesShort:['Jan','Feb','Mar','Apr','Mai','Jun','Jul','Aug','Sep','Oct','Noi','Dec'],monthStatus:'',yearStatus:'',weekHeader:'Sm',weekStatus:'',dayNames:['Duminica','Luni','Marti','Miercuri','Joi','Vineri','Sâmbata'],dayNamesShort:['Dum','Lun','Mar','Mie','Joi','Vin','Sâm'],dayNamesMin:['D','L','Ma','Mi','J','V','S'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'yy-mm-dd',firstDay:1,initStatus:'',isRTL:false};calendar_ru={clearText:'Очистить',clearStatus:'',closeText:'Закрыть',closeStatus:'',prevText:'&lt;Пред',prevStatus:'',nextText:'След&gt;',nextStatus:'',currentText:'Сегодня',currentStatus:'',monthNames:['Январь','Февраль','Март','Апрель','Май','Июнь','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],monthNamesShort:['Янв','Фев','Мар','Апр','Май','Июн','Июл','Авг','Сен','Окт','Ноя','Дек'],monthStatus:'',yearStatus:'',weekHeader:'Не',weekStatus:'',dayNames:['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],dayNamesShort:['вск','пнд','втр','срд','чтв','птн','сбт'],dayNamesMin:['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'dd.mm.yy',firstDay:1,initStatus:'',isRTL:false};calendar_sv={clearText:'Zmazať',clearStatus:'',closeText:'Zavrieť',closeStatus:'',prevText:'&lt;Predchádzajúci',prevStatus:'',nextText:'Nasledujúci&gt;',nextStatus:'',currentText:'Dnes',currentStatus:'',monthNames:['Január','Február','Marec','Apríl','Máj','Jún','Júl','August','September','Október','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','Máj','Jún','Júl','Aug','Sep','Okt','Nov','Dec'],monthStatus:'',yearStatus:'',weekHeader:'Ty',weekStatus:'',dayNames:['Nedel\'a','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],dayNamesShort:['Ned','Pon','Uto','Str','Štv','Pia','Sob'],dayNamesMin:['Ne','Po','Ut','St','Št','Pia','So'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'dd.mm.yy',firstDay:0,initStatus:'',isRTL:false};calendar_es={clearText:'Limpiar',clearStatus:'',closeText:'Cerrar',closeStatus:'',prevText:'&lt;Ant',prevStatus:'',nextText:'Sig&gt;',nextStatus:'',currentText:'Hoy',currentStatus:'',monthNames:['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],monthNamesShort:['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'],monthStatus:'',yearStatus:'',weekHeader:'Sm',weekStatus:'',dayNames:['Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;dabo'],dayNamesShort:['Dom','Lun','Mar','Mi&eacute;','Juv','Vie','S&aacute;b'],dayNamesMin:['Do','Lu','Ma','Mi','Ju','Vi','S&aacute;'],dayStatus:'DD',dateStatus:'D, M d',dateFormat:'dd/mm/yy',firstDay:0,initStatus:'',isRTL:false};Array.prototype.removeItems=function(items)
{if(typeof items!="object")
{itemsValue=items;var items=new Array();items.push(itemsValue);}
var j;for(var i=0;i<items.length;i++)
{j=0;while(j<this.length)
{if(this[j]==items[i])
{this.splice(j,1);}
else
{j++;}}}}
function getDomainFromUrl(url)
{var domain;domain=url.match(/:\/\/(www\.)?([^\/:]+)/);domain=domain[2]?domain[2]:'';return domain;}
function arraySearch(needle,haystack)
{for(var i=0,j=haystack.length;i<j;i++)
{if(haystack[i]==needle)
{return i;}}
return-1;}
function catchEnter(e)
{var key=e.charCode?e.charCode:e.keyCode?e.keyCode:0;return(key==13);}
function clickHandler(e,clickFunction,parentContainerId)
{if(!e)
{var e=window.event;}
if(e.target)
{targetElement=e.target;}
else
{if(e.srcElement)
{targetElement=e.srcElement;}}
if(targetElement.nodeType==3)
{targetElement=targetElement.parentNode;}
if($(targetElement).parents("#window").attr("class")!=parentContainerId)
{eval(clickFunction+"()");}}
function createAssociativeArray(inArray)
{for(var i=0,j=inArray.length;i<j;i++)
{miniArray=inArray[i].split(":");if(miniArray[0].length>0&&miniArray[1].length>0)
{eval("this."+miniArray[0]+" = miniArray[1]");}}}
function includeFileInHead(elementType,fileUri)
{var head,headElement,headElementType,relText;switch(elementType)
{case'text/javascript':headElementType='script';relText='';break;case'text/css':headElementType='link';relText='stylesheet';break;}
if(document.createElement&&document.getElementsByTagName&&(head=document.getElementsByTagName('head')[0])&&head.appendChild&&(headElement=document.createElement(headElementType)))
{headElement.setAttribute("type",elementType);if(elementType=='text/css')
{headElement.setAttribute("rel",relText);headElement.href=fileUri;}
else
{headElement.src=fileUri;}
headElement.id=fileUri.replace(/[^a-zA-Z_]/g,"");var headElementOld=document.getElementById(headElement.id);try
{if(headElementOld)head.removeChild(headElement);}
catch(e)
{}
head.appendChild(headElement);}
else
{return false;}
return true;}
function toggleBranch(branchId)
{branchList=document.getElementById('branch_'+branchId);branchIndicator=document.getElementById('branch_indicator_'+branchId);branchHandle=document.getElementById('branch_handle_'+branchId);if(branchList.style.display=='none')
{branchList.style.display='block';branchIndicator.className='indicator list_open';branchHandle.style.fontWeight='bold';}
else
{branchList.style.display='none';branchIndicator.className='indicator list_closed';branchHandle.style.fontWeight='normal';}}
function toFixedPositions(input,positions)
{var output='';input=input.toString();for(var i=0,j=positions-input.length;i<j;i++)
{output+="0";}
return output+input;}
function insertSelectOptions(selectElement,optionsHTML)
{if(typeof selectElement=='string')
{selectElement=document.getElementById(selectElement);}
selectElement.innerHTML='';selectTempDiv=document.createElement("div");selectTempDiv.style.display='none';document.body.appendChild(selectTempDiv);selectTempDiv.innerHTML=optionsHTML.replace(/<option/g,"<span").replace(/<\/option/g,"</span");optionElements=selectTempDiv.getElementsByTagName("span");for(var i=0,j=optionElements.length;i<j;i++)
{optionElement=document.createElement("option");optionElement.value=optionElements[i].getAttribute("value");if(optionElements[i].childNodes.length>0)
{optionElement.appendChild(document.createTextNode(optionElements[i].childNodes[0].nodeValue));}
if(typeof optionElements[i].getAttribute("selected")=='string')
{optionElement.selected='selected';}
selectElement.appendChild(optionElement);}
document.body.removeChild(selectTempDiv);selectTempDiv=null;}
function confirmAction(type,label)
{var confirmed=false;switch(type)
{case"pass":confirmed=confirm("Weet u zeker dat u het wachtwoord wilt wijzigen? (oude wachtwoord vervalt)");break;case"groep":confirmed=confirm("Weet u zeker dat u deze groep wilt verwijderen? Alle eventueel eronder hangende groepen zullen ook verwijderd worden! (deze actie is niet omkeerbaar)");break;case"gebruikersgroep":confirmed=confirm("Weet u zeker dat u deze gebruikersgroep wilt verwijderen? Alle eraan gekoppelde gebruikers zullen ook verwijderd worden! (deze actie is niet omkeerbaar)");break;case"desktop":confirmed=confirm("Are you sure you want to delete this desktop?");break;case"reset_desktop":confirmed=confirm("Are you sure you want to reset this desktop?");break;case"reset_full":confirmed=confirm("Are you sure you want to delete all your desktops and icons?");break;case"reset":confirmed=confirm("Are you sure you want to reset the item: '"+label+"' ?");break;case"toggle":confirmed=confirm("Are you sure you want to toggle the item: '"+label+"' ?");break;case"send":confirmed=confirm("Are you sure you want to send this message: '"+label+"' ?");break;default:confirmed=confirm("Are you sure you want to delete the item '"+label+"' ?");}
return confirmed;}
function confirmActionEx(message)
{var confirmed=false;confirmed=confirm(message);return confirmed;}
function createBrowserBookmark(url,label)
{if(window.sidebar)
{window.sidebar.addPanel(label,url,"");}
else if(document.all)
{window.external.AddFavorite(url,label);}
else if(window.opera&&window.print)
{var elem=document.createElement('a');elem.setAttribute('href',url);elem.setAttribute('title',label);elem.setAttribute('rel','sidebar');elem.click();document.body.removeChild(elem);}}
var Url={encode:function(string){return escape(this._utf8_encode(string));},decode:function(string){return this._utf8_decode(unescape(string));},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}
else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}
else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}
return utftext;},_utf8_decode:function(utftext){var string="";var i=0;var c=c1=c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++;}
else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}
else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return string;}}
var initFunctions=new Array();var postFunctions=new Array();var LOCALE,LANGUAGE,symbalooLOCALE,DESKTOPVERSION;var desktopId;var desktopType;var desktopRows;var desktopCols;var desktopContent=new Array();var desktopContentShadow=new Array();var currentSearchModule,currentSearchSource,targetPosition;var crumbsBASE=new Object();var crumbsLOCALE=new Object();var currentTimeout,userInputTimeout;var onWindowClose;var currentHours=0;var currentMinutes=0;var currentNotation=24;var updateTimer=false;var dropdownTimer=false;var hideDropdownAfterClick=false;var publishDesktopTimer=false;var symbalooLock=false;var loadingDesktop=false;var loadingDesktopBar=false;var explorerLastTab='search';var explorerLastSubTab='browse';var explorerLastTabSearchsearch='';var explorerLastTabSearchwidget='';var explorerLastTabSearchlinks='';var explorerLastTabSearchfeeds='';var explorerLastTabSearchradio='';var explorerHistoryCurrentTab=new Array();var explorerHistorysearch=new Array();var explorerHistorylinks=new Array("preferred");var explorerHistorywidget=new Array();var explorerHistoryfeeds=new Array("preferred");var explorerHistoryradio=new Array("preferred");var explorerHistorycontact=new Array("preferred");var explorerShowInternational=false;var refreshTimer;var pollerTimeout=3600;var windowContentTemp;var loadSearchOnReady=function(){void(0);};var ajaxBrowse=false;function symbalooInit(locale,language)
{$.ajaxSetup({type:"GET",timeout:60000});try
{/*eval("$.datepicker.setDefaults(calendar_"+language+");");*/}
catch(e)
{}
$.datepicker.setDefaults({dateFormat:'dd/mm/yy',showOn:'button',buttonImage:'/images/calendar.gif',buttonImageOnly:true,speed:''});LOCALE=locale;LANGUAGE=language;$(".windowurgent_close_button").hover(function()
{$(this).addClass("window_close_button_hover");},function()
{$(this).removeClass("window_close_button_hover");}).click(function(){$("#messageurgent").hide();});;symbalooPoller();}
function symbalooPoller()
{$.ajax({url:'www.5i5jj.com/so/ajax/symbaloo_poller.php',data:'',type:'POST',complete:function(xhr)
{if(xhr.responseXML!=null)
{pollerTimeout=$("timeout",xhr.responseXML).text();evalcode=$("evalcode",xhr.responseXML).text();if(evalcode.length>0)
{eval(evalcode);}}
if(pollerTimeout<60){pollerTimeout=3600;}
setTimeout(symbalooPoller,(pollerTimeout*1000));}});}
function ajaxCall(args)
{identifier=(typeof args.identifier=='undefined')?null:args.identifier;url=(typeof args.url=='undefined')?'':args.url;data=(typeof args.data=='undefined')?'':args.data;type=(typeof args.type=='undefined')?'GET':args.type;ajaxCallComplete=(typeof args.complete!='function')?function(){}:args.complete;if(url.length==0)
{return false;}
dataString='locale='+LOCALE;dataString+='&language='+LANGUAGE;dataString+='&desktopversion='+DESKTOPVERSION;dataString+='&current_desktop_id='+desktopId;if(data.length>0)
{dataString+='&'+data;}
ajaxCallIdentifier=$.ajax({url:url,type:type,data:dataString,complete:function(xhr)
{if(xhr.responseText.search(/ajaxCallError/gi)>-1)
{messageItems=xhr.responseText.split('||');if(messageItems[0]=='ajaxCallErrorUpdateInProgress')
{document.location='/update/update.php';}
else if(messageItems[0]=='ajaxCallErrorInvalidDesktopVersion')
{showAlert({content:messageItems[1],icon:'error'});}}
else
{ajaxCallComplete(xhr);}}});return ajaxCallIdentifier;}
function getLanguageItems(args)
{identifier=(typeof args.identifier=='undefined')?'':args.identifier;table=(typeof args.table=='undefined')?'':args.table;target=(typeof args.target=='undefined')?'':args.target;type=(typeof args.type=='undefined')?'':args.type;onComplete=(typeof args.complete!='function')?null:args.complete;asyncValue=(type=='');if(typeof identifier=='object')
{identifier=identifier.join(",");}
$.ajax({url:'/ajax/translation_retrieve.php',data:'locale='+LOCALE+'&language='+LANGUAGE+'&identifier='+identifier+'&table='+table+'&target='+target+'&type='+type,type:'POST',complete:onComplete});}
function loadDesktopBar(desktopIdDirect)
{if(typeof desktopIdDirect=='undefined')
{desktopIdDirect=desktopId;}
if(loadingDesktopBar==true){return;}
loadingDesktopBar=true;onCompleteLoadDesktopBar=function()
{$(".bar_menu_item_selected").removeClass("bar_menu_item_selected");$("#desktop_link_"+desktopId).addClass("bar_menu_item_selected");loadingDesktopBar=false;totalWidth=0;$(".bar_menu_item").each(function()
{totalWidth+=$(this).outerWidth();});}
$.ajax({url:'/ajax/desktop_show_bar.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_id='+desktopIdDirect+'&desktop_type='+desktopType,complete:onCompleteLoadDesktopBar});}
function loadDesktop(desktopId,startIconId,startSourceId)
{startIconId=(typeof startIconId=="undefined")?0:startIconId;startSourceId=(typeof startSourceId=="undefined")?0:startSourceId;if(loadingDesktop==true){return;}
loadingDesktop=true;onCompleteLoadDesktop=function()
{$("#arrowhead").hide();$(".balloonstyle").hide();$("#site").width($("#desktop").width());$("#boxmain .boxcontent").height($("#boxmain").height()-10);loadingDesktop=false;loadDesktopBar(desktopId);}
$.ajax({url:'/ajax/desktop_show_empty.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_id='+desktopId+'&start_icon_id='+startIconId+'&start_source_id='+startSourceId,complete:onCompleteLoadDesktop});}
function fillDesktop(startIconId,startSourceId)
{startIconId=(typeof startIconId=="undefined")?0:startIconId;startSourceId=(typeof startSourceId=="undefined")?0:startSourceId;$("#site").width($("#desktop").width());onCompleteFillDesktop=function(xhr)
{$("#boxmain .boxcontent").height($("#boxmain").height()-10);initDragDrop();}
$.ajax({url:'/ajax/desktop_fill.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_id='+desktopId+'&desktop_content='+desktopContent.join('|')+'&desktop_cols='+desktopCols+'&desktop_rows='+desktopRows+'&start_icon_id='+startIconId+'&start_source_id='+startSourceId,complete:onCompleteFillDesktop});}
function onRssActionDesktopHeight(column,drag_height)
{var desktop_size=$("#desktop").parent().height();var kids_size=0;if(!column)
{$(".feedWrapper").each(function()
{var new_kids_size=0;$(this).children().each(function()
{new_kids_size+=($(this).height()+10);});if($(this).attr("id")==column)
{new_kids_size=new_kids_size-drag_height;}
if(new_kids_size>=kids_size)
{kids_size=new_kids_size;}});}
else
{kids_size=desktop_size;}
if(column)
kids_size+=drag_height;$("#desktop").height(kids_size+40);$(".feedWrapper").height(kids_size+40);}
function fillRss()
{clearTimeout(currentTimeout);currentTimeout=false;$("#site").width($("#desktop").width());onCompleteSetRssSortable=function(xhr)
{var column;var drag_height=0;try{$("#desktop .feedWrapper").SortableDestroy();}
catch(e){}
$("#desktop .feedWrapper").Sortable({accept:'feedItem',handle:'.feedGrab',helperclass:'sortHelper',opacity:0.5,tolerance:'pointer',onStart:function()
{$.iAutoscroller.start(this,document.getElementsByTagName('html'));addFeedButtons("hide");$(".footer").hide();column=$(this).parent().attr("id");drag_height=parseInt($(this).height());onRssActionDesktopHeight(column,drag_height);},onHover:function()
{$(".sortHelper").html('<div class="innerHelper"></div>');$(".innerHelper").height(drag_height);},onStop:function()
{$.iAutoscroller.stop();$(".footer").show();addFeedButtons("show");onRssActionDesktopHeight();},onChange:function()
{RssDesktopSave();}});$(".feedResize").click(function()
{onRssActionDesktopHeight();});if($.browser.safari)
{setTimeout("onRssActionDesktopHeight()",1000);}}
$.ajax({url:'/ajax/rss_fill.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_id='+desktopId+'&desktop_content='+desktopContent.join('|')+'&desktop_cols='+desktopCols+'&desktop_rows='+desktopRows,complete:function(){onRssActionDesktopHeight();}});}
function fillMaps()
{$("#site").width($("#desktop").width());}
function fillDesktopPress(widgetPressVideoId)
{$("#site").width($("#desktop").width());onCompleteFillDesktop=function(xhr)
{$("#boxmain .boxcontent").height($("#boxmain").height()-10);initDragDrop();$("#"+widgetPressVideoId+"  div.iconcontent").click();}
$.ajax({url:'/ajax/desktop_fill.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_id='+desktopId+'&desktop_content='+desktopContent.join('|')+'&desktop_cols='+desktopCols+'&desktop_rows='+desktopRows,complete:onCompleteFillDesktop});}
function initDragDrop()
{$("#desktop div.icon:not(.inactive)").Draggable({ghosting:true,revert:true,opacity:0.7,snapDistance:10,onStart:function()
{if($(this).attr("id").substring(0,1)=="c")
{$("#boxmaindrop_edit_na").hide();$("#boxmaindrop_edit").show();}
else
{$("#boxmaindrop_edit").hide();$("#boxmaindrop_edit_na").show();}
$("#boxmaindrop").show();$("#boxmain").hide();if($("#pressvideo_flag").get().length==1){$("#pressvideo").css("visibility","hidden");$("#boxmain").show();}},onStop:function()
{$("#desktop div.iconcontent").mouseover(function(){$(this).children(".handle").css("display","block");});$("#desktop div.iconcontent").mouseout(function(){$(this).children(".handle").css("display","none");});$("#boxmain").show();$("#boxmaindrop").hide();if($("#pressvideo_flag").get().length==1){$("#pressvideo").css("visibility","visible");$("#boxmain").hide();}}});$("#desktop div.icon").Droppable({accept:'icon',hoverclass:'dragover',onDrop:function(drag)
{modifyDesktop($(drag),$(this));}});$("#boxmaindrop_edit").Droppable({accept:'icon',hoverclass:'boxmaindrop_edit_hover',onDrop:function(drag)
{if($(drag).attr('id').substring(0,1)=="c")
{initEditMode=function()
{addIconCustom(explorerLastTab,'edit',$(drag).attr('id').substring(1),1);}
showWindow('add_icon',{width:8,height:6,initwindow:initEditMode,extraParam:'no_init'});}
else
{showAlert({identifier:'dropEditNotCustomIcon',icon:'error'});}}});$("#boxmaindrop_delete").Droppable({accept:'icon',hoverclass:'boxmaindrop_delete_hover',onDrop:function(drag)
{modifyDesktop($(drag),0);}});$("#boxmaindrop_move").Droppable({accept:'icon',hoverclass:'boxmaindrop_move_hover',onDrop:function(drag)
{showWindow('move_copy_icon',{width:5,height:3,extraParam:$(drag).attr('id')+"|"+desktopId});}});}
function modifyDesktop(iconSource,iconTarget)
{if(iconTarget==0)
{iconSource.remove();id=parseInt(iconSource.css("top"))+'_'+parseInt(iconSource.css("left"));$('<div id="'+id+'" class="icon inactive inactive_'+LANGUAGE+'" style="top: '+iconSource.css("top")+'; left: '+iconSource.css("left")+';"></div>').appendTo("#desktop");$("#"+id).mouseover(function(){$(this).removeClass("inactive").addClass("inactive_hover inactive_hover_"+LANGUAGE);});$("#"+id).mouseout(function(){$(this).removeClass("inactive_hover inactive_hover_"+LANGUAGE).addClass("inactive");});$("#"+id).click(function(){targetPosition=$(this).attr("id");showWindow('add_icon',{width:8,height:6});});$("#"+id).Droppable({accept:'icon',hoverclass:'dragover',onDrop:function(drag)
{modifyDesktop($(drag),$(this));}});updateDesktopCookie(iconSource.attr("id"),0);}
else if(iconSource==0)
{if(typeof targetPosition=='undefined'||targetPosition.length==0)
{desktopSetFirstEmptyPositionAsTarget();}
$.ajax({url:'/ajax/desktop_add_icon.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&target_position='+targetPosition+'&icon_id='+iconTarget,complete:function()
{$("#"+iconTarget).Draggable({ghosting:true,revert:true,opacity:0.7,snapDistance:10,onStart:function()
{if($(this).attr("id").substring(0,1)=="c")
{$("#boxmaindrop_edit_na").hide();$("#boxmaindrop_edit").show();}
else
{$("#boxmaindrop_edit").hide();$("#boxmaindrop_edit_na").show();}
$("#boxmaindrop").show();$("#boxmain").hide();if($("#pressvideo_flag").get().length==1){$("#pressvideo").css("visibility","hidden");$("#boxmain").show();}},onStop:function()
{$("#desktop div.iconcontent").mouseover(function(){$(this).children(".handle").css("display","block");});$("#desktop div.iconcontent").mouseout(function(){$(this).children(".handle").css("display","none");});$("#boxmain").show();$("#boxmaindrop").hide();if($("#pressvideo_flag").get().length==1){$("#pressvideo").css("visibility","visible");$("#boxmain").hide();}}});$("#"+iconTarget).Droppable({accept:'icon',hoverclass:'dragover',onDrop:function(drag)
{modifyDesktop($(drag),$(this));}});updateDesktopCookie(0,iconTarget);}});}
else
{var bufferTop=iconTarget.css("top");var bufferLeft=iconTarget.css("left");iconTarget.css("top",iconSource.css("top"));iconTarget.css("left",iconSource.css("left"));iconSource.css("top",bufferTop);iconSource.css("left",bufferLeft);updateDesktopCookie(iconSource.attr("id"),iconTarget.attr("id"));}}
function desktopSetFirstEmptyPositionAsTarget()
{emptyPosition=arraySearch("0",desktopContent);if(emptyPosition>-1)
{targetPosition=desktopContentShadow[emptyPosition];}}
function updateDesktopCookie(iconIdSource,iconIdTarget)
{if(iconIdTarget==0)
{indexOfSource=arraySearch(iconIdSource,desktopContent);posX=Math.floor(indexOfSource/desktopCols)*90;posY=(indexOfSource%desktopCols)*90;desktopContent[indexOfSource]=0;desktopContentShadow[indexOfSource]=posX+'_'+posY;}
else
{if(iconIdSource==0)
{indexOfTarget=arraySearch(targetPosition,desktopContentShadow);desktopContent[indexOfTarget]=iconIdTarget;desktopContentShadow[indexOfTarget]=iconIdTarget;targetPosition='';}
else
{indexOfTarget=arraySearch(iconIdTarget,desktopContentShadow);if(iconIdTarget.indexOf("_")>-1)
{iconIdTargetShadow=parseInt($('#'+iconIdTarget).css("top"))+'_'+parseInt($('#'+iconIdTarget).css("left"));$('#'+iconIdTarget).attr("id",iconIdTargetShadow);iconIdTarget="0";}
else
{iconIdTargetShadow=iconIdTarget;}
desktopContent[arraySearch(iconIdSource,desktopContent)]=iconIdTarget;desktopContent[indexOfTarget]=iconIdSource;desktopContentShadow[arraySearch(iconIdSource,desktopContentShadow)]=iconIdTargetShadow;desktopContentShadow[indexOfTarget]=iconIdSource;}}
try
{clearTimeout(saveDesktopTimeout);}
catch(e)
{}
saveDesktopTimeout=setTimeout(saveDesktop,1000);}
function saveDesktop()
{removeLock=function()
{symbalooLock=false;}
if(desktopType!=5)
{ajaxCall({url:'/ajax/desktop_save.php',type:'POST',data:'desktop_id='+desktopId+'&desktop_content='+desktopContent.join("|")+'&desktop_cols='+desktopCols+'&desktop_rows='+desktopRows,complete:removeLock});}}
function saveDesktopAsDefault()
{$.ajax({url:'/ajax/desktop_save_as_default.php',data:'locale='+LOCALE+'&desktop_content='+desktopContent.join("|")+'&desktop_cols='+desktopCols+'&desktop_rows='+desktopRows,type:'POST',complete:function(xhr)
{if(xhr.responseText=="success")
{showAlert({content:'Current desktop is now the default desktop for <strong>'+LOCALE.toUpperCase()+'</strong>',icon:'ok'})}
else
{showAlert({content:xhr.responseText})}}});}
function showWindow(windowContent,args)
{if( windowContent == 'test' || windowContent == 'game' ){show_desktop_id='&desktop_id='+desktopId;}else{show_desktop_id='';}if($("#pressvideo_flag").get().length==1){$("#pressvideo").css("visibility","hidden");}
dimensionType=(typeof args.dimensionType=='undefined')?'block':args.dimensionType;windowWidth=(typeof args.width=='undefined')?6:parseInt(args.width);windowHeight=(typeof args.height=='undefined')?3:parseInt(args.height);windowTop=(typeof args.top=='undefined')?-1:parseInt(args.top);windowLeft=(typeof args.left=='undefined')?-1:parseInt(args.left);modal=(typeof args.modal=='undefined')?false:(modal==1);shiftUp=(typeof args.shiftup=='undefined')?false:true;key=(typeof args.key=='undefined')?0:args.key;fileLocation=(typeof args.location=='undefined')?'':args.location;extraParam=(typeof args.extraParam=='undefined')?'':args.extraParam;callback=(typeof args.callback!='function')?null:args.callback;initWindow=(typeof args.initwindow!='function')?function(){void(0);}:args.initwindow;align=(typeof args.align=='undefined')?'':args.align;scrollTop=(typeof args.scrollTop=='undefined')?0:args.scrollTop;if($.browser.msie&&$("#pressvideo").get().length>0){$("#pressvideo").css("visibility","hidden");}
if($.browser.msie)
{$(document).scrollTop(0);$(document).scrollLeft(0);$("select").css("visibility","hidden");$("body","html").css({height:$(document).height()+'px',width:$(document).width()+'px'});}
$("#window .windowcontent").html("");$("#overlay").show();if(!modal)$("#overlay").click(hideWindow);if(fileLocation.length>0)
{$.ajax({url:fileLocation+'/'+windowContent+'.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&key='+key+'&extraParam='+extraParam,complete:function()
{initWindow();windowSetCloseButton();}});}
else if(document.getElementById(windowContent)===null)
{$.ajax({url:'/window/'+windowContent+'.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&key='+key+'&extraParam='+extraParam+'&scroll_top='+scrollTop+show_desktop_id,complete:function()
{initWindow();windowSetCloseButton();}});}
else
{if(typeof document.body.style.maxHeight==="undefined")
{windowContentTemp=document.getElementById(windowContent).innerHTML;$("#window .windowcontent").append(windowContentTemp);}
else
{$("#window .windowcontent").html($("#"+windowContent).html());}
if($.browser.msie)
{windowLeft+=8;}
windowSetCloseButton();}
if(dimensionType=='block')
{windowWidth=(windowWidth*80)+((windowWidth-1)*10);windowHeight=(windowHeight*80)+((windowHeight-1)*10)-6;}
if($.browser.msie&&(windowTop==-1&&windowLeft==-1))
{$("#window").addClass("windowIEcenter");}
else
{$("#window").removeClass("windowIEcenter");}
$("#window").width(windowWidth);if(windowHeight!=3)
{$("#window").height(windowHeight);$("#window .windowcontent").height(parseInt($("#window").css("height"))-10);}
else
{$("#window").css("height","auto");$("#window .windowcontent").css("height","auto");}
if(windowTop==-1&&windowLeft==-1)
{centerWindow();$("#window").css("top","");$("#window").css("left","");}
else
{if($.browser.msie)
{$("#window").css("top",windowTop);$("#window").css("left",windowLeft);}
else
{$("#window").css("top",(windowTop-$(document).scrollTop())+"px");$("#window").css("left",(windowLeft-$(document).scrollLeft())+"px");}
$("#window").css("marginLeft","");$("#window").css("marginTop","");}
if(shiftUp)
{if($("#window").height()+windowTop>$(window).height()-15)
{$("#window").css("top",$(window).height()-$("#window").height()-15);}}
if($(window).height()<(parseInt($("#window").css("top"))/100)*parseInt($("#window").css("height"))+parseInt($("#window").css("height"))&&$.browser.msie&&$.browser.version<7)
{}
if(align.length>0)
{if(align=='ltop')
{}
else if(align=='rtop')
{$("#window").css("top",$("#desktop").offset().top+82);if($("#desktop").width()<$(window).width())
{$("#window").css("left",$("#desktop").offset().left+$("#desktop").width()-$("#window").width()+130);}
else
{$("#window").css("left",$(window).width()-$("#window").width()+110);}}}
$("#window").show();if(typeof callback=='function')
{callback();callback=null;}
if(typeof document.body.style.maxHeight==="undefined")
{$("#window").css("top",300);}}
function windowSetCloseButton()
{$(".window_close_button").click(hideWindow).hover(function()
{$(this).addClass("window_close_button_hover");},function()
{$(this).removeClass("window_close_button_hover");});}
function hideWindow()
{$("#window .windowcontent").css("padding","7px");if($("#pressvideo_flag").get().length==1){$("#pressvideo").css("visibility","visible");}
if($("#tab_content_container"))
{$('#tab_content_container>ul>li>a').unbind();}
$("#window a, #window div").unbind();$("#window input, #window select").unbind();$("#window").hide();$("#window .windowcontent").html("");$("#overlay").unbind("click").hide();if($.browser.msie)
{$("select").css("visibility","visible");$("html").css("overflow","");}
if($.browser.msie&&$("#pressvideo").get().length>0){$("#pressvideo").css("visibility","visible");}
if(typeof onWindowClose=="function")
{onWindowClose();onWindowClose=null;}}
function centerWindow()
{$("#window").css({marginLeft:'-'+parseInt((parseInt($("#window").css("width"))/2),10)+'px'});if(!(typeof document.body.style.maxHeight==="undefined"))
{$("#window").css({marginTop:'-'+parseInt((parseInt($("#window").css("height"))/2),10)+'px'});}else{$("#window").css({marginTop:'-'+parseInt((parseInt($("#window").css("height"))/3),10)+'px'});}}
function showAlert(args)
{if($("#pressvideo_flag").get().length==1){$("#pressvideo").css("visibility","hidden");}
content=(typeof args.content=='undefined')?'':args.content;identifier=(typeof args.identifier=='undefined')?'alertContent':args.identifier;caption=(typeof args.caption=='undefined')?'':args.caption;icon=(typeof args.icon=='undefined')?'alert':args.icon;callback=(typeof args.callback!='function')?null:args.callback;if(typeof document.body.style.maxHeight==="undefined")
{$("select").css("visibility","hidden");$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");}
translations=new Array();initHTML=(caption.length>0)?'<div id="'+caption+'" class="alertcaption"></div>':'';initHTML+='<div class="window_close_button"></div>';initHTML+='<table cellspacing="0" cellpadding="0" border="0"><tbody><tr valign="top">';initHTML+='<td><img src="/images/alert_icon_'+icon+'.gif" width="32" height="32" style="padding: 10px;" /></td>';initHTML+='<td valign="middle"><div id="'+identifier+'" class="alertmessage"></div></td>';initHTML+='</tr></tbody></table>';$("#alert .windowcontent").html(initHTML);$("#alert").css("width","300px");$("#overlayalert").show();hideAlertInline=function()
{hideAlert(callback);}
$("#overlayalert").click(hideAlertInline);if(caption.length>0)
{translations.push(caption);}
if(content.length>0)
{$("#"+identifier).html(content);}
else
{translations.push(identifier);}
getLanguageItems({identifier:translations});if(typeof document.body.style.maxHeight==="undefined")
{$("#alert").addClass("alertIEcenter");}
centerAlert();$("#alert").show();$(".window_close_button").click(hideAlert).hover(function()
{$(this).addClass("window_close_button_hover");},function()
{$(this).removeClass("window_close_button_hover");});}
function showCommonDialog(args)
{identifier=(typeof args.identifier=='undefined')?'alertContent':args.identifier;icon=(typeof args.icon=='undefined')?'alert':args.icon;viewtype=args.viewtype;callback=args.callback;callback2=(typeof args.callback2=='undefined')?null:args.callback2;viewTypeOK=1;viewTypeOKCancel=2;viewTypeYesNo=3
viewTypeYesNoCancel=4;translations=new Array();translations.push(identifier+":alertContent");buttons=new Array();switch(viewtype){case viewTypeOKCancel:button=new Array("OK",callback);buttons.push(button);button=new Array("Cancel",null);buttons.push(button);translations.push("dialogButtonOK:button_0_text");translations.push("dialogButtonCancel:button_1_text");break;case viewTypeYesNo:button=new Array("Yes",callback);buttons.push(button);button=new Array("No",callback2);buttons.push(button);translations.push("dialogButtonYes:button_0_text");translations.push("dialogButtonNo:button_1_text");break;case viewTypeYesNoCancel:button=new Array("Yes",callback);buttons.push(button);button=new Array("No",null);buttons.push(button);button=new Array("Cancel",null);buttons.push(button);translations.push("dialogButtonYes:button_0_text");translations.push("dialogButtonNo:button_1_text");translations.push("dialogButtonCancel:button_2_text");break;default:button=new Array("OK",callback);buttons.push(button);translations.push("dialogButtonOK:button_0_text");}
showDialog({identifier:translations,buttons:buttons,icon:icon});getLanguageItems({identifier:translations})}
function showDialog(args)
{if($("#pressvideo_flag").get().length==1){$("#pressvideo").css("visibility","hidden");}
content=(typeof args.content=='undefined')?'':args.content;caption=(typeof args.caption=='undefined')?'':args.caption;icon=(typeof args.icon=='undefined')?'alert':args.icon;buttons=(typeof args.buttons=='undefined')?null:args.buttons;identifier=(typeof args.identifier=='undefined')?'alertContent':args.identifier;if(typeof document.body.style.maxHeight==="undefined")
{$("select").css("visibility","hidden");$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");}
translations=new Array();initHTML=(caption.length>0)?'<div id="'+caption+'" class="alertcaption"></div>':'';initHTML+='<div class="window_close_button"></div>';initHTML+='<table cellspacing="0" cellpadding="0" border="0"><tbody><tr valign="top">';initHTML+='<td><img src="/images/alert_icon_'+icon+'.gif" width="32" height="32" style="padding: 10px;" /></td>';initHTML+='<td><div id="alertContent" class="alertmessage"></div></td>';initHTML+='</tr></tbody></table>';$("#alert .windowcontent").html(initHTML);$("#alert").css("width","300px");$("#overlayalert").show();hideAlertInline=function()
{hideAlert(callback);}
$("#overlayalert").click(hideAlertInline);if(caption.length>0)
{translations.push(caption);}
if(content.length>0)
{$("#alertContent").html(content);}
else
{translations.push(identifier);}
if(buttons)$("#alert .windowcontent").append("<div id=\"alertButtons\" style=\"padding-left: 55px;\"></div>");for(var index in buttons){var text=buttons[index][0];var callback=buttons[index][1];if(typeof(text)=='string'){var sButton='<div style=""><div id="button_'+index+'" class="button" style="margin-top: 2px;">';sButton+='<a href="#" id="button_'+index+'_text">'+text+'</a></div>';$("#alertButtons").append(sButton);if(typeof(callback)=='function')$("#alertButtons #button_"+index+" a").click(callback);$("#alertButtons #button_"+index+" a").click(hideAlert);}}
if(buttons)$("#alert .windowcontent").append("<div style=\"clear: both\"></div>");getLanguageItems({identifier:translations});if(typeof document.body.style.maxHeight==="undefined")
{$("#alert").addClass("alertIEcenter");}
centerAlert();$("#alert").show();try
{$("#button_0_text").focus();}
catch(e)
{}
$(".window_close_button").click(hideAlert).hover(function()
{$(this).addClass("window_close_button_hover");},function()
{$(this).removeClass("window_close_button_hover");});}
function hideAlert(callback)
{if($("#pressvideo_flag").get().length==1&&$("#overlay").css("display")=="none"){$("#pressvideo").css("visibility","visible");}
$("#alert").hide();$("#overlayalert").unbind("click").hide();$("#alert .window_close_button").unbind();if(typeof document.body.style.maxHeight==="undefined")
{$("select").css("visibility","visible");$("html").css("overflow","");}
if(typeof callback=='function')
{callback();callback=null;}}
function centerAlert()
{$("#alert").css({marginLeft:'-'+parseInt((parseInt($("#alert").css("width"))/2),10)+'px'});if(!jQuery.browser.msie)
{$("#alert").css({marginTop:'-'+parseInt((parseInt($("#alert").css("height"))/2),10)+'px'});}}
function showBoxLoading()
{try
{clearTimeout(currentTimeout);}
catch(e)
{}
if(typeof document.body.style.maxHeight==="undefined")
{$("select").css("visibility","hidden");}
$(".ac_results").hide();if($("#pressvideo_flag").get().length==1){$("#pressvideo").hide();$("#boxmain").show();}
position=$("#boxmain").offset();positionTop=position.top;positionLeft=position.left;width=$("#boxmain").width();height=$("#boxmain").height();$("#boxoverlay").width(width).height(height).css("top",positionTop).css("left",positionLeft).show();;$("#boxloading").width($("#boxoverlay").css("width")).height($("#boxoverlay").css("height")).css("top",$("#boxoverlay").css("top")).css("left",$("#boxoverlay").css("left")).show();$("#boxloading").show();}
function hideBoxLoading()
{$("#boxloading").hide();$("#boxoverlay").hide();if(typeof document.body.style.maxHeight==="undefined")
{$("select").css("visibility","visible");}}
function loadFeed(url,iconId,args)
{if(typeof args!="undefined")
{logoMargin=(typeof args.logoMargin=='undefined')?'':args.logoMargin;displayType=(typeof args.displayType=='undefined')?'full':args.displayType;sortByDate=(typeof args.sortByDate=='undefined')?'1':args.sortByDate;container=(typeof args.container=='undefined')?'':args.container;numFeedItems=(typeof args.numFeedItems=='undefined')?'':args.numFeedItems;}
else
{logoMargin=0;displayType='full';sortByDate='1';container='';numFeedItems='';}
$.ajax({url:'/ajax/feed_load.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&url='+url+'&icon_id='+iconId+'&logo_margin='+logoMargin+'&display_type='+displayType+'&sort_by_date='+sortByDate+'&desktop_id='+desktopId+'&container='+container+'&num_feed_items='+numFeedItems,complete:hideBoxLoading});executeLoadFeed=function()
{loadFeed(url,iconId,args)}
currentTimeout=setTimeout(executeLoadFeed,10*60*1000);}
function loadWidget(iconId,widgetSource)
{if(typeof widgetSource=="undefined")
widgetSource="";if($("#pressvideo_flag").get().length==1){$("#pressvideo").hide();$("#boxmain").show();}
$.ajax({url:'/ajax/widget_load.php',type:'POST',data:'locale='+LOCALE+'&desktop_id='+desktopId+'&icon_id='+iconId+'&source='+widgetSource});}
function loadRadio(iconId)
{$.ajax({url:'/ajax/radio_load.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&icon_id='+iconId,complete:function(xhr)
{var outputRadio="";var radioLabel=$("label",xhr.responseXML).text();outputRadio+='<html><head>';outputRadio+='<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';outputRadio+='<link rel="stylesheet" href="/style/13980.popup.css" type="text/css" />';outputRadio+='<title>13980电台</title>';outputRadio+='</head><body style="padding: 20px;">';outputRadio+='<div id="radio_header"><a href="javascript: void(0);" onclick="if (window.opener) { window.opener.location = \'http://www.13980.com/\'; } else { if (windowSymbalooMain) { windowSymbalooMain.location.href = \'\'; } else { var windowSymbalooMain = window.open(\'http://www.13980.com/\', \'windowSymbalooMain\'); }}"><img id="symbaloo_logo" src="/images/logo.gif" width="184" height="50" alt="" /></a></div>';outputRadio+='<div align="center">';outputRadio+='<object style="width: 280px; height: 69px;">';outputRadio+='<param name="src" value="'+$("url",xhr.responseXML).text()+'">';outputRadio+='<param name="type" value="application/x-mplayer2">';outputRadio+='<param name="autostart" value="1">';outputRadio+='<param name="showcontrols" value="1">';outputRadio+='<param name="showstatusbar" value="1">';outputRadio+='<embed src="'+$("url",xhr.responseXML).text()+'" type="application/x-mplayer2" autoplay="true" width="280" height="69" controller="1" showstatusbar="1" bgcolor="#9999ff" kioskmode="true">';outputRadio+='</embed>';outputRadio+='</object></div>';outputRadio+='<div id="radio_footer"><img src="'+$("image",xhr.responseXML).text()+'" width="80" height="80" alt="13980电台 | 正在直播: '+$("label",xhr.responseXML).text()+'" title="13980电台 | 正在直播: '+$("label",xhr.responseXML).text()+'" /></div>';outputRadio+='</body></html>';radioWindow=window.open('','radioWindow','width=320, height=275, top=0, left=0, screenX=0, screenY=0, resizable=0, scrollbars=0, titlebar=0, toolbar=0, menubar=0, status=0, directories=0');radioWindow.focus();radioWindow.document.writeln(outputRadio);radioWindow.document.close();}});}
function loadContact(iconId)
{showBoxLoading();$.ajax({url:'/ajax/contact_load.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&icon_id='+iconId+'&desktop_id='+desktopId,complete:hideBoxLoading});}
function toggleNode(nodeElement)
{alert($(nodeElement).html());$(nodeElement).parent().toggleClass("node_container_open");}
function searchIcon(iconType,contentType,searchText,showInternational)
{if(searchText.length==0)
{showAlert({identifier:'explorerSearchErrorNoQuery',icon:'error'});}
else if(searchText.length==1)
{showAlert({identifier:'explorerSearchErrorTooShort',icon:'error'});}
else
{$("#search_icon_"+contentType+"_indicator").css("display","inline");$("#box_search_"+contentType+" .tab_header span").css("display","none");$.ajax({url:'/ajax/explorer_search.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&icon_type='+iconType+'&content_type='+contentType+'&search_text='+searchText+'&show_international='+showInternational+'&desktop_content='+desktopContent.join('|'),complete:function()
{$("#search_icon_"+contentType+"_indicator").css("display","none");$("#box_search_"+contentType+" .tab_header span").css("display","inline");$("#search_reset_"+contentType).show();$("#box_filter_"+contentType).hide();$("#box_custom_"+contentType).hide();$("#search_icon_"+contentType).focus();}});}}
function clearSearch(contentType)
{$("#search_icon_"+contentType).val("");$("#"+contentType+"_results").html("");$("#"+contentType+"_results").hide();$("#"+contentType+"_explorer").show();$("#search_icon_"+contentType+"_clear").hide();$("#search_icon_"+contentType+"_indicator").css("display","none");$("#box_search_"+contentType+" .boxinlinelabel span").css("display","block");$("#search_reset_"+contentType).hide();$("#box_filter_"+contentType).show();$("#box_custom_"+contentType).show();$("#search_icon_"+contentType).focus();}
function cancelEditContactIcon(contentType)
{$("#add_custom_icon_"+contentType+"_id").val("0");$("#add_custom_icon_"+contentType+"_name").val("");$("#add_custom_icon_"+contentType+"_email").val("");$("#add_custom_icon_"+contentType+"_tel").val("");$("#add_custom_icon_"+contentType+"_mobile").val("");$("#add_custom_icon_"+contentType+"_website").val("http://");$("#add_custom_icon_"+contentType+"_birthday").val("");$("#add_custom_icon_"+contentType+"_fax").val("");$("#add_custom_icon_"+contentType+"_address").val("");$("#add_custom_icon_"+contentType+"_zipcode").val("");$("#add_custom_icon_"+contentType+"_city").val("");$("#add_custom_icon_"+contentType+"_country").val("");$("#add_custom_icon_"+contentType+"_company").val("");$("#add_custom_icon_"+contentType+"_function").val("");$("#add_custom_icon_"+contentType+"_tel_work").val("");$("#add_custom_icon_"+contentType+"_email_work").val("");$(".chat_content").val("");$(".icon_listing_small").removeClass("icon_listing_small_selected");$("#box_add_"+contentType+" .tab_header").show();$("#box_add_"+contentType+" .tab_header_edit_mode").hide();$(".explorer_cancel").hide();$(".add_custom_icon_"+contentType+"_step").hide();$("#add_custom_icon_"+contentType+"_step_1").show();$("#add_custom_icon_"+contentType+"_name").focus();}
function settingsLoadDesktopSettings(desktopId){$.ajax({url:'/ajax/settings_load_desktop_settings.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&changing_desktop_id='+desktopId,complete:function(){}});}
function fillNews()
{$.ajax({url:'/ajax/news_fill.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_id='+desktopId+'&desktop_cols='+desktopCols+'&desktop_rows='+desktopRows});}
function savePagesSettings(){sourceid=$("input[@name='source']:checked").val();changingDesktopId=$("input[@name='changingDesktopId']").val();$.ajax({url:'/ajax/settings_save_news.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&newsfeed_source_id='+sourceid+'&changing_desktop_id='+changingDesktopId,complete:function(){loadDesktop(changingDesktopId)}});}
function settingsLoadNewsPagesAndSaveAfter(){sourceid=$("input[@name='source']:checked").val();changingDesktopId=$("input[@name='changingDesktopId']").val();$.ajax({url:'/ajax/settings_save_news.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&newsfeed_source_id='+sourceid+'&changing_desktop_id='+changingDesktopId,complete:function(){settingsLoadNewsPages();}});}
function settingsLoadNewsPages(){sourceid=$("input[@name='source']:checked").val();$.ajax({url:'/ajax/settings_load_news_pages.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&newsfeed_source_id='+sourceid+'&changing_desktop_id='+$("input[@name='changingDesktopId']").val(),complete:function(){}});}
function saveNewsPercentage(percentage,isNew){changingDesktopId=$("input[@name='changingDesktopId']").val();$.ajax({url:'/ajax/settings_save_news.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&percentage='+percentage+'&changing_desktop_id='+changingDesktopId,complete:function(){if(!isNew)loadDesktop(changingDesktopId)}});}
function saveAllNewsSettings(allOrNone){changingDesktopId=$("input[@name='changingDesktopId']").val();sourceid=$("input[@name='source']:checked").val();$.ajax({url:'/ajax/settings_save_news.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&changing_desktop_id='+changingDesktopId+'&saveall=true'+'&newsfeed_source_id='+sourceid+'&allornone='+allOrNone,complete:function(){loadDesktop(changingDesktopId)}});}
function saveNewsSettings(ob){newsfeed_id=ob.getAttribute('name');changingDesktopId=$("input[@name='changingDesktopId']").val();$.ajax({url:'/ajax/settings_save_news.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&newsfeed_id='+newsfeed_id+'&value='+ob.checked+'&changing_desktop_id='+changingDesktopId,complete:function(){loadDesktop(changingDesktopId)}});}
function logout()
{afterLogout=function()
{document.location='/';}
$.ajax({url:'/logout.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE,complete:afterLogout});}
function loginVerificationResend(userEmail)
{afterResend=function(xhr)
{if(xhr.responseText=='success')
{showAlert({identifier:'formLoginVerificationResend',icon:'ok'});}
else
{showAlert({identifier:xhr.responseText});}}
$.ajax({url:'/ajax/login_verification_resend.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&username='+userEmail,complete:afterResend});}
function settingsSelectDesktop(desktopid,thisvar){$(".desktop_row").css("background-color","#FFFFFF");$(thisvar.parentNode.parentNode.parentNode).css("background-color","#CCCCCC");settingsLoadDesktopSettings(desktopid);}
function resetNews(){$.ajax({url:'/ajax/settings_reset_news.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&changing_desktop_id='+$("input[@name='changingDesktopId']").val(),complete:function(){}});}
function deleteAccount()
{afterDeleteAccount=function()
{hideWindow();loadDesktop(0);showAlert({identifier:'userDeleteAccountSuccess',icon:'ok'});}
$.ajax({url:'/ajax/user_delete_account.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE,complete:afterDeleteAccount});}
function forgotPassword(username)
{afterForgotPassword=function(xhr)
{if(xhr.responseText=='success')
{showAlert({identifier:'userForgotPasswordSuccess',icon:'ok'});}
else
{showAlert({identifier:xhr.responseText});}}
$.ajax({url:'/ajax/user_forgot_password.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&username='+username,complete:afterForgotPassword});}
function getMessages()
{$.ajax({url:'/ajax/message_list.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE});}
function openMessage(messageId)
{$.ajax({url:'/ajax/message_open.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&message='+messageId,complete:showMessage});}
function deleteMessage(messageId,confirmed)
{if(typeof confirmed=="undefined")confirmed==false;if(!confirmed)
{showCommonDialog({identifier:'messageDeleteConfirm',viewtype:3,callback:function(){deleteMessage(messageId,true);}});}
else
{$.ajax({url:'/ajax/message_delete.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&message='+messageId,complete:function()
{hideMessage();getMessages();}});}}
function showMessage()
{$("#messages").hide();$("#message_detail").show();}
function hideMessage()
{$("#message_detail").hide();$("#messages").show();}
function refreshDesktopTimerFunction(){loadDesktop(desktopId);}
function selectNewsFeed(){var newsfeed=$("#newsfeed option:selected").val();$.ajax({url:'/ajax/save_news_selected_feed.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&newsfeed='+newsfeed+'&desktopid='+desktopId,complete:function(){loadDesktop(desktopId)}});}
function cancelEditCustomIcon()
{$("#form_add_custom_icon_"+explorerLastTab).resetForm();$("#box_custom_"+explorerLastTab+" .tab_header").show();$("#box_custom_"+explorerLastTab+" .tab_header_edit_mode").hide();$(".explorer_cancel").hide();addCustomIconShowStepUrl();}
function addContactStep(contentType,gotoStep,action)
{if(typeof action=="undefined")action="";$(".add_custom_icon_"+contentType+"_step").hide();switch(gotoStep)
{case 1:$("#add_custom_icon_"+contentType+"_step_"+gotoStep).show();break;case 2:$("#add_custom_icon_"+contentType+"_step_"+gotoStep).show();break;}}
function addContact(contentType)
{if($("#add_custom_icon_"+contentType+"_name").val().length==0)
{addContactStep(contentType,1);showAlert({identifier:'addContactIconErrorNoName',icon:'error'});}
else
{$(".add_custom_icon_"+contentType+"_step").hide();$("#add_custom_icon_"+contentType+"_step_1").show();$('#box_add_contact .tab_header span').hide();$('#add_custom_contact_indicator').show();$("#form_add_custom_icon_"+contentType).submit();}}
function getIconCategories(iconType,contentType,categoryId,indent)
{$.ajax({url:'/ajax/icon_add_window_browse_category.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&icon_type='+iconType+'&content_type='+contentType+'&category_id='+categoryId+'&show_international='+explorerShowInternational+'&indent='+indent+'&desktop_content='+desktopContent.join('|'),complete:function()
{var explorerHistoryTemp=explorerHistoryCurrentTab.slice();for(var index=0;index<explorerHistoryTemp.length;index++)
{targetGroup=$("#explorer_"+contentType+"_category_"+explorerHistoryTemp[index]);if(targetGroup.get().length==1&&!targetGroup.is(".node_main_open"))
{explorerHistoryCurrentTab.removeItems(explorerHistoryTemp[index]);targetGroup.click();}}}});}
function openDesktop(desktopId){$("#bar_menu_item_container").hide();$(".desktop_load_indicator").show();loadDesktop(desktopId);}
function loadChat(name)
{var outputChat="";outputChat+='<html><head>';outputChat+='<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';outputChat+='<link rel="stylesheet" href="/_css/symbaloo.popup.css" type="text/css" />';outputChat+='<title>Symbaloo Chat</title>';outputChat+='</head><body style="padding: 10px;">';outputChat+='<div align="center">';switch(name)
{case"press_chat_eduard":outputChat+='<!-- Beginning of meebo me widget code. Want to talk with visitors on your page? Go to http://www.meebome.com/ and get your widget! --><embed src="http://widget.meebo.com/mm.swf?MUclfMuuRD" type="application/x-shockwave-flash" wmode="transparent" width="400" height="300"></embed>';break;case"press_chat_steven":outputChat+='<!-- Beginning of meebo me widget code. Want to talk with visitors on your page? Go to http://www.meebome.com/ and get your widget! --><embed src="http://widget.meebo.com/mm.swf?KEaVNYgHyT" type="application/x-shockwave-flash" wmode="transparent" width="400" height="300"></embed>';break;case"press_chat_koen":outputChat+='<!-- Beginning of meebo me widget code. Want to talk with visitors on your page? Go to http://www.meebome.com/ and get your widget! --><embed src="http://widget.meebo.com/mm.swf?DszaohYrgK" type="application/x-shockwave-flash" wmode="transparent" width="400" height="300"></embed>';break;case"press_chat_tim":outputChat+='<!-- Beginning of meebo me widget code. Want to talk with visitors on your page? Go to http://www.meebome.com/ and get your widget! --><embed src="http://widget.meebo.com/mm.swf?rMjGdwhSFi" type="application/x-shockwave-flash" wmode="transparent" width="400" height="300"></embed>';break;case"press_chat_valentin":outputChat+='<!-- Beginning of meebo me widget code. Want to talk with visitors on your page? Go to http://www.meebome.com/ and get your widget! --><embed src="http://widget.meebo.com/mm.swf?OeennOYVBq" type="application/x-shockwave-flash" wmode="transparent" width="400" height="300"></embed>';break;}
outputChat+='</div>';outputChat+='</body></html>';chatWindow=window.open('',name,'width=420, height=320, resizable=1, scrollbars=0, titlebar=0, toolbar=0, menubar=0, status=0, directories=0');chatWindow.focus();chatWindow.document.writeln(outputChat);chatWindow.document.close();}
function isNumberKey(evt){try{var charCode=(evt.which)?evt.which:event.keyCode;if(charCode>31&&(charCode<48||charCode>57)){return false;}}catch(e){}
return true;}
function timeFieldConcat(id){$("#"+id).val($("#"+id+"_hours").val()+":"+$("#"+id+"_minutes").val());}
function shareDesktop(type,recipient)
{$("#privateShareDesktopButton").hide();$("#privateShareDesktopButton_indicator").show();if(typeof recipient=="undefined")recipient="";afterShareDesktop=function(xhr)
{$("#privateShareDesktopButton_indicator").hide();$("#privateShareDesktopButton").show();returnType=$("return_type",xhr.responseXML).text();returnMessage=$("return_message",xhr.responseXML).text();if(returnType.length>0)
{showAlert({content:returnMessage})}
else
{settingsLoadTabDesktop({desktop:desktopId});}}
$.ajax({url:'/ajax/desktop_share.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&type='+type+'&recipient='+recipient+'&desktop_id='+desktopId,complete:afterShareDesktop});}
function unshareDesktop(shareKey)
{afterUnshareDesktop=function(xhr)
{settingsLoadTabDesktop({desktop:desktopId});}
$.ajax({url:'/ajax/desktop_share_delete.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&share_key='+shareKey,complete:afterUnshareDesktop});}
function loginRegister(confirmed)
{if(typeof confirmed=="undefined")confirmed==false;if($('#new').attr("checked")&&!confirmed)
{showCommonDialog({identifier:'loginRegisterStartNewConfirm',viewtype:3,callback:function(){loginRegister(true);}});}
else
{$('#login_register_form').submit();}}
function iconMoveCopyShowTargetDesktops()
{$.ajax({url:'/ajax/move_copy_icon_get_desktops.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&source_desktop_id='+desktopId});}
function iconMoveCopy(iconId,targetDesktopId,sourceDesktopId,action)
{$(".post_indicator").show();$(".button").hide();$.ajax({url:'/ajax/move_copy_icon.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&icon_id='+iconId+'&target_desktop_id='+targetDesktopId+'&source_desktop_id='+desktopId+'&action='+action,complete:function(xhr)
{$(".post_indicator").hide();$(".button").show();result=$("result",xhr.responseXML).text();returnMessage=$("return_message",xhr.responseXML).text();callBack=$("call_back",xhr.responseXML).text();if(result=="success")
{hideWindow();if(callBack.length>0)
{eval(callBack);}}
else
{showAlert({content:returnMessage});}}});}
function windowMainMenuClick(el)
{var classInactive='window_main_menu_item_'+el.attr("rel");var classSelected='window_main_menu_item_'+el.attr("rel")+'_sel';$(".main_menu_placeholder a").removeClass("window_main_menu_item_sel");$(".main_menu_placeholder").removeClass("main_menu_placeholder_sel");$(".main_menu_placeholder a").each(function()
{$(this).attr("className","window_main_menu_item_"+$(this).attr("rel"));});$(".sub_menu_placeholder").hide();el.addClass(classSelected);el.addClass("window_main_menu_item_sel");el.parent().addClass("main_menu_placeholder_sel");$("#sub_menu_placeholder_"+el.attr("rel")).show();if(!$("#sub_menu_placeholder_"+el.attr("rel")+" a").is(".window_sub_menu_item_sel"))
{$("#sub_menu_placeholder_"+el.attr("rel")+" a:first-child").click();}
else
{$("#sub_menu_placeholder_"+el.attr("rel")).find(".window_sub_menu_item_sel").click();}}
function windowSubMenuClick(el)
{el.parent().find(".window_sub_menu_item_sel").removeClass("window_sub_menu_item_sel");el.addClass("window_sub_menu_item_sel");}
function windowContentShow(tabContentIdentifier,initFunction)
{if(typeof initFunction=="undefined")
{initFunction=function(){void(0)};}
$(".window_content_container_tab").hide();$("#window_content_container_tab_"+tabContentIdentifier).show();initFunction();}
function showMenuDropdown()
{if(!hideDropdownAfterClick)
{clearTimeout(dropdownTimer);dropdownTimer=false;if($("#menu_dropdown").css("display")=="none")
{dropdownTop=$("#desktop_bar_selected_container").offset().top+20;dropdownLeft=$("#desktop_bar_selected_container").offset().left;if($(".move_button_cell").css("display")!="none"&&dropdownLeft<($("#desktop_move_left_button").offset().left+20))
{dropdownLeft=($("#desktop_move_left_button").offset().left+20);}
$("#menu_dropdown").css("top",dropdownTop).css("left",dropdownLeft);dropdownTimer=setTimeout('$("#menu_dropdown").show()',300);}}
else
hideDropdownAfterClick=false;}
function hideMenuDropdown(now)
{if(!dropdownTimer&&typeof now=="undefined")
{dropdownTimer=setTimeout('$("#menu_dropdown").hide();',300);}
else if(typeof now!="undefined")
{$("#menu_dropdown").hide()}
else
{clearTimeout(dropdownTimer);dropdownTimer=false;}}
function symbalooClick()
{void(0);}
function sendEvent(swf,typ,prm){thisMovie(swf).sendEvent(typ,prm);};function getUpdate(typ,pr1,pr2,swf){};function thisMovie(swf){return document[swf];};function movieStop()
{thisMovie('jstest').sendEvent('stop',0);}
function saveDropdownboxChoice(fieldId,fieldValue)
{if(fieldId!=undefined&&fieldValue!=undefined)
{$.ajax({url:'/ajax/save_dropdownbox_choice.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&fieldId='+fieldId+'&fieldValue='+fieldValue+'&desktopId='+desktopId});}}
function publishRate(rating,desktopShareId,desktopUserId)
{$(".boxpublishbar .publishoption").hide();$(".boxpublishbar .publishloader").show();$.ajax({url:'/ajax/save_publish_rating.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&rating='+rating+'&desktopShareId='+desktopShareId+'&desktopUserId='+desktopUserId,complete:function()
{$(".boxpublishbar .publishloader").hide();$(".boxpublishbar .publishrated").show().click(function(){publishLoadDesktopNoticeBar();});}});}
function publishUpdateDesktop(action,desktopShareId)
{$(".boxpublishbar .publishoption").hide();$(".boxpublishbar .publishloader").show();$.ajax({url:'/ajax/publish_update_desktop.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&action='+action+'&desktopShareId='+desktopShareId+'&desktopId='+desktopId});}
function publishLoadDesktopNoticeBar()
{if($(".boxpublishbar"))
{clearTimeout(publishDesktopTimer);$(".boxpublishbar .publishloader").show();$.ajax({url:'/ajax/desktop_show_bar_publish_notice.php',type:'GET',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktopId='+desktopId,complete:function()
{$(".boxpublishbar .publishloader").hide();}});publishDesktopTimer=setTimeout(publishLoadDesktopNoticeBar,15*60*1000);}}function iconAdd(iconId)
{if(desktopType==5)
{addRssFeed(iconId,targetPosition);}
else
{modifyDesktop(0,iconId);}
hideWindow();}
function deleteDesktop()
{$.ajax({url:'/ajax/desktop_delete.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_id='+desktopId});}
var settingsLastMainMenu='';var settingsLastSubMenu='';var settingsLastTab='';function getLanguages()
{$.ajax({url:'/ajax/settings_languages_load.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE,complete:function(xhr)
{$("#languages").html(xhr.responseText);}});}
function setLanguage(language)
{$.ajax({url:'/ajax/language_save.php',type:'POST',data:'locale='+LOCALE+'&language='+language,complete:function(xhr)
{document.location.reload();}});}
function getResolutions(desktopActionId)
{$.ajax({url:'/ajax/desktop_resolution_load.php',type:'POST',data:'desktop_id='+desktopActionId});}
function modifyResolution(diffCols,diffRows,confirmDelete)
{confirmDelete=(typeof confirmDelete=='undefined')?'':confirmDelete;$("#change_dimension_buttons a").hide();$("#definedResolutions a").hide();modifyResolutionButtonsShow=function()
{$("#definedResolutions a").show();$("#change_dimension_buttons a").show();getResolutions(desktopId);}
ajaxCall({url:'/ajax/desktop_resolution_modify.php',type:'POST',data:'desktop_id='+desktopId+'&desktop_content='+desktopContent.join('|')+'&desktop_cols='+desktopCols+'&desktop_rows='+desktopRows+'&diff_cols='+diffCols+'&diff_rows='+diffRows+'&confirm_delete='+confirmDelete,complete:function()
{modifyResolutionButtonsShow();$("body","html").css({height:$(document).height()+'px',width:$(document).width()+'px'});}});}
function modifyRssDesktop(diffCols)
{$("#change_dimension_buttons a").hide();$("#definedResolutions a").hide();modifyResolutionButtonsShow=function()
{$("#definedResolutions a").show();$("#change_dimension_buttons a").show();getResolutions(desktopId);}
ajaxCall({url:'/ajax/desktop_rss_modify.php',type:'POST',data:'desktop_id='+desktopId+'&diff_cols='+diffCols,complete:modifyResolutionButtonsShow});}
function resetSymbaloo(resetType)
{$("#languageResetHard").parent().hide();$("#languageResetHard_indicator").show();$.ajax({url:'/ajax/reset.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&reset_type='+resetType,complete:function(xhr)
{if(resetType=='soft')
{$("#languageResetHard").parent().show();$("#languageResetHard_indicator").hide();alert('not yet implemented');hideWindow();}
else
{document.location.reload();}}});}
function settingsInit(scrollTop)
{scrollTop=(typeof scrollTop=='undefined')?0:scrollTop;settingsGetDesktopSubMenuItems();if(settingsLastMainMenu.length==0)
{$("#windowSettingsMainMenuDesktop").addClass("window_main_menu_item_desktop_sel");$("#windowSettingsMainMenuDesktop").addClass("window_main_menu_item_sel");$("#windowSettingsMainMenuDesktop").parent().addClass("main_menu_placeholder_sel");$("#sub_menu_placeholder_desktop").show();$("#windowSettingsSubMenuDesktop").addClass("window_sub_menu_item_sel");$("#window_content_container_tab_desktop").show();settingsLoadTabDesktop({scrollTop:scrollTop});}
else
{if(settingsLastSubMenu.length>0)
{$("#"+settingsLastSubMenu).click();}
$("#"+settingsLastMainMenu).click();}}
function settingsGetDesktopSubMenuItems()
{$.ajax({url:'/ajax/settings_load_desktop_menu_items.php?desktop_id='+desktopId,type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE});}
function settingsLoadTabMain()
{getLanguages();$("#settings_locale").change(function(){top.location.href="/"+$("#settings_locale").val()+"/";});}
function settingsLoadTabAdvanced()
{$("#settings_preferred_desktop").change(function(){settingsPreferredDesktopSet($("#settings_preferred_desktop").val());});if($.cookie('symbalooLastSearchText')&&$.cookie('symbalooLastSearchText').length>0)
{$("#settingsLabelRememberKeywordCurrent").html($.cookie('symbalooLastSearchText'));$("#settingsLabelRememberKeywordCurrentContainer").show();}}
function settingsLoadTabDesktop(args)
{if(typeof args=='undefined')
{action='';subaction='';desktopActionId=desktopId;scrollTop=0;}
else
{action=(typeof args.action=='undefined')?'':args.action;subaction=(typeof args.subaction=='undefined')?'':args.subaction;desktopActionId=(typeof args.desktop=='undefined')?desktopId:args.desktop;scrollTop=(typeof args.scrollTop=='undefined')?0:args.scrollTop;}
$.ajax({url:'/ajax/settings_load_desktop.php?action='+action+'&subaction='+subaction+'&desktop='+desktopActionId,type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&'+$("#formdesktop input").serialize()+'&'+$("#formdesktop textarea").serialize(),complete:function(){if(scrollTop==0){$("#desktop_label").focus();}}});}
function settingsLoadTabAccount(args)
{if(typeof args=='undefined')
{action='';subaction='';}
else
{action=(typeof args.action=='undefined')?'':args.action;subaction=(typeof args.subaction=='undefined')?'':args.subaction;}
$.ajax({url:'/ajax/settings_load_account.php?action='+action,type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&'+$("#formSettingsAccountProfile input").serialize(),complete:function()
{settingsLoadTabAccountPassword();}});}
function settingsLoadTabAccountPassword(args)
{if(typeof args=='undefined')
{action='';subaction='';}
else
{action=(typeof args.action=='undefined')?'':args.action;subaction=(typeof args.subaction=='undefined')?'':args.subaction;}
$.ajax({url:'/ajax/settings_load_account_password.php?action='+action,type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&'+$("#formSettingsAccountPassword input").serialize()});}
function settingsExternalLinksTargetSet(target)
{$("#settingsLabelExternalLinksTarget_indicator").show();afterSettingsExternalLinksTargetSet=function(xhr)
{loadDesktop(desktopId);$("#settingsLabelExternalLinksTarget_indicator").hide();}
$.ajax({url:'/ajax/settings_save_external_links_target.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&target='+target,complete:afterSettingsExternalLinksTargetSet});}
function settingsPreferredDesktopSet(target)
{$("#settingsLabelPreferredDesktop_indicator").show();afterSettingsPreferredDesktopSet=function(xhr)
{$("#settingsLabelPreferredDesktop_indicator").hide();}
$.ajax({url:'/ajax/settings_save_preferred_desktop.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&target='+target,complete:afterSettingsPreferredDesktopSet});}
function settingsAutofocusSet(target)
{$("#settingsLabelAutofocus_indicator").show();afterSettingsAutofocusSet=function(xhr)
{$("#settingsLabelAutofocus_indicator").hide();onWindowClose=function(){$("#searchtext").focus();}}
$.ajax({url:'/ajax/settings_save_autofocus.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&target='+target,complete:afterSettingsAutofocusSet});}
function settingsRememberKeywordSet(target)
{$("#settingsLabelRememberKeyword_indicator").show();afterSettingsRememberKeywordSet=function(xhr)
{$("#settingsLabelRememberKeyword_indicator").hide();}
$.ajax({url:'/ajax/settings_save_remember_keyword.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&target='+target,complete:afterSettingsRememberKeywordSet});}
function settingsStartBlockSet(desktopActionId,blockIdentifier)
{$("#settingsLabelStartBlock").css("visibility","hidden");$("#settingsLabelStartBlock_indicator").show();resetLoadingIndicator=function()
{$("#settingsLabelStartBlock_indicator").hide();$("#settingsLabelStartBlock").css("visibility","visible");}
resetLoadingIndicatorTimeout=function()
{setTimeout(resetLoadingIndicator,1000);}
$.ajax({url:'/ajax/settings_save_start_block.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_id='+desktopActionId+'&block_identifier='+blockIdentifier,complete:resetLoadingIndicatorTimeout});}
function currentKeywordClear()
{$.cookie('symbalooLastSearchText','');$("#searchtext").val('');$("#settingsLabelRememberKeywordCurrentContainer").hide();}
function moveDesktop(direction,desktopMoveId)
{$(".button_order").hide();$("#desktop_order_indicator").show();settingsLoadTabDesktop({action:'save',subaction:direction,desktop:desktopMoveId,scrollTop:1800});}
function saveShareSettings(args)
{$("#settingsShareDesktop_header").hide();$("#settingsShareDesktop_indicator").show();$(".checkbox").css("visibility","hidden");action=(typeof args.action=='undefined')?'delete':args.action;resetLoadingIndicator=function(xhr)
{$("#settingsShareDesktop_indicator").hide();$("#settingsShareDesktop_header").show();$(".checkbox").css("visibility","visible");returnType=$("return_type",xhr.responseXML).text();returnMessage=$("return_message",xhr.responseXML).text();if(returnType.length>0)
{showAlert({content:returnMessage})}
else if(returnMessage.length>0)
{settingsLoadTabDesktop({desktop:desktopId});}
settingsLoadTabDesktop({desktop:desktopId});}
$.ajax({url:'/ajax/desktop_share.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&action='+action+'&desktop_id='+desktopId,complete:resetLoadingIndicator});}
function savePublishSettings(args)
{action=(typeof args.action=='undefined')?'delete':args.action;if(action=="init_publish")
{if(false)
{showCommonDialog({identifier:'shareDeleteYesNo',viewtype:3,callback:function()
{$("#settingsShareDesktop_header").hide();$("#settingsShareDesktop_indicator").show();$(".checkbox").css("visibility","hidden");$.ajax({url:'/ajax/desktop_share.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&action=delete&desktop_id='+desktopId,complete:function()
{$("#settingsShareDesktop_indicator").hide();$("#settingsShareDesktop_header").show();$(".checkbox").css("visibility","visible");$(".share_steps").hide();$("#share_step_publish").show();}});},callback2:function()
{$("#desktop_share_type_share").attr("checked","checked");}});}
else
{$(".share_steps").hide();$("#share_step_publish").show();}}
else
{valid=true;formSerialize=$("#formdesktop_publish").formSerialize();if($("#publish_title").val().length==0){valid=false;}
if($("#publish_tags").val().length==0){valid=false;}
if($("#publish_description").val().length==0){valid=false;}
if(!$("#publish_disclaimer").attr("checked")){valid=false;}
has_cat=false;for(var cat=1;cat<=6;cat++)
{if($("#publish_category_"+cat).attr("checked"))
{has_cat=true;}}
if(!has_cat){valid=false;}
if(!valid)
{showAlert({identifier:"publishFormValidateError",icon:'error'});}
else if(valid)
{$("#settingsPublishButton_indicator").show();$("#settingsPublishButton_indicator").show();$("#formdesktop_publish .checkbox").attr("disabled",true);$("#formdesktop_publish .inputText").attr("disabled",true);$("#formdesktop_publish .inputTextArea").attr("disabled",true);resetLoadingIndicator=function(xhr)
{$("#settingsShareDesktop_header").show();$("#settingsPublishButton_indicator").hide();$("#settingsPublishButton_indicator").hide();$("#formdesktop_publish .checkbox").attr("disabled",false);$("#formdesktop_publish .inputText").attr("disabled",false);$("#formdesktop_publish .inputTextArea").attr("disabled",false);$(".window_content_container_tab").scrollTop(1);if(xhr.responseText.length>0)
{showCommonDialog({icon:'ok',viewtype:1,identifier:xhr.responseText,callback:settingsLoadTabDesktop({desktop:desktopId,action:action})})}}
$.ajax({url:'/ajax/desktop_publish.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&action='+action+'&desktop_id='+desktopId+'&'+formSerialize,complete:resetLoadingIndicator});}}}
function sendShare(senderName,senderEmail,text,recipient)
{$("#button_box_share_send .button").hide();$("#settingsShareDesktopSend_indicator").show();resetLoadingIndicator=function(xhr)
{$("#settingsShareDesktopSend_indicator").hide();$("#button_box_share_send .button").show();returnType=$("return_type",xhr.responseXML).text();returnMessage=$("return_message",xhr.responseXML).text();if(false&&returnType.length>0)
{showCommonDialog({content:returnMessage})}
else
{showCommonDialog({content:returnMessage,icon:'ok'})
$("#share_step_share_send").hide();$(".window_content_container_tab").scrollTop(1);}}
$.ajax({url:'/ajax/desktop_share_send.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&sender_name='+senderName+'&sender_email='+senderEmail+'&text='+text+'&recipient='+recipient+'&desktop_id='+desktopId,complete:resetLoadingIndicator});}
function sendPublish(senderName,senderEmail,text,recipient,publishDesktopId)
{$("#button_box_publish_send .button").hide();$("#settingsPublishDesktopSend_indicator").show();resetLoadingIndicator=function(xhr)
{$("#settingsPublishDesktopSend_indicator").hide();$("#button_box_publish_send .button").show();returnType=$("return_type",xhr.responseXML).text();returnMessage=$("return_message",xhr.responseXML).text();if(false&&returnType.length>0)
{showCommonDialog({content:returnMessage})}
else
{showCommonDialog({content:returnMessage,icon:'ok'})
$("#publish_step_share_send").hide();$(".window_content_container_tab").scrollTop(1);}}
$.ajax({url:'/ajax/desktop_publish_send.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&sender_name='+senderName+'&sender_email='+senderEmail+'&text='+text+'&recipient='+recipient+'&desktop_id='+publishDesktopId,complete:resetLoadingIndicator});}
function addPublishOrder(type,terms,page,searchLocale){$.ajax({url:'/ajax/desktop_add.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_type=publish&act=search&search_terms='+terms+'&sort='+type+'&page='+page+'&search_locale='+searchLocale,complete:null});}
function addPublishOrderCat(type,cat,page,searchLocale){$.ajax({url:'/ajax/desktop_add.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_type=publish&act=browse&cat='+cat+'&sort='+type+'&page='+page+'&search_locale='+searchLocale,complete:null});}
function publishResearch(terms,sort,page,search_locale){$.ajax({url:'/ajax/desktop_add.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+"&desktop_type=publish&act=search&search_terms="+terms+"&sort="+sort+"&page="+page+'&search_locale='+search_locale,complete:null});}
function publishReselect(cat,sort,page){$.ajax({url:'/ajax/desktop_add.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+"&desktop_type=publish&act=browse&cat="+cat+"&sort="+sort+"&page="+page,complete:null});}
function selectCategory(ct,selectLocale){$.ajax({url:'/ajax/desktop_add.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_type=publish&act=browse&cat='+ct+'&select_locale='+selectLocale,complete:null});}
function addPublish(id,terms,sort,page){$.ajax({url:'/ajax/desktop_add.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_type=publish&act=show&id='+id+"&search_terms="+terms+"&sort="+sort+"&page="+page,complete:null});}
function addPublishCat(id,cat,sort,page){$.ajax({url:'/ajax/desktop_add.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_type=publish&act=show&id='+id+"&cat="+cat+"&sort="+sort+"&page="+page,complete:null});}
function addPublishReal(id){$.ajax({url:'/ajax/desktop_add.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_type=publish&act=add&id='+id,complete:null});}
function deactivateAllAddDesktopDivs(){$(".add_desktop_row").removeClass("add_desktop_selected_row");$(".add_desktop_row .desktop_add_label_name_form").hide();$(".add_desktop_row .add_desktop_row_text_content").show();}
function activateAddDesktopDiv(type,content){deactivateAllAddDesktopDivs();$("#"+type+"_"+content+"_div").addClass("add_desktop_selected_row");$("#"+type+"_"+content+"_div .desktop_add_label_name_form").show();$("#"+type+"_"+content+"_div .add_desktop_row_text_content").hide();$("#"+type+"_"+content+"_div .text").focus();$("#"+type+"_"+content+"_div .text").keypress(function(e){if(e.keyCode==13){e.preventDefault();$("#add_desktop_form_submit").click();}});$("#"+type+"_"+content+"_div .text").focus();$("#desktop_type").val(type);$("#start_content").val(content);}
function desktopTabs(arg)
{if(arg=="hide")
{$(".window_tabs_container").hide();$(".window_content_container_tab").css("height","425px");}
else if(arg=="show")
{$(".window_tabs_container").show();$(".window_content_container_tab").css("height","400px");}}
function showTab(arg)
{if(typeof arg!="undefined")
{$(".settings_tab_option").hide();settingsLastTab=arg;$(".window_tabs_tab").removeClass("window_tabs_tab_selected");$("#share_step_"+arg).show();$("#window_tab_desktop_settings_"+arg).addClass("window_tabs_tab_selected");}}function addIconLoadTab(content,action,noAction)
{if(typeof action=='undefined')
{action='browse';}
if(typeof noAction=='undefined')
{noAction=false;}
explorerLastSubTab=action;if(!$("#window_add_icon_main_menu_"+content).is("window_main_menu_item_sel"))
{$(".window_main_menu_item_sel").removeClass("window_main_menu_item_sel");$(".main_menu_placeholder_sel").removeClass("main_menu_placeholder_sel");$("#window_add_icon_main_menu_"+content).addClass("window_main_menu_item_sel");$("#window_add_icon_main_menu_"+content).addClass("window_main_menu_item_"+content+"_sel");$("#window_add_icon_main_menu_"+content).parent().addClass("main_menu_placeholder_sel");$(".sub_menu_placeholder").hide();$("#sub_menu_placeholder_"+content).show();$(".window_sub_menu_item_sel").removeClass("window_sub_menu_item_sel");$("#window_add_icon_sub_menu_"+content+"_"+action).addClass("window_sub_menu_item_sel");}
if(!noAction)
{switch(action)
{case'browse':addIconBrowse(content);break;case'search':addIconSearch(content);break;case'add':case'edit':addIconCustom(content,action);break;case'custom':addIconBrowseCustom(content);break;}}}
function addIconBrowse(content)
{if(ajaxBrowse)ajaxBrowse.abort();explorerLastTab=content;eval('initCategories = explorerHistory'+content);ajaxBrowse=ajaxCall({url:'/ajax/icon_add_window_browse.php',type:'POST',data:'content='+content+'&categories='+initCategories.join(',')+'&desktop_content='+desktopContent.join('|')+'&desktop_type='+desktopType+'&desktop_id='+desktopId,complete:function()
{if(content!='search'&&content!='widget')
{explorerHistoryCurrentTab=new Array();eval("explorerHistoryCurrentTab = explorerHistory"+explorerLastTab+";");eval("explorerHistory"+explorerLastTab+" = new Array();");var explorerHistoryTemp=explorerHistoryCurrentTab.slice();for(var index=0;index<explorerHistoryTemp.length;index++)
{targetGroup=$("#explorer_"+explorerLastTab+"_category_"+explorerHistoryTemp[index]);if(targetGroup.get().length==1&&!targetGroup.is(".node_main_open"))
{explorerHistoryCurrentTab.removeItems(explorerHistoryTemp[index]);targetGroup.click();}}}
$(".window_content_container_tab").hide();$("#window_content_container_tab_browse").show();}});}
function addIconSearch(content)
{if(ajaxBrowse)ajaxBrowse.abort();explorerLastTab=content;eval("explorerLastTabSearch=explorerLastTabSearch"+content);if(explorerLastTabSearch.length>0&&explorerLastTabSearch.indexOf('||')>-1)
{explorerLastTabSearchParts=explorerLastTabSearch.split('||');explorerLastTabCountries=explorerLastTabSearchParts[0];explorerLastTabSearch=explorerLastTabSearchParts[1];}
else
{explorerLastTabCountries="";explorerLastTabSearch="";}
$("#window_content_container_tab_search").html('');if($("#window_content_container_tab_search").css("display")=="none")
{$(".window_content_container_tab").hide();$("#window_content_container_tab_search").show();}
ajaxBrowse=ajaxCall({url:'/ajax/icon_add_window_search.php',type:'POST',data:'content='+content+'&desktop_content='+desktopContent.join('|')+'&desktop_type='+desktopType+'&desktop_id='+desktopId+'&add_icon_search='+explorerLastTabSearch+'&countries='+explorerLastTabCountries});}
function addIconBrowseCustom(content)
{if(ajaxBrowse)ajaxBrowse.abort();explorerLastTab=content;ajaxBrowse=ajaxCall({url:'/ajax/icon_add_window_browse_custom.php',type:'POST',data:'content='+content+'&desktop_content='+desktopContent.join('|')+'&desktop_type='+desktopType+'&desktop_id='+desktopId,complete:function()
{$(".window_content_container_tab").hide();$("#window_content_container_tab_custom").show();}});}
function addIconCustom(content,action,iconId,refreshDesktop)
{if(typeof iconId=='undefined')iconId=0;if(typeof refreshDesktop=='undefined')refreshDesktop=0;if(ajaxBrowse)ajaxBrowse.abort();explorerLastTab=content;if($("#window_content_container_tab_add").css("display")=="none")
{$(".window_content_container_tab").hide();$("#window_content_container_tab_add").show();}
ajaxBrowse=ajaxCall({url:'/ajax/icon_add_window_custom.php',type:'POST',data:'content='+content+'&action='+action+'&icon_id='+iconId+'&refresh_desktop='+refreshDesktop+'&notify_webmaster=1'});}
function deleteCustomIcon(iconId,confirmed)
{if(typeof confirmed=="undefined")confirmed==false;if(!confirmed)
{showCommonDialog({identifier:'explorerDeleteIconConfirm',viewtype:3,callback:function(){deleteCustomIcon(iconId,true);}});}
else
{reloadCustomIconList=function()
{if($("#c"+iconId).get().length==1)
{modifyDesktop($("#c"+iconId),0);}
addIconLoadTab(explorerLastTab,'custom');}
$.ajax({url:'/ajax/icon_delete_custom.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&custom_icon_id='+iconId,complete:reloadCustomIconList});}}
var beforeSubmit,afterSubmit;function loadSearchModule(iconId,searchId,desktopFirstLoadFlag)
{desktopFirstLoadFlag=(typeof desktopFirstLoadFlag=="undefined")?0:desktopFirstLoadFlag;$.ajax({url:"/ajax/search_module_load.php",type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_id='+desktopId+'&search_module='+iconId+'&search_id='+searchId+'&first_load='+desktopFirstLoadFlag});}
function loadSearchSource(searchId)
{$.ajax({url:"/ajax/search_source_get_version.php",type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&desktop_id='+desktopId+'&search_source='+searchId,complete:function(xhr)
{$.ajax({url:"/ajax/"+xhr.responseText,type:'POST',data:''});},error:function()
{$("#boxmain .boxcontent").html("");}});}
function togglePrevalue(fieldElement,textPrevalue,event,keepValue)
{if(typeof keepValue=='undefined')keepValue=false;if(event=='focus')
{if(fieldElement.val()==textPrevalue&&fieldElement.is(".search_prevalue"))
{if(!keepValue)
{fieldElement.val("");}
fieldElement.removeClass("search_prevalue");}}
else
{if(fieldElement.val()==""||(keepValue&&fieldElement.val()==textPrevalue))
{fieldElement.val(textPrevalue).addClass("search_prevalue");}}}
function toggleSearchExtraDropdown()
{if($("#window").css("display")=="none")
{windowTop=$("#boxmain").offset().top+$("#boxmain").height()-30;windowLeft=$("#boxmain").offset().left-30;windowWidth=$("#boxmain").width()-100;showWindow('source_dropdown',{shiftup:true,dimensionType:'pixel',top:windowTop,left:windowLeft,width:windowWidth});}
else
{hideWindow();}}
function performSearch(searchTarget)
{if($("#searchtext").val()!=null&&($("#searchtext").val()==''||$("#searchtext").is(".search_prevalue")))
{showAlert({identifier:'errorNoSearchQuery'});return false;}
else
{var dontSubmit=false;var formUrl=$("#search_form").attr("action");$(".dontsubmit").attr("disabled",true);$(".search_prevalue").attr("disabled",true);if(beforeSubmit.length>0)
{for(var i=0,j=beforeSubmit.length;i<j;i++)
{if(typeof beforeSubmit[i]=='function')
{beforeSubmit[i]();}
else
{eval(beforeSubmit[i]);}}}
if(formUrl.indexOf('?')>-1&&$("#search_form").attr("method")=="get")
{dontSubmit=true;$("#search_form input, #search_form select, #search_form textarea").each(function()
{if(!$(this).attr("disabled")&&$(this).attr("name")!=undefined)
{formUrl+='&'+$(this).attr("name")+'='+$(this).val();}});}
if($("#url_rewrite").val()=="1")
{dontSubmit=true;$("#search_form input, #search_form select, #search_form textarea").each(function()
{if(!$(this).attr("disabled")&&$(this).attr("name")!=undefined)
{if(formUrl.indexOf('%'+$(this).attr("name")+'%')>-1)
{if(formUrl.indexOf('baidu.com')>-1){eval('formUrl = formUrl.replace(/%'+$(this).attr("name")+'%/g, $(this).val());');formUrl = 'ribaidu.php?'+formUrl;}else{eval('formUrl = formUrl.replace(/%'+$(this).attr("name")+'%/g, $(this).val());');}}}});}
if($("#search_form").attr("aff_action")!=null)
{var action=$("#search_form").attr("action");var actualUrl=$("#search_form").attr("action")+"?"+$("#search_form").formSerialize();var url=$("#search_form").attr("aff_action");url=url.replace("%FORWARD_URL%",Url.encode(actualUrl));formUrl=url;dontSubmit=true;}
if(!dontSubmit&&$("#search_form").attr("method")=="get")
{formUrl+='?'+$("#search_form").formSerialize();dontSubmit=true;}
if(dontSubmit)
{if(searchTarget=='_parent')
{window.location=formUrl;}
else
{window.open(formUrl,'');}}
if(afterSubmit.length>0)
{for(var i=0,j=afterSubmit.length;i<j;i++)
{if(typeof afterSubmit[i]=='function')
{afterSubmit[i]();}
else
{eval(afterSubmit[i]);}}}
$(".dontsubmit").attr("disabled",false);$(".search_prevalue").attr("disabled",false);trackSubmit();return!dontSubmit;}}
function fillSelectDep(fieldId,optionValue,selectId)
{$.ajax({url:'/ajax/search_select_dep_load.php',data:'locale='+LOCALE+'&language='+LANGUAGE+'&field_id='+fieldId+"&option_value="+optionValue,complete:function(xhr)
{insertSelectOptions(selectId,$("include_file",xhr.responseXML).text());}});}
function trackSubmit()
{var affiliate_program_id=$("#search_form").attr("affiliate_program_id");$.ajax({url:'/ajax/search_submit_stats.php',type:'POST',data:'locale='+LOCALE+'&language='+LANGUAGE+'&search_source='+currentSearchSource+(affiliate_program_id==undefined?"":'&affiliate_program_id='+affiliate_program_id)});}
var menuBarScrollStep=4;var menuBarScrollJumpStep=60;var menuBarScrollSpeed=20;var menuBarScrollCurrent=0;var menuBarScrollTimeout;function menuBarInit()
{var width=0;clearTimeout(menuBarScrollTimeout);$(".bar_menu_item").each(function()
{width+=$(this).width()+14;});width+=$("#desktop_bar_selected_container").width()+25;$("#bar_menu_item_layer").css("width",width+'px');width_used=0;width_used+=26;width_used+=40;width_used+=3;$("#bar_menu_item_container").css("width",($("#desktop").width()-width_used)+"px");if(menuBarScrollCurrent>0)
{menuBarScrollCurrent+=menuBarScrollStep;}
$("#bar_menu_item_container").scrollLeft(menuBarScrollCurrent);if(width>$("#bar_menu_item_container").width())
{$(".move_button_cell").show();$("#desktop_bar_right_end").hide();}
else
{$(".move_button_cell").hide();$("#desktop_bar_right_end").show();}}
function menuBarScroll(direction)
{var scrollJump=$("#bar_menu_item_container").scrollLeft();if(typeof direction=='undefined')direction=0;menuBarScrollCurrent=(direction==1)?scrollJump+menuBarScrollStep:scrollJump-menuBarScrollStep;if(direction==0)
{clearTimeout(menuBarScrollTimeout);}
else
{$("#bar_menu_item_container").scrollLeft(menuBarScrollCurrent);menuBarScrollTimeout=setTimeout(function(){menuBarScroll(direction);},menuBarScrollSpeed);}}
function menuBarScrollJump(direction)
{var scrollJump=$("#bar_menu_item_container").scrollLeft();if(typeof direction=='undefined')direction=0;menuBarScrollCurrent=(direction==1)?scrollJump+menuBarScrollJumpStep:scrollJump-menuBarScrollJumpStep;$("#bar_menu_item_container").scrollLeft(menuBarScrollCurrent);}
function menuBarScrollJumpToItem(previousMenuItems)
{if(previousMenuItems.length==0)
{scrollJump=0;}
else
{var menuItems=previousMenuItems.split(",");var scrollJump=0;for(var i=0,j=menuItems.length;i<j;i++)
{scrollJump+=$("#desktop_link_"+menuItems[i]).width()+13;}
scrollJump-=50;}
$("#bar_menu_item_container").scrollLeft(scrollJump);menuBarScrollCurrent=scrollJump;}
var desktopScrollStep=2;var desktopScrollSpeed=20;var desktopScrollTimeout;var addDesktopGoBackLast="";function desktopScrollInit()
{var width=0;clearTimeout(desktopScrollTimeout);if(desktopScrollCurrent>0)
{desktopScrollCurrent+=desktopScrollStep;}}
function desktopScroll(direction)
{var scrollJump=$("#bar_menu_item_container").scrollLeft();if(typeof direction=='undefined')direction=0;desktopScrollCurrent=(direction==1)?scrollJump+desktopScrollStep:scrollJump-desktopScrollStep;if(direction==0)
{clearTimeout(desktopScrollTimeout);}
else
{$("#bar_menu_item_container").scrollLeft(desktopScrollCurrent);desktopScrollTimeout=setTimeout(function(){desktopScroll(direction);},desktopScrollSpeed);}}
function addDesktopGoBack(){ajaxCall({url:'/window/add_desktop.php',type:'POST',complete:function()
{windowSetCloseButton();}});}
function addDesktopPublishGoBack(){ajaxCall({url:'/ajax/desktop_add.php',type:'POST',data:'desktop_type=publish'});}
function desktopButtonClick()
{if(ajaxBrowse)ajaxBrowse.abort();ajaxBrowse=ajaxCall({url:'/ajax/desktop_add.php',type:'POST',data:'desktop_type='+$(this).attr("rel")});}
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var acListTotal=0;var acListCurrent=-1;var acDelay=500;var acURL=null;var acSearchId=null;var acResultsId=null;var acSearchField=null;var acResultsDiv=null;var acFilter=null;function setAutoComplete(field_id,results_id,get_url,filter){acFilter=filter;acSearchId="#"+field_id;acResultsId="#"+results_id;acURL=get_url;$("body").append('<div id="'+results_id+'"></div>');acSearchField=$(acSearchId);acResultsDiv=$(acResultsId);repositionResultsDiv();acSearchField.attr("autocomplete","off");acSearchField.blur(function(){setTimeout("clearAutoComplete()",200)});acSearchField.keyup(function(e){var keyCode=e.keyCode||window.event.keyCode;var lastVal=acSearchField.val();if(updownArrow(keyCode)){return;}
if(keyCode==13||keyCode==27){clearAutoComplete();return;}
setTimeout(function(){autoComplete(lastVal)},acDelay);});}
function autoComplete(lastValue)
{var part=acSearchField.val();if(part==''){clearAutoComplete();return;}
if(lastValue!=part){return;}
$.getJSON(acURL+part,function(json){var ansLength=acListTotal=json.length;if(ansLength>0){var newData='';for(i=0;i<ansLength;i++){if(this.acFilter!=null)
{var ansvalue=json[i].yy_city.locality;}
else
{var ansvalue=json[i];};newData+='<div class="unselected">'+ansvalue+'</div>';}
acResultsDiv.html(newData);acResultsDiv.css("display","block");var divs=$(acResultsId+" > div");divs.mouseover(function(){divs.each(function(){this.className="unselected";});this.className="selected";})
divs.click(function(){acSearchField.val(this.childNodes[0].nodeValue);clearAutoComplete();});}else{clearAutoComplete();}});}
function clearAutoComplete()
{acResultsDiv.html('');acResultsDiv.css("display","none");}
function repositionResultsDiv()
{var sf_pos=acSearchField.offset();var sf_top=sf_pos.top;var sf_left=sf_pos.left;var sf_height=acSearchField.height();var sf_width=acSearchField.width();acResultsDiv.css("position","absolute");acResultsDiv.css("left",sf_left-2);acResultsDiv.css("top",sf_top+sf_height+5);acResultsDiv.css("width",sf_width-2);}
function updownArrow(keyCode){if(keyCode==40||keyCode==38){if(keyCode==38){if(acListCurrent==0||acListCurrent==-1){acListCurrent=acListTotal-1;}else{acListCurrent--;}}else{if(acListCurrent==acListTotal-1){acListCurrent=0;}else{acListCurrent++;}}
acResultsDiv.children().each(function(i){if(i==acListCurrent){acSearchField.val(this.childNodes[0].nodeValue);this.className="selected";}else{this.className="unselected";}});return true;}else{acListCurrent=-1;return false;}}
var ac2ListTotal=0;var ac2ListCurrent=-1;var acDelay=500;var ac2URL=null;var ac2SearchId=null;var ac2ResultsId=null;var ac2SearchField=null;var ac2ResultsDiv=null;var ac2Filter=null;function setAutoComplete2(field_id,results_id,get_url,filter){ac2Filter=filter;ac2SearchId="#"+field_id;ac2ResultsId="#"+results_id;ac2URL=get_url;$("body").append('<div id="'+results_id+'"></div>');ac2SearchField=$(ac2SearchId);ac2ResultsDiv=$(ac2ResultsId);repositionResultsDiv2();ac2SearchField.attr("autocomplete","off");ac2SearchField.blur(function(){setTimeout("clearAutoComplete2()",200)});ac2SearchField.keyup(function(e){var keyCode=e.keyCode||window.event.keyCode;var lastVal=ac2SearchField.val();if(updownArrow2(keyCode)){return;}
if(keyCode==13||keyCode==27){clearAutoComplete2();return;}
setTimeout(function(){autoComplete2(lastVal)},acDelay);});}
function autoComplete2(lastValue)
{var part=ac2SearchField.val();if(part==''){clearAutoComplete2();return;}
if(lastValue!=part){return;}
$.getJSON(ac2URL+part,function(json){var ansLength=ac2ListTotal=json.length;if(ansLength>0){var newData='';for(i=0;i<ansLength;i++){if(ac2Filter==null)
{var ansvalue=json[i];}
else
{var ansvalue=json[i].yy_city.locality;}
newData+='<div class="unselected">'+ansvalue+'</div>';}
ac2ResultsDiv.html(newData);ac2ResultsDiv.css("display","block");var divs=$(ac2ResultsId+" > div");divs.mouseover(function(){divs.each(function(){this.className="unselected";});this.className="selected";})
divs.click(function(){ac2SearchField.val(this.childNodes[0].nodeValue);clearAutoComplete2();});}else{clearAutoComplete2();}});}
function clearAutoComplete2()
{ac2ResultsDiv.html('');ac2ResultsDiv.css("display","none");}
function repositionResultsDiv2()
{var sf_pos=ac2SearchField.offset();var sf_top=sf_pos.top;var sf_left=sf_pos.left;var sf_height=ac2SearchField.height();var sf_width=ac2SearchField.width();ac2ResultsDiv.css("position","absolute");ac2ResultsDiv.css("left",sf_left-2);ac2ResultsDiv.css("top",sf_top+sf_height+5);ac2ResultsDiv.css("width",sf_width-2);}
function updownArrow2(keyCode){if(keyCode==40||keyCode==38){if(keyCode==38){if(ac2ListCurrent==0||ac2ListCurrent==-1){ac2ListCurrent=ac2ListTotal-1;}else{ac2ListCurrent--;}}else{if(ac2ListCurrent==ac2ListTotal-1){ac2ListCurrent=0;}else{ac2ListCurrent++;}}
ac2ResultsDiv.children().each(function(i){if(i==ac2ListCurrent){ac2SearchField.val(this.childNodes[0].nodeValue);this.className="selected";}else{this.className="unselected";}});return true;}else{ac2ListCurrent=-1;return false;}}
jQuery.fxCheckTag=function(e)
{if(/^tr$|^td$|^tbody$|^caption$|^thead$|^tfoot$|^col$|^colgroup$|^th$|^body$|^header$|^script$|^frame$|^frameset$|^option$|^optgroup$|^meta$/i.test(e.nodeName))
return false;else
return true;};jQuery.fx.destroyWrapper=function(e,old)
{var c=e.firstChild;var cs=c.style;cs.position=old.position;cs.marginTop=old.margins.t;cs.marginLeft=old.margins.l;cs.marginBottom=old.margins.b;cs.marginRight=old.margins.r;cs.top=old.top+'px';cs.left=old.left+'px';e.parentNode.insertBefore(c,e);e.parentNode.removeChild(e);};jQuery.fx.buildWrapper=function(e)
{if(!jQuery.fxCheckTag(e))
return false;var t=jQuery(e);var es=e.style;var restoreStyle=false;if(t.css('display')=='none'){oldVisibility=t.css('visibility');t.css('visibility','hidden').show();restoreStyle=true;}
var oldStyle={};oldStyle.position=t.css('position');oldStyle.sizes=jQuery.iUtil.getSize(e);oldStyle.margins=jQuery.iUtil.getMargins(e);var oldFloat=e.currentStyle?e.currentStyle.styleFloat:t.css('float');oldStyle.top=parseInt(t.css('top'))||0;oldStyle.left=parseInt(t.css('left'))||0;var wid='w_'+parseInt(Math.random()*10000);var wr=document.createElement(/^img$|^br$|^input$|^hr$|^select$|^textarea$|^object$|^iframe$|^button$|^form$|^table$|^ul$|^dl$|^ol$/i.test(e.nodeName)?'div':e.nodeName);jQuery.attr(wr,'id',wid);var wrapEl=jQuery(wr).addClass('fxWrapper');var wrs=wr.style;var top=0;var left=0;if(oldStyle.position=='relative'||oldStyle.position=='absolute'){top=oldStyle.top;left=oldStyle.left;}
wrs.top=top+'px';wrs.left=left+'px';wrs.position=oldStyle.position!='relative'&&oldStyle.position!='absolute'?'relative':oldStyle.position;wrs.height=oldStyle.sizes.hb+'px';wrs.width=oldStyle.sizes.wb+'px';wrs.marginTop=oldStyle.margins.t;wrs.marginRight=oldStyle.margins.r;wrs.marginBottom=oldStyle.margins.b;wrs.marginLeft=oldStyle.margins.l;wrs.overflow='hidden';if(jQuery.browser.msie){wrs.styleFloat=oldFloat;}else{wrs.cssFloat=oldFloat;}
if(jQuery.browser=="msie"){es.filter="alpha(opacity="+0.999*100+")";}
es.opacity=0.999;e.parentNode.insertBefore(wr,e);wr.appendChild(e);es.marginTop='0px';es.marginRight='0px';es.marginBottom='0px';es.marginLeft='0px';es.position='absolute';es.listStyle='none';es.top='0px';es.left='0px';if(restoreStyle){t.hide();es.visibility=oldVisibility;}
return{oldStyle:oldStyle,wrapper:jQuery(wr)};};jQuery.fx.namedColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};jQuery.fx.parseColor=function(color,notColor)
{if(jQuery.fx.namedColors[color])
return{r:jQuery.fx.namedColors[color][0],g:jQuery.fx.namedColors[color][1],b:jQuery.fx.namedColors[color][2]};else if(result=/^rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)$/.exec(color))
return{r:parseInt(result[1]),g:parseInt(result[2]),b:parseInt(result[3])};else if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)$/.exec(color))
return{r:parseFloat(result[1])*2.55,g:parseFloat(result[2])*2.55,b:parseFloat(result[3])*2.55};else if(result=/^#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/.exec(color))
return{r:parseInt("0x"+result[1]+result[1]),g:parseInt("0x"+result[2]+result[2]),b:parseInt("0x"+result[3]+result[3])};else if(result=/^#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/.exec(color))
return{r:parseInt("0x"+result[1]),g:parseInt("0x"+result[2]),b:parseInt("0x"+result[3])};else
return notColor==true?false:{r:255,g:255,b:255};};jQuery.fx.cssProps={borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:1,borderTopWidth:1,bottom:1,fontSize:1,height:1,left:1,letterSpacing:1,lineHeight:1,marginBottom:1,marginLeft:1,marginRight:1,marginTop:1,maxHeight:1,maxWidth:1,minHeight:1,minWidth:1,opacity:1,outlineOffset:1,outlineWidth:1,paddingBottom:1,paddingLeft:1,paddingRight:1,paddingTop:1,right:1,textIndent:1,top:1,width:1,zIndex:1};jQuery.fx.colorCssProps={backgroundColor:1,borderBottomColor:1,borderLeftColor:1,borderRightColor:1,borderTopColor:1,color:1,outlineColor:1};jQuery.fx.cssSides=['Top','Right','Bottom','Left'];jQuery.fx.cssSidesEnd={'borderWidth':['border','Width'],'borderColor':['border','Color'],'margin':['margin',''],'padding':['padding','']};jQuery.fn.extend({animate:function(prop,speed,easing,callback){return this.queue(function(){var opt=jQuery.speed(speed,easing,callback);var e=new jQuery.fxe(this,opt,prop);});},pause:function(speed,callback){return this.queue(function(){var opt=jQuery.speed(speed,callback);var e=new jQuery.pause(this,opt);});},stop:function(step){return this.each(function(){if(this.animationHandler)
jQuery.stopAnim(this,step);});},stopAll:function(step){return this.each(function(){if(this.animationHandler)
jQuery.stopAnim(this,step);if(this.queue&&this.queue['fx'])
this.queue.fx=[];});}});jQuery.extend({pause:function(elem,options)
{var z=this,values;z.step=function()
{if(jQuery.isFunction(options.complete))
options.complete.apply(elem);};z.timer=setInterval(function(){z.step();},options.duration);elem.animationHandler=z;},easing:{linear:function(p,n,firstNum,delta,duration){return((-Math.cos(p*Math.PI)/2)+0.5)*delta+firstNum;}},fxe:function(elem,options,prop){var z=this,values;var y=elem.style;var oldOverflow=jQuery.css(elem,"overflow");var oldDisplay=jQuery.css(elem,"display");var props={};z.startTime=(new Date()).getTime();options.easing=options.easing&&jQuery.easing[options.easing]?options.easing:'linear';z.getValues=function(tp,vp)
{if(jQuery.fx.cssProps[tp]){if(vp=='show'||vp=='hide'||vp=='toggle'){if(!elem.orig)elem.orig={};var r=parseFloat(jQuery.curCSS(elem,tp));elem.orig[tp]=r&&r>-10000?r:(parseFloat(jQuery.css(elem,tp))||0);vp=vp=='toggle'?(oldDisplay=='none'?'show':'hide'):vp;options[vp]=true;props[tp]=vp=='show'?[0,elem.orig[tp]]:[elem.orig[tp],0];if(tp!='opacity')
y[tp]=props[tp][0]+(tp!='zIndex'&&tp!='fontWeight'?'px':'');else
jQuery.attr(y,"opacity",props[tp][0]);}else{props[tp]=[parseFloat(jQuery.curCSS(elem,tp)),parseFloat(vp)||0];}}else if(jQuery.fx.colorCssProps[tp])
props[tp]=[jQuery.fx.parseColor(jQuery.curCSS(elem,tp)),jQuery.fx.parseColor(vp)];else if(/^margin$|padding$|border$|borderColor$|borderWidth$/i.test(tp)){var m=vp.replace(/\s+/g,' ').replace(/rgb\s*\(\s*/g,'rgb(').replace(/\s*,\s*/g,',').replace(/\s*\)/g,')').match(/([^\s]+)/g);switch(tp){case'margin':case'padding':case'borderWidth':case'borderColor':m[3]=m[3]||m[1]||m[0];m[2]=m[2]||m[0];m[1]=m[1]||m[0];for(var i=0;i<jQuery.fx.cssSides.length;i++){var nmp=jQuery.fx.cssSidesEnd[tp][0]+jQuery.fx.cssSides[i]+jQuery.fx.cssSidesEnd[tp][1];props[nmp]=tp=='borderColor'?[jQuery.fx.parseColor(jQuery.curCSS(elem,nmp)),jQuery.fx.parseColor(m[i])]:[parseFloat(jQuery.curCSS(elem,nmp)),parseFloat(m[i])];}
break;case'border':for(var i=0;i<m.length;i++){var floatVal=parseFloat(m[i]);var sideEnd=!isNaN(floatVal)?'Width':(!/transparent|none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset/i.test(m[i])?'Color':false);if(sideEnd){for(var j=0;j<jQuery.fx.cssSides.length;j++){nmp='border'+jQuery.fx.cssSides[j]+sideEnd;props[nmp]=sideEnd=='Color'?[jQuery.fx.parseColor(jQuery.curCSS(elem,nmp)),jQuery.fx.parseColor(m[i])]:[parseFloat(jQuery.curCSS(elem,nmp)),floatVal];}}else{y['borderStyle']=m[i];}}
break;}}else{y[tp]=vp;}
return false;};for(p in prop){if(p=='style'){var newStyles=jQuery.parseStyle(prop[p]);for(np in newStyles){this.getValues(np,newStyles[np]);}}else if(p=='className'){if(document.styleSheets)
for(var i=0;i<document.styleSheets.length;i++){var cssRules=document.styleSheets[i].cssRules||document.styleSheets[i].rules||null;if(cssRules){for(var j=0;j<cssRules.length;j++){if(cssRules[j].selectorText=='.'+prop[p]){var rule=new RegExp('\.'+prop[p]+' {');var styles=cssRules[j].style.cssText;var newStyles=jQuery.parseStyle(styles.replace(rule,'').replace(/}/g,''));for(np in newStyles){this.getValues(np,newStyles[np]);}}}}}}else{this.getValues(p,prop[p]);}}
y.display=oldDisplay=='none'?'block':oldDisplay;y.overflow='hidden';z.step=function(){var t=(new Date()).getTime();if(t>options.duration+z.startTime){clearInterval(z.timer);z.timer=null;for(p in props){if(p=="opacity")
jQuery.attr(y,"opacity",props[p][1]);else if(typeof props[p][1]=='object')
y[p]='rgb('+props[p][1].r+','+props[p][1].g+','+props[p][1].b+')';else
y[p]=props[p][1]+(p!='zIndex'&&p!='fontWeight'?'px':'');}
if(options.hide||options.show)
for(var p in elem.orig)
if(p=="opacity")
jQuery.attr(y,p,elem.orig[p]);else
y[p]="";y.display=options.hide?'none':(oldDisplay!='none'?oldDisplay:'block');y.overflow=oldOverflow;elem.animationHandler=null;if(jQuery.isFunction(options.complete))
options.complete.apply(elem);}else{var n=t-this.startTime;var pr=n/options.duration;for(p in props){if(typeof props[p][1]=='object'){y[p]='rgb('
+parseInt(jQuery.easing[options.easing](pr,n,props[p][0].r,(props[p][1].r-props[p][0].r),options.duration))
+','
+parseInt(jQuery.easing[options.easing](pr,n,props[p][0].g,(props[p][1].g-props[p][0].g),options.duration))
+','
+parseInt(jQuery.easing[options.easing](pr,n,props[p][0].b,(props[p][1].b-props[p][0].b),options.duration))
+')';}else{var pValue=jQuery.easing[options.easing](pr,n,props[p][0],(props[p][1]-props[p][0]),options.duration);if(p=="opacity")
jQuery.attr(y,"opacity",pValue);else
y[p]=pValue+(p!='zIndex'&&p!='fontWeight'?'px':'');}}}};z.timer=setInterval(function(){z.step();},13);elem.animationHandler=z;},stopAnim:function(elem,step)
{if(step)
elem.animationHandler.startTime-=100000000;else{window.clearInterval(elem.animationHandler.timer);elem.animationHandler=null;jQuery.dequeue(elem,"fx");}}});jQuery.parseStyle=function(styles){var newStyles={};if(typeof styles=='string'){styles=styles.toLowerCase().split(';');for(var i=0;i<styles.length;i++){rule=styles[i].split(':');if(rule.length==2){newStyles[jQuery.trim(rule[0].replace(/\-(\w)/g,function(m,c){return c.toUpperCase();}))]=jQuery.trim(rule[1]);}}}
return newStyles;};jQuery.fn.extend({ScrollTo:function(speed,axis,easing){o=jQuery.speed(speed);return this.queue('interfaceFX',function(){new jQuery.fx.ScrollTo(this,o,axis,easing);});},ScrollToAnchors:function(speed,axis,easing){return this.each(function()
{jQuery('a[@href*="#"]',this).click(function(e)
{parts=this.href.split('#');jQuery('#'+parts[1]).ScrollTo(speed,axis,easing);return false;});})}});jQuery.fx.ScrollTo=function(e,o,axis,easing)
{var z=this;z.o=o;z.e=e;z.axis=/vertical|horizontal/.test(axis)?axis:false;z.easing=easing;p=jQuery.iUtil.getPosition(e);s=jQuery.iUtil.getScroll();z.clear=function(){clearInterval(z.timer);z.timer=null;jQuery.dequeue(z.e,'interfaceFX');};z.t=(new Date).getTime();s.h=s.h>s.ih?(s.h-s.ih):s.h;s.w=s.w>s.iw?(s.w-s.iw):s.w;z.endTop=p.y>s.h?s.h:p.y;z.endLeft=p.x>s.w?s.w:p.x;z.startTop=s.t;z.startLeft=s.l;z.step=function(){var t=(new Date).getTime();var n=t-z.t;var p=n/z.o.duration;if(t>=z.o.duration+z.t){z.clear();setTimeout(function(){z.scroll(z.endTop,z.endLeft)},13);}else{if(!z.axis||z.axis=='vertical'){if(!jQuery.easing||!jQuery.easing[z.easing]){st=((-Math.cos(p*Math.PI)/2)+0.5)*(z.endTop-z.startTop)+z.startTop;}else{st=jQuery.easing[z.easing](p,n,z.startTop,(z.endTop-z.startTop),z.o.duration);}}else{st=z.startTop;}
if(!z.axis||z.axis=='horizontal'){if(!jQuery.easing||!jQuery.easing[z.easing]){sl=((-Math.cos(p*Math.PI)/2)+0.5)*(z.endLeft-z.startLeft)+z.startLeft;}else{sl=jQuery.easing[z.easing](p,n,z.startLeft,(z.endLeft-z.startLeft),z.o.duration);}}else{sl=z.startLeft;}
z.scroll(st,sl);}};z.scroll=function(t,l){window.scrollTo(l,t);};z.timer=setInterval(function(){z.step();},13);};jQuery.iUtil={getPosition:function(e)
{var x=0;var y=0;var es=e.style;var restoreStyles=false;if(jQuery(e).css('display')=='none'){var oldVisibility=es.visibility;var oldPosition=es.position;restoreStyles=true;es.visibility='hidden';es.display='block';es.position='absolute';}
var el=e;while(el){x+=el.offsetLeft+(el.currentStyle&&!jQuery.browser.opera?parseInt(el.currentStyle.borderLeftWidth)||0:0);y+=el.offsetTop+(el.currentStyle&&!jQuery.browser.opera?parseInt(el.currentStyle.borderTopWidth)||0:0);el=el.offsetParent;}
el=e;while(el&&el.tagName&&el.tagName.toLowerCase()!='body')
{x-=el.scrollLeft||0;y-=el.scrollTop||0;el=el.parentNode;}
if(restoreStyles==true){es.display='none';es.position=oldPosition;es.visibility=oldVisibility;}
return{x:x,y:y};},getPositionLite:function(el)
{var x=0,y=0;while(el){x+=el.offsetLeft||0;y+=el.offsetTop||0;el=el.offsetParent;}
return{x:x,y:y};},getSize:function(e)
{var w=jQuery.css(e,'width');var h=jQuery.css(e,'height');var wb=0;var hb=0;var es=e.style;if(jQuery(e).css('display')!='none'){wb=e.offsetWidth;hb=e.offsetHeight;}else{var oldVisibility=es.visibility;var oldPosition=es.position;es.visibility='hidden';es.display='block';es.position='absolute';wb=e.offsetWidth;hb=e.offsetHeight;es.display='none';es.position=oldPosition;es.visibility=oldVisibility;}
return{w:w,h:h,wb:wb,hb:hb};},getSizeLite:function(el)
{return{wb:el.offsetWidth||0,hb:el.offsetHeight||0};},getClient:function(e)
{var h,w,de;if(e){w=e.clientWidth;h=e.clientHeight;}else{de=document.documentElement;w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;}
return{w:w,h:h};},getScroll:function(e)
{var t=0,l=0,w=0,h=0,iw=0,ih=0;if(e&&e.nodeName.toLowerCase()!='body'){t=e.scrollTop;l=e.scrollLeft;w=e.scrollWidth;h=e.scrollHeight;iw=0;ih=0;}else{if(document.documentElement){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight;}else if(document.body){t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight;}
iw=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;ih=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;}
return{t:t,l:l,w:w,h:h,iw:iw,ih:ih};},getMargins:function(e,toInteger)
{var el=jQuery(e);var t=el.css('marginTop')||'';var r=el.css('marginRight')||'';var b=el.css('marginBottom')||'';var l=el.css('marginLeft')||'';if(toInteger)
return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else
return{t:t,r:r,b:b,l:l};},getPadding:function(e,toInteger)
{var el=jQuery(e);var t=el.css('paddingTop')||'';var r=el.css('paddingRight')||'';var b=el.css('paddingBottom')||'';var l=el.css('paddingLeft')||'';if(toInteger)
return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)};else
return{t:t,r:r,b:b,l:l};},getBorder:function(e,toInteger)
{var el=jQuery(e);var t=el.css('borderTopWidth')||'';var r=el.css('borderRightWidth')||'';var b=el.css('borderBottomWidth')||'';var l=el.css('borderLeftWidth')||'';if(toInteger)
return{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)||0};else
return{t:t,r:r,b:b,l:l};},getPointer:function(event)
{var x=event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))||0;var y=event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop))||0;return{x:x,y:y};},traverseDOM:function(nodeEl,func)
{func(nodeEl);nodeEl=nodeEl.firstChild;while(nodeEl){jQuery.iUtil.traverseDOM(nodeEl,func);nodeEl=nodeEl.nextSibling;}},purgeEvents:function(nodeEl)
{jQuery.iUtil.traverseDOM(nodeEl,function(el)
{for(var attr in el){if(typeof el[attr]==='function'){el[attr]=null;}}});},centerEl:function(el,axis)
{var clientScroll=jQuery.iUtil.getScroll();var windowSize=jQuery.iUtil.getSize(el);if(!axis||axis=='vertically')
jQuery(el).css({top:clientScroll.t+((Math.max(clientScroll.h,clientScroll.ih)-clientScroll.t-windowSize.hb)/2)+'px'});if(!axis||axis=='horizontally')
jQuery(el).css({left:clientScroll.l+((Math.max(clientScroll.w,clientScroll.iw)-clientScroll.l-windowSize.wb)/2)+'px'});},fixPNG:function(el,emptyGIF){var images=jQuery('img[@src*="png"]',el||document),png;images.each(function(){png=this.src;this.src=emptyGIF;this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+png+"')";});}};[].indexOf||(Array.prototype.indexOf=function(v,n){n=(n==null)?0:n;var m=this.length;for(var i=n;i<m;i++)
if(this[i]==v)
return i;return-1;});addicon_root_url="http://dev.symbaloo.com";function $o(elementId){return document.getElementById(elementId);}
function $v(elementId){if(document.getElementById(elementId).value){return document.getElementById(elementId).value;}else{return"";}}
function $l(elementId){if(document.getElementById(elementId).value.length){return document.getElementById(elementId).value.length;}else{return 0;}}
function setDisplay(element){switch(element.id){case"display_button":$o("display_image").disabled=false;if($o("display_image").value==""){$o("display_image_custom").style.display="";$o("display_image_custom").disabled=false;}
$o("link_label").disabled=true;genCheckLinkLabel();break;case"display_link":$o("display_image").disabled=true;$o("display_image_custom").style.display="none";$o("link_label").disabled=false;genCheckImageCustom();break;}}
function setDisplayImage(element){switch(element.value){case"":$o("display_image_custom").style.display="";$o("display_image_custom").disabled=false;break;default:$o("display_image_custom").style.display="none";$o("display_image_custom").disabled=true;break;}
genCheckImageCustom();}
function genSetFieldState(id,state){check=$o(id+"_check");uncheck=$o(id+"_uncheck");switch(state){case"clear":check.style.display="none";uncheck.style.display="none";$o(id).className="";break;case true:check.style.display="";uncheck.style.display="none";$o(id).className="";break;case false:check.style.display="none";uncheck.style.display="";$o(id).className="error";break;}}
function generate(){if(!genCheckAll()){return false};var image=escape($v("image")).replace(/\+/g,"%2B");var turl=escape($v("url")).replace(/\+/g,"%2B");var str="<a href=\""+addicon_root_url+"/"+$v("country")+"/add/";str+="url="+turl+"&title="+escape($v("title"));if($o("type_rss").checked==true)str+="&type=rss";if($l("image")>0)str+="&icon="+image;str+="\" target=\"_blank\">";if($o("display_button").checked==true){str+="<img border=0 src=\"";if($o("display_image").value==""){str+=$v("display_image_custom");}else{str+=$v("display_image");}
str+="\" />";}else{str+=$v("link_label");}
str+="</a>";showResult(str);showExample(str);$o("example_icon").style.display="";$o("example_html").style.display="";}
function showResult(result){$o("result").value=result;}
function showExample(result){$o("example").innerHTML=result;}
function genCheckURL(){element=$o("url");addScheme(element);valuecheck=element.value.match(/^(http|https|mms|ftp):\/\/.+$/i)?true:false;genSetFieldState(element.id,valuecheck);return valuecheck;}
function genCheckImage(){element=$o("image");addScheme(element);valuecheck=(element.value.length==0)||(element.value.match(/^(http|https|mms|ftp):\/\//i)?true:false);genSetFieldState(element.id,valuecheck);return valuecheck;}
function genCheckImageCustom(){element=$o("display_image_custom");addScheme(element);if(!element.disabled&&element.style.display==""){valuecheck=($l("display_image")>0)||(element.value.match(/^(http|https|mms|ftp):\/\/.+$/i)?true:false)
genSetFieldState(element.id,valuecheck);return valuecheck;}else{genSetFieldState(element.id,"clear");return true;}}
function genCheckTitle(){element=$o("title");valuecheck=(element&&element.value&&element.value.length>0);genSetFieldState(element.id,valuecheck);return valuecheck;}
function genCheckLinkLabel(){element=$o("link_label");if(!element.disabled){valuecheck=(element&&element.value&&element.value.length>0);genSetFieldState(element.id,valuecheck);return valuecheck;}else{genSetFieldState(element.id,"clear");return true;}}
function genCheckAll(){valid=true;valid=valid&&genCheckURL();valid=valid&&genCheckImage();valid=valid&&genCheckImageCustom();valid=valid&&genCheckTitle();return valid;}
function addScheme(element){if(element.value.length>0&&!element.value.match(/^(http|https|mms|ftp):\/\//)){element.value="http://"+element.value;}}
function addPendingIconStep(gotoStep,action)
{if(typeof action=="undefined")action="";switch(gotoStep)
{case 1:$("#add_pending_icon_links_example_content").css("background-image","url('http://static01.symbaloo.com/images/loading_image_000000.gif')");$(".add_pending_icon_links_step").hide();$("#add_pending_icon_links_step_1").show();break;case 2:switch(true){case!checkAll():break;default:switch(action){case'before_submit':$("#add_pending_icon_links_wait").show();$("#form_add_pending_icon_image_links").submit();break;case'after_submit':filepath="/ajax/explorer_add_pending_icon_show_image.php?uniquekey="+Math.random();$("#add_pending_icon_links_example_content").css("background-image","url('"+filepath+"')");$("#add_pending_icon_links_wait").hide();$("#add_pending_icon_button_next").hide();$("#addPendingIconStep2").fadeIn(200);break;case'error':$("#add_pending_icon_"+explorerLastTab+"_wait").hide();showAlert({identifier:'formAddMenuErrorUploadTimeout'});case'set_full':if($("#add_pending_icon_links_scale").attr("checked")){$("#add_pending_icon_links_height").attr("disabled","disabled");$("#add_pending_icon_links_width").attr("disabled","disabled");}else{$("#add_pending_icon_links_height").removeAttr("disabled");$("#add_pending_icon_links_width").removeAttr("disabled");}
addPendingIconStep(2,'refresh');break;case'set_label':if($("#add_pending_icon_links_showlabel").attr("checked")){$("#add_pending_icon_links_example_content_text").text($("#add_pending_icon_links_title").val());}else{$("#add_pending_icon_links_example_content_text").text("");}
break;case'refresh':$("#img_full").val(($("#add_pending_icon_links_scale").attr("checked"))?"1":"0");$("#img_height").val($("#add_pending_icon_links_height").val());$("#img_width").val($("#add_pending_icon_links_width").val());$("#add_pending_icon_links_example_content").css("background-image","url('http://static01.symbaloo.com/images/loading_image_000000.gif')");$("#form_add_pending_icon_image_links").submit();break;default:$(".add_pending_icon_links_step").hide();$("#add_pending_icon_links_step_2").show();}}
break;case 3:if($("#add_pending_icon_links_showlabel").attr("checked")){$("#add_pending_icon_links_example_content_text").text($("#add_pending_icon_links_title").val());}else{$("#add_pending_icon_links_example_content_text").text("");}
break;case 4:$("#add_pending_icon_links_title_save").val($("#add_pending_icon_links_title").val());$("#add_pending_icon_links_label_save").val($("#add_pending_icon_links_title").val());$("#add_pending_icon_links_showlabel_save").val(($("#add_pending_icon_links_showlabel").attr("checked"))?1:0);$("#add_pending_icon_links_url_save").val($("#add_pending_icon_links_url").val());$("#add_pending_icon_links_email_save").val($("#add_pending_icon_links_email").val());break;case 5:window.location="/"+LOCALE+"/addtosymbaloo_succes";break;case-1:$("#add_pending_icon_links_wait").hide();newidentifier=(action.length>0)?action:'errAddPendingIcon';showAlert({identifier:newidentifier,icon:'error'});break;default:$("#add_pending_icon_links_example_content").css("background-image","none");}}
function submitAddPendingIconUploadImageForm(form)
{$(form).ajaxSubmit({url:'/ajax/explorer_add_pending_icon_upload_image.php?locale='+LOCALE+'&language='+LANGUAGE,type:'post',timeout:90000,complete:function(xhr)
{if(xhr.responseXML==null)
{addPendingIconStep(-1,"errAddPendingIconUpload");}
else
{result=$("result",xhr.responseXML).text();contentType=$("content_type",xhr.responseXML).text();imageFilePath=$("image_file_path",xhr.responseXML).text();returnMessage=$("return_message",xhr.responseXML).text();img_width=$("img_width",xhr.responseXML).text();img_height=$("img_height",xhr.responseXML).text();$("#add_pending_icon_links_height").val(img_height);$("#add_pending_icon_links_width").val(img_width);$("#add_pending_icon_link_wait").hide();if(result=="success")
{addPendingIconStep(2,'after_submit');}
else
{var newidentifier=(returnMessage.length>0)?returnMessage:'errAddPendingIconUpload';addPendingIconStep(-1,newidentifier);}}}});return false;}
function submitAddPendingIconUploadSaveForm(form){if(!checkAll())return false;addPendingIconStep(4,null);$(form).ajaxSubmit({url:'/ajax/explorer_add_pending_icon.php?locale='+LOCALE+'&amp;language='+LANGUAGE,type:'post',clearForm:true,complete:function(xhr)
{result=$("result",xhr.responseXML).text();returnMessage=$("return_message",xhr.responseXML).text();if(result=="success"){addPendingIconStep(5,null);}else{var newidentifier=(returnMessage.length>0)?returnMessage:'errAddPendingIconSave';addPendingIconStep(-1,newidentifier);}}});return false;}
function checkAll(){switch(true){case!checkTitle():showAlert({identifier:'errAddPendingIconTitle',icon:'error'});break;case!checkURL():showAlert({identifier:'errAddPendingIconURL',icon:'error'});break;case!checkFile():showAlert({identifier:'errAddPendingIconFile',icon:'error'});break;case!checkEmail():showAlert({identifier:'errAddPendingIconEmail',icon:'error'});break;default:return true;}
return false;}
function checkTitle(){var result=($("#add_pending_icon_links_title").val().length>0);setFieldState('#add_pending_icon_links_title',result)
return result;}
function checkURL(){var result=($("#add_pending_icon_links_url").val().match(/^(http|https|mms|ftp):\/\/.+/)!=null);setFieldState('#add_pending_icon_links_url',result)
return result;}
function checkFile(){var result=($("#add_pending_icon_links_file").val().length>0)
setFieldState('#add_pending_icon_links_file',result)
return result;}
function checkEmail(){var result=($("#add_pending_icon_links_email").val().match(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/gi)!=null);setFieldState('#add_pending_icon_links_email',result)
return result;}
function setFieldState(id,state){check=id+"_check";uncheck=id+"_uncheck";switch(state){case"clear":$(check).hide();$(uncheck).hide();$(id).removeClass("error");break;case true:$(check).show();$(uncheck).hide();$(id).removeClass("error");break;case false:$(check).hide();$(uncheck).show();$(id).addClass("error");break;}}