








 



var mobilAna="mobil.ito.org.tr";
function showLan() {
	var Lng = document.getElementById("Lng");
	Lng.style.display = "none";
}

function hideLan() {
	var Lng = document.getElementById("Lng");
	Lng.style.display = "";
}

function formatSpot(spotId,limit) 
{ 
    var text=document.getElementById(spotId).innerHTML; 
	var length= text.length; 
    if(length > limit) 
    { 
        text = text.substring(0,limit); 
        var lastSpace = text.lastIndexOf(' '); 
        text = text.substring(0,lastSpace); 
        // eğer sondan bir önceki karakter . , veya ; ise onu da dışarıda bırakıyor. 
        if(text.charAt(lastSpace-1) == ',' || text.charAt(lastSpace-1) == ';' || text.charAt(lastSpace-1) == '.')  
        { 
            text = text.substring(0,lastSpace-1); 
        } 
        document.getElementById(spotId).innerHTML = text+"..."; 
    }     
 
}
function fixUrlAnasayfaMenu(urlStr){
	index = urlStr.indexOf("ito_portal_tr/ito-portal");
	WCM_GLOBAL_CONTEXT=urlStr.substring(index,urlStr.length);
	
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/gazete-detay?WCM_GLOBAL_CONTEXT=" + WCM_GLOBAL_CONTEXT;
	
	redirectUrl(urlStr);
	
} 
function fixUrlMobilAnasayfa()
{
    var domaiN=document.domain;
	
	if(domaiN.indexOf("test")>-1)
	{
			urlStr = "http://"+domaiN+":10040/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal");
			document.write("<a href='"+ urlStr+ "' class=BeyazLink>");
	}
	else if(domaiN.indexOf("213")>-1)
	{
			urlStr = "http://"+domaiN+"/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/mobil";
			document.write("<a href='"+ urlStr+ "' class=BeyazLink>");
	}else if(domaiN.indexOf("ito.org.tr")>-1) 
	{
		urlStr = "http://"+mobilAna+"/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal");
		document.write("<a href='"+ urlStr+ "' class=BeyazLink>");
}
}



function printFmtSpot(spotId,limit){ 
	formatSpot(spotId,limit); 
	document.writeln(document.getElementById(spotId).innerHTML); 
}

function createWCMHref(url,target){
	var portal="/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal");
	var index = url.indexOf("WCM_GLOBAL_CONTEXT");
	var WCM_GLOBAL_CONTEXT=url.substring(index,url.length);
	var urlStr=portal+target+"?"+WCM_GLOBAL_CONTEXT;
	
	document.write("<a href='"+ urlStr+ "'>");
	
	
}
function fixUrl(urlStr){
	index = urlStr.indexOf("ito_portal_tr/ito-portal");
	WCM_GLOBAL_CONTEXT=urlStr.substring(index,urlStr.length);
	
	if (urlStr.indexOf("/ito_portal_tr/ito-portal/gazete")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/gazete-detay?WCM_GLOBAL_CONTEXT=" + WCM_GLOBAL_CONTEXT;
	}else if (urlStr.indexOf("/ito_portal_tr/ito-portal/duyurular")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/duyurular?WCM_GLOBAL_CONTEXT=" + WCM_GLOBAL_CONTEXT;
	}else if (urlStr.indexOf("/ito_portal_tr/ito-portal/etkinlikler")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/etkinlikler?WCM_GLOBAL_CONTEXT=" + WCM_GLOBAL_CONTEXT;
	}else if (urlStr.indexOf("sisa")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/" + urlStr.substring(urlStr.indexOf("sisa-")+5,urlStr.length);
	}else if (urlStr.indexOf("/ito_portal_tr/ito-portal/vidyo")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/video-haberler/video-haber?WCM_GLOBAL_CONTEXT=" + WCM_GLOBAL_CONTEXT;
	}
	else if (urlStr.indexOf("/ito_portal_tr/ito-portal/mk-haberler")>-1){
		var parts=WCM_GLOBAL_CONTEXT.split("/");
                var komite=parts[parts.length-2].split("-");
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/komiteler/duyuru-detay?WCM_GLOBAL_CONTEXT=" + WCM_GLOBAL_CONTEXT+"&prmKomiteId="+komite[2]+"&initView=true&komite="+komite[2];

	}
	
	document.write("<a href='"+ urlStr+ "'>");
}

function removeWGC(url){
                var uri=url.split("?");
                url=uri[0]+"?";
                var params=uri[1].split("&");
                var i=0;
                for (i=0;i<params.length;i++)
                {
                    if (params[i].indexOf("WCM_GLOBAL_CONTEXT")>-1)
                        continue;
                    url+=params[i];
                    if (i!=params.length-1)
                        url+="&";
                }
                return url;
            }
function writeWcmHref(wcm_global_context,title){
	urlStr="";
	url=removeWGC(location.href);
	urlStr =   url+(url.indexOf("?")>-1?"&":"?") +"WCM_GLOBAL_CONTEXT=" + wcm_global_context;

	document.write("<a href='"+ urlStr+ "'>");		
	document.write(title);
	document.write("</a>");
}
function fixWCMUrl(contentName,title){
	urlStr="";
	if (document.location.href.indexOf("/odamiz")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/odamiz?WCM_GLOBAL_CONTEXT=" + contentName;
	}else if (document.location.href.indexOf("/kutuphanemiz")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/kutuphanemiz?WCM_GLOBAL_CONTEXT=" + contentName;
	}else if (document.location.href.indexOf("/vize")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/vize?WCM_GLOBAL_CONTEXT=" + contentName;
	}
	else if (document.location.href.indexOf("/arastirma-uygulama")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/arastirma-uygulama?WCM_GLOBAL_CONTEXT=" + contentName;
	}
	else if (document.location.href.indexOf("/tahkim-tuketici-koruma")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/tahkim-tuketici-koruma?WCM_GLOBAL_CONTEXT=" + contentName;
	}
	else if (document.location.href.indexOf("/egitim")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/egitim?WCM_GLOBAL_CONTEXT=" + contentName;
	}
	else if (document.location.href.indexOf("/odullendirme")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/odullendirme?WCM_GLOBAL_CONTEXT=" + contentName;
	}
	else if (document.location.href.indexOf("/indirimli-kurumlar")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/indirimli-kurumlar?WCM_GLOBAL_CONTEXT=" + contentName;
	}
	else if (document.location.href.indexOf("/is-talepleri")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/is-talepleri?WCM_GLOBAL_CONTEXT=" + contentName;
	}
	else if (document.location.href.indexOf("/oneri-beklentiler")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/oneri-beklentiler?WCM_GLOBAL_CONTEXT=" + contentName;
	}
	else if (document.location.href.indexOf("/belge-tasdik")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/belge-tasdik?WCM_GLOBAL_CONTEXT=" + contentName;
	}
	else if (document.location.href.indexOf("/mevzuat-bilgilendirme")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/mevzuat-bilgilendirme?WCM_GLOBAL_CONTEXT=" + contentName;
	}
	else if (document.location.href.indexOf("/tescil-ilan-kurulus")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") +"/tescil-ilan-kurulus?WCM_GLOBAL_CONTEXT=" + contentName;
	}
	
	
	document.write("<a href='"+ urlStr+ "'>");		
	document.write(title);
	document.write("</a>");
}


function redirectUrl(urlStr){
	document.location.href=urlStr;
}

function fixPortalUrl(urlStr){
	urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") + "/" + urlStr;
	redirectUrl(urlStr);
}
function rewriteUrl(urlStr,title,className){ 
	if (urlStr.indexOf("portal")>-1){
		urlStr =   "/wps"+(location.href.indexOf("myportal")>-1?"/myportal":"/portal") + "/" + urlStr.substring(urlStr.indexOf("portal")+7,urlStr.length);
		document.write("<a href='"+ urlStr+ "' target='_top' class='"+className+"'>");
		document.write(title);
		document.write("</a>");

	}
	else{
		document.write("<a href='"+ urlStr+ "' target='_blank'  class='"+className+"'>");
		document.write(title);
		document.write("</a>");
	}
		
}

function openPopup(urlStr){
	window.open(urlStr,"popup");
}

function goBack(){
	window.history.back();
}



/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
;(function($){$.ui={plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name];}
var tmp=$('<div class="ui-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0));}catch(e){}
return $.ui.cssCache[name];},disableSelection:function(el){$(el).attr('unselectable','on').css('MozUserSelect','none');},enableSelection:function(el){$(el).attr('unselectable','off').css('MozUserSelect','');},hasScroll:function(e,a){var scroll=/top/.test(a||"top")?'scrollTop':'scrollLeft',has=false;if(e[scroll]>0)return true;e[scroll]=1;has=e[scroll]>0?true:false;e[scroll]=0;return has;}};var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).triggerHandler("remove");return _remove.apply(this,arguments);};function getter(namespace,plugin,method){var methods=$[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&getter(namespace,name,options)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);if(isMethodCall&&instance&&$.isFunction(instance[options])){instance[options].apply(instance,args);}else if(!isMethodCall){$.data(this,name,new $[namespace][name](this,options));}});};$[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,options);this.element=$(element).bind('setData.'+name,function(e,key,value){return self.setData(key,value);}).bind('getData.'+name,function(e,key){return self.getData(key);}).bind('remove',function(){return self.destroy();});this.init();};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);};$.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName);},getData:function(key){return this.options[key];},setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled');}},enable:function(){this.setData('disabled',false);},disable:function(){this.setData('disabled',true);}};$.widget.defaults={disabled:false};$.ui.mouse={mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(e){return self.mouseDown(e);});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
this.started=false;},mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},mouseDown:function(e){(this._mouseStarted&&this.mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(e.target).parents().add(e.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this.mouseCapture(e)){return true;}
this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self._mouseDelayMet=true;},this.options.delay);}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true;}}
this._mouseMoveDelegate=function(e){return self.mouseMove(e);};this._mouseUpDelegate=function(e){return self.mouseUp(e);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);return false;},mouseMove:function(e){if($.browser.msie&&!e.button){return this.mouseUp(e);}
if(this._mouseStarted){this.mouseDrag(e);return false;}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this.mouseDrag(e):this.mouseUp(e));}
return!this._mouseStarted;},mouseUp:function(e){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(e);}
return false;},mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance);},mouseDelayMet:function(e){return this._mouseDelayMet;},mouseStart:function(e){},mouseDrag:function(e){},mouseStop:function(e){},mouseCapture:function(e){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{init:function(){var o=this.options;if(o.helper=='original'&&!(/(relative|absolute|fixed)/).test(this.element.css('position')))
this.element.css('position','relative');this.element.addClass('ui-draggable');(o.disabled&&this.element.addClass('ui-draggable-disabled'));this.mouseInit();},mouseStart:function(e){var o=this.options;if(this.helper||o.disabled||$(e.target).is('.ui-resizable-handle'))return false;var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==e.target)handle=true;});if(!handle)return false;if($.ui.ddmanager)$.ui.ddmanager.current=this;this.helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[e])):(o.helper=='clone'?this.element.clone():this.element);if(!this.helper.parents('body').length)this.helper.appendTo((o.appendTo=='parent'?this.element[0].parentNode:o.appendTo));if(this.helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(this.helper.css("position")))this.helper.css("position","absolute");this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&$.browser.mozilla)po={top:0,left:0};this.offset.parent={top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};var p=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(e);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(o.cursorAt){if(o.cursorAt.left!=undefined)this.offset.click.left=o.cursorAt.left+this.margins.left;if(o.cursorAt.right!=undefined)this.offset.click.left=this.helperProportions.width-o.cursorAt.right+this.margins.left;if(o.cursorAt.top!=undefined)this.offset.click.top=o.cursorAt.top+this.margins.top;if(o.cursorAt.bottom!=undefined)this.offset.click.top=this.helperProportions.height-o.cursorAt.bottom+this.margins.top;}
if(o.containment){if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=='document'?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),($(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];if(!(/^(document|window|parent)$/).test(o.containment)){var ce=$(o.containment)[0];var co=$(o.containment).offset();this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,co.left+Math.max(ce.scrollWidth,ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),co.top+Math.max(ce.scrollHeight,ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];}}
this.propagate("start",e);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if($.ui.ddmanager&&!o.dropBehaviour)$.ui.ddmanager.prepareOffsets(this,e);this.helper.addClass("ui-draggable-dragging");this.mouseDrag(e);return true;},convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;return{top:(pos.top
+this.offset.relative.top*mod
+this.offset.parent.top*mod
-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)*mod
+(this.cssPosition=="fixed"?$(document).scrollTop():0)*mod
+this.margins.top*mod),left:(pos.left
+this.offset.relative.left*mod
+this.offset.parent.left*mod
-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)*mod
+(this.cssPosition=="fixed"?$(document).scrollLeft():0)*mod
+this.margins.left*mod)};},generatePosition:function(e){var o=this.options;var position={top:(e.pageY
-this.offset.click.top
-this.offset.relative.top
-this.offset.parent.top
+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)
-(this.cssPosition=="fixed"?$(document).scrollTop():0)),left:(e.pageX
-this.offset.click.left
-this.offset.relative.left
-this.offset.parent.left
+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)
-(this.cssPosition=="fixed"?$(document).scrollLeft():0))};if(!this.originalPosition)return position;if(this.containment){if(position.left<this.containment[0])position.left=this.containment[0];if(position.top<this.containment[1])position.top=this.containment[1];if(position.left>this.containment[2])position.left=this.containment[2];if(position.top>this.containment[3])position.top=this.containment[3];}
if(o.grid){var top=this.originalPosition.top+Math.round((position.top-this.originalPosition.top)/o.grid[1])*o.grid[1];position.top=this.containment?(!(top<this.containment[1]||top>this.containment[3])?top:(!(top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPosition.left+Math.round((position.left-this.originalPosition.left)/o.grid[0])*o.grid[0];position.left=this.containment?(!(left<this.containment[0]||left>this.containment[2])?left:(!(left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}
return position;},mouseDrag:function(e){this.position=this.generatePosition(e);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",e)||this.position;if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+'px';if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+'px';if($.ui.ddmanager)$.ui.ddmanager.drag(this,e);return false;},mouseStop:function(e){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour)
var dropped=$.ui.ddmanager.drop(this,e);if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){self.propagate("stop",e);self.clear();});}else{this.propagate("stop",e);this.clear();}
return false;},clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!='original'&&!this.cancelHelperRemoval)this.helper.remove();this.helper=null;this.cancelHelperRemoval=false;},plugins:{},uiHash:function(e){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options};},propagate:function(n,e){$.ui.plugin.call(this,n,[e,this.uiHash()]);if(n=="drag")this.positionAbs=this.convertPositionTo("absolute");return this.element.triggerHandler(n=="drag"?n:"drag"+n,[e,this.uiHash()],this.options[n]);},destroy:function(){if(!this.element.data('draggable'))return;this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable');this.mouseDestroy();}}));$.extend($.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});$.ui.plugin.add("draggable","cursor",{start:function(e,ui){var t=$('body');if(t.css("cursor"))ui.options._cursor=t.css("cursor");t.css("cursor",ui.options.cursor);},stop:function(e,ui){if(ui.options._cursor)$('body').css("cursor",ui.options._cursor);}});$.ui.plugin.add("draggable","zIndex",{start:function(e,ui){var t=$(ui.helper);if(t.css("zIndex"))ui.options._zIndex=t.css("zIndex");t.css('zIndex',ui.options.zIndex);},stop:function(e,ui){if(ui.options._zIndex)$(ui.helper).css('zIndex',ui.options._zIndex);}});$.ui.plugin.add("draggable","opacity",{start:function(e,ui){var t=$(ui.helper);if(t.css("opacity"))ui.options._opacity=t.css("opacity");t.css('opacity',ui.options.opacity);},stop:function(e,ui){if(ui.options._opacity)$(ui.helper).css('opacity',ui.options._opacity);}});$.ui.plugin.add("draggable","iframeFix",{start:function(e,ui){$(ui.options.iframeFix===true?"iframe":ui.options.iframeFix).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body");});},stop:function(e,ui){$("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this);});}});$.ui.plugin.add("draggable","scroll",{start:function(e,ui){var o=ui.options;var i=$(this).data("draggable");o.scrollSensitivity=o.scrollSensitivity||20;o.scrollSpeed=o.scrollSpeed||20;i.overflowY=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-y')))return el;el=el.parent();}while(el[0].parentNode);return $(document);}(this);i.overflowX=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-x')))return el;el=el.parent();}while(el[0].parentNode);return $(document);}(this);if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML')i.overflowYOffset=i.overflowY.offset();if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML')i.overflowXOffset=i.overflowX.offset();},drag:function(e,ui){var o=ui.options;var i=$(this).data("draggable");if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML'){if((i.overflowYOffset.top+i.overflowY[0].offsetHeight)-e.pageY<o.scrollSensitivity)
i.overflowY[0].scrollTop=i.overflowY[0].scrollTop+o.scrollSpeed;if(e.pageY-i.overflowYOffset.top<o.scrollSensitivity)
i.overflowY[0].scrollTop=i.overflowY[0].scrollTop-o.scrollSpeed;}else{if(e.pageY-$(document).scrollTop()<o.scrollSensitivity)
$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);if($(window).height()-(e.pageY-$(document).scrollTop())<o.scrollSensitivity)
$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);}
if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML'){if((i.overflowXOffset.left+i.overflowX[0].offsetWidth)-e.pageX<o.scrollSensitivity)
i.overflowX[0].scrollLeft=i.overflowX[0].scrollLeft+o.scrollSpeed;if(e.pageX-i.overflowXOffset.left<o.scrollSensitivity)
i.overflowX[0].scrollLeft=i.overflowX[0].scrollLeft-o.scrollSpeed;}else{if(e.pageX-$(document).scrollLeft()<o.scrollSensitivity)
$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);if($(window).width()-(e.pageX-$(document).scrollLeft())<o.scrollSensitivity)
$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}}});$.ui.plugin.add("draggable","snap",{start:function(e,ui){var inst=$(this).data("draggable");inst.snapElements=[];$(ui.options.snap===true?'.ui-draggable':ui.options.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=inst.element[0])inst.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left});});},drag:function(e,ui){var inst=$(this).data("draggable");var d=ui.options.snapTolerance||20;var x1=ui.absolutePosition.left,x2=x1+inst.helperProportions.width,y1=ui.absolutePosition.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d)))continue;if(ui.options.snapMode!='inner'){var ts=Math.abs(t-y2)<=20;var bs=Math.abs(b-y1)<=20;var ls=Math.abs(l-x2)<=20;var rs=Math.abs(r-x1)<=20;if(ts)ui.position.top=inst.convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top;if(bs)ui.position.top=inst.convertPositionTo("relative",{top:b,left:0}).top;if(ls)ui.position.left=inst.convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left;if(rs)ui.position.left=inst.convertPositionTo("relative",{top:0,left:r}).left;}
if(ui.options.snapMode!='outer'){var ts=Math.abs(t-y1)<=20;var bs=Math.abs(b-y2)<=20;var ls=Math.abs(l-x1)<=20;var rs=Math.abs(r-x2)<=20;if(ts)ui.position.top=inst.convertPositionTo("relative",{top:t,left:0}).top;if(bs)ui.position.top=inst.convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top;if(ls)ui.position.left=inst.convertPositionTo("relative",{top:0,left:l}).left;if(rs)ui.position.left=inst.convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left;}};}});$.ui.plugin.add("draggable","connectToSortable",{start:function(e,ui){var inst=$(this).data("draggable");inst.sortables=[];$(ui.options.connectToSortable).each(function(){if($.data(this,'sortable')){var sortable=$.data(this,'sortable');inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable.refreshItems();sortable.propagate("activate",e,inst);}});},stop:function(e,ui){var inst=$(this).data("draggable");$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance.mouseStop(e);this.instance.element.triggerHandler("sortreceive",[e,$.extend(this.instance.ui(),{sender:inst.element})],this.instance.options["receive"]);this.instance.options.helper=this.instance.options._helper;}else{this.instance.propagate("deactivate",e,inst);}});},drag:function(e,ui){var inst=$(this).data("draggable"),self=this;var checkPos=function(o){var l=o.left,r=l+o.width,t=o.top,b=t+o.height;return(l<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<r&&t<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<b);};$.each(inst.sortables,function(i){if(checkPos.call(inst,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0];};e.target=this.instance.currentItem[0];this.instance.mouseCapture(e,true);this.instance.mouseStart(e,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst.propagate("toSortable",e);}
if(this.instance.currentItem)this.instance.mouseDrag(e);}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(e,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder)this.instance.placeholder.remove();inst.propagate("fromSortable",e);}};});}});$.ui.plugin.add("draggable","stack",{start:function(e,ui){var group=$.makeArray($(ui.options.stack.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||ui.options.stack.min)-(parseInt($(b).css("zIndex"),10)||ui.options.stack.min);});$(group).each(function(i){this.style.zIndex=ui.options.stack.min+i;});this[0].style.zIndex=ui.options.stack.min+group.length;}});})(jQuery);(function($){$.widget("ui.droppable",{init:function(){this.element.addClass("ui-droppable");this.isover=0;this.isout=1;var o=this.options,accept=o.accept;o=$.extend(o,{accept:o.accept&&o.accept.constructor==Function?o.accept:function(d){return $(d).is(accept);}});this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};$.ui.ddmanager.droppables.push(this);},plugins:{},ui:function(c){return{draggable:(c.currentItem||c.element),helper:c.helper,position:c.position,absolutePosition:c.positionAbs,options:this.options,element:this.element};},destroy:function(){var drop=$.ui.ddmanager.droppables;for(var i=0;i<drop.length;i++)
if(drop[i]==this)
drop.splice(i,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");},over:function(e){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0])return;if(this.options.accept.call(this.element,(draggable.currentItem||draggable.element))){$.ui.plugin.call(this,'over',[e,this.ui(draggable)]);this.element.triggerHandler("dropover",[e,this.ui(draggable)],this.options.over);}},out:function(e){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0])return;if(this.options.accept.call(this.element,(draggable.currentItem||draggable.element))){$.ui.plugin.call(this,'out',[e,this.ui(draggable)]);this.element.triggerHandler("dropout",[e,this.ui(draggable)],this.options.out);}},drop:function(e,custom){var draggable=custom||$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0])return false;var childrenIntersection=false;this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function(){var inst=$.data(this,'droppable');if(inst.options.greedy&&$.ui.intersect(draggable,$.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance)){childrenIntersection=true;return false;}});if(childrenIntersection)return false;if(this.options.accept.call(this.element,(draggable.currentItem||draggable.element))){$.ui.plugin.call(this,'drop',[e,this.ui(draggable)]);this.element.triggerHandler("drop",[e,this.ui(draggable)],this.options.drop);return true;}
return false;},activate:function(e){var draggable=$.ui.ddmanager.current;$.ui.plugin.call(this,'activate',[e,this.ui(draggable)]);if(draggable)this.element.triggerHandler("dropactivate",[e,this.ui(draggable)],this.options.activate);},deactivate:function(e){var draggable=$.ui.ddmanager.current;$.ui.plugin.call(this,'deactivate',[e,this.ui(draggable)]);if(draggable)this.element.triggerHandler("dropdeactivate",[e,this.ui(draggable)],this.options.deactivate);}});$.extend($.ui.droppable,{defaults:{disabled:false,tolerance:'intersect'}});$.ui.intersect=function(draggable,droppable,toleranceMode){if(!droppable.offset)return false;var x1=(draggable.positionAbs||draggable.position.absolute).left,x2=x1+draggable.helperProportions.width,y1=(draggable.positionAbs||draggable.position.absolute).top,y2=y1+draggable.helperProportions.height;var l=droppable.offset.left,r=l+droppable.proportions.width,t=droppable.offset.top,b=t+droppable.proportions.height;switch(toleranceMode){case'fit':return(l<x1&&x2<r&&t<y1&&y2<b);break;case'intersect':return(l<x1+(draggable.helperProportions.width/2)&&x2-(draggable.helperProportions.width/2)<r&&t<y1+(draggable.helperProportions.height/2)&&y2-(draggable.helperProportions.height/2)<b);break;case'pointer':return(l<((draggable.positionAbs||draggable.position.absolute).left+(draggable.clickOffset||draggable.offset.click).left)&&((draggable.positionAbs||draggable.position.absolute).left+(draggable.clickOffset||draggable.offset.click).left)<r&&t<((draggable.positionAbs||draggable.position.absolute).top+(draggable.clickOffset||draggable.offset.click).top)&&((draggable.positionAbs||draggable.position.absolute).top+(draggable.clickOffset||draggable.offset.click).top)<b);break;case'touch':return((y1>=t&&y1<=b)||(y2>=t&&y2<=b)||(y1<t&&y2>b))&&((x1>=l&&x1<=r)||(x2>=l&&x2<=r)||(x1<l&&x2>r));break;default:return false;break;}};$.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(t,e){var m=$.ui.ddmanager.droppables;var type=e?e.type:null;for(var i=0;i<m.length;i++){if(m[i].options.disabled||(t&&!m[i].options.accept.call(m[i].element,(t.currentItem||t.element))))continue;m[i].visible=m[i].element.css("display")!="none";if(!m[i].visible)continue;m[i].offset=m[i].element.offset();m[i].proportions={width:m[i].element[0].offsetWidth,height:m[i].element[0].offsetHeight};if(type=="dragstart"||type=="sortactivate")m[i].activate.call(m[i],e);}},drop:function(draggable,e){var dropped=false;$.each($.ui.ddmanager.droppables,function(){if(!this.options)return;if(!this.options.disabled&&this.visible&&$.ui.intersect(draggable,this,this.options.tolerance))
dropped=this.drop.call(this,e);if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element,(draggable.currentItem||draggable.element))){this.isout=1;this.isover=0;this.deactivate.call(this,e);}});return dropped;},drag:function(draggable,e){if(draggable.options.refreshPositions)$.ui.ddmanager.prepareOffsets(draggable,e);$.each($.ui.ddmanager.droppables,function(){if(this.options.disabled||this.greedyChild||!this.visible)return;var intersects=$.ui.intersect(draggable,this,this.options.tolerance);var c=!intersects&&this.isover==1?'isout':(intersects&&this.isover==0?'isover':null);if(!c)return;var parentInstance;if(this.options.greedy){var parent=this.element.parents('.ui-droppable:eq(0)');if(parent.length){parentInstance=$.data(parent[0],'droppable');parentInstance.greedyChild=(c=='isover'?1:0);}}
if(parentInstance&&c=='isover'){parentInstance['isover']=0;parentInstance['isout']=1;parentInstance.out.call(parentInstance,e);}
this[c]=1;this[c=='isout'?'isover':'isout']=0;this[c=="isover"?"over":"out"].call(this,e);if(parentInstance&&c=='isout'){parentInstance['isout']=0;parentInstance['isover']=1;parentInstance.over.call(parentInstance,e);}});}};$.ui.plugin.add("droppable","activeClass",{activate:function(e,ui){$(this).addClass(ui.options.activeClass);},deactivate:function(e,ui){$(this).removeClass(ui.options.activeClass);},drop:function(e,ui){$(this).removeClass(ui.options.activeClass);}});$.ui.plugin.add("droppable","hoverClass",{over:function(e,ui){$(this).addClass(ui.options.hoverClass);},out:function(e,ui){$(this).removeClass(ui.options.hoverClass);},drop:function(e,ui){$(this).removeClass(ui.options.hoverClass);}});})(jQuery);(function($){$.widget("ui.resizable",$.extend({},$.ui.mouse,{init:function(){var self=this,o=this.options;var elpos=this.element.css('position');this.originalElement=this.element;this.element.addClass("ui-resizable").css({position:/static/.test(elpos)?'relative':elpos});$.extend(o,{_aspectRatio:!!(o.aspectRatio),helper:o.helper||o.ghost||o.animate?o.helper||'proxy':null,knobHandles:o.knobHandles===true?'ui-resizable-knob-handle':o.knobHandles});var aBorder='1px solid #DEDEDE';o.defaultTheme={'ui-resizable':{display:'block'},'ui-resizable-handle':{position:'absolute',background:'#F2F2F2',fontSize:'0.1px'},'ui-resizable-n':{cursor:'n-resize',height:'4px',left:'0px',right:'0px',borderTop:aBorder},'ui-resizable-s':{cursor:'s-resize',height:'4px',left:'0px',right:'0px',borderBottom:aBorder},'ui-resizable-e':{cursor:'e-resize',width:'4px',top:'0px',bottom:'0px',borderRight:aBorder},'ui-resizable-w':{cursor:'w-resize',width:'4px',top:'0px',bottom:'0px',borderLeft:aBorder},'ui-resizable-se':{cursor:'se-resize',width:'4px',height:'4px',borderRight:aBorder,borderBottom:aBorder},'ui-resizable-sw':{cursor:'sw-resize',width:'4px',height:'4px',borderBottom:aBorder,borderLeft:aBorder},'ui-resizable-ne':{cursor:'ne-resize',width:'4px',height:'4px',borderRight:aBorder,borderTop:aBorder},'ui-resizable-nw':{cursor:'nw-resize',width:'4px',height:'4px',borderLeft:aBorder,borderTop:aBorder}};o.knobTheme={'ui-resizable-handle':{background:'#F2F2F2',border:'1px solid #808080',height:'8px',width:'8px'},'ui-resizable-n':{cursor:'n-resize',top:'0px',left:'45%'},'ui-resizable-s':{cursor:'s-resize',bottom:'0px',left:'45%'},'ui-resizable-e':{cursor:'e-resize',right:'0px',top:'45%'},'ui-resizable-w':{cursor:'w-resize',left:'0px',top:'45%'},'ui-resizable-se':{cursor:'se-resize',right:'0px',bottom:'0px'},'ui-resizable-sw':{cursor:'sw-resize',left:'0px',bottom:'0px'},'ui-resizable-nw':{cursor:'nw-resize',left:'0px',top:'0px'},'ui-resizable-ne':{cursor:'ne-resize',right:'0px',top:'0px'}};o._nodeName=this.element[0].nodeName;if(o._nodeName.match(/canvas|textarea|input|select|button|img/i)){var el=this.element;if(/relative/.test(el.css('position'))&&$.browser.opera)
el.css({position:'relative',top:'auto',left:'auto'});el.wrap($('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:el.css('position'),width:el.outerWidth(),height:el.outerHeight(),top:el.css('top'),left:el.css('left')}));var oel=this.element;this.element=this.element.parent();this.element.data('resizable',this);this.element.css({marginLeft:oel.css("marginLeft"),marginTop:oel.css("marginTop"),marginRight:oel.css("marginRight"),marginBottom:oel.css("marginBottom")});oel.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if($.browser.safari&&o.preventDefault)oel.css('resize','none');o.proportionallyResize=oel.css({position:'static',zoom:1,display:'block'});this.element.css({margin:oel.css('margin')});this._proportionallyResize();}
if(!o.handles)o.handles=!$('.ui-resizable-handle',this.element).length?"e,s,se":{n:'.ui-resizable-n',e:'.ui-resizable-e',s:'.ui-resizable-s',w:'.ui-resizable-w',se:'.ui-resizable-se',sw:'.ui-resizable-sw',ne:'.ui-resizable-ne',nw:'.ui-resizable-nw'};if(o.handles.constructor==String){o.zIndex=o.zIndex||1000;if(o.handles=='all')o.handles='n,e,s,w,se,sw,ne,nw';var n=o.handles.split(",");o.handles={};var insertionsDefault={handle:'position: absolute; display: none; overflow:hidden;',n:'top: 0pt; width:100%;',e:'right: 0pt; height:100%;',s:'bottom: 0pt; width:100%;',w:'left: 0pt; height:100%;',se:'bottom: 0pt; right: 0px;',sw:'bottom: 0pt; left: 0px;',ne:'top: 0pt; right: 0px;',nw:'top: 0pt; left: 0px;'};for(var i=0;i<n.length;i++){var handle=$.trim(n[i]),dt=o.defaultTheme,hname='ui-resizable-'+handle,loadDefault=!$.ui.css(hname)&&!o.knobHandles,userKnobClass=$.ui.css('ui-resizable-knob-handle'),allDefTheme=$.extend(dt[hname],dt['ui-resizable-handle']),allKnobTheme=$.extend(o.knobTheme[hname],!userKnobClass?o.knobTheme['ui-resizable-handle']:{});var applyZIndex=/sw|se|ne|nw/.test(handle)?{zIndex:++o.zIndex}:{};var defCss=(loadDefault?insertionsDefault[handle]:''),axis=$(['<div class="ui-resizable-handle ',hname,'" style="',defCss,insertionsDefault.handle,'"></div>'].join('')).css(applyZIndex);o.handles[handle]='.ui-resizable-'+handle;this.element.append(axis.css(loadDefault?allDefTheme:{}).css(o.knobHandles?allKnobTheme:{}).addClass(o.knobHandles?'ui-resizable-knob-handle':'').addClass(o.knobHandles));}
if(o.knobHandles)this.element.addClass('ui-resizable-knob').css(!$.ui.css('ui-resizable-knob')?{}:{});}
this._renderAxis=function(target){target=target||this.element;for(var i in o.handles){if(o.handles[i].constructor==String)
o.handles[i]=$(o.handles[i],this.element).show();if(o.transparent)
o.handles[i].css({opacity:0});if(this.element.is('.ui-wrapper')&&o._nodeName.match(/textarea|input|select|button/i)){var axis=$(o.handles[i],this.element),padWrapper=0;padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth();var padPos=['padding',/ne|nw|n/.test(i)?'Top':/se|sw|s/.test(i)?'Bottom':/^e$/.test(i)?'Right':'Left'].join("");if(!o.transparent)
target.css(padPos,padWrapper);this._proportionallyResize();}
if(!$(o.handles[i]).length)continue;}};this._renderAxis(this.element);o._handles=$('.ui-resizable-handle',self.element);if(o.disableSelection)
o._handles.each(function(i,e){$.ui.disableSelection(e);});o._handles.mouseover(function(){if(!o.resizing){if(this.className)
var axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);self.axis=o.axis=axis&&axis[1]?axis[1]:'se';}});if(o.autoHide){o._handles.hide();$(self.element).addClass("ui-resizable-autohide").hover(function(){$(this).removeClass("ui-resizable-autohide");o._handles.show();},function(){if(!o.resizing){$(this).addClass("ui-resizable-autohide");o._handles.hide();}});}
this.mouseInit();},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalSize:this.originalSize,originalPosition:this.originalPosition};},propagate:function(n,e){$.ui.plugin.call(this,n,[e,this.ui()]);if(n!="resize")this.element.triggerHandler(["resize",n].join(""),[e,this.ui()],this.options[n]);},destroy:function(){var el=this.element,wrapped=el.children(".ui-resizable").get(0);this.mouseDestroy();var _destroy=function(exp){$(exp).removeClass("ui-resizable ui-resizable-disabled").removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();};_destroy(el);if(el.is('.ui-wrapper')&&wrapped){el.parent().append($(wrapped).css({position:el.css('position'),width:el.outerWidth(),height:el.outerHeight(),top:el.css('top'),left:el.css('left')})).end().remove();_destroy(wrapped);}},mouseStart:function(e){if(this.options.disabled)return false;var handle=false;for(var i in this.options.handles){if($(this.options.handles[i])[0]==e.target)handle=true;}
if(!handle)return false;var o=this.options,iniPos=this.element.position(),el=this.element,num=function(v){return parseInt(v,10)||0;},ie6=$.browser.msie&&$.browser.version<7;o.resizing=true;o.documentScroll={top:$(document).scrollTop(),left:$(document).scrollLeft()};if(el.is('.ui-draggable')||(/absolute/).test(el.css('position'))){var sOffset=$.browser.msie&&!o.containment&&(/absolute/).test(el.css('position'))&&!(/relative/).test(el.parent().css('position'));var dscrollt=sOffset?o.documentScroll.top:0,dscrolll=sOffset?o.documentScroll.left:0;el.css({position:'absolute',top:(iniPos.top+dscrollt),left:(iniPos.left+dscrolll)});}
if($.browser.opera&&/relative/.test(el.css('position')))
el.css({position:'relative',top:'auto',left:'auto'});this._renderProxy();var curleft=num(this.helper.css('left')),curtop=num(this.helper.css('top'));if(o.containment){curleft+=$(o.containment).scrollLeft()||0;curtop+=$(o.containment).scrollTop()||0;}
this.offset=this.helper.offset();this.position={left:curleft,top:curtop};this.size=o.helper||ie6?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalSize=o.helper||ie6?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalPosition={left:curleft,top:curtop};this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()};this.originalMousePosition={left:e.pageX,top:e.pageY};o.aspectRatio=(typeof o.aspectRatio=='number')?o.aspectRatio:((this.originalSize.height/this.originalSize.width)||1);if(o.preserveCursor)
$('body').css('cursor',this.axis+'-resize');this.propagate("start",e);return true;},mouseDrag:function(e){var el=this.helper,o=this.options,props={},self=this,smp=this.originalMousePosition,a=this.axis;var dx=(e.pageX-smp.left)||0,dy=(e.pageY-smp.top)||0;var trigger=this._change[a];if(!trigger)return false;var data=trigger.apply(this,[e,dx,dy]),ie6=$.browser.msie&&$.browser.version<7,csdif=this.sizeDiff;if(o._aspectRatio||e.shiftKey)
data=this._updateRatio(data,e);data=this._respectSize(data,e);this.propagate("resize",e);el.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!o.helper&&o.proportionallyResize)
this._proportionallyResize();this._updateCache(data);this.element.triggerHandler("resize",[e,this.ui()],this.options["resize"]);return false;},mouseStop:function(e){this.options.resizing=false;var o=this.options,num=function(v){return parseInt(v,10)||0;},self=this;if(o.helper){var pr=o.proportionallyResize,ista=pr&&(/textarea/i).test(pr.get(0).nodeName),soffseth=ista&&$.ui.hasScroll(pr.get(0),'left')?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var s={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css('left'),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css('top'),10)+(self.position.top-self.originalPosition.top))||null;if(!o.animate)
this.element.css($.extend(s,{top:top,left:left}));if(o.helper&&!o.animate)this._proportionallyResize();}
if(o.preserveCursor)
$('body').css('cursor','auto');this.propagate("stop",e);if(o.helper)this.helper.remove();return false;},_updateCache:function(data){var o=this.options;this.offset=this.helper.offset();if(data.left)this.position.left=data.left;if(data.top)this.position.top=data.top;if(data.height)this.size.height=data.height;if(data.width)this.size.width=data.width;},_updateRatio:function(data,e){var o=this.options,cpos=this.position,csize=this.size,a=this.axis;if(data.height)data.width=(csize.height/o.aspectRatio);else if(data.width)data.height=(csize.width*o.aspectRatio);if(a=='sw'){data.left=cpos.left+(csize.width-data.width);data.top=null;}
if(a=='nw'){data.top=cpos.top+(csize.height-data.height);data.left=cpos.left+(csize.width-data.width);}
return data;},_respectSize:function(data,e){var el=this.helper,o=this.options,pRatio=o._aspectRatio||e.shiftKey,a=this.axis,ismaxw=data.width&&o.maxWidth&&o.maxWidth<data.width,ismaxh=data.height&&o.maxHeight&&o.maxHeight<data.height,isminw=data.width&&o.minWidth&&o.minWidth>data.width,isminh=data.height&&o.minHeight&&o.minHeight>data.height;if(isminw)data.width=o.minWidth;if(isminh)data.height=o.minHeight;if(ismaxw)data.width=o.maxWidth;if(ismaxh)data.height=o.maxHeight;var dw=this.originalPosition.left+this.originalSize.width,dh=this.position.top+this.size.height;var cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);if(isminw&&cw)data.left=dw-o.minWidth;if(ismaxw&&cw)data.left=dw-o.maxWidth;if(isminh&&ch)data.top=dh-o.minHeight;if(ismaxh&&ch)data.top=dh-o.maxHeight;var isNotwh=!data.width&&!data.height;if(isNotwh&&!data.left&&data.top)data.top=null;else if(isNotwh&&!data.top&&data.left)data.left=null;return data;},_proportionallyResize:function(){var o=this.options;if(!o.proportionallyResize)return;var prel=o.proportionallyResize,el=this.helper||this.element;if(!o.borderDif){var b=[prel.css('borderTopWidth'),prel.css('borderRightWidth'),prel.css('borderBottomWidth'),prel.css('borderLeftWidth')],p=[prel.css('paddingTop'),prel.css('paddingRight'),prel.css('paddingBottom'),prel.css('paddingLeft')];o.borderDif=$.map(b,function(v,i){var border=parseInt(v,10)||0,padding=parseInt(p[i],10)||0;return border+padding;});}
prel.css({height:(el.height()-o.borderDif[0]-o.borderDif[2])+"px",width:(el.width()-o.borderDif[1]-o.borderDif[3])+"px"});},_renderProxy:function(){var el=this.element,o=this.options;this.elementOffset=el.offset();if(o.helper){this.helper=this.helper||$('<div style="overflow:hidden;"></div>');var ie6=$.browser.msie&&$.browser.version<7,ie6offset=(ie6?1:0),pxyoffset=(ie6?2:-1);this.helper.addClass(o.helper).css({width:el.outerWidth()+pxyoffset,height:el.outerHeight()+pxyoffset,position:'absolute',left:this.elementOffset.left-ie6offset+'px',top:this.elementOffset.top-ie6offset+'px',zIndex:++o.zIndex});this.helper.appendTo("body");if(o.disableSelection)
$.ui.disableSelection(this.helper.get(0));}else{this.helper=el;}},_change:{e:function(e,dx,dy){return{width:this.originalSize.width+dx};},w:function(e,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx};},n:function(e,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy};},s:function(e,dx,dy){return{height:this.originalSize.height+dy};},se:function(e,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,dx,dy]));},sw:function(e,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,dx,dy]));},ne:function(e,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,dx,dy]));},nw:function(e,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,dx,dy]));}}}));$.extend($.ui.resizable,{defaults:{cancel:":input",distance:1,delay:0,preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autoHide:false,knobHandles:false}});$.ui.plugin.add("resizable","containment",{start:function(e,ui){var o=ui.options,self=$(this).data("resizable"),el=self.element;var oc=o.containment,ce=(oc instanceof $)?oc.get(0):(/parent/.test(oc))?el.parent().get(0):oc;if(!ce)return;self.containerElement=$(ce);if(/document/.test(oc)||oc==document){self.containerOffset={left:0,top:0};self.containerPosition={left:0,top:0};self.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight};}
else{self.containerOffset=$(ce).offset();self.containerPosition=$(ce).position();self.containerSize={height:$(ce).innerHeight(),width:$(ce).innerWidth()};var co=self.containerOffset,ch=self.containerSize.height,cw=self.containerSize.width,width=($.ui.hasScroll(ce,"left")?ce.scrollWidth:cw),height=($.ui.hasScroll(ce)?ce.scrollHeight:ch);self.parentData={element:ce,left:co.left,top:co.top,width:width,height:height};}},resize:function(e,ui){var o=ui.options,self=$(this).data("resizable"),ps=self.containerSize,co=self.containerOffset,cs=self.size,cp=self.position,pRatio=o._aspectRatio||e.shiftKey,cop={top:0,left:0},ce=self.containerElement;if(ce[0]!=document&&/static/.test(ce.css('position')))
cop=self.containerPosition;if(cp.left<(o.helper?co.left:cop.left)){self.size.width=self.size.width+(o.helper?(self.position.left-co.left):(self.position.left-cop.left));if(pRatio)self.size.height=self.size.width*o.aspectRatio;self.position.left=o.helper?co.left:cop.left;}
if(cp.top<(o.helper?co.top:0)){self.size.height=self.size.height+(o.helper?(self.position.top-co.top):self.position.top);if(pRatio)self.size.width=self.size.height/o.aspectRatio;self.position.top=o.helper?co.top:0;}
var woset=(o.helper?self.offset.left-co.left:(self.position.left-cop.left))+self.sizeDiff.width,hoset=(o.helper?self.offset.top-co.top:self.position.top)+self.sizeDiff.height;if(woset+self.size.width>=self.parentData.width){self.size.width=self.parentData.width-woset;if(pRatio)self.size.height=self.size.width*o.aspectRatio;}
if(hoset+self.size.height>=self.parentData.height){self.size.height=self.parentData.height-hoset;if(pRatio)self.size.width=self.size.height/o.aspectRatio;}},stop:function(e,ui){var o=ui.options,self=$(this).data("resizable"),cp=self.position,co=self.containerOffset,cop=self.containerPosition,ce=self.containerElement;var helper=$(self.helper),ho=helper.offset(),w=helper.innerWidth(),h=helper.innerHeight();if(o.helper&&!o.animate&&/relative/.test(ce.css('position')))
$(this).css({left:(ho.left-co.left),top:(ho.top-co.top),width:w,height:h});if(o.helper&&!o.animate&&/static/.test(ce.css('position')))
$(this).css({left:cop.left+(ho.left-co.left),top:cop.top+(ho.top-co.top),width:w,height:h});}});$.ui.plugin.add("resizable","grid",{resize:function(e,ui){var o=ui.options,self=$(this).data("resizable"),cs=self.size,os=self.originalSize,op=self.originalPosition,a=self.axis,ratio=o._aspectRatio||e.shiftKey;o.grid=typeof o.grid=="number"?[o.grid,o.grid]:o.grid;var ox=Math.round((cs.width-os.width)/(o.grid[0]||1))*(o.grid[0]||1),oy=Math.round((cs.height-os.height)/(o.grid[1]||1))*(o.grid[1]||1);if(/^(se|s|e)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;}
else if(/^(ne)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy;}
else if(/^(sw)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.left=op.left-ox;}
else{self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy;self.position.left=op.left-ox;}}});$.ui.plugin.add("resizable","animate",{stop:function(e,ui){var o=ui.options,self=$(this).data("resizable");var pr=o.proportionallyResize,ista=pr&&(/textarea/i).test(pr.get(0).nodeName),soffseth=ista&&$.ui.hasScroll(pr.get(0),'left')?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var style={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css('left'),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css('top'),10)+(self.position.top-self.originalPosition.top))||null;self.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration||"slow",easing:o.animateEasing||"swing",step:function(){var data={width:parseInt(self.element.css('width'),10),height:parseInt(self.element.css('height'),10),top:parseInt(self.element.css('top'),10),left:parseInt(self.element.css('left'),10)};if(pr)pr.css({width:data.width,height:data.height});self._updateCache(data);self.propagate("animate",e);}});}});$.ui.plugin.add("resizable","ghost",{start:function(e,ui){var o=ui.options,self=$(this).data("resizable"),pr=o.proportionallyResize,cs=self.size;if(!pr)self.ghost=self.element.clone();else self.ghost=pr.clone();self.ghost.css({opacity:.25,display:'block',position:'relative',height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass('ui-resizable-ghost').addClass(typeof o.ghost=='string'?o.ghost:'');self.ghost.appendTo(self.helper);},resize:function(e,ui){var o=ui.options,self=$(this).data("resizable"),pr=o.proportionallyResize;if(self.ghost)self.ghost.css({position:'relative',height:self.size.height,width:self.size.width});},stop:function(e,ui){var o=ui.options,self=$(this).data("resizable"),pr=o.proportionallyResize;if(self.ghost&&self.helper)self.helper.get(0).removeChild(self.ghost.get(0));}});$.ui.plugin.add("resizable","alsoResize",{start:function(e,ui){var o=ui.options,self=$(this).data("resizable"),_store=function(exp){$(exp).each(function(){$(this).data("resizable-alsoresize",{width:parseInt($(this).width(),10),height:parseInt($(this).height(),10),left:parseInt($(this).css('left'),10),top:parseInt($(this).css('top'),10)});});};if(typeof(o.alsoResize)=='object'){if(o.alsoResize.length){o.alsoResize=o.alsoResize[0];_store(o.alsoResize);}
else{$.each(o.alsoResize,function(exp,c){_store(exp);});}}else{_store(o.alsoResize);}},resize:function(e,ui){var o=ui.options,self=$(this).data("resizable"),os=self.originalSize,op=self.originalPosition;var delta={height:(self.size.height-os.height)||0,width:(self.size.width-os.width)||0,top:(self.position.top-op.top)||0,left:(self.position.left-op.left)||0},_alsoResize=function(exp,c){$(exp).each(function(){var start=$(this).data("resizable-alsoresize"),style={},css=c&&c.length?c:['width','height','top','left'];$.each(css||['width','height','top','left'],function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0)
style[prop]=sum||null;});$(this).css(style);});};if(typeof(o.alsoResize)=='object'){$.each(o.alsoResize,function(exp,c){_alsoResize(exp,c);});}else{_alsoResize(o.alsoResize);}},stop:function(e,ui){$(this).removeData("resizable-alsoresize-start");}});})(jQuery);(function($){$.widget("ui.selectable",$.extend({},$.ui.mouse,{init:function(){var self=this;this.element.addClass("ui-selectable");this.dragged=false;var selectees;this.refresh=function(){selectees=$(self.options.filter,self.element[0]);selectees.each(function(){var $this=$(this);var pos=$this.offset();$.data(this,"selectable-item",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.width(),bottom:pos.top+$this.height(),startselected:false,selected:$this.hasClass('ui-selected'),selecting:$this.hasClass('ui-selecting'),unselecting:$this.hasClass('ui-unselecting')});});};this.refresh();this.selectees=selectees.addClass("ui-selectee");this.mouseInit();this.helper=$(document.createElement('div')).css({border:'1px dotted black'});},toggle:function(){if(this.options.disabled){this.enable();}else{this.disable();}},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this.mouseDestroy();},mouseStart:function(e){var self=this;this.opos=[e.pageX,e.pageY];if(this.options.disabled)
return;var options=this.options;this.selectees=$(options.filter,this.element[0]);this.element.triggerHandler("selectablestart",[e,{"selectable":this.element[0],"options":options}],options.start);$('body').append(this.helper);this.helper.css({"z-index":100,"position":"absolute","left":e.clientX,"top":e.clientY,"width":0,"height":0});if(options.autoRefresh){this.refresh();}
this.selectees.filter('.ui-selected').each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected=true;if(!e.ctrlKey){selectee.$element.removeClass('ui-selected');selectee.selected=false;selectee.$element.addClass('ui-unselecting');selectee.unselecting=true;self.element.triggerHandler("selectableunselecting",[e,{selectable:self.element[0],unselecting:selectee.element,options:options}],options.unselecting);}});var isSelectee=false;$(e.target).parents().andSelf().each(function(){if($.data(this,"selectable-item"))isSelectee=true;});return this.options.keyboard?!isSelectee:true;},mouseDrag:function(e){var self=this;this.dragged=true;if(this.options.disabled)
return;var options=this.options;var x1=this.opos[0],y1=this.opos[1],x2=e.pageX,y2=e.pageY;if(x1>x2){var tmp=x2;x2=x1;x1=tmp;}
if(y1>y2){var tmp=y2;y2=y1;y1=tmp;}
this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});this.selectees.each(function(){var selectee=$.data(this,"selectable-item");if(!selectee||selectee.element==self.element[0])
return;var hit=false;if(options.tolerance=='touch'){hit=(!(selectee.left>x2||selectee.right<x1||selectee.top>y2||selectee.bottom<y1));}else if(options.tolerance=='fit'){hit=(selectee.left>x1&&selectee.right<x2&&selectee.top>y1&&selectee.bottom<y2);}
if(hit){if(selectee.selected){selectee.$element.removeClass('ui-selected');selectee.selected=false;}
if(selectee.unselecting){selectee.$element.removeClass('ui-unselecting');selectee.unselecting=false;}
if(!selectee.selecting){selectee.$element.addClass('ui-selecting');selectee.selecting=true;self.element.triggerHandler("selectableselecting",[e,{selectable:self.element[0],selecting:selectee.element,options:options}],options.selecting);}}else{if(selectee.selecting){if(e.ctrlKey&&selectee.startselected){selectee.$element.removeClass('ui-selecting');selectee.selecting=false;selectee.$element.addClass('ui-selected');selectee.selected=true;}else{selectee.$element.removeClass('ui-selecting');selectee.selecting=false;if(selectee.startselected){selectee.$element.addClass('ui-unselecting');selectee.unselecting=true;}
self.element.triggerHandler("selectableunselecting",[e,{selectable:self.element[0],unselecting:selectee.element,options:options}],options.unselecting);}}
if(selectee.selected){if(!e.ctrlKey&&!selectee.startselected){selectee.$element.removeClass('ui-selected');selectee.selected=false;selectee.$element.addClass('ui-unselecting');selectee.unselecting=true;self.element.triggerHandler("selectableunselecting",[e,{selectable:self.element[0],unselecting:selectee.element,options:options}],options.unselecting);}}}});return false;},mouseStop:function(e){var self=this;this.dragged=false;var options=this.options;$('.ui-unselecting',this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass('ui-unselecting');selectee.unselecting=false;selectee.startselected=false;self.element.triggerHandler("selectableunselected",[e,{selectable:self.element[0],unselected:selectee.element,options:options}],options.unselected);});$('.ui-selecting',this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass('ui-selecting').addClass('ui-selected');selectee.selecting=false;selectee.selected=true;selectee.startselected=true;self.element.triggerHandler("selectableselected",[e,{selectable:self.element[0],selected:selectee.element,options:options}],options.selected);});this.element.triggerHandler("selectablestop",[e,{selectable:self.element[0],options:this.options}],this.options.stop);this.helper.remove();return false;}}));$.extend($.ui.selectable,{defaults:{distance:1,delay:0,cancel:":input",appendTo:'body',autoRefresh:true,filter:'*',tolerance:'touch'}});})(jQuery);(function($){function contains(a,b){var safari2=$.browser.safari&&$.browser.version<522;if(a.contains&&!safari2){return a.contains(b);}
if(a.compareDocumentPosition)
return!!(a.compareDocumentPosition(b)&16);while(b=b.parentNode)
if(b==a)return true;return false;};$.widget("ui.sortable",$.extend({},$.ui.mouse,{init:function(){var o=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css('float')):false;if(!(/(relative|absolute|fixed)/).test(this.element.css('position')))this.element.css('position','relative');this.offset=this.element.offset();this.mouseInit();},plugins:{},ui:function(inst){return{helper:(inst||this)["helper"],placeholder:(inst||this)["placeholder"]||$([]),position:(inst||this)["position"],absolutePosition:(inst||this)["positionAbs"],options:this.options,element:this.element,item:(inst||this)["currentItem"],sender:inst?inst.element:null};},propagate:function(n,e,inst,noPropagation){$.ui.plugin.call(this,n,[e,this.ui(inst)]);if(!noPropagation)this.element.triggerHandler(n=="sort"?n:"sort"+n,[e,this.ui(inst)],this.options[n]);},serialize:function(o){var items=($.isFunction(this.options.items)?this.options.items.call(this.element):$(this.options.items,this.element)).not('.ui-sortable-helper');var str=[];o=o||{};items.each(function(){var res=($(this).attr(o.attribute||'id')||'').match(o.expression||(/(.+)[-=_](.+)/));if(res)str.push((o.key||res[1])+'[]='+(o.key&&o.expression?res[1]:res[2]));});return str.join('&');},toArray:function(attr){var items=($.isFunction(this.options.items)?this.options.items.call(this.element):$(this.options.items,this.element)).not('.ui-sortable-helper');var ret=[];items.each(function(){ret.push($(this).attr(attr||'id'));});return ret;},intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?'width':'height']>item[this.floating?'width':'height'])){return(y1+this.offset.click.top>t&&y1+this.offset.click.top<b&&x1+this.offset.click.left>l&&x1+this.offset.click.left<r);}else{return(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b);}},intersectsWithEdge:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;if(this.options.tolerance=="pointer"||(this.options.tolerance=="guess"&&this.helperProportions[this.floating?'width':'height']>item[this.floating?'width':'height'])){if(!(y1+this.offset.click.top>t&&y1+this.offset.click.top<b&&x1+this.offset.click.left>l&&x1+this.offset.click.left<r))return false;if(this.floating){if(x1+this.offset.click.left>l&&x1+this.offset.click.left<l+item.width/2)return 2;if(x1+this.offset.click.left>l+item.width/2&&x1+this.offset.click.left<r)return 1;}else{if(y1+this.offset.click.top>t&&y1+this.offset.click.top<t+item.height/2)return 2;if(y1+this.offset.click.top>t+item.height/2&&y1+this.offset.click.top<b)return 1;}}else{if(!(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b))return false;if(this.floating){if(x2>l&&x1<l)return 2;if(x1<r&&x2>r)return 1;}else{if(y2>t&&y1<t)return 1;if(y1<b&&y2>b)return 2;}}
return false;},refresh:function(){this.refreshItems();this.refreshPositions();},refreshItems:function(){this.items=[];this.containers=[this];var items=this.items;var self=this;var queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element),this]];if(this.options.connectWith){for(var i=this.options.connectWith.length-1;i>=0;i--){var cur=$(this.options.connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],'sortable');if(inst&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element),inst]);this.containers.push(inst);}};};}
for(var i=queries.length-1;i>=0;i--){queries[i][0].each(function(){$.data(this,'sortable-item',queries[i][1]);items.push({item:$(this),instance:queries[i][1],width:0,height:0,left:0,top:0});});};},refreshPositions:function(fast){if(this.offsetParent){var po=this.offsetParent.offset();this.offset.parent={top:po.top+this.offsetParentBorders.top,left:po.left+this.offsetParentBorders.left};}
for(var i=this.items.length-1;i>=0;i--){if(this.items[i].instance!=this.currentContainer&&this.currentContainer&&this.items[i].item[0]!=this.currentItem[0])
continue;var t=this.options.toleranceElement?$(this.options.toleranceElement,this.items[i].item):this.items[i].item;if(!fast){this.items[i].width=t[0].offsetWidth;this.items[i].height=t[0].offsetHeight;}
var p=t.offset();this.items[i].left=p.left;this.items[i].top=p.top;};if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this);}else{for(var i=this.containers.length-1;i>=0;i--){var p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight();};}},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this.mouseDestroy();for(var i=this.items.length-1;i>=0;i--)
this.items[i].item.removeData("sortable-item");},createPlaceholder:function(that){var self=that||this,o=self.options;if(o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){return $('<div></div>').addClass(className)[0];},update:function(i,p){p.css(i.offset()).css({width:i.outerWidth(),height:i.outerHeight()});}};}
self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem)).appendTo('body').css({position:'absolute'});o.placeholder.update.call(self.element,self.currentItem,self.placeholder);},contactContainers:function(e){for(var i=this.containers.length-1;i>=0;i--){if(this.intersectsWith(this.containers[i].containerCache)){if(!this.containers[i].containerCache.over){if(this.currentContainer!=this.containers[i]){var dist=10000;var itemWithLeastDistance=null;var base=this.positionAbs[this.containers[i].floating?'left':'top'];for(var j=this.items.length-1;j>=0;j--){if(!contains(this.containers[i].element[0],this.items[j].item[0]))continue;var cur=this.items[j][this.containers[i].floating?'left':'top'];if(Math.abs(cur-base)<dist){dist=Math.abs(cur-base);itemWithLeastDistance=this.items[j];}}
if(!itemWithLeastDistance&&!this.options.dropOnEmpty)
continue;if(this.placeholder)this.placeholder.remove();if(this.containers[i].options.placeholder){this.containers[i].createPlaceholder(this);}else{this.placeholder=null;;}
this.currentContainer=this.containers[i];itemWithLeastDistance?this.rearrange(e,itemWithLeastDistance,null,true):this.rearrange(e,null,this.containers[i].element,true);this.propagate("change",e);this.containers[i].propagate("change",e,this);}
this.containers[i].propagate("over",e,this);this.containers[i].containerCache.over=1;}}else{if(this.containers[i].containerCache.over){this.containers[i].propagate("out",e,this);this.containers[i].containerCache.over=0;}}};},mouseCapture:function(e,overrideHandle){if(this.options.disabled||this.options.type=='static')return false;this.refreshItems();var currentItem=null,self=this,nodes=$(e.target).parents().each(function(){if($.data(this,'sortable-item')==self){currentItem=$(this);return false;}});if($.data(e.target,'sortable-item')==self)currentItem=$(e.target);if(!currentItem)return false;if(this.options.handle&&!overrideHandle){var validHandle=false;$(this.options.handle,currentItem).find("*").andSelf().each(function(){if(this==e.target)validHandle=true;});if(!validHandle)return false;}
this.currentItem=currentItem;return true;},mouseStart:function(e,overrideHandle,noActivation){var o=this.options;this.currentContainer=this;this.refreshPositions();this.helper=typeof o.helper=='function'?$(o.helper.apply(this.element[0],[e,this.currentItem])):this.currentItem.clone();if(!this.helper.parents('body').length)$(o.appendTo!='parent'?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(this.helper[0]);this.helper.css({position:'absolute',clear:'both'}).addClass('ui-sortable-helper');this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)};this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();this.offsetParentBorders={top:(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};this.offset.parent={top:po.top+this.offsetParentBorders.top,left:po.left+this.offsetParentBorders.left};this.originalPosition=this.generatePosition(e);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(o.placeholder)this.createPlaceholder();this.propagate("start",e);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(o.cursorAt){if(o.cursorAt.left!=undefined)this.offset.click.left=o.cursorAt.left;if(o.cursorAt.right!=undefined)this.offset.click.left=this.helperProportions.width-o.cursorAt.right;if(o.cursorAt.top!=undefined)this.offset.click.top=o.cursorAt.top;if(o.cursorAt.bottom!=undefined)this.offset.click.top=this.helperProportions.height-o.cursorAt.bottom;}
if(o.containment){if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.parent.left,0-this.offset.parent.top,$(o.containment=='document'?document:window).width()-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),($(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];if(!(/^(document|window|parent)$/).test(o.containment)){var ce=$(o.containment)[0];var co=$(o.containment).offset();this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)-this.offset.parent.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)-this.offset.parent.top,co.left+Math.max(ce.scrollWidth,ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.currentItem.css("marginRight"),10)||0),co.top+Math.max(ce.scrollHeight,ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.currentItem.css("marginBottom"),10)||0)];}}
if(this.options.placeholder!='clone')
this.currentItem.css('visibility','hidden');if(!noActivation){for(var i=this.containers.length-1;i>=0;i--){this.containers[i].propagate("activate",e,this);}}
if($.ui.ddmanager)$.ui.ddmanager.current=this;if($.ui.ddmanager&&!o.dropBehaviour)$.ui.ddmanager.prepareOffsets(this,e);this.dragging=true;this.mouseDrag(e);return true;},convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;return{top:(pos.top
+this.offset.parent.top*mod
-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)*mod
+this.margins.top*mod),left:(pos.left
+this.offset.parent.left*mod
-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)*mod
+this.margins.left*mod)};},generatePosition:function(e){var o=this.options;var position={top:(e.pageY
-this.offset.click.top
-this.offset.parent.top
+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)),left:(e.pageX
-this.offset.click.left
-this.offset.parent.left
+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft))};if(!this.originalPosition)return position;if(this.containment){if(position.left<this.containment[0])position.left=this.containment[0];if(position.top<this.containment[1])position.top=this.containment[1];if(position.left>this.containment[2])position.left=this.containment[2];if(position.top>this.containment[3])position.top=this.containment[3];}
if(o.grid){var top=this.originalPosition.top+Math.round((position.top-this.originalPosition.top)/o.grid[1])*o.grid[1];position.top=this.containment?(!(top<this.containment[1]||top>this.containment[3])?top:(!(top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPosition.left+Math.round((position.left-this.originalPosition.left)/o.grid[0])*o.grid[0];position.left=this.containment?(!(left<this.containment[0]||left>this.containment[2])?left:(!(left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}
return position;},mouseDrag:function(e){this.position=this.generatePosition(e);this.positionAbs=this.convertPositionTo("absolute");$.ui.plugin.call(this,"sort",[e,this.ui()]);this.positionAbs=this.convertPositionTo("absolute");this.helper[0].style.left=this.position.left+'px';this.helper[0].style.top=this.position.top+'px';for(var i=this.items.length-1;i>=0;i--){var intersection=this.intersectsWithEdge(this.items[i]);if(!intersection)continue;if(this.items[i].item[0]!=this.currentItem[0]&&this.currentItem[intersection==1?"next":"prev"]()[0]!=this.items[i].item[0]&&!contains(this.currentItem[0],this.items[i].item[0])&&(this.options.type=='semi-dynamic'?!contains(this.element[0],this.items[i].item[0]):true)){this.direction=intersection==1?"down":"up";this.rearrange(e,this.items[i]);this.propagate("change",e);break;}}
this.contactContainers(e);if($.ui.ddmanager)$.ui.ddmanager.drag(this,e);this.element.triggerHandler("sort",[e,this.ui()],this.options["sort"]);return false;},rearrange:function(e,i,a,hardRefresh){a?a[0].appendChild(this.currentItem[0]):i.item[0].parentNode.insertBefore(this.currentItem[0],(this.direction=='down'?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var self=this,counter=this.counter;window.setTimeout(function(){if(counter==self.counter)self.refreshPositions(!hardRefresh);},0);if(this.options.placeholder)
this.options.placeholder.update.call(this.element,this.currentItem,this.placeholder);},mouseStop:function(e,noPropagation){if($.ui.ddmanager&&!this.options.dropBehaviour)
$.ui.ddmanager.drop(this,e);if(this.options.revert){var self=this;var cur=self.currentItem.offset();if(self.placeholder)self.placeholder.animate({opacity:'hide'},(parseInt(this.options.revert,10)||500)-50);$(this.helper).animate({left:cur.left-this.offset.parent.left-self.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:cur.top-this.offset.parent.top-self.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){self.clear(e);});}else{this.clear(e,noPropagation);}
return false;},clear:function(e,noPropagation){if(this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])this.propagate("update",e,null,noPropagation);if(!contains(this.element[0],this.currentItem[0])){this.propagate("remove",e,null,noPropagation);for(var i=this.containers.length-1;i>=0;i--){if(contains(this.containers[i].element[0],this.currentItem[0])){this.containers[i].propagate("update",e,this,noPropagation);this.containers[i].propagate("receive",e,this,noPropagation);}};};for(var i=this.containers.length-1;i>=0;i--){this.containers[i].propagate("deactivate",e,this,noPropagation);if(this.containers[i].containerCache.over){this.containers[i].propagate("out",e,this);this.containers[i].containerCache.over=0;}}
this.dragging=false;if(this.cancelHelperRemoval){this.propagate("stop",e,null,noPropagation);return false;}
$(this.currentItem).css('visibility','');if(this.placeholder)this.placeholder.remove();this.helper.remove();this.helper=null;this.propagate("stop",e,null,noPropagation);return true;}}));$.extend($.ui.sortable,{getter:"serialize toArray",defaults:{helper:"clone",tolerance:"guess",distance:1,delay:0,scroll:true,scrollSensitivity:20,scrollSpeed:20,cancel:":input",items:'> *',zIndex:1000,dropOnEmpty:true,appendTo:"parent"}});$.ui.plugin.add("sortable","cursor",{start:function(e,ui){var t=$('body');if(t.css("cursor"))ui.options._cursor=t.css("cursor");t.css("cursor",ui.options.cursor);},stop:function(e,ui){if(ui.options._cursor)$('body').css("cursor",ui.options._cursor);}});$.ui.plugin.add("sortable","zIndex",{start:function(e,ui){var t=ui.helper;if(t.css("zIndex"))ui.options._zIndex=t.css("zIndex");t.css('zIndex',ui.options.zIndex);},stop:function(e,ui){if(ui.options._zIndex)$(ui.helper).css('zIndex',ui.options._zIndex);}});$.ui.plugin.add("sortable","opacity",{start:function(e,ui){var t=ui.helper;if(t.css("opacity"))ui.options._opacity=t.css("opacity");t.css('opacity',ui.options.opacity);},stop:function(e,ui){if(ui.options._opacity)$(ui.helper).css('opacity',ui.options._opacity);}});$.ui.plugin.add("sortable","scroll",{start:function(e,ui){var o=ui.options;var i=$(this).data("sortable");i.overflowY=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-y')))return el;el=el.parent();}while(el[0].parentNode);return $(document);}(i.currentItem);i.overflowX=function(el){do{if(/auto|scroll/.test(el.css('overflow'))||(/auto|scroll/).test(el.css('overflow-x')))return el;el=el.parent();}while(el[0].parentNode);return $(document);}(i.currentItem);if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML')i.overflowYOffset=i.overflowY.offset();if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML')i.overflowXOffset=i.overflowX.offset();},sort:function(e,ui){var o=ui.options;var i=$(this).data("sortable");if(i.overflowY[0]!=document&&i.overflowY[0].tagName!='HTML'){if((i.overflowYOffset.top+i.overflowY[0].offsetHeight)-e.pageY<o.scrollSensitivity)
i.overflowY[0].scrollTop=i.overflowY[0].scrollTop+o.scrollSpeed;if(e.pageY-i.overflowYOffset.top<o.scrollSensitivity)
i.overflowY[0].scrollTop=i.overflowY[0].scrollTop-o.scrollSpeed;}else{if(e.pageY-$(document).scrollTop()<o.scrollSensitivity)
$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);if($(window).height()-(e.pageY-$(document).scrollTop())<o.scrollSensitivity)
$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);}
if(i.overflowX[0]!=document&&i.overflowX[0].tagName!='HTML'){if((i.overflowXOffset.left+i.overflowX[0].offsetWidth)-e.pageX<o.scrollSensitivity)
i.overflowX[0].scrollLeft=i.overflowX[0].scrollLeft+o.scrollSpeed;if(e.pageX-i.overflowXOffset.left<o.scrollSensitivity)
i.overflowX[0].scrollLeft=i.overflowX[0].scrollLeft-o.scrollSpeed;}else{if(e.pageX-$(document).scrollLeft()<o.scrollSensitivity)
$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);if($(window).width()-(e.pageX-$(document).scrollLeft())<o.scrollSensitivity)
$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}}});$.ui.plugin.add("sortable","axis",{sort:function(e,ui){var i=$(this).data("sortable");if(ui.options.axis=="y")i.position.left=i.originalPosition.left;if(ui.options.axis=="x")i.position.top=i.originalPosition.top;}});})(jQuery);(function($){$.widget("ui.accordion",{init:function(){var options=this.options;if(options.navigation){var current=this.element.find("a").filter(options.navigationFilter);if(current.length){if(current.filter(options.header).length){options.active=current;}else{options.active=current.parent().parent().prev();current.addClass("current");}}}
options.headers=this.element.find(options.header);options.active=findActive(options.headers,options.active);if($.browser.msie){this.element.find('a').css('zoom','1');}
if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");$("<span class='ui-accordion-left'/>").insertBefore(options.headers);$("<span class='ui-accordion-right'/>").appendTo(options.headers);options.headers.addClass("ui-accordion-header").attr("tabindex","0");}
var maxHeight;if(options.fillSpace){maxHeight=this.element.parent().height();options.headers.each(function(){maxHeight-=$(this).outerHeight();});var maxPadding=0;options.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height());}).height(maxHeight-maxPadding);}else if(options.autoHeight){maxHeight=0;options.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight());}).height(maxHeight);}
options.headers.not(options.active||"").next().hide();options.active.parent().andSelf().addClass(options.selectedClass);if(options.event){this.element.bind((options.event)+".accordion",clickHandler);}},activate:function(index){clickHandler.call(this.element[0],{target:findActive(this.options.headers,index)[0]});},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","");}
$.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion");}});function scopeCallback(callback,scope){return function(){return callback.apply(scope,arguments);};};function completed(cancel){if(!$.data(this,"accordion")){return;}
var instance=$.data(this,"accordion");var options=instance.options;options.running=cancel?0:--options.running;if(options.running){return;}
if(options.clearStyle){options.toShow.add(options.toHide).css({height:"",overflow:""});}
$(this).triggerHandler("accordionchange",[$.event.fix({type:'accordionchange',target:instance.element[0]}),options.data],options.change);}
function toggle(toShow,toHide,data,clickedActive,down){var options=$.data(this,"accordion").options;options.toShow=toShow;options.toHide=toHide;options.data=data;var complete=scopeCallback(completed,this);options.running=toHide.size()===0?toShow.size():toHide.size();if(options.animated){if(!options.alwaysOpen&&clickedActive){$.ui.accordion.animations[options.animated]({toShow:jQuery([]),toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight});}else{$.ui.accordion.animations[options.animated]({toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:options.autoHeight});}}else{if(!options.alwaysOpen&&clickedActive){toShow.toggle();}else{toHide.hide();toShow.show();}
complete(true);}}
function clickHandler(event){var options=$.data(this,"accordion").options;if(options.disabled){return false;}
if(!event.target&&!options.alwaysOpen){options.active.parent().andSelf().toggleClass(options.selectedClass);var toHide=options.active.next(),data={options:options,newHeader:jQuery([]),oldHeader:options.active,newContent:jQuery([]),oldContent:toHide},toShow=(options.active=$([]));toggle.call(this,toShow,toHide,data);return false;}
var clicked=$(event.target);clicked=$(clicked.parents(options.header)[0]||clicked);var clickedActive=clicked[0]==options.active[0];if(options.running||(options.alwaysOpen&&clickedActive)){return false;}
if(!clicked.is(options.header)){return;}
options.active.parent().andSelf().toggleClass(options.selectedClass);if(!clickedActive){clicked.parent().andSelf().addClass(options.selectedClass);}
var toShow=clicked.next(),toHide=options.active.next(),data={options:options,newHeader:clicked,oldHeader:options.active,newContent:toShow,oldContent:toHide},down=options.headers.index(options.active[0])>options.headers.index(clicked[0]);options.active=clickedActive?$([]):clicked;toggle.call(this,toShow,toHide,data,clickedActive,down);return false;};function findActive(headers,selector){return selector!=undefined?typeof selector=="number"?headers.filter(":eq("+selector+")"):headers.not(headers.not(selector)):selector===false?$([]):headers.filter(":eq(0)");}
$.extend($.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:'slide',event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase();}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return;}
var hideHeight=options.toHide.height(),showHeight=options.toShow.height(),difference=showHeight/hideHeight;options.toShow.css({height:0,overflow:'hidden'}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{step:function(now){var current=(hideHeight-now)*difference;if($.browser.msie||$.browser.opera){current=Math.ceil(current);}
options.toShow.height(current);},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","auto");}
options.complete();}});},bounceslide:function(options){this.slide(options,{easing:options.down?"bounceout":"swing",duration:options.down?1000:200});},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700});}}});$.fn.activate=function(index){return this.accordion("activate",index);};})(jQuery);(function($){var setDataSwitch={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"};$.widget("ui.dialog",{init:function(){var self=this,options=this.options,resizeHandles=typeof options.resizable=='string'?options.resizable:'n,e,s,w,se,sw,ne,nw',uiDialogContent=this.element.addClass('ui-dialog-content').wrap('<div/>').wrap('<div/>'),uiDialogContainer=(this.uiDialogContainer=uiDialogContent.parent().addClass('ui-dialog-container').css({position:'relative',width:'100%',height:'100%'})),title=options.title||uiDialogContent.attr('title')||'',uiDialogTitlebar=(this.uiDialogTitlebar=$('<div class="ui-dialog-titlebar"/>')).append('<span class="ui-dialog-title">'+title+'</span>').append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>').prependTo(uiDialogContainer),uiDialog=(this.uiDialog=uiDialogContainer.parent()).appendTo(document.body).hide().addClass('ui-dialog').addClass(options.dialogClass).addClass(uiDialogContent.attr('className')).removeClass('ui-dialog-content').css({position:'absolute',width:options.width,height:options.height,overflow:'hidden',zIndex:options.zIndex}).attr('tabIndex',-1).css('outline',0).keydown(function(ev){if(options.closeOnEscape){var ESC=27;(ev.keyCode&&ev.keyCode==ESC&&self.close());}}).mousedown(function(){self.moveToTop();}),uiDialogButtonPane=(this.uiDialogButtonPane=$('<div/>')).addClass('ui-dialog-buttonpane').css({position:'absolute',bottom:0}).appendTo(uiDialog);this.uiDialogTitlebarClose=$('.ui-dialog-titlebar-close',uiDialogTitlebar).hover(function(){$(this).addClass('ui-dialog-titlebar-close-hover');},function(){$(this).removeClass('ui-dialog-titlebar-close-hover');}).mousedown(function(ev){ev.stopPropagation();}).click(function(){self.close();return false;});this.uiDialogTitlebar.find("*").add(this.uiDialogTitlebar).each(function(){$.ui.disableSelection(this);});if($.fn.draggable){uiDialog.draggable({cancel:'.ui-dialog-content',helper:options.dragHelper,handle:'.ui-dialog-titlebar',start:function(e,ui){self.moveToTop();(options.dragStart&&options.dragStart.apply(self.element[0],arguments));},drag:function(e,ui){(options.drag&&options.drag.apply(self.element[0],arguments));},stop:function(e,ui){(options.dragStop&&options.dragStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize();}});(options.draggable||uiDialog.draggable('disable'));}
if($.fn.resizable){uiDialog.resizable({cancel:'.ui-dialog-content',helper:options.resizeHelper,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:options.minHeight,start:function(){(options.resizeStart&&options.resizeStart.apply(self.element[0],arguments));},resize:function(e,ui){(options.autoResize&&self.size.apply(self));(options.resize&&options.resize.apply(self.element[0],arguments));},handles:resizeHandles,stop:function(e,ui){(options.autoResize&&self.size.apply(self));(options.resizeStop&&options.resizeStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize();}});(options.resizable||uiDialog.resizable('disable'));}
this.createButtons(options.buttons);this.isOpen=false;(options.bgiframe&&$.fn.bgiframe&&uiDialog.bgiframe());(options.autoOpen&&this.open());},setData:function(key,value){(setDataSwitch[key]&&this.uiDialog.data(setDataSwitch[key],value));switch(key){case"buttons":this.createButtons(value);break;case"draggable":this.uiDialog.draggable(value?'enable':'disable');break;case"height":this.uiDialog.height(value);break;case"position":this.position(value);break;case"resizable":(typeof value=='string'&&this.uiDialog.data('handles.resizable',value));this.uiDialog.resizable(value?'enable':'disable');break;case"title":$(".ui-dialog-title",this.uiDialogTitlebar).text(value);break;case"width":this.uiDialog.width(value);break;}
$.widget.prototype.setData.apply(this,arguments);},position:function(pos){var wnd=$(window),doc=$(document),pTop=doc.scrollTop(),pLeft=doc.scrollLeft(),minTop=pTop;if($.inArray(pos,['center','top','right','bottom','left'])>=0){pos=[pos=='right'||pos=='left'?pos:'center',pos=='top'||pos=='bottom'?pos:'middle'];}
if(pos.constructor!=Array){pos=['center','middle'];}
if(pos[0].constructor==Number){pLeft+=pos[0];}else{switch(pos[0]){case'left':pLeft+=0;break;case'right':pLeft+=wnd.width()-this.uiDialog.width();break;default:case'center':pLeft+=(wnd.width()-this.uiDialog.width())/2;}}
if(pos[1].constructor==Number){pTop+=pos[1];}else{switch(pos[1]){case'top':pTop+=0;break;case'bottom':pTop+=wnd.height()-this.uiDialog.height();break;default:case'middle':pTop+=(wnd.height()-this.uiDialog.height())/2;}}
pTop=Math.max(pTop,minTop);this.uiDialog.css({top:pTop,left:pLeft});},size:function(){var container=this.uiDialogContainer,titlebar=this.uiDialogTitlebar,content=this.element,tbMargin=parseInt(content.css('margin-top'),10)+parseInt(content.css('margin-bottom'),10),lrMargin=parseInt(content.css('margin-left'),10)+parseInt(content.css('margin-right'),10);content.height(container.height()-titlebar.outerHeight()-tbMargin);content.width(container.width()-lrMargin);},open:function(){if(this.isOpen){return;}
this.overlay=this.options.modal?new $.ui.dialog.overlay(this):null;(this.uiDialog.next().length>0)&&this.uiDialog.appendTo('body');this.position(this.options.position);this.uiDialog.show(this.options.show);this.options.autoResize&&this.size();this.moveToTop(true);var openEV=null;var openUI={options:this.options};this.uiDialogTitlebarClose.focus();this.element.triggerHandler("dialogopen",[openEV,openUI],this.options.open);this.isOpen=true;},moveToTop:function(force){if((this.options.modal&&!force)||(!this.options.stack&&!this.options.modal)){return this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus);}
var maxZ=this.options.zIndex,options=this.options;$('.ui-dialog:visible').each(function(){maxZ=Math.max(maxZ,parseInt($(this).css('z-index'),10)||options.zIndex);});(this.overlay&&this.overlay.$el.css('z-index',++maxZ));this.uiDialog.css('z-index',++maxZ);this.element.triggerHandler("dialogfocus",[null,{options:this.options}],this.options.focus);},close:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide(this.options.hide);var closeEV=null;var closeUI={options:this.options};this.element.triggerHandler("dialogclose",[closeEV,closeUI],this.options.close);$.ui.dialog.overlay.resize();this.isOpen=false;},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind('.dialog').removeData('dialog').removeClass('ui-dialog-content').hide().appendTo('body');this.uiDialog.remove();},createButtons:function(buttons){var self=this,hasButtons=false,uiDialogButtonPane=this.uiDialogButtonPane;uiDialogButtonPane.empty().hide();$.each(buttons,function(){return!(hasButtons=true);});if(hasButtons){uiDialogButtonPane.show();$.each(buttons,function(name,fn){$('<button/>').text(name).click(function(){fn.apply(self.element[0],arguments);}).appendTo(uiDialogButtonPane);});}}});$.extend($.ui.dialog,{defaults:{autoOpen:true,autoResize:true,bgiframe:false,buttons:{},closeOnEscape:true,draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:'center',resizable:true,stack:true,width:300,zIndex:1000},overlay:function(dialog){this.$el=$.ui.dialog.overlay.create(dialog);}});$.extend($.ui.dialog.overlay,{instances:[],events:$.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),function(e){return e+'.dialog-overlay';}).join(' '),create:function(dialog){if(this.instances.length===0){setTimeout(function(){$('a, :input').bind($.ui.dialog.overlay.events,function(){var allow=false;var $dialog=$(this).parents('.ui-dialog');if($dialog.length){var $overlays=$('.ui-dialog-overlay');if($overlays.length){var maxZ=parseInt($overlays.css('z-index'),10);$overlays.each(function(){maxZ=Math.max(maxZ,parseInt($(this).css('z-index'),10));});allow=parseInt($dialog.css('z-index'),10)>maxZ;}else{allow=true;}}
return allow;});},1);$(document).bind('keydown.dialog-overlay',function(e){var ESC=27;(e.keyCode&&e.keyCode==ESC&&dialog.close());});$(window).bind('resize.dialog-overlay',$.ui.dialog.overlay.resize);}
var $el=$('<div/>').appendTo(document.body).addClass('ui-dialog-overlay').css($.extend({borderWidth:0,margin:0,padding:0,position:'absolute',top:0,left:0,width:this.width(),height:this.height()},dialog.options.overlay));(dialog.options.bgiframe&&$.fn.bgiframe&&$el.bgiframe());this.instances.push($el);return $el;},destroy:function($el){this.instances.splice($.inArray(this.instances,$el),1);if(this.instances.length===0){$('a, :input').add([document,window]).unbind('.dialog-overlay');}
$el.remove();},height:function(){if($.browser.msie&&$.browser.version<7){var scrollHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(scrollHeight<offsetHeight){return $(window).height()+'px';}else{return scrollHeight+'px';}}else{return $(document).height()+'px';}},width:function(){if($.browser.msie&&$.browser.version<7){var scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(scrollWidth<offsetWidth){return $(window).width()+'px';}else{return scrollWidth+'px';}}else{return $(document).width()+'px';}},resize:function(){var $overlays=$([]);$.each($.ui.dialog.overlay.instances,function(){$overlays=$overlays.add(this);});$overlays.css({width:0,height:0}).css({width:$.ui.dialog.overlay.width(),height:$.ui.dialog.overlay.height()});}});$.extend($.ui.dialog.overlay.prototype,{destroy:function(){$.ui.dialog.overlay.destroy(this.$el);}});})(jQuery);(function($){$.fn.unwrap=$.fn.unwrap||function(expr){return this.each(function(){$(this).parents(expr).eq(0).after(this).remove();});};$.widget("ui.slider",{plugins:{},ui:function(e){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:Math.round(this.value(null,"x")),y:Math.round(this.value(null,"y"))},range:this.getRange()};},propagate:function(n,e){$.ui.plugin.call(this,n,[e,this.ui()]);this.element.triggerHandler(n=="slide"?n:"slide"+n,[e,this.ui()],this.options[n]);},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){$(this).data("mouse").mouseDestroy();});}
this.generated&&this.generated.remove();},setData:function(key,value){$.widget.prototype.setData.apply(this,arguments);if(/min|max|steps/.test(key)){this.initBoundaries();}
if(key=="range"){value?this.handle.length==2&&this.createRange():this.removeRange();}},init:function(){var self=this;this.element.addClass("ui-slider");this.initBoundaries();this.handle=$(this.options.handle,this.element);if(!this.handle.length){self.handle=self.generated=$(self.options.handles||[0]).map(function(){var handle=$("<div/>").addClass("ui-slider-handle").appendTo(self.element);if(this.id)
handle.attr("id",this.id);return handle[0];});}
var handleclass=function(el){this.element=$(el);this.element.data("mouse",this);this.options=self.options;this.element.bind("mousedown",function(){if(self.currentHandle)this.blur(self.currentHandle);self.focus(this,1);});this.mouseInit();};$.extend(handleclass.prototype,$.ui.mouse,{mouseStart:function(e){return self.start.call(self,e,this.element[0]);},mouseStop:function(e){return self.stop.call(self,e,this.element[0]);},mouseDrag:function(e){return self.drag.call(self,e,this.element[0]);},mouseCapture:function(){return true;},trigger:function(e){this.mouseDown(e);}});$(this.handle).each(function(){new handleclass(this);}).wrap('<a href="javascript:void(0)" style="outline:none;border:none;"></a>').parent().bind('focus',function(e){self.focus(this.firstChild);}).bind('blur',function(e){self.blur(this.firstChild);}).bind('keydown',function(e){if(!self.options.noKeyboard)self.keydown(e.keyCode,this.firstChild);});this.element.bind('mousedown.slider',function(e){self.click.apply(self,[e]);self.currentHandle.data("mouse").trigger(e);self.firstValue=self.firstValue+1;});$.each(this.options.handles||[],function(index,handle){self.moveTo(handle.start,index,true);});if(!isNaN(this.options.startValue))
this.moveTo(this.options.startValue,0,true);this.previousHandle=$(this.handle[0]);if(this.handle.length==2&&this.options.range)this.createRange();},initBoundaries:function(){var element=this.element[0],o=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};$.extend(o,{axis:o.axis||(element.offsetWidth<element.offsetHeight?'vertical':'horizontal'),max:!isNaN(parseInt(o.max,10))?{x:parseInt(o.max,10),y:parseInt(o.max,10)}:({x:o.max&&o.max.x||100,y:o.max&&o.max.y||100}),min:!isNaN(parseInt(o.min,10))?{x:parseInt(o.min,10),y:parseInt(o.min,10)}:({x:o.min&&o.min.x||0,y:o.min&&o.min.y||0})});o.realMax={x:o.max.x-o.min.x,y:o.max.y-o.min.y};o.stepping={x:o.stepping&&o.stepping.x||parseInt(o.stepping,10)||(o.steps?o.realMax.x/(o.steps.x||parseInt(o.steps,10)||o.realMax.x):0),y:o.stepping&&o.stepping.y||parseInt(o.stepping,10)||(o.steps?o.realMax.y/(o.steps.y||parseInt(o.steps,10)||o.realMax.y):0)};},keydown:function(keyCode,handle){if(/(37|38|39|40)/.test(keyCode)){this.moveTo({x:/(37|39)/.test(keyCode)?(keyCode==37?'-':'+')+'='+this.oneStep("x"):0,y:/(38|40)/.test(keyCode)?(keyCode==38?'-':'+')+'='+this.oneStep("y"):0},handle);}},focus:function(handle,hard){this.currentHandle=$(handle).addClass('ui-slider-handle-active');if(hard)
this.currentHandle.parent()[0].focus();},blur:function(handle){$(handle).removeClass('ui-slider-handle-active');if(this.currentHandle&&this.currentHandle[0]==handle){this.previousHandle=this.currentHandle;this.currentHandle=null;};},click:function(e){var pointer=[e.pageX,e.pageY];var clickedHandle=false;this.handle.each(function(){if(this==e.target)
clickedHandle=true;});if(clickedHandle||this.options.disabled||!(this.currentHandle||this.previousHandle))
return;if(!this.currentHandle&&this.previousHandle)
this.focus(this.previousHandle,true);this.offset=this.element.offset();this.moveTo({y:this.convertValue(e.pageY-this.offset.top-this.currentHandle[0].offsetHeight/2,"y"),x:this.convertValue(e.pageX-this.offset.left-this.currentHandle[0].offsetWidth/2,"x")},null,!this.options.distance);},createRange:function(){if(this.rangeElement)return;this.rangeElement=$('<div></div>').addClass('ui-slider-range').css({position:'absolute'}).appendTo(this.element);this.updateRange();},removeRange:function(){this.rangeElement.remove();this.rangeElement=null;},updateRange:function(){var prop=this.options.axis=="vertical"?"top":"left";var size=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(prop,(parseInt($(this.handle[0]).css(prop),10)||0)+this.handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(size,(parseInt($(this.handle[1]).css(prop),10)||0)-(parseInt($(this.handle[0]).css(prop),10)||0));},getRange:function(){return this.rangeElement?this.convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10),this.options.axis=="vertical"?"y":"x"):null;},handleIndex:function(){return this.handle.index(this.currentHandle[0]);},value:function(handle,axis){if(this.handle.length==1)this.currentHandle=this.handle;if(!axis)axis=this.options.axis=="vertical"?"y":"x";var curHandle=$(handle!=undefined&&handle!==null?this.handle[handle]||handle:this.currentHandle);if(curHandle.data("mouse").sliderValue){return parseInt(curHandle.data("mouse").sliderValue[axis],10);}else{return parseInt(((parseInt(curHandle.css(axis=="x"?"left":"top"),10)/(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(handle,axis)))*this.options.realMax[axis])+this.options.min[axis],10);}},convertValue:function(value,axis){return this.options.min[axis]+(value/(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis)))*this.options.realMax[axis];},translateValue:function(value,axis){return((value-this.options.min[axis])/this.options.realMax[axis])*(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis));},translateRange:function(value,axis){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&value>=this.translateValue(this.value(1),axis))
value=this.translateValue(this.value(1,axis)-this.oneStep(axis),axis);if(this.currentHandle[0]==this.handle[1]&&value<=this.translateValue(this.value(0),axis))
value=this.translateValue(this.value(0,axis)+this.oneStep(axis),axis);}
if(this.options.handles){var handle=this.options.handles[this.handleIndex()];if(value<this.translateValue(handle.min,axis)){value=this.translateValue(handle.min,axis);}else if(value>this.translateValue(handle.max,axis)){value=this.translateValue(handle.max,axis);}}
return value;},translateLimits:function(value,axis){if(value>=this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis))
value=this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis);if(value<=0)
value=0;return value;},handleSize:function(handle,axis){return $(handle!=undefined&&handle!==null?this.handle[handle]:this.currentHandle)[0]["offset"+(axis=="x"?"Width":"Height")];},oneStep:function(axis){return this.options.stepping[axis]||1;},start:function(e,handle){var o=this.options;if(o.disabled)return false;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle)
this.focus(this.previousHandle,true);this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:e.pageY-this.handleOffset.top,left:e.pageX-this.handleOffset.left};this.firstValue=this.value();this.propagate('start',e);this.drag(e,handle);return true;},stop:function(e){this.propagate('stop',e);if(this.firstValue!=this.value())
this.propagate('change',e);this.focus(this.currentHandle,true);return false;},drag:function(e,handle){var o=this.options;var position={top:e.pageY-this.offset.top-this.clickOffset.top,left:e.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle)this.focus(this.previousHandle,true);position.left=this.translateLimits(position.left,"x");position.top=this.translateLimits(position.top,"y");if(o.stepping.x){var value=this.convertValue(position.left,"x");value=Math.round(value/o.stepping.x)*o.stepping.x;position.left=this.translateValue(value,"x");}
if(o.stepping.y){var value=this.convertValue(position.top,"y");value=Math.round(value/o.stepping.y)*o.stepping.y;position.top=this.translateValue(value,"y");}
position.left=this.translateRange(position.left,"x");position.top=this.translateRange(position.top,"y");if(o.axis!="vertical")this.currentHandle.css({left:position.left});if(o.axis!="horizontal")this.currentHandle.css({top:position.top});this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(position.left,"x"))||0,y:Math.round(this.convertValue(position.top,"y"))||0};if(this.rangeElement)
this.updateRange();this.propagate('slide',e);return false;},moveTo:function(value,handle,noPropagation){var o=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(handle==undefined&&!this.currentHandle&&this.handle.length!=1)
return false;if(handle==undefined&&!this.currentHandle)
handle=0;if(handle!=undefined)
this.currentHandle=this.previousHandle=$(this.handle[handle]||handle);if(value.x!==undefined&&value.y!==undefined){var x=value.x,y=value.y;}else{var x=value,y=value;}
if(x!==undefined&&x.constructor!=Number){var me=/^\-\=/.test(x),pe=/^\+\=/.test(x);if(me||pe){x=this.value(null,"x")+parseInt(x.replace(me?'=':'+=',''),10);}else{x=isNaN(parseInt(x,10))?undefined:parseInt(x,10);}}
if(y!==undefined&&y.constructor!=Number){var me=/^\-\=/.test(y),pe=/^\+\=/.test(y);if(me||pe){y=this.value(null,"y")+parseInt(y.replace(me?'=':'+=',''),10);}else{y=isNaN(parseInt(y,10))?undefined:parseInt(y,10);}}
if(o.axis!="vertical"&&x!==undefined){if(o.stepping.x)x=Math.round(x/o.stepping.x)*o.stepping.x;x=this.translateValue(x,"x");x=this.translateLimits(x,"x");x=this.translateRange(x,"x");o.animate?this.currentHandle.stop().animate({left:x},(Math.abs(parseInt(this.currentHandle.css("left"))-x))*(!isNaN(parseInt(o.animate))?o.animate:5)):this.currentHandle.css({left:x});}
if(o.axis!="horizontal"&&y!==undefined){if(o.stepping.y)y=Math.round(y/o.stepping.y)*o.stepping.y;y=this.translateValue(y,"y");y=this.translateLimits(y,"y");y=this.translateRange(y,"y");o.animate?this.currentHandle.stop().animate({top:y},(Math.abs(parseInt(this.currentHandle.css("top"))-y))*(!isNaN(parseInt(o.animate))?o.animate:5)):this.currentHandle.css({top:y});}
if(this.rangeElement)
this.updateRange();this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(x,"x"))||0,y:Math.round(this.convertValue(y,"y"))||0};if(!noPropagation){this.propagate('start',null);this.propagate('stop',null);this.propagate('change',null);this.propagate("slide",null);}}});$.ui.slider.getter="value";$.ui.slider.defaults={handle:".ui-slider-handle",distance:1,animate:false};})(jQuery);(function($){$.widget("ui.tabs",{init:function(){this.options.event+='.tabs';this.tabify(true);},setData:function(key,value){if((/^selected/).test(key))
this.select(value);else{this.options[key]=value;this.tabify();}},length:function(){return this.$tabs.length;},tabId:function(a){return a.title&&a.title.replace(/\s/g,'_').replace(/[^A-Za-z0-9\-_:\.]/g,'')||this.options.idPrefix+$.data(a);},ui:function(tab,panel){return{options:this.options,tab:tab,panel:panel,index:this.$tabs.index(tab)};},tabify:function(init){this.$lis=$('li:has(a[href])',this.element);this.$tabs=this.$lis.map(function(){return $('a',this)[0];});this.$panels=$([]);var self=this,o=this.options;this.$tabs.each(function(i,a){if(a.hash&&a.hash.replace('#',''))
self.$panels=self.$panels.add(a.hash);else if($(a).attr('href')!='#'){$.data(a,'href.tabs',a.href);$.data(a,'load.tabs',a.href);var id=self.tabId(a);a.href='#'+id;var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).addClass(o.panelClass).insertAfter(self.$panels[i-1]||self.element);$panel.data('destroy.tabs',true);}
self.$panels=self.$panels.add($panel);}
else
o.disabled.push(i+1);});if(init){this.element.addClass(o.navClass);this.$panels.each(function(){var $this=$(this);$this.addClass(o.panelClass);});if(o.selected===undefined){if(location.hash){this.$tabs.each(function(i,a){if(a.hash==location.hash){o.selected=i;if($.browser.msie||$.browser.opera){var $toShow=$(location.hash),toShowId=$toShow.attr('id');$toShow.attr('id','');setTimeout(function(){$toShow.attr('id',toShowId);},500);}
scrollTo(0,0);return false;}});}
else if(o.cookie){var index=parseInt($.cookie('ui-tabs'+$.data(self.element)),10);if(index&&self.$tabs[index])
o.selected=index;}
else if(self.$lis.filter('.'+o.selectedClass).length)
o.selected=self.$lis.index(self.$lis.filter('.'+o.selectedClass)[0]);}
o.selected=o.selected===null||o.selected!==undefined?o.selected:0;o.disabled=$.unique(o.disabled.concat($.map(this.$lis.filter('.'+o.disabledClass),function(n,i){return self.$lis.index(n);}))).sort();if($.inArray(o.selected,o.disabled)!=-1)
o.disabled.splice($.inArray(o.selected,o.disabled),1);this.$panels.addClass(o.hideClass);this.$lis.removeClass(o.selectedClass);if(o.selected!==null){this.$panels.eq(o.selected).show().removeClass(o.hideClass);this.$lis.eq(o.selected).addClass(o.selectedClass);var onShow=function(){$(self.element).triggerHandler('tabsshow',[self.fakeEvent('tabsshow'),self.ui(self.$tabs[o.selected],self.$panels[o.selected])],o.show);};if($.data(this.$tabs[o.selected],'load.tabs'))
this.load(o.selected,onShow);else
onShow();}
$(window).bind('unload',function(){self.$tabs.unbind('.tabs');self.$lis=self.$tabs=self.$panels=null;});}
for(var i=0,li;li=this.$lis[i];i++)
$(li)[$.inArray(i,o.disabled)!=-1&&!$(li).hasClass(o.selectedClass)?'addClass':'removeClass'](o.disabledClass);if(o.cache===false)
this.$tabs.removeData('cache.tabs');var hideFx,showFx,baseFx={'min-width':0,duration:1},baseDuration='normal';if(o.fx&&o.fx.constructor==Array)
hideFx=o.fx[0]||baseFx,showFx=o.fx[1]||baseFx;else
hideFx=showFx=o.fx||baseFx;var resetCSS={display:'',overflow:'',height:''};if(!$.browser.msie)
resetCSS.opacity='';function hideTab(clicked,$hide,$show){$hide.animate(hideFx,hideFx.duration||baseDuration,function(){$hide.addClass(o.hideClass).css(resetCSS);if($.browser.msie&&hideFx.opacity)
$hide[0].style.filter='';if($show)
showTab(clicked,$show,$hide);});}
function showTab(clicked,$show,$hide){if(showFx===baseFx)
$show.css('display','block');$show.animate(showFx,showFx.duration||baseDuration,function(){$show.removeClass(o.hideClass).css(resetCSS);if($.browser.msie&&showFx.opacity)
$show[0].style.filter='';$(self.element).triggerHandler('tabsshow',[self.fakeEvent('tabsshow'),self.ui(clicked,$show[0])],o.show);});}
function switchTab(clicked,$li,$hide,$show){$li.addClass(o.selectedClass).siblings().removeClass(o.selectedClass);hideTab(clicked,$hide,$show);}
this.$tabs.unbind('.tabs').bind(o.event,function(){var $li=$(this).parents('li:eq(0)'),$hide=self.$panels.filter(':visible'),$show=$(this.hash);if(($li.hasClass(o.selectedClass)&&!o.unselect)||$li.hasClass(o.disabledClass)||$(this).hasClass(o.loadingClass)||$(self.element).triggerHandler('tabsselect',[self.fakeEvent('tabsselect'),self.ui(this,$show[0])],o.select)===false){this.blur();return false;}
self.options.selected=self.$tabs.index(this);if(o.unselect){if($li.hasClass(o.selectedClass)){self.options.selected=null;$li.removeClass(o.selectedClass);self.$panels.stop();hideTab(this,$hide);this.blur();return false;}else if(!$hide.length){self.$panels.stop();var a=this;self.load(self.$tabs.index(this),function(){$li.addClass(o.selectedClass).addClass(o.unselectClass);showTab(a,$show);});this.blur();return false;}}
if(o.cookie)
$.cookie('ui-tabs'+$.data(self.element),self.options.selected,o.cookie);self.$panels.stop();if($show.length){var a=this;self.load(self.$tabs.index(this),$hide.length?function(){switchTab(a,$li,$hide,$show);}:function(){$li.addClass(o.selectedClass);showTab(a,$show);});}else
throw'jQuery UI Tabs: Mismatching fragment identifier.';if($.browser.msie)
this.blur();return false;});if(!(/^click/).test(o.event))
this.$tabs.bind('click.tabs',function(){return false;});},add:function(url,label,index){if(index==undefined)
index=this.$tabs.length;var o=this.options;var $li=$(o.tabTemplate.replace(/#\{href\}/g,url).replace(/#\{label\}/g,label));$li.data('destroy.tabs',true);var id=url.indexOf('#')==0?url.replace('#',''):this.tabId($('a:first-child',$li)[0]);var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).addClass(o.hideClass).data('destroy.tabs',true);}
$panel.addClass(o.panelClass);if(index>=this.$lis.length){$li.appendTo(this.element);$panel.appendTo(this.element[0].parentNode);}else{$li.insertBefore(this.$lis[index]);$panel.insertBefore(this.$panels[index]);}
o.disabled=$.map(o.disabled,function(n,i){return n>=index?++n:n});this.tabify();if(this.$tabs.length==1){$li.addClass(o.selectedClass);$panel.removeClass(o.hideClass);var href=$.data(this.$tabs[0],'load.tabs');if(href)
this.load(index,href);}
this.element.triggerHandler('tabsadd',[this.fakeEvent('tabsadd'),this.ui(this.$tabs[index],this.$panels[index])],o.add);},remove:function(index){var o=this.options,$li=this.$lis.eq(index).remove(),$panel=this.$panels.eq(index).remove();if($li.hasClass(o.selectedClass)&&this.$tabs.length>1)
this.select(index+(index+1<this.$tabs.length?1:-1));o.disabled=$.map($.grep(o.disabled,function(n,i){return n!=index;}),function(n,i){return n>=index?--n:n});this.tabify();this.element.triggerHandler('tabsremove',[this.fakeEvent('tabsremove'),this.ui($li.find('a')[0],$panel[0])],o.remove);},enable:function(index){var o=this.options;if($.inArray(index,o.disabled)==-1)
return;var $li=this.$lis.eq(index).removeClass(o.disabledClass);if($.browser.safari){$li.css('display','inline-block');setTimeout(function(){$li.css('display','block');},0);}
o.disabled=$.grep(o.disabled,function(n,i){return n!=index;});this.element.triggerHandler('tabsenable',[this.fakeEvent('tabsenable'),this.ui(this.$tabs[index],this.$panels[index])],o.enable);},disable:function(index){var self=this,o=this.options;if(index!=o.selected){this.$lis.eq(index).addClass(o.disabledClass);o.disabled.push(index);o.disabled.sort();this.element.triggerHandler('tabsdisable',[this.fakeEvent('tabsdisable'),this.ui(this.$tabs[index],this.$panels[index])],o.disable);}},select:function(index){if(typeof index=='string')
index=this.$tabs.index(this.$tabs.filter('[href$='+index+']')[0]);this.$tabs.eq(index).trigger(this.options.event);},load:function(index,callback){var self=this,o=this.options,$a=this.$tabs.eq(index),a=$a[0],bypassCache=callback==undefined||callback===false,url=$a.data('load.tabs');callback=callback||function(){};if(!url||!bypassCache&&$.data(a,'cache.tabs')){callback();return;}
var inner=function(parent){var $parent=$(parent),$inner=$parent.find('*:last');return $inner.length&&$inner.is(':not(img)')&&$inner||$parent;};var cleanup=function(){self.$tabs.filter('.'+o.loadingClass).removeClass(o.loadingClass).each(function(){if(o.spinner)
inner(this).parent().html(inner(this).data('label.tabs'));});self.xhr=null;};if(o.spinner){var label=inner(a).html();inner(a).wrapInner('<em></em>').find('em').data('label.tabs',label).html(o.spinner);}
var ajaxOptions=$.extend({},o.ajaxOptions,{url:url,success:function(r,s){$(a.hash).html(r);cleanup();if(o.cache)
$.data(a,'cache.tabs',true);$(self.element).triggerHandler('tabsload',[self.fakeEvent('tabsload'),self.ui(self.$tabs[index],self.$panels[index])],o.load);o.ajaxOptions.success&&o.ajaxOptions.success(r,s);callback();}});if(this.xhr){this.xhr.abort();cleanup();}
$a.addClass(o.loadingClass);setTimeout(function(){self.xhr=$.ajax(ajaxOptions);},0);},url:function(index,url){this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs',url);},destroy:function(){var o=this.options;this.element.unbind('.tabs').removeClass(o.navClass).removeData('tabs');this.$tabs.each(function(){var href=$.data(this,'href.tabs');if(href)
this.href=href;var $this=$(this).unbind('.tabs');$.each(['href','load','cache'],function(i,prefix){$this.removeData(prefix+'.tabs');});});this.$lis.add(this.$panels).each(function(){if($.data(this,'destroy.tabs'))
$(this).remove();else
$(this).removeClass([o.selectedClass,o.unselectClass,o.disabledClass,o.panelClass,o.hideClass].join(' '));});},fakeEvent:function(type){return $.event.fix({type:type,target:this.element[0]});}});$.ui.tabs.defaults={unselect:false,event:'click',disabled:[],cookie:null,spinner:'Loading&#8230;',cache:false,idPrefix:'ui-tabs-',ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:'<div></div>',navClass:'ui-tabs-nav',selectedClass:'ui-tabs-selected',unselectClass:'ui-tabs-unselect',disabledClass:'ui-tabs-disabled',panelClass:'ui-tabs-panel',hideClass:'ui-tabs-hide',loadingClass:'ui-tabs-loading'};$.ui.tabs.getter="length";$.extend($.ui.tabs.prototype,{rotation:null,rotate:function(ms,continuing){continuing=continuing||false;var self=this,t=this.options.selected;function start(){self.rotation=setInterval(function(){t=++t<self.$tabs.length?t:0;self.select(t);},ms);}
function stop(e){if(!e||e.clientX){clearInterval(self.rotation);}}
if(ms){start();if(!continuing)
this.$tabs.bind(this.options.event,stop);else
this.$tabs.bind(this.options.event,function(){stop();t=self.options.selected;start();});}
else{stop();this.$tabs.unbind(this.options.event,stop);}}});})(jQuery);(function($){var PROP_NAME='datepicker';function Datepicker(){this.debug=false;this._curInst=null;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId='ui-datepicker-div';this._appendClass='ui-datepicker-append';this._triggerClass='ui-datepicker-trigger';this._dialogClass='ui-datepicker-dialog';this._promptClass='ui-datepicker-prompt';this._unselectableClass='ui-datepicker-unselectable';this._currentClass='ui-datepicker-current-day';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 DD, M d',dateFormat:'mm/dd/yy',firstDay:0,initStatus:'Select a date',isRTL:false};this._defaults={showOn:'focus',showAnim:'show',showOptions:{},defaultDate:null,appendText:'',buttonText:'...',buttonImage:'',buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:true,changeYear:true,yearRange:'-10:+10',changeFirstDay:true,highlightWeek:false,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:'+10',showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,duration:'normal',beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,stepMonths:1,rangeSelect:false,rangeSeparator:' - ',altField:'',altFormat:''};$.extend(this._defaults,this.regional['']);this.dpDiv=$('<div id="'+this._mainDivId+'" style="display: none;"></div>');}
$.extend(Datepicker.prototype,{markerClassName:'hasDatepicker',log:function(){if(this.debug)
console.log.apply('',arguments);},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this;},_attachDatepicker:function(target,settings){var inlineSettings=null;for(attrName in this._defaults){var attrValue=target.getAttribute('date:'+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue);}catch(err){inlineSettings[attrName]=attrValue;}}}
var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=='div'||nodeName=='span');if(!target.id)
target.id='dp'+new Date().getTime();var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=='input'){this._connectDatepicker(target,inst);}else if(inline){this._inlineDatepicker(target,inst);}},_newInst:function(target,inline){return{id:target[0].id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="ui-datepicker-inline"></div>'))};},_connectDatepicker:function(target,inst){var input=$(target);if(input.hasClass(this.markerClassName))
return;var appendText=this._get(inst,'appendText');var isRTL=this._get(inst,'isRTL');if(appendText)
input[isRTL?'before':'after']('<span class="'+this._appendClass+'">'+appendText+'</span>');var showOn=this._get(inst,'showOn');if(showOn=='focus'||showOn=='both')
input.focus(this._showDatepicker);if(showOn=='button'||showOn=='both'){var buttonText=this._get(inst,'buttonText');var buttonImage=this._get(inst,'buttonImage');var trigger=$(this._get(inst,'buttonImageOnly')?$('<img/>').addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==''?buttonText:$('<img/>').attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?'before':'after'](trigger);trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target)
$.datepicker._hideDatepicker();else
$.datepicker._showDatepicker(target);return false;});}
input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value;}).bind("getData.datepicker",function(event,key){return this._get(inst,key);});$.data(target,PROP_NAME,inst);},_inlineDatepicker:function(target,inst){var input=$(target);if(input.hasClass(this.markerClassName))
return;input.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value;}).bind("getData.datepicker",function(event,key){return this._get(inst,key);});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id='dp'+new Date().getTime();this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$('body').append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst);}
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.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI)
$.blockUI(this.dpDiv);$.data(this._dialogInput[0],PROP_NAME,inst);return this;},_destroyDatepicker:function(target){var nodeName=target.nodeName.toLowerCase();var $target=$(target);$.removeData(target,PROP_NAME);if(nodeName=='input'){$target.siblings('.'+this._appendClass).remove().end().siblings('.'+this._triggerClass).remove().end().removeClass(this.markerClassName).unbind('focus',this._showDatepicker).unbind('keydown',this._doKeyDown).unbind('keypress',this._doKeyPress);}else if(nodeName=='div'||nodeName=='span')
$target.removeClass(this.markerClassName).empty();},_enableDatepicker:function(target){target.disabled=false;$(target).siblings('button.'+this._triggerClass).each(function(){this.disabled=false;}).end().siblings('img.'+this._triggerClass).css({opacity:'1.0',cursor:''});this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value);});},_disableDatepicker:function(target){target.disabled=true;$(target).siblings('button.'+this._triggerClass).each(function(){this.disabled=true;}).end().siblings('img.'+this._triggerClass).css({opacity:'0.5',cursor:'default'});this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value);});this._disabledInputs[this._disabledInputs.length]=target;},_isDisabledDatepicker:function(target){if(!target)
return false;for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target)
return true;}
return false;},_changeDatepicker:function(target,name,value){var settings=name||{};if(typeof name=='string'){settings={};settings[name]=value;}
if(inst=$.data(target,PROP_NAME)){extendRemove(inst.settings,settings);this._updateDatepicker(inst);}},_setDateDatepicker:function(target,date,endDate){var inst=$.data(target,PROP_NAME);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);}},_getDateDatepicker:function(target){var inst=$.data(target,PROP_NAME);if(inst)
this._setDateFromField(inst);return(inst?this._getDate(inst):null);},_doKeyDown:function(e){var inst=$.data(e.target,PROP_NAME);var handled=true;if($.datepicker._datepickerShowing)
switch(e.keyCode){case 9:$.datepicker._hideDatepicker(null,'');break;case 13:$.datepicker._selectDay(e.target,inst.selectedMonth,inst.selectedYear,$('td.ui-datepicker-days-cell-over',inst.dpDiv)[0]);return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,'duration'));break;case 33:$.datepicker._adjustDate(e.target,(e.ctrlKey?-1:-$.datepicker._get(inst,'stepMonths')),(e.ctrlKey?'Y':'M'));break;case 34:$.datepicker._adjustDate(e.target,(e.ctrlKey?+1:+$.datepicker._get(inst,'stepMonths')),(e.ctrlKey?'Y':'M'));break;case 35:if(e.ctrlKey)$.datepicker._clearDate(e.target);break;case 36:if(e.ctrlKey)$.datepicker._gotoToday(e.target);break;case 37:if(e.ctrlKey)$.datepicker._adjustDate(e.target,-1,'D');break;case 38:if(e.ctrlKey)$.datepicker._adjustDate(e.target,-7,'D');break;case 39:if(e.ctrlKey)$.datepicker._adjustDate(e.target,+1,'D');break;case 40:if(e.ctrlKey)$.datepicker._adjustDate(e.target,+7,'D');break;default:handled=false;}
else if(e.keyCode==36&&e.ctrlKey)
$.datepicker._showDatepicker(this);else
handled=false;if(handled){e.preventDefault();e.stopPropagation();}},_doKeyPress:function(e){var inst=$.data(e.target,PROP_NAME);var chars=$.datepicker._possibleChars($.datepicker._get(inst,'dateFormat'));var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||(chr<' '||!chars||chars.indexOf(chr)>-1);},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!='input')
input=$('input',input.parentNode)[0];if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input)
return;var inst=$.data(input,PROP_NAME);var beforeShow=$.datepicker._get(inst,'beforeShow');extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,'');$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);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';return!isFixed;});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop;}
var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:'absolute',display:'block',top:'-1000px'});$.datepicker._updateDatepicker(inst);inst.dpDiv.width($.datepicker._getNumberOfMonths(inst)[1]*$('.ui-datepicker',inst.dpDiv[0])[0].offsetWidth);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?'static':(isFixed?'fixed':'absolute')),display:'none',left:offset.left+'px',top:offset.top+'px'});if(!inst.inline){var showAnim=$.datepicker._get(inst,'showAnim')||'show';var duration=$.datepicker._get(inst,'duration');var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version)<7)
$('iframe.ui-datepicker-cover').css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4});};if($.effects&&$.effects[showAnim])
inst.dpDiv.show(showAnim,$.datepicker._get(inst,'showOptions'),duration,postProcess);else
inst.dpDiv[showAnim](duration,postProcess);if(duration=='')
postProcess();if(inst.input[0].type!='hidden')
inst.input[0].focus();$.datepicker._curInst=inst;}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};inst.dpDiv.empty().append(this._generateDatepicker(inst)).find('iframe.ui-datepicker-cover').css({width:dims.width,height:dims.height});var numMonths=this._getNumberOfMonths(inst);inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?'add':'remove')+'Class']('ui-datepicker-multi');inst.dpDiv[(this._get(inst,'isRTL')?'add':'remove')+'Class']('ui-datepicker-rtl');if(inst.input&&inst.input[0].type!='hidden')
$(inst.input[0]).focus();},_checkOffset:function(inst,offset,isFixed){var pos=inst.input?this._findPos(inst.input[0]):null;var browserWidth=window.innerWidth||document.documentElement.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;if(this._get(inst,'isRTL')||(offset.left+inst.dpDiv.width()-scrollX)>browserWidth)
offset.left=Math.max((isFixed?0:scrollX),pos[0]+(inst.input?inst.input.width():0)-(isFixed?scrollX:0)-inst.dpDiv.width()-
(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0));else
offset.left-=(isFixed?scrollX:0);if((offset.top+inst.dpDiv.height()-scrollY)>browserHeight)
offset.top=Math.max((isFixed?0:scrollY),pos[1]-(isFixed?scrollY:0)-(this._inDialog?0:inst.dpDiv.height())-
(isFixed&&$.browser.opera?document.documentElement.scrollTop:0));else
offset.top-=(isFixed?scrollY:0);return offset;},_findPos:function(obj){while(obj&&(obj.type=='hidden'||obj.nodeType!=1)){obj=obj.nextSibling;}
var position=$(obj).offset();return[position.left,position.top];},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst)
return;var rangeSelect=this._get(inst,'rangeSelect');if(rangeSelect&&this._stayOpen)
this._selectDate('#'+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));this._stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,'duration'));var showAnim=this._get(inst,'showAnim');var postProcess=function(){$.datepicker._tidyDialog(inst);};if(duration!=''&&$.effects&&$.effects[showAnim])
inst.dpDiv.hide(showAnim,$.datepicker._get(inst,'showOptions'),duration,postProcess);else
inst.dpDiv[(duration==''?'hide':(showAnim=='slideDown'?'slideUp':(showAnim=='fadeIn'?'fadeOut':'hide')))](duration,postProcess);if(duration=='')
this._tidyDialog(inst);var onClose=this._get(inst,'onClose');if(onClose)
onClose.apply((inst.input?inst.input[0]:null),[this._getDate(inst),inst]);this._datepickerShowing=false;this._lastInput=null;inst.settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:'absolute',left:'0',top:'-100px'});if($.blockUI){$.unblockUI();$('body').append(this.dpDiv);}}
this._inDialog=false;}
this._curInst=null;},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker');$('.'+this._promptClass,inst.dpDiv).remove();},_checkExternalClick:function(event){if(!$.datepicker._curInst)
return;var $target=$(event.target);if(($target.parents('#'+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI))
$.datepicker._hideDatepicker(null,'');},_adjustDate:function(id,offset,period){var target=$(id);var inst=$.data(target[0],PROP_NAME);this._adjustInstDate(inst,offset,period);this._updateDatepicker(inst);},_gotoToday:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(this._get(inst,'gotoCurrent')&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear;}
else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();}
this._adjustDate(target);this._notifyChange(inst);},_selectMonthYear:function(id,select,period){var target=$(id);var inst=$.data(target[0],PROP_NAME);inst._selectingMonthYear=false;inst[period=='M'?'drawMonth':'drawYear']=select.options[select.selectedIndex].value-0;this._adjustDate(target);this._notifyChange(inst);},_clickMonthYear:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie)
inst.input[0].focus();inst._selectingMonthYear=!inst._selectingMonthYear;},_changeFirstDay:function(id,day){var target=$(id);var inst=$.data(target[0],PROP_NAME);inst.settings.firstDay=day;this._updateDatepicker(inst);},_selectDay:function(id,month,year,td){if($(td).hasClass(this._unselectableClass))
return;var target=$(id);var inst=$.data(target[0],PROP_NAME);var rangeSelect=this._get(inst,'rangeSelect');if(rangeSelect){this._stayOpen=!this._stayOpen;if(this._stayOpen){$('.ui-datepicker td').removeClass(this._currentClass);$(td).addClass(this._currentClass);}}
inst.selectedDay=inst.currentDay=$('a',td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(this._stayOpen){inst.endDay=inst.endMonth=inst.endYear=null;}
else if(rangeSelect){inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear;}
this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(this._stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst);}
else if(rangeSelect){inst.selectedDay=inst.currentDay=inst.rangeStart.getDate();inst.selectedMonth=inst.currentMonth=inst.rangeStart.getMonth();inst.selectedYear=inst.currentYear=inst.rangeStart.getFullYear();inst.rangeStart=null;if(inst.inline)
this._updateDatepicker(inst);}},_clearDate:function(id){var target=$(id);var inst=$.data(target[0],PROP_NAME);if(this._get(inst,'mandatory'))
return;this._stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,'');},_selectDate:function(id,dateStr){var target=$(id);var inst=$.data(target[0],PROP_NAME);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(this._get(inst,'rangeSelect')&&dateStr)
dateStr=(inst.rangeStart?this._formatDate(inst,inst.rangeStart):dateStr)+this._get(inst,'rangeSeparator')+dateStr;if(inst.input)
inst.input.val(dateStr);this._updateAlternate(inst);var onSelect=this._get(inst,'onSelect');if(onSelect)
onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);else if(inst.input)
inst.input.trigger('change');if(inst.inline)
this._updateDatepicker(inst);else if(!this._stayOpen){this._hideDatepicker(null,this._get(inst,'duration'));this._lastInput=inst.input[0];if(typeof(inst.input[0])!='object')
inst.input[0].focus();this._lastInput=null;}},_updateAlternate:function(inst){var altField=this._get(inst,'altField');if(altField){var altFormat=this._get(inst,'altFormat');var date=this._getDate(inst);dateStr=(isArray(date)?(!date[0]&&!date[1]?'':this.formatDate(altFormat,date[0],this._getFormatConfig(inst))+
this._get(inst,'rangeSeparator')+this.formatDate(altFormat,date[1]||date[0],this._getFormatConfig(inst))):this.formatDate(altFormat,date,this._getFormatConfig(inst)));$(altField).each(function(){$(this).val(dateStr);});}},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($.datepicker._get(inst,'dateStatus'),date,$.datepicker._getFormatConfig(inst));},parseDate:function(format,value,settings){if(format==null||value==null)
throw'Invalid arguments';value=(typeof value=='object'?value.toString():value+'');if(value=='')
return null;var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||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 origSize=(match=='@'?14:(match=='y'?4:2));var size=origSize;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==origSize)
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'@':var date=new Date(getNumber('@'));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();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=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day)
throw'Invalid date';return date;},ATOM:'yy-mm-dd',COOKIE:'D, dd M yy',ISO_8601:'yy-mm-dd',RFC_822:'D, d M y',RFC_850:'DD, dd-M-y',RFC_1036:'D, d M y',RFC_1123:'D, d M yy',RFC_2822:'D, d M yy',RSS:'D, d M y',TIMESTAMP:'@',W3C:'yy-mm-dd',formatDate:function(format,date,settings){if(!date)
return'';var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||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'@':output+=date.getTime();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':case'@':chars+='0123456789';break;case'D':case'M':return null;case"'":if(lookAhead("'"))
chars+="'";else
literal=true;break;default:chars+=format.charAt(iFormat);}
return chars;},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name];},_setDateFromField:function(inst){var dateFormat=this._get(inst,'dateFormat');var dates=inst.input?inst.input.val().split(this._get(inst,'rangeSeparator')):null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);if(dates.length>0){var settings=this._getFormatConfig(inst);if(dates.length>1){date=this.parseDate(dateFormat,dates[1],settings)||defaultDate;inst.endDay=date.getDate();inst.endMonth=date.getMonth();inst.endYear=date.getFullYear();}
try{date=this.parseDate(dateFormat,dates[0],settings)||defaultDate;}catch(e){this.log(e);date=defaultDate;}}
inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates[0]?date.getDate():0);inst.currentMonth=(dates[0]?date.getMonth():0);inst.currentYear=(dates[0]?date.getFullYear():0);this._adjustInstDate(inst);},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,'defaultDate'),new Date());var minDate=this._getMinMaxDate(inst,'min',true);var maxDate=this._getMinMaxDate(inst,'max');date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date;},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date;};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||'d'){case'd':case'D':day+=(matches[1]-0);break;case'w':case'W':day+=(matches[1]*7);break;case'm':case'M':month+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break;case'y':case'Y':year+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break;}
matches=pattern.exec(offset);}
return new Date(year,month,day);};date=(date==null?defaultDate:(typeof date=='string'?offsetString(date,this._getDaysInMonth):(typeof date=='number'?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=='Invalid Date'?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0);}
return this._daylightSavingAdjust(date);},_daylightSavingAdjust:function(date){if(!date)return null;date.setHours(date.getHours()>12?date.getHours()+2:0);return date;},_setDate:function(inst,date,endDate){var clear=!(date);date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(this._get(inst,'rangeSelect')){if(endDate){endDate=this._determineDate(endDate,null);inst.endDay=endDate.getDate();inst.endMonth=endDate.getMonth();inst.endYear=endDate.getFullYear();}else{inst.endDay=inst.currentDay;inst.endMonth=inst.currentMonth;inst.endYear=inst.currentYear;}}
this._adjustInstDate(inst);if(inst.input)
inst.input.val(clear?'':this._formatDate(inst)+
(!this._get(inst,'rangeSelect')?'':this._get(inst,'rangeSeparator')+
this._formatDate(inst,inst.endDay,inst.endMonth,inst.endYear)));},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=='')?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));if(this._get(inst,'rangeSelect')){return[inst.rangeStart||startDate,(!inst.endYear?inst.rangeStart||startDate:this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)))];}else
return startDate;},_generateDatepicker:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var showStatus=this._get(inst,'showStatus');var isRTL=this._get(inst,'isRTL');var clear=(this._get(inst,'mandatory')?'':'<div class="ui-datepicker-clear"><a onclick="jQuery.datepicker._clearDate(\'#'+inst.id+'\');"'+
(showStatus?this._addStatus(inst,this._get(inst,'clearStatus')||'&#xa0;'):'')+'>'+
this._get(inst,'clearText')+'</a></div>');var controls='<div class="ui-datepicker-control">'+(isRTL?'':clear)+'<div class="ui-datepicker-close"><a onclick="jQuery.datepicker._hideDatepicker();"'+
(showStatus?this._addStatus(inst,this._get(inst,'closeStatus')||'&#xa0;'):'')+'>'+
this._get(inst,'closeText')+'</a></div>'+(isRTL?clear:'')+'</div>';var prompt=this._get(inst,'prompt');var closeAtTop=this._get(inst,'closeAtTop');var hideIfNoPrevNext=this._get(inst,'hideIfNoPrevNext');var navigationAsDateFormat=this._get(inst,'navigationAsDateFormat');var numMonths=this._getNumberOfMonths(inst);var stepMonths=this._get(inst,'stepMonths');var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,'min',true);var maxDate=this._getMinMaxDate(inst,'max');var drawMonth=inst.drawMonth;var drawYear=inst.drawYear;if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--;}}}
var prevText=this._get(inst,'prevText');prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev='<div class="ui-datepicker-prev">'+(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a onclick="jQuery.datepicker._adjustDate(\'#'+inst.id+'\', -'+stepMonths+', \'M\');"'+
(showStatus?this._addStatus(inst,this._get(inst,'prevStatus')||'&#xa0;'):'')+'>'+prevText+'</a>':(hideIfNoPrevNext?'':'<label>'+prevText+'</label>'))+'</div>';var nextText=this._get(inst,'nextText');nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next='<div class="ui-datepicker-next">'+(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a onclick="jQuery.datepicker._adjustDate(\'#'+inst.id+'\', +'+stepMonths+', \'M\');"'+
(showStatus?this._addStatus(inst,this._get(inst,'nextStatus')||'&#xa0;'):'')+'>'+nextText+'</a>':(hideIfNoPrevNext?'':'<label>'+nextText+'</label>'))+'</div>';var currentText=this._get(inst,'currentText');currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,today,this._getFormatConfig(inst)));var html=(prompt?'<div class="'+this._promptClass+'">'+prompt+'</div>':'')+
(closeAtTop&&!inst.inline?controls:'')+'<div class="ui-datepicker-links">'+(isRTL?next:prev)+
(this._isInRange(inst,(this._get(inst,'gotoCurrent')&&inst.currentDay?currentDate:today))?'<div class="ui-datepicker-current">'+'<a onclick="jQuery.datepicker._gotoToday(\'#'+inst.id+'\');"'+
(showStatus?this._addStatus(inst,this._get(inst,'currentStatus')||'&#xa0;'):'')+'>'+
currentText+'</a></div>':'')+(isRTL?prev:next)+'</div>';var firstDay=this._get(inst,'firstDay');var changeFirstDay=this._get(inst,'changeFirstDay');var dayNames=this._get(inst,'dayNames');var dayNamesShort=this._get(inst,'dayNamesShort');var dayNamesMin=this._get(inst,'dayNamesMin');var monthNames=this._get(inst,'monthNames');var beforeShowDay=this._get(inst,'beforeShowDay');var highlightWeek=this._get(inst,'highlightWeek');var showOtherMonths=this._get(inst,'showOtherMonths');var showWeeks=this._get(inst,'showWeeks');var calculateWeek=this._get(inst,'calculateWeek')||this.iso8601Week;var status=(showStatus?this._get(inst,'dayStatus')||'&#xa0;':'');var dateStatus=this._get(inst,'statusForDate')||this.dateStatus;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;for(var row=0;row<numMonths[0];row++)
for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));html+='<div class="ui-datepicker-one-month'+(col==0?' ui-datepicker-new-row':'')+'">'+
this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,showStatus,monthNames)+'<table class="ui-datepicker" cellpadding="0" cellspacing="0"><thead>'+'<tr class="ui-datepicker-title-row">'+
(showWeeks?'<td>'+this._get(inst,'weekHeader')+'</td>':'');for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;var dayStatus=(status.indexOf('DD')>-1?status.replace(/DD/,dayNames[day]):status.replace(/D/,dayNamesShort[day]));html+='<td'+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end-cell"':'')+'>'+
(!changeFirstDay?'<span':'<a onclick="jQuery.datepicker._changeFirstDay(\'#'+inst.id+'\', '+day+');"')+
(showStatus?this._addStatus(inst,dayStatus):'')+' title="'+dayNames[day]+'">'+
dayNamesMin[day]+(changeFirstDay?'</a>':'</span>')+'</td>';}
html+='</tr></thead><tbody>';var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth)
inst.selectedDay=Math.min(inst.selectedDay,daysInMonth);var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){html+='<tr class="ui-datepicker-days-row">'+
(showWeeks?'<td class="ui-datepicker-week-col">'+calculateWeek(printDate)+'</td>':'');for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,'']);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);html+='<td class="ui-datepicker-days-cell'+
((dow+firstDay+6)%7>=5?' ui-datepicker-week-end-cell':'')+
(otherMonth?' ui-datepicker-otherMonth':'')+
(printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth?' ui-datepicker-days-cell-over':'')+
(unselectable?' '+this._unselectableClass:'')+
(otherMonth&&!showOtherMonths?'':' '+daySettings[1]+
(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?' '+this._currentClass:'')+
(printDate.getTime()==today.getTime()?' ui-datepicker-today':''))+'"'+
((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':'')+
(unselectable?(highlightWeek?' onmouseover="jQuery(this).parent().addClass(\'ui-datepicker-week-over\');"'+' onmouseout="jQuery(this).parent().removeClass(\'ui-datepicker-week-over\');"':''):' onmouseover="jQuery(this).addClass(\'ui-datepicker-days-cell-over\')'+
(highlightWeek?'.parent().addClass(\'ui-datepicker-week-over\')':'')+';'+
(!showStatus||(otherMonth&&!showOtherMonths)?'':'jQuery(\'#ui-datepicker-status-'+
inst.id+'\').html(\''+(dateStatus.apply((inst.input?inst.input[0]:null),[printDate,inst])||'&#xa0;')+'\');')+'"'+' onmouseout="jQuery(this).removeClass(\'ui-datepicker-days-cell-over\')'+
(highlightWeek?'.parent().removeClass(\'ui-datepicker-week-over\')':'')+';'+
(!showStatus||(otherMonth&&!showOtherMonths)?'':'jQuery(\'#ui-datepicker-status-'+
inst.id+'\').html(\'&#xa0;\');')+'" onclick="jQuery.datepicker._selectDay(\'#'+
inst.id+'\','+drawMonth+','+drawYear+', this);"')+'>'+
(otherMonth?(showOtherMonths?printDate.getDate():'&#xa0;'):(unselectable?printDate.getDate():'<a>'+printDate.getDate()+'</a>'))+'</td>';printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate);}
html+='</tr>';}
drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++;}
html+='</tbody></table></div>';}
html+=(showStatus?'<div style="clear: both;"></div><div id="ui-datepicker-status-'+inst.id+'" class="ui-datepicker-status">'+(this._get(inst,'initStatus')||'&#xa0;')+'</div>':'')+
(!closeAtTop&&!inst.inline?controls:'')+'<div style="clear: both;"></div>'+
($.browser.msie&&parseInt($.browser.version)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover"></iframe>':'');return html;},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,showStatus,monthNames){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var html='<div class="ui-datepicker-header">';if(secondary||!this._get(inst,'changeMonth'))
html+=monthNames[drawMonth]+'&#xa0;';else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);html+='<select class="ui-datepicker-new-month" '+'onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+'\', this, \'M\');" '+'onclick="jQuery.datepicker._clickMonthYear(\'#'+inst.id+'\');"'+
(showStatus?this._addStatus(inst,this._get(inst,'monthStatus')||'&#xa0;'):'')+'>';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(inst,'changeYear'))
html+=drawYear;else{var years=this._get(inst,'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=endYear=new Date().getFullYear();year+=parseInt(years[0],10);endYear+=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="ui-datepicker-new-year" '+'onchange="jQuery.datepicker._selectMonthYear(\'#'+inst.id+'\', this, \'Y\');" '+'onclick="jQuery.datepicker._clickMonthYear(\'#'+inst.id+'\');"'+
(showStatus?this._addStatus(inst,this._get(inst,'yearStatus')||'&#xa0;'):'')+'>';for(;year<=endYear;year++){html+='<option value="'+year+'"'+
(year==drawYear?' selected="selected"':'')+'>'+year+'</option>';}
html+='</select>';}
html+='</div>';return html;},_addStatus:function(inst,text){return' onmouseover="jQuery(\'#ui-datepicker-status-'+inst.id+'\').html(\''+text+'\');" '+'onmouseout="jQuery(\'#ui-datepicker-status-'+inst.id+'\').html(\'&#xa0;\');"';},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=='Y'?offset:0);var month=inst.drawMonth+(period=='M'?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+
(period=='D'?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,'min',true);var maxDate=this._getMinMaxDate(inst,'max');date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=='M'||period=='Y')
this._notifyChange(inst);},_notifyChange:function(inst){var onChange=this._get(inst,'onChangeMonthYear');if(onChange)
onChange.apply((inst.input?inst.input[0]:null),[new Date(inst.selectedYear,inst.selectedMonth,1),inst]);},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,'numberOfMonths');return(numMonths==null?[1,1]:(typeof numMonths=='number'?[1,numMonths]:numMonths));},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+'Date'),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date));},_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(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0)
date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));return this._isInRange(inst,date);},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,'min');var maxDate=this._getMinMaxDate(inst,'max');return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate));},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,'shortYearCutoff');shortYearCutoff=(typeof shortYearCutoff!='string'?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,'dayNamesShort'),dayNames:this._get(inst,'dayNames'),monthNamesShort:this._get(inst,'monthNamesShort'),monthNames:this._get(inst,'monthNames')};},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear;}
var date=(day?(typeof day=='object'?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,'dateFormat'),date,this._getFormatConfig(inst));}});function extendRemove(target,props){$.extend(target,props);for(var name in props)
if(props[name]==null||props[name]==undefined)
target[name]=props[name];return target;};function isArray(a){return(a&&(($.browser.safari&&typeof a=='object'&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))));};$.fn.datepicker=function(options){var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=='string'&&(options=='isDisabled'||options=='getDate'))
return $.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this[0]].concat(otherArgs));return this.each(function(){typeof options=='string'?$.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options);});};$.datepicker=new Datepicker();$(document).ready(function(){$(document.body).append($.datepicker.dpDiv).mousedown($.datepicker._checkExternalClick);});})(jQuery);;(function($){$.effects=$.effects||{};$.extend($.effects,{save:function(el,set){for(var i=0;i<set.length;i++){if(set[i]!==null)$.data(el[0],"ec.storage."+set[i],el[0].style[set[i]]);}},restore:function(el,set){for(var i=0;i<set.length;i++){if(set[i]!==null)el.css(set[i],$.data(el[0],"ec.storage."+set[i]));}},setMode:function(el,mode){if(mode=='toggle')mode=el.is(':hidden')?'show':'hide';return mode;},getBaseline:function(origin,original){var y,x;switch(origin[0]){case'top':y=0;break;case'middle':y=0.5;break;case'bottom':y=1;break;default:y=origin[0]/original.height;};switch(origin[1]){case'left':x=0;break;case'center':x=0.5;break;case'right':x=1;break;default:x=origin[1]/original.width;};return{x:x,y:y};},createWrapper:function(el){if(el.parent().attr('id')=='fxWrapper')
return el;var props={width:el.outerWidth({margin:true}),height:el.outerHeight({margin:true}),'float':el.css('float')};el.wrap('<div id="fxWrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var wrapper=el.parent();if(el.css('position')=='static'){wrapper.css({position:'relative'});el.css({position:'relative'});}else{var top=el.css('top');if(isNaN(parseInt(top)))top='auto';var left=el.css('left');if(isNaN(parseInt(left)))left='auto';wrapper.css({position:el.css('position'),top:top,left:left,zIndex:el.css('z-index')}).show();el.css({position:'relative',top:0,left:0});}
wrapper.css(props);return wrapper;},removeWrapper:function(el){if(el.parent().attr('id')=='fxWrapper')
return el.parent().replaceWith(el);return el;},setTransition:function(el,list,factor,val){val=val||{};$.each(list,function(i,x){unit=el.cssUnit(x);if(unit[0]>0)val[x]=unit[0]*factor+unit[1];});return val;},animateClass:function(value,duration,easing,callback){var cb=(typeof easing=="function"?easing:(callback?callback:null));var ea=(typeof easing=="object"?easing:null);return this.each(function(){var offset={};var that=$(this);var oldStyleAttr=that.attr("style")||'';if(typeof oldStyleAttr=='object')oldStyleAttr=oldStyleAttr["cssText"];if(value.toggle){that.hasClass(value.toggle)?value.remove=value.toggle:value.add=value.toggle;}
var oldStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add)that.addClass(value.add);if(value.remove)that.removeClass(value.remove);var newStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add)that.removeClass(value.add);if(value.remove)that.addClass(value.remove);for(var n in newStyle){if(typeof newStyle[n]!="function"&&newStyle[n]&&n.indexOf("Moz")==-1&&n.indexOf("length")==-1&&newStyle[n]!=oldStyle[n]&&(n.match(/color/i)||(!n.match(/color/i)&&!isNaN(parseInt(newStyle[n],10))))&&(oldStyle.position!="static"||(oldStyle.position=="static"&&!n.match(/left|top|bottom|right/))))offset[n]=newStyle[n];}
that.animate(offset,duration,ea,function(){if(typeof $(this).attr("style")=='object'){$(this).attr("style")["cssText"]="";$(this).attr("style")["cssText"]=oldStyleAttr;}else $(this).attr("style",oldStyleAttr);if(value.add)$(this).addClass(value.add);if(value.remove)$(this).removeClass(value.remove);if(cb)cb.apply(this,arguments);});});}});$.fn.extend({_show:$.fn.show,_hide:$.fn.hide,__toggle:$.fn.toggle,_addClass:$.fn.addClass,_removeClass:$.fn.removeClass,_toggleClass:$.fn.toggleClass,effect:function(fx,o,speed,callback){return $.effects[fx]?$.effects[fx].call(this,{method:fx,options:o||{},duration:speed,callback:callback}):null;},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0])))
return this._show.apply(this,arguments);else{var o=arguments[1]||{};o['mode']='show';return this.effect.apply(this,[arguments[0],o,arguments[2]||o.duration,arguments[3]||o.callback]);}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0])))
return this._hide.apply(this,arguments);else{var o=arguments[1]||{};o['mode']='hide';return this.effect.apply(this,[arguments[0],o,arguments[2]||o.duration,arguments[3]||o.callback]);}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||/(slow|normal|fast)/.test(arguments[0]))||(arguments[0].constructor==Function))
return this.__toggle.apply(this,arguments);else{var o=arguments[1]||{};o['mode']='toggle';return this.effect.apply(this,[arguments[0],o,arguments[2]||o.duration,arguments[3]||o.callback]);}},addClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{add:classNames},speed,easing,callback]):this._addClass(classNames);},removeClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{remove:classNames},speed,easing,callback]):this._removeClass(classNames);},toggleClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{toggle:classNames},speed,easing,callback]):this._toggleClass(classNames);},morph:function(remove,add,speed,easing,callback){return $.effects.animateClass.apply(this,[{add:add,remove:remove},speed,easing,callback]);},switchClass:function(){return this.morph.apply(this,arguments);},cssUnit:function(key){var style=this.css(key),val=[];$.each(['em','px','%','pt'],function(i,unit){if(style.indexOf(unit)>0)
val=[parseFloat(style),unit];});return val;}});jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);}
fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")";}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)
return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];if(result=/rgba\(0, 0, 0, 0\)/.exec(color))
return colors['transparent']
return colors[jQuery.trim(color).toLowerCase()];}
function getColor(elem,attr){var color;do{color=jQuery.curCSS(elem,attr);if(color!=''&&color!='transparent'||jQuery.nodeName(elem,"body"))
break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};var colors={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],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});})(jQuery);(function($){$.effects.blind=function(o){return this.queue(function(){var el=$(this),props=['position','top','left'];var mode=$.effects.setMode(el,o.options.mode||'hide');var direction=o.options.direction||'vertical';$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:'hidden'});var ref=(direction=='vertical')?'height':'width';var distance=(direction=='vertical')?wrapper.height():wrapper.width();if(mode=='show')wrapper.css(ref,0);var animation={};animation[ref]=mode=='show'?distance:0;wrapper.animate(animation,o.duration,o.options.easing,function(){if(mode=='hide')el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(el[0],arguments);el.dequeue();});});};})(jQuery);(function($){$.effects.bounce=function(o){return this.queue(function(){var el=$(this),props=['position','top','left'];var mode=$.effects.setMode(el,o.options.mode||'effect');var direction=o.options.direction||'up';var distance=o.options.distance||20;var times=o.options.times||5;var speed=o.duration||250;if(/show|hide/.test(mode))props.push('opacity');$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=='up'||direction=='down')?'top':'left';var motion=(direction=='up'||direction=='left')?'pos':'neg';var distance=o.options.distance||(ref=='top'?el.outerHeight({margin:true})/3:el.outerWidth({margin:true})/3);if(mode=='show')el.css('opacity',0).css(ref,motion=='pos'?-distance:distance);if(mode=='hide')distance=distance/(times*2);if(mode!='hide')times--;if(mode=='show'){var animation={opacity:1};animation[ref]=(motion=='pos'?'+=':'-=')+distance;el.animate(animation,speed/2,o.options.easing);distance=distance/2;times--;};for(var i=0;i<times;i++){var animation1={},animation2={};animation1[ref]=(motion=='pos'?'-=':'+=')+distance;animation2[ref]=(motion=='pos'?'+=':'-=')+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing);distance=(mode=='hide')?distance*2:distance/2;};if(mode=='hide'){var animation={opacity:0};animation[ref]=(motion=='pos'?'-=':'+=')+distance;el.animate(animation,speed/2,o.options.easing,function(){el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);});}else{var animation1={},animation2={};animation1[ref]=(motion=='pos'?'-=':'+=')+distance;animation2[ref]=(motion=='pos'?'+=':'-=')+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);});};el.queue('fx',function(){el.dequeue();});el.dequeue();});};})(jQuery);(function($){$.effects.clip=function(o){return this.queue(function(){var el=$(this),props=['position','top','left','height','width'];var mode=$.effects.setMode(el,o.options.mode||'hide');var direction=o.options.direction||'vertical';$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:'hidden'});var animate=el[0].tagName=='IMG'?wrapper:el;var ref={size:(direction=='vertical')?'height':'width',position:(direction=='vertical')?'top':'left'};var distance=(direction=='vertical')?animate.height():animate.width();if(mode=='show'){animate.css(ref.size,0);animate.css(ref.position,distance/2);}
var animation={};animation[ref.size]=mode=='show'?distance:0;animation[ref.position]=mode=='show'?0:distance/2;animate.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=='hide')el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(el[0],arguments);el.dequeue();}});});};})(jQuery);(function($){$.effects.drop=function(o){return this.queue(function(){var el=$(this),props=['position','top','left','opacity'];var mode=$.effects.setMode(el,o.options.mode||'hide');var direction=o.options.direction||'left';$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=='up'||direction=='down')?'top':'left';var motion=(direction=='up'||direction=='left')?'pos':'neg';var distance=o.options.distance||(ref=='top'?el.outerHeight({margin:true})/2:el.outerWidth({margin:true})/2);if(mode=='show')el.css('opacity',0).css(ref,motion=='pos'?-distance:distance);var animation={opacity:mode=='show'?1:0};animation[ref]=(mode=='show'?(motion=='pos'?'+=':'-='):(motion=='pos'?'-=':'+='))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=='hide')el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);el.dequeue();}});});};})(jQuery);(function($){$.effects.explode=function(o){return this.queue(function(){var rows=o.options.pieces?Math.round(Math.sqrt(o.options.pieces)):3;var cells=o.options.pieces?Math.round(Math.sqrt(o.options.pieces)):3;o.options.mode=o.options.mode=='toggle'?($(this).is(':visible')?'hide':'show'):o.options.mode;var el=$(this).show().css('visibility','hidden');var offset=el.offset();offset.top-=parseInt(el.css("marginTop"))||0;offset.left-=parseInt(el.css("marginLeft"))||0;var width=el.outerWidth(true);var height=el.outerHeight(true);for(var i=0;i<rows;i++){for(var j=0;j<cells;j++){el.clone().appendTo('body').wrap('<div></div>').css({position:'absolute',visibility:'visible',left:-j*(width/cells),top:-i*(height/rows)}).parent().addClass('effects-explode').css({position:'absolute',overflow:'hidden',width:width/cells,height:height/rows,left:offset.left+j*(width/cells)+(o.options.mode=='show'?(j-Math.floor(cells/2))*(width/cells):0),top:offset.top+i*(height/rows)+(o.options.mode=='show'?(i-Math.floor(rows/2))*(height/rows):0),opacity:o.options.mode=='show'?0:1}).animate({left:offset.left+j*(width/cells)+(o.options.mode=='show'?0:(j-Math.floor(cells/2))*(width/cells)),top:offset.top+i*(height/rows)+(o.options.mode=='show'?0:(i-Math.floor(rows/2))*(height/rows)),opacity:o.options.mode=='show'?1:0},o.duration||500);}}
setTimeout(function(){o.options.mode=='show'?el.css({visibility:'visible'}):el.css({visibility:'visible'}).hide();if(o.callback)o.callback.apply(el[0]);el.dequeue();$('.effects-explode').remove();},o.duration||500);});};})(jQuery);(function($){$.effects.fold=function(o){return this.queue(function(){var el=$(this),props=['position','top','left'];var mode=$.effects.setMode(el,o.options.mode||'hide');var size=o.options.size||15;var horizFirst=!(!o.options.horizFirst);$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:'hidden'});var widthFirst=((mode=='show')!=horizFirst);var ref=widthFirst?['width','height']:['height','width'];var distance=widthFirst?[wrapper.width(),wrapper.height()]:[wrapper.height(),wrapper.width()];var percent=/([0-9]+)%/.exec(size);if(percent)size=parseInt(percent[1])/100*distance[mode=='hide'?0:1];if(mode=='show')wrapper.css(horizFirst?{height:0,width:size}:{height:size,width:0});var animation1={},animation2={};animation1[ref[0]]=mode=='show'?distance[0]:size;animation2[ref[1]]=mode=='show'?distance[1]:0;wrapper.animate(animation1,o.duration/2,o.options.easing).animate(animation2,o.duration/2,o.options.easing,function(){if(mode=='hide')el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(el[0],arguments);el.dequeue();});});};})(jQuery);;(function($){$.effects.highlight=function(o){return this.queue(function(){var el=$(this),props=['backgroundImage','backgroundColor','opacity'];var mode=$.effects.setMode(el,o.options.mode||'show');var color=o.options.color||"#ffff99";var oldColor=el.css("backgroundColor");$.effects.save(el,props);el.show();el.css({backgroundImage:'none',backgroundColor:color});var animation={backgroundColor:oldColor};if(mode=="hide")animation['opacity']=0;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide")el.hide();$.effects.restore(el,props);if(mode=="show"&&jQuery.browser.msie)this.style.removeAttribute('filter');if(o.callback)o.callback.apply(this,arguments);el.dequeue();}});});};})(jQuery);(function($){$.effects.pulsate=function(o){return this.queue(function(){var el=$(this);var mode=$.effects.setMode(el,o.options.mode||'show');var times=o.options.times||5;if(mode=='hide')times--;if(el.is(':hidden')){el.css('opacity',0);el.show();el.animate({opacity:1},o.duration/2,o.options.easing);times=times-2;}
for(var i=0;i<times;i++){el.animate({opacity:0},o.duration/2,o.options.easing).animate({opacity:1},o.duration/2,o.options.easing);};if(mode=='hide'){el.animate({opacity:0},o.duration/2,o.options.easing,function(){el.hide();if(o.callback)o.callback.apply(this,arguments);});}else{el.animate({opacity:0},o.duration/2,o.options.easing).animate({opacity:1},o.duration/2,o.options.easing,function(){if(o.callback)o.callback.apply(this,arguments);});};el.queue('fx',function(){el.dequeue();});el.dequeue();});};})(jQuery);(function($){$.effects.puff=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||'hide');var percent=parseInt(o.options.percent)||150;options.fade=true;var original={height:el.height(),width:el.width()};var factor=percent/100;el.from=(mode=='hide')?original:{height:original.height*factor,width:original.width*factor};options.from=el.from;options.percent=(mode=='hide')?percent:100;options.mode=mode;el.effect('scale',options,o.duration,o.callback);el.dequeue();});};$.effects.scale=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||'effect');var percent=parseInt(o.options.percent)||(parseInt(o.options.percent)==0?0:(mode=='hide'?0:100));var direction=o.options.direction||'both';var origin=o.options.origin;if(mode!='effect'){options.origin=origin||['middle','center'];options.restore=true;}
var original={height:el.height(),width:el.width()};el.from=o.options.from||(mode=='show'?{height:0,width:0}:original);var factor={y:direction!='horizontal'?(percent/100):1,x:direction!='vertical'?(percent/100):1};el.to={height:original.height*factor.y,width:original.width*factor.x};if(o.options.fade){if(mode=='show'){el.from.opacity=0;el.to.opacity=1;};if(mode=='hide'){el.from.opacity=1;el.to.opacity=0;};};options.from=el.from;options.to=el.to;options.mode=mode;el.effect('size',options,o.duration,o.callback);el.dequeue();});};$.effects.size=function(o){return this.queue(function(){var el=$(this),props=['position','top','left','width','height','overflow','opacity'];var props1=['position','top','left','overflow','opacity'];var props2=['width','height','overflow'];var cProps=['fontSize'];var vProps=['borderTopWidth','borderBottomWidth','paddingTop','paddingBottom'];var hProps=['borderLeftWidth','borderRightWidth','paddingLeft','paddingRight'];var mode=$.effects.setMode(el,o.options.mode||'effect');var restore=o.options.restore||false;var scale=o.options.scale||'both';var origin=o.options.origin;var original={height:el.height(),width:el.width()};el.from=o.options.from||original;el.to=o.options.to||original;if(origin){var baseline=$.effects.getBaseline(origin,original);el.from.top=(original.height-el.from.height)*baseline.y;el.from.left=(original.width-el.from.width)*baseline.x;el.to.top=(original.height-el.to.height)*baseline.y;el.to.left=(original.width-el.to.width)*baseline.x;};var factor={from:{y:el.from.height/original.height,x:el.from.width/original.width},to:{y:el.to.height/original.height,x:el.to.width/original.width}};if(scale=='box'||scale=='both'){if(factor.from.y!=factor.to.y){props=props.concat(vProps);el.from=$.effects.setTransition(el,vProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,vProps,factor.to.y,el.to);};if(factor.from.x!=factor.to.x){props=props.concat(hProps);el.from=$.effects.setTransition(el,hProps,factor.from.x,el.from);el.to=$.effects.setTransition(el,hProps,factor.to.x,el.to);};};if(scale=='content'||scale=='both'){if(factor.from.y!=factor.to.y){props=props.concat(cProps);el.from=$.effects.setTransition(el,cProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,cProps,factor.to.y,el.to);};};$.effects.save(el,restore?props:props1);el.show();$.effects.createWrapper(el);el.css('overflow','hidden').css(el.from);if(scale=='content'||scale=='both'){vProps=vProps.concat(['marginTop','marginBottom']).concat(cProps);hProps=hProps.concat(['marginLeft','marginRight']);props2=props.concat(vProps).concat(hProps);el.find("*[width]").each(function(){child=$(this);if(restore)$.effects.save(child,props2);var c_original={height:child.height(),width:child.width()};child.from={height:c_original.height*factor.from.y,width:c_original.width*factor.from.x};child.to={height:c_original.height*factor.to.y,width:c_original.width*factor.to.x};if(factor.from.y!=factor.to.y){child.from=$.effects.setTransition(child,vProps,factor.from.y,child.from);child.to=$.effects.setTransition(child,vProps,factor.to.y,child.to);};if(factor.from.x!=factor.to.x){child.from=$.effects.setTransition(child,hProps,factor.from.x,child.from);child.to=$.effects.setTransition(child,hProps,factor.to.x,child.to);};child.css(child.from);child.animate(child.to,o.duration,o.options.easing,function(){if(restore)$.effects.restore(child,props2);});});};el.animate(el.to,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=='hide')el.hide();$.effects.restore(el,restore?props:props1);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);el.dequeue();}});});};})(jQuery);(function($){$.effects.shake=function(o){return this.queue(function(){var el=$(this),props=['position','top','left'];var mode=$.effects.setMode(el,o.options.mode||'effect');var direction=o.options.direction||'left';var distance=o.options.distance||20;var times=o.options.times||3;var speed=o.duration||o.options.duration||140;$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=='up'||direction=='down')?'top':'left';var motion=(direction=='up'||direction=='left')?'pos':'neg';var animation={},animation1={},animation2={};animation[ref]=(motion=='pos'?'-=':'+=')+distance;animation1[ref]=(motion=='pos'?'+=':'-=')+distance*2;animation2[ref]=(motion=='pos'?'-=':'+=')+distance*2;el.animate(animation,speed,o.options.easing);for(var i=1;i<times;i++){el.animate(animation1,speed,o.options.easing).animate(animation2,speed,o.options.easing);};el.animate(animation1,speed,o.options.easing).animate(animation,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);});el.queue('fx',function(){el.dequeue();});el.dequeue();});};})(jQuery);(function($){$.effects.slide=function(o){return this.queue(function(){var el=$(this),props=['position','top','left'];var mode=$.effects.setMode(el,o.options.mode||'show');var direction=o.options.direction||'left';$.effects.save(el,props);el.show();$.effects.createWrapper(el).css({overflow:'hidden'});var ref=(direction=='up'||direction=='down')?'top':'left';var motion=(direction=='up'||direction=='left')?'pos':'neg';var distance=o.options.distance||(ref=='top'?el.outerHeight({margin:true}):el.outerWidth({margin:true}));if(mode=='show')el.css(ref,motion=='pos'?-distance:distance);var animation={};animation[ref]=(mode=='show'?(motion=='pos'?'+=':'-='):(motion=='pos'?'-=':'+='))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=='hide')el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);el.dequeue();}});});};})(jQuery);(function($){$.effects.transfer=function(o){return this.queue(function(){var el=$(this);var mode=$.effects.setMode(el,o.options.mode||'effect');var target=$(o.options.to);var position=el.offset();var transfer=$('<div class="ui-effects-transfer"></div>').appendTo(document.body);if(o.options.className)transfer.addClass(o.options.className);transfer.addClass(o.options.className);transfer.css({top:position.top,left:position.left,height:el.outerHeight()-parseInt(transfer.css('borderTopWidth'))-parseInt(transfer.css('borderBottomWidth')),width:el.outerWidth()-parseInt(transfer.css('borderLeftWidth'))-parseInt(transfer.css('borderRightWidth')),position:'absolute'});position=target.offset();animation={top:position.top,left:position.left,height:target.outerHeight()-parseInt(transfer.css('borderTopWidth'))-parseInt(transfer.css('borderBottomWidth')),width:target.outerWidth()-parseInt(transfer.css('borderLeftWidth'))-parseInt(transfer.css('borderRightWidth'))};transfer.animate(animation,o.duration,o.options.easing,function(){transfer.remove();if(o.callback)o.callback.apply(el[0],arguments);el.dequeue();});});};})(jQuery); 
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate$
 * $Rev$
 *
 * Version 2.1.1
 */

(function($){

/**
 * The bgiframe is chainable and applies the iframe hack to get 
 * around zIndex issues in IE6. It will only apply itself in IE6 
 * and adds a class to the iframe called 'bgiframe'. The iframe
 * is appeneded as the first child of the matched element(s) 
 * with a tabIndex and zIndex of -1.
 * 
 * By default the plugin will take borders, sized with pixel units,
 * into account. If a different unit is used for the border's width,
 * then you will need to use the top and left settings as explained below.
 *
 * NOTICE: This plugin has been reported to cause perfromance problems
 * when used on elements that change properties (like width, height and
 * opacity) a lot in IE6. Most of these problems have been caused by 
 * the expressions used to calculate the elements width, height and 
 * borders. Some have reported it is due to the opacity filter. All 
 * these settings can be changed if needed as explained below.
 *
 * @example $('div').bgiframe();
 * @before <div><p>Paragraph</p></div>
 * @result <div><iframe class="bgiframe".../><p>Paragraph</p></div>
 *
 * @param Map settings Optional settings to configure the iframe.
 * @option String|Number top The iframe must be offset to the top
 * 		by the width of the top border. This should be a negative 
 *      number representing the border-top-width. If a number is 
 * 		is used here, pixels will be assumed. Otherwise, be sure
 *		to specify a unit. An expression could also be used. 
 * 		By default the value is "auto" which will use an expression 
 * 		to get the border-top-width if it is in pixels.
 * @option String|Number left The iframe must be offset to the left
 * 		by the width of the left border. This should be a negative 
 *      number representing the border-left-width. If a number is 
 * 		is used here, pixels will be assumed. Otherwise, be sure
 *		to specify a unit. An expression could also be used. 
 * 		By default the value is "auto" which will use an expression 
 * 		to get the border-left-width if it is in pixels.
 * @option String|Number width This is the width of the iframe. If
 *		a number is used here, pixels will be assume. Otherwise, be sure
 * 		to specify a unit. An experssion could also be used.
 *		By default the value is "auto" which will use an experssion
 * 		to get the offsetWidth.
 * @option String|Number height This is the height of the iframe. If
 *		a number is used here, pixels will be assume. Otherwise, be sure
 * 		to specify a unit. An experssion could also be used.
 *		By default the value is "auto" which will use an experssion
 * 		to get the offsetHeight.
 * @option Boolean opacity This is a boolean representing whether or not
 * 		to use opacity. If set to true, the opacity of 0 is applied. If
 *		set to false, the opacity filter is not applied. Default: true.
 * @option String src This setting is provided so that one could change 
 *		the src of the iframe to whatever they need.
 *		Default: "javascript:false;"
 *
 * @name bgiframe
 * @type jQuery
 * @cat Plugins/bgiframe
 * @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 */
$.fn.bgIframe = $.fn.bgiframe = function(s) {
	// This is only for IE6
	if ( $.browser.msie && /6.0/.test(navigator.userAgent) ) {
		s = $.extend({
			top     : 'auto', // auto == .currentStyle.borderTopWidth
			left    : 'auto', // auto == .currentStyle.borderLeftWidth
			width   : 'auto', // auto == offsetWidth
			height  : 'auto', // auto == offsetHeight
			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;
};

})(jQuery);
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate$
 * $Rev$
 *
 * Version: @VERSION
 *
 * Requires: jQuery 1.2+
 */

(function($){
	
$.dimensions = {
	version: '@VERSION'
};

// Create innerHeight, innerWidth, outerHeight and outerWidth methods
$.each( [ 'Height', 'Width' ], function(i, name){
	
	// innerHeight and innerWidth
	$.fn[ 'inner' + name ] = function() {
		if (!this[0]) return;
		
		var torl = name == 'Height' ? 'Top'    : 'Left',  // top or left
		    borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
		
		return this.is(':visible') ? this[0]['client' + name] : num( this, name.toLowerCase() ) + num(this, 'padding' + torl) + num(this, 'padding' + borr);
	};
	
	// outerHeight and outerWidth
	$.fn[ 'outer' + name ] = function(options) {
		if (!this[0]) return;
		
		var torl = name == 'Height' ? 'Top'    : 'Left',  // top or left
		    borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
		
		options = $.extend({ margin: false }, options || {});
		
		var val = this.is(':visible') ? 
				this[0]['offset' + name] : 
				num( this, name.toLowerCase() )
					+ num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width')
					+ num(this, 'padding' + torl) + num(this, 'padding' + borr);
		
		return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
	};
});

// Create scrollLeft and scrollTop methods
$.each( ['Left', 'Top'], function(i, name) {
	$.fn[ 'scroll' + name ] = function(val) {
		if (!this[0]) return;
		
		return val != undefined ?
		
			// Set the scroll offset
			this.each(function() {
				this == window || this == document ?
					window.scrollTo( 
						name == 'Left' ? val : $(window)[ 'scrollLeft' ](),
						name == 'Top'  ? val : $(window)[ 'scrollTop'  ]()
					) :
					this[ 'scroll' + name ] = val;
			}) :
			
			// Return the scroll offset
			this[0] == window || this[0] == document ?
				self[ (name == 'Left' ? 'pageXOffset' : 'pageYOffset') ] ||
					$.boxModel && document.documentElement[ 'scroll' + name ] ||
					document.body[ 'scroll' + name ] :
				this[0][ 'scroll' + name ];
	};
});

$.fn.extend({
	position: function() {
		var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results;
		
		if (elem) {
			// Get *real* offsetParent
			offsetParent = this.offsetParent();
			
			// Get correct offsets
			offset       = this.offset();
			parentOffset = offsetParent.offset();
			
			// Subtract element margins
			offset.top  -= num(elem, 'marginTop');
			offset.left -= num(elem, 'marginLeft');
			
			// Add offsetParent borders
			parentOffset.top  += num(offsetParent, 'borderTopWidth');
			parentOffset.left += num(offsetParent, 'borderLeftWidth');
			
			// Subtract the two offsets
			results = {
				top:  offset.top  - parentOffset.top,
				left: offset.left - parentOffset.left
			};
		}
		
		return results;
	},
	
	offsetParent: function() {
		var offsetParent = this[0].offsetParent;
		while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static') )
			offsetParent = offsetParent.offsetParent;
		return $(offsetParent);
	}
});

function num(el, prop) {
	return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;
};

})(jQuery);
/*
 * jdMenu 1.4.1 (2008-03-31)
 *
 * Copyright (c) 2006,2007 Jonathan Sharp (http://jdsharp.us)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://jdsharp.us/
 *
 * Built upon jQuery 1.2.1 (http://jquery.com)
 * This also requires the jQuery dimensions >= 1.2 plugin
 */

// This initializes the menu
$(function() {
	$('ul.jd_menu').jdMenu();
});

(function($){
	function addEvents(ul) {
		var settings = $.data( $(ul).parents().andSelf().filter('ul.jd_menu')[0], 'jdMenuSettings' );
		$('> li', ul)
			.bind('mouseenter.jdmenu mouseleave.jdmenu', function(evt) {
				$(this).toggleClass('jdm_hover');
				var ul = $('> ul', this);
				if ( ul.length == 1 ) {
					clearTimeout( this.$jdTimer );
					var enter = ( evt.type == 'mouseenter' );
					var fn = ( enter ? showMenu : hideMenu );
					this.$jdTimer = setTimeout(function() {
						fn( ul[0], settings.onAnimate, settings.isVertical );
					}, enter ? settings.showDelay : settings.hideDelay );
				}
			})
			.bind('click.jdmenu', function(evt) {
				var ul = $('> ul', this);
				if ( ul.length == 1 && 
					( settings.disableLinks == true || $(this).hasClass('accessible') ) ) {
					showMenu( ul, settings.onAnimate, settings.isVertical );
					return false;
				}
				
				// The user clicked the li and we need to trigger a click for the a
				if ( evt.target == this ) {
					var link = $('> a', evt.target).not('.accessible');
					if ( link.length > 0 ) {
						var a = link[0];
						if ( !a.onclick ) {
							window.open( a.href, a.target || '_self' );
						} else {
							$(a).trigger('click');
						}
					}
				}
				if ( settings.disableLinks || 
					( !settings.disableLinks && !$(this).parent().hasClass('jd_menu') ) ) {
					$(this).parent().jdMenuHide();
					evt.stopPropagation();
				}
			})
			.find('> a')
				.bind('focus.jdmenu blur.jdmenu', function(evt) {
					var p = $(this).parents('li:eq(0)');
					if ( evt.type == 'focus' ) {
						p.addClass('jdm_hover');
					} else { 
						p.removeClass('jdm_hover');
					}
				})
				.filter('.accessible')
					.bind('click.jdmenu', function(evt) {
						evt.preventDefault();
					});
	}

	function showMenu(ul, animate, vertical) {
		var ul = $(ul);
		if ( ul.is(':visible') ) {
			return;
		}
		ul.bgiframe();
		var li = ul.parent();
		ul	.trigger('jdMenuShow')
			.positionBy({ 	target: 	li[0], 
							targetPos: 	( vertical === true || !li.parent().hasClass('jd_menu') ? 1 : 3 ), 
							elementPos: 0,
							hideAfterPosition: true
							});
		if ( !ul.hasClass('jdm_events') ) {
			ul.addClass('jdm_events');
			addEvents(ul);
		}
		li	.addClass('jdm_active')
			// Hide any adjacent menus
			.siblings('li').find('> ul:eq(0):visible')
				.each(function(){
					hideMenu( this ); 
				});
		if ( animate === undefined ) {
			ul.show();
		} else {
			animate.apply( ul[0], [true] );
		}
	}
	
	function hideMenu(ul, animate) {
		var ul = $(ul);
		$('.bgiframe', ul).remove();
		ul	.filter(':not(.jd_menu)')
			.find('> li > ul:eq(0):visible')
				.each(function() {
					hideMenu( this );
				})
			.end();
		if ( animate === undefined ) {
			ul.hide()
		} else {
			animate.apply( ul[0], [false] );
		}

		ul	.trigger('jdMenuHide')
			.parents('li:eq(0)')
				.removeClass('jdm_active jdm_hover')
			.end()
				.find('> li')
				.removeClass('jdm_active jdm_hover');
	}
	
	// Public methods
	$.fn.jdMenu = function(settings) {
		// Future settings: activateDelay
		var settings = $.extend({	// Time in ms before menu shows
									showDelay: 		200,
									// Time in ms before menu hides
									hideDelay: 		500,
									// Should items that contain submenus not 
									// respond to clicks
									disableLinks:	true
									// This callback allows for you to animate menus
									//onAnimate:	null
									}, settings);
		if ( !$.isFunction( settings.onAnimate ) ) {
			settings.onAnimate = undefined;
		}
		return this.filter('ul.jd_menu').each(function() {
			$.data(	this, 
					'jdMenuSettings', 
					$.extend({ isVertical: $(this).hasClass('jd_menu_vertical') }, settings) 
					);
			addEvents(this);
		});
	};
	
	$.fn.jdMenuUnbind = function() {
		$('ul.jdm_events', this)
			.unbind('.jdmenu')
			.find('> a').unbind('.jdmenu');
	};
	$.fn.jdMenuHide = function() {
		return this.filter('ul').each(function(){ 
			hideMenu( this );
		});
	};

	// Private methods and logic
	$(window)
		// Bind a click event to hide all visible menus when the document is clicked
		.bind('click.jdmenu', function(){
			$('ul.jd_menu ul:visible').jdMenuHide();
		});
})(jQuery);

/*
 * positionBy 1.0.7 (2008-01-29)
 *
 * Copyright (c) 2006,2007 Jonathan Sharp (http://jdsharp.us)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://jdsharp.us/
 *
 * Built upon jQuery 1.2.2 (http://jquery.com)
 * This also requires the jQuery dimensions plugin
 */
(function($){
	/**
	 * This function centers an absolutely positioned element
	 */
	/*
	$.fn.positionCenter = function(offsetLeft, offsetTop) {
		var offsetLeft 	= offsetLeft || 1;
		var offsetTop 	= offsetTop || 1;

		var ww = $(window).width();
		var wh = $(window).height();
		var sl = $(window).scrollLeft();
		var st = $(window).scrollTop();

		return this.each(function() {
			var $t = $(this);
			
			// If we are not visible we have to display our element (with a negative position offscreen)

			var left = Math.round( ( ww - $t.outerWidth() ) / 2 );
			if ( left < 0 ) {
				left = 0;
			} else {
				left *= offsetLeft;
			}
			left += sl;
			var top  = Math.round( ( wh - $t.outerHeight() ) / 2 );
			if ( top < 0 ) {
				top = 0;
			} else {
				top *= offsetTop;
			}
			top += st;

			$(this).parents().each(function() {
				var $this = $(this);
				if ( $this.css('position') != 'static' ) {
					var o = $this.offset();
					left += -o.left;
					top	 += -o.top;
					return false;
				}
			});

			$t.css({left: left, top: top});
		});
	};
	*/
	
	// Our range object is used in calculating positions
	var Range = function(x1, y1, x2, y2) {
		this.x1	= x1;	this.x2 = x2;
		this.y1 = y1;	this.y2 = y2;
	};
	Range.prototype.contains = function(range) {
		return 	(this.x1 <= range.x1 && range.x2 <= this.x2) 
				&& 
				(this.y1 <= range.y1 && range.y2 <= this.y2);
	};
	Range.prototype.transform = function(x, y) {
		return new Range(this.x1 + x, this.y1 + y, this.x2 + x, this.y2 + y);
	};

	$.fn.positionBy = function(args) {
		var date1 = new Date();
		if ( this.length == 0 ) {
			return this;
		}
		
		var args = $.extend({	// The target element to position us relative to
								target:		null,
								// The target's corner, possible values 0-3
								targetPos:	null,
								// The element's corner, possible values 0-3
								elementPos:	null,
								
								// A raw x,y coordinate
								x:			null,
								y:			null,

								// Pass in an array of positions that are valid 0-15
								positions:	null,

								// Add the final position class to the element (eg. positionBy0 through positionBy3, positionBy15)
								addClass: 	false,
								
								// Force our element to be at the location we specified (don't try to auto position it)
								force: 		false,
								
								// The element that we will make sure our element doesn't go outside of
								container: 	window,

								// Should the element be hidden after positioning?
								hideAfterPosition: false
							}, args);

		if ( args.x != null ) {
			var tLeft	= args.x;
			var tTop	= args.y;
			var tWidth	= 0;
			var tHeight	= 0;
			
		// Position in relation to an element
		} else {
			var $target	= $( $( args.target )[0] );
			var tWidth	= $target.outerWidth();
			var tHeight	= $target.outerHeight();
			var tOffset	= $target.offset();
			var tLeft	= tOffset.left;
			var tTop	= tOffset.top;
		}

		// Our target right, bottom coord
		var tRight	= tLeft + tWidth;
		var tBottom	= tTop + tHeight;

		return this.each(function() {
			var $element = $( this );

			// Position our element in the top left so we can grab its width without triggering scrollbars
			if ( !$element.is(':visible') ) {
				$element.css({	left:  		-3000, 
								top: 		-3000
								})
								.show();
			}

			var eWidth	= $element.outerWidth();
			var eHeight	= $element.outerHeight();
	
			// Holds x1,y1,x2,y2 coordinates for a position in relation to our target element
			var position = [];
			// Holds a list of alternate positions to try if this one is not in the browser viewport
			var next	 = [];
	
			// Our Positions via ASCII ART
			/*
   	      	 8   9       10   11
			   +------------+
			 7 | 15      12 | 0
			   |            |
			 6 | 14      13 | 1
			   +------------+ 
			 5   4        3   2
	
			 */

			position[0]	= new Range(tRight, 			tTop, 				tRight + eWidth, 	tTop + eHeight);
			next[0]		= [1,7,4];
		
			position[1]	= new Range(tRight, 			tBottom - eHeight, 	tRight + eWidth, 	tBottom);
			next[1]		= [0,6,4];
		
			position[2] = new Range(tRight, 			tBottom,			tRight + eWidth, 	tBottom + eHeight);
			next[2]		= [1,3,10];
		
			position[3] = new Range(tRight - eWidth, 	tBottom,			tRight, 			tBottom + eHeight);
			next[3]		= [1,6,10];
			
			position[4] = new Range(tLeft, 				tBottom,			tLeft + eWidth, 	tBottom + eHeight);
			next[4]		= [1,6,9];
		
			position[5] = new Range(tLeft - eWidth, 	tBottom, 			tLeft, 				tBottom + eHeight);
			next[5]		= [6,4,9];
		
			position[6] = new Range(tLeft - eWidth, 	tBottom - eHeight,	tLeft, 				tBottom);
			next[6]		= [7,1,4];
			
			position[7] = new Range(tLeft - eWidth, 	tTop,				tLeft, 				tTop + eHeight);
			next[7]		= [6,0,4];
			
			position[8] = new Range(tLeft - eWidth, 	tTop - eHeight,		tLeft, 				tTop);
			next[8]		= [7,9,4];
			
			position[9] = new Range(tLeft, 				tTop - eHeight,		tLeft + eWidth, 	tTop);
			next[9]		= [0,7,4];
			
			position[10]= new Range(tRight - eWidth, 	tTop - eHeight,		tRight, 			tTop);
			next[10]	= [0,7,3];
		
			position[11]= new Range(tRight, 			tTop - eHeight, 	tRight + eWidth, 	tTop);
			next[11]	= [0,10,3];
			
			position[12]= new Range(tRight - eWidth, 	tTop,				tRight, 			tTop + eHeight);
			next[12]	= [13,7,10];
			
			position[13]= new Range(tRight - eWidth, 	tBottom - eHeight,	tRight, 			tBottom);
			next[13]	= [12,6,3];
			
			position[14]= new Range(tLeft, 				tBottom - eHeight,	tLeft + eWidth, 	tBottom);
			next[14]	= [15,1,4];
			
			position[15]= new Range(tLeft, 				tTop,				tLeft + eWidth, 	tTop + eHeight);
			next[15]	= [14,0,9];
	
			if ( args.positions !== null ) {
				var pos = args.positions[0];
			} else if ( args.targetPos != null && args.elementPos != null ) {
				var pos = [];
				pos[0] = [];
				pos[0][0] = 15;
				pos[0][1] = 7;
				pos[0][2] = 8;
				pos[0][3] = 9;
				pos[1] = [];
				pos[1][0] = 0;
				pos[1][1] = 12;
				pos[1][2] = 10;
				pos[1][3] = 11;
				pos[2] = [];
				pos[2][0] = 2;
				pos[2][1] = 3;
				pos[2][2] = 13;
				pos[2][3] = 1;
				pos[3] = [];
				pos[3][0] = 4;
				pos[3][1] = 5;
				pos[3][2] = 6;
				pos[3][3] = 14;

				var pos = pos[args.targetPos][args.elementPos];
			}
			var ePos = position[pos];
			var fPos = pos;

			if ( !args.force ) {
				// TODO: Do the args.container
				// window width & scroll offset
				$window = $( window );
				var sx = $window.scrollLeft();
				var sy = $window.scrollTop();
				
				// TODO: Look at innerWidth & innerHeight
				var container = new Range( sx, sy, sx + $window.width(), sy + $window.height() );
	
				// If we are outside of our viewport, see if we are outside vertically or horizontally and push onto the stack
				var stack;
				if ( args.positions ) {
					stack = args.positions;
				} else {
					stack = [pos];
				}
				var test = [];		// Keeps track of our positions we already tried
				
				while ( stack.length > 0 ) {
					var p = stack.shift();
					if ( test[p] ) {
						continue;
					}
					test[p] = true;
	
					// If our current position is not within the viewport (eg. window) 
					// add the next suggested position
					if ( !container.contains(position[p]) ) {
						if ( args.positions === null ) {
							stack = jQuery.merge( stack, next[p] );
						}
					} else {
						ePos = position[p];
						break;
					}
				}
			}

			// + TODO: Determine if we are going to use absolute left, top, bottom, right 
			// positions relative to our target
		
			// Take into account any absolute or fixed positioning
			// to 'normalize' our coordinates
			$element.parents().each(function() {
				var $this = $(this);
				if ( $this.css('position') != 'static' ) {
					var abs = $this.offset();
					ePos = ePos.transform( -abs.left, -abs.top );
					return false;
				}
			});
		
			// Finally position our element
			var css = { left: ePos.x1, top: ePos.y1 };
			if ( args.hideAfterPosition ) {
				css['display'] = 'none';
			}
			$element.css( css );

			if ( args.addClass ) {
				$element.removeClass( 'positionBy0 positionBy1 positionBy2 positionBy3 positionBy4 positionBy5 '
									+ 'positionBy6 positionBy7 positionBy8 positionBy9 positionBy10 positionBy11 '
									+ 'positionBy12 positionBy13 positionBy14 positionBy15')
						.addClass('positionBy' + p);
			}
		});
	};
})(jQuery);


(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function sortText(a,b){return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
(function($) {
	$.extend({
		tablesorterPager: new function() {
			
			function updatePageDisplay(c) {
				var s = $(c.cssPageDisplay,c.container).val((c.page+1) + c.seperator + c.totalPages);	
			}
			
			function setPageSize(table,size) {
				var c = table.config;
				c.size = size;
				c.totalPages = Math.ceil(c.totalRows / c.size);
				c.pagerPositionSet = false;
				moveToPage(table);
				fixPosition(table);
			}
			
			function fixPosition(table) {
				var c = table.config;
				if(!c.pagerPositionSet && c.positionFixed) {
					var c = table.config, o = $(table);
					if(o.offset) {
						c.container.css({
							top: o.offset().top + o.height() + 'px',
							position: 'absolute'
						});
					}
					c.pagerPositionSet = true;
				}
			}
			
			function moveToFirstPage(table) {
				var c = table.config;
				c.page = 0;
				moveToPage(table);
			}
			
			function moveToLastPage(table) {
				var c = table.config;
				c.page = (c.totalPages-1);
				moveToPage(table);
			}
			
			function moveToNextPage(table) {
				var c = table.config;
				c.page++;
				if(c.page >= (c.totalPages-1)) {
					c.page = (c.totalPages-1);
				}
				moveToPage(table);
			}
			
			function moveToPrevPage(table) {
				var c = table.config;
				c.page--;
				if(c.page <= 0) {
					c.page = 0;
				}
				moveToPage(table);
			}
						
			
			function moveToPage(table) {
				var c = table.config;
				if(c.page < 0 || c.page > (c.totalPages-1)) {
					c.page = 0;
				}
				
				renderTable(table,c.rowsCopy);
			}
			
			function renderTable(table,rows) {
				
				var c = table.config;
				var l = rows.length;
				var s = (c.page * c.size);
				var e = (s + c.size);
				if(e > rows.length ) {
					e = rows.length;
				}
				
				
				var tableBody = $(table.tBodies[0]);
				
				// clear the table body
				
				$.tablesorter.clearTableBody(table);
				
				for(var i = s; i < e; i++) {
					
					//tableBody.append(rows[i]);
					
					var o = rows[i];
					var l = o.length;
					for(var j=0; j < l; j++) {
						
						tableBody[0].appendChild(o[j]);

					}
				}
				
				fixPosition(table,tableBody);
				
				$(table).trigger("applyWidgets");
				
				if( c.page >= c.totalPages ) {
        			moveToLastPage(table);
				}
				
				updatePageDisplay(c);
			}
			
			this.appender = function(table,rows) {
				
				var c = table.config;
				
				c.rowsCopy = rows;
				c.totalRows = rows.length;
				c.totalPages = Math.ceil(c.totalRows / c.size);
				
				renderTable(table,rows);
			};
			
			this.defaults = {
				size: 10,
				offset: 0,
				page: 0,
				totalRows: 0,
				totalPages: 0,
				container: null,
				cssNext: '.next',
				cssPrev: '.prev',
				cssFirst: '.first',
				cssLast: '.last',
				cssPageDisplay: '.pagedisplay',
				cssPageSize: '.pagesize',
				seperator: "/",
				positionFixed: true,
				appender: this.appender
			};
			
			this.construct = function(settings) {
				
				return this.each(function() {	
					
					config = $.extend(this.config, $.tablesorterPager.defaults, settings);
					
					var table = this, pager = config.container;
				
					$(this).trigger("appendCache");
					
					config.size = parseInt($(".pagesize",pager).val());
					
					$(config.cssFirst,pager).click(function() {
						moveToFirstPage(table);
						return false;
					});
					$(config.cssNext,pager).click(function() {
						moveToNextPage(table);
						return false;
					});
					$(config.cssPrev,pager).click(function() {
						moveToPrevPage(table);
						return false;
					});
					$(config.cssLast,pager).click(function() {
						moveToLastPage(table);
						return false;
					});
					$(config.cssPageSize,pager).change(function() {
						setPageSize(table,parseInt($(this).val()));
						return false;
					});
				});
			};
			
		}
	});
	// extend plugin scope
	$.fn.extend({
        tablesorterPager: $.tablesorterPager.construct
	});
	
})(jQuery);				
/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        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(); // use expires attribute, max-age is not supported by IE
        }
        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 { // only name given, get cookie
        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]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};
/*
 * Treeview 1.4 - jQuery plugin to hide and show branches of a tree
 * 
 * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
 * http://docs.jquery.com/Plugins/Treeview
 *
 * Copyright (c) 2007 Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.treeview.js,v 1.2 2009/05/04 16:28:13 alimutlu Exp $
 *
 */

;(function($) {

	$.extend($.fn, {
		swapClass: function(c1, c2) {
			var c1Elements = this.filter('.' + c1);
			this.filter('.' + c2).removeClass(c2).addClass(c1);
			c1Elements.removeClass(c1).addClass(c2);
			return this;
		},
		replaceClass: function(c1, c2) {
			return this.filter('.' + c1).removeClass(c1).addClass(c2).end();
		},
		hoverClass: function(className) {
			className = className || "hover";
			return this.hover(function() {
				$(this).addClass(className);
			}, function() {
				$(this).removeClass(className);
			});
		},
		heightToggle: function(animated, callback) {
			animated ?
				this.animate({ height: "toggle" }, animated, callback) :
				this.each(function(){
					jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
					if(callback)
						callback.apply(this, arguments);
				});
		},
		heightHide: function(animated, callback) {
			if (animated) {
				this.animate({ height: "hide" }, animated, callback);
			} else {
				this.hide();
				if (callback)
					this.each(callback);				
			}
		},
		prepareBranches: function(settings) {
			if (!settings.prerendered) {
				// mark last tree items
				this.filter(":last-child:not(ul)").addClass(CLASSES.last);
				// collapse whole tree, or only those marked as closed, anyway except those marked as open
				this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide();
			}
			// return all items with sublists
			return this.filter(":has(>ul)");
		},
		applyClasses: function(settings, toggler) {
			this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event) {
				toggler.apply($(this).next());
			}).add( $("a", this) ).hoverClass();
			
			if (!settings.prerendered) {
				// handle closed ones first
				this.filter(":has(>ul:hidden)")
						.addClass(CLASSES.expandable)
						.replaceClass(CLASSES.last, CLASSES.lastExpandable);
						
				// handle open ones
				this.not(":has(>ul:hidden)")
						.addClass(CLASSES.collapsable)
						.replaceClass(CLASSES.last, CLASSES.lastCollapsable);
						
	            // create hitarea
				this.prepend("<div class=\"" + CLASSES.hitarea + "\"/>").find("div." + CLASSES.hitarea).each(function() {
					var classes = "";
					$.each($(this).parent().attr("class").split(" "), function() {
						classes += this + "-hitarea ";
					});
					$(this).addClass( classes );
				});
			}
			
			// apply event to hitarea
			this.find("div." + CLASSES.hitarea).click( toggler );
		},
		treeview: function(settings) {
			
			settings = $.extend({
				cookieId: "treeview"
			}, settings);
			
			if (settings.add) {
				return this.trigger("add", [settings.add]);
			}
			
			if ( settings.toggle ) {
				var callback = settings.toggle;
				settings.toggle = function() {
					return callback.apply($(this).parent()[0], arguments);
				};
			}
		
			// factory for treecontroller
			function treeController(tree, control) {
				// factory for click handlers
				function handler(filter) {
					return function() {
						// reuse toggle event handler, applying the elements to toggle
						// start searching for all hitareas
						toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {
							// for plain toggle, no filter is provided, otherwise we need to check the parent element
							return filter ? $(this).parent("." + filter).length : true;
						}) );
						return false;
					};
				}
				// click on first element to collapse tree
				$("a:eq(0)", control).click( handler(CLASSES.collapsable) );
				// click on second to expand tree
				$("a:eq(1)", control).click( handler(CLASSES.expandable) );
				// click on third to toggle tree
				$("a:eq(2)", control).click( handler() ); 
			}
		
			// handle toggle event
			function toggler() {
				$(this)
					.parent()
					// swap classes for hitarea
					.find(">.hitarea")
						.swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
						.swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
					.end()
					// swap classes for parent li
					.swapClass( CLASSES.collapsable, CLASSES.expandable )
					.swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
					// find child lists
					.find( ">ul" )
					// toggle them
					.heightToggle( settings.animated, settings.toggle );
				if ( settings.unique ) {
					$(this).parent()
						.siblings()
						// swap classes for hitarea
						.find(">.hitarea")
							.replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea )
							.replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea )
						.end()
						.replaceClass( CLASSES.collapsable, CLASSES.expandable )
						.replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable )
						.find( ">ul" )
						.heightHide( settings.animated, settings.toggle );
				}
			}
			
			function serialize() {
				function binary(arg) {
					return arg ? 1 : 0;
				}
				var data = [];
				branches.each(function(i, e) {
					data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0;
				});
				$.cookie(settings.cookieId, data.join("") );
			}
			
			function deserialize() {
				var stored = $.cookie(settings.cookieId);
				if ( stored ) {
					var data = stored.split("");
					branches.each(function(i, e) {
						$(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ]();
					});
				}
			}
			
			// add treeview class to activate styles
			this.addClass("treeview");
			
			// prepare branches and find all tree items with child lists
			var branches = this.find("li").prepareBranches(settings);
			
			switch(settings.persist) {
			case "cookie":
				var toggleCallback = settings.toggle;
				settings.toggle = function() {
					serialize();
					if (toggleCallback) {
						toggleCallback.apply(this, arguments);
					}
				};
				deserialize();
				break;
			case "location":
				var current = this.find("a").filter(function() { return this.href.toLowerCase() == location.href.toLowerCase(); });
				if ( current.length ) {
					current.addClass("selected").parents("ul, li").add( current.next() ).show();
				}
				break;
			}
			
			branches.applyClasses(settings, toggler);
				
			// if control option is set, create the treecontroller and show it
			if ( settings.control ) {
				treeController(this, settings.control);
				$(settings.control).show();
			}
			
			return this.bind("add", function(event, branches) {
				$(branches).prev()
					.removeClass(CLASSES.last)
					.removeClass(CLASSES.lastCollapsable)
					.removeClass(CLASSES.lastExpandable)
				.find(">.hitarea")
					.removeClass(CLASSES.lastCollapsableHitarea)
					.removeClass(CLASSES.lastExpandableHitarea);
				$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, toggler);
			});
		}
	});
	
	// classes used by the plugin
	// need to be styled via external stylesheet, see first example
	var CLASSES = $.fn.treeview.classes = {
		open: "open",
		closed: "closed",
		expandable: "expandable",
		expandableHitarea: "expandable-hitarea",
		lastExpandableHitarea: "lastExpandable-hitarea",
		collapsable: "collapsable",
		collapsableHitarea: "collapsable-hitarea",
		lastCollapsableHitarea: "lastCollapsable-hitarea",
		lastCollapsable: "lastCollapsable",
		lastExpandable: "lastExpandable",
		last: "last",
		hitarea: "hitarea"
	};
	
	// provide backwards compability
	$.fn.Treeview = $.fn.treeview;
	
})(jQuery);   

/*!
 * JSizes - JQuery plugin v0.32
 *
 * Licensed under the revised BSD License.
 * Copyright 2008, Bram Stein
 * All rights reserved.
 */
/*global jQuery*/
(function ($) {
	var num = function (value) {
		return parseInt(value, 10) || 0;
	};

	/**
	 * Sets or gets the values for min-width, min-height, max-width
	 * and max-height.
	 */
	$.each(['min', 'max'], function (i, name) {
		$.fn[name + 'Size'] = function (value) {
			var width, height;
			if (value) {
				if (value.width) {
					this.css(name + '-width', value.width);
				}
				if (value.height) {
					this.css(name + '-height', value.height);
				}
				return this;
			}
			else {
				width = this.css(name + '-width');
				height = this.css(name + '-height');
				// Apparently:
				//  * Opera returns -1px instead of none
				//  * IE6 returns undefined instead of none
				return {'width': (name === 'max' && (width === undefined || width === 'none' || num(width) === -1) && Number.MAX_VALUE) || num(width), 
						'height': (name === 'max' && (height === undefined || height === 'none' || num(height) === -1) && Number.MAX_VALUE) || num(height)};
			}
		};
	});

	/**
	 * Returns whether or not an element is visible.
	 */
	$.fn.isVisible = function () {
		return this.css('visibility') !== 'hidden' && this.css('display') !== 'none';
	};

	/**
	 * Sets or gets the values for border, margin and padding.
	 */
	$.each(['border', 'margin', 'padding'], function (i, name) {
		$.fn[name] = function (value) {
			if (value) {
				if (value.top) {
					this.css(name + '-top' + (name === 'border' ? '-width' : ''), value.top);
				}
				if (value.bottom) {
					this.css(name + '-bottom' + (name === 'border' ? '-width' : ''), value.bottom);
				}
				if (value.left) {
					this.css(name + '-left' + (name === 'border' ? '-width' : ''), value.left);
				}
				if (value.right) {
					this.css(name + '-right' + (name === 'border' ? '-width' : ''), value.right);
				}
				return this;
			}
			else {
				return {top: num(this.css(name + '-top' + (name === 'border' ? '-width' : ''))),
						bottom: num(this.css(name + '-bottom' + (name === 'border' ? '-width' : ''))),
						left: num(this.css(name + '-left' + (name === 'border' ? '-width' : ''))),
						right: num(this.css(name + '-right' + (name === 'border' ? '-width' : '')))};
			}
		};
	});
})(jQuery);

/*!
 * jLayout Grid Layout - JavaScript Layout Algorithms v0.41
 *
 * Licensed under the new BSD License.
 * Copyright 2008-2009, Bram Stein
 * All rights reserved.
 */
/*global jLayout */
(function () {
	jLayout = typeof jLayout === 'undefined' ? {} : jLayout;

	jLayout.grid = function (spec, shared) {
		var my = shared || {},
			that = {};

		my.hgap = spec.hgap || 0;
		my.vgap = spec.vgap || 0;

		// initialize the number of columns to the number of items
		// we're laying out.
		my.items = spec.items || [];
		my.columns = spec.columns || my.items.length;
		my.rows = spec.rows || 0;
		my.fillVertical = spec.fill && spec.fill === 'vertical';

		if (my.rows > 0) {
			my.columns = Math.floor((my.items.length + my.rows - 1) / my.rows); 
		} else {
			my.rows = Math.floor((my.items.length + my.columns - 1) / my.columns);
		}
	
		that.items = function () {
			var r = [];
			Array.prototype.push.apply(r, my.items);
			return r;
		};

		that.layout = function (container) {
			var i, j,
				insets = container.insets(),
				x = insets.left,
				y = insets.top,
				width = (container.bounds().width - (insets.left + insets.right) - (my.columns - 1) * my.hgap) / my.columns,
				height = (container.bounds().height - (insets.top + insets.bottom) - (my.rows - 1) * my.vgap) / my.rows;

			for (i = 0, j = 1; i < my.items.length; i += 1, j += 1) {
				my.items[i].bounds({'x': x, 'y': y, 'width': width, 'height': height});

				if (!my.fillVertical) {
					if (j >= my.columns) {
						y += height + my.vgap;
						x = insets.left;
						j = 0;
					}
					else {
						x += width + my.hgap;
					}
				} else {
					if (j >= my.rows) {
						x += width + my.hgap;
						y = insets.top;
						j = 0;
					} else {
						y += height + my.vgap;
					}
				}
				my.items[i].doLayout();
			}
			return container;
		};

		function typeLayout(type) {
			return function (container) {
				var i = 0, 
					width = 0, 
					height = 0, 
					type_size,
					insets = container.insets();

				for (; i < my.items.length; i += 1) {
					type_size = my.items[i][type + 'Size']();
					width = Math.max(width, type_size.width);
					height = Math.max(height, type_size.height);
				}
				return {
					'width': insets.left + insets.right + my.columns * width + (my.columns - 1) * my.hgap, 
					'height': insets.top + insets.bottom + my.rows * height + (my.rows - 1) * my.vgap
				};
			};
		}

		// this creates the min and preferred size methods, as they
		// only differ in the function they call.
		that.preferred = typeLayout('preferred');
		that.minimum = typeLayout('minimum');
		that.maximum = typeLayout('maximum');
		return that;
	};
})();


/*!
 * jLayout JQuery Plugin v0.17
 *
 * Licensed under the new BSD License.
 * Copyright 2008-2009 Bram Stein
 * All rights reserved.
 */
/*global jQuery jLayout*/
if (jQuery && jLayout) {
	(function ($) {
		/**
		 * This wraps jQuery objects in another object that supplies
		 * the methods required for the layout algorithms.
		 */
		function wrap(item, resize) {
			var that = {};

			$.each(['min', 'max'], function (i, name) {
				that[name + 'imumSize'] = function (value) {
                    var l = item.data('jlayout');
                    
					if (l) {
						return l[name + 'imum'](that);
					} else {
						return item[name + 'Size'](value);
					}
				};
			});

			$.extend(that, {
				doLayout: function () {
                    var l = item.data('jlayout');
                    
					if (l) {
                        l.layout(that);
					}
					item.css({position: 'absolute'});
				},
				isVisible: function () {
					return item.isVisible();
				},
				insets: function () {
					var p = item.padding(),
						b = item.border();

					return {
                        'top': p.top, 
						'bottom': p.bottom + b.bottom + b.top, 
						'left': p.left, 
						'right': p.right + b.right + b.left
                    };
				},
				bounds: function (value) {
					var tmp = {};

					if (value) {
						if (typeof value.x === 'number') {
							tmp.left = value.x;
						}
						if (typeof value.y === 'number') {
							tmp.top = value.y;
						}
						if (typeof value.width === 'number') {
							tmp.width = (value.width - (item.outerWidth(true) - item.width()));
							tmp.width = (tmp.width >= 0) ? tmp.width : 0;
						}
						if (typeof value.height === 'number') {
							tmp.height = value.height - (item.outerHeight(true) - item.height());
							tmp.height = (tmp.height >= 0) ? tmp.height : 0;
						}
						item.css(tmp);
						return item;
					} else {
						tmp = item.position();
						return {
                          	'x': tmp.left,
                        	'y': tmp.top,
							'width': item.outerWidth(false),
							'height': item.outerHeight(false)
                        };
					}
				},
				preferredSize: function () {
					var minSize,
						maxSize,
						margin = item.margin(),
						size = {width: 0, height: 0},
                        l = item.data('jlayout');

					if (l && resize) {
						size = l.preferred(that);

						minSize = that.minimumSize();
						maxSize = that.maximumSize();

						size.width += margin.left + margin.right;
						size.height += margin.top + margin.bottom;

						if (size.width < minSize.width || size.height < minSize.height) {
							size.width = Math.max(size.width, minSize.width);
							size.height = Math.max(size.height, minSize.height);
						} else if (size.width > maxSize.width || size.height > maxSize.height) {
							size.width = Math.min(size.width, maxSize.width);
							size.height = Math.min(size.height, maxSize.height);
						}
					} else {
                        size = that.bounds();
						size.width += margin.left + margin.right;
						size.height += margin.top + margin.bottom;
					}
					return size;
				}
			});
			return that;
		}

		$.fn.layout = function (options) {
			var opts = $.extend({}, $.fn.layout.defaults, options);
			return $.each(this, function () {
				var element = $(this),
					o = $.metadata && element.metadata().layout ? $.extend(opts, element.metadata().layout) : opts,
					elementWrapper = wrap(element, o.resize);

				if (o.type === 'border' && typeof jLayout.border !== 'undefined') {                
					$.each(['north', 'south', 'west', 'east', 'center'], function (i, name) {
						if (element.children().hasClass(name)) {
							o[name] = wrap(element.children('.' + name + ':first'));
						}
					});
					element.data('jlayout', jLayout.border(o));
				} else if (o.type === 'grid' && typeof jLayout.grid !== 'undefined') {
					o.items = [];
					element.children().each(function (i) {
						if (!$(this).hasClass('ui-resizable-handle')) {
							o.items[i] = wrap($(this));
						}
					});
					element.data('jlayout', jLayout.grid(o));
				} else if (o.type === 'flexGrid' && typeof jLayout.flexGrid !== 'undefined') {
					o.items = [];
					element.children().each(function (i) {
						if (!$(this).hasClass('ui-resizable-handle')) {
							o.items[i] = wrap($(this));
						}
					});
					element.data('jlayout', jLayout.flexGrid(o));
				} else if (o.type === 'column' && typeof jLayout.column !== 'undefined') {
					o.items = [];
					element.children().each(function (i) {
						if (!$(this).hasClass('ui-resizable-handle')) {
							o.items[i] = wrap($(this));
						}
					});
					element.data('jlayout', jLayout.column(o));
				} else if (o.type === 'flow' && typeof jLayout.flow !== 'undefined') {
					o.items = [];
					element.children().each(function (i) {
						if (!$(this).hasClass('ui-resizable-handle')) {
							o.items[i] = wrap($(this));
						}
					});
					element.data('jlayout', jLayout.flow(o));					
				}
                
				if (o.resize) {
					elementWrapper.bounds(elementWrapper.preferredSize());
				}
                
				elementWrapper.doLayout();
				element.css({position: 'relative'});
				if ($.ui !== undefined) {
					element.addClass('ui-widget');
				}
			});
		};

		$.fn.layout.defaults = {
			resize: true,
			type: 'grid'
		};
	})(jQuery);
}




var wptheme_DebugUtils = {
    // summary: Collection of utilities for logging debug messages.
    enabled: false, 
    log: function ( /*String*/className, /*String*/message ) {
            // summary: Logs a debugging message, if debugging is enabled.
            // className: the javascript class name or function name which is logging the message
            // message: the message to log
            if ( this.enabled ) {
                message = className + " ==> " + message;
                if ( typeof( console ) == "undefined" ) {
                        console.log( message );
                }
                else {
                        //better alternative for browsers that don't support console????
                        alert( message );
                }
            }    
    } 
}
var wptheme_HTMLElementUtils = {
	// summary: Collection of utility functions useful for manipulating HTML elements in a cross-browser fashion.
	className: "wptheme_HTMLElementUtils",
	_debugUtils: wptheme_DebugUtils,
    _uniqueIdCounter: 0,
	getUniqueId: function () {
		// summary: Generates a unique identifier (to the current page) by appending a counter to a set prefix.
		//		A page refresh resets the unique identifier counter.
		// returns: a unique identifier
		var retVal = "wptheme_unique_" + this._uniqueIdCounter;
		this._uniqueIdCounter++;
		return retVal;	// String
	},
	sizeToViewableArea: function ( /*HTMLElement*/element ) {
		// summary: Sizes the given element to the viewable area of the browser in a cross-browser fashion.
		// element: the html element to size
		var browserDimensions = new BrowserDimensions();
		element.style.height = browserDimensions.getViewableAreaHeight() + "px";
		element.style.width = browserDimensions.getViewableAreaWidth() + "px";
		element.style.top = browserDimensions.getScrollFromTop() + "px";
		element.style.left = browserDimensions.getScrollFromLeft() + "px";
	},
	sizeToEntireArea: function ( /*HTMLElement*/element ) {
		// summary: Sizes the given element to the viewable area plus the scroll area.
		// element: the html element to size
		var browserDimensions = new BrowserDimensions();
		//The getHTMLElement*() functions return the exact size of the body element in IE even if the viewable area is
		//larger (i.e. no scroll bars). In Firefox, the dimensions of the viewable area plus the scrollable area is returned.
		//So in IE, we take the viewable area if that is larger and the HTMLElement* area if that is larger.
		element.style.height = Math.max( browserDimensions.getHTMLElementHeight(), browserDimensions.getViewableAreaHeight() ) + "px";
		element.style.width = Math.max( browserDimensions.getHTMLElementWidth(), browserDimensions.getViewableAreaWidth() ) + "px";
	},
	sizeRelativeToViewableArea: function ( /*HTMLElement*/element, /*float*/heightFactor, /*float*/widthFactor ) {
		// summary: Sizes the given element to a certain multiple of the viewable area. For example, if heightFactor is 0.5,
		//		the height of the given element will be set to half of the viewable area height.
		// element: the html element to size
		// heightFactor: the factor to multiply the viewable area height by
		// widthFactor: the factor to multiply the viewable area width by
		var browserDimensions = new BrowserDimensions();
		element.style.height = ( browserDimensions.getViewableAreaHeight() * heightFactor ) + "px";
		element.style.width = ( browserDimensions.getViewableAreaWidth() * widthFactor ) + "px";
	},
	positionRelativeToViewableArea: function ( /*HTMLElement*/element, /*float*/heightFactor, /*float*/widthFactor ) {
		// summary: Positions the given element relative to the viewable area. For example, if the heightFactor is 0.5, the
		// 		top of the element will be positioned (Y axis) halfway down the viewable area. Note that this means the element
		//		will be ABSOLUTELY positioned.
		// element: the html element to position
		// heightFactor: the factor to multiply the viewable area height by
		// widthFactor: the factor to multiply the viewable area width by
		var browserDimensions = new BrowserDimensions();
		element.style.position = "absolute";
		if ( this._debugUtils.enabled ) { 
			this._debugUtils.log( this.className, "Browser's viewable height: " + browserDimensions.getViewableAreaHeight() );
			this._debugUtils.log( this.className, "Browser's viewable width: " + browserDimensions.getViewableAreaWidth() );
			this._debugUtils.log( this.className, "Browser's scroll from top: " + browserDimensions.getScrollFromTop() ); 
			this._debugUtils.log( this.className, "Browser's scroll from left: " + browserDimensions.getScrollFromLeft() );
		}
		element.style.top = ( ( browserDimensions.getViewableAreaHeight() * heightFactor ) + browserDimensions.getScrollFromTop() ) + "px";
		//Scroll left behaves differently in FF & IE in RTL languages. The "correct" behavior is up for debate. In FF, it will return the "correct" value 
		//(scrollLeft switches when the page is rendered right-to-left). In IE, scroll left will basically return the scroll width for the body element.
		//There's no real "capability" to test for here so the window.attachEvent is a cheap trick to check for IE.
		//bidiSupport is defined in the theme.
		if ( bidiSupport.isRTL && window.attachEvent ) {
			if ( this._debugUtils.enabled ) {
				this._debugUtils.log( this.className, "scrollWidth = " + browserDimensions.getHTMLElementWidth() );
				this._debugUtils.log( this.className, "clientWidth = " + browserDimensions.getViewableAreaWidth() );
				this._debugUtils.log( this.className, "Scroll Offset should be: " + ( browserDimensions.getHTMLElementWidth() - browserDimensions.getViewableAreaWidth() - browserDimensions.getScrollFromLeft() ) );
			}
			element.style.left = ( ( browserDimensions.getViewableAreaWidth() * widthFactor) + ( browserDimensions.getHTMLElementWidth() - browserDimensions.getViewableAreaWidth() - browserDimensions.getScrollFromLeft() ) ) + "px";
		}
		else {
			element.style.left = ( ( browserDimensions.getViewableAreaWidth() * widthFactor ) + browserDimensions.getScrollFromLeft() ) + "px";
		}	
	},
	positionOutsideElementTopRight: function ( /*HTMLElement*/elementToPosition, /*HTMLElement*/relativeElement ) {
		// summary: Positions the given element just outside (to the top and lining up with the right edge) of the
		//		relative element.
		// description: Sets the top (Y-axis) position of the given element to the top of the relative element minus the
		//		height of element being positioned. Sets the left (X-axis) position of the given element to the left position of
		//		the relative element plus the width of the relative element (to get the right edge) minus the width of the element 
		// 		being positioned (to line the end of the element being positioned up with the right edge of the relative element). 
		elementToPosition.style.position = "absolute";
		elementToPosition.style.top = ( this.stripUnits( relativeElement.style.top ) - elementToPosition.offsetHeight ) + "px";
		if ( bidiSupport.isRTL ) {
			elementToPosition.style.left = ( this.stripUnits( relativeElement.style.left ) ) + "px";
		}
		else {
			elementToPosition.style.left = ( this.stripUnits( relativeElement.style.left ) + relativeElement.offsetWidth - elementToPosition.offsetWidth) + "px";	
		}
	},
	stripUnits: function ( /*String*/cssProp ) {
		// summary: Strips any units (i.e. "px") from a CSS style property.
		// returns: the number value minus any units
		return parseInt( cssProp.substring( 0, cssProp.length - 2 ));	//integer
	},
	addClassName: function ( /*HTMLElement*/element, /*String*/className ) {
		// summary: Adds the given className to the element's style definitions.
		// element: the HTMLElement to add the class name to
		// className: the className to add
		var clazz = element.className;
		if ( clazz.indexOf( className ) < 0 ) {
			element.className += (" " + className);
		}	
	},
	removeClassName: function ( /*HTMLElement*/element, /*String*/className ) {
		// summary: Removes the given className from the element's style definitions.
		// element: the HTMLElement to remove the class name from
		// className: the className to remove
		var clazz = element.className;
		var startIndex = clazz.indexOf( className );
		if ( startIndex >= 0 ) {
			clazz = clazz.substring(0, startIndex) + clazz.substring( startIndex + className.length + 1 );
			element.className = clazz;
		}
	},
	hideElementsByTagName: function ( /*String 1...N*/) {
		// summary: Hides every element of a given tag name. Stores the old visibility style so it can be 
		//		restored by the showElementsByTagName function.
		for ( var i = 0; i < arguments.length; i++ ) {
			var elements = document.getElementsByTagName( arguments[i] );
			for ( var j = 0; j < elements.length; j++ ) {
				if ( elements[j] && elements[j].style ) {
					elements[j]._oldVisibilityStyle = elements[j].style.visibility;
					elements[j].style.visibility = "hidden";
				}
			}
		}
	},
	showElementsByTagName: function ( /*String 1...N*/) {
		// summary: Shows every element of a given tag name. Uses the old visibility style so that elements hidden
		//		by hideElementsByTagName are properly restored.
		for ( var i = 0; i < arguments.length; i++ ) {
			var elements = document.getElementsByTagName( arguments[i] );
			for ( var j = 0; j < elements.length; j++ ) {
				if ( elements[j] && elements[j].style ) {
					if ( elements[j]._oldVisibility ) {
						elements[j].style.visibility = elements[j]._oldVisibility;
						elements[j]._oldVisibility = null;
					}
					else {
						elements[j].style.visibility = "visible";
					}
				}
			}
		}	
	},
	addOnload: function ( /*Function*/func ) {
		// summary: Adds a function to be called on page load.
		// func: the function to call 
		if ( window.addEventListener ) {
			window.addEventListener( "load", func, false );
		}
		else if ( window.attachEvent ) {
			window.attachEvent( "onload", func );
		}
	},
	getEventObject: function ( /*Event?*/event ) {
		// summary: Cross-browser function to retrieve the event object.
		// event: In W3C-compliant browsers, this object will just simply be
		//		returned
		// returns: the event object
		var result = event;
		if ( !event && window.event ) {
			result = window.event;
		}
		return result;	// Event
	}
}

var wptheme_CookieUtils = {
	// summary: Various utility functions for dealing with cookies on the client.
	_deleteDate: new Date( "1/1/2003" ),
	_undefinedOrNull: function ( /*Object*/variable ) {
            // summary: Determines if a given variable is undefined or NULL.
            // returns: true if undefined OR NULL, false otherwise.
            return ( typeof ( variable ) == "undefined" || variable == null );  // boolean
	},
	debug: wptheme_DebugUtils,
        className: "wptheme_CookieUtils",
	getCookie: function ( /*String*/cookieName ) {
		// summary: Gets the value for a given cookie name. If no value is found, returns NULL.
		cookieName = cookieName + "="
		var retVal = null;
		if ( document.cookie.indexOf( cookieName ) >= 0 )
		{
		    var cookies = document.cookie.split(";");
		
		    var c = 0;
		    while ( c < cookies.length && ( cookies[c].indexOf( cookieName ) == -1 ) )
		    {
		        c=c+1;
		    }
			//Add one to the cookie length to account for the equals we added to the cookie name at the beginning of 
			//the function.
		    var cookieValue = cookies[c].substring( (cookieName.length + 1), cookies[c].length );
		    
		    if ( cookieValue != "null" )
		    {
		        retVal = cookieValue;
		    }
		}
		
		return retVal; // String
	},
	setCookie: function ( /*String*/name, /*String*/value, /*Date?*/expiration, /*String?*/path ) {
		// summary: Creates the cookie based on the given information.
		// name: the name of the cookie
		// value: the value for the cookie
		// expiration: OPTIONAL -- when the cookie should expire
		// path: OPTIONAL -- the url path the cookie applies to
		if ( this.debug.enabled ) { this.debug.log( this.className, "set cookie (" + [ name, value, expiration, path ]  + ")"); }
		
		if ( this._undefinedOrNull( name ) ) { throw Error( "Unable to set cookie! No name given!" ); }
		if ( this._undefinedOrNull( value ) ) { throw Error( "Unable to set cookie! No value given!" ); }
		if ( this._undefinedOrNull( expiration ) ) { 
			expiration = ""; 
		}
		else {
			expiration = "expiration=" + expiration.toUTCString() + ";";
		}
		if ( this._undefinedOrNull( path ) ) { 
			path = "path=/;"; 
		}
		else {
			path = "path=" + path + ";";
		}
		
		document.cookie=name + '=' + value + ';' + expiration +  path;		
	},
	deleteCookie: function ( /*String*/cookieName ) {
		// summary: Deletes a given cookie by setting the value to "null" and setting the expiration
		//		value to expire completely.
		if ( this.debug.enabled ) { this.debug.log( this.className, "delete cookie (" + [ cookieName ] + ") "); }
		this.setCookie( cookieName, "null", this._deleteDate );
	}
}
// Populates and shows a context menu asynchronously. 
//
// uniqueID             - some unique identifier describing the context of the menu (i.e. portlet window id)
// urlToMenuContents    - url target for the iFrame
// isLTR                - indicates if the page orientation is Left-to-Right
//
//
// This function creates a context menu using the WCL context menu javascript library. It populates this menu
// by creating a hidden DIV ( the ID consists of the unique identifier with "_DIV" appended ) which contains
// a hidden IFRAME ( the ID consists of the DIV identifier with "_IFRAME" appended ). The IFRAME loads the 
// specified URL and calls the buildAndDisplayMenu() function upon completion of loading the IFRAME. The document
// returned by the specified URL must contain a javascript function called "getMenuContents()" which returns 
// an array. The contents of the array must be in the following format ( array[i] = <menu-item-display-name>; 
// array[i+1] = <menu-item-action-url> ). The menu is attached to an HTML element with the id equal to the 
// unique identifier. So, in the portlet context menu case, the image associated with the context menu must have
// an ID equal to the portlet window ID. The dynamically created DIV and IFRAME are deleted after the menu 
// contents are populated and the same menu is returned for the duration of the request in which it was created.
//

//Control debugging. 
// -1 - no debugging
//  0 - minimal debugging ( adding items to menus )
//  1 - medium debugging ( function entry/exit )
//  2 - maximum debugging ( makes iframe visible )
// 999 - make iframe visible only
var asynchContextMenuDebug = -1;

var asynchContextMenuMouseOverIndicator = "";

var portletIdMap = new Object();

function asynchContextMenuOnMouseClickHandler( uniqueID, isLTR, urlToMenuContents, menuBorderStyle, menuTableStyle, menuItemStyle, menuItemSelectedStyle, emptyMenuText, loadingImage, renderBelow )
{
	var menuID = "contextMenu_" + uniqueID;
    
    var menu = getContextMenu( menuID );
    
    if (menu == null) 
    { 
    	asynchContextMenu_menuCurrentlyLoading = uniqueID;
    	
    	if ( loadingImage )
    	{
			setLoadingImage( loadingImage );
	    }

        menu = createContextMenu( menuID, isLTR, null, menuBorderStyle, menuTableStyle, emptyMenuText, null, renderBelow );
        loadAsynchContextMenu( uniqueID, urlToMenuContents, isLTR, menuItemStyle, menuItemSelectedStyle, '', true );
    }
    else
    {
    	if ( asynchContextMenu_menuCurrentlyLoading == uniqueID )
		{
			return;	
		}
    	showContextMenu( menuID, document.getElementById( uniqueID ) );
    }	
}

var asynchContextMenu_originalMenuImgElementSrc;

function setLoadingImage( img )
{
	asynchContextMenu_originalMenuImgElementSrc = document.getElementById( asynchContextMenu_menuCurrentlyLoading + "_img" ).src;
	document.getElementById( asynchContextMenu_menuCurrentlyLoading + "_img" ).src = img;
}

function clearLoadingImage()
{
	document.getElementById( asynchContextMenu_menuCurrentlyLoading + "_img" ).src = asynchContextMenu_originalMenuImgElementSrc;
}

function loadAsynchContextMenu( uniqueID, url, isLTR, menuItemStyle, menuItemSelectedStyle, emptyMenuText, showMenu, onMenuAffordanceShowHandler )
{
    asynchDebug( 'ENTRY loadAsynchContextMenu p1=' + uniqueID + '; p2=' + url + '; p3=' + isLTR + '; p4=' + isLTR);
	
	var menuID = "contextMenu_" + uniqueID;

    var dialogTag = null;
    var ID = uniqueID + '_DIV';
			
	//an iframe wasn't cleaned up properly
	if ( document.getElementById( ID ) != null )
	{
		closeMenu( ID );
        return;
	}
	
	//create the div tag and assign the styles to it		
	dialogTag = document.createElement( "DIV" );
	dialogTag.style.position="absolute";
	
	if ( asynchContextMenuDebug < 2 )
	{
		dialogTag.style.left = "0px";
		dialogTag.style.top  = "-100px";
    	dialogTag.style.visibility = "hidden";
	}
	
	if ( asynchContextMenuDebug >= 2 || asynchContextMenuDebug == 999 )
	{
		dialogTag.style.left = "100px";
		dialogTag.style.top  = "100px";
    	dialogTag.style.visibility = "visible";
	}		
	
	dialogTag.id=ID;
	
	var styleString = 'null';
	
	if ( menuItemStyle != null )
	{
		styleString = "'" + menuItemStyle + "'";
	}
	
	if ( menuItemSelectedStyle != null ) 
	{
		styleString = styleString + ", '" + menuItemSelectedStyle + "'";
	}
	else
	{
		styleString = styleString + ", null";
	}
	
	//alert( 'buildAndDisplayMenu( this.id, this.name, ' + styleString + ', ' + showMenu + ' , ' + callbackFn + ' );' );
	
    //create the iframe this way because onload handlers attached when creating dynamically don't seem to fire
    dialogTag.innerHTML='<iframe id="' + menuID + '" name="' + ID + '_IFRAME" src="' + url + '" onload="buildAndDisplayMenu( this.id, this.name, ' + styleString + ', ' + showMenu + ' , \''+ onMenuAffordanceShowHandler + '\' ); return false;" ></iframe>';
		
	//append the div tag to the document body		
	document.body.appendChild( dialogTag );

    asynchDebug( 'EXIT createDynamicElements' );

}



//Builds and displays the menu from the contents of the IFRAME.
function buildAndDisplayMenu( menuID, iframeID, menuItemStyle, menuItemSelectedStyle, showMenu, onMenuAffordanceShowHandler )
{
    asynchDebug( 'ENTRY buildAndDisplayMenu p1=' + menuID + '; p2=' + iframeID + '; p3=' + showMenu + '; p4=' + onMenuAffordanceShowHandler );
    
    //get the context menu, should have already been created.
    var menu = getContextMenu( menuID );

	//clear out our loading indicator
    clearLoadingImage();
   	asynchContextMenu_menuCurrentlyLoading = null;

    //if the menu doesn't exist, we shouldn't even be here....but just in case.
    if ( menu == null )
    {
        return false;
    }

    //strip the _IFRAME from the id to come up with the DIV id
    index = iframeID.indexOf( "_IFRAME" );
    var divID = iframeID.substring( 0, index );

    //strip the _DIV from the id to come up with the portlet id
    index2 = divID.indexOf( "_DIV" );
    var uniqueID = divID.substring( 0, index2 );
    
    asynchDebug( 'divID = ' + divID );
    asynchDebug( 'uniqueID = ' + uniqueID );

    var frame, c=-1, done=false;

    //In IE, referencing the iFrame via the name in the window.frames[] array
    //does not appear to work in this case, so we have to cycle through all the 
    //frames and compare the names to find the correct one.
    while ( ( c + 1 ) < window.frames.length && !done )
    {  
        c=c+1;

		//We have to surround this with a try/catch block because there are
		//cases where attempting to access the 'name' property of the current
		//frame in the array will generate an access denied exception. This is 
		//OK to ignore because any frame that generates this exception shouldn't
		//be the one we are looking for.
        try 
        {
            done = ( window.frames[c].name == iframeID );
        }
        catch ( e )
        {
            //do nothing.
        }
    }

    //Check for the existence of the function we are looking to call. 
    //If not, don't bother creating the menu. 
    if ( window.frames[c].getMenuContents )
    {
        contents = window.frames[c].getMenuContents();
    }
    else
    {
        //we were unable to load the context menu for whatever reason
        return false;
    }
    
    
    //Cycle through the array created by the getMenuContents()
    //function. The structure of the array should be [url, name].
    for ( i=0; i < contents.length; i=i+3 ) 
    {
        asynchDebug2( 'Adding item: ' + contents[i+1] );
        asynchDebug2( 'URL: ' + contents[i] );
        if ( contents[i] )
        {
        	asynchDebug2( 'url length: ' + contents[i].length );
        }
        asynchDebug2( 'icon: ' + contents[i+2] );

        if ( contents[i] && contents[i].length != 0 )
        {
        	var icon = null;
        	
        	if ( contents[i+2] && contents[i+2].length != 0 )
        	{
        		icon = contents[i+2];
        	}
        
            menu.add( new UilMenuItem( contents[i+1], true, '', contents[i], null, icon, null, menuItemStyle, menuItemSelectedStyle ) );
        }
    }

    //our target image should have an ID of the uniqueID
    var target = document.getElementById( uniqueID );
    //remove our iframe since we've created the menu, we don't need the iframe on this request anymore.
    // (148004) deleting the elements causes the status bar to spin forever on mozilla
    //deleteDynamicElements( divID );

    asynchDebug( 'EXIT buildAndDisplayMenu' );

	//asynchContextMenuOnLoadCheck( menuID, uniqueID, target, onMenuAffordanceShowHandler );

    //...and display!
    if ( showMenu == null || showMenu == true )
    {
    	return showContextMenu( menuID, target ); 
    }
}


//Creates and loads the IFRAME.
function createDynamicElements( uniqueID, url, menuID, menuItemStyle, menuItemSelectedStyle )
{
    asynchDebug( 'ENTRY createDynamicElements p1=' + uniqueID + '; p2=' + url + '; p3=' + menuID );

    var dialogTag = null;
    var ID = uniqueID + '_DIV';
			
	//an iframe wasn't cleaned up properly
	if ( document.getElementById( ID ) != null )
	{
		closeMenu( ID );
        return;
	}
	
	//create the div tag and assign the styles to it		
	dialogTag = document.createElement( "DIV" );
	dialogTag.style.position="absolute";
	
	if ( asynchContextMenuDebug < 2 )
	{
		dialogTag.style.left = "0px";
		dialogTag.style.top  = "-100px";
    	dialogTag.style.visibility = "hidden";
	}
	
	if ( asynchContextMenuDebug >= 2 || asynchContextMenuDebug == 999 )
	{
		dialogTag.style.left = "100px";
		dialogTag.style.top  = "100px";
    	dialogTag.style.visibility = "visible";
	}		
	
	dialogTag.id=ID;
	
	var styleString = 'null, null';
	
	if ( menuItemStyle != null )
	{
		styleString = "'" + menuItemStyle + "'";
	}
	
	if ( menuItemSelectedStyle != null ) 
	{
		styleString = styleString + ", '" + menuItemSelectedStyle + "'";
	}
	else
	{
		styleString = styleString + ", null";
	}
    
    //create the iframe this way because onload handlers attached when creating dynamically don't seem to fire
    dialogTag.innerHTML='<iframe id="' + menuID + '" name="' + ID + '_IFRAME" src="' + url + '" onload="buildAndDisplayMenu( this.id, this.name, ' + styleString + ' ); return false;" ></iframe>';
		
	//append the div tag to the document body		
	document.body.appendChild( dialogTag );

    asynchDebug( 'EXIT createDynamicElements' );
}

function asynchDebug( str ) 
{
	if ( asynchContextMenuDebug >= 1 && asynchContextMenuDebug != 999 )
	{
	    alert( str );
	}
}

function asynchDebug2( str )
{
	if ( asynchContextMenuDebug >= 0 && asynchContextMenuDebug != 999 )
	{
    	alert( str) ;
    }
}

//MMD - this function is used so that relative URLs may be used with the context menus.
function asynchDoFormSubmit( url ){

    var formElem = document.createElement("form");
    document.body.appendChild(formElem);

    formElem.setAttribute("method", "GET");

    var delimLocation = url.indexOf("?");
    
    if (delimLocation >= 0) {
        var newUrl = url.substring(0, delimLocation);
        
        var paramsEnd = url.length;
        // test to see if a # fragment identifier (the layout node id) is appended to the end of the URL
        var layoutNodeLocation = url.indexOf("#");
        if (layoutNodeLocation >= 0 && layoutNodeLocation > delimLocation) {
            paramsEnd = layoutNodeLocation;
            newUrl = newUrl + url.substring(layoutNodeLocation, url.length);
        }
        
        var params = url.substring(delimLocation + 1, paramsEnd);
        var paramArray = params.split("&");

        for (var i = 0; i < paramArray.length; i++) {
            var name = paramArray[i].substring(0, paramArray[i].indexOf("="));
            var value = paramArray[i].substring(paramArray[i].indexOf("=") + 1, paramArray[i].length);

            var inputElem = document.createElement("input");
            inputElem.setAttribute("type", "hidden");
            inputElem.setAttribute("name", name);
            inputElem.setAttribute("value", value);
            formElem.appendChild(inputElem);
        }
        
        url = newUrl;

    }

    formElem.setAttribute("action", url);
    
    formElem.submit();

}

var asynchContextMenu_menuCurrentlyLoading = null;

function menuMouseOver( id, selectedImage )
{
	if ( asynchContextMenu_menuCurrentlyLoading != null )
		return;

	portletIdMap[id] = 'menu_'+id+'_img';
	showAffordance(id, selectedImage);
}

function menuMouseOut( id, disabledImage )
{
	if ( asynchContextMenu_menuCurrentlyLoading != null )
		return;
	
   	hideAffordance(id , disabledImage);
	portletIdMap[id] = "";
}

function showAffordance( id, selectedImage )
{
	document.getElementById( 'menu_'+id ).style.cursor='pointer';
	document.getElementById( 'menu_'+id+'_img').src=selectedImage;
}

function hideAffordance( id, disabledImage )
{
	document.getElementById( 'menu_'+id ).style.cursor='default';
	document.getElementById( 'menu_'+id+'_img').src=disabledImage;	
}

function menuMouseOverThinSkin(id, selectedImage, minimized)
{
	if ( asynchContextMenu_menuCurrentlyLoading != null )
		return;

	portletIdMap[id] = 'menu_'+id+'_img';
	showAffordanceThinSkin(id, selectedImage, minimized);
}

function menuMouseOutThinSkin(id, disabledImage, minimized )
{
	if ( asynchContextMenu_menuCurrentlyLoading != null)
		return;

   	hideAffordanceThinSkin(id , disabledImage, minimized);
	portletIdMap[id] = "";
}

function showAffordanceThinSkin(id, selectedImage, minimized)
{
	document.getElementById( 'menu_'+id ).style.cursor='pointer';
	document.getElementById( 'portletTitleBar_'+id ).className='wpsThinSkinContainerBar wpsThinSkinContainerBarBorder';
	document.getElementById( 'title_'+id ).className='wpsThinSkinDragZoneContainer wpsThinSkinVisible';
	document.getElementById( 'menu_'+id+'_img' ).src=selectedImage;
}

function hideAffordanceThinSkin(id, disabledImage, minimized)
{
	document.getElementById( 'menu_'+id ).style.cursor='default';
	/* when minimized, the titlebar should always be displayed so it can be found by the user, so we don't hide it */
	if (minimized == null || minimized == false){
	document.getElementById( 'portletTitleBar_'+id ).className='wpsThinSkinContainerBar';
	}
	document.getElementById( 'title_'+id ).className='wpsThinSkinDragZoneContainer wpsThinSkinInvisible';
	document.getElementById( 'menu_'+id+'_img' ).src=disabledImage;	
}

var onmousedownold_;

function closeMenu(id, disabledImage)
{
	hideCurrentContextMenu();

	if (  portletIdMap[id] == "")
	{
		hideAffordance( id, disabledImage );
	}
	
	document.onmousedown = onmousedownold_;
}

function showPortletMenu( id, portletNoActionsText, isRTL, menuPortletURL, disabledImage, loadingImage )
{
	if ( portletIdMap[id].indexOf( id ) < 0  )
		return;
		
	asynchContextMenuOnMouseClickHandler('menu_'+id,!isRTL,menuPortletURL, null, null, null, null, portletNoActionsText, loadingImage );
   	onmousedownold_ = document.onmousedown;
	document.onmousedown = closeMenu;
}

function accessibleShowMenu( event , id , portletNoActionsText, isRTL, menuPortletURL, loadingImage )
{
	if ( event.which == 13 )
	{
	    asynchContextMenuOnMouseClickHandler( 'menu_'+id,!isRTL,menuPortletURL, null, null, null, null, portletNoActionsText, loadingImage );
	}
	else
	{
	 	return true;
	}
}

wptheme_AsyncMenuAffordance = function ( /*String*/anchorId, /*String*/imageId, /*String*/showingImgUrl, /*String*/hidingImgUrl ) {
	// summary: Representation of an asynchronous menu's affordance (UI element which triggers the menu to show). Manages the details
	//		of showing/hiding the affordance, if appropriate.
	// description: In the Portal theme, we want the menu affordance to only show during certain events (e.g. mouseover the page name). The details
	//		of the showing/hiding is a little more complicated than changing the css on an HTML element due to various rendering/accessibility concerns. This 
	//		object manages these details. 
	this.anchorId = anchorId;
	this.imageId = imageId;
	this.showingImgUrl = showingImgUrl;
	this.hidingImgUrl = hidingImgUrl;
	
	this.show = function () {
		// summary: Shows the affordance.		
		if (document.getElementById( this.anchorId ) != null) {
			document.getElementById( this.anchorId ).style.cursor = 'pointer';
			document.getElementById( this.imageId ).src=this.showingImgUrl;
		}	
	}
	this.hide = function () {
		// summary: Hides the affordance.
		if (document.getElementById( this.anchorId ) != null) {
			document.getElementById( this.anchorId ).style.cursor = 'default';
			document.getElementById( this.imageId ).src=this.hidingImgUrl;
		}
	}
}

wptheme_AsyncMenu = function ( /*String*/id, /*String*/menuBorderStyle, /*String*/menuStyle, /*String*/menuItemStyle, /*String*/selectedMenuItemStyle ) {
		// summary: Representation of an asynchronous context menu. Manages showing/hiding the menu as well as showing/hiding the menu's affordance (UI element
		//		which opens the menu). 
		// id: the menu's id
		// menuBorderStyle: the style name to be applied to the menu's border
		// menuStyle: the style name to be applied to the general menu
		// menuItemStyle: the style name to be applied to the menu item
		// selectedMenuItemStyle: the style name to be applied to a selected menu item
		
		//global utilities
		this._htmlUtils = wptheme_HTMLElementUtils;
		
		//properties passed in at construction time
		this.id = id;
		this.menuBorderStyle = menuBorderStyle; 
		this.menuStyle = menuStyle;
		this.menuItemStyle = menuItemStyle;
		this.selectedMenuItemStyle = selectedMenuItemStyle;
		
		//properties that have to be initialized in the theme
		this.url = null;
		this.isRTL = false;
		this.emptyMenuText = null;
		this.loadingImgUrl = null;
		this.affordance = null;
		this.init = function ( /*String*/ url, /*boolean*/isRTL, /*String*/ emptyMenuText, /*String*/ loadingImgUrl, /*wptheme_MenuAffordance*/affordance, /*boolean*/renderBelow ) {
			// summary: Convenience function for setting up the required variables for showing the page menu.
			// url: the url to load page menu contents (usually created with <portal-navgation:url themeTemplate="pageContextMenu" />)
			// isRTL: is the current locale a right-to-left locale
			// emptyMenuText: the text to display if the user has no valid options
			// loadingImgUrl: the url to the image to display while the menu is loading
			this.url = url;
			this.isRTL = isRTL;
			this.emptyMenuText = emptyMenuText;
			this.loadingImgUrl = loadingImgUrl;
			this.affordance = affordance;
			this.renderBelow = renderBelow;
		}
		this.show = function ( /*Event?*/evt ) {
			// summary: Shows the page menu for the selected page. 
			// description: Typically triggered by 2 types of events: click and keypress. On a click event, we just want to show the menu. On a keypress
			//		event, we want to make sure the ENTER/RETURN key was pressed before showing the menu.
			// event: Event object passed in when triggered from a key press event.
			
			evt = this._htmlUtils.getEventObject( evt );
			var show = false;
			var result;
			//On a keypress event, we want to make sure the ENTER/RETURN key was pressed before showing the menu.
			if ( evt && evt.type == "keypress" ) { 
				var keyCode = -1;
				if ( evt && evt.which ){	
					keyCode = evt.which;
				}
				else {
					keyCode = evt.keyCode
				}	
		
				//Enter/Return was the key that triggered this keypress event.
				if ( keyCode == 13 ) {
					show = true;
				}						
			}
			else {
				//Some other kind of event, just show the menu already...
				show = true;
			}
			
			//Show the menu if necessary.
			if ( show ) {
				result = asynchContextMenuOnMouseClickHandler( this.id, !this.isRTL, this.url, this.menuBorderStyle, this.menuStyle, this.menuItemStyle, this.selectedMenuItemStyle, this.emptyMenuText, this.loadingImgUrl, this.renderBelow );
			} 
			
			return result;
		}
		this.showAffordance = function () {
			// summary: Shows the affordance associated with the given asynchronous menu. 
			if ( asynchContextMenu_menuCurrentlyLoading == null ) {
				this.affordance.show();
			}	
		}
		this.hideAffordance = function () {
			// summary: Hides the affordance associated with the given asynchronous menu.
			if ( asynchContextMenu_menuCurrentlyLoading == null ) {
				this.affordance.hide();
			}
		}
	}

wptheme_ContextMenuUtils = {
	// summary: Utility object for managing the different context menus in the theme. Constructs the wptheme_AsyncMenu objects here, initialization must take place in
	//		the head section of the HTML document (usually the initialization values require the usage of JSP tags). 
	moreMenu: new wptheme_AsyncMenu( "wptheme_more_menu", "wptheme-more-menu-border", "wptheme-more-menu", "wptheme-more-menu-item", "wptheme-more-menu-item-selected", true ),
	topNavPageMenu: new wptheme_AsyncMenu( "wptheme_selected_page_menu", "wptheme-page-menu-border", "wptheme-page-menu", "wptheme-page-menu-item", "wptheme-page-menu-item-selected" ),
	sideNavPageMenu: new wptheme_AsyncMenu( "wptheme_selected_page_menu", "wptheme-page-menu-border", "wptheme-page-menu", "wptheme-page-menu-item", "wptheme-page-menu-item-selected" )
}




//////////////////////////////////////////////////////////////////
// begin BrowserDimensions object definition
BrowserDimensions.prototype				= new Object();
BrowserDimensions.prototype.constructor = BrowserDimensions;
BrowserDimensions.superclass			= null;

function BrowserDimensions(){

    this.body = document.body;
    if (this.isStrictDoctype() && !this.isSafari()) {
        this.body = document.documentElement;
    }

}

BrowserDimensions.prototype.getScrollFromLeft = function(){
    return this.body.scrollLeft ;
}

BrowserDimensions.prototype.getScrollFromTop = function(){
    return this.body.scrollTop ;
}

BrowserDimensions.prototype.getViewableAreaWidth = function(){
    return this.body.clientWidth ;
}

BrowserDimensions.prototype.getViewableAreaHeight = function(){
    return this.body.clientHeight ;
}

BrowserDimensions.prototype.getHTMLElementWidth = function(){
    return this.body.scrollWidth ;
}

BrowserDimensions.prototype.getHTMLElementHeight = function(){
    return this.body.scrollHeight ;
}

BrowserDimensions.prototype.isStrictDoctype = function(){

    return (document.compatMode && document.compatMode != "BackCompat");

}

BrowserDimensions.prototype.isSafari = function(){

    return (navigator.userAgent.toLowerCase().indexOf("safari") >= 0);

}

// end BrowserDimensions object definition
//////////////////////////////////////////////////////////////////


//Provides a controller for enabling and disabling javascript events
//on a particular HTML element. Elements must register with the controller
//in order to be enabled/disabled. The act of registering with the controller
//disables the element, unless otherwise specified. 
//
//
// **The main purpose of this controller is to disable the javascript 
//actions of certain elements that, if executed prior to the page completely 
//loading, cause problems.

//Object definition for ElementJavascriptEventController
function ElementJavascriptEventController()
{
	//Registered elements to disable and enable upon page load.
	this.elements = new Array();
	this.arrayPosition = 0;
	
	//Function mappings
	this.enableAll = enableRegisteredElementsInternal;
	this.disableAll = disableRegisteredElementsInternal;
	this.register = registerElementInternal;
	this.enable = enableRegisteredElementInternal;
	this.disable = disableRegisteredElementInternal;
	
	//Enables all registered items.
	function enableRegisteredElementsInternal()
	{
		for ( c=0; c < this.arrayPosition; c=c+1 )
		{
			this.elements[c].enable();	
		}
	}
	
	function enableRegisteredElementInternal( id )
	{
		for ( c=0; c < this.arrayPosition; c=c+1 )
		{
			if ( this.elements[c].ID == id )
			{
				this.elements[c].enable();
			}
		}
	}
	
	//Disables all registered items.
	function disableRegisteredElementsInternal()
	{
		for ( c=0; c < this.arrayPosition; c=c+1 )
		{
			this.elements[c].disable();
		}
	}
	
	function disableRegisteredElementInternal( id )
	{
		for ( c=0; c < this.arrayPosition; c=c+1 )
		{
			if ( this.elements[c].ID == id )
			{
				this.elements[c].disable();
			}
		}
	}
	
	//Registers an item with the controller.
	function registerElementInternal( HTMLElementID, doNotDisable, optionalOnEnableJavascriptAction )
	{
		this.elements[ this.arrayPosition ] = new RegisteredElement( HTMLElementID, doNotDisable, optionalOnEnableJavascriptAction );
		this.arrayPosition = this.arrayPosition + 1;
	}
}

//Object definition for an element registered with the controller.
//These objects should only be created by the controller.
function RegisteredElement( ElementID, doNotDisable, optionalOnEnableJavascriptAction )
{
	//Information about the element.
	this.ID = ElementID;
	this.oldCursor = "normal";
	this.ItemOnMouseDown = null;
	this.ItemOnMouseUp = null;
	this.ItemOnMouseOver = null;
	this.ItemOnMouseOut = null;
	this.ItemOnMouseClick = null;
	this.ItemOnBlur = null;
	this.ItemOnFocus = null;
	this.ItemOnChange = null;
	this.onEnableJS = optionalOnEnableJavascriptAction;
	
	//Function mappings
	this.enable = enableInternal;
	this.disable = disableInternal;
	
	//Enables an element. Enabling consists of changing the cursor
	//style back to the original style, and returning all the stored
	//javascript events to their original state. If the HTML element
	//is a button, the disabled property is simply set to false.
	function enableInternal()
	{
		//Return the old cursor style.
		document.getElementById( this.ID ).style.cursor = this.oldCursor;
		
		//If it's a button, re-enable it.
		if ( document.getElementById( this.ID ).tagName == "BUTTON" )
		{
			document.getElementById( this.ID ).disabled = false;
		}
		else
		{
			//Return all the events.
			document.getElementById( this.ID ).onmousedown = this.ItemOnMouseDown;
			document.getElementById( this.ID ).onmouseup = this.ItemOnMouseUp;
			document.getElementById( this.ID ).onmouseover = this.ItemOnMouseOver;
			document.getElementById( this.ID ).onmouseout = this.ItemOnMouseOut;
			document.getElementById( this.ID ).onclick = this.ItemOnMouseClick;
			document.getElementById( this.ID ).onblur = this.ItemOnBlur;
			document.getElementById( this.ID ).onfocus = this.ItemOnFocus;
			document.getElementById( this.ID ).onchange = this.ItemOnChange;	
		}
		
		//Execute the onEnable Javascript, if specified.
		if ( this.onEnableJS != null )
		{
			eval( this.onEnableJS );
		}
	}
	
	//Disables an element. Disabling consists of changing the cursor
	//style to "not-allowed", and setting all the javascript events to
	//do nothing. If the HTML element is a button, the "disabled" property
	//is simply set to true.	
	function disableInternal() 
	{
		//Set the cursor style to point out that you can't do anything yet
		this.oldCursor = document.getElementById( this.ID ).style.cursor;
		document.getElementById( this.ID ).style.cursor = "not-allowed";
	
		//If the HTML element is a BUTTON, we can easily disable it by
		//setting the disabled property to true.
		if ( document.getElementById( this.ID ).tagName == "BUTTON" )
		{
			document.getElementById( this.ID ).disabled = true;
		}
		else
		{
			//Store all the current events registered to the item.
			this.ItemOnMouseDown = document.getElementById( this.ID ).onmousedown;
			this.ItemOnMouseUp = document.getElementById( this.ID ).onmouseup;
			this.ItemOnMouseOver = document.getElementById( this.ID ).onmouseover;
			this.ItemOnMouseOut = document.getElementById( this.ID ).onmouseout;
			this.ItemOnMouseClick = document.getElementById( this.ID ).onclick;
			this.ItemOnBlur = document.getElementById( this.ID ).onblur;
			this.ItemOnFocus = document.getElementById( this.ID ).onfocus;
			this.ItemOnChange = document.getElementById( this.ID ).onchange;
			
			//Now set all the current events to do nothing.
			document.getElementById( this.ID ).onmousedown = function () { void(0); return false; };
			document.getElementById( this.ID ).onmouseup = function () { void(0); return false; };
			document.getElementById( this.ID ).onmouseover = function () { void(0); return false; };
			document.getElementById( this.ID ).onmouseout = function () { void(0); return false; };
			document.getElementById( this.ID ).onclick = function () { void(0); return false; };
			document.getElementById( this.ID ).onblur = function () { void(0); return false; };
			document.getElementById( this.ID ).onfocus = function () { void(0); return false; };
			document.getElementById( this.ID ).onchange = function () { void(0); return false; };
		}
	}		
	
	//Disable the element
	if ( !doNotDisable )
	{
		this.disable();	
	}
	
}
 
// Global variables 
var wpsFLY_isIE = document.all?1:0;
var wpsFLY_isNetscape=document.layers?1:0;                             
var wpsFLY_isMoz = document.getElementById && !document.all;

// This sets how many pixels of the tab should show when collapsed was 11
var wpsFLY_minFlyout=0;

// How many pixels should it move every step? 
var wpsFLY_move=15;
if (wpsFLY_isIE)
   wpsFLY_move=12;

// Specify the scroll speed in milliseconds
var wpsFLY_scrollSpeed=1;

// Timeout ID for flyout
var wpsFLY_timeoutID=1;

// How from from top of screen for scrolling
var wpsFLY_fromTop=100;
var wpsFLY_leftResize;

//Cross browser access to required dimensions 
var wpsFLY_browserDimensions = new BrowserDimensions();

var wpsFLY_initFlyoutExpanded = wpsFLY_getInitialFlyoutState();

// Current state of the flyout for the life of the request (true=in, false=out)
var wpsFLY_state = true;

var wpsFLY_currIndex = -1;
// -----------------------------------------------------------------
// Initialize the Flyout
// -----------------------------------------------------------------
function wpsFLY_initFlyout(showHidden)
{
   wpsFLY_Flyout=new wpsFLY_makeFlyout('wpsFLYflyout');
   wpsFLY_Flyout.setWidth(wpsFLY_minFlyout);
   wpsFLY_Flyout.css.overflow = 'hidden';
   wpsFLY_Flyout.setLeft( wpsFLY_Flyout.pageWidth() - wpsFLY_minFlyout-1 );

   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      scrolled="window.pageYOffset";
   else if (wpsFLY_isIE)
      scrolled="document.body.scrollTop";

   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      wpsFLY_fromTop=wpsFLY_Flyout.css.top;
   else if (wpsFLY_isIE)
      wpsFLY_fromTop=wpsFLY_Flyout.css.pixelTop;

   if (wpsFLY_isIE) {
      window.onscroll=wpsFLY_internalScroll;
      window.onresize=wpsFLY_internalScroll;
   }
   else {
     window.onscroll=wpsFLY_internalScroll();
   }

   if (showHidden)
      wpsFLY_Flyout.css.visibility="hidden";
   else
      wpsFLY_Flyout.css.visibility="visible";

   //Open or close the flyout depending on the init state.
   if ( wpsFLY_initFlyoutExpanded != null )
   {
       wpsFLY_toggleFlyout( wpsFLY_initFlyoutExpanded, true );
   }

   return;
}

// -----------------------------------------------------------------
// Initialize the Flyout on left
// -----------------------------------------------------------------
function wpsFLY_initFlyoutLeft(showHidden)
{
   wpsFLY_FlyoutLeft=new wpsFLY_makeFlyoutLeft('wpsFLYflyout');

   if (wpsFLY_isIE) {
      wpsFLY_FlyoutLeft.setWidth(wpsFLY_minFlyout);
      wpsFLY_FlyoutLeft.css.overflow = 'hidden';
	   wpsFLY_FlyoutLeft.setLeft(0);
   } else {
      //  Mozilla does not move the scroll to the left for bidi languages
	   wpsFLY_FlyoutLeft.setLeft(wpsFLY_minFlyout - wpsFLY_FlyoutLeft.getWidth()- 4);
   }

   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      scrolled="window.pageYOffset";
   else if (wpsFLY_isIE)
      scrolled="document.body.scrollTop";

   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      wpsFLY_fromTop=wpsFLY_FlyoutLeft.css.top;
   else if (wpsFLY_isIE)
      wpsFLY_fromTop=wpsFLY_FlyoutLeft.css.pixelTop;

   if (wpsFLY_isIE) {
      window.onscroll=wpsFLY_internalScrollLeft;
      window.onresize=wpsFLY_internalResizeLeft;
   } else
      window.onscroll=wpsFLY_internalScrollLeft();

   if (showHidden)
      wpsFLY_FlyoutLeft.css.visibility="hidden";
   else
      wpsFLY_FlyoutLeft.css.visibility="visible";
      
   //Open or close the flyout depending on the init state.
   if ( wpsFLY_initFlyoutExpanded != null )
   {
       wpsFLY_toggleFlyout( wpsFLY_initFlyoutExpanded, true );
   }   
}


// -----------------------------------------------------------------
// Constructs flyout (default on right)
// -----------------------------------------------------------------
function wpsFLY_makeFlyout(obj)
{
   this.origObject=document.getElementById(obj);
   //get the css for the DIV tag, need it later
   if (wpsFLY_isNetscape)
      this.css=eval('document.'+obj);
   else if (wpsFLY_isMoz)
      this.css=document.getElementById(obj).style;
   else if (wpsFLY_isIE)
      this.css=eval(obj+'.style');

   //initialize the expand state
   wpsFLY_state=1;
   this.go=0;

   //get the width
   if (wpsFLY_isNetscape)
      this.width=this.css.document.width;
   else if (wpsFLY_isMoz)
      this.width=document.getElementById(obj).offsetWidth;
   else if (wpsFLY_isIE)
      this.width=eval(obj+'.offsetWidth');

   this.setWidth=wpsFLY_internalSetWidth;
   this.getWidth=wpsFLY_internalGetWidth;
   
   //set a left method to make it common across browsers
   this.left=wpsFLY_internalGetLeft;
   this.pageWidth=wpsFLY_internalGetPageWidth;
   this.setLeft = wpsFLY_internalSetLeft;

   this.obj = obj + "Object";   
   eval(this.obj + "=this");  
}

// -----------------------------------------------------------------
// Constructs flyout (on left)
// -----------------------------------------------------------------
function wpsFLY_makeFlyoutLeft(obj)        
{
   this.origObject=document.getElementById(obj);
	//get the css for the DIV tag, need it later
    if (wpsFLY_isNetscape) 
		this.css=eval('document.'+obj);
    else if (wpsFLY_isMoz) 
		this.css=document.getElementById(obj).style;
    else if (wpsFLY_isIE) 
		this.css=eval(obj+'.style');

	//initialize the expand state
	wpsFLY_state=1;
	this.go=0;
	
	//get the width
	if (wpsFLY_isNetscape) 
		this.width=this.css.document.width;
    else if (wpsFLY_isMoz) 
		this.width=document.getElementById(obj).offsetWidth;
    else if (wpsFLY_isIE) 
		this.width=eval(obj+'.offsetWidth');

   this.setWidth=wpsFLY_internalSetWidthLeft;
   this.getWidth=wpsFLY_internalGetWidthLeft;

	//set a left method to make it common across browsers
	this.left=wpsFLY_internalGetLeft;
   this.pageWidth=wpsFLY_internalGetPageWidth;
   this.setLeft = wpsFLY_internalSetLeft;

   this.obj = obj + "Object"; 	
   eval(this.obj + "=this");	
}


// -----------------------------------------------------------------
// The internal api to get the page width value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalGetPageWidth()
{
   //get the width
   return wpsFLY_browserDimensions.getViewableAreaWidth();
}

function wpsFLY_internalSetLeft( value )
{
    this.css.left=value + "px";
}

// -----------------------------------------------------------------
// The internal api to set the width value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalSetWidth(value)
{
   this.css.width = value + "px";
   if (navigator.userAgent.indexOf ("Opera") != -1) {
      var operaIframe=document.getElementById('wpsFLY_flyoutIFrame');
      operaIframe.style.width = (value-wpsFLY_minFlyout) + "px" ;
   }
}

// -----------------------------------------------------------------
// The internal api to set the width value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalSetWidthLeft(value)
{
   this.css.width = value + "px";
   if (navigator.userAgent.indexOf ("Opera") != -1) {
      var operaIframe=document.getElementById('wpsFLY_flyoutIFrame');
      operaIframe.style.width = (value-wpsFLY_minFlyout) + "px" ;
   }
}

// -----------------------------------------------------------------
// The internal api to get the width value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalGetWidth()
{
   //get the width
   if (wpsFLY_isNetscape)
      return eval(this.css.document.width);
   else if (wpsFLY_isMoz||wpsFLY_isIE)
      return eval(this.origObject.offsetWidth);
}

// -----------------------------------------------------------------
// The internal api to get the width value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalGetWidthLeft()
{
   var width;
   if (wpsFLY_isNetscape)
      width = eval(this.css.document.width);
   else if (wpsFLY_isMoz||wpsFLY_isIE)
      width = eval(this.origObject.offsetWidth);
   return width;
}

// -----------------------------------------------------------------
// The internal api to get the left value that is cross browser
// -----------------------------------------------------------------
function wpsFLY_internalGetLeft()
{
   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      leftfunc=parseInt(this.css.left);
   else if (wpsFLY_isIE)
      leftfunc=eval(this.css.pixelLeft);
   return leftfunc;
}

// -----------------------------------------------------------------
// The internal fly out function, called my real function, only 
// wpsFLY_moveOutFlyout should call this function.
// -----------------------------------------------------------------
function wpsFLY_internalMoveOut()
{
	document.getElementById('wpsFLYflyout').className = "portalFlyoutExpanded";

   if (wpsFLY_Flyout.left() - wpsFLY_move > wpsFLY_Flyout.pageWidth()+ wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_Flyout.width ) {
      var newwidth= wpsFLY_Flyout.getWidth()+wpsFLY_move;
      wpsFLY_Flyout.setWidth(newwidth);
      wpsFLY_Flyout.setLeft(wpsFLY_Flyout.left() - wpsFLY_move);
      wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveOut()",wpsFLY_scrollSpeed);
      wpsFLY_Flyout.go=1;
   } else {
      wpsFLY_Flyout.setLeft(wpsFLY_Flyout.pageWidth() + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_Flyout.width);
      wpsFLY_Flyout.setWidth(wpsFLY_Flyout.width);
      wpsFLY_Flyout.go=0;
      wpsFLY_state=0;
   }
}

// -----------------------------------------------------------------
// The internal slide out function, called my real function, only 
// wpsFLY_moveOutFlyoutLeft should call this function. For left sided
// flyout.
// -----------------------------------------------------------------
function wpsFLY_internalMoveOutLeft()
{
	document.getElementById('wpsFLYflyout').className = "portalFlyoutExpanded";

   if (wpsFLY_isIE) {
	   if (wpsFLY_FlyoutLeft.getWidth() + wpsFLY_move < wpsFLY_FlyoutLeft.width) {
         var newwidth= wpsFLY_FlyoutLeft.getWidth()+wpsFLY_move;
         wpsFLY_FlyoutLeft.setWidth(newwidth);
		   wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveOutLeft()",wpsFLY_scrollSpeed);
		   wpsFLY_FlyoutLeft.go=1;
	   } else {
         wpsFLY_FlyoutLeft.setLeft( wpsFLY_FlyoutLeft.left());
         wpsFLY_FlyoutLeft.setWidth(wpsFLY_FlyoutLeft.width);
		   wpsFLY_FlyoutLeft.go=0;
		   wpsFLY_state=0;
	   }   
   } else {
   //  Mozilla browsers don't scroll left
      if( wpsFLY_FlyoutLeft.left()+wpsFLY_move < wpsFLY_browserDimensions.getScrollFromLeft()) {
		   wpsFLY_FlyoutLeft.go=1;
		   wpsFLY_FlyoutLeft.setLeft(wpsFLY_FlyoutLeft.left()+wpsFLY_move);
		   wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveOutLeft()",wpsFLY_scrollSpeed);
	   } else {
         wpsFLY_FlyoutLeft.setLeft( wpsFLY_browserDimensions.getScrollFromLeft());
		   wpsFLY_FlyoutLeft.go=0;
		   wpsFLY_state=0;
	   }
   }  
}

// -----------------------------------------------------------------
// The internal fly in function, called my real function, only 
// wpsFLY_moveInFlyout should call this function.
// -----------------------------------------------------------------
function wpsFLY_internalMoveIn()
{
   if ( wpsFLY_Flyout.left() + wpsFLY_move < wpsFLY_Flyout.pageWidth() + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_minFlyout  ) {
      wpsFLY_Flyout.go=1;
      var newwidth= wpsFLY_Flyout.getWidth()-wpsFLY_move;
      wpsFLY_Flyout.setWidth(newwidth);
      wpsFLY_Flyout.setLeft(wpsFLY_Flyout.left()+wpsFLY_move);
      wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveIn()",wpsFLY_scrollSpeed);
   } else {
      wpsFLY_Flyout.setWidth(wpsFLY_minFlyout);
      wpsFLY_Flyout.setLeft(wpsFLY_Flyout.pageWidth() + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_minFlyout);
      wpsFLY_Flyout.go=0;
      wpsFLY_state=1;
   }  
}

// -----------------------------------------------------------------
// The internal slide in function, called my real function, only 
// wpsFLY_moveInFlyoutLeft should call this function. For left sided
// flyout.
// -----------------------------------------------------------------
function wpsFLY_internalMoveInLeft()
{
   if (wpsFLY_isIE) {
      if (wpsFLY_FlyoutLeft.getWidth() - wpsFLY_move >  wpsFLY_minFlyout) {
         var newwidth= wpsFLY_FlyoutLeft.getWidth() - wpsFLY_move;
         wpsFLY_FlyoutLeft.setWidth(newwidth);
         wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveInLeft()",wpsFLY_scrollSpeed);
         wpsFLY_FlyoutLeft.go=1;
      } else {
         wpsFLY_FlyoutLeft.setWidth(wpsFLY_minFlyout);
         wpsFLY_FlyoutLeft.setLeft( wpsFLY_FlyoutLeft.left());
         wpsFLY_FlyoutLeft.go=0;
         wpsFLY_state=1;
      }
   } else {
      if(wpsFLY_FlyoutLeft.left()>-wpsFLY_FlyoutLeft.width+wpsFLY_minFlyout) {
		   wpsFLY_FlyoutLeft.go=1;
		   wpsFLY_FlyoutLeft.setLeft(wpsFLY_FlyoutLeft.left()-wpsFLY_move);
		   wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveInLeft()",wpsFLY_scrollSpeed);
	   } else {
         wpsFLY_FlyoutLeft.setLeft( wpsFLY_minFlyout - wpsFLY_FlyoutLeft.getWidth()- 4 );
		   wpsFLY_FlyoutLeft.go=0;
		   wpsFLY_state=1;
      }
	}
}

// -----------------------------------------------------------------
// The internal scroll function.
// -----------------------------------------------------------------
function wpsFLY_internalScroll() {
   if (!wpsFLY_Flyout.go) {

      //wpsFLY_Flyout.css.top=eval(scrolled)+parseInt(wpsFLY_fromTop);
      if (wpsFLY_state==1) {
         wpsFLY_Flyout.setLeft(wpsFLY_browserDimensions.getScrollFromLeft() + wpsFLY_browserDimensions.getViewableAreaWidth() - wpsFLY_minFlyout);
      } else {
         wpsFLY_Flyout.setLeft(wpsFLY_browserDimensions.getScrollFromLeft() + wpsFLY_browserDimensions.getViewableAreaWidth() - wpsFLY_Flyout.width);
      }
   }
   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      setTimeout('wpsFLY_internalScroll()',20);
}

// -----------------------------------------------------------------
// The internal scroll left function.
// -----------------------------------------------------------------
function wpsFLY_internalScrollLeft() {
   if (!wpsFLY_FlyoutLeft.go) {
      //wpsFLY_FlyoutLeft.css.top=eval(scrolled)+parseInt(wpsFLY_fromTop);

      // scroll horizontally for flyoutin 
      if (wpsFLY_state==1) {
         if (wpsFLY_isIE) {
            if (wpsFLY_leftResize == null) {
               wpsFLY_leftResize = wpsFLY_browserDimensions.getScrollFromLeft();
            }
            wpsFLY_FlyoutLeft.setWidth(wpsFLY_minFlyout);
            wpsFLY_FlyoutLeft.css.overflow = 'hidden';
            wpsFLY_FlyoutLeft.setLeft(wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_leftResize);
         } else {
            wpsFLY_FlyoutLeft.setLeft(wpsFLY_minFlyout + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_FlyoutLeft.getWidth() - 4);
         }
      }
   }

   if (wpsFLY_isNetscape||wpsFLY_isMoz)
      setTimeout('wpsFLY_internalScrollLeft()',20);

}

// -----------------------------------------------------------------
// The internal resize left function.
// -----------------------------------------------------------------
function wpsFLY_internalResizeLeft(){
      
   if (wpsFLY_isIE) {
      wpsFLY_leftResize = wpsFLY_browserDimensions.getScrollFromLeft(); - wpsFLY_browserDimensions.getViewableAreaWidth();
   }

}

// -----------------------------------------------------------------
// Expand the flyout. The parameter skipSlide indicates whether or not
// the flyout should simply be rendered without the slide-out effect.
// ----------------------------------------------------------------- 
function wpsFLY_moveOutFlyout( skipSlide )
{
   if (this.wpsFLY_Flyout != null)
   {
      if ( wpsFLY_state && !skipSlide ) {
         clearTimeout(wpsFLY_timeoutID);
         wpsFLY_internalMoveOut(); 
      }
      
      if ( wpsFLY_state && skipSlide )
      {
          wpsFLY_Flyout.setLeft(wpsFLY_Flyout.pageWidth() + document.body.scrollLeft - wpsFLY_Flyout.width);
          wpsFLY_Flyout.setWidth(wpsFLY_Flyout.width);
          wpsFLY_Flyout.go=0;
          wpsFLY_state=0;
          document.getElementById('wpsFLYflyout').className = "portalFlyoutExpanded";
      }
      
   }

   if (this.wpsFLY_FlyoutLeft != null)
   {      
      if ( wpsFLY_state && !skipSlide ) {
         clearTimeout(wpsFLY_timeoutID);
         wpsFLY_internalMoveOutLeft(); 
      }
      
      if ( wpsFLY_state && skipSlide )
      {
      	 if ( wpsFLY_isIE )
      	 {
		     wpsFLY_FlyoutLeft.setLeft( wpsFLY_FlyoutLeft.left());
    	     wpsFLY_FlyoutLeft.setWidth(wpsFLY_FlyoutLeft.width);
			 wpsFLY_FlyoutLeft.go=0;
			 wpsFLY_state=0;	
		 }
		 else
		 {
		 	 wpsFLY_FlyoutLeft.setLeft( document.body.scrollLeft);
   		     wpsFLY_FlyoutLeft.go=0;
		     wpsFLY_state=0;
		 }
		 document.getElementById('wpsFLYflyout').className = "portalFlyoutExpanded";
	  }
   }
}

// -----------------------------------------------------------------
// Called to close the flyout. This is the method that the function
// external to the flyout should call.
// ----------------------------------------------------------------- 
function wpsFLY_moveInFlyout()
{
   if (this.wpsFLY_Flyout != null)
   {
      if (!wpsFLY_state) {
         clearTimeout(wpsFLY_timeoutID);
         wpsFLY_internalMoveIn();
      }
   }

   if (this.wpsFLY_FlyoutLeft != null)
   {
      if (!wpsFLY_state) {
         clearTimeout(wpsFLY_timeoutID);
         wpsFLY_internalMoveInLeft();
      }
   }
   
   document.getElementById('wpsFLYflyout').className = "portalFlyoutCollapsed";
}

// -----------------------------------------------------------------
// Called to toggle the flyout. This is the method that the function
// external to the flyout should call.
// -----------------------------------------------------------------
function wpsFLY_toggleFlyout(index, skipSlide)
{
	if(flyOut[index] != null){
	var checkIndex = index;
	var prevIndex=wpsFLY_getCurrIndex();
	
	if(checkIndex==prevIndex){
        
		if(flyOut[index].active==true){
			flyOut[index].active=false;
            /*
			document.getElementById("toolBarIcon"+prevIndex).src = flyOut[prevIndex].icon;	
			document.getElementById("toolBarIcon"+prevIndex).alt = flyOut[prevIndex].altText;
			document.getElementById("toolBarIcon"+prevIndex).title = flyOut[prevIndex].altText;
			*/
		}
		else{
			flyOut[index].active=true;
            /*
			document.getElementById("toolBarIcon"+index).src = flyOut[index].activeIcon;
			document.getElementById("toolBarIcon"+index).alt = flyOut[index].activeAltText;
			document.getElementById("toolBarIcon"+index).title = flyOut[index].activeAltText;
			*/
		}
        //Closing flyout, clear the state cookie.
        wpsFLY_clearStateCookie();
        wpsFLY_moveInFlyout();
	}else{
		if(prevIndex > -1){
			flyOut[prevIndex].active=false;
            /*
			document.getElementById("toolBarIcon"+prevIndex).src = flyOut[prevIndex].icon;	
			document.getElementById("toolBarIcon"+prevIndex).alt = flyOut[prevIndex].altText;
			document.getElementById("toolBarIcon"+prevIndex).title = flyOut[prevIndex].altText;
			*/
		}
		
		flyOut[index].active=true;
        /*
		document.getElementById("toolBarIcon"+index).src = flyOut[index].activeIcon;
		document.getElementById("toolBarIcon"+index).alt = flyOut[index].activeAltText;
		document.getElementById("toolBarIcon"+index).title = flyOut[index].activeAltText;
		*/
		wpsFLY_setCurrIndex(index);
		document.getElementById("wpsFLY_flyoutIFrame").src = flyOut[index].url;
	}
	
	if(wpsFLY_state){
		
        //Expanding flyout, store the open flyout index in the state cookie.
        wpsFLY_setStateCookie( index );
        wpsFLY_moveOutFlyout( skipSlide );
		}
	}
}

function wpsFLY_getCurrIndex()
{
	return wpsFLY_currIndex;
}

function wpsFLY_setCurrIndex(index)
{
	wpsFLY_currIndex = index;
}

// -----------------------------------------------------------------
// Create a cookie to track the state of the flyout. The value of the 
// cookie is the index of the open flyout. The cookie is marked for 
// deletion when the browser closes and the path is set to ensure the 
// cookie is valid for the entire site.
// -----------------------------------------------------------------
function wpsFLY_setStateCookie( index )
{
    document.cookie='portalOpenFlyout=' + index + '; path=/;';
}

// -----------------------------------------------------------------
// Clear the cookie by changing the value to null. By setting the expiration date in 
// the past, the cookie is marked for deletion when the browser closes.
// -----------------------------------------------------------------
function wpsFLY_clearStateCookie()
{
    document.cookie='portalOpenFlyout=null; expires=Wed, 1 Jan 2003 11:11:11 UTC; path=/;';
}

// -----------------------------------------------------------------
// Check which side of the page the flyout should show on
// -----------------------------------------------------------------
function wpsFLY_onloadShow( isRTL )
{
  if (this.wpsFLY_minFlyout != null) {
    var bodyObj = document.getElementById("FLYParent");
    if (bodyObj != null) {
      var showHidden = false;
      if (isRTL) { 
           bodyObj.onload = wpsFLY_initFlyoutLeft(showHidden);
       } else { 
      	   bodyObj.onload = wpsFLY_initFlyout(showHidden);
       } 	 
    }
  }
 }
// -----------------------------------------------------------------
// Write markup out to document for all flyout items
// -----------------------------------------------------------------
function wpsFLY_markupLoop( flyOut)
{	
 	for(arrayIndex = 0; arrayIndex < flyOut.length; arrayIndex++){
		if(flyOut[arrayIndex].url != "" && flyOut[arrayIndex].url != null){
			document.write('<li><a id="globalActionLink'+arrayIndex+'" href="javascript:void(0);" onclick="wpsFLY_toggleFlyout('+arrayIndex+'); return false;" >');
			document.write(flyOut[arrayIndex].altText);
            //document.write('<img src="'+flyOut[arrayIndex].icon+'" id="toolBarIcon'+arrayIndex+'" title="'+flyOut[arrayIndex].altText+'" border="0" alt="'+flyOut[arrayIndex].altText+'" onmouseover="this.src=flyOut['+arrayIndex+'].hoverIcon;" onmouseout="if (flyOut['+arrayIndex+'].active) {this.src=flyOut['+arrayIndex+'].activeIcon;} else this.src=flyOut['+arrayIndex+'].icon;" />');            
			document.write('</a></li>');
		}
		
		if ( javascriptEventController )
		{
			javascriptEventController.register( "globalActionLink" + arrayIndex );
			//javascriptEventController.register( "toolBarIcon" + arrayIndex );
		}
	}
}

// -----------------------------------------------------------------
// If we have an empty expanded flyout (via the back button), load 
// the previously open flyout.
// -----------------------------------------------------------------
function wpsFLY_checkForEmptyExpandedFlyout()
{
	var index = wpsFLY_getInitialFlyoutState();
	
	if ( index != null && flyOut[index] != null)
	{
		document.getElementById("wpsFLY_flyoutIFrame").src = flyOut[index].url;
	}
}

// -----------------------------------------------------------------
// Determine if the flyout should initially open and which flyout 
// should be loaded. 
// -----------------------------------------------------------------
function wpsFLY_getInitialFlyoutState()
{
	// Determine if the flyout's initial state is open or closed.
	if ( document.cookie.indexOf( "portalOpenFlyout=" ) >= 0 )
	{
	    var cookies = document.cookie.split(";");
	
	    var c = 0;
	    while ( c < cookies.length && ( cookies[c].indexOf( "portalOpenFlyout=" ) == -1 ) )
	    {
	        c=c+1;
	    }
	
	    initCookieValue = cookies[c].substring( 18, cookies[c].length );
	    
	    if ( initCookieValue != "null" )
	    {
	        return initCookieValue;
	    }
	    else
	    {
	        return null;
	    }
	}
	else
	{
		return null;
	}
	
}

var wpsInlineShelf_initShelfExpanded = wpsInlineShelf_getInitialShelfState();

// Current state of the flyout for the life of the request (true=expanded, false=collapsed)
var wpsInlineShelf_stateExpanded = false;

var wpsInlineShelf_currIndex = -1;

var wpsInlineShelf_loadingMsg = null;

function wpsInlineShelf_markupLoop( shelves )
{	
 	for(arrayIndex = 0; arrayIndex < shelves.length; arrayIndex++){
		if(shelves[arrayIndex].url != "" && shelves[arrayIndex].url != null){
			document.write('<li><a id="globalActionLinkInlineShelf'+arrayIndex+'" href="javascript:void(0);" onclick="wpsInlineShelf_toggleShelf('+arrayIndex+'); return false;" >');
			document.write(shelves[arrayIndex].altText+" ");
            document.write('<img src="'+shelves[arrayIndex].icon+'" id="toolBarIcon'+arrayIndex+'" title="'+shelves[arrayIndex].altText+'" border="0" alt="'+shelves[arrayIndex].altText+'" onmouseover="this.src=wptheme_InlineShelves['+arrayIndex+'].hoverIcon;" onmouseout="if (wptheme_InlineShelves['+arrayIndex+'].active) {this.src=wptheme_InlineShelves['+arrayIndex+'].activeIcon;} else this.src=wptheme_InlineShelves['+arrayIndex+'].icon;" />');            
			document.write('</a></li>');
		}
		
		if ( javascriptEventController )
		{
			javascriptEventController.register( "globalActionLinkInlineShelf" + arrayIndex );
		}
	}
}

// -----------------------------------------------------------------
// Called to toggle the shelf. This is the method that the function
// external to the shelf should call.
// -----------------------------------------------------------------
function wpsInlineShelf_toggleShelf(index, skipZoom)
{
	if(wptheme_InlineShelves[index] != null) {
    	var checkIndex = index;
    	var prevIndex=wpsInlineShelf_getCurrIndex();
        var newIframeUrl = null;

    	if(checkIndex==prevIndex){
            
    		if(wptheme_InlineShelves[index].active==true){
    			wptheme_InlineShelves[index].active=false;
                /*
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).src = wptheme_InlineShelves[prevIndex].icon;	
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).alt = wptheme_InlineShelves[prevIndex].altText;
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).title = wptheme_InlineShelves[prevIndex].altText;
    			*/
                wpsInlineShelf_stateExpanded = false;
    		}else{
    			wptheme_InlineShelves[index].active=true;
                /*
    			document.getElementById("globalActionLinkInlineShelf"+index).src = wptheme_InlineShelves[index].activeIcon;
    			document.getElementById("globalActionLinkInlineShelf"+index).alt = wptheme_InlineShelves[index].activeAltText;
    			document.getElementById("globalActionLinkInlineShelf"+index).title = wptheme_InlineShelves[index].activeAltText;
    			*/
                wpsInlineShelf_stateExpanded = true;
    		}
    	}else{
    		if(prevIndex > -1){
    			wptheme_InlineShelves[prevIndex].active=false;
                /*
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).src = wptheme_InlineShelves[prevIndex].icon;	
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).alt = wptheme_InlineShelves[prevIndex].altText;
    			document.getElementById("globalActionLinkInlineShelf"+prevIndex).title = wptheme_InlineShelves[prevIndex].altText;
    			*/
    		}
    		
    		wptheme_InlineShelves[index].active=true;
            /*
    		document.getElementById("globalActionLinkInlineShelf"+index).src = wptheme_InlineShelves[index].activeIcon;
    		document.getElementById("globalActionLinkInlineShelf"+index).alt = wptheme_InlineShelves[index].activeAltText;
    		document.getElementById("globalActionLinkInlineShelf"+index).title = wptheme_InlineShelves[index].activeAltText;
    		*/
    		wpsInlineShelf_setCurrIndex(index);
            wpsInlineShelf_stateExpanded = true;

            newIframeUrl = wptheme_InlineShelves[index].url;
//    		document.getElementById("wpsInlineShelf_shelfIFrame").src = wptheme_InlineShelves[index].url;
    	}
    	
    	if(wpsInlineShelf_stateExpanded){
            //Expanding flyout, store the open shelf index in the state cookie.
            wpsInlineShelf_setStateCookie( index );
            wpsInlineShelf_expandShelf( skipZoom, newIframeUrl );
		} else {
            //Closing shelf, clear the state cookie.
            wpsInlineShelf_clearStateCookie();
            wpsInlineShelf_collapseShelf();
        }
	}
}


function wpsInlineShelf_getCurrIndex()
{
	return wpsInlineShelf_currIndex;
}

function wpsInlineShelf_setCurrIndex(index)
{
	wpsInlineShelf_currIndex = index;
}

// -----------------------------------------------------------------
// Create a cookie to track the state of the shelf. The value of the 
// cookie is the index of the open shelf. The cookie is marked for 
// deletion when the browser closes and the path is set to ensure the 
// cookie is valid for the entire site.
// -----------------------------------------------------------------
function wpsInlineShelf_setStateCookie( index )
{
    document.cookie='portalOpenInlineShelf=' + index + '; path=/;';
}

// -----------------------------------------------------------------
// Clear the cookie by changing the value to null. By setting the expiration date in 
// the past, the cookie is marked for deletion when the browser closes.
// -----------------------------------------------------------------
function wpsInlineShelf_clearStateCookie()
{
    document.cookie='portalOpenInlineShelf=null; expires=Wed, 1 Jan 2003 11:11:11 UTC; path=/;';
}

// -----------------------------------------------------------------
// Determine if the shelf should initially open and which shelf 
// should be loaded. 
// -----------------------------------------------------------------
function wpsInlineShelf_getInitialShelfState()
{
	// Determine if the shelf's initial state is expanded or collapsed.
	if ( document.cookie.indexOf( "portalOpenInlineShelf=" ) >= 0 )
	{
	    var cookies = document.cookie.split(";");
	
	    var c = 0;
	    while ( c < cookies.length && ( cookies[c].indexOf( "portalOpenInlineShelf=" ) == -1 ) )
	    {
	        c=c+1;
	    }
	
	    initCookieValue = cookies[c].substring( ("portalOpenInlineShelf=".length)+1, cookies[c].length );
	    
	    if ( initCookieValue != "null" )
	    {
	        return initCookieValue;
	    }
	    else
	    {
	        return null;
	    }
	}
	else
	{
		return null;
	}
	
}


// -----------------------------------------------------------------
// Expand the shelf. The parameter skipZoom indicates whether or not
// the shelf should simply be rendered without the zoom-out effect.
// NOTE: The zoom-out effect is not implemented yet.
// ----------------------------------------------------------------- 
function wpsInlineShelf_expandShelf( skipZoom, newIframeUrl )
{
    var shelf = document.getElementById("wpsInlineShelf");
    
    wpsInlineShelf_stateExpanded = false;

    // attach event listeners so when the URL loads or reloads, the iframe will be shown and resized.
    wpsInlineShelf_AttachIframeEventListeners("wpsInlineShelf_shelfIFrame");

    // show the shelf... but not the iframe yet...
    shelf.style.display = "block";

    // We change the URL AFTER the event listeners are hooked up.
    // If we are not changing the URL, we need to manually resize the iframe.
    if (null != newIframeUrl) {
        // when loading a new URL, display the spinning loading graphic
        wpsInlineShelf_loadingMsg.show(document.getElementById("wpsInlineShelf"));
        document.getElementById("wpsInlineShelf_shelfIFrame").src = newIframeUrl;
    } else {
        wpsInlineShelf_resizeIframe("wpsInlineShelf_shelfIFrame");
    }

}


// -----------------------------------------------------------------
// Collapse the shelf. The parameter skipZoom indicates whether or not
// the shelf should simply be rendered without the zoom-in effect.
// NOTE: The zoom-in effect is not implemented yet yet.
// ----------------------------------------------------------------- 
function wpsInlineShelf_collapseShelf( skipZoom )
{
    var shelf = document.getElementById("wpsInlineShelf");
    var iframe = document.getElementById("wpsInlineShelf_shelfIFrame");

    shelf.style.display = "none";
    iframe.style.display = "none";
    wpsInlineShelf_loadingMsg.hide();
    wpsInlineShelf_stateExpanded = true;
}

// -----------------------------------------------------------------
// Check which side of the page the shelf should show on
// -----------------------------------------------------------------
function wpsInlineShelf_onloadShow( isRTL )
{
    if ( wpsInlineShelf_initShelfExpanded != null )
    {
        wpsInlineShelf_toggleShelf( wpsInlineShelf_initShelfExpanded, true );
    }   
}


var wpsInlineShelf_getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var wpsInlineShelf_FFextraHeight=parseFloat(wpsInlineShelf_getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function wpsInlineShelf_resizeIframe(iframeID){
    var iframe=document.getElementById(iframeID)

    iframe.style.display = "block";
    wpsInlineShelf_loadingMsg.hide();

    if (iframe && !window.opera) {

/*
		// put the background color style onto the body of the document in the iframe
		if (iframe.contentDocument) {
			var iframeDocBody = iframe.contentDocument.body;
			if (iframeDocBody.className.indexOf("wpsInlineShelfIframeDocBody",0) == -1) {
				iframeDocBody.className = iframeDocBody.className + " wpsInlineShelfIframeDocBody";
			}
		}
*/
        if (iframe.contentDocument && iframe.contentDocument.body.offsetHeight) //ns6 syntax
            iframe.height = iframe.contentDocument.body.offsetHeight+wpsInlineShelf_FFextraHeight;
        else if (iframe.Document && iframe.Document.body.scrollHeight) //ie5+ syntax
            iframe.height = iframe.Document.body.scrollHeight;
    }
}

function wpsInlineShelf_AttachIframeEventListeners(iframeID) {
    var iframe=document.getElementById(iframeID)
    if (iframe && !window.opera) {

        if (iframe.addEventListener){
            iframe.addEventListener("load", wpsInlineShelf_IframeOnloadEventListener, false)
        } else if (iframe.attachEvent){
            iframe.detachEvent("onload", wpsInlineShelf_IframeOnloadEventListener) // Bug fix line
            iframe.attachEvent("onload", wpsInlineShelf_IframeOnloadEventListener)
        }
    }
}

function wpsInlineShelf_IframeOnloadEventListener(loadevt) {
    var crossevt=(window.event)? event : loadevt
    var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
    if (iframeroot) {
        wpsInlineShelf_resizeIframe(iframeroot.id);
    }
}

// -----------------------------------------------------------------
// If we have an empty expanded shelf (via the back button), load 
// the previously open shelf.
// -----------------------------------------------------------------
function wpsInlineShelf_checkForEmptyExpandedShelf() {
	var index = wpsInlineShelf_getInitialShelfState();
    
	if ( index != null && wptheme_InlineShelves[index] != null)
	{
		document.getElementById("wpsInlineShelf_shelfIFrame").src = wptheme_InlineShelves[index].url;
	}
}

wptheme_QuickLinksShelf = {
	_cookieUtils: wptheme_CookieUtils,
	cookieName: null,
	expand: function () {
		// summary: Expand the quick links shelf.
		document.getElementById("wptheme-expandedQuickLinksShelf").style.display='block';
        document.getElementById("wptheme-collapsedQuickLinksShelf").style.display='none';
        if ( this.cookieName != null ) {
        	this._cookieUtils.deleteCookie( this.cookieName );
        }	
        return false;
	},
	collapse: function () {
		// summary: Collapse the quick links shelf.
		document.getElementById("wptheme-expandedQuickLinksShelf").style.display='none';
        document.getElementById("wptheme-collapsedQuickLinksShelf").style.display='block';
        if ( this.cookieName != null ) {
        	var expires = new Date();
        	expires.setDate( expires.getDate() + 5 );
        	this._cookieUtils.setCookie( this.cookieName, "small", expires );
        }
        return false;
	}
}

var wpsInlineShelf_LoadingImage = function ( /*String*/cssClassName, /*String*/imageURL, /*String*/imageText ) {
    // summary: creates loading image for inline shelf
    // cssClassName: the class name to apply to the overlaid div
    // imageURL: the url to the image to display in the center of the overlaid div
    // imageText: the text to display next to the image    

    var elem = document.createElement( "DIV" );
    elem.className = cssClassName;
    elem.id = cssClassName;

    if ( imageURL && imageURL != "" && imageText ) {
        elem.innerHTML = "<img src='"+ imageURL + "' border=\"0\" alt=\"\" />&nbsp;" + imageText;
    }   
    
    var appended = false;
    
    this.show = function ( refNode ) { 
        if ( !appended ) {
            refNode.appendChild( elem );
            appended= true;
        }
        
        elem.style.display = 'block';
    }

    this.hide = function () {
        elem.style.display = 'none';
    }
}

/*        
        
        //Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
        var iframehide="yes"

        var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
        var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

        function resizeCaller() {
                if (document.getElementById)
                        resizeIframe("myiframe")

                //reveal iframe for lower end browsers? (see var above):
                if ((document.all || document.getElementById) && iframehide=="no"){
                        var tempobj=document.all? document.all["myiframe"] : document.getElementById("myiframe")
                        tempobj.style.display="block"
                }
        }
        function resizeIframe(frameid){
                var currentfr=document.getElementById(frameid)
                if (currentfr && !window.opera) {
                        currentfr.style.display="block"
                        if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
                                currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
                        else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
                                currentfr.height = currentfr.Document.body.scrollHeight;

                        if (currentfr.addEventListener){
                                currentfr.addEventListener("load", readjustIframe, false)
                        }
                        else if (currentfr.attachEvent){
                currentfr.detachEvent("onload", readjustIframe) // Bug fix line
                currentfr.attachEvent("onload", readjustIframe)
            }
                }
        }

        function readjustIframe(loadevt) {
                var crossevt=(window.event)? event : loadevt
                var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
                if (iframeroot)
                resizeIframe(iframeroot.id);
        }

        function wptheme_ExpandToolsShelf() {
		//loadToolsIframe('myiframe', '${inlineTCUrl}');
                document.getElementById("wptheme-expandedToolsShelf").style.display='block';
	        document.getElementById("wptheme-collapsedToolsShelf").style.display='none';
		//document.getElementById("wptheme-expandedToolsShelfLink").style.display='block';
		//document.getElementById("wptheme-collapsedToolsShelfLink").style.display='none';
		document.getElementById("toolsShelfCollapseLink").style.display='block';
		document.getElementById("toolsShelfExpandLink").style.display='none';
		loadToolsIframe('myiframe', '${inlineTCUrl}');
                //if (document.getElementById)
                //      resizeIframe("myiframe");
                resizeCaller();
                wptheme_createCookie("<%=toolsShelfCookie%>",'small',7);
        return false;
    }

        function wptheme_CollapseToolsShelf() {
                document.getElementById("wptheme-expandedToolsShelf").style.display='none';
        	document.getElementById("wptheme-collapsedToolsShelf").style.display='block';
		//document.getElementById("wptheme-expandedToolsShelfLink").style.display='none';
                //document.getElementById("wptheme-collapsedToolsShelfLink").style.display='block';
		document.getElementById("toolsShelfCollapseLink").style.display='none';
                document.getElementById("toolsShelfExpandLink").style.display='block';
                wptheme_eraseCookie("<%=toolsShelfCookie%>");
        return false;
    }
	function loadToolsIframe(iframeName, toolsUrl){
		alert('loading tools iframe');
		if (document.getElementById) {
			document.getElementById(iframeName).src = toolsUrl;
		}
		return false;
    }
    
*/    

var wptheme_InlinePalettes = {
    // summary: Manages the inline palette(s). Tracks the iframe used to display the palettes, as well as the persistent state.
    // description: Palettes managed by this object must be added using the addPalette method. The addPalette method expects a
    //      PaletteContext object which has the following structure:
    //      {
    //          url: the url to set the iframe to (for CSA, only used as the initial url)
    //          page: the unique id of the page the url will be pointing to
    //          portlet: the unique id of the portlet control the url will be pointing to
    //          newWindow: indicates whether or not the url should be rendered using the Plain theme template
    //          portletWindowState: the window state the portlet should be in
    //          selectionDependent: indicates whether or not the url changes based on the current page selection
    //      }
    //      This PaletteContext object is required to support client-side aggregation. Since, in client-side aggregation,
    //      the page does not always reload in between page changes, the palette may need to be refreshed as the selection
    //      changes in client-side aggregation. This context object gives the client-side aggregation engine all the info
    //      it needs to create the appropriate url for the palette, as needed.
    // paletteStatus: indicates whether the palette is open or closed (0 = closed, 1 = open)
    // iframeID: the ID/NAME of the iframe to use
    // loadingDecorator: the decoration to display while the iframe is loading
    // currentIndex: the index (into the paletteContextArray) of the currently displaying palette
    // cookieName: the cookie used to store the state of the palette
    // paletteContextArray: the array of PaletteContext objects
    // urlFactory: only used in client-side aggregation -- set during the CSA theme's bootstrap, this function takes the PaletteContext
    //      object described above as the only parameter and returns the url to use to display the palette
    
    // INITIALIZATION
    className: "wptheme_InlinePalettes",

    //HTML element IDs
    iframeID: "wpsFLY_flyoutIFrame",    
    
    //Persistent state of the palette
    paletteStatus: 0,  // 0 = closed, 1 = open
    currentIndex: -1,   // the index of the paletteContextArray which is currently displaying
    cookieName: "portalOpenFlyout", 
    
    //Decoration to display while the palette is loading
    loadingDecorator: null, //needs to provide 2 functions: show and hide. show will receive a single parameter -- the node which should be covered with the decoration
    
    //Instance variables
    urlFactory: null,   //expected to be set in the bootstrap of the CSA theme. takes the context as a single parameter and returns the url as the output.
    paletteContextArray: [],    // Array of palettes which can be displayed
    
    //Debug
    debug: wptheme_DebugUtils,
    
    init: function ( /*Document?*/doc) {
        // summary: Initializes the inline palettes. Usually executed on page load.
        // description: Checks to see if the persisted state indicates the palette should be open or closed. If open, the proper location
        //      should be loaded into the iframe and displayed.
        // doc: OPTIONAL -- specifies the document to use when initializing (for use when called from within an iframe, for example).
        if ( this.debug.enabled ) { this.debug.log( this.className, "init( " + [ doc ] + ")" ); }
        
        if ( !doc ) { doc = document; }
        
        //Retrieve the persisted value. This will be the index into the PaletteContextArray.
        var value = this.getPersistedValue();
        if ( this.debug.enabled ) { this.debug.log( this.className, "retrieved value: " + value ); }
        if ( value != null && this.paletteContextArray[ value ] ) {
            this.show( value, true );
        } else {
            this.hide();
        }
        
        if ( this.debug.enabled ) { this.debug.log( this.className, "return init" ); }
    },
    
    // DISPLAY CONTROL 
    
    showCurrent: function () {
        // summary: Displays the current index or auto selects an index if no current index is selected.
        var indexToShow = 0;
        if ( this.currentIndex > -1 ) {
            indexToShow = this.currentIndex;
        }
        
        this.show( indexToShow );
    },
    
    show: function (/*int*/index, /*boolean?*/skipAnimation) {
        // summary: Displays the specified url in the palette.
        // url: the url for the iframe.
        // skipAnimation: OPTIONAL -- skips the loading decorator show/hide steps (used for the case where the palette is open on an initial page load
        if ( this.debug.enabled ) { this.debug.log( this.className, "show( " + [ index, skipAnimation ] + ")" ); }
        
        var iframe = this._getIframeElement();
        if ( !iframe ) { return false; }
        
        var url = this.getURL( index );
        
        iframe.parentNode.style.display = "block";
        //If we have to load the iframe, call postShow onload. Otherwise, call it immediately since the
        //iframe is already loaded.
        if ( window.frames[this.iframeID].location.href != url ) {
            if ( !skipAnimation && this.loadingDecorator != null && this.loadingDecorator.show ) {
                this.loadingDecorator.show( iframe.parentNode.parentNode );
            }
            iframe.src = url;
        }
        else {
            //The location hasn't changed so go ahead and call the post show behavior. Normally, the post show 
            //behavior executes once the iframe is loaded. 
            this._doPostShow();
        }
        
        this.persist( index );
        this.paletteStatus = 1;
        this.currentIndex = index;
    },
    hide: function ( doc ) {
        // summary: Hides the active palette.
        if ( this.debug.enabled ) { this.debug.log( this.className, "hide( " + [ doc ] + ")" ); }
        var iframe = this._getIframeElement( doc );
        if ( !iframe ) { return false; }
        
        iframe.parentNode.style.display = "none";
        this.paletteStatus = 0;
        this.currentIndex = -1;
        
        //Execute the post hide behavior.
        this._doPostHide();
    },
    _doPostShow: function () {
        // summary: Called after the iframe is loaded and ready to display.
        // description: Performs any sizing adjustments necessary (possibly IE) and hides the loading decoration.
        if ( this.debug.enabled ) { this.debug.log( this.className, "_doPostShow()" ); }
        var iframe = this._getIframeElement();
        if ( iframe.parentNode.style.display == "none" ) { return false; }
        iframe.style.visibility = "visible";
        
        if ( typeof ( dojo ) != "undefined" ) {
            var size = dojo.contentBox( iframe );
            if ( size.h < 300) {
                //IE doesn't correctly size the iframe when height is set to 100%. So if the height
                //is still 0 (IE 6) or small (IE7)after setting the display and visibility, set it manually to the height
                //of the TD element.
                var size = dojo.contentBox( iframe.parentNode.parentNode );
                iframe.style.height = size.h + "px";
            }
        }   
        
        if ( this.loadingDecorator != null && this.loadingDecorator.hide ) {
            this.loadingDecorator.hide();
        }
    },
    _doPostHide: function () {
        // summary: Execute any actions that need to occur after the palette is hidden from view.
        if ( this.debug.enabled ) { this.debug.log( this.className, "_doPostHide()" ); }
        var iframe = this._getIframeElement();
        iframe.style.visibility = "hidden";
    },
    
    // PERSISTENT STATE CONTROL
    
    persist: function ( /*String*/value ) {
        // summary: Persist the given value in a cookie.
        if ( this.debug.enabled ) { this.debug.log( this.className, "persist(" + [ value ] + ")" ); }
        wptheme_CookieUtils.setCookie( this.cookieName, value );
    },
    getPersistedValue: function () {
        // summary: Retrieve the persisted state for the inline palettes, if one exists.
        // description: Looks for the "portalOpenFlyout" cookie and parses out it's value.
        // returns: the persisted value for the portalOpenFlyout cookie or NULL if no value exists.
        if ( this.debug.enabled ) { this.debug.log( this.className, "getPersistedValue()" ); }
        return wptheme_CookieUtils.getCookie( this.cookieName );
    },
    unpersist: function () {
        // summary: Clears out the persisted value.
        // description: Sets the cookie's value to NULL and sets it to expire in the past.
        // returns: the index of the persisted value
        if ( this.debug.enabled ) { this.debug.log( this.className, "unpersist()" ); }
        var value = this.getPersistedValue();
        wptheme_CookieUtils.deleteCookie( this.cookieName );
        return value;
    },
    
    // UTILITY
    
    _getIframeElement: function ( /*Document?*/doc ) {
        // summary: Retrieves the iframe HTML element from the HTML document specified. If no HTML document is specified,
        //      the global HTML document is used.
        // doc: OPTIONAL -- specify the HTML document in which to look up the IFRAME object.
        // returns: the iframe HTML element
        if ( this.debug.enabled ) { this.debug.log( this.className,  "_getIframeElement( " + [ doc ] + ")" ); }
        if ( !doc ) { doc = document; }
        return doc.getElementById( this.iframeID );     // the IFRAME HTML element
    },
    addPalette: function ( /*PaletteContext*/context ) {
        if ( this.debug.enabled ){ this.debug.log( this.className, "addPalette( " + [ context ] + ")" ); }
        this.paletteContextArray.push( context );
    },
    
    getURL: function ( /*int*/value ) {
        if ( this.debug.enabled ) { this.debug.log( this.className, "getURL( " + [ value ] + ")" ); }
        var url = this.paletteContextArray[ value ].url;
        if ( document.isCSA && this.urlFactory != null ) {
            url = this.urlFactory( this.paletteContextArray[ value ] );
        }
        return url;
    }
    
    
}

var wptheme_DarkTransparentLoadingDecorator = function ( /*String*/cssClassName, /*String*/imageURL, /*String*/imageText ) {
    // summary: Displays a partially opaque overlay with a centered image and text to partially obscure and prevent
    //      interaction with a loading portion of the HTML page.
    // cssClassName: the class name to apply to the overlaid div
    // imageURL: the url to the image to display in the center of the overlaid div
    // imageText: the text to display next to the image
    this.className = "wptheme_DarkTransparentLoadingDecorator";
    
    var elem = document.createElement( "DIV" );
    elem.className = cssClassName;
    elem.style.position = "absolute";
    
    if ( imageURL && imageURL != "" && imageText ) {
        var text = document.createElement( "DIV" );
        text.style.position = "relative";
        text.style.top = "50%";
        text.style.left = "40%";
        text.innerHTML = "<img src='"+ imageURL + "' />&nbsp;" + imageText;
        elem.appendChild( text );
    }   
    
    var appended = false;
    
    this.show = function ( refNode ) { 
        if ( !appended ) {
            document.body.appendChild( elem );
            appended= true;
        }
        
        elem.style.display = 'block';
        elem.style.top = (dojo.coords( refNode, true ).y + 1) + "px";
        elem.style.left = (dojo.coords( refNode, true ).x + 1)  + "px";
      
        var size = dojo.contentBox( refNode );
        elem.style.height = (size.h - 2) + "px";
        elem.style.width = (size.w - 2) + "px";
    }

    this.hide = function () {
        elem.style.display = 'none';
    }
}

var wptheme_InlinePalettesContainer = { 
    // summary: Manages the inline palettes container.
    // description: Manages the container which holds the palettes. Made up of two parts: the first is the container.
    //      The container holds the links to select a palette, as well as, the actual iframe which displays
    //      the palette once a palette is selected. The second is the toggle element. The toggle element is
    //      the html element which actually opens and closes the container element.
    // containerStatus: indicates whether the container is open or closed (0 = closed, 1 = open)
    // openCssClassName: indicates the CSS class name which should be applied when the container is open
    // closedCssClassName: indicates the CSS class name which should be applied when the container is closed
    // containerElementID: the id of the html element which actually holds the palettes
    // toggleElementID: the id of the html element which is the toggle element
    // lastIndex: the index of the last palette that was opened
    // cookieName: the name of the cookie used to store the container's last state
    // cookieUtils: the utility object used to set and unset cookies - default is wptheme_CookieUtils
    // htmlUtils: the utility object used for adding/removing css classnames - default is wptheme_HTMLElementUtils
    // paletteManager: the object which contains the information about the palettes to display inside the container
    //      default is wptheme_InlinePalettes
    className: "wptheme_InlinePalettesContainer",
    
    containerStatus: 0,     //0 = closed, 1 = open
    openCssClassName: "wptheme-flyoutExpanded",
    closedCssClassName: "wptheme-flyoutCollapsed",
    toggleElementID: "wptheme-flyoutToggle",
    containerElementID: "wptheme-flyout",
    lastIndex: null,
    cookieName: "portalFlyoutIsOpen",
    cookieUtils: wptheme_CookieUtils,
    htmlUtils: wptheme_HTMLElementUtils,
    paletteManager: wptheme_InlinePalettes,
    
    //Main functions.
    init: function ( /*HTMLDocument?*/doc ) {
        // summary: Initializes and sets the appropriate visibilites for the container and the
        //      palettes inside.
        // doc: OPTIONAL -- used when called from an iframe
        var cookie = this.cookieUtils.getCookie( this.cookieName );
        if ( cookie && cookie != "null" ) {
            this.containerStatus = parseInt( cookie );
        }
        
        if ( this.paletteManager.paletteContextArray.length == 0 ) {
            this.disable();
        }
        else {
            if ( this.containerStatus ) {
                this.paletteManager.init();
                this._show();
            }
            else {
                this._hide();
            }
            this._makeVisible();
        }
    },
    toggle: function () {
        // summary: Toggles the container between open and closed state.
        
        if ( this.containerStatus ) {
            this.containerStatus = 0;
            this._hide();           
        }   
        else {
            this.containerStatus = 1;
            this._show();
        }
    },
    persist: function () {
        // summary: Sets the cookie with the current container status.
        this.cookieUtils.setCookie( this.cookieName, this.containerStatus );
        if ( this.paletteManager.currentIndex == this.lastIndex ) {
            this.paletteManager.persist( this.lastIndex );
        }
    },
    unpersist: function () {
        // summary: Removes the cookie which holds the state of the flyout.
        this.cookieUtils.deleteCookie( this.cookieName );
        this.lastIndex = this.paletteManager.unpersist();
    },
    _makeVisible: function () {
        // summary: Shows the toggle element AND the container element.
        //Retrieve the applicable DOM elements.
        var toggleElement = document.getElementById( this.toggleElementID );
        toggleElement.style.visibility = 'visible';
    },
    disable: function () {
        // summary: Hides the toggle element AND the container element.
        //Retrieve the applicable DOM elements.
        var toggleElement = document.getElementById( this.toggleElementID );
        var containerElement = document.getElementById( this.containerElementID );
        

        if (toggleElement != null) {
            toggleElement.style.display = 'none';
        }
        if (containerElement != null) {
            containerElement.style.display = 'none';
        }
    },
    _hide: function () {
        //Retrieve the applicable DOM elements.
        var toggleElement = document.getElementById( this.toggleElementID );
        var containerElement = document.getElementById( this.containerElementID );
        
        if ( !toggleElement || !containerElement ) {
            throw Error( "Unable to retrieve the necessary markup elements! The palettes may not function correctly.");
        }
        
        //Closing the container.
        this.htmlUtils.removeClassName( toggleElement, this.openCssClassName );
        this.htmlUtils.addClassName( toggleElement, this.closedCssClassName );
        containerElement.style.display = 'none';
        
        //Persistence cleanup.
        this.unpersist();       
    },
    _show: function () {
        //Retrieve the applicable DOM elements.
        var toggleElement = document.getElementById( this.toggleElementID );
        var containerElement = document.getElementById( this.containerElementID );
        
        if ( !toggleElement || !containerElement ) {
            throw Error( "Unable to retrieve the necessary markup elements! The palettes may not function correctly.");
        }
        
        //Opening the container.
        this.htmlUtils.removeClassName( toggleElement, this.closedCssClassName );
        this.htmlUtils.addClassName( toggleElement, this.openCssClassName );
        containerElement.style.display = 'block';
        
        this.paletteManager.showCurrent();
        
        //Persistence cleanup.
        this.persist();
    }
}
//If we aren't inside an iframe, go ahead and register the init function so it's called on page load. This is where we check for 
//a palette's persistent state and handle other startup tasks.
if ( top.location == self.location ) {
    wptheme_InlinePalettesContainer.htmlUtils.addOnload( function () { wptheme_InlinePalettesContainer.init(); } );
};

//Shows an IFRAME inside a lightbox which blocks access to the page.
var wptheme_IFrameLightbox = function ( /*String*/disabledBackgroundClassname, /*String*/borderBoxClassname, /*String*/closeLinkClassname, /*String*/closeString ) {
	// summary: Creates a "lightbox" effect where a partially opaque div is set to cover the entire viewable area of the browser and the content
	//		is displayed in an iframe in approximately the middle of the viewable area.
	// description: Creates a div the size of the viewable area of the browser which is styled using the given "disabledBackgroundClassname". The iframe is
	//		displayed inside another div which is approximately centered and styled according to the given "borderBoxClassname". The content of the iframe is
	//		set using the "setURL" function. The "lightbox" is closed via a text anchor link which is positioned above the top right edge of the border box. The
	//		text displayed is controlled using the "closeString" parameter and the link is styled according to the "closeLinkClassname".
	// disabledBackgroundClassname: the CSS class name to apply to the background div displayed when the lightbox is showing
	// borderBoxClassname: the CSS class name to apply to the border box in the center of the page
	// closeString: the string which will be displayed as the link to close the lightbox
	this.className = "wptheme_IFrameLightbox";
	
	//Declare this here so that any dependency error (e.g. wptheme_HTMLElementUtils not yet being defined)
	//is clear from the beginning (throws an error at construction time instead of runtime). Also, allows
	//for easy substitution of alternate implementations (as long as function names & signatures are the same).
	this._htmlUtils = wptheme_HTMLElementUtils;
	this._debugUtils = wptheme_DebugUtils;
	
	this._initialized = false;
	this.showing = false;
	
	var uniquePrefix = this._htmlUtils.getUniqueId();
	this._backgroundDivId = uniquePrefix + "_lightboxPageBackgroundDiv";
	this._borderDivId = uniquePrefix + "_lightboxBorderDiv";
	this._closeLinkId = uniquePrefix + "_lightboxCloseLink";
	this._iframeId = uniquePrefix + "_lightboxIframe";
	
	// ****************************************************************
	// * Dynamically created DOM elements. 
	// ****************************************************************

	function createDiv(idStr, className, parent ) {
		// summary: Creates a div with the given ID, class, and appends to the given parent node. The display property is set to none by default.
		var div = document.createElement( "DIV" ); 
		div.id = idStr;
		div.className = className;
		div.style.display = "none";
		parent.appendChild( div );
		return div;
	}
	var me = this;
	function createLink(idStr, className, text, parent) {
		// summary: Creates a link with the given ID, class, textContent, and appends it to the given parent node. The display property is set to none
		//		by default. The onclick is set to hide the lightbox.
		var a = document.createElement( "A" );
		a.id = idStr;
		a.className = className;
		a.href = "javascript:void(0);";
		a.onclick = function () { me.hide() };
		a.style.display = "none";
		a.appendChild( document.createTextNode( text ) );
		parent.appendChild( a );
		return a;
	}
	
	function createIFrame( idStr, parent ) {
		// summary: Creates an iframe with the given ID (also used for the name) and appends it to the given parent node.
		var iframe = document.createElement( "IFRAME" );
		iframe.name = idStr;
		iframe.id = idStr;
		//iframe.style.display = "none";
		parent.appendChild( iframe );
		return iframe;
	}
	
	// ****************************************************************
	// * Initialization.
	// ****************************************************************
	
	this._init = function () {
		this._initialized = true;
		//Create the background div.
		createDiv( this._backgroundDivId, disabledBackgroundClassname, document.body );
		//Create the border box div
		createIFrame( this._iframeId, createDiv( this._borderDivId, borderBoxClassname, document.body ));
		//Create the close link.
		createLink( this._closeLinkId, closeLinkClassname, closeString, document.body );
	}
	
	// ****************************************************************
	// * Handling the browser scrolling and resizing dynamically.
	// ****************************************************************

	//Make sure to call any existing onscroll handler.
	var oldScrollFunc = window.onscroll;
	window.onscroll = function (e) {
		if ( me.showing ) {
			me.sizeAndPositionBorderBox();
			//me.sizeBackgroundDisablingDiv();
		}
		
		if ( oldScrollFunc ) {
			if (e) {
				oldScrollFunc(e);
			}
			else  {
				oldScrollFunc();
			}
		}
	}
	
	//Make sure to call any existing onresize handler.
	var oldResizeFunc = window.onresize;
	window.onresize = function (e) {
		if ( me.showing ) {
			me.sizeAndPositionBorderBox();
			me.sizeBackgroundDisablingDiv();
		}
		
		if ( oldResizeFunc ) {
			if (e) {
				oldResizeFunc(e);
			}
			else  {
				oldResizeFunc();
			}
		}
	}

	// ****************************************************************
	// * Main functions for use in the theme.
	// ****************************************************************
	
	this.setURL = function ( /*String*/url ) {
		// summary: Sets the URL displayed by the IFRAME in the lightbox.
		// url: the url to the resource to display
		window.frames[this._iframeId].location = url;
	}
	
	
	
	this.show = function ( /*String?*/url ) {
		// summary: Shows the lightbox above the disabled background div. 
		// url: OPTIONAL -- the url to display in the iframe in the center of the screen 
		if ( !this._initialized ) {
			this._init();
		}
		
		this.showing = true;
		
		this.disableBackground();
		this.showBorderBox();
		if ( url ) { 
			this.setURL( url );
		}		
	}
	
	this.hide = function() {
		// summary: Hides the lightbox and the disabled background div.
		if ( !this._initialized ) {
			this._init();
		}
		
		this.showing = false;
		
		this.enableBackground();
		this.hideBorderBox();
	}
	
	// ****************************************************************
	// * Content border box 
	// ****************************************************************
	this.showBorderBox = function () {
		// summary: Shows and positions the border box which contains the IFRAME.
		var div = document.getElementById( this._borderDivId );
		div.style.display = "block";
		var link = document.getElementById( this._closeLinkId );
		link.style.display = "block";
		
		this.sizeAndPositionBorderBox();
	}
	
	this.sizeAndPositionBorderBox = function () {
		// summary: Sizes and positions the border box which contains the IFRAME.
		var div = document.getElementById( this._borderDivId );
		this._htmlUtils.sizeRelativeToViewableArea( div, 0.60, 0.75 );
		this._htmlUtils.positionRelativeToViewableArea( div, 0.20, 0.12 );
		var link = document.getElementById( this._closeLinkId );
		this._htmlUtils.positionOutsideElementTopRight( link, div );
	}
	
	this.hideBorderBox = function () {
		// summary: hides the border box and IFRAME.
		document.getElementById( this._borderDivId ).style.display = "none";
		document.getElementById( this._closeLinkId ).style.display = "none";
	}
	
	// **************************************************************** 
	// * Transparent background controls
	// ****************************************************************
	this.disableBackground = function () {
		// summary: Disables the background by laying a transparent div over top of the document body.
		var div = document.getElementById( this._backgroundDivId );
		div.style.display = "block";
		this.sizeBackgroundDisablingDiv();
		this._htmlUtils.hideElementsByTagName( "select" );
	}
	
	this.sizeBackgroundDisablingDiv = function () {
		// summary: Sizes the transparent div appropriately.
		var div = document.getElementById( this._backgroundDivId );
		//dynamically size the div to the inner browser window
		this._htmlUtils.sizeToEntireArea( div );
	}
	
	this.enableBackground=function () {
		// summary: Enables the background by hiding the overlaid div.
		this._htmlUtils.showElementsByTagName( "select" );
		document.getElementById( this._backgroundDivId ).style.display = "none";
	}
};

/*
	Copyright (c) 2004-2008, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

(function(){var _1=null;if((_1||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){var _2="",_3="",_4="",_5={},_6={};_1=_1||djConfig.scopeMap;for(var i=0;i<_1.length;i++){var _8=_1[i];_2+="var "+_8[0]+" = {}; "+_8[1]+" = "+_8[0]+";"+_8[1]+"._scopeName = '"+_8[1]+"';";_3+=(i==0?"":",")+_8[0];_4+=(i==0?"":",")+_8[1];_5[_8[0]]=_8[1];_6[_8[1]]=_8[0];}eval(_2+"dojo._scopeArgs = ["+_4+"];");dojo._scopePrefixArgs=_3;dojo._scopePrefix="(function("+_3+"){";dojo._scopeSuffix="})("+_4+")";dojo._scopeMap=_5;dojo._scopeMapRev=_6;}(function(){if(!this["console"]){this.console={log:function(){}};}var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];var i=0,tn;while((tn=cn[i++])){if(!console[tn]){(function(){var _c=tn+"";console[_c]=function(){var a=Array.apply({},arguments);a.unshift(_c+":");console.log(a.join(" "));};})();}}if(typeof dojo=="undefined"){this.dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};}var d=dojo;if(typeof dijit=="undefined"){this.dijit={_scopeName:"dijit"};}if(typeof dojox=="undefined"){this.dojox={_scopeName:"dojox"};}if(!d._scopeArgs){d._scopeArgs=[dojo,dijit,dojox];}d.global=this;d.config={isDebug:false,debugAtAllCosts:false};if(typeof djConfig!="undefined"){for(var _f in djConfig){d.config[_f]=djConfig[_f];}}var _10=["Browser","Rhino","Spidermonkey","Mobile"];var t;while((t=_10.shift())){d["is"+t]=false;}dojo.locale=d.config.locale;var rev="$Rev: 13707 $".match(/\d+/);dojo.version={major:1,minor:1,patch:1,flag:"_IBM",revision:rev?+rev[0]:999999,toString:function(){with(d.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};if(typeof OpenAjax!="undefined"){OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());}dojo._mixin=function(obj,_14){var _15={};for(var x in _14){if(_15[x]===undefined||_15[x]!=_14[x]){obj[x]=_14[x];}}if(d["isIE"]&&_14){var p=_14.toString;if(typeof p=="function"&&p!=obj.toString&&p!=_15.toString&&p!="\nfunction toString() {\n    [native code]\n}\n"){obj.toString=_14.toString;}}return obj;};dojo.mixin=function(obj,_19){for(var i=1,l=arguments.length;i<l;i++){d._mixin(obj,arguments[i]);}return obj;};dojo._getProp=function(_1c,_1d,_1e){var obj=_1e||d.global;for(var i=0,p;obj&&(p=_1c[i]);i++){if(i==0&&this._scopeMap[p]){p=this._scopeMap[p];}obj=(p in obj?obj[p]:(_1d?obj[p]={}:undefined));}return obj;};dojo.setObject=function(_22,_23,_24){var _25=_22.split("."),p=_25.pop(),obj=d._getProp(_25,true,_24);return obj&&p?(obj[p]=_23):undefined;};dojo.getObject=function(_28,_29,_2a){return d._getProp(_28.split("."),_29,_2a);};dojo.exists=function(_2b,obj){return !!d.getObject(_2b,false,obj);};dojo["eval"]=function(_2d){return d.global.eval?d.global.eval(_2d):eval(_2d);};d.deprecated=d.experimental=function(){};})();(function(){var d=dojo;d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_2f){var mp=this._modulePrefixes;return !!(mp[_2f]&&mp[_2f].value);},_getModulePrefix:function(_31){var mp=this._modulePrefixes;if(this._moduleHasPrefix(_31)){return mp[_31].value;}return _31;},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});dojo._loadPath=function(_33,_34,cb){var uri=((_33.charAt(0)=="/"||_33.match(/^\w+:/))?"":this.baseUrl)+_33;try{return !_34?this._loadUri(uri,cb):this._loadUriAndCheck(uri,_34,cb);}catch(e){console.error(e);return false;}};dojo._loadUri=function(uri,cb){if(this._loadedUrls[uri]){return true;}var _39=this._getText(uri,true);if(!_39){return false;}this._loadedUrls[uri]=true;this._loadedUrls.push(uri);if(cb){_39="("+_39+")";}else{_39=this._scopePrefix+_39+this._scopeSuffix;}if(d.isMoz){_39+="\r\n//@ sourceURL="+uri;}var _3a=d["eval"](_39);if(cb){cb(_3a);}return true;};dojo._loadUriAndCheck=function(uri,_3c,cb){var ok=false;try{ok=this._loadUri(uri,cb);}catch(e){console.error("failed loading "+uri+" with error: "+e);}return !!(ok&&this._loadedModules[_3c]);};dojo.loaded=function(){this._loadNotifying=true;this._postLoad=true;var mll=d._loaders;this._loaders=[];for(var x=0;x<mll.length;x++){try{mll[x]();}catch(e){throw e;console.error("dojo.addOnLoad callback failed: "+e,e);}}this._loadNotifying=false;if(d._postLoad&&d._inFlightCount==0&&mll.length){d._callLoaded();}};dojo.unloaded=function(){var mll=this._unloaders;while(mll.length){(mll.pop())();}};var _42=function(arr,obj,fn){if(!fn){arr.push(obj);}else{if(fn){var _46=(typeof fn=="string")?obj[fn]:fn;arr.push(function(){_46.call(obj);});}}};dojo.addOnLoad=function(obj,_48){_42(d._loaders,obj,_48);if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded();}};dojo.addOnUnload=function(obj,_4a){_42(d._unloaders,obj,_4a);};dojo._modulesLoaded=function(){if(d._postLoad){return;}if(d._inFlightCount>0){console.warn("files still in flight!");return;}d._callLoaded();};dojo._callLoaded=function(){if(typeof setTimeout=="object"||(dojo.config.useXDomain&&d.isOpera)){if(dojo.isAIR){setTimeout(function(){dojo.loaded();},0);}else{setTimeout(dojo._scopeName+".loaded();",0);}}else{d.loaded();}};dojo._getModuleSymbols=function(_4b){var _4c=_4b.split(".");for(var i=_4c.length;i>0;i--){var _4e=_4c.slice(0,i).join(".");if((i==1)&&!this._moduleHasPrefix(_4e)){_4c[0]="../"+_4c[0];}else{var _4f=this._getModulePrefix(_4e);if(_4f!=_4e){_4c.splice(0,i,_4f);break;}}}return _4c;};dojo._global_omit_module_check=false;dojo._loadModule=dojo.require=function(_50,_51){_51=this._global_omit_module_check||_51;var _52=this._loadedModules[_50];if(_52){return _52;}var _53=this._getModuleSymbols(_50).join("/")+".js";var _54=(!_51)?_50:null;var ok=this._loadPath(_53,_54);if(!ok&&!_51){throw new Error("Could not load '"+_50+"'; last tried '"+_53+"'");}if(!_51&&!this._isXDomain){_52=this._loadedModules[_50];if(!_52){throw new Error("symbol '"+_50+"' is not defined after loading '"+_53+"'");}}return _52;};dojo.provide=function(_56){_56=_56+"";return (d._loadedModules[_56]=d.getObject(_56,true));};dojo.platformRequire=function(_57){var _58=_57.common||[];var _59=_58.concat(_57[d._name]||_57["default"]||[]);for(var x=0;x<_59.length;x++){var _5b=_59[x];if(_5b.constructor==Array){d._loadModule.apply(d,_5b);}else{d._loadModule(_5b);}}};dojo.requireIf=function(_5c,_5d){if(_5c===true){var _5e=[];for(var i=1;i<arguments.length;i++){_5e.push(arguments[i]);}d.require.apply(d,_5e);}};dojo.requireAfterIf=d.requireIf;dojo.registerModulePath=function(_60,_61){d._modulePrefixes[_60]={name:_60,value:_61};};dojo.requireLocalization=function(_62,_63,_64,_65){d.require("dojo.i18n");d.i18n._requireLocalization.apply(d.hostenv,arguments);};var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");var ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");dojo._Url=function(){var n=null;var _a=arguments;var uri=[_a[0]];for(var i=1;i<_a.length;i++){if(!_a[i]){continue;}var _6c=new d._Url(_a[i]+"");var _6d=new d._Url(uri[0]+"");if(_6c.path==""&&!_6c.scheme&&!_6c.authority&&!_6c.query){if(_6c.fragment!=n){_6d.fragment=_6c.fragment;}_6c=_6d;}else{if(!_6c.scheme){_6c.scheme=_6d.scheme;if(!_6c.authority){_6c.authority=_6d.authority;if(_6c.path.charAt(0)!="/"){var _6e=_6d.path.substring(0,_6d.path.lastIndexOf("/")+1)+_6c.path;var _6f=_6e.split("/");for(var j=0;j<_6f.length;j++){if(_6f[j]=="."){if(j==_6f.length-1){_6f[j]="";}else{_6f.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_6f[0]=="")&&_6f[j]==".."&&_6f[j-1]!=".."){if(j==(_6f.length-1)){_6f.splice(j,1);_6f[j-1]="";}else{_6f.splice(j-1,2);j-=2;}}}}_6c.path=_6f.join("/");}}}}uri=[];if(_6c.scheme){uri.push(_6c.scheme,":");}if(_6c.authority){uri.push("//",_6c.authority);}uri.push(_6c.path);if(_6c.query){uri.push("?",_6c.query);}if(_6c.fragment){uri.push("#",_6c.fragment);}}this.uri=uri.join("");var r=this.uri.match(ore);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(ire);this.user=r[3]||n;this.password=r[4]||n;this.host=r[6]||r[7];this.port=r[9]||n;}};dojo._Url.prototype.toString=function(){return this.uri;};dojo.moduleUrl=function(_72,url){var loc=d._getModuleSymbols(_72).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _75=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_75==-1||_75>loc.indexOf("/"))){loc=d.baseUrl+loc;}return new d._Url(loc,url);};})();if(typeof window!="undefined"){dojo.isBrowser=true;dojo._name="browser";(function(){var d=dojo;if(document&&document.getElementsByTagName){var _77=document.getElementsByTagName("script");var _78=/dojo(\.xd)?\.js(\W|$)/i;for(var i=0;i<_77.length;i++){var src=_77[i].getAttribute("src");if(!src){continue;}var m=src.match(_78);if(m){if(!d.config.baseUrl){d.config.baseUrl=src.substring(0,m.index);}var cfg=_77[i].getAttribute("djConfig");if(cfg){var _7d=eval("({ "+cfg+" })");for(var x in _7d){dojo.config[x]=_7d[x];}}break;}}}d.baseUrl=d.config.baseUrl;var n=navigator;var dua=n.userAgent;var dav=n.appVersion;var tv=parseFloat(dav);d.isOpera=(dua.indexOf("Opera")>=0)?tv:0;var idx=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);if(idx){d.isSafari=parseFloat(dav.split("Version/")[1])||((parseFloat(dav.substr(idx+7))>=419.3)?3:2)||2;}d.isAIR=(dua.indexOf("AdobeAIR")>=0)?1:0;d.isKhtml=(dav.indexOf("Konqueror")>=0||d.isSafari)?tv:0;d.isMozilla=d.isMoz=(dua.indexOf("Gecko")>=0&&!d.isKhtml)?tv:0;d.isFF=d.isIE=0;if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1])||0;}if(document.all&&!d.isOpera){d.isIE=parseFloat(dav.split("MSIE ")[1])||0;}if(dojo.isIE&&window.location.protocol==="file:"){dojo.config.ieForceActiveXXhr=true;}var cm=document.compatMode;d.isQuirks=cm=="BackCompat"||cm=="QuirksMode"||d.isIE<6;d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d._xhrObj=function(){var _85=null;var _86=null;if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){try{_85=new XMLHttpRequest();}catch(e){}}if(!_85){for(var i=0;i<3;++i){var _88=d._XMLHTTP_PROGIDS[i];try{_85=new ActiveXObject(_88);}catch(e){_86=e;}if(_85){d._XMLHTTP_PROGIDS=[_88];break;}}}if(!_85){throw new Error("XMLHTTP not available: "+_86);}return _85;};d._isDocumentOk=function(_89){var _8a=_89.status||0;return (_8a>=200&&_8a<300)||_8a==304||_8a==1223||(!_8a&&(location.protocol=="file:"||location.protocol=="chrome:"));};var _8b=window.location+"";var _8c=document.getElementsByTagName("base");var _8d=(_8c&&_8c.length>0);d._getText=function(uri,_8f){var _90=this._xhrObj();if(!_8d&&dojo._Url){uri=(new dojo._Url(_8b,uri)).toString();}if(d.config.cacheBust){uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");}_90.open("GET",uri,false);try{_90.send(null);if(!d._isDocumentOk(_90)){var err=Error("Unable to load "+uri+" status:"+_90.status);err.status=_90.status;err.responseText=_90.responseText;throw err;}}catch(e){if(_8f){return null;}throw e;}return _90.responseText;};})();dojo._initFired=false;dojo._loadInit=function(e){dojo._initFired=true;var _93=(e&&e.type)?e.type.toLowerCase():"load";if(arguments.callee.initialized||(_93!="domcontentloaded"&&_93!="load")){return;}arguments.callee.initialized=true;if("_khtmlTimer" in dojo){clearInterval(dojo._khtmlTimer);delete dojo._khtmlTimer;}if(dojo._inFlightCount==0){dojo._modulesLoaded();}};dojo._fakeLoadInit=function(){dojo._loadInit({type:"load"});};if(!dojo.config.afterOnLoad){if(document.addEventListener){if(dojo.isOpera||dojo.isFF>=3||(dojo.isMoz&&dojo.config.enableMozDomContentLoaded===true)){document.addEventListener("DOMContentLoaded",dojo._loadInit,null);}window.addEventListener("load",dojo._loadInit,null);}if(dojo.isAIR){window.addEventListener("load",dojo._loadInit,null);}else{if(/(WebKit|khtml)/i.test(navigator.userAgent)){dojo._khtmlTimer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){dojo._loadInit();}},10);}}}(function(){var _w=window;var _95=function(_96,fp){var _98=_w[_96]||function(){};_w[_96]=function(){fp.apply(_w,arguments);_98.apply(_w,arguments);};};if(dojo.isIE){if(!dojo.config.afterOnLoad){document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");}var _99=true;_95("onbeforeunload",function(){_w.setTimeout(function(){_99=false;},0);});_95("onunload",function(){if(_99){dojo.unloaded();}});try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");}catch(e){}}else{_95("onbeforeunload",function(){dojo.unloaded();});}})();}(function(){var mp=dojo.config["modulePaths"];if(mp){for(var _9b in mp){dojo.registerModulePath(_9b,mp[_9b]);}}})();if(dojo.config.isDebug){dojo.require("dojo._firebug.firebug");}if(dojo.config.debugAtAllCosts){dojo.config.useXDomain=true;dojo.require("dojo._base._loader.loader_xd");dojo.require("dojo._base._loader.loader_debug");}if(!dojo._hasResource["dojo._base.lang"]){dojo._hasResource["dojo._base.lang"]=true;dojo.provide("dojo._base.lang");dojo.isString=function(it){return !!arguments.length&&it!=null&&(typeof it=="string"||it instanceof String);};dojo.isArray=function(it){return it&&(it instanceof Array||typeof it=="array");};dojo.isFunction=(function(){var _9e=function(it){return it&&(typeof it=="function"||it instanceof Function);};return dojo.isSafari?function(it){if(typeof it=="function"&&it=="[object NodeList]"){return false;}return _9e(it);}:_9e;})();dojo.isObject=function(it){return it!==undefined&&(it===null||typeof it=="object"||dojo.isArray(it)||dojo.isFunction(it));};dojo.isArrayLike=function(it){var d=dojo;return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));};dojo.isAlien=function(it){return it&&!dojo.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));};dojo.extend=function(_a5,_a6){for(var i=1,l=arguments.length;i<l;i++){dojo._mixin(_a5.prototype,arguments[i]);}return _a5;};dojo._hitchArgs=function(_a9,_aa){var pre=dojo._toArray(arguments,2);var _ac=dojo.isString(_aa);return function(){var _ad=dojo._toArray(arguments);var f=_ac?(_a9||dojo.global)[_aa]:_aa;return f&&f.apply(_a9||this,pre.concat(_ad));};};dojo.hitch=function(_af,_b0){if(arguments.length>2){return dojo._hitchArgs.apply(dojo,arguments);}if(!_b0){_b0=_af;_af=null;}if(dojo.isString(_b0)){_af=_af||dojo.global;if(!_af[_b0]){throw (["dojo.hitch: scope[\"",_b0,"\"] is null (scope=\"",_af,"\")"].join(""));}return function(){return _af[_b0].apply(_af,arguments||[]);};}return !_af?_b0:function(){return _b0.apply(_af,arguments||[]);};};dojo.delegate=dojo._delegate=function(obj,_b2){function TMP(){};TMP.prototype=obj;var tmp=new TMP();if(_b2){dojo.mixin(tmp,_b2);}return tmp;};dojo.partial=function(_b4){var arr=[null];return dojo.hitch.apply(dojo,arr.concat(dojo._toArray(arguments)));};dojo._toArray=function(obj,_b7,_b8){var arr=_b8||[];for(var x=_b7||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};dojo.clone=function(o){if(!o){return o;}if(dojo.isArray(o)){var r=[];for(var i=0;i<o.length;++i){r.push(dojo.clone(o[i]));}return r;}if(!dojo.isObject(o)){return o;}if(o.nodeType&&o.cloneNode){return o.cloneNode(true);}if(o instanceof Date){return new Date(o.getTime());}var r=new o.constructor();for(var i in o){if(!(i in r)||r[i]!=o[i]){r[i]=dojo.clone(o[i]);}}return r;};dojo.trim=function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");};}if(!dojo._hasResource["dojo._base.declare"]){dojo._hasResource["dojo._base.declare"]=true;dojo.provide("dojo._base.declare");dojo.declare=function(_bf,_c0,_c1){var dd=arguments.callee,_c3;if(dojo.isArray(_c0)){_c3=_c0;_c0=_c3.shift();}if(_c3){dojo.forEach(_c3,function(m){if(!m){throw (_bf+": mixin #"+i+" is null");}_c0=dd._delegate(_c0,m);});}var _c5=(_c1||0).constructor,_c6=dd._delegate(_c0),fn;for(var i in _c1){if(dojo.isFunction(fn=_c1[i])&&!0[i]){fn.nom=i;}}dojo.extend(_c6,{declaredClass:_bf,_constructor:_c5,preamble:null},_c1||0);_c6.prototype.constructor=_c6;return dojo.setObject(_bf,_c6);};dojo.mixin(dojo.declare,{_delegate:function(_c9,_ca){var bp=(_c9||0).prototype,mp=(_ca||0).prototype;var _cd=dojo.declare._makeCtor();dojo.mixin(_cd,{superclass:bp,mixin:mp,extend:dojo.declare._extend});if(_c9){_cd.prototype=dojo._delegate(bp);}dojo.extend(_cd,dojo.declare._core,mp||0,{_constructor:null,preamble:null});_cd.prototype.constructor=_cd;_cd.prototype.declaredClass=(bp||0).declaredClass+"_"+(mp||0).declaredClass;return _cd;},_extend:function(_ce){for(var i in _ce){if(dojo.isFunction(fn=_ce[i])&&!0[i]){fn.nom=i;}}dojo.extend(this,_ce);},_makeCtor:function(){return function(){this._construct(arguments);};},_core:{_construct:function(_d0){var c=_d0.callee,s=c.superclass,ct=s&&s.constructor,m=c.mixin,mct=m&&m.constructor,a=_d0,ii,fn;if(a[0]){if(((fn=a[0].preamble))){a=fn.apply(this,a)||a;}}if((fn=c.prototype.preamble)){a=fn.apply(this,a)||a;}if(ct&&ct.apply){ct.apply(this,a);}if(mct&&mct.apply){mct.apply(this,a);}if((ii=c.prototype._constructor)){ii.apply(this,_d0);}if(this.constructor.prototype==c.prototype&&(ct=this.postscript)){ct.apply(this,_d0);}},_findMixin:function(_d9){var c=this.constructor,p,m;while(c){p=c.superclass;m=c.mixin;if(m==_d9||(m instanceof _d9.constructor)){return p;}if(m&&(m=m._findMixin(_d9))){return m;}c=p&&p.constructor;}},_findMethod:function(_dd,_de,_df,has){var p=_df,c,m,f;do{c=p.constructor;m=c.mixin;if(m&&(m=this._findMethod(_dd,_de,m,has))){return m;}if((f=p[_dd])&&(has==(f==_de))){return p;}p=c.superclass;}while(p);return !has&&(p=this._findMixin(_df))&&this._findMethod(_dd,_de,p,has);},inherited:function(_e5,_e6,_e7){var a=arguments;if(!dojo.isString(a[0])){_e7=_e6;_e6=_e5;_e5=_e6.callee.nom;}a=_e7||_e6;var c=_e6.callee,p=this.constructor.prototype,fn,mp;if(this[_e5]!=c||p[_e5]==c){mp=this._findMethod(_e5,c,p,true);if(!mp){throw (this.declaredClass+": inherited method \""+_e5+"\" mismatch");}p=this._findMethod(_e5,c,mp,false);}fn=p&&p[_e5];if(!fn){throw (mp.declaredClass+": inherited method \""+_e5+"\" not found");}return fn.apply(this,a);}}});}if(!dojo._hasResource["dojo._base.connect"]){dojo._hasResource["dojo._base.connect"]=true;dojo.provide("dojo._base.connect");dojo._listener={getDispatcher:function(){return function(){var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;var r=t&&t.apply(this,arguments);for(var i in ls){if(!(i in ap)){ls[i].apply(this,arguments);}}return r;};},add:function(_f3,_f4,_f5){_f3=_f3||dojo.global;var f=_f3[_f4];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=_f3[_f4]=d;}return f._listeners.push(_f5);},remove:function(_f8,_f9,_fa){var f=(_f8||dojo.global)[_f9];if(f&&f._listeners&&_fa--){delete f._listeners[_fa];}}};dojo.connect=function(obj,_fd,_fe,_ff,_100){var a=arguments,args=[],i=0;args.push(dojo.isString(a[0])?null:a[i++],a[i++]);var a1=a[i+1];args.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){args.push(a[i]);}return dojo._connect.apply(this,args);};dojo._connect=function(obj,_106,_107,_108){var l=dojo._listener,h=l.add(obj,_106,dojo.hitch(_107,_108));return [obj,_106,h,l];};dojo.disconnect=function(_10b){if(_10b&&_10b[0]!==undefined){dojo._disconnect.apply(this,_10b);delete _10b[0];}};dojo._disconnect=function(obj,_10d,_10e,_10f){_10f.remove(obj,_10d,_10e);};dojo._topics={};dojo.subscribe=function(_110,_111,_112){return [_110,dojo._listener.add(dojo._topics,_110,dojo.hitch(_111,_112))];};dojo.unsubscribe=function(_113){if(_113){dojo._listener.remove(dojo._topics,_113[0],_113[1]);}};dojo.publish=function(_114,args){var f=dojo._topics[_114];if(f){f.apply(this,args||[]);}};dojo.connectPublisher=function(_117,obj,_119){var pf=function(){dojo.publish(_117,arguments);};return (_119)?dojo.connect(obj,_119,pf):dojo.connect(obj,pf);};}if(!dojo._hasResource["dojo._base.Deferred"]){dojo._hasResource["dojo._base.Deferred"]=true;dojo.provide("dojo._base.Deferred");dojo.Deferred=function(_11b){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_11b;this.silentlyCancelled=false;};dojo.extend(dojo.Deferred,{_nextId:(function(){var n=1;return function(){return n++;};})(),cancel:function(){var err;if(this.fired==-1){if(this.canceller){err=this.canceller(this);}else{this.silentlyCancelled=true;}if(this.fired==-1){if(!(err instanceof Error)){var res=err;err=new Error("Deferred Cancelled");err.dojoType="cancel";err.cancelResult=res;}this.errback(err);}}else{if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){this.results[0].cancel();}}},_resback:function(res){this.fired=((res instanceof Error)?1:0);this.results[this.fired]=res;this._fire();},_check:function(){if(this.fired!=-1){if(!this.silentlyCancelled){throw new Error("already called!");}this.silentlyCancelled=false;return;}},callback:function(res){this._check();this._resback(res);},errback:function(res){this._check();if(!(res instanceof Error)){res=new Error(res);}this._resback(res);},addBoth:function(cb,cbfn){var _124=dojo.hitch.apply(dojo,arguments);return this.addCallbacks(_124,_124);},addCallback:function(cb,cbfn){return this.addCallbacks(dojo.hitch.apply(dojo,arguments));},addErrback:function(cb,cbfn){return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));},addCallbacks:function(cb,eb){this.chain.push([cb,eb]);if(this.fired>=0){this._fire();}return this;},_fire:function(){var _12b=this.chain;var _12c=this.fired;var res=this.results[_12c];var self=this;var cb=null;while((_12b.length>0)&&(this.paused==0)){var f=_12b.shift()[_12c];if(!f){continue;}try{res=f(res);_12c=((res instanceof Error)?1:0);if(res instanceof dojo.Deferred){cb=function(res){self._resback(res);self.paused--;if((self.paused==0)&&(self.fired>=0)){self._fire();}};this.paused++;}}catch(err){console.debug(err);_12c=1;res=err;}}this.fired=_12c;this.results[_12c]=res;if((cb)&&(this.paused)){res.addBoth(cb);}}});}if(!dojo._hasResource["dojo._base.json"]){dojo._hasResource["dojo._base.json"]=true;dojo.provide("dojo._base.json");dojo.fromJson=function(json){return eval("("+json+")");};dojo._escapeString=function(str){return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};dojo.toJsonIndentStr="\t";dojo.toJson=function(it,_135,_136){if(it===undefined){return "undefined";}var _137=typeof it;if(_137=="number"||_137=="boolean"){return it+"";}if(it===null){return "null";}if(dojo.isString(it)){return dojo._escapeString(it);}if(it.nodeType&&it.cloneNode){return "";}var _138=arguments.callee;var _139;_136=_136||"";var _13a=_135?_136+dojo.toJsonIndentStr:"";if(typeof it.__json__=="function"){_139=it.__json__();if(it!==_139){return _138(_139,_135,_13a);}}if(typeof it.json=="function"){_139=it.json();if(it!==_139){return _138(_139,_135,_13a);}}var sep=_135?" ":"";var _13c=_135?"\n":"";if(dojo.isArray(it)){var res=dojo.map(it,function(obj){var val=_138(obj,_135,_13a);if(typeof val!="string"){val="undefined";}return _13c+_13a+val;});return "["+res.join(","+sep)+_13c+_136+"]";}if(_137=="function"){return null;}var _140=[];for(var key in it){var _142;if(typeof key=="number"){_142="\""+key+"\"";}else{if(typeof key=="string"){_142=dojo._escapeString(key);}else{continue;}}val=_138(it[key],_135,_13a);if(typeof val!="string"){continue;}_140.push(_13c+_13a+_142+":"+sep+val);}return "{"+_140.join(","+sep)+_13c+_136+"}";};}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _143=function(arr,obj,cb){return [dojo.isString(arr)?arr.split(""):arr,obj||dojo.global,dojo.isString(cb)?new Function("item","index","array",cb):cb];};dojo.mixin(dojo,{indexOf:function(_147,_148,_149,_14a){var step=1,end=_147.length||0,i=0;if(_14a){i=end-1;step=end=-1;}if(_149!=undefined){i=_149;}if((_14a&&i>end)||i<end){for(;i!=end;i+=step){if(_147[i]==_148){return i;}}}return -1;},lastIndexOf:function(_14d,_14e,_14f){return dojo.indexOf(_14d,_14e,_14f,true);},forEach:function(arr,_151,_152){if(!arr||!arr.length){return;}var _p=_143(arr,_152,_151);arr=_p[0];for(var i=0,l=_p[0].length;i<l;i++){_p[2].call(_p[1],arr[i],i,arr);}},_everyOrSome:function(_156,arr,_158,_159){var _p=_143(arr,_159,_158);arr=_p[0];for(var i=0,l=arr.length;i<l;i++){var _15d=!!_p[2].call(_p[1],arr[i],i,arr);if(_156^_15d){return _15d;}}return _156;},every:function(arr,_15f,_160){return this._everyOrSome(true,arr,_15f,_160);},some:function(arr,_162,_163){return this._everyOrSome(false,arr,_162,_163);},map:function(arr,_165,_166){var _p=_143(arr,_166,_165);arr=_p[0];var _168=(arguments[3]?(new arguments[3]()):[]);for(var i=0;i<arr.length;++i){_168.push(_p[2].call(_p[1],arr[i],i,arr));}return _168;},filter:function(arr,_16b,_16c){var _p=_143(arr,_16c,_16b);arr=_p[0];var _16e=[];for(var i=0;i<arr.length;i++){if(_p[2].call(_p[1],arr[i],i,arr)){_16e.push(arr[i]);}}return _16e;}});})();}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");dojo.Color=function(_170){if(_170){this.setColor(_170);}};dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255]};dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){var t=this;t.r=r;t.g=g;t.b=b;t.a=a;},setColor:function(_176){var d=dojo;if(d.isString(_176)){d.colorFromString(_176,this);}else{if(d.isArray(_176)){d.colorFromArray(_176,this);}else{this._set(_176.r,_176.g,_176.b,_176.a);if(!(_176 instanceof d.Color)){this.sanitize();}}}return this;},sanitize:function(){return this;},toRgb:function(){var t=this;return [t.r,t.g,t.b];},toRgba:function(){var t=this;return [t.r,t.g,t.b,t.a];},toHex:function(){var arr=dojo.map(["r","g","b"],function(x){var s=this[x].toString(16);return s.length<2?"0"+s:s;},this);return "#"+arr.join("");},toCss:function(_17d){var t=this,rgb=t.r+", "+t.g+", "+t.b;return (_17d?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});dojo.blendColors=function(_180,end,_182,obj){var d=dojo,t=obj||new dojo.Color();d.forEach(["r","g","b","a"],function(x){t[x]=_180[x]+(end[x]-_180[x])*_182;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};dojo.colorFromRgb=function(_187,obj){var m=_187.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);};dojo.colorFromHex=function(_18a,obj){var d=dojo,t=obj||new d.Color(),bits=(_18a.length==4)?4:8,mask=(1<<bits)-1;_18a=Number("0x"+_18a.substr(1));if(isNaN(_18a)){return null;}d.forEach(["b","g","r"],function(x){var c=_18a&mask;_18a>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};dojo.colorFromArray=function(a,obj){var t=obj||new dojo.Color();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1;}return t.sanitize();};dojo.colorFromString=function(str,obj){var a=dojo.Color.named[str];return a&&dojo.colorFromArray(a,obj)||dojo.colorFromRgb(str,obj)||dojo.colorFromHex(str,obj);};}if(!dojo._hasResource["dojo._base"]){dojo._hasResource["dojo._base"]=true;dojo.provide("dojo._base");}if(!dojo._hasResource["dojo._base.window"]){dojo._hasResource["dojo._base.window"]=true;dojo.provide("dojo._base.window");dojo._gearsObject=function(){var _198;var _199;var _19a=dojo.getObject("google.gears");if(_19a){return _19a;}if(typeof GearsFactory!="undefined"){_198=new GearsFactory();}else{if(dojo.isIE){try{_198=new ActiveXObject("Gears.Factory");}catch(e){}}else{if(navigator.mimeTypes["application/x-googlegears"]){_198=document.createElement("object");_198.setAttribute("type","application/x-googlegears");_198.setAttribute("width",0);_198.setAttribute("height",0);_198.style.display="none";document.documentElement.appendChild(_198);}}}if(!_198){return null;}dojo.setObject("google.gears.factory",_198);return dojo.getObject("google.gears");};dojo.isGears=(!!dojo._gearsObject())||0;dojo.doc=window["document"]||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_19b,_19c){dojo.global=_19b;dojo.doc=_19c;};dojo._fireCallback=function(_19d,_19e,_19f){if(_19e&&dojo.isString(_19d)){_19d=_19e[_19d];}return _19d.apply(_19e,_19f||[]);};dojo.withGlobal=function(_1a0,_1a1,_1a2,_1a3){var rval;var _1a5=dojo.global;var _1a6=dojo.doc;try{dojo.setContext(_1a0,_1a0.document);rval=dojo._fireCallback(_1a1,_1a2,_1a3);}finally{dojo.setContext(_1a5,_1a6);}return rval;};dojo.withDoc=function(_1a7,_1a8,_1a9,_1aa){var rval;var _1ac=dojo.doc;try{dojo.doc=_1a7;rval=dojo._fireCallback(_1a8,_1a9,_1aa);}finally{dojo.doc=_1ac;}return rval;};}if(!dojo._hasResource["dojo._base.event"]){dojo._hasResource["dojo._base.event"]=true;dojo.provide("dojo._base.event");(function(){var del=(dojo._event_listener={add:function(node,name,fp){if(!node){return;}name=del._normalizeEventName(name);fp=del._fixCallback(name,fp);var _1b1=name;if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){var ofp=fp;name=(name=="mouseenter")?"mouseover":"mouseout";fp=function(e){if(!dojo.isDescendant(e.relatedTarget,node)){return ofp.call(this,e);}};}node.addEventListener(name,fp,false);return fp;},remove:function(node,_1b5,_1b6){if(node){node.removeEventListener(del._normalizeEventName(_1b5),_1b6,false);}},_normalizeEventName:function(name){return name.slice(0,2)=="on"?name.slice(2):name;},_fixCallback:function(name,fp){return name!="keypress"?fp:function(e){return fp.call(this,del._fixEvent(e,this));};},_fixEvent:function(evt,_1bc){switch(evt.type){case "keypress":del._setKeyChar(evt);break;}return evt;},_setKeyChar:function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";}});dojo.fixEvent=function(evt,_1bf){return del._fixEvent(evt,_1bf);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _1c1=dojo._listener;dojo._connect=function(obj,_1c3,_1c4,_1c5,_1c6){var _1c7=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=!_1c7?0:(!_1c6?1:2),l=[dojo._listener,del,_1c1][lid];var h=l.add(obj,_1c3,dojo.hitch(_1c4,_1c5));return [obj,_1c3,h,lid];};dojo._disconnect=function(obj,_1cc,_1cd,_1ce){([dojo._listener,del,_1c1][_1ce]).remove(obj,_1cc,_1cd);};dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145};if(dojo.isIE){var _1cf=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;if(!dojo.config._allow_leaks){_1c1=iel=dojo._ie_listener={handlers:[],add:function(_1d3,_1d4,_1d5){_1d3=_1d3||dojo.global;var f=_1d3[_1d4];if(!f||!f._listeners){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d._listeners=[];f=_1d3[_1d4]=d;}return f._listeners.push(ieh.push(_1d5)-1);},remove:function(_1d9,_1da,_1db){var f=(_1d9||dojo.global)[_1da],l=f&&f._listeners;if(f&&l&&_1db--){delete ieh[l[_1db]];delete l[_1db];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_1df,fp){if(!node){return;}_1df=del._normalizeEventName(_1df);if(_1df=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd._listeners||!kd._stealthKeydownHandle){var h=del.add(node,"onkeydown",del._stealthKeyDown);kd=node.onkeydown;kd._stealthKeydownHandle=h;kd._stealthKeydownRefs=1;}else{kd._stealthKeydownRefs++;}}return iel.add(node,_1df,del._fixCallback(fp));},remove:function(node,_1e4,_1e5){_1e4=del._normalizeEventName(_1e4);iel.remove(node,_1e4,_1e5);if(_1e4=="onkeypress"){var kd=node.onkeydown;if(--kd._stealthKeydownRefs<=0){iel.remove(node,"onkeydown",kd._stealthKeydownHandle);delete kd._stealthKeydownHandle;}}},_normalizeEventName:function(_1e7){return _1e7.slice(0,2)!="on"?"on"+_1e7:_1e7;},_nop:function(){},_fixEvent:function(evt,_1e9){if(!evt){var w=_1e9&&(_1e9.ownerDocument||_1e9.document||_1e9).parentWindow||window;evt=w.event;}if(!evt){return (evt);}evt.target=evt.srcElement;evt.currentTarget=(_1e9||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _1ed=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;var _1ee=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_1ed.scrollLeft||0)-_1ee.x;evt.pageY=evt.clientY+(_1ed.scrollTop||0)-_1ee.y;if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}evt.stopPropagation=del._stopPropagation;evt.preventDefault=del._preventDefault;return del._fixKeys(evt);},_fixKeys:function(evt){switch(evt.type){case "keypress":var c=("charCode" in evt?evt.charCode:evt.keyCode);if(c==10){c=0;evt.keyCode=13;}else{if(c==13||c==27){c=0;}else{if(c==3){c=99;}}}evt.charCode=c;del._setKeyChar(evt);break;}return evt;},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp._listeners){return;}var k=evt.keyCode;var _1f4=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_1f4||evt.ctrlKey){var c=_1f4?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});kp.call(evt.currentTarget,faux);evt.cancelBubble=faux.cancelBubble;evt.returnValue=faux.returnValue;_1cf(evt,faux.keyCode);}},_stopPropagation:function(){this.cancelBubble=true;},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_1cf(this,0);}this.returnValue=false;}});dojo.stopEvent=function(evt){evt=evt||window.event;del._stopPropagation.call(evt);del._preventDefault.call(evt);};}del._synthesizeEvent=function(evt,_1f9){var faux=dojo.mixin({},evt,_1f9);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_1fc){switch(evt.type){case "keypress":var c=evt.which;if(c==3){c=99;}c=((c<41)&&(!evt.shiftKey)?0:c);if((evt.ctrlKey)&&(!evt.shiftKey)&&(c>=65)&&(c<=90)){c+=32;}return del._synthesizeEvent(evt,{charCode:c});}return evt;}});}if(dojo.isSafari){dojo.mixin(del,{_fixEvent:function(evt,_1ff){switch(evt.type){case "keypress":var c=evt.charCode,s=evt.shiftKey,k=evt.keyCode;k=k||_203[evt.keyIdentifier]||0;if(evt.keyIdentifier=="Enter"){c=0;}else{if((evt.ctrlKey)&&(c>0)&&(c<27)){c+=96;}else{if(c==dojo.keys.SHIFT_TAB){c=dojo.keys.TAB;s=true;}else{c=(c>=32&&c<63232?c:0);}}}return del._synthesizeEvent(evt,{charCode:c,shiftKey:s,keyCode:k});}return evt;}});dojo.mixin(dojo.keys,{SHIFT_TAB:25,UP_ARROW:63232,DOWN_ARROW:63233,LEFT_ARROW:63234,RIGHT_ARROW:63235,F1:63236,F2:63237,F3:63238,F4:63239,F5:63240,F6:63241,F7:63242,F8:63243,F9:63244,F10:63245,F11:63246,F12:63247,PAUSE:63250,DELETE:63272,HOME:63273,END:63275,PAGE_UP:63276,PAGE_DOWN:63277,INSERT:63302,PRINT_SCREEN:63248,SCROLL_LOCK:63249,NUM_LOCK:63289});var dk=dojo.keys,_203={"Up":dk.UP_ARROW,"Down":dk.DOWN_ARROW,"Left":dk.LEFT_ARROW,"Right":dk.RIGHT_ARROW,"PageUp":dk.PAGE_UP,"PageDown":dk.PAGE_DOWN};}})();if(dojo.isIE){dojo._ieDispatcher=function(args,_206){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c._listeners,t=h[c.target];var r=t&&t.apply(_206,args);for(var i in ls){if(!(i in ap)){h[ls[i]].apply(_206,args);}}return r;};dojo._getIeDispatcher=function(){return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");};dojo._event_listener._fixCallback=function(fp){var f=dojo._event_listener._fixEvent;return function(e){return fp.call(this,f(e,this));};};}}if(!dojo._hasResource["dojo._base.html"]){dojo._hasResource["dojo._base.html"]=true;dojo.provide("dojo._base.html");try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}if(dojo.isIE||dojo.isOpera){dojo.byId=function(id,doc){if(dojo.isString(id)){var _d=doc||dojo.doc;var te=_d.getElementById(id);if(te&&te.attributes.id.value==id){return te;}else{var eles=_d.all[id];if(!eles||!eles.length){return eles;}var i=0;while((te=eles[i++])){if(te.attributes.id.value==id){return te;}}}}else{return id;}};}else{dojo.byId=function(id,doc){return dojo.isString(id)?(doc||dojo.doc).getElementById(id):id;};}(function(){var d=dojo;var _21a=null;dojo.addOnUnload(function(){_21a=null;});dojo._destroyElement=function(node){node=d.byId(node);try{if(!_21a||_21a.ownerDocument!=node.ownerDocument){_21a=node.ownerDocument.createElement("div");}_21a.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_21a.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_21d){try{node=d.byId(node);_21d=d.byId(_21d);while(node){if(node===_21d){return true;}node=node.parentNode;}}catch(e){}return false;};dojo.setSelectable=function(node,_21f){node=d.byId(node);if(d.isMozilla){node.style.MozUserSelect=_21f?"":"none";}else{if(d.isKhtml){node.style.KhtmlUserSelect=_21f?"auto":"none";}else{if(d.isIE){node.unselectable=_21f?"":"on";d.query("*",node).forEach(function(_220){_220.unselectable=_21f?"":"on";});}}}};var _221=function(node,ref){ref.parentNode.insertBefore(node,ref);return true;};var _224=function(node,ref){var pn=ref.parentNode;if(ref==pn.lastChild){pn.appendChild(node);}else{return _221(node,ref.nextSibling);}return true;};dojo.place=function(node,_229,_22a){if(!node||!_229||_22a===undefined){return false;}node=d.byId(node);_229=d.byId(_229);if(typeof _22a=="number"){var cn=_229.childNodes;if((_22a==0&&cn.length==0)||cn.length==_22a){_229.appendChild(node);return true;}if(_22a==0){return _221(node,_229.firstChild);}return _224(node,cn[_22a-1]);}switch(_22a.toLowerCase()){case "before":return _221(node,_229);case "after":return _224(node,_229);case "first":if(_229.firstChild){return _221(node,_229.firstChild);}default:_229.appendChild(node);return true;}};dojo.boxModel="content-box";if(d.isIE){var _dcm=document.compatMode;d.boxModel=_dcm=="BackCompat"||_dcm=="QuirksMode"||d.isIE<6?"border-box":"content-box";}var gcs;if(d.isSafari){gcs=function(node){var dv=node.ownerDocument.defaultView;var s=dv.getComputedStyle(node,null);if(!s&&node.style){node.style.display="";s=dv.getComputedStyle(node,null);}return s||{};};}else{if(d.isIE){gcs=function(node){return node.currentStyle;};}else{gcs=function(node){var dv=node.ownerDocument.defaultView;return dv.getComputedStyle(node,null);};}}dojo.getComputedStyle=gcs;if(!d.isIE){dojo._toPixelValue=function(_234,_235){return parseFloat(_235)||0;};}else{dojo._toPixelValue=function(_236,_237){if(!_237){return 0;}if(_237=="medium"){return 4;}if(_237.slice&&(_237.slice(-2)=="px")){return parseFloat(_237);}with(_236){var _238=style.left;var _239=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_237;_237=style.pixelLeft;}catch(e){_237=0;}style.left=_238;runtimeStyle.left=_239;}return _237;};}var px=d._toPixelValue;dojo._getOpacity=d.isIE?function(node){try{return node.filters.alpha.opacity/100;}catch(e){return 1;}}:function(node){return gcs(node).opacity;};dojo._setOpacity=d.isIE?function(node,_23e){if(_23e==1){var _23f=/FILTER:[^;]*;?/i;node.style.cssText=node.style.cssText.replace(_23f,"");if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){i.style.cssText=i.style.cssText.replace(_23f,"");});}}else{var o="Alpha(Opacity="+_23e*100+")";node.style.filter=o;}if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){i.style.filter=o;});}return _23e;}:function(node,_244){return node.style.opacity=_244;};var _245={left:true,top:true};var _246=/margin|padding|width|height|max|min|offset/;var _247=function(node,type,_24a){type=type.toLowerCase();if(d.isIE&&_24a=="auto"){if(type=="height"){return node.offsetHeight;}if(type=="width"){return node.offsetWidth;}}if(!(type in _245)){_245[type]=_246.test(type);}return _245[type]?px(node,_24a):_24a;};var _24b=d.isIE?"styleFloat":"cssFloat";var _24c={"cssFloat":_24b,"styleFloat":_24b,"float":_24b};dojo.style=function(node,_24e,_24f){var n=d.byId(node),args=arguments.length,op=(_24e=="opacity");_24e=_24c[_24e]||_24e;if(args==3){return op?d._setOpacity(n,_24f):n.style[_24e]=_24f;}if(args==2&&op){return d._getOpacity(n);}var s=gcs(n);if(args==2&&!d.isString(_24e)){for(var x in _24e){d.style(node,x,_24e[x]);}return s;}return (args==1)?s:_247(n,_24e,s[_24e]);};dojo._getPadExtents=function(n,_256){var s=_256||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};};dojo._getBorderExtents=function(n,_25b){var ne="none",s=_25b||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};};dojo._getPadBorderExtents=function(n,_261){var s=_261||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};};dojo._getMarginExtents=function(n,_266){var s=_266||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(d.isSafari&&(s.position!="absolute")){r=l;}return {l:l,t:t,w:l+r,h:t+b};};dojo._getMarginBox=function(node,_26d){var s=_26d||gcs(node),me=d._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t;if(d.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{var p=node.parentNode;if(p&&p.style){var pcs=gcs(p);if(pcs.overflow!="visible"){var be=d._getBorderExtents(p,pcs);l+=be.l,t+=be.t;}}}}else{if(d.isOpera){var p=node.parentNode;if(p){var be=d._getBorderExtents(p);l-=be.l,t-=be.t;}}}return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};};dojo._getContentBox=function(node,_278){var s=_278||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;if(!w){w=node.offsetWidth,h=node.offsetHeight;}else{h=node.clientHeight,be.w=be.h=0;}if(d.isOpera){pe.l+=be.l;pe.t+=be.t;}return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};};dojo._getBorderBox=function(node,_27f){var s=_27f||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};};dojo._setBox=function(node,l,t,w,h,u){u=u||"px";var s=node.style;if(!isNaN(l)){s.left=l+u;}if(!isNaN(t)){s.top=t+u;}if(w>=0){s.width=w+u;}if(h>=0){s.height=h+u;}};dojo._usesBorderBox=function(node){var n=node.tagName;return d.boxModel=="border-box"||n=="TABLE"||n=="BUTTON";};dojo._setContentSize=function(node,_28d,_28e,_28f){if(d._usesBorderBox(node)){var pb=d._getPadBorderExtents(node,_28f);if(_28d>=0){_28d+=pb.w;}if(_28e>=0){_28e+=pb.h;}}d._setBox(node,NaN,NaN,_28d,_28e);};dojo._setMarginBox=function(node,_292,_293,_294,_295,_296){var s=_296||gcs(node);var bb=d._usesBorderBox(node),pb=bb?_29a:d._getPadBorderExtents(node,s),mb=d._getMarginExtents(node,s);if(_294>=0){_294=Math.max(_294-pb.w-mb.w,0);}if(_295>=0){_295=Math.max(_295-pb.h-mb.h,0);}d._setBox(node,_292,_293,_294,_295);};var _29a={l:0,t:0,w:0,h:0};dojo.marginBox=function(node,box){var n=d.byId(node),s=gcs(n),b=box;return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);};dojo.contentBox=function(node,box){var n=dojo.byId(node),s=gcs(n),b=box;return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);};var _2a6=function(node,prop){if(!(node=(node||0).parentNode)){return 0;}var val,_2aa=0,_b=d.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0;}val=node[prop];if(val){_2aa+=val-0;if(node==_b){break;}}node=node.parentNode;}return _2aa;};dojo._docScroll=function(){var _b=d.body(),_w=d.global,de=d.doc.documentElement;return {y:(_w.pageYOffset||de.scrollTop||_b.scrollTop||0),x:(_w.pageXOffset||d._fixIeBiDiScrollLeft(de.scrollLeft)||_b.scrollLeft||0)};};dojo._isBodyLtr=function(){return !("_bodyLtr" in d)?d._bodyLtr=gcs(d.body()).direction=="ltr":d._bodyLtr;};dojo._getIeDocumentElementOffset=function(){var de=d.doc.documentElement;return (d.isIE>=7)?{x:de.getBoundingClientRect().left,y:de.getBoundingClientRect().top}:{x:d._isBodyLtr()||window.parent==window?de.clientLeft:de.offsetWidth-de.clientWidth-de.clientLeft,y:de.clientTop};};dojo._fixIeBiDiScrollLeft=function(_2b0){var dd=d.doc;if(d.isIE&&!dojo._isBodyLtr()){var de=dd.compatMode=="BackCompat"?dd.body:dd.documentElement;return _2b0+de.clientWidth-de.scrollWidth;}return _2b0;};dojo._abs=function(node,_2b4){var _2b5=node.ownerDocument;var ret={x:0,y:0};var db=d.body();if(d.isIE||(d.isFF>=3)){var _2b8=node.getBoundingClientRect();var _2b9=(d.isIE)?d._getIeDocumentElementOffset():{x:0,y:0};ret.x=_2b8.left-_2b9.x;ret.y=_2b8.top-_2b9.y;}else{if(_2b5["getBoxObjectFor"]){var bo=_2b5.getBoxObjectFor(node),b=d._getBorderExtents(node);ret.x=bo.x-b.l-_2a6(node,"scrollLeft");ret.y=bo.y-b.t-_2a6(node,"scrollTop");}else{if(node["offsetParent"]){var _2bc;if(d.isSafari&&(gcs(node).position=="absolute")&&(node.parentNode==db)){_2bc=db;}else{_2bc=db.parentNode;}if(node.parentNode!=db){var nd=node;if(d.isOpera){nd=db;}ret.x-=_2a6(nd,"scrollLeft");ret.y-=_2a6(nd,"scrollTop");}var _2be=node;do{var n=_2be.offsetLeft;if(!d.isOpera||n>0){ret.x+=isNaN(n)?0:n;}var t=_2be.offsetTop;ret.y+=isNaN(t)?0:t;if(d.isSafari&&_2be!=node){var cs=gcs(_2be);ret.x+=px(_2be,cs.borderLeftWidth);ret.y+=px(_2be,cs.borderTopWidth);}_2be=_2be.offsetParent;}while((_2be!=_2bc)&&_2be);}else{if(node.x&&node.y){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}}if(_2b4){var _2c2=d._docScroll();ret.y+=_2c2.y;ret.x+=_2c2.x;}return ret;};dojo.coords=function(node,_2c4){var n=d.byId(node),s=gcs(n),mb=d._getMarginBox(n,s);var abs=d._abs(n,_2c4);mb.x=abs.x;mb.y=abs.y;return mb;};var _2c9=function(name){switch(name.toLowerCase()){case "tabindex":return (d.isIE&&d.isIE<8)?"tabIndex":"tabindex";default:return name;}};var _2cb={colspan:"colSpan",enctype:"enctype",frameborder:"frameborder",method:"method",rowspan:"rowSpan",scrolling:"scrolling",shape:"shape",span:"span",type:"type",valuetype:"valueType"};dojo.hasAttr=function(node,name){var attr=d.byId(node).getAttributeNode(_2c9(name));return attr?attr.specified:false;};var _2cf={};var _ctr=0;var _2d1=dojo._scopeName+"attrid";dojo.attr=function(node,name,_2d4){var args=arguments.length;if(args==2&&!d.isString(name)){for(var x in name){d.attr(node,x,name[x]);}return;}node=d.byId(node);name=_2c9(name);if(args==3){if(d.isFunction(_2d4)){var _2d7=d.attr(node,_2d1);if(!_2d7){_2d7=_ctr++;d.attr(node,_2d1,_2d7);}if(!_2cf[_2d7]){_2cf[_2d7]={};}var h=_2cf[_2d7][name];if(h){d.disconnect(h);}else{try{delete node[name];}catch(e){}}_2cf[_2d7][name]=d.connect(node,name,_2d4);}else{if(typeof _2d4=="boolean"){node[name]=_2d4;}else{node.setAttribute(name,_2d4);}}return;}else{var prop=_2cb[name.toLowerCase()];if(prop){return node[prop];}else{var _2d4=node[name];return (typeof _2d4=="boolean"||typeof _2d4=="function")?_2d4:(d.hasAttr(node,name)?node.getAttribute(name):null);}}};dojo.removeAttr=function(node,name){d.byId(node).removeAttribute(_2c9(name));};})();dojo.hasClass=function(node,_2dd){return ((" "+dojo.byId(node).className+" ").indexOf(" "+_2dd+" ")>=0);};dojo.addClass=function(node,_2df){node=dojo.byId(node);var cls=node.className;if((" "+cls+" ").indexOf(" "+_2df+" ")<0){node.className=cls+(cls?" ":"")+_2df;}};dojo.removeClass=function(node,_2e2){node=dojo.byId(node);var t=dojo.trim((" "+node.className+" ").replace(" "+_2e2+" "," "));if(node.className!=t){node.className=t;}};dojo.toggleClass=function(node,_2e5,_2e6){if(_2e6===undefined){_2e6=!dojo.hasClass(node,_2e5);}dojo[_2e6?"addClass":"removeClass"](node,_2e5);};}if(!dojo._hasResource["dojo._base.NodeList"]){dojo._hasResource["dojo._base.NodeList"]=true;dojo.provide("dojo._base.NodeList");(function(){var d=dojo;var tnl=function(arr){arr.constructor=dojo.NodeList;dojo._mixin(arr,dojo.NodeList.prototype);return arr;};var _2ea=function(func,_2ec){return function(){var _a=arguments;var aa=d._toArray(_a,0,[null]);var s=this.map(function(i){aa[0]=i;return d[func].apply(d,aa);});return (_2ec||((_a.length>1)||!d.isString(_a[0])))?this:s;};};dojo.NodeList=function(){return tnl(Array.apply(null,arguments));};dojo.NodeList._wrap=tnl;dojo.extend(dojo.NodeList,{slice:function(){var a=dojo._toArray(arguments);return tnl(a.slice.apply(this,a));},splice:function(){var a=dojo._toArray(arguments);return tnl(a.splice.apply(this,a));},concat:function(){var a=dojo._toArray(arguments,0,[this]);return tnl(a.concat.apply([],a));},indexOf:function(_2f4,_2f5){return d.indexOf(this,_2f4,_2f5);},lastIndexOf:function(){return d.lastIndexOf.apply(d,d._toArray(arguments,0,[this]));},every:function(_2f6,_2f7){return d.every(this,_2f6,_2f7);},some:function(_2f8,_2f9){return d.some(this,_2f8,_2f9);},map:function(func,obj){return d.map(this,func,obj,d.NodeList);},forEach:function(_2fc,_2fd){d.forEach(this,_2fc,_2fd);return this;},coords:function(){return d.map(this,d.coords);},attr:_2ea("attr"),style:_2ea("style"),addClass:_2ea("addClass",true),removeClass:_2ea("removeClass",true),toggleClass:_2ea("toggleClass",true),connect:_2ea("connect",true),place:function(_2fe,_2ff){var item=d.query(_2fe)[0];return this.forEach(function(i){d.place(i,item,(_2ff||"last"));});},orphan:function(_302){var _303=_302?d._filterQueryResult(this,_302):this;_303.forEach(function(item){if(item.parentNode){item.parentNode.removeChild(item);}});return _303;},adopt:function(_305,_306){var item=this[0];return d.query(_305).forEach(function(ai){d.place(ai,item,_306||"last");});},query:function(_309){if(!_309){return this;}var ret=d.NodeList();this.forEach(function(item){d.query(_309,item).forEach(function(_30c){if(_30c!==undefined){ret.push(_30c);}});});return ret;},filter:function(_30d){var _30e=this;var _a=arguments;var r=d.NodeList();var rp=function(t){if(t!==undefined){r.push(t);}};if(d.isString(_30d)){_30e=d._filterQueryResult(this,_a[0]);if(_a.length==1){return _30e;}_a.shift();}d.forEach(d.filter(_30e,_a[0],_a[1]),rp);return r;},addContent:function(_313,_314){var ta=d.doc.createElement("span");if(d.isString(_313)){ta.innerHTML=_313;}else{ta.appendChild(_313);}if(_314===undefined){_314="last";}var ct=(_314=="first"||_314=="after")?"lastChild":"firstChild";this.forEach(function(item){var tn=ta.cloneNode(true);while(tn[ct]){d.place(tn[ct],item,_314);}});return this;},empty:function(){return this.forEach("item.innerHTML='';");},instantiate:function(_319,_31a){var c=d.isFunction(_319)?_319:d.getObject(_319);return this.forEach(function(i){new c(_31a||{},i);});}});d.forEach(["blur","focus","click","keydown","keypress","keyup","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup"],function(evt){var _oe="on"+evt;dojo.NodeList.prototype[_oe]=function(a,b){return this.connect(_oe,a,b);};});})();}if(!dojo._hasResource["dojo._base.query"]){dojo._hasResource["dojo._base.query"]=true;dojo.provide("dojo._base.query");(function(){var d=dojo;var _322=dojo.isIE?"children":"childNodes";var _323=false;var _324=function(_325){if(">~+".indexOf(_325.charAt(_325.length-1))>=0){_325+=" *";}_325+=" ";var ts=function(s,e){return d.trim(_325.slice(s,e));};var _329=[];var _32a=-1;var _32b=-1;var _32c=-1;var _32d=-1;var _32e=-1;var inId=-1;var _330=-1;var lc="";var cc="";var _333;var x=0;var ql=_325.length;var _336=null;var _cp=null;var _338=function(){if(_330>=0){var tv=(_330==x)?null:ts(_330,x).toLowerCase();_336[(">~+".indexOf(tv)<0)?"tag":"oper"]=tv;_330=-1;}};var _33a=function(){if(inId>=0){_336.id=ts(inId,x).replace(/\\/g,"");inId=-1;}};var _33b=function(){if(_32e>=0){_336.classes.push(ts(_32e+1,x).replace(/\\/g,""));_32e=-1;}};var _33c=function(){_33a();_338();_33b();};for(;lc=cc,cc=_325.charAt(x),x<ql;x++){if(lc=="\\"){continue;}if(!_336){_333=x;_336={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null};_330=x;}if(_32a>=0){if(cc=="]"){if(!_cp.attr){_cp.attr=ts(_32a+1,x);}else{_cp.matchFor=ts((_32c||_32a+1),x);}var cmf=_cp.matchFor;if(cmf){if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){_cp.matchFor=cmf.substring(1,cmf.length-1);}}_336.attrs.push(_cp);_cp=null;_32a=_32c=-1;}else{if(cc=="="){var _33e=("|~^$*".indexOf(lc)>=0)?lc:"";_cp.type=_33e+cc;_cp.attr=ts(_32a+1,x-_33e.length);_32c=x+1;}}}else{if(_32b>=0){if(cc==")"){if(_32d>=0){_cp.value=ts(_32b+1,x);}_32d=_32b=-1;}}else{if(cc=="#"){_33c();inId=x+1;}else{if(cc=="."){_33c();_32e=x;}else{if(cc==":"){_33c();_32d=x;}else{if(cc=="["){_33c();_32a=x;_cp={};}else{if(cc=="("){if(_32d>=0){_cp={name:ts(_32d+1,x),value:null};_336.pseudos.push(_cp);}_32b=x;}else{if(cc==" "&&lc!=cc){_33c();if(_32d>=0){_336.pseudos.push({name:ts(_32d+1,x)});}_336.hasLoops=(_336.pseudos.length||_336.attrs.length||_336.classes.length);_336.query=ts(_333,x);_336.tag=(_336["oper"])?null:(_336.tag||"*");_329.push(_336);_336=null;}}}}}}}}}return _329;};var _33f={"*=":function(attr,_341){return "[contains(@"+attr+", '"+_341+"')]";},"^=":function(attr,_343){return "[starts-with(@"+attr+", '"+_343+"')]";},"$=":function(attr,_345){return "[substring(@"+attr+", string-length(@"+attr+")-"+(_345.length-1)+")='"+_345+"']";},"~=":function(attr,_347){return "[contains(concat(' ',@"+attr+",' '), ' "+_347+" ')]";},"|=":function(attr,_349){return "[contains(concat(' ',@"+attr+",' '), ' "+_349+"-')]";},"=":function(attr,_34b){return "[@"+attr+"='"+_34b+"']";}};var _34c=function(_34d,_34e,_34f,_350){d.forEach(_34e.attrs,function(attr){var _352;if(attr.type&&_34d[attr.type]){_352=_34d[attr.type](attr.attr,attr.matchFor);}else{if(attr.attr.length){_352=_34f(attr.attr);}}if(_352){_350(_352);}});};var _353=function(_354){var _355=".";var _356=_324(d.trim(_354));while(_356.length){var tqp=_356.shift();var _358;var _359="";if(tqp.oper==">"){_358="/";tqp=_356.shift();}else{if(tqp.oper=="~"){_358="/following-sibling::";tqp=_356.shift();}else{if(tqp.oper=="+"){_358="/following-sibling::";_359="[position()=1]";tqp=_356.shift();}else{_358="//";}}}_355+=_358+tqp.tag+_359;if(tqp.id){_355+="[@id='"+tqp.id+"'][1]";}d.forEach(tqp.classes,function(cn){var cnl=cn.length;var _35c=" ";if(cn.charAt(cnl-1)=="*"){_35c="";cn=cn.substr(0,cnl-1);}_355+="[contains(concat(' ',@class,' '), ' "+cn+_35c+"')]";});_34c(_33f,tqp,function(_35d){return "[@"+_35d+"]";},function(_35e){_355+=_35e;});}return _355;};var _35f={};var _360=function(path){if(_35f[path]){return _35f[path];}var doc=d.doc;var _363=_353(path);var tf=function(_365){var ret=[];var _367;try{_367=doc.evaluate(_363,_365,null,XPathResult.ANY_TYPE,null);}catch(e){console.debug("failure in exprssion:",_363,"under:",_365);console.debug(e);}var _368=_367.iterateNext();while(_368){ret.push(_368);_368=_367.iterateNext();}return ret;};return _35f[path]=tf;};var _369={};var _36a={};var _36b=function(_36c,_36d){if(!_36c){return _36d;}if(!_36d){return _36c;}return function(){return _36c.apply(window,arguments)&&_36d.apply(window,arguments);};};var _36e=function(root){var ret=[];var te,x=0,tret=root[_322];while(te=tret[x++]){if(te.nodeType==1){ret.push(te);}}return ret;};var _374=function(root,_376){var ret=[];var te=root;while(te=te.nextSibling){if(te.nodeType==1){ret.push(te);if(_376){break;}}}return ret;};var _379=function(_37a,_37b,_37c,idx){var nidx=idx+1;var _37f=(_37b.length==nidx);var tqp=_37b[idx];if(tqp.oper){var ecn=(tqp.oper==">")?_36e(_37a):_374(_37a,(tqp.oper=="+"));if(!ecn||!ecn.length){return;}nidx++;_37f=(_37b.length==nidx);var tf=_383(_37b[idx+1]);for(var x=0,ecnl=ecn.length,te;x<ecnl,te=ecn[x];x++){if(tf(te)){if(_37f){_37c.push(te);}else{_379(te,_37b,_37c,nidx);}}}}var _387=_388(tqp)(_37a);if(_37f){while(_387.length){_37c.push(_387.shift());}}else{while(_387.length){_379(_387.shift(),_37b,_37c,nidx);}}};var _389=function(_38a,_38b){var ret=[];var x=_38a.length-1,te;while(te=_38a[x--]){_379(te,_38b,ret,0);}return ret;};var _383=function(q){if(_369[q.query]){return _369[q.query];}var ff=null;if(q.tag){if(q.tag=="*"){ff=_36b(ff,function(elem){return (elem.nodeType==1);});}else{ff=_36b(ff,function(elem){return ((elem.nodeType==1)&&(q.tag==elem.tagName.toLowerCase()));});}}if(q.id){ff=_36b(ff,function(elem){return ((elem.nodeType==1)&&(elem.id==q.id));});}if(q.hasLoops){ff=_36b(ff,_394(q));}return _369[q.query]=ff;};var _395=function(node){var pn=node.parentNode;var pnc=pn.childNodes;var nidx=-1;var _39a=pn.firstChild;if(!_39a){return nidx;}var ci=node["__cachedIndex"];var cl=pn["__cachedLength"];if(((typeof cl=="number")&&(cl!=pnc.length))||(typeof ci!="number")){pn["__cachedLength"]=pnc.length;var idx=1;do{if(_39a===node){nidx=idx;}if(_39a.nodeType==1){_39a["__cachedIndex"]=idx;idx++;}_39a=_39a.nextSibling;}while(_39a);}else{nidx=ci;}return nidx;};var _39e=0;var _39f="";var _3a0=function(elem,attr){if(attr=="class"){return elem.className||_39f;}if(attr=="for"){return elem.htmlFor||_39f;}return elem.getAttribute(attr,2)||_39f;};var _3a3={"*=":function(attr,_3a5){return function(elem){return (_3a0(elem,attr).indexOf(_3a5)>=0);};},"^=":function(attr,_3a8){return function(elem){return (_3a0(elem,attr).indexOf(_3a8)==0);};},"$=":function(attr,_3ab){var tval=" "+_3ab;return function(elem){var ea=" "+_3a0(elem,attr);return (ea.lastIndexOf(_3ab)==(ea.length-_3ab.length));};},"~=":function(attr,_3b0){var tval=" "+_3b0+" ";return function(elem){var ea=" "+_3a0(elem,attr)+" ";return (ea.indexOf(tval)>=0);};},"|=":function(attr,_3b5){var _3b6=" "+_3b5+"-";return function(elem){var ea=" "+(elem.getAttribute(attr,2)||"");return ((ea==_3b5)||(ea.indexOf(_3b6)==0));};},"=":function(attr,_3ba){return function(elem){return (_3a0(elem,attr)==_3ba);};}};var _3bc={"first-child":function(name,_3be){return function(elem){if(elem.nodeType!=1){return false;}var fc=elem.previousSibling;while(fc&&(fc.nodeType!=1)){fc=fc.previousSibling;}return (!fc);};},"last-child":function(name,_3c2){return function(elem){if(elem.nodeType!=1){return false;}var nc=elem.nextSibling;while(nc&&(nc.nodeType!=1)){nc=nc.nextSibling;}return (!nc);};},"empty":function(name,_3c6){return function(elem){var cn=elem.childNodes;var cnl=elem.childNodes.length;for(var x=cnl-1;x>=0;x--){var nt=cn[x].nodeType;if((nt==1)||(nt==3)){return false;}}return true;};},"contains":function(name,_3cd){return function(elem){return (elem.innerHTML.indexOf(_3cd)>=0);};},"not":function(name,_3d0){var ntf=_383(_324(_3d0)[0]);return function(elem){return (!ntf(elem));};},"nth-child":function(name,_3d4){var pi=parseInt;if(_3d4=="odd"){return function(elem){return (((_395(elem))%2)==1);};}else{if((_3d4=="2n")||(_3d4=="even")){return function(elem){return ((_395(elem)%2)==0);};}else{if(_3d4.indexOf("0n+")==0){var _3d8=pi(_3d4.substr(3));return function(elem){return (elem.parentNode[_322][_3d8-1]===elem);};}else{if((_3d4.indexOf("n+")>0)&&(_3d4.length>3)){var _3da=_3d4.split("n+",2);var pred=pi(_3da[0]);var idx=pi(_3da[1]);return function(elem){return ((_395(elem)%pred)==idx);};}else{if(_3d4.indexOf("n")==-1){var _3d8=pi(_3d4);return function(elem){return (_395(elem)==_3d8);};}}}}}}};var _3df=(d.isIE)?function(cond){var clc=cond.toLowerCase();return function(elem){return elem[cond]||elem[clc];};}:function(cond){return function(elem){return (elem&&elem.getAttribute&&elem.hasAttribute(cond));};};var _394=function(_3e5){var _3e6=(_36a[_3e5.query]||_369[_3e5.query]);if(_3e6){return _3e6;}var ff=null;if(_3e5.id){if(_3e5.tag!="*"){ff=_36b(ff,function(elem){return (elem.tagName.toLowerCase()==_3e5.tag);});}}d.forEach(_3e5.classes,function(_3e9,idx,arr){var _3ec=_3e9.charAt(_3e9.length-1)=="*";if(_3ec){_3e9=_3e9.substr(0,_3e9.length-1);}var re=new RegExp("(?:^|\\s)"+_3e9+(_3ec?".*":"")+"(?:\\s|$)");ff=_36b(ff,function(elem){return re.test(elem.className);});ff.count=idx;});d.forEach(_3e5.pseudos,function(_3ef){if(_3bc[_3ef.name]){ff=_36b(ff,_3bc[_3ef.name](_3ef.name,_3ef.value));}});_34c(_3a3,_3e5,_3df,function(_3f0){ff=_36b(ff,_3f0);});if(!ff){ff=function(){return true;};}return _36a[_3e5.query]=ff;};var _3f1={};var _388=function(_3f2,root){var fHit=_3f1[_3f2.query];if(fHit){return fHit;}if(_3f2.id&&!_3f2.hasLoops&&!_3f2.tag){return _3f1[_3f2.query]=function(root){return [d.byId(_3f2.id)];};}var _3f6=_394(_3f2);var _3f7;if(_3f2.tag&&_3f2.id&&!_3f2.hasLoops){_3f7=function(root){var te=d.byId(_3f2.id);if(_3f6(te)){return [te];}};}else{var tret;if(!_3f2.hasLoops){_3f7=function(root){var ret=[];var te,x=0,tret=root.getElementsByTagName(_3f2.tag);while(te=tret[x++]){ret.push(te);}return ret;};}else{_3f7=function(root){var ret=[];var te,x=0,tret=root.getElementsByTagName(_3f2.tag);while(te=tret[x++]){if(_3f6(te)){ret.push(te);}}return ret;};}}return _3f1[_3f2.query]=_3f7;};var _403={};var _404={"*":d.isIE?function(root){return root.all;}:function(root){return root.getElementsByTagName("*");},"~":_374,"+":function(root){return _374(root,true);},">":_36e};var _408=function(_409){var _40a=_324(d.trim(_409));if(_40a.length==1){var tt=_388(_40a[0]);tt.nozip=true;return tt;}var sqf=function(root){var _40e=_40a.slice(0);var _40f;if(_40e[0].oper==">"){_40f=[root];}else{_40f=_388(_40e.shift())(root);}return _389(_40f,_40e);};return sqf;};var _410=((document["evaluate"]&&!d.isSafari)?function(_411){var _412=_411.split(" ");if((document["evaluate"])&&(_411.indexOf(":")==-1)&&(_411.indexOf("+")==-1)){if(((_412.length>2)&&(_411.indexOf(">")==-1))||(_412.length>3)||(_411.indexOf("[")>=0)||((1==_412.length)&&(0<=_411.indexOf(".")))){return _360(_411);}}return _408(_411);}:_408);var _413=function(_414){var qcz=_414.charAt(0);if(d.doc["querySelectorAll"]&&((!d.isSafari)||(d.isSafari>3.1))&&(">+~".indexOf(qcz)==-1)){return function(root){var r=root.querySelectorAll(_414);r.nozip=true;return r;};}if(_404[_414]){return _404[_414];}if(0>_414.indexOf(",")){return _404[_414]=_410(_414);}else{var _418=_414.split(/\s*,\s*/);var tf=function(root){var _41b=0;var ret=[];var tp;while(tp=_418[_41b++]){ret=ret.concat(_410(tp,tp.indexOf(" "))(root));}return ret;};return _404[_414]=tf;}};var _41e=0;var _zip=function(arr){if(arr&&arr.nozip){return d.NodeList._wrap(arr);}var ret=new d.NodeList();if(!arr){return ret;}if(arr[0]){ret.push(arr[0]);}if(arr.length<2){return ret;}_41e++;arr[0]["_zipIdx"]=_41e;for(var x=1,te;te=arr[x];x++){if(arr[x]["_zipIdx"]!=_41e){ret.push(te);}te["_zipIdx"]=_41e;}return ret;};d.query=function(_424,root){if(_424.constructor==d.NodeList){return _424;}if(!d.isString(_424)){return new d.NodeList(_424);}if(d.isString(root)){root=d.byId(root);}return _zip(_413(_424)(root||d.doc));};d.query.pseudos=_3bc;d._filterQueryResult=function(_426,_427){var tnl=new d.NodeList();var ff=(_427)?_383(_324(_427)[0]):function(){return true;};for(var x=0,te;te=_426[x];x++){if(ff(te)){tnl.push(te);}}return tnl;};})();}if(!dojo._hasResource["dojo._base.xhr"]){dojo._hasResource["dojo._base.xhr"]=true;dojo.provide("dojo._base.xhr");(function(){var _d=dojo;function setValue(obj,name,_42f){var val=obj[name];if(_d.isString(val)){obj[name]=[val,_42f];}else{if(_d.isArray(val)){val.push(_42f);}else{obj[name]=_42f;}}};dojo.formToObject=function(_431){var ret={};var iq="input:not([type=file]):not([type=submit]):not([type=image]):not([type=reset]):not([type=button]), select, textarea";_d.query(iq,_431).filter(function(node){return !node.disabled&&node.name;}).forEach(function(item){var _in=item.name;var type=(item.type||"").toLowerCase();if(type=="radio"||type=="checkbox"){if(item.checked){setValue(ret,_in,item.value);}}else{if(item.multiple){ret[_in]=[];_d.query("option",item).forEach(function(opt){if(opt.selected){setValue(ret,_in,opt.value);}});}else{setValue(ret,_in,item.value);if(type=="image"){ret[_in+".x"]=ret[_in+".y"]=ret[_in].x=ret[_in].y=0;}}}});return ret;};dojo.objectToQuery=function(map){var enc=encodeURIComponent;var _43b=[];var _43c={};for(var name in map){var _43e=map[name];if(_43e!=_43c[name]){var _43f=enc(name)+"=";if(_d.isArray(_43e)){for(var i=0;i<_43e.length;i++){_43b.push(_43f+enc(_43e[i]));}}else{_43b.push(_43f+enc(_43e));}}}return _43b.join("&");};dojo.formToQuery=function(_441){return _d.objectToQuery(_d.formToObject(_441));};dojo.formToJson=function(_442,_443){return _d.toJson(_d.formToObject(_442),_443);};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dec=decodeURIComponent;_d.forEach(qp,function(item){if(item.length){var _449=item.split("=");var name=dec(_449.shift());var val=dec(_449.join("="));if(_d.isString(ret[name])){ret[name]=[ret[name]];}if(_d.isArray(ret[name])){ret[name].push(val);}else{ret[name]=val;}}});return ret;};dojo._blockAsync=false;dojo._contentHandlers={"text":function(xhr){return xhr.responseText;},"json":function(xhr){if(!dojo.config.usePlainJson){console.warn("Consider using mimetype:text/json-comment-filtered"+" to avoid potential security issues with JSON endpoints"+" (use djConfig.usePlainJson=true to turn off this message)");}return (xhr.status==204)?undefined:_d.fromJson(xhr.responseText);},"json-comment-filtered":function(xhr){var _44f=xhr.responseText;var _450=_44f.indexOf("/*");var _451=_44f.lastIndexOf("*/");if(_450==-1||_451==-1){throw new Error("JSON was not comment filtered");}return (xhr.status==204)?undefined:_d.fromJson(_44f.substring(_450+2,_451));},"javascript":function(xhr){return _d.eval(xhr.responseText);},"xml":function(xhr){var _454=xhr.responseXML;if(_d.isIE&&(!_454||window.location.protocol=="file:")){_d.forEach(["MSXML2","Microsoft","MSXML","MSXML3"],function(_455){try{var dom=new ActiveXObject(_455+".XMLDOM");dom.async=false;dom.loadXML(xhr.responseText);_454=dom;}catch(e){}});}return _454;}};dojo._contentHandlers["json-comment-optional"]=function(xhr){var _458=_d._contentHandlers;try{return _458["json-comment-filtered"](xhr);}catch(e){return _458["json"](xhr);}};dojo._ioSetArgs=function(args,_45a,_45b,_45c){var _45d={args:args,url:args.url};var _45e=null;if(args.form){var form=_d.byId(args.form);var _460=form.getAttributeNode("action");_45d.url=_45d.url||(_460?_460.value:null);_45e=_d.formToObject(form);}var _461=[{}];if(_45e){_461.push(_45e);}if(args.content){_461.push(args.content);}if(args.preventCache){_461.push({"dojo.preventCache":new Date().valueOf()});}_45d.query=_d.objectToQuery(_d.mixin.apply(null,_461));_45d.handleAs=args.handleAs||"text";var d=new _d.Deferred(_45a);d.addCallbacks(_45b,function(_463){return _45c(_463,d);});var ld=args.load;if(ld&&_d.isFunction(ld)){d.addCallback(function(_465){return ld.call(args,_465,_45d);});}var err=args.error;if(err&&_d.isFunction(err)){d.addErrback(function(_467){return err.call(args,_467,_45d);});}var _468=args.handle;if(_468&&_d.isFunction(_468)){d.addBoth(function(_469){return _468.call(args,_469,_45d);});}d.ioArgs=_45d;return d;};var _46a=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;var _at=typeof xhr.abort;if(_at=="function"||_at=="unknown"){xhr.abort();}var err=new Error("xhr cancelled");err.dojoType="cancel";return err;};var _46f=function(dfd){return _d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);};var _471=function(_472,dfd){console.debug(_472);return _472;};var _474=function(args){var dfd=_d._ioSetArgs(args,_46a,_46f,_471);dfd.ioArgs.xhr=_d._xhrObj(dfd.ioArgs.args);return dfd;};var _477=null;var _478=[];var _479=function(){var now=(new Date()).getTime();if(!_d._blockAsync){for(var i=0,tif;i<_478.length&&(tif=_478[i]);i++){var dfd=tif.dfd;try{if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_478.splice(i--,1);}else{if(tif.ioCheck(dfd)){_478.splice(i--,1);tif.resHandle(dfd);}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_478.splice(i--,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel();}}}}}catch(e){console.debug(e);dfd.errback(new Error("_watchInFlightError!"));}}}if(!_478.length){clearInterval(_477);_477=null;return;}};dojo._ioCancelAll=function(){try{_d.forEach(_478,function(i){i.dfd.cancel();});}catch(e){}};if(_d.isIE){_d.addOnUnload(_d._ioCancelAll);}_d._ioWatch=function(dfd,_481,_482,_483){if(dfd.ioArgs.args.timeout){dfd.startTime=(new Date()).getTime();}_478.push({dfd:dfd,validCheck:_481,ioCheck:_482,resHandle:_483});if(!_477){_477=setInterval(_479,50);}_479();};var _484="application/x-www-form-urlencoded";var _485=function(dfd){return dfd.ioArgs.xhr.readyState;};var _487=function(dfd){return 4==dfd.ioArgs.xhr.readyState;};var _489=function(dfd){var xhr=dfd.ioArgs.xhr;if(_d._isDocumentOk(xhr)){dfd.callback(dfd);}else{var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);err.status=xhr.status;err.responseText=xhr.responseText;dfd.errback(err);}};var _48d=function(type,dfd){var _490=dfd.ioArgs;var args=_490.args;var xhr=_490.xhr;xhr.open(type,_490.url,args.sync!==true,args.user||undefined,args.password||undefined);if(args.headers){for(var hdr in args.headers){if(hdr.toLowerCase()==="content-type"&&!args.contentType){args.contentType=args.headers[hdr];}else{xhr.setRequestHeader(hdr,args.headers[hdr]);}}}xhr.setRequestHeader("Content-Type",args.contentType||_484);if(!args.headers||!args.headers["X-Requested-With"]){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}try{xhr.send(_490.query);}catch(e){dfd.cancel();}_d._ioWatch(dfd,_485,_487,_489);xhr=null;return dfd;};dojo._ioAddQueryToUrl=function(_494){if(_494.query.length){_494.url+=(_494.url.indexOf("?")==-1?"?":"&")+_494.query;_494.query=null;}};dojo.xhr=function(_495,args,_497){var dfd=_474(args);if(!_497){_d._ioAddQueryToUrl(dfd.ioArgs);}return _48d(_495,dfd);};dojo.xhrGet=function(args){return _d.xhr("GET",args);};dojo.xhrPost=function(args){return _d.xhr("POST",args,true);};dojo.rawXhrPost=function(args){var dfd=_474(args);dfd.ioArgs.query=args.postData;return _48d("POST",dfd);};dojo.xhrPut=function(args){return _d.xhr("PUT",args,true);};dojo.rawXhrPut=function(args){var dfd=_474(args);var _4a0=dfd.ioArgs;if(args.putData){_4a0.query=args.putData;args.putData=null;}return _48d("PUT",dfd);};dojo.xhrDelete=function(args){return _d.xhr("DELETE",args);};})();}if(!dojo._hasResource["dojo._base.fx"]){dojo._hasResource["dojo._base.fx"]=true;dojo.provide("dojo._base.fx");(function(){var d=dojo;dojo._Line=function(_4a3,end){this.start=_4a3;this.end=end;this.getValue=function(n){return ((this.end-this.start)*n)+this.start;};};d.declare("dojo._Animation",null,{constructor:function(args){d.mixin(this,args);if(d.isArray(this.curve)){this.curve=new d._Line(this.curve[0],this.curve[1]);}},duration:350,repeat:0,rate:10,_percent:0,_startRepeatCount:0,_fire:function(evt,args){try{if(this[evt]){this[evt].apply(this,args||[]);}}catch(e){console.error("exception in animation handler for:",evt);console.error(e);}return this;},play:function(_4a9,_4aa){var _t=this;if(_4aa){_t._stopTimer();_t._active=_t._paused=false;_t._percent=0;}else{if(_t._active&&!_t._paused){return _t;}}_t._fire("beforeBegin");var de=_4a9||_t.delay;var _p=dojo.hitch(_t,"_play",_4aa);if(de>0){setTimeout(_p,de);return _t;}_p();return _t;},_play:function(_4ae){var _t=this;_t._startTime=new Date().valueOf();if(_t._paused){_t._startTime-=_t.duration*_t._percent;}_t._endTime=_t._startTime+_t.duration;_t._active=true;_t._paused=false;var _4b0=_t.curve.getValue(_t._percent);if(!_t._percent){if(!_t._startRepeatCount){_t._startRepeatCount=_t.repeat;}_t._fire("onBegin",[_4b0]);}_t._fire("onPlay",[_4b0]);_t._cycle();return _t;},pause:function(){this._stopTimer();if(!this._active){return this;}this._paused=true;this._fire("onPause",[this.curve.getValue(this._percent)]);return this;},gotoPercent:function(_4b1,_4b2){this._stopTimer();this._active=this._paused=true;this._percent=_4b1;if(_4b2){this.play();}return this;},stop:function(_4b3){if(!this._timer){return this;}this._stopTimer();if(_4b3){this._percent=1;}this._fire("onStop",[this.curve.getValue(this._percent)]);this._active=this._paused=false;return this;},status:function(){if(this._active){return this._paused?"paused":"playing";}return "stopped";},_cycle:function(){var _t=this;if(_t._active){var curr=new Date().valueOf();var step=(curr-_t._startTime)/(_t._endTime-_t._startTime);if(step>=1){step=1;}_t._percent=step;if(_t.easing){step=_t.easing(step);}_t._fire("onAnimate",[_t.curve.getValue(step)]);if(_t._percent<1){_t._startTimer();}else{_t._active=false;if(_t.repeat>0){_t.repeat--;_t.play(null,true);}else{if(_t.repeat==-1){_t.play(null,true);}else{if(_t._startRepeatCount){_t.repeat=_t._startRepeatCount;_t._startRepeatCount=0;}}}_t._percent=0;_t._fire("onEnd");_t._stopTimer();}}return _t;}});var ctr=0;var _4b8=[];var _4b9={run:function(){}};var _4ba=null;dojo._Animation.prototype._startTimer=function(){if(!this._timer){this._timer=d.connect(_4b9,"run",this,"_cycle");ctr++;}if(!_4ba){_4ba=setInterval(d.hitch(_4b9,"run"),this.rate);}};dojo._Animation.prototype._stopTimer=function(){if(this._timer){d.disconnect(this._timer);this._timer=null;ctr--;}if(ctr<=0){clearInterval(_4ba);_4ba=null;ctr=0;}};var _4bb=(d.isIE)?function(node){var ns=node.style;if(!ns.zoom.length&&d.style(node,"zoom")=="normal"){ns.zoom="1";}if(!ns.width.length&&d.style(node,"width")=="auto"){ns.width="auto";}}:function(){};dojo._fade=function(args){args.node=d.byId(args.node);var _4bf=d.mixin({properties:{}},args);var _4c0=(_4bf.properties.opacity={});_4c0.start=!("start" in _4bf)?function(){return Number(d.style(_4bf.node,"opacity"));}:_4bf.start;_4c0.end=_4bf.end;var anim=d.animateProperty(_4bf);d.connect(anim,"beforeBegin",d.partial(_4bb,_4bf.node));return anim;};dojo.fadeIn=function(args){return d._fade(d.mixin({end:1},args));};dojo.fadeOut=function(args){return d._fade(d.mixin({end:0},args));};dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2);};var _4c5=function(_4c6){this._properties=_4c6;for(var p in _4c6){var prop=_4c6[p];if(prop.start instanceof d.Color){prop.tempColor=new d.Color();}}this.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p];var _4cd=prop.start;if(_4cd instanceof d.Color){ret[p]=d.blendColors(_4cd,prop.end,r,prop.tempColor).toCss();}else{if(!d.isArray(_4cd)){ret[p]=((prop.end-_4cd)*r)+_4cd+(p!="opacity"?prop.units||"px":"");}}}return ret;};};dojo.animateProperty=function(args){args.node=d.byId(args.node);if(!args.easing){args.easing=d._defaultEasing;}var anim=new d._Animation(args);d.connect(anim,"beforeBegin",anim,function(){var pm={};for(var p in this.properties){if(p=="width"||p=="height"){this.node.display="block";}var prop=this.properties[p];prop=pm[p]=d.mixin({},(d.isObject(prop)?prop:{end:prop}));if(d.isFunction(prop.start)){prop.start=prop.start();}if(d.isFunction(prop.end)){prop.end=prop.end();}var _4d3=(p.toLowerCase().indexOf("color")>=0);function getStyle(node,p){var v=({height:node.offsetHeight,width:node.offsetWidth})[p];if(v!==undefined){return v;}v=d.style(node,p);return (p=="opacity")?Number(v):(_4d3?v:parseFloat(v));};if(!("end" in prop)){prop.end=getStyle(this.node,p);}else{if(!("start" in prop)){prop.start=getStyle(this.node,p);}}if(_4d3){prop.start=new d.Color(prop.start);prop.end=new d.Color(prop.end);}else{prop.start=(p=="opacity")?Number(prop.start):parseFloat(prop.start);}}this.curve=new _4c5(pm);});d.connect(anim,"onAnimate",anim,function(_4d7){for(var s in _4d7){d.style(this.node,s,_4d7[s]);}});return anim;};dojo.anim=function(node,_4da,_4db,_4dc,_4dd,_4de){return d.animateProperty({node:node,duration:_4db||d._Animation.prototype.duration,properties:_4da,easing:_4dc,onEnd:_4dd}).play(_4de||0);};})();}if(!dojo._hasResource["dojo._base.browser"]){dojo._hasResource["dojo._base.browser"]=true;dojo.provide("dojo._base.browser");if(dojo.config.require){dojo.forEach(dojo.config.require,"dojo['require'](item);");}}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_4df,_4e0,_4e1){_4e1=dojo.i18n.normalizeLocale(_4e1);var _4e2=_4e1.split("-");var _4e3=[_4df,"nls",_4e0].join(".");var _4e4=dojo._loadedModules[_4e3];if(_4e4){var _4e5;for(var i=_4e2.length;i>0;i--){var loc=_4e2.slice(0,i).join("_");if(_4e4[loc]){_4e5=_4e4[loc];break;}}if(!_4e5){_4e5=_4e4.ROOT;}if(_4e5){var _4e8=function(){};_4e8.prototype=_4e5;return new _4e8();}}throw new Error("Bundle not found: "+_4e0+" in "+_4df+" , locale="+_4e1);};dojo.i18n.normalizeLocale=function(_4e9){var _4ea=_4e9?_4e9.toLowerCase():dojo.locale;if(_4ea=="root"){_4ea="ROOT";}return _4ea;};dojo.i18n._requireLocalization=function(_4eb,_4ec,_4ed,_4ee){var _4ef=dojo.i18n.normalizeLocale(_4ed);var _4f0=[_4eb,"nls",_4ec].join(".");var _4f1="";if(_4ee){var _4f2=_4ee.split(",");for(var i=0;i<_4f2.length;i++){if(_4ef.indexOf(_4f2[i])==0){if(_4f2[i].length>_4f1.length){_4f1=_4f2[i];}}}if(!_4f1){_4f1="ROOT";}}var _4f4=_4ee?_4f1:_4ef;var _4f5=dojo._loadedModules[_4f0];var _4f6=null;if(_4f5){if(dojo.config.localizationComplete&&_4f5._built){return;}var _4f7=_4f4.replace(/-/g,"_");var _4f8=_4f0+"."+_4f7;_4f6=dojo._loadedModules[_4f8];}if(!_4f6){_4f5=dojo["provide"](_4f0);var syms=dojo._getModuleSymbols(_4eb);var _4fa=syms.concat("nls").join("/");var _4fb;dojo.i18n._searchLocalePath(_4f4,_4ee,function(loc){var _4fd=loc.replace(/-/g,"_");var _4fe=_4f0+"."+_4fd;var _4ff=false;if(!dojo._loadedModules[_4fe]){dojo["provide"](_4fe);var _500=[_4fa];if(loc!="ROOT"){_500.push(loc);}_500.push(_4ec);var _501=_500.join("/")+".js";_4ff=dojo._loadPath(_501,null,function(hash){var _503=function(){};_503.prototype=_4fb;_4f5[_4fd]=new _503();for(var j in hash){_4f5[_4fd][j]=hash[j];}});}else{_4ff=true;}if(_4ff&&_4f5[_4fd]){_4fb=_4f5[_4fd];}else{_4f5[_4fd]=_4fb;}if(_4ee){return true;}});}if(_4ee&&_4ef!=_4f1){_4f5[_4ef.replace(/-/g,"_")]=_4f5[_4f1.replace(/-/g,"_")];}};(function(){var _505=dojo.config.extraLocale;if(_505){if(!_505 instanceof Array){_505=[_505];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_509,_50a){req(m,b,_509,_50a);if(_509){return;}for(var i=0;i<_505.length;i++){req(m,b,_505[i],_50a);}};}})();dojo.i18n._searchLocalePath=function(_50c,down,_50e){_50c=dojo.i18n.normalizeLocale(_50c);var _50f=_50c.split("-");var _510=[];for(var i=_50f.length;i>0;i--){_510.push(_50f.slice(0,i).join("-"));}_510.push(false);if(down){_510.reverse();}for(var j=_510.length-1;j>=0;j--){var loc=_510[j]||"ROOT";var stop=_50e(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_515,_516){function preload(_517){_517=dojo.i18n.normalizeLocale(_517);dojo.i18n._searchLocalePath(_517,true,function(loc){for(var i=0;i<_516.length;i++){if(_516[i]==loc){dojo["require"](_515+"_"+loc);return true;}}return false;});};preload();var _51a=dojo.config.extraLocale||[];for(var i=0;i<_51a.length;i++){preload(_51a[i]);}};}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.pad=function(text,size,ch,end){var out=String(text);if(!ch){ch="0";}while(out.length<size){if(end){out+=ch;}else{out=ch+out;}}return out;};dojo.string.substitute=function(_521,map,_523,_524){return _521.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_525,key,_527){var _528=dojo.getObject(key,false,map);if(_527){_528=dojo.getObject(_527,false,_524)(_528);}if(_523){_528=_523(_528,key);}return _528.toString();});};dojo.string.trim=function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.regexp.escapeString=function(str,_52c){return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){if(_52c&&_52c.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_530){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i<arr.length;i++){b.push(re(arr[i]));}return dojo.regexp.group(b.join("|"),_530);};dojo.regexp.group=function(_533,_534){return "("+(_534?"?:":"")+_533+")";};}if(!dojo._hasResource["dojo.number"]){dojo._hasResource["dojo.number"]=true;dojo.provide("dojo.number");dojo.number.format=function(_535,_536){_536=dojo.mixin({},_536||{});var _537=dojo.i18n.normalizeLocale(_536.locale);var _538=dojo.i18n.getLocalization("dojo.cldr","number",_537);_536.customs=_538;var _539=_536.pattern||_538[(_536.type||"decimal")+"Format"];if(isNaN(_535)){return null;}return dojo.number._applyPattern(_535,_539,_536);};dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;dojo.number._applyPattern=function(_53a,_53b,_53c){_53c=_53c||{};var _53d=_53c.customs.group;var _53e=_53c.customs.decimal;var _53f=_53b.split(";");var _540=_53f[0];_53b=_53f[(_53a<0)?1:0]||("-"+_540);if(_53b.indexOf("%")!=-1){_53a*=100;}else{if(_53b.indexOf("‰")!=-1){_53a*=1000;}else{if(_53b.indexOf("¤")!=-1){_53d=_53c.customs.currencyGroup||_53d;_53e=_53c.customs.currencyDecimal||_53e;_53b=_53b.replace(/\u00a4{1,3}/,function(_541){var prop=["symbol","currency","displayName"][_541.length-1];return _53c[prop]||_53c.currency||"";});}else{if(_53b.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _543=dojo.number._numberPatternRE;var _544=_540.match(_543);if(!_544){throw new Error("unable to find a number expression in pattern: "+_53b);}return _53b.replace(_543,dojo.number._formatAbsolute(_53a,_544[0],{decimal:_53e,group:_53d,places:_53c.places}));};dojo.number.round=function(_545,_546,_547){var _548=String(_545).split(".");var _549=(_548[1]&&_548[1].length)||0;if(_549>_546){var _54a=Math.pow(10,_546);if(_547>0){_54a*=10/_547;_546++;}_545=Math.round(_545*_54a)/_54a;_548=String(_545).split(".");_549=(_548[1]&&_548[1].length)||0;if(_549>_546){_548[1]=_548[1].substr(0,_546);_545=Number(_548.join("."));}}return _545;};dojo.number._formatAbsolute=function(_54b,_54c,_54d){_54d=_54d||{};if(_54d.places===true){_54d.places=0;}if(_54d.places===Infinity){_54d.places=6;}var _54e=_54c.split(".");var _54f=(_54d.places>=0)?_54d.places:(_54e[1]&&_54e[1].length)||0;if(!(_54d.round<0)){_54b=dojo.number.round(_54b,_54f,_54d.round);}var _550=String(Math.abs(_54b)).split(".");var _551=_550[1]||"";if(_54d.places){_550[1]=dojo.string.pad(_551.substr(0,_54d.places),_54d.places,"0",true);}else{if(_54e[1]&&_54d.places!==0){var pad=_54e[1].lastIndexOf("0")+1;if(pad>_551.length){_550[1]=dojo.string.pad(_551,pad,"0",true);}var _553=_54e[1].length;if(_553<_551.length){_550[1]=_551.substr(0,_553);}}else{if(_550[1]){_550.pop();}}}var _554=_54e[0].replace(",","");pad=_554.indexOf("0");if(pad!=-1){pad=_554.length-pad;if(pad>_550[0].length){_550[0]=dojo.string.pad(_550[0],pad);}if(_554.indexOf("#")==-1){_550[0]=_550[0].substr(_550[0].length-pad);}}var _555=_54e[0].lastIndexOf(",");var _556,_557;if(_555!=-1){_556=_54e[0].length-_555-1;var _558=_54e[0].substr(0,_555);_555=_558.lastIndexOf(",");if(_555!=-1){_557=_558.length-_555-1;}}var _559=[];for(var _55a=_550[0];_55a;){var off=_55a.length-_556;_559.push((off>0)?_55a.substr(off):_55a);_55a=(off>0)?_55a.slice(0,off):"";if(_557){_556=_557;delete _557;}}_550[0]=_559.reverse().join(_54d.group||",");return _550.join(_54d.decimal||".");};dojo.number.regexp=function(_55c){return dojo.number._parseInfo(_55c).regexp;};dojo.number._parseInfo=function(_55d){_55d=_55d||{};var _55e=dojo.i18n.normalizeLocale(_55d.locale);var _55f=dojo.i18n.getLocalization("dojo.cldr","number",_55e);var _560=_55d.pattern||_55f[(_55d.type||"decimal")+"Format"];var _561=_55f.group;var _562=_55f.decimal;var _563=1;if(_560.indexOf("%")!=-1){_563/=100;}else{if(_560.indexOf("‰")!=-1){_563/=1000;}else{var _564=_560.indexOf("¤")!=-1;if(_564){_561=_55f.currencyGroup||_561;_562=_55f.currencyDecimal||_562;}}}var _565=_560.split(";");if(_565.length==1){_565.push("-"+_565[0]);}var re=dojo.regexp.buildGroupRE(_565,function(_567){_567="(?:"+dojo.regexp.escapeString(_567,".")+")";return _567.replace(dojo.number._numberPatternRE,function(_568){var _569={signed:false,separator:_55d.strict?_561:[_561,""],fractional:_55d.fractional,decimal:_562,exponent:false};var _56a=_568.split(".");var _56b=_55d.places;if(_56a.length==1||_56b===0){_569.fractional=false;}else{if(_56b===undefined){_56b=_56a[1].lastIndexOf("0")+1;}if(_56b&&_55d.fractional==undefined){_569.fractional=true;}if(!_55d.places&&(_56b<_56a[1].length)){_56b+=","+_56a[1].length;}_569.places=_56b;}var _56c=_56a[0].split(",");if(_56c.length>1){_569.groupSize=_56c.pop().length;if(_56c.length>1){_569.groupSize2=_56c.pop().length;}}return "("+dojo.number._realNumberRegexp(_569)+")";});},true);if(_564){re=re.replace(/(\s*)(\u00a4{1,3})(\s*)/g,function(_56d,_56e,_56f,_570){var prop=["symbol","currency","displayName"][_56f.length-1];var _572=dojo.regexp.escapeString(_55d[prop]||_55d.currency||"");_56e=_56e?"\\s":"";_570=_570?"\\s":"";if(!_55d.strict){if(_56e){_56e+="*";}if(_570){_570+="*";}return "(?:"+_56e+_572+_570+")?";}return _56e+_572+_570;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_561,decimal:_562,factor:_563};};dojo.number.parse=function(_573,_574){var info=dojo.number._parseInfo(_574);var _576=(new RegExp("^"+info.regexp+"$")).exec(_573);if(!_576){return NaN;}var _577=_576[1];if(!_576[1]){if(!_576[2]){return NaN;}_577=_576[2];info.factor*=-1;}_577=_577.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return Number(_577)*info.factor;};dojo.number._realNumberRegexp=function(_578){_578=_578||{};if(!("places" in _578)){_578.places=Infinity;}if(typeof _578.decimal!="string"){_578.decimal=".";}if(!("fractional" in _578)||/^0/.test(_578.places)){_578.fractional=[true,false];}if(!("exponent" in _578)){_578.exponent=[true,false];}if(!("eSigned" in _578)){_578.eSigned=[true,false];}var _579=dojo.number._integerRegexp(_578);var _57a=dojo.regexp.buildGroupRE(_578.fractional,function(q){var re="";if(q&&(_578.places!==0)){re="\\"+_578.decimal;if(_578.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_578.places+"}";}}return re;},true);var _57d=dojo.regexp.buildGroupRE(_578.exponent,function(q){if(q){return "([eE]"+dojo.number._integerRegexp({signed:_578.eSigned})+")";}return "";});var _57f=_579+_57a;if(_57a){_57f="(?:(?:"+_57f+")|(?:"+_57a+"))";}return _57f+_57d;};dojo.number._integerRegexp=function(_580){_580=_580||{};if(!("signed" in _580)){_580.signed=[true,false];}if(!("separator" in _580)){_580.separator="";}else{if(!("groupSize" in _580)){_580.groupSize=3;}}var _581=dojo.regexp.buildGroupRE(_580.signed,function(q){return q?"[-+]":"";},true);var _583=dojo.regexp.buildGroupRE(_580.separator,function(sep){if(!sep){return "(?:0|[1-9]\\d*)";}sep=dojo.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_580.groupSize,grp2=_580.groupSize2;if(grp2){var _587="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_587+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_587;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _581+_583;};}if(!dojo._hasResource["dojo.date"]){dojo._hasResource["dojo.date"]=true;dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(_588){var _589=_588.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_589==1&&dojo.date.isLeapYear(_588)){return 29;}return days[_589];};dojo.date.isLeapYear=function(_58b){var year=_58b.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};dojo.date.getTimezoneName=function(_58d){var str=_58d.toString();var tz="";var _590;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_590=str.match(pat))){tz=_590[1];}else{str=_58d.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_590=str.match(pat))){tz=_590[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};dojo.date.compare=function(_593,_594,_595){_593=new Date(Number(_593));_594=new Date(Number(_594||new Date()));if(_595!=="undefined"){if(_595=="date"){_593.setHours(0,0,0,0);_594.setHours(0,0,0,0);}else{if(_595=="time"){_593.setFullYear(0,0,0);_594.setFullYear(0,0,0);}}}if(_593>_594){return 1;}if(_593<_594){return -1;}return 0;};dojo.date.add=function(date,_597,_598){var sum=new Date(Number(date));var _59a=false;var _59b="Date";switch(_597){case "day":break;case "weekday":var days,_59d;var mod=_598%5;if(!mod){days=(_598>0)?5:-5;_59d=(_598>0)?((_598-5)/5):((_598+5)/5);}else{days=mod;_59d=parseInt(_598/5);}var strt=date.getDay();var adj=0;if(strt==6&&_598>0){adj=1;}else{if(strt==0&&_598<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_598>0)?2:-2;}_598=(7*_59d)+days+adj;break;case "year":_59b="FullYear";_59a=true;break;case "week":_598*=7;break;case "quarter":_598*=3;case "month":_59a=true;_59b="Month";break;case "hour":case "minute":case "second":case "millisecond":_59b="UTC"+_597.charAt(0).toUpperCase()+_597.substring(1)+"s";}if(_59b){sum["set"+_59b](sum["get"+_59b]()+_598);}if(_59a&&(sum.getDate()<date.getDate())){sum.setDate(0);}return sum;};dojo.date.difference=function(_5a2,_5a3,_5a4){_5a3=_5a3||new Date();_5a4=_5a4||"day";var _5a5=_5a3.getFullYear()-_5a2.getFullYear();var _5a6=1;switch(_5a4){case "quarter":var m1=_5a2.getMonth();var m2=_5a3.getMonth();var q1=Math.floor(m1/3)+1;var q2=Math.floor(m2/3)+1;q2+=(_5a5*4);_5a6=q2-q1;break;case "weekday":var days=Math.round(dojo.date.difference(_5a2,_5a3,"day"));var _5ac=parseInt(dojo.date.difference(_5a2,_5a3,"week"));var mod=days%7;if(mod==0){days=_5ac*5;}else{var adj=0;var aDay=_5a2.getDay();var bDay=_5a3.getDay();_5ac=parseInt(days/7);mod=days%7;var _5b1=new Date(_5a2);_5b1.setDate(_5b1.getDate()+(_5ac*7));var _5b2=_5b1.getDay();if(days>0){switch(true){case aDay==6:adj=-1;break;case aDay==0:adj=0;break;case bDay==6:adj=-1;break;case bDay==0:adj=-2;break;case (_5b2+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==6:adj=0;break;case aDay==0:adj=1;break;case bDay==6:adj=2;break;case bDay==0:adj=1;break;case (_5b2+mod)<0:adj=2;}}}days+=adj;days-=(_5ac*2);}_5a6=days;break;case "year":_5a6=_5a5;break;case "month":_5a6=(_5a3.getMonth()-_5a2.getMonth())+(_5a5*12);break;case "week":_5a6=parseInt(dojo.date.difference(_5a2,_5a3,"day")/7);break;case "day":_5a6/=24;case "hour":_5a6/=60;case "minute":_5a6/=60;case "second":_5a6/=1000;case "millisecond":_5a6*=_5a3.getTime()-_5a2.getTime();}return Math.round(_5a6);};}if(!dojo._hasResource["dojo.cldr.supplemental"]){dojo._hasResource["dojo.cldr.supplemental"]=true;dojo.provide("dojo.cldr.supplemental");dojo.cldr.supplemental.getFirstDayOfWeek=function(_5b3){var _5b4={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,sy:4};var _5b5=dojo.cldr.supplemental._region(_5b3);var dow=_5b4[_5b5];return (dow===undefined)?1:dow;};dojo.cldr.supplemental._region=function(_5b7){_5b7=dojo.i18n.normalizeLocale(_5b7);var tags=_5b7.split("-");var _5b9=tags[1];if(!_5b9){_5b9={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[tags[0]];}else{if(_5b9.length==4){_5b9=tags[2];}}return _5b9;};dojo.cldr.supplemental.getWeekend=function(_5ba){var _5bb={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};var _5bc={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};var _5bd=dojo.cldr.supplemental._region(_5ba);var _5be=_5bb[_5bd];var end=_5bc[_5bd];if(_5be===undefined){_5be=6;}if(end===undefined){end=0;}return {start:_5be,end:end};};}if(!dojo._hasResource["dojo.date.locale"]){dojo._hasResource["dojo.date.locale"]=true;dojo.provide("dojo.date.locale");(function(){function formatPattern(_5c0,_5c1,_5c2,_5c3){return _5c3.replace(/([a-z])\1*/ig,function(_5c4){var s,pad;var c=_5c4.charAt(0);var l=_5c4.length;var _5c9=["abbr","wide","narrow"];switch(c){case "G":s=_5c1[(l<4)?"eraAbbr":"eraNames"][_5c0.getFullYear()<0?0:1];break;case "y":s=_5c0.getFullYear();switch(l){case 1:break;case 2:if(!_5c2){s=String(s);s=s.substr(s.length-2);break;}default:pad=true;}break;case "Q":case "q":s=Math.ceil((_5c0.getMonth()+1)/3);pad=true;break;case "M":case "L":var m=_5c0.getMonth();var _5cb;switch(l){case 1:case 2:s=m+1;pad=true;break;case 3:case 4:case 5:_5cb=_5c9[l-3];break;}if(_5cb){var _5cc=(c=="L")?"standalone":"format";var _5cd=["months",_5cc,_5cb].join("-");s=_5c1[_5cd][m];}break;case "w":var _5ce=0;s=dojo.date.locale._getWeekOfYear(_5c0,_5ce);pad=true;break;case "d":s=_5c0.getDate();pad=true;break;case "D":s=dojo.date.locale._getDayOfYear(_5c0);pad=true;break;case "E":case "e":case "c":var d=_5c0.getDay();var _5d0;switch(l){case 1:case 2:if(c=="e"){var _5d1=dojo.cldr.supplemental.getFirstDayOfWeek(options.locale);d=(d-_5d1+7)%7;}if(c!="c"){s=d+1;pad=true;break;}case 3:case 4:case 5:_5d0=_5c9[l-3];break;}if(_5d0){var _5d2=(c=="c")?"standalone":"format";var _5d3=["days",_5d2,_5d0].join("-");s=_5c1[_5d3][d];}break;case "a":var _5d4=(_5c0.getHours()<12)?"am":"pm";s=_5c1[_5d4];break;case "h":case "H":case "K":case "k":var h=_5c0.getHours();switch(c){case "h":s=(h%12)||12;break;case "H":s=h;break;case "K":s=(h%12);break;case "k":s=h||24;break;}pad=true;break;case "m":s=_5c0.getMinutes();pad=true;break;case "s":s=_5c0.getSeconds();pad=true;break;case "S":s=Math.round(_5c0.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case "v":case "z":s=dojo.date.getTimezoneName(_5c0);if(s){break;}l=4;case "Z":var _5d6=_5c0.getTimezoneOffset();var tz=[(_5d6<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_5d6)/60),2),dojo.string.pad(Math.abs(_5d6)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+_5c3);}if(pad){s=dojo.string.pad(s,l);}return s;});};dojo.date.locale.format=function(_5d8,_5d9){_5d9=_5d9||{};var _5da=dojo.i18n.normalizeLocale(_5d9.locale);var _5db=_5d9.formatLength||"short";var _5dc=dojo.date.locale._getGregorianBundle(_5da);var str=[];var _5de=dojo.hitch(this,formatPattern,_5d8,_5dc,_5d9.fullYear);if(_5d9.selector=="year"){var year=_5d8.getFullYear();if(_5da.match(/^zh|^ja/)){year+="年";}return year;}if(_5d9.selector!="time"){var _5e0=_5d9.datePattern||_5dc["dateFormat-"+_5db];if(_5e0){str.push(_processPattern(_5e0,_5de));}}if(_5d9.selector!="date"){var _5e1=_5d9.timePattern||_5dc["timeFormat-"+_5db];if(_5e1){str.push(_processPattern(_5e1,_5de));}}var _5e2=str.join(" ");return _5e2;};dojo.date.locale.regexp=function(_5e3){return dojo.date.locale._parseInfo(_5e3).regexp;};dojo.date.locale._parseInfo=function(_5e4){_5e4=_5e4||{};var _5e5=dojo.i18n.normalizeLocale(_5e4.locale);var _5e6=dojo.date.locale._getGregorianBundle(_5e5);var _5e7=_5e4.formatLength||"short";var _5e8=_5e4.datePattern||_5e6["dateFormat-"+_5e7];var _5e9=_5e4.timePattern||_5e6["timeFormat-"+_5e7];var _5ea;if(_5e4.selector=="date"){_5ea=_5e8;}else{if(_5e4.selector=="time"){_5ea=_5e9;}else{_5ea=_5e8+" "+_5e9;}}var _5eb=[];var re=_processPattern(_5ea,dojo.hitch(this,_buildDateTimeRE,_5eb,_5e6,_5e4));return {regexp:re,tokens:_5eb,bundle:_5e6};};dojo.date.locale.parse=function(_5ed,_5ee){var info=dojo.date.locale._parseInfo(_5ee);var _5f0=info.tokens,_5f1=info.bundle;var re=new RegExp("^"+info.regexp+"$");var _5f3=re.exec(_5ed);if(!_5f3){return null;}var _5f4=["abbr","wide","narrow"];var _5f5=[1970,0,1,0,0,0,0];var amPm="";var _5f7=dojo.every(_5f3,function(v,i){if(!i){return true;}var _5fa=_5f0[i-1];var l=_5fa.length;switch(_5fa.charAt(0)){case "y":if(l!=2&&_5ee.strict){_5f5[0]=v;}else{if(v<100){v=Number(v);var year=""+new Date().getFullYear();var _5fd=year.substring(0,2)*100;var _5fe=Math.min(Number(year.substring(2,4))+20,99);var num=(v<_5fe)?_5fd+v:_5fd-100+v;_5f5[0]=num;}else{if(_5ee.strict){return false;}_5f5[0]=v;}}break;case "M":if(l>2){var _600=_5f1["months-format-"+_5f4[l-3]].concat();if(!_5ee.strict){v=v.replace(".","").toLowerCase();_600=dojo.map(_600,function(s){return s.replace(".","").toLowerCase();});}v=dojo.indexOf(_600,v);if(v==-1){return false;}}else{v--;}_5f5[1]=v;break;case "E":case "e":var days=_5f1["days-format-"+_5f4[l-3]].concat();if(!_5ee.strict){v=v.toLowerCase();days=dojo.map(days,function(d){return d.toLowerCase();});}v=dojo.indexOf(days,v);if(v==-1){return false;}break;case "D":_5f5[1]=0;case "d":_5f5[2]=v;break;case "a":var am=_5ee.am||_5f1.am;var pm=_5ee.pm||_5f1.pm;if(!_5ee.strict){var _606=/\./g;v=v.replace(_606,"").toLowerCase();am=am.replace(_606,"").toLowerCase();pm=pm.replace(_606,"").toLowerCase();}if(_5ee.strict&&v!=am&&v!=pm){return false;}amPm=(v==pm)?"p":(v==am)?"a":"";break;case "K":if(v==24){v=0;}case "h":case "H":case "k":if(v>23){return false;}_5f5[3]=v;break;case "m":_5f5[4]=v;break;case "s":_5f5[5]=v;break;case "S":_5f5[6]=v;}return true;});var _607=+_5f5[3];if(amPm==="p"&&_607<12){_5f5[3]=_607+12;}else{if(amPm==="a"&&_607==12){_5f5[3]=0;}}var _608=new Date(_5f5[0],_5f5[1],_5f5[2],_5f5[3],_5f5[4],_5f5[5],_5f5[6]);if(_5ee.strict){_608.setFullYear(_5f5[0]);}var _609=_5f0.join("");if(!_5f7||(_609.indexOf("M")!=-1&&_608.getMonth()!=_5f5[1])||(_609.indexOf("d")!=-1&&_608.getDate()!=_5f5[2])){return null;}return _608;};function _processPattern(_60a,_60b,_60c,_60d){var _60e=function(x){return x;};_60b=_60b||_60e;_60c=_60c||_60e;_60d=_60d||_60e;var _610=_60a.match(/(''|[^'])+/g);var _611=false;dojo.forEach(_610,function(_612,i){if(!_612){_610[i]="";}else{_610[i]=(_611?_60c:_60b)(_612);_611=!_611;}});return _60d(_610.join(""));};function _buildDateTimeRE(_614,_615,_616,_617){_617=dojo.regexp.escapeString(_617);if(!_616.strict){_617=_617.replace(" a"," ?a");}return _617.replace(/([a-z])\1*/ig,function(_618){var s;var c=_618.charAt(0);var l=_618.length;var p2="",p3="";if(_616.strict){if(l>1){p2="0"+"{"+(l-1)+"}";}if(l>2){p3="0"+"{"+(l-2)+"}";}}else{p2="0?";p3="0{0,2}";}switch(c){case "y":s="\\d{2,4}";break;case "M":s=(l>2)?"\\S+":p2+"[1-9]|1[0-2]";break;case "D":s=p2+"[1-9]|"+p3+"[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6]";break;case "d":s=p2+"[1-9]|[12]\\d|3[01]";break;case "w":s=p2+"[1-9]|[1-4][0-9]|5[0-3]";break;case "E":s="\\S+";break;case "h":s=p2+"[1-9]|1[0-2]";break;case "k":s=p2+"\\d|1[01]";break;case "H":s=p2+"\\d|1\\d|2[0-3]";break;case "K":s=p2+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":s="[0-5]\\d";break;case "S":s="\\d{"+l+"}";break;case "a":var am=_616.am||_615.am||"AM";var pm=_616.pm||_615.pm||"PM";if(_616.strict){s=am+"|"+pm;}else{s=am+"|"+pm;if(am!=am.toLowerCase()){s+="|"+am.toLowerCase();}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase();}}break;default:s=".*";}if(_614){_614.push(_618);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};})();(function(){var _620=[];dojo.date.locale.addCustomFormats=function(_621,_622){_620.push({pkg:_621,name:_622});};dojo.date.locale._getGregorianBundle=function(_623){var _624={};dojo.forEach(_620,function(desc){var _626=dojo.i18n.getLocalization(desc.pkg,desc.name,_623);_624=dojo.mixin(_624,_626);},this);return _624;};})();dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");dojo.date.locale.getNames=function(item,type,use,_62a){var _62b;var _62c=dojo.date.locale._getGregorianBundle(_62a);var _62d=[item,use,type];if(use=="standAlone"){_62b=_62c[_62d.join("-")];}_62d[1]="format";return (_62b||_62c[_62d.join("-")]).concat();};dojo.date.locale.isWeekend=function(_62e,_62f){var _630=dojo.cldr.supplemental.getWeekend(_62f);var day=(_62e||new Date()).getDay();if(_630.end<_630.start){_630.end+=7;if(day<_630.start){day+=7;}}return day>=_630.start&&day<=_630.end;};dojo.date.locale._getDayOfYear=function(_632){return dojo.date.difference(new Date(_632.getFullYear(),0,1),_632)+1;};dojo.date.locale._getWeekOfYear=function(_633,_634){if(arguments.length==1){_634=0;}var _635=new Date(_633.getFullYear(),0,1).getDay();var adj=(_635-_634+7)%7;var week=Math.floor((dojo.date.locale._getDayOfYear(_633)+adj-1)/7);if(_635==_634){week++;}return week;};}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_638,_639){if(!dojo.date.stamp._isoRegExp){dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _63a=dojo.date.stamp._isoRegExp.exec(_638);var _63b=null;if(_63a){_63a.shift();if(_63a[1]){_63a[1]--;}if(_63a[6]){_63a[6]*=1000;}if(_639){_639=new Date(_639);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _639["get"+prop]();}).forEach(function(_63d,_63e){if(_63a[_63e]===undefined){_63a[_63e]=_63d;}});}_63b=new Date(_63a[0]||1970,_63a[1]||0,_63a[2]||1,_63a[3]||0,_63a[4]||0,_63a[5]||0,_63a[6]||0);var _63f=0;var _640=_63a[7]&&_63a[7].charAt(0);if(_640!="Z"){_63f=((_63a[8]||0)*60)+(Number(_63a[9])||0);if(_640!="-"){_63f*=-1;}}if(_640){_63f-=_63b.getTimezoneOffset();}if(_63f){_63b.setTime(_63b.getTime()+_63f*60000);}}return _63b;};dojo.date.stamp.toISOString=function(_641,_642){var _=function(n){return (n<10)?"0"+n:n;};_642=_642||{};var _645=[];var _646=_642.zulu?"getUTC":"get";var date="";if(_642.selector!="time"){var year=_641[_646+"FullYear"]();date=["0000".substr((year+"").length)+year,_(_641[_646+"Month"]()+1),_(_641[_646+"Date"]())].join("-");}_645.push(date);if(_642.selector!="date"){var time=[_(_641[_646+"Hours"]()),_(_641[_646+"Minutes"]()),_(_641[_646+"Seconds"]())].join(":");var _64a=_641[_646+"Milliseconds"]();if(_642.milliseconds){time+="."+(_64a<100?"0":"")+_(_64a);}if(_642.zulu){time+="Z";}else{if(_642.selector!="time"){var _64b=_641.getTimezoneOffset();var _64c=Math.abs(_64b);time+=(_64b>0?"-":"+")+_(Math.floor(_64c/60))+":"+_(_64c%60);}}_645.push(time);}return _645.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;var _64e=d._scopeName+"Type";var qry="["+_64e+"]";function val2type(_650){if(d.isString(_650)){return "string";}if(typeof _650=="number"){return "number";}if(typeof _650=="boolean"){return "boolean";}if(d.isFunction(_650)){return "function";}if(d.isArray(_650)){return "array";}if(_650 instanceof Date){return "date";}if(_650 instanceof d._Url){return "url";}return "object";};function str2obj(_651,type){switch(type){case "string":return _651;case "number":return _651.length?Number(_651):NaN;case "boolean":return typeof _651=="boolean"?_651:!(_651.toLowerCase()=="false");case "function":if(d.isFunction(_651)){_651=_651.toString();_651=d.trim(_651.substring(_651.indexOf("{")+1,_651.length-1));}try{if(_651.search(/[^\w\.]+/i)!=-1){_651=d.parser._nameAnonFunc(new Function(_651),this);}return d.getObject(_651,false);}catch(e){return new Function();}case "array":return _651.split(/\s*,\s*/);case "date":switch(_651){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_651);}case "url":return d.baseUrl+_651;default:return d.fromJson(_651);}};var _653={};function getClassInfo(_654){if(!_653[_654]){var cls=d.getObject(_654);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_654+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _656=cls.prototype;var _657={};for(var name in _656){if(name.charAt(0)=="_"){continue;}var _659=_656[name];_657[name]=val2type(_659);}_653[_654]={cls:cls,params:_657};}return _653[_654];};this._functionFromScript=function(_65a){var _65b="";var _65c="";var _65d=_65a.getAttribute("args");if(_65d){d.forEach(_65d.split(/\s*,\s*/),function(part,idx){_65b+="var "+part+" = arguments["+idx+"]; ";});}var _660=_65a.getAttribute("with");if(_660&&_660.length){d.forEach(_660.split(/\s*,\s*/),function(part){_65b+="with("+part+"){";_65c+="}";});}return new Function(_65b+_65a.innerHTML+_65c);};this.instantiate=function(_662){var _663=[];d.forEach(_662,function(node){if(!node){return;}var type=node.getAttribute(_64e);if((!type)||(!type.length)){return;}var _666=getClassInfo(type);var _667=_666.cls;var ps=_667._noScript||_667.prototype._noScript;var _669={};var _66a=node.attributes;for(var name in _666.params){var item=_66a.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _66d=item.value;switch(name){case "class":_66d=node.className;break;case "style":_66d=node.style&&node.style.cssText;}var _66e=_666.params[name];_669[name]=str2obj(_66d,_66e);}if(!ps){var _66f=[],_670=[];d.query("> script[type^='dojo/']",node).orphan().forEach(function(_671){var _672=_671.getAttribute("event"),type=_671.getAttribute("type"),nf=d.parser._functionFromScript(_671);if(_672){if(type=="dojo/connect"){_66f.push({event:_672,func:nf});}else{_669[_672]=nf;}}else{_670.push(nf);}});}var _674=_667["markupFactory"];if(!_674&&_667["prototype"]){_674=_667.prototype["markupFactory"];}var _675=_674?_674(_669,node,_667):new _667(_669,node);_663.push(_675);var _676=node.getAttribute("jsId");if(_676){d.setObject(_676,_675);}if(!ps){d.forEach(_66f,function(_677){d.connect(_675,_677.event,null,_677.func);});d.forEach(_670,function(func){func.call(_675);});}});d.forEach(_663,function(_679){if(_679&&_679.startup&&!_679._started&&(!_679.getParent||!_679.getParent())){_679.startup();}});return _663;};this.parse=function(_67a){var list=d.query(qry,_67a);var _67c=this.instantiate(list);return _67c;};}();(function(){var _67d=function(){if(dojo.config["parseOnLoad"]==true){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_67d);}else{dojo._loaders.unshift(_67d);}})();dojo.parser._anonCtr=0;dojo.parser._anon={};dojo.parser._nameAnonFunc=function(_67e,_67f){var jpn="$joinpoint";var nso=(_67f||dojo.parser._anon);if(dojo.isIE){var cn=_67e["__dojoNameCache"];if(cn&&nso[cn]===_67e){return _67e["__dojoNameCache"];}}var ret="__"+dojo.parser._anonCtr++;while(typeof nso[ret]!="undefined"){ret="__"+dojo.parser._anonCtr++;}nso[ret]=_67e;return ret;};}if(!dojo._hasResource["dojo.xml.XslTransform"]){dojo._hasResource["dojo.xml.XslTransform"]=true;dojo.provide("dojo.xml.XslTransform");dojo.xml.XslTransform=function(_684){window.console.log("XslTransform is supported by Internet Explorer and Mozilla, with limited support in Opera 9 (no document function support).");var _685=dojo.isIE;var _686=["Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];var _687=["Msxml2.FreeThreadedDOMDocument.5.0","MSXML2.FreeThreadedDOMDocument.4.0","MSXML2.FreeThreadedDOMDocument.3.0"];var _688=["Msxml2.XSLTemplate.5.0","Msxml2.XSLTemplate.4.0","MSXML2.XSLTemplate.3.0"];function getActiveXImpl(_689){for(var i=0;i<_689.length;i++){try{var _68b=new ActiveXObject(_689[i]);if(_68b){return _689[i];}}catch(e){}}dojo.raise("Could not find an ActiveX implementation in:\n\n "+_689);};if(_684==null||_684==undefined){dojo.raise("You must pass the URI String for the XSL file to be used!");return false;}var _68c=null;var _68d=null;if(_685){_68c=new ActiveXObject(getActiveXImpl(_687));}else{_68d=new XSLTProcessor();_68c=document.implementation.createDocument("","",null);_68c.addEventListener("load",onXslLoad,false);}_68c.async=false;_68c.load(_684);if(_685){var xslt=new ActiveXObject(getActiveXImpl(_688));xslt.stylesheet=_68c;_68d=xslt.createProcessor();}function onXslLoad(){_68d.importStylesheet(_68c);};function getResultDom(_68f,_690){if(_685){addIeParams(_690);var _691=getIeResultDom(_68f);removeIeParams(_690);return _691;}else{return getMozillaResultDom(_68f,_690);}};function addIeParams(_692){if(!_692){return;}for(var i=0;i<_692.length;i++){_68d.addParameter(_692[i][0],_692[i][1]);}};function removeIeParams(_694){if(!_694){return;}for(var i=0;i<_694.length;i++){_68d.addParameter(_694[i][0],"");}};function getIeResultDom(_696){_68d.input=_696;var _697=new ActiveXObject(getActiveXImpl(_686));_697.async=false;_697.validateOnParse=false;_68d.output=_697;_68d.transform();if(_697.parseError.errorCode!=0){var err=_697.parseError;dojo.raise("err.errorCode: "+err.errorCode+"\n\nerr.reason: "+err.reason+"\n\nerr.url: "+err.url+"\n\nerr.srcText: "+err.srcText);}return _697;};function getIeResultStr(_699,_69a){_68d.input=_699;_68d.transform();return _68d.output;};function addMozillaParams(_69b){if(!_69b){return;}for(var i=0;i<_69b.length;i++){_68d.setParameter(null,_69b[i][0],_69b[i][1]);}};function getMozillaResultDom(_69d,_69e){addMozillaParams(_69e);var _69f=_68d.transformToDocument(_69d);_68d.clearParameters();return _69f;};function getMozillaResultStr(_6a0,_6a1,_6a2){addMozillaParams(_6a1);var _6a3=_68d.transformToFragment(_6a0,_6a2);var _6a4=new XMLSerializer();_68d.clearParameters();return _6a4.serializeToString(_6a3);};this.getResultString=function(_6a5,_6a6,_6a7){var _6a8=null;if(_685){addIeParams(_6a6);_6a8=getIeResultStr(_6a5,_6a6);removeIeParams(_6a6);}else{_6a8=getMozillaResultStr(_6a5,_6a6,_6a7);}return _6a8;};this.transformToContentPane=function(_6a9,_6aa,_6ab,_6ac){var _6ad=this.getResultString(_6a9,_6aa,_6ac);_6ab.setContent(_6ad);};this.transformToRegion=function(_6ae,_6af,_6b0,_6b1){try{var _6b2=this.getResultString(_6ae,_6af,_6b1);_6b0.innerHTML=_6b2;}catch(e){dojo.raise(e.message+"\n\n xsltUri: "+_684);}};this.transformToDocument=function(_6b3,_6b4){return getResultDom(_6b3,_6b4);};this.transformToWindow=function(_6b5,_6b6,_6b7,_6b8){try{_6b7.open();_6b7.write(this.getResultString(_6b5,_6b6,_6b8));_6b7.close();}catch(e){dojo.raise(e.message+"\n\n xsltUri: "+_684);}};};}if(!dojo._hasResource["dojo.back"]){dojo._hasResource["dojo.back"]=true;dojo.provide("dojo.back");(function(){var back=dojo.back;function getHash(){var h=window.location.hash;if(h.charAt(0)=="#"){h=h.substring(1);}return dojo.isMozilla?h:decodeURIComponent(h);};function setHash(h){if(!h){h="";}window.location.hash=encodeURIComponent(h);_6bc=history.length;};if(dojo.exists("tests.back-hash")){back.getHash=getHash;back.setHash=setHash;}var _6bd=(typeof (window)!=="undefined")?window.location.href:"";var _6be=(typeof (window)!=="undefined")?getHash():"";var _6bf=null;var _6c0=null;var _6c1=null;var _6c2=null;var _6c3=[];var _6c4=[];var _6c5=false;var _6c6=false;var _6bc;function handleBackButton(){var _6c7=_6c4.pop();if(!_6c7){return;}var last=_6c4[_6c4.length-1];if(!last&&_6c4.length==0){last=_6bf;}if(last){if(last.kwArgs["back"]){last.kwArgs["back"]();}else{if(last.kwArgs["backButton"]){last.kwArgs["backButton"]();}else{if(last.kwArgs["handle"]){last.kwArgs.handle("back");}}}}_6c3.push(_6c7);};back.goBack=handleBackButton;function handleForwardButton(){var last=_6c3.pop();if(!last){return;}if(last.kwArgs["forward"]){last.kwArgs.forward();}else{if(last.kwArgs["forwardButton"]){last.kwArgs.forwardButton();}else{if(last.kwArgs["handle"]){last.kwArgs.handle("forward");}}}_6c4.push(last);};back.goForward=handleForwardButton;function createState(url,args,hash){return {"url":url,"kwArgs":args,"urlHash":hash};};function getUrlQuery(url){var _6ce=url.split("?");if(_6ce.length<2){return null;}else{return _6ce[1];}};function loadIframeHistory(){var url=(dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html"))+"?"+(new Date()).getTime();_6c5=true;if(_6c2){dojo.isSafari?_6c2.location=url:window.frames[_6c2.name].location=url;}else{}return url;};function checkLocation(){if(!_6c6){var hsl=_6c4.length;var hash=getHash();if((hash===_6be||window.location.href==_6bd)&&(hsl==1)){handleBackButton();return;}if(_6c3.length>0){if(_6c3[_6c3.length-1].urlHash===hash){handleForwardButton();return;}}if((hsl>=2)&&(_6c4[hsl-2])){if(_6c4[hsl-2].urlHash===hash){handleBackButton();return;}}if(dojo.isSafari&&dojo.isSafari<3){var _6d2=history.length;if(_6d2>_6bc){handleForwardButton();}else{if(_6d2<_6bc){handleBackButton();}}_6bc=_6d2;}}};back.init=function(){if(dojo.byId("dj_history")){return;}var src=dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html");document.write("<iframe style=\"border:0;width:1px;height:1px;position:absolute;visibility:hidden;bottom:0;right:0;\" name=\"dj_history\" id=\"dj_history\" src=\""+src+"\"></iframe>");};back.setInitialState=function(args){_6bf=createState(_6bd,args,_6be);};back.addToHistory=function(args){_6c3=[];var hash=null;var url=null;if(!_6c2){if(dojo.config["useXDomain"]&&!dojo.config["dojoIframeHistoryUrl"]){console.debug("dojo.back: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");}_6c2=window.frames["dj_history"];}if(!_6c1){_6c1=document.createElement("a");dojo.body().appendChild(_6c1);_6c1.style.display="none";}if(args["changeUrl"]){hash=""+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());if(_6c4.length==0&&_6bf.urlHash==hash){_6bf=createState(url,args,hash);return;}else{if(_6c4.length>0&&_6c4[_6c4.length-1].urlHash==hash){_6c4[_6c4.length-1]=createState(url,args,hash);return;}}_6c6=true;setTimeout(function(){setHash(hash);_6c6=false;},1);_6c1.href=hash;if(dojo.isIE){url=loadIframeHistory();var _6d8=args["back"]||args["backButton"]||args["handle"];var tcb=function(_6da){if(getHash()!=""){setTimeout(function(){setHash(hash);},1);}_6d8.apply(this,[_6da]);};if(args["back"]){args.back=tcb;}else{if(args["backButton"]){args.backButton=tcb;}else{if(args["handle"]){args.handle=tcb;}}}var _6db=args["forward"]||args["forwardButton"]||args["handle"];var tfw=function(_6dd){if(getHash()!=""){setHash(hash);}if(_6db){_6db.apply(this,[_6dd]);}};if(args["forward"]){args.forward=tfw;}else{if(args["forwardButton"]){args.forwardButton=tfw;}else{if(args["handle"]){args.handle=tfw;}}}}else{if(!dojo.isIE){if(!_6c0){_6c0=setInterval(checkLocation,200);}}}}else{url=loadIframeHistory();}_6c4.push(createState(url,args,hash));};back._iframeLoaded=function(evt,_6df){var _6e0=getUrlQuery(_6df.href);if(_6e0==null){if(_6c4.length==1){handleBackButton();}return;}if(_6c5){_6c5=false;return;}if(_6c4.length>=2&&_6e0==getUrlQuery(_6c4[_6c4.length-2].url)){handleBackButton();}else{if(_6c3.length>0&&_6e0==getUrlQuery(_6c3[_6c3.length-1].url)){handleForwardButton();}}};})();}if(!dojo._hasResource["dojo.cookie"]){dojo._hasResource["dojo.cookie"]=true;dojo.provide("dojo.cookie");dojo.cookie=function(name,_6e2,_6e3){var c=document.cookie;if(arguments.length==1){var _6e5=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(name)+"=([^;]*)"));return _6e5?decodeURIComponent(_6e5[1]):undefined;}else{_6e3=_6e3||{};var exp=_6e3.expires;if(typeof exp=="number"){var d=new Date();d.setTime(d.getTime()+exp*24*60*60*1000);exp=_6e3.expires=d;}if(exp&&exp.toUTCString){_6e3.expires=exp.toUTCString();}_6e2=encodeURIComponent(_6e2);var _6e8=name+"="+_6e2;for(propName in _6e3){_6e8+="; "+propName;var _6e9=_6e3[propName];if(_6e9!==true){_6e8+="="+_6e9;}}document.cookie=_6e8;}};dojo.cookie.isSupported=function(){if(!("cookieEnabled" in navigator)){this("__djCookieTest__","CookiesAllowed");navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed";if(navigator.cookieEnabled){this("__djCookieTest__","",{expires:-1});}}return navigator.cookieEnabled;};}if(!dojo._hasResource["dojo.cldr.monetary"]){dojo._hasResource["dojo.cldr.monetary"]=true;dojo.provide("dojo.cldr.monetary");dojo.cldr.monetary.getData=function(code){var _6eb={ADP:0,BHD:3,BIF:0,BYR:0,CLF:0,CLP:0,DJF:0,ESP:0,GNF:0,IQD:3,ITL:0,JOD:3,JPY:0,KMF:0,KRW:0,KWD:3,LUF:0,LYD:3,MGA:0,MGF:0,OMR:3,PYG:0,RWF:0,TND:3,TRL:0,VUV:0,XAF:0,XOF:0,XPF:0};var _6ec={CHF:5};var _6ed=_6eb[code],_6ee=_6ec[code];if(typeof _6ed=="undefined"){_6ed=2;}if(typeof _6ee=="undefined"){_6ee=0;}return {places:_6ed,round:_6ee};};}if(!dojo._hasResource["dojo.currency"]){dojo._hasResource["dojo.currency"]=true;dojo.provide("dojo.currency");dojo.currency._mixInDefaults=function(_6ef){_6ef=_6ef||{};_6ef.type="currency";var _6f0=dojo.i18n.getLocalization("dojo.cldr","currency",_6ef.locale)||{};var iso=_6ef.currency;var data=dojo.cldr.monetary.getData(iso);dojo.forEach(["displayName","symbol","group","decimal"],function(prop){data[prop]=_6f0[iso+"_"+prop];});data.fractional=[true,false];return dojo.mixin(data,_6ef);};dojo.currency.format=function(_6f4,_6f5){return dojo.number.format(_6f4,dojo.currency._mixInDefaults(_6f5));};dojo.currency.regexp=function(_6f6){return dojo.number.regexp(dojo.currency._mixInDefaults(_6f6));};dojo.currency.parse=function(_6f7,_6f8){return dojo.number.parse(_6f7,dojo.currency._mixInDefaults(_6f8));};}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");dojo.provide("dojo.fx.Toggler");(function(){var _6f9={_fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[]);}return this;}};var _6fc=function(_6fd){this._index=-1;this._animations=_6fd||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;dojo.forEach(this._animations,function(a){this.duration+=a.duration;if(a.delay){this.duration+=a.delay;}},this);};dojo.extend(_6fc,{_onAnimate:function(){this._fire("onAnimate",arguments);},_onEnd:function(){dojo.disconnect(this._onAnimateCtx);dojo.disconnect(this._onEndCtx);this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length){this._fire("onEnd");}else{this._current=this._animations[++this._index];this._onAnimateCtx=dojo.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true);}},play:function(_6ff,_700){if(!this._current){this._current=this._animations[this._index=0];}if(!_700&&this._current.status()=="playing"){return this;}var _701=dojo.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin");}),_702=dojo.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments);}),_704=dojo.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);dojo.disconnect(_701);dojo.disconnect(_702);dojo.disconnect(_704);});if(this._onAnimateCtx){dojo.disconnect(this._onAnimateCtx);}this._onAnimateCtx=dojo.connect(this._current,"onAnimate",this,"_onAnimate");if(this._onEndCtx){dojo.disconnect(this._onEndCtx);}this._onEndCtx=dojo.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);return this;},pause:function(){if(this._current){var e=dojo.connect(this._current,"onPause",this,function(arg){this._fire("onPause",arguments);dojo.disconnect(e);});this._current.pause();}return this;},gotoPercent:function(_708,_709){this.pause();var _70a=this.duration*_708;this._current=null;dojo.some(this._animations,function(a){if(a.duration<=_70a){this._current=a;return true;}_70a-=a.duration;return false;});if(this._current){this._current.gotoPercent(_70a/_current.duration,_709);}return this;},stop:function(_70c){if(this._current){if(_70c){for(;this._index+1<this._animations.length;++this._index){this._animations[this._index].stop(true);}this._current=this._animations[this._index];}var e=dojo.connect(this._current,"onStop",this,function(arg){this._fire("onStop",arguments);dojo.disconnect(e);});this._current.stop();}return this;},status:function(){return this._current?this._current.status():"stopped";},destroy:function(){if(this._onAnimateCtx){dojo.disconnect(this._onAnimateCtx);}if(this._onEndCtx){dojo.disconnect(this._onEndCtx);}}});dojo.extend(_6fc,_6f9);dojo.fx.chain=function(_70f){return new _6fc(_70f);};var _710=function(_711){this._animations=_711||[];this._connects=[];this._finished=0;this.duration=0;dojo.forEach(_711,function(a){var _713=a.duration;if(a.delay){_713+=a.delay;}if(this.duration<_713){this.duration=_713;}this._connects.push(dojo.connect(a,"onEnd",this,"_onEnd"));},this);this._pseudoAnimation=new dojo._Animation({curve:[0,1],duration:this.duration});dojo.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop"],function(evt){this._connects.push(dojo.connect(this._pseudoAnimation,evt,dojo.hitch(this,"_fire",evt)));},this);};dojo.extend(_710,{_doAction:function(_715,args){dojo.forEach(this._animations,function(a){a[_715].apply(a,args);});return this;},_onEnd:function(){if(++this._finished==this._animations.length){this._fire("onEnd");}},_call:function(_718,args){var t=this._pseudoAnimation;t[_718].apply(t,args);},play:function(_71b,_71c){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this;},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this;},gotoPercent:function(_71d,_71e){var ms=this.duration*_71d;dojo.forEach(this._animations,function(a){a.gotoPercent(a.duration<ms?1:(ms/a.duration),_71e);});this._call("gotoProcent",arguments);return this;},stop:function(_721){this._doAction("stop",arguments);this._call("stop",arguments);return this;},status:function(){return this._pseudoAnimation.status();},destroy:function(){dojo.forEach(this._connects,dojo.disconnect);}});dojo.extend(_710,_6f9);dojo.fx.combine=function(_722){return new _710(_722);};})();dojo.declare("dojo.fx.Toggler",null,{constructor:function(args){var _t=this;dojo.mixin(_t,args);_t.node=args.node;_t._showArgs=dojo.mixin({},args);_t._showArgs.node=_t.node;_t._showArgs.duration=_t.showDuration;_t.showAnim=_t.showFunc(_t._showArgs);_t._hideArgs=dojo.mixin({},args);_t._hideArgs.node=_t.node;_t._hideArgs.duration=_t.hideDuration;_t.hideAnim=_t.hideFunc(_t._hideArgs);dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(_725){return this.showAnim.play(_725||0);},hide:function(_726){return this.hideAnim.play(_726||0);}});dojo.fx.wipeIn=function(args){args.node=dojo.byId(args.node);var node=args.node,s=node.style,o;var anim=dojo.animateProperty(dojo.mixin({properties:{height:{start:function(){o=s.overflow;s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1;}else{var _72c=dojo.style(node,"height");return Math.max(_72c,1);}},end:function(){return node.scrollHeight;}}}},args));dojo.connect(anim,"onEnd",function(){s.height="auto";s.overflow=o;});return anim;};dojo.fx.wipeOut=function(args){var node=args.node=dojo.byId(args.node);var s=node.style;var o;var anim=dojo.animateProperty(dojo.mixin({properties:{height:{end:1}}},args));dojo.connect(anim,"beforeBegin",function(){o=s.overflow;s.overflow="hidden";s.display="";});dojo.connect(anim,"onEnd",function(){s.overflow=o;s.height="auto";s.display="none";});return anim;};dojo.fx.slideTo=function(args){var node=(args.node=dojo.byId(args.node));var top=null;var left=null;var init=(function(n){return function(){var cs=dojo.getComputedStyle(n);var pos=cs.position;top=(pos=="absolute"?n.offsetTop:parseInt(cs.top)||0);left=(pos=="absolute"?n.offsetLeft:parseInt(cs.left)||0);if(pos!="absolute"&&pos!="relative"){var ret=dojo.coords(n,true);top=ret.y;left=ret.x;n.style.position="absolute";n.style.top=top+"px";n.style.left=left+"px";}};})(node);init();var anim=dojo.animateProperty(dojo.mixin({properties:{top:{end:args.top||0},left:{end:args.left||0}}},args));dojo.connect(anim,"beforeBegin",anim,init);return anim;};}if(!dojo._hasResource["dojo.NodeList-fx"]){dojo._hasResource["dojo.NodeList-fx"]=true;dojo.provide("dojo.NodeList-fx");dojo.extend(dojo.NodeList,{_anim:function(obj,_73d,args){args=args||{};return dojo.fx.combine(this.map(function(item){var _740={node:item};dojo.mixin(_740,args);return obj[_73d](_740);}));},wipeIn:function(args){return this._anim(dojo.fx,"wipeIn",args);},wipeOut:function(args){return this._anim(dojo.fx,"wipeOut",args);},slideTo:function(args){return this._anim(dojo.fx,"slideTo",args);},fadeIn:function(args){return this._anim(dojo,"fadeIn",args);},fadeOut:function(args){return this._anim(dojo,"fadeOut",args);},animateProperty:function(args){return this._anim(dojo,"animateProperty",args);},anim:function(_747,_748,_749,_74a,_74b){var _74c=dojo.fx.combine(this.map(function(item){return dojo.animateProperty({node:item,properties:_747,duration:_748||350,easing:_749});}));if(_74a){dojo.connect(_74c,"onEnd",_74a);}return _74c.play(_74b||0);}});}if(!dojo._hasResource["dojox.data.dom"]){dojo._hasResource["dojox.data.dom"]=true;dojo.provide("dojox.data.dom");dojo.experimental("dojox.data.dom");dojox.data.dom.createDocument=function(str,_74f){var _750=dojo.doc;if(!_74f){_74f="text/xml";}if(str&&(typeof dojo.global["DOMParser"])!=="undefined"){var _751=new DOMParser();return _751.parseFromString(str,_74f);}else{if((typeof dojo.global["ActiveXObject"])!=="undefined"){var _752=["MSXML2","Microsoft","MSXML","MSXML3"];for(var i=0;i<_752.length;i++){try{var doc=new ActiveXObject(_752[i]+".XMLDOM");if(str){if(doc){doc.async=false;doc.loadXML(str);return doc;}else{console.log("loadXML didn't work?");}}else{if(doc){return doc;}}}catch(e){}}}else{if((_750.implementation)&&(_750.implementation.createDocument)){if(str){if(_750.createElement){var tmp=_750.createElement("xml");tmp.innerHTML=str;var _756=_750.implementation.createDocument("foo","",null);for(var i=0;i<tmp.childNodes.length;i++){_756.importNode(tmp.childNodes.item(i),true);}return _756;}}else{return _750.implementation.createDocument("","",null);}}}}return null;};dojox.data.dom.textContent=function(node,text){if(arguments.length>1){var _759=node.ownerDocument||dojo.doc;dojox.data.dom.replaceChildren(node,_759.createTextNode(text));return text;}else{if(node.textContent!==undefined){return node.textContent;}var _75a="";if(node==null){return _75a;}for(var i=0;i<node.childNodes.length;i++){switch(node.childNodes[i].nodeType){case 1:case 5:_75a+=dojox.data.dom.textContent(node.childNodes[i]);break;case 3:case 2:case 4:_75a+=node.childNodes[i].nodeValue;break;default:break;}}return _75a;}};dojox.data.dom.replaceChildren=function(node,_75d){var _75e=[];if(dojo.isIE){for(var i=0;i<node.childNodes.length;i++){_75e.push(node.childNodes[i]);}}dojox.data.dom.removeChildren(node);for(var i=0;i<_75e.length;i++){dojo._destroyElement(_75e[i]);}if(!dojo.isArray(_75d)){node.appendChild(_75d);}else{for(var i=0;i<_75d.length;i++){node.appendChild(_75d[i]);}}};dojox.data.dom.removeChildren=function(node){var _761=node.childNodes.length;while(node.hasChildNodes()){node.removeChild(node.firstChild);}return _761;};dojox.data.dom.innerXML=function(node){if(node.innerXML){return node.innerXML;}else{if(node.xml){return node.xml;}else{if(typeof XMLSerializer!="undefined"){return (new XMLSerializer()).serializeToString(node);}}}};}if(!dojo._hasResource["dojo.dnd.common"]){dojo._hasResource["dojo.dnd.common"]=true;dojo.provide("dojo.dnd.common");dojo.dnd._copyKey=navigator.appVersion.indexOf("Macintosh")<0?"ctrlKey":"metaKey";dojo.dnd.getCopyKeyState=function(e){return e[dojo.dnd._copyKey];};dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId);}while(dojo.byId(id));return id;};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};}if(dojo.config.afterOnLoad&&dojo.isBrowser){window.setTimeout(dojo._fakeLoadInit,1000);}})();dojo.i18n._preloadLocalizations("dojo.nls.dojo",["ar-lb","mk-mk","xx","ln","lo","de-de","pt-br","lt","lv","es-mx","hu-hu","id-id","ROOT","aa-dj","ar-ye","es-ar","el-gr","mt-mt","ar-ma","mk","es-ni","en-mh","ml","aa","mn","ja-jp","haw","so-dj","zh-hant-mo","af","wal-et","mr","it-ch","ms","en-mp","mt","en-mt","am","el-polytoni","en-za","sid-et","en-us-posix","ps-af","zh","et-ee","es-bo","ar","as","ga-ie","nb","en-as","uz-arab","en-au","ne","nl-nl","az","aa-er","aa-et","nl-be","pt-pt","zu","nl","mr-in","nn","en-zw","be","sk-sk","th-th","bg","en-be","so-et","bn","es-cl","fa-af","tig-er","es-co","en-nz","bs","es-cr","sr-cyrl-ba","es-pa","en-bw","ca","om","en-ca","sr-ba","or","es-pr","lv-lv","es-py","es-do","sid","cs","hy-am-revised","pa","ms-my","cy","kk-kz","so-so","nb-no","gez-er","zh-mo","kw-gb","en-ph","pl","da","gez-et","en-pk","de","bn-bd","es-ec","be-by","dz-bt","ps","pt","dv","es-es","ms-bn","dz","ar-qa","ar-dz","pa-arab","gv-gb","sq-al","sh-ba","ko-kr","el","en","eo","tt-ru","fr-lu","es","et","eu","gl-es","ml-in","kn-in","fa","ro","zh-hans-cn","om-et","fi","ru","zh-cn","rw","es-sv","fo","fr","sa","es-gt","se","ar-sa","am-et","sh","as-in","he-il","en-sg","sk","ga","sl","so","en-gb","sq","sr","hy-am","sv","gl","sw","fr-be","fo-fo","es-hn","ar-sy","it-it","gu","syr","ta","gv","en-gu","te","cy-gb","th","ti","so-ke","he","tr","fr-ca","ar-tn","hi","tt","cs-cz","de-li","kok-in","es-us","fur","sr-latn","zh-hant-hk","sr-cyrl","zh-hant-tw","en-hk","fr-ch","es-uy","hr","pa-in","sw-tz","sr-latn-ba","wal","hu","hi-in","de-lu","lt-lt","hy","ca-es","es-ve","kok","nn-no","af-za","or-in","uk","ia","kl-gl","sv-fi","id","zh-hans","lo-la","zh-hant","en-um","syr-sy","el-cy","en-ie","en-us","uz","en-in","sv-se","ti-er","zh-hans-sg","is","it","ti-et","zh-sg","vi","tig","de-at","ja","en-vi","gu-in","ta-in","km-kh","is-is","de-be","byn-er","bg-bg","ru-ua","ar-jo","pl-pl","uk-ua","fi-fi","haw-us","ka","da-dk","zh-hk","sw-ke","zh-tw","gez","kk","kl","km","kn","bn-in","ko","de-ch","eu-es","kw","om-ke","sl-si","byn","ky","ro-ro","te-in","xh"]);



/** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2007 - All Rights reserved.  **/
dojo.provide("ibm.ibmClientModel");dojo.provide("com.ibm.portal.xpath");com.ibm.portal.xpath.evaluateXPath=function(_1,_2,_3){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xpath.ie.evaluateXPath(_1,_2,_3);}else{return com.ibm.portal.xpath.gecko.evaluateXPath(_1,_2,_3);}};dojo.provide("com.ibm.portal.xpath.ie");com.ibm.portal.xpath.ie.evaluateXPath=function(_4,_5,_6){if(_6){var ns="";for(var _8 in _6){ns+="xmlns:"+_8+"='"+_6[_8]+"' ";}if(_5.ownerDocument){_5.ownerDocument.setProperty("SelectionNamespaces",ns);}else{_5.setProperty("SelectionNamespaces",ns);}}var _9=_5.selectNodes(_4);var _a;var _b=new Array();var _c=0;for(var i=0;i<_9.length;i++){_a=_9[i];if(_a){_b[_c]=_a;_c++;}}return _b;};dojo.provide("com.ibm.portal.xpath.gecko");com.ibm.portal.xpath.gecko.evaluateXPath=function(_e,_f,_10){var _11;try{var _12=_f;if(!_12.evaluate){_12=_f.ownerDocument;}_11=_12.evaluate(_e,_f,function(_13){return _10[_13]||null;},XPathResult.ANY_TYPE,null);}catch(exc){throw new Error("Error with xpath expression"+exc);}var _14;var _15=new Array();var len=0;do{_14=_11.iterateNext();if(_14){_15[len]=_14;len++;}}while(_14);return _15;};dojo.provide("ibm.portal.xml.xpath");dojo.require("com.ibm.portal.xpath");ibm.portal.xml.xpath.evaluateXPath=function(_17,doc,_19){return com.ibm.portal.xpath.evaluateXPath(_17,doc,_19);};dojo.provide("ibm.portal.xml.xpath.ie");ibm.portal.xml.xpath.ie.evaluateXPath=function(_1a,doc,_1c){return com.ibm.portal.xpath.ie.evaluateXPath(_1a,doc,_1c);};dojo.provide("ibm.portal.xml.xpath.gecko");ibm.portal.xml.xpath.gecko.evaluateXPath=function(_1d,doc,_1f){return com.ibm.portal.xpath.gecko.evaluateXPath(_1d,doc,_1f);};dojo.provide("com.ibm.portal.xslt");dojo.require("dojox.data.dom");dojo.declare("com.ibm.portal.xslt.TransformerFactory",null,{constructor:function(){this._xsltMap=new Array();},newTransformer:function(_20){ibm.portal.debug.entry("newTransformer",[_20]);var trf=this._getCached(_20);if(trf==null){trf=new com.ibm.portal.xslt.Transformer(_20);this._xsltMap.push({url:_20,transformer:trf});}return trf;},_getCached:function(_22){var _23=null;for(i=0;i<this._xsltMap.length;i++){var _24=this._xsltMap[i];if(_22==_24.url){_23=_24.transformer;break;}}return _23;}});dojo.declare("com.ibm.portal.xslt.Transformer",null,{constructor:function(_25){this._xslt=com.ibm.portal.xslt.loadXsl(_25);},transformToRegion:function(_26,_27,_28,doc){if(dojo.isIE){var _2a=com.ibm.portal.xslt.transform(_26,this._xslt,null,_27,true);_28.innerHTML=dojo.string.trim(_2a);}else{var _2b=com.ibm.portal.xslt.gecko._transformToFragment(_26,this._xslt,null,_27,doc);_28.innerHTML="";_28.appendChild(_2b);}},transformToDocument:function(_2c,_2d,_2e){var _2f=com.ibm.portal.xslt.transform(_2c,this._xslt,null,_2d,_2e);return _2f;}});com.ibm.portal.xslt.TRANSFORMER_FACTORY=new com.ibm.portal.xslt.TransformerFactory();com.ibm.portal.xslt.ie={};com.ibm.portal.xslt.gecko={};com.ibm.portal.xslt.getXmlHttpRequest=function(){var _30=null;if(typeof ActiveXObject!="undefined"){_30=new ActiveXObject("Microsoft.XMLHTTP");}else{_30=new XMLHttpRequest();}return _30;};com.ibm.portal.xslt.loadXml=function(_31){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.loadXml(_31);}else{return com.ibm.portal.xslt.gecko.loadXml(_31);}};com.ibm.portal.xslt.loadXmlString=function(_32){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.loadXmlString(_32);}else{return com.ibm.portal.xslt.gecko.loadXmlString(_32);}};com.ibm.portal.xslt.loadXsl=function(_33){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.loadXsl(_33);}else{return com.ibm.portal.xslt.gecko.loadXsl(_33);}};com.ibm.portal.xslt.transform=function(xml,xsl,_36,_37,_38){ibm.portal.debug.entry("transform",[xml,xsl,_36,_37,_38]);if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xslt.ie.transform(xml,xsl,_36,_37,_38);}else{return com.ibm.portal.xslt.gecko.transform(xml,xsl,_36,_37,_38);}};com.ibm.portal.xslt.transformAndUpdate=function(_39,xml,xsl,_3c,_3d){ibm.portal.debug.entry("transformAndUpdate",[_39,xml,xsl,_3c,_3d]);if(typeof ActiveXObject!="undefined"){var _3e=com.ibm.portal.xslt.transform(xml,xsl,_3c,_3d,true);_39.innerHTML=dojo.string.trim(_3e);}else{var doc=_39.ownerDocument?_39.ownerDocument:document;var _40=com.ibm.portal.xslt.gecko._transformToFragment(xml,xsl,_3c,_3d,doc);_39.innerHTML="";_39.appendChild(_40);}ibm.portal.debug.exit("transformAndUpdate");};com.ibm.portal.xslt.ie.XSLT_PROG_IDS=["Msxml2.XSLTemplate.6.0","Msxml2.XSLTemplate.5.0","Msxml2.XSLTemplate.4.0","MSXML2.XSLTemplate.3.0","MSXML2.XSLTemplate"];com.ibm.portal.xslt.ie.DOM_PROG_IDS=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];com.ibm.portal.xslt.ie.FTDOM_PROG_IDS=["Msxml2.FreeThreadedDOMDocument.6.0","Msxml2.FreeThreadedDOMDocument.5.0","Msxml2.FreeThreadedDOMDocument.4.0","MSXML2.FreeThreadedDOMDocument","MSXML.FreeThreadedDOMDocument","Microsoft.FreeThreadedXMLDOM"];com.ibm.portal.xslt.ie._getMSXMLImpl=function(_41){for(var i=0;i<_41.length;i++){try{var _43=new ActiveXObject(_41[i]);if(_43){return _43;}}catch(err){}}throw new Error("No MSXML implementation exists");};com.ibm.portal.xslt.ie.loadXml=function(_44){var _45=this._getMSXMLImpl(this.DOM_PROG_IDS);_45.async=0;_45.resolveExternals=0;if(!_45.load(_44)){throw new Error("Error loading xml file "+_44);}return _45;};com.ibm.portal.xslt.ie.loadXmlString=function(_46){var _47=this._getMSXMLImpl(this.DOM_PROG_IDS);_47.async=0;_47.resolveExternals=0;if(!_47.loadXML(_46)){throw new Error("Error loading xml string "+_46);}return _47;};com.ibm.portal.xslt.ie.loadXsl=function(_48){var _49=this._getMSXMLImpl(this.FTDOM_PROG_IDS);_49.async=0;_49.resolveExternals=0;if(!_49.load(_48)){throw new Error("Error loading xsl file "+_48);}return _49;};com.ibm.portal.xslt.ie.transform=function(_4a,xsl,_4c,_4d,_4e){var _4f=_4a;var _50=xsl;try{if(!_50.documentElement){_50=this.loadXsl(xsl);}}catch(e){var _51=e.message;throw new Error(""+_51,""+_51);}var _52=this._getMSXMLImpl(this.XSLT_PROG_IDS);_52.stylesheet=_50;var _53=_52.createProcessor();_53.input=_4f;if(_4d){for(var p in _4d){_53.addParameter(p,_4d[p]);}}if(_4c){_53.addParameter("mode",_4c);}if(_4e){if(!_53.transform()){throw new Error("Error transforming xml doc "+_4f);}return _53.output;}else{var _55=this._getMSXMLImpl(this.DOM_PROG_IDS);_55.async=false;_55.validateOnParse=false;_4f.transformNodeToObject(_50,_55);return _55;}};com.ibm.portal.xslt.gecko.loadXml=function(_56){var _57=null;if(dojo.isSafari){var xhr=new XMLHttpRequest();xhr.open("GET",_56,false);xhr.send(null);if(xhr.status==200){_57=xhr.responseXML;}}else{_57=document.implementation.createDocument("","",null);_57.async=0;_57.load(_56);}return _57;};com.ibm.portal.xslt.gecko.loadXmlString=function(_59){var _5a=new DOMParser();try{oXmlDoc=_5a.parseFromString(_59,"text/xml");}catch(exc){throw new Error("Error loading xml string "+_59);}return oXmlDoc;};com.ibm.portal.xslt.gecko.loadXsl=function(_5b){var _5c=null;if(dojo.isSafari){var xhr=new XMLHttpRequest();xhr.open("GET",_5b,false);xhr.send(null);if(xhr.status==200){_5c=xhr.responseXML;}}else{_5c=document.implementation.createDocument("","",null);_5c.async=0;_5c.load(_5b);}return _5c;};com.ibm.portal.xslt.gecko._getXSLTProc=function(_5e,xsl,_60,_61){var _62=xsl;if(!_62.documentElement){_62=this.loadXsl(xsl);}var _63=new XSLTProcessor();_63.importStylesheet(_62);if(_61){for(var p in _61){_63.setParameter(null,p,_61[p]);}}if(_60){_63.setParameter(null,"mode",_60);}return _63;};com.ibm.portal.xslt.gecko._transformToFragment=function(_65,xsl,_67,_68,doc){var _6a=com.ibm.portal.xslt.gecko._getXSLTProc(_65,xsl,_67,_68);var _6b=null;_6b=_6a.transformToFragment(_65,doc);_6a.clearParameters();return _6b;};com.ibm.portal.xslt.gecko.transform=function(_6c,xsl,_6e,_6f,_70){try{var _71=null;if(!_70){var _72=com.ibm.portal.xslt.gecko._getXSLTProc(_6c,xsl,_6e,_6f);_71=_72.transformToDocument(_6c);return _71;}else{_71=com.ibm.portal.xslt.gecko._transformToFragment(_6c,xsl,_6e,_6f,document);}var _73=new XMLSerializer();var _74=dojo.string.trim(_73.serializeToString(_71));if(dojo.isOpera&&_71.firstChild&&_71.firstChild.nodeName=="result"){var _75=_74.indexOf("<result>")+8;var end=_74.lastIndexOf("</result>");_74=dojo.string.trim(_74.substring(_75,end));}return _74;}catch(exc){throw new Error("Error transforming xml doc "+exc);}};com.ibm.portal.xslt.setLayerContentByXml=function(_77,xml,xsl,_7a,_7b){var _7c=com.ibm.portal.xslt.transform(xml,xsl,null,_7a,_7b);if(_77.innerHTML){_77.innerHTML=_7c;}else{var obj=document.getElementById(_77);obj.innerHTML=_7c;}};dojo.provide("ibm.portal.xml.xslt");dojo.require("com.ibm.portal.xslt");ibm.portal.xml.xslt.ie={};ibm.portal.xml.xslt.gecko={};ibm.portal.xml.xslt.getXmlHttpRequest=function(){return com.ibm.portal.xslt.getXmlHttpRequest();};ibm.portal.xml.xslt.loadXml=function(_7e){return com.ibm.portal.xslt.loadXml(_7e);};ibm.portal.xml.xslt.loadXmlString=function(_7f){return com.ibm.portal.xslt.loadXmlString(_7f);};ibm.portal.xml.xslt.loadXsl=function(_80){return com.ibm.portal.xslt.loadXsl(_80);};ibm.portal.xml.xslt.transform=function(xml,xsl,_83,_84,_85){ibm.portal.debug.entry("transform",[xml,xsl,_83,_84,_85]);return com.ibm.portal.xslt.transform(xml,xsl,_83,_84,_85);};ibm.portal.xml.xslt.transformAndUpdate=function(_86,xml,xsl,_89,_8a){ibm.portal.debug.entry("transformAndUpdate",[_86,xml,xsl,_89,_8a]);com.ibm.portal.xslt.transformAndUpdate(_86,xml,xsl,_89,_8a);ibm.portal.debug.exit("transformAndUpdate");};ibm.portal.xml.xslt.ie.loadXml=function(_8b){return com.ibm.portal.xslt.ie.loadXml(_8b);};ibm.portal.xml.xslt.ie.loadXmlString=function(_8c){return com.ibm.portal.xslt.ie.loadXmlString(_8c);};ibm.portal.xml.xslt.ie.loadXsl=function(_8d){return com.ibm.portal.xslt.ie.loadXsl(_8d);};ibm.portal.xml.xslt.ie.transform=function(_8e,xsl,_90,_91,_92){return com.ibm.portal.xslt.ie.transform(_8e,xsl,_90,_91,_92);};ibm.portal.xml.xslt.gecko.loadXml=function(_93){return com.ibm.portal.xslt.gecko.loadXml(_93);};ibm.portal.xml.xslt.gecko.loadXmlString=function(_94){return com.ibm.portal.xslt.gecko.loadXmlString(_94);};ibm.portal.xml.xslt.gecko.loadXsl=function(_95){return com.ibm.portal.xslt.gecko.loadXsl(_95);};ibm.portal.xml.xslt.gecko.transform=function(_96,xsl,_98,_99,_9a){return com.ibm.portal.xslt.gecko.transform(_96,xsl,_98,_99,_9a);};ibm.portal.xml.xslt.setLayerContentByXml=function(_9b,xml,xsl,_9e,_9f){com.ibm.portal.xslt.setLayerContentByXml(_9b,xml,xsl,_9e,_9f);};if(!dojo._hasResource["com.ibm.portal.state"]){dojo._hasResource["com.ibm.portal.state"]=true;dojo.provide("com.ibm.portal.state");dojo.declare("com.ibm.portal.state.StateManager",null,{constructor:function(_a0){this.stateDOM=null;this.stateNode=null;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};this.serializationManager=new com.ibm.portal.state.SerializationManager(_a0);},getState:function(){return this.stateDOM;},newState:function(_a1,_a2,_a3){var _a4=null;if(_a1==null){_a4=dojox.data.dom.createDocument();}else{if(_a2==null){_a4=dojox.data.dom.createDocument(dojox.data.dom.innerXML(_a1));}else{var _a5=com.ibm.portal.xslt;var _a6=_a5.transform(_a1,_a2,null,_a3,true);_a4=dojox.data.dom.createDocument(_a6);}}return _a4;},reset:function(_a7){this.stateDOM=_a7;this.stateNode=this._getStateNode(_a7);},getSerializationManager:function(){return this.serializationManager;},newPortletAccessor:function(_a8,_a9){var _aa;var _ab;if(_a9==null||this.stateDOM==_a9){_aa=this.stateNode;_ab=this.stateDOM;}else{_aa=this._getStateNode(_a9);_ab=_a9;}var _ac="state:portlet[@id='"+_a8+"']";var _ad=this._getSpecificStateNode("portlet",_ac,_aa,_ab);_ad.setAttribute("id",_a8);return new com.ibm.portal.state.PortletAccessor(_ad,_ab);},newPortletListAccessor:function(_ae){var _af;var _b0;if(_ae==null||this.stateDOM==_ae){_af=this.stateNode;_b0=this.stateDOM;}else{_af=this._getStateNode(_ae);_b0=_ae;}return new com.ibm.portal.state.PortletListAccessor(_af,_b0);},newSelectionAccessor:function(_b1){var _b2;var _b3;if(_b1==null||this.stateDOM==_b1){_b2=this.stateNode;_b3=this.stateDOM;}else{_b2=this._getStateNode(_b1);_b3=_b1;}var _b4=this._getSpecificStateNode("selection","state:selection",_b2,_b3);return new com.ibm.portal.state.SelectionAccessor(_b4,_b3);},newSoloStateAccessor:function(_b5){var _b6;var _b7;if(_b5==null||this.stateDOM==_b5){_b6=this.stateNode;_b7=this.stateDOM;}else{_b6=this._getStateNode(_b5);_b7=_b5;}var _b8=this._getSpecificStateNode("solo","state:solo",_b6,_b7);return new com.ibm.portal.state.SoloStateAccessor(_b8,_b7);},newThemeTemplateAccessor:function(_b9){var _ba;var _bb;if(_b9==null||this.stateDOM==_b9){_ba=this.stateNode;_bb=this.stateDOM;}else{_ba=this._getStateNode(_b9);_bb=_b9;}var _bc=this._getSpecificStateNode("theme-template","state:theme-template",_ba,_bb);return new com.ibm.portal.state.ThemeTemplateAccessor(_bc,_bb);},newLocaleAccessor:function(_bd){var _be;var _bf;if(_bd==null||this.stateDOM==_bd){_be=this.stateNode;_bf=this.stateDOM;}else{_be=this._getStateNode(_bd);_bf=_bd;}var _c0=this._getSpecificStateNode("locale","state:locale",_be,_bf);return new com.ibm.portal.state.LocaleAccessor(_c0,_bf);},_getStateNode:function(_c1){var _c2="state:root/state:state[@type='navigational']";var _c3=com.ibm.portal.xpath.evaluateXPath(_c2,_c1,this.ns);var _c4=null;if(_c3==null||_c3.length<=0){var _c5=_c1.firstChild;if(_c5==null){_c5=this._createElement(_c1,"root");this._prependChild(_c5,_c1);}_c4=_c5.firstChild;if(_c4==null){_c4=this._createElement(_c1,"state");this._prependChild(_c4,_c5);}_c4.setAttribute("type","navigational");}else{_c4=_c3[0];}return _c4;},_getSpecificStateNode:function(_c6,_c7,_c8,_c9){var _ca=com.ibm.portal.xpath.evaluateXPath(_c7,_c8,this.ns);var _cb;if(_ca==null||_ca.length<=0){_cb=this._createElement(_c9,_c6);this._prependChild(_cb,_c8);}else{_cb=_ca[0];}return _cb;},_prependChild:function(_cc,_cd){_cd.firstChild?_cd.insertBefore(_cc,_cd.firstChild):_cd.appendChild(_cc);},_createElement:function(dom,_cf){var _d0;if(dojo.isIE){_d0=dom.createNode(1,_cf,this.ns.state);}else{_d0=dom.createElementNS(this.ns.state,_cf);}return _d0;}});dojo.declare("com.ibm.portal.state.PortletAccessor",null,{constructor:function(_d1,_d2){this.portletNode=_d1;this.stateDOM=_d2;this.parameters=new com.ibm.portal.state.Parameters(_d1,_d2);this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};this.xsltURL=dojo.moduleUrl("com","ibm/portal/state/");},getPortletMode:function(){var _d3="state:portlet-mode";var _d4=com.ibm.portal.xpath.evaluateXPath(_d3,this.portletNode,this.ns);var _d5=ibm.portal.portlet.PortletMode.VIEW;if(_d4!=null&&_d4.length>0){var _d6=_d4[0].firstChild;if(_d6!=null){_d5=_d6.nodeValue;}}return _d5;},getWindowState:function(){var _d7="state:window-state";var _d8=com.ibm.portal.xpath.evaluateXPath(_d7,this.portletNode,this.ns);var _d9=ibm.portal.portlet.WindowState.NORMAL;if(_d8!=null&&_d8.length>0){var _da=_d8[0].firstChild;if(_da!=null){_d9=_da.nodeValue;}}return _d9;},getRenderParameters:function(){return this.parameters;},setPortletMode:function(_db){var _dc="state:portlet-mode";var _dd=com.ibm.portal.xpath.evaluateXPath(_dc,this.portletNode,this.ns);if(_dd==null||_dd.length<=0){var _de=this._createElement(this.stateDOM,"portlet-mode");this._prependChild(_de,this.portletNode);var _df=this.stateDOM.createTextNode(_db);this._prependChild(_df,_de);}else{_dd[0].firstChild.nodeValue=_db;}},setWindowState:function(_e0){var _e1="state:window-state";var _e2=com.ibm.portal.xpath.evaluateXPath(_e1,this.portletNode,this.ns);if(_e2==null||_e2.length<=0){var _e3=this._createElement(this.stateDOM,"window-state");this._prependChild(_e3,this.portletNode);var _e4=this.stateDOM.createTextNode(_e0);this._prependChild(_e4,_e3);}else{_e2[0].firstChild.nodeValue=_e0;}},getPortletState:function(){var _e5=dojox.data.dom.createDocument();var _e6=com.ibm.portal.state.STATE_MANAGER.newPortletAccessor(this.portletNode.getAttribute("id"),_e5);_e6.setPortletMode(this.getPortletMode());_e6.setWindowState(this.getWindowState());var _e7=this.getRenderParameters().getMap();if(_e7.length>0){_e6.getRenderParameters().putAll(_e7);}return _e5;},setPortletState:function(_e8,_e9){var _ea=com.ibm.portal.state.STATE_MANAGER.newPortletAccessor(this.portletNode.getAttribute("id"),_e8);this.setPortletMode(_ea.getPortletMode());this.setWindowState(_ea.getWindowState());var _eb=_ea.getRenderParameters().getMap();if(_e9==null||_e9==false){this.getRenderParameters().clear();}if(_eb.length>0){this.getRenderParameters().putAll(_eb);}},_prependChild:function(_ec,_ed){_ed.firstChild?_ed.insertBefore(_ec,_ed.firstChild):_ed.appendChild(_ec);},_createElement:function(dom,_ef){var _f0;if(dojo.isIE){_f0=dom.createNode(1,_ef,this.ns.state);}else{_f0=dom.createElementNS(this.ns.state,_ef);}return _f0;}});dojo.declare("com.ibm.portal.state.Parameters",null,{constructor:function(_f1,_f2){this.baseNode=_f1;this.stateDOM=_f2;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getMap:function(){var _f3=this.getNames();var map=new Array(_f3.length);for(var i=0;i<_f3.length;i++){var _f6=_f3[i];map[i]={name:_f6,values:this.getValues(_f6)};}return map;},getNames:function(){var _f7="state:parameters/state:param";var _f8=com.ibm.portal.xpath.evaluateXPath(_f7,this.baseNode,this.ns);var _f9=new Array();if(_f8!=null&&_f8.length>0){var _fa=_f8.length;for(var i=0;i<_fa;i++){_f9[i]=_f8[i].getAttribute("name");}}return _f9;},getValue:function(_fc){var _fd=this.getValues(_fc);var _fe=null;if(_fd!=null&&_fd.length>0){_fe=_fd[0];}return _fe;},getValues:function(_ff){var expr="state:parameters/state:param[@name='"+_ff+"']/state:value";var _101=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);var _102=null;if(_101!=null&&_101.length>0){_102=new Array(_101.length);var _103=_101.length;for(var i=0;i<_103;i++){var _105=_101[i].firstChild;if(_105!=null){_102[i]=_105.nodeValue;}}}return _102;},remove:function(name){var expr="state:parameters/state:param[@name='"+name+"']";var _108=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);if(_108!=null){var _109=_108[0];if(_109&&_109.parentNode){_109.parentNode.removeChild(_109);}}},putAll:function(map){if(map!=null&&map.length>0){for(var i=map.length-1;i>=0;i--){var _10c=map[i].name;var _10d=map[i].values;this.setValues(_10c,_10d);}}},setValue:function(name,_10f){this.setValues(name,new Array(_10f));},setValues:function(name,_111){var expr="state:parameters/state:param[@name='"+name+"']";var _113=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);var _114;if(_113==null||_113.length==0){var _115=null;if(_115==null){_115=this._createElement(this.stateDOM,"parameters");this._prependChild(_115,this.baseNode);}_114=this._createElement(this.stateDOM,"param");_114.setAttribute("name",name);this._prependChild(_114,_115);}else{_114=_113[0];dojox.data.dom.removeChildren(_114);}if(_111!=null){for(var i=_111.length-1;i>=0;i--){var _117=this._createElement(this.stateDOM,"value");this._prependChild(_117,_114);var _118=_111[i];if(_118!=null){var _119=this.stateDOM.createTextNode(_118);this._prependChild(_119,_117);}}}},clear:function(){var expr="state:parameters";var _11b=com.ibm.portal.xpath.evaluateXPath(expr,this.baseNode,this.ns);if(_11b!=null){var _11c=_11b[0];if(_11c&&_11c.parentNode){_11c.parentNode.removeChild(_11c);}}},_getFirstChildWithTag:function(_11d,_11e){if(!_11d||!_11e){return null;}var node=_11d.firstChild;while(node){if(node.nodeType==1&&node.tagName&&node.tagName.toLowerCase()==_11e.toLowerCase()){return node;}node=node.nextSibling;}return null;},_prependChild:function(node,_121){_121.firstChild?_121.insertBefore(node,_121.firstChild):_121.appendChild(node);},_createElement:function(dom,name){var _124;if(dojo.isIE){_124=dom.createNode(1,name,this.ns.state);}else{_124=dom.createElementNS(this.ns.state,name);}return _124;}});dojo.declare("com.ibm.portal.state.PortletListAccessor",null,{constructor:function(_125,_126){this.stateNode=_125;this.stateDOM=_126;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getPortlets:function(){var expr="state:portlet";var _128=com.ibm.portal.xpath.evaluateXPath(expr,this.stateNode,this.ns);var _129=null;if(_128!=null&&_128.length>0){_129=new Array(_128.length);for(var i=0;i<_128.length;i++){var node=_128[i];_129[i]=node.getAttribute("id");}}return _129;}});dojo.declare("com.ibm.portal.state.SelectionAccessor",null,{constructor:function(_12c,_12d){this.selectionNode=_12c;this.stateDOM=_12d;this.parameters=new com.ibm.portal.state.Parameters(this.selectionNode,_12d);this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},getPageSelection:function(){return this.selectionNode.getAttribute("selection-node");},getFragmentSelection:function(){var _12e=this.getParameters();var _12f=_12e.getValues("frg");var _130=null;if(_12f!=null&&_12f.length>0){_130=_12f[0];if(_12f.length>1){if(_130=="pw"){_130=_12f[1];}}}return _130;},getMapping:function(_131){var expr="state:mapping[@src='"+_131+"']";var _133=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _134=null;if(_133!=null&&_133.length>0){var _135=_133[0];_134=_135.getAttribute("dst");}return _134;},getParameters:function(){return this.parameters;},setPageSelection:function(_136){this.selectionNode.setAttribute("selection-node",_136);},setFragmentSelection:function(_137,_138){var _139=this.getParameters();if(_138==null||_138==true){var _13a=new Array(2);_13a[0]=_137;_13a[1]="pw";_139.setValues("frg",_13a);}else{_139.setValue("frg",_137);}},setMapping:function(_13b,_13c){if(_13c!=null){var expr="state:mapping[@src='"+_13b+"']";var _13e=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _13f;if(_13e!=null&&_13e.length>0){_13f=_13e[0];}else{_13f=this._createElement(this.stateDOM,"mapping");this._prependChild(_13f,this.selectionNode);_13f.setAttribute("src",_13b);}_13f.setAttribute("dst",_13c);}else{this.removeMapping(_13b);}},removeMapping:function(_140){var expr="state:mapping[@src='"+_140+"']";var _142=com.ibm.portal.xpath.evaluateXPath(expr,this.selectionNode,this.ns);var _143=false;if(_142!=null&&_142.length>0){for(var i=0;i<_142.length;i++){var _145=_142[i];if(_145&&_145.parentNode){_145.parentNode.removeChild(_145);}}_143=true;}return _143;},_prependChild:function(node,_147){_147.firstChild?_147.insertBefore(node,_147.firstChild):_147.appendChild(node);},_createElement:function(dom,name){var _14a;if(dojo.isIE){_14a=dom.createNode(1,name,this.ns.state);}else{_14a=dom.createElementNS(this.ns.state,name);}return _14a;},getSelection:function(){return this.getPageSelection();},setSelection:function(_14b){this.setPageSelection(_14b);}});dojo.declare("com.ibm.portal.state.SoloStateAccessor",null,{constructor:function(_14c,_14d){this.soloNode=_14c;this.stateDOM=_14d;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},setSoloPortlet:function(_14e){dojox.data.dom.removeChildren(this.soloNode);if(_14e!=null){var _14f=this.stateDOM.createTextNode(_14e);this._prependChild(_14f,this.soloNode);}},getSoloPortlet:function(){var _150=this.soloNode.firstChild;if(_150!=null){return _150.nodeValue;}else{return null;}},setReturnSelection:function(_151){this.soloNode.setAttribute("return-selection",_151);},getReturnSelection:function(){return this.soloNode.getAttribute("return-selection");},_prependChild:function(node,_153){_153.firstChild?_153.insertBefore(node,_153.firstChild):_153.appendChild(node);}});dojo.declare("com.ibm.portal.state.ThemeTemplateAccessor",null,{constructor:function(_154,_155){this.themeTemplateNode=_154;this.stateDOM=_155;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},setThemeTemplate:function(_156){dojox.data.dom.removeChildren(this.themeTemplateNode);if(_156!=null){var _157=this.stateDOM.createTextNode(_156);this._prependChild(_157,this.themeTemplateNode);}},getThemeTemplate:function(){var _158=this.themeTemplateNode.firstChild;if(_158!=null){return _158.nodeValue;}else{return null;}},_prependChild:function(node,_15a){_15a.firstChild?_15a.insertBefore(node,_15a.firstChild):_15a.appendChild(node);}});dojo.declare("com.ibm.portal.state.LocaleAccessor",null,{constructor:function(_15b,_15c){this.localeNode=_15b;this.stateDOM=_15c;this.ns={"state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};},setLocale:function(_15d){dojox.data.dom.removeChildren(this.localeNode);if(_15d!=null){var _15e=this.stateDOM.createTextNode(_15d);this._prependChild(_15e,this.localeNode);}},getLocale:function(){var _15f=this.localeNode.firstChild;if(_15f!=null){return _15f.nodeValue;}else{return null;}},_prependChild:function(node,_161){_161.firstChild?_161.insertBefore(node,_161.firstChild):_161.appendChild(node);}});dojo.declare("com.ibm.portal.state.SerializationManager",null,{STATE_URI_SCHEME:"state",STATE_URI_POST:"state:encode",DOWNLOAD_MODE:"download",STATUS_UNDEFINED:0,STATUS_OK:1,STATUS_ERROR:2,STATE_NS_URI:"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state",STATE_THRESHOLD:1024,constructor:function(_162){this.serviceURL=_162;},serialize:function(_163,_164,_165){ibm.portal.debug.entry("SerializationManager.serialize",[dojox.data.dom.innerXML(_163),_164,_165]);var _166=dojox.data.dom.innerXML(_163);var _167=escape(_166);var _168=this._getMimeType();var _169=null;var me=this;ibm.portal.debug.text("Mime type for response: "+_168);ibm.portal.debug.text("Length of encoded state XML is: "+_167.length);ibm.portal.debug.text("Encoded state XML is: "+_167);var _16b=com.ibm.portal.services.PortalRestServiceConfig.digest;ibm.portal.debug.text("Digest: "+_16b);if(_167.length<=this.STATE_THRESHOLD){var _16c=this.STATE_URI_SCHEME+":"+_167;var _16d;_164=(_164!=null&&_164==true);if(_164==true){if(_16b!=null){_16d={"uri":_16c,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"preprocessors":"true","digest":_16b};}else{_16d={"uri":_16c,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"preprocessors":"true"};}}else{if(_16b!=null){_16d={"uri":_16c,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"digest":_16b};}else{_16d={"uri":_16c,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI};}}ibm.portal.debug.text("Doing a GET request: { url: \""+this.serviceURL+"\", sync: "+((_165)?false:true)+", content: "+_16d+", handleAs: "+_168+", transport: XMLHTTPRequest");ibm.portal.debug.text("Parameters: uri=\""+_16d.uri+"\" mode=\""+_16d.mode+"\" xmlns=\""+_16d.xmlns+"\"");dojo.xhrGet({url:this.serviceURL,sync:(_165)?false:true,content:_16d,handleAs:_168,handle:function(_16e,_16f){ibm.portal.debug.text("Response: "+_16e);_169=me._handleSerializationResponse.call(me,_16e,_165,_163,_164);return _16e;},transport:"XMLHTTPTransport"});}else{ibm.portal.debug.text("Doing a POST request.");if(dojo.isIE){var idx=_166.indexOf("UTF-16");if(idx>=0){_166=_166.replace(/UTF-16/,"UTF-8");}}var url=this.serviceURL+"?uri="+this.STATE_URI_POST+"&xmlns="+this.STATE_NS_URI;if(_16b!=null){url+="&digest="+_16b;}dojo.rawXhrPost({url:url,sync:(_165)?false:true,postData:_166,handleAs:_168,headers:{"Content-Type":"text/xml"},handle:function(_172,_173){_169=me._handleSerializationResponse.call(me,_172,_165,_163,_164);return _172;},transport:"XMLHTTPTransport"});}ibm.portal.debug.exit("SerializationManager.serialize",_169);return _169;},deserialize:function(url,_175){var _176=this.STATE_URI_SCHEME+":"+url;var _177=null;var _178=this._getMimeType();var me=this;var _17a=com.ibm.portal.services.PortalRestServiceConfig.digest;ibm.portal.debug.text("Digest: "+_17a);var _17b;if(_17a!=null){_17b={"uri":_176,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI,"digest":_17a};}else{_17b={"uri":_176,"mode":this.DOWNLOAD_MODE,"xmlns":this.STATE_NS_URI};}dojo.xhrGet({url:this.serviceURL,sync:(_175)?false:true,content:_17b,handleAs:_178,handle:function(_17c,_17d){var type=(_17c instanceof Error)?"error":"load";if(type=="load"){var _17f=me._getResponseXML(_17c);if(_17f.documentElement.nodeName=="parsererror"){_17f=dojox.data.dom.createDocument();}if(_175){_175(1,url,_17f);}else{_177={"status":1,"input":me.serviceURL,"url":me.serviceURL,"returnObject":_17f,"state":_17f};}}else{if(type=="error"){if(_175){_175(2,url,null);}else{_177={"status":2,"input":me.serviceURL,"url":me.serviceURL,"returnObject":null,"state":null};}}}},transport:"XMLHTTPTransport"});return _177;},_handleSerializationResponse:function(_180,_181,_182,_183){var _184=null;var type=(_180 instanceof Error)?"error":"load";if(type=="load"){var _186=this._getResponseXML(_180);var _187="atom:entry/atom:link";var ns={"atom":"http://www.w3.org/2005/Atom","state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state"};var _189=null;var _18a=com.ibm.portal.xpath.evaluateXPath(_187,_186,ns);if(_18a!=null&&_18a.length>0){_189=_18a[0].getAttribute("href");}var _18b=_182;if(_183==true){var _18c="atom:entry/atom:content/state:root";var _18d=com.ibm.portal.xpath.evaluateXPath(_18c,_186,ns);if(_18d!=null&&_18d.length>0){var _18e=dojox.data.dom.innerXML(_18d[0]);_18b=dojox.data.dom.createDocument(_18e);}}if(_181){_181(1,_18b,_189);}else{_184={"status":1,"input":_18b,"state":_18b,"returnObject":_189,"url":_189};}}else{if(type=="error"){if(_181){_181(this.STATUS_ERROR,_182,null);}else{_184={"status":this.STATUS_ERROR,"input":_182,"state":_182,"returnObject":null,"url":null};}}}return _184;},_getMimeType:function(){var _18f="xml";if(dojo.isIE){_18f="text";}return _18f;},_getResponseXML:function(data){var _191=data;if(dojo.isIE){_191=dojox.data.dom.createDocument(data);}return _191;},_encodeAscii:function(str){var ret=str;if(dojo.isString(ret)){var _194=escape(ret);var _195=/%u([A-F0-9][A-F0-9][A-F0-9][A-F0-9])/i;var _196=null;while((_196=_194.match(_195))){ret+=_194.substring(0,_196.index)+escape(Number("0x"+_196[1]));_194=_194.substring(_196.index+_196[0].length);}ret+=_194;ret=ret.replace(/\+/g,"%2B");}return ret;}});dojo.declare("com.ibm.portal.navigation.controller.StateVaryManager",null,{constructor:function(){this._expr=new Array();},setExpressions:function(id,_198){var _199=this._findBucket(id);if(_199==null){_199={"id":id,"expr":null};this._expr.push(_199);}_199.expr=_198;},getExpressions:function(id){var _19b=null;var _19c=this._findBucket(id);if(_19c!=null){_19b=_19c.expr;}return _19b;},_findBucket:function(id){var _19e=null;for(i=0;i<this._expr.length;i++){var temp=this._expr[i];if(temp.id==id){_19e=temp;break;}}return _19e;}});com.ibm.portal.state.STATE_MANAGER=new com.ibm.portal.state.StateManager();com.ibm.portal.state.STATE_MANAGER.reset(dojox.data.dom.createDocument());}dojo.provide("com.ibm.portal.debug");dojo.provide("ibm.portal.debug");ibm.portal.debug.setTrace=function(_1a0){ibm.portal.debug._traceString=_1a0;};ibm.portal.debug._isDebugEnabled=function(){var _1a1=false;if(typeof (ibmPortalConfig)!="undefined"){if(ibmPortalConfig&&ibmPortalConfig.isDebug){_1a1=true;}}return _1a1;};ibm.portal.debug.text=function(str,_1a3){if(typeof (ibmPortalConfig)!="undefined"){if(ibmPortalConfig&&ibmPortalConfig.isDebug){var _1a4=ibm.portal.debug._traceString;if(_1a4){if(_1a3){if(_1a3.indexOf(_1a4)>=0){window.console.log(str);}}}else{window.console.log(str);}}}};ibm.portal.debug.entry=function(_1a5,args){if(ibm.portal.debug._isDebugEnabled()){var _1a7=_1a5+" --> entry; { ";if(args&&args.length>0){for(arg in args){_1a7=_1a7+args[arg]+" ";}}_1a7=_1a7+" } ";ibm.portal.debug.text(_1a7,_1a5);}};ibm.portal.debug.exit=function(_1a8,_1a9){if(ibm.portal.debug._isDebugEnabled()){var _1aa=_1a8+" --> exit;";if(typeof (_1a9)!="undefined"){_1aa=_1aa+" { "+_1a9+" } ";}ibm.portal.debug.text(_1aa,_1a8);}};ibm.portal.debug.escapeXmlForHTMLDisplay=function(_1ab){_1ab=_1ab.replace(/</g,"&lt;");_1ab=_1ab.replace(/>/g,"&gt;");return _1ab;};dojo.provide("com.ibm.portal.EventBroker");dojo.require("com.ibm.portal.debug");dojo.declare("com.ibm.portal.Event",null,{constructor:function(_1ac){this.eventName=_1ac;this._listeners=new Array();},fire:function(_1ad){ibm.portal.debug.text("Firing event: "+this.eventName+" with parameters: ");dojo.publish(this.eventName,[_1ad]);},register:function(_1ae,_1af){if(!_1af){return dojo.subscribe(this.eventName,null,_1ae);}else{return dojo.subscribe(this.eventName,_1ae,_1af);}},unregister:function(_1b0){dojo.unsubscribe(_1b0);},cancel:function(_1b1){dojo.publish(this.id+"/cancel");}});dojo.declare("com.ibm.portal.EventBroker",null,{startPage:new com.ibm.portal.Event("portal/StartPage"),endPage:new com.ibm.portal.Event("portal/EndPage"),startFragment:new com.ibm.portal.Event("portal/StartFragment"),endFragment:new com.ibm.portal.Event("portal/EndFragment"),fragmentUpdated:new com.ibm.portal.Event("portal/FragmentUpdated"),startRequest:new com.ibm.portal.Event("portal/StartRequest"),endRequest:new com.ibm.portal.Event("portal/EndRequest"),cancelAll:new com.ibm.portal.Event("portal/CancelAll"),stateChanged:new com.ibm.portal.Event("portal/StateChanged"),startScriptHandling:new com.ibm.portal.Event("portal/StartScriptHandling"),endScriptHandling:new com.ibm.portal.Event("portal/EndScriptHandling"),startScriptExecution:new com.ibm.portal.Event("portal/StartScriptExecution"),endScriptExecution:new com.ibm.portal.Event("portal/EndScriptExecution"),javascriptCleanup:new com.ibm.portal.Event("portal/JavascriptCleanup"),beforeSnapShot:new com.ibm.portal.Event("portal/BeforeSnapShot"),afterSnapShot:new com.ibm.portal.Event("portal/AfterSnapShot"),restorePointUpdated:new com.ibm.portal.Event("portal/RestorePointUpdated"),clearRestorePoint:new com.ibm.portal.Event("portal/ClearRestorePoint"),stopEvent:new com.ibm.portal.Event("portal/StopEvent"),redirect:new com.ibm.portal.Event("portal/Redirect")});com.ibm.portal.EVENT_BROKER=new com.ibm.portal.EventBroker();dojo.provide("com.ibm.portal.services.PortalRestServiceRequestQueue");dojo.declare("com.ibm.portal.services.PortalRestServiceRequestQueue",null,{maxNumberOfActiveRequests:4,constructor:function(){var _1b2="PortalRestServiceRequestQueue.constructor";ibm.portal.debug.entry(_1b2);this._activeRequests=0;this._requestQueue=[];ibm.portal.debug.exit(_1b2);},add:function(req){var _1b4="PortalRestServiceRequestQueue.add";ibm.portal.debug.entry(_1b4,[req]);this._requestQueue.push(req);var me=this;setTimeout(function(){me._executeNextRequest();},5);ibm.portal.debug.exit(_1b4);},_executeNextRequest:function(){var _1b6="PortalRestServiceRequestQueue._executeNextRequest";ibm.portal.debug.entry(_1b6);ibm.portal.debug.text(this._requestQueue.length+" request(s) in the queue. "+this._activeRequests+" active request(s) currently.",_1b6);if(this._requestQueue.length>0&&this._activeRequests<this.maxNumberOfActiveRequests){var _1b7=this._requestQueue.shift();ibm.portal.debug.text("Executing request: "+_1b7,_1b6);var me=this;setTimeout(function(){_1b7.execute(function(){me._notifyComplete();});me.activeRequests=me._activeRequests+1;},1);}else{ibm.portal.debug.text("No request(s) pending or maximum number of requests already currently active.",_1b6);}ibm.portal.debug.exit(_1b6);},_notifyComplete:function(){var _1b9="PortalRestServiceRequestQueue._notifyComplete";ibm.portal.debug.entry(_1b9);this._activeRequests=this._activeRequests-1;if(this._activeRequests<0){this._activeRequests=0;}var me=this;setTimeout(function(){me._executeNextRequest();},5);ibm.portal.debug.exit(_1b9);}});dojo.provide("com.ibm.portal.utilities");com.ibm.portal.utilities={findPortletIdByElement:function(_1bb){ibm.portal.debug.entry("findPortletID",[_1bb]);var id="";var _1bd=_1bb.parentNode;while(_1bd&&id.length==0){ibm.portal.debug.text("examining element "+_1bd.tagName+"; class="+_1bd.className,"findPortletID");if(_1bd.className&&(_1bd.className.match(/\bwpsPortletBody\b/)||_1bd.className.match(/\bwpsPortletBodyInlineMode\b/))){id=_1bd.id;var _1be=id.indexOf("_mode");if(_1be>=0){id=id.substring(0,_1be);}}_1bd=_1bd.parentNode;}if(id.indexOf("portletActions_")>=0){id=id.substring("portletActions_".length);}ibm.portal.debug.exit("findPortletID",[id]);return id;},findFormByElement:function(_1bf){var _1c0=_1bf;while(_1c0){if(_1c0.tagName&&_1c0.tagName.toLowerCase()=="form"){break;}_1c0=_1c0.parentNode;}return _1c0;},encodeURI:function(uri){ibm.portal.debug.entry("encodeURI",[uri]);var _1c2=uri;var _1c3=uri.lastIndexOf(":");while(_1c3>=0){var _1c4=_1c2.substring(0,_1c3);var part=_1c2.substring(_1c3+1);_1c2=_1c4+":"+encodeURIComponent(part);_1c3=_1c4.lastIndexOf(":");}_1c2=encodeURIComponent(_1c2);ibm.portal.debug.exit("encodeURI",[_1c2]);return _1c2;},decodeURI:function(uri){ibm.portal.debug.entry("decodeURI",[uri]);var _1c7=decodeURIComponent(uri);var _1c8=_1c7.indexOf(":");while(_1c8>=0){var _1c9=_1c7.substring(0,_1c8);var part=_1c7.substring(_1c8+1);_1c7=_1c9+":"+decodeURIComponent(part);_1c8=_1c7.indexOf(":",_1c8+1);}ibm.portal.debug.exit("decodeURI",[_1c7]);return _1c7;},getSelectionNodeId:function(_1cb){ibm.portal.debug.entry("getSelectionNodeId",[_1cb]);var _1cc=_1cb.split("@oid:");ibm.portal.debug.exit("getSelectionNodeId",[_1cc[1]]);return _1cc[1];},getControlId:function(_1cd){ibm.portal.debug.entry("_getControlId",[_1cd]);var _1ce=_1cd.split("@oid:");var _1cf=_1ce[0].split("oid:");ibm.portal.debug.exit("getControlId",[_1cf[1]]);return _1cf[1];},overwriteProperty:function(obj,_1d1,_1d2,_1d3){ibm.portal.debug.entry("overwriteProperty",[obj,_1d1,_1d2,_1d3]);if(!obj["_overwritten_"]){obj["_overwritten_"]=new Object();}if(!_1d3){_1d3=false;}var _1d4=(_1d3&&(obj["_overwritten_"][_1d1]!=null));if(!_1d4){if(obj["_overwritten_"][_1d1]==null){obj["_overwritten_"][_1d1]=obj[_1d1];}else{obj["_overwritten_"][_1d1]=null;}obj[_1d1]=_1d2;ibm.portal.debug.text("Property overwrite successful!");}ibm.portal.debug.exit("overwriteProperty");},restoreProperty:function(obj,_1d6){ibm.portal.debug.entry("utilities.restoreProperty",[obj,_1d6]);var _1d7=obj[_1d6];if(obj["_overwritten_"]!=null){ibm.portal.debug.text("overwritten property value: "+obj["_overwritten_"]);obj[_1d6]=obj["_overwritten_"][_1d6];obj["_overwritten_"][_1d6]=null;}else{obj[_1d6]=null;}ibm.portal.debug.exit("utilities.restoreProperty",_1d7);return _1d7;},getOverwrittenProperty:function(obj,_1d9){if(obj["_overwritten_"]){return obj["_overwritten_"][_1d9];}else{return null;}},setOverwrittenProperty:function(obj,_1db,_1dc){ibm.portal.debug.entry("utilities.setOverwrittenProperty",[obj,_1db,_1dc]);if(!obj["_overwritten_"]){obj["_overwritten_"]=new Object();}obj["_overwritten_"][_1db]=_1dc;ibm.portal.debug.exit("utilities.setOverwrittenProperty");},callOverwrittenFunction:function(_1dd,_1de,args){ibm.portal.debug.entry("utilities.callOverwrittenFunction",[_1dd,_1de,args]);var _1e0=null;var _1e1=this.getOverwrittenProperty(_1dd,_1de);ibm.portal.debug.text("Overwritten property: "+_1e1);ibm.portal.debug.text("old property's apply function: "+_1e1.apply);if(args){_1e0=_1e1.apply(_1dd,args);}else{_1e0=_1e1.apply(_1dd);}ibm.portal.debug.exit("utilities.callOverwrittenFunction",_1e0);return _1e0;},isExternalUrl:function(_1e2){ibm.portal.debug.entry("isExternalUrl",[_1e2]);var host=window.location.host;var _1e4=window.location.protocol;var _1e5=_1e2.split("?")[0];var _1e6=!(_1e5.indexOf("://")<0||(_1e5.indexOf(_1e4)==0&&_1e5.indexOf(host)==_1e4.length+2));ibm.portal.debug.text("urlStringNoQuery.indexOf(\"://\") = "+_1e5.indexOf("://"));ibm.portal.debug.text("urlStringNoQuery.indexOf(protocol) = "+_1e5.indexOf(_1e4));ibm.portal.debug.exit("isExternalUrl",_1e6);return _1e6;},isJavascriptUrl:function(_1e7){ibm.portal.debug.entry("isJavascriptUrl",[_1e7]);var url=com.ibm.portal.utilities.string.trim(_1e7.toLowerCase());var _1e9=(url.indexOf("javascript:")==0);ibm.portal.debug.exit("isJavascriptUrl",_1e9);return _1e9;},isPortalUrl:function(_1ea){ibm.portal.debug.entry("utilities.isPortalUrl",[_1ea]);var _1eb=(_1ea.indexOf(ibmPortalConfig["portalURI"])>=0);ibm.portal.debug.exit("utilities.isPortalUrl",_1eb);return _1eb;},addExternalNode:function(doc,node){var _1ee=null;if(doc.importNode){_1ee=doc.importNode(node,true);}else{_1ee=node;}doc.appendChild(_1ee);},decodeXML:function(_1ef){ibm.portal.debug.entry("decodeXML",[_1ef]);var _1f0=_1ef.replace(/&amp;/g,"&");var _1f1=_1f0.replace(/&amp;/g,"&");_1f0=_1f1.replace(/&#039;/g,"'");_1f1=_1f0.replace(/&#034;/g,"\"");_1f1=_1f1.replace(/&lt;/g,"<");_1f1=_1f1.replace(/&gt;/g,">");ibm.portal.debug.exit("decodeXML",[_1f1]);return _1f1;},eventHandlerToString:function(_1f2){var _1f3=_1f2.toString();var _1f4=_1f3.indexOf("{");var _1f5=_1f3.lastIndexOf("}");onclickStr=_1f3.substring(_1f4+1,_1f5);return onclickStr;},_waitingForScript:false,_isWaitingForScript:function(){return com.ibm.portal.utilities._waitingForScript;},stopWaitingForScript:function(){com.ibm.portal.utilities._waitingForScript=false;},waitFor:function(_1f6,_1f7,_1f8,args){var _1fa=setInterval(function(){if(_1f6()){clearInterval(_1fa);if(!args){_1f8();}else{_1f8(args);}}},_1f7);},waitForScript:function(_1fb,args){com.ibm.portal.utilities._waitingForScript=true;com.ibm.portal.utilities.waitFor(function(){return (!com.ibm.portal.utilities._isWaitingForScript());},500,_1fb,args);}};com.ibm.portal.utilities.string={findNext:function(_1fd,_1fe,from){ibm.portal.debug.entry("string.findNext",[_1fd,_1fe]);var _200=-1;for(var i=0;i<_1fe.length;i++){var _202=null;if(from){_202=from+_1fe[i].length;}var _203=_1fd.indexOf(_1fe[i],_202);if(_203>-1&&(_203<_200||_200==-1)){_200=_203;}}ibm.portal.debug.exit("string.findNext",[_200]);return _200;},contains:function(_204,_205){ibm.portal.debug.entry("string.contains",[_204,_205]);var _206=false;if(_204!=null&&_205!=null){_206=(_204.indexOf(_205)!=-1);}ibm.portal.debug.exit("string.contains",[_206]);return _206;},strip:function(_207,_208){ibm.portal.debug.entry("string.strip",[_207,_208]);var _209=_207.replace(new RegExp(_208,"g"),"");ibm.portal.debug.exit("string.strip",[_209]);return _209;},properCase:function(_20a){if(_20a==null||_20a.length<1){return "";}ibm.portal.debug.entry("string.properCase",[_20a]);var _20b=_20a.charAt(0).toUpperCase();if(_20a.length>1){_20b+=_20a.substring(1).toLowerCase();}ibm.portal.debug.exit("string.properCase",[_20b]);return _20b;},trim:function(_20c){ibm.portal.debug.entry("string.trim",[_20c]);var _20d=_20c;_20d=_20d.replace(/^\s+/,"");_20d=_20d.replace(/\s+$/,"");ibm.portal.debug.exit("string.trim",_20d);return _20d;}};dojo.declare("com.ibm.portal.utilities.HttpUrl",null,{constructor:function(_20e){this.scheme="http://";this.server=this._extractServer(_20e);this.port=this._extractPort(_20e);this.path=this._extractPath(_20e);this.query=this._extractQuery(_20e);this.anchor="";},addParameter:function(name,_210){this.query+="&"+name+"="+_210;},toString:function(){var str="";if(this.server!=""){str+=this.scheme+this.server;}if(this.port!=""){str+=":"+this.port;}str+="/"+this.path;if(this.query!=""){str+="?"+this.query;}if(this.anchor!=""){str+="#"+this.anchor;}return str;},_extractServer:function(_212){var _213=_212.indexOf(this.scheme);var _214="";if(_213==0){var _215=_212.indexOf("/",_213+this.scheme.length);var _216=_212.substring(_213+this.scheme.length,_215);_214=_216.split(":")[0];}return _214;},_extractPort:function(_217){var _218=_217.indexOf(this.server);var _219="";if(_218>=0){var _21a=_217.indexOf("/",_218);var _21b=_217.substring(_218,_21a);var _21c=_21b.split(":");if(_21c.length>1){_219=_21c[1];}}return _219;},_extractPath:function(_21d){var _21e=_21d.indexOf(this.server);var _21f="";if(_21e>=0){var _220=_21d.indexOf("/",_21e);var _221=_21d.indexOf("?");var _222=_21d.lastIndexOf("#");if(_221>=0){_21f=_21d.substring(_220+1,_221);}else{if(_222>=0){_21f=_21d.substring(_220+1,_222);}else{_21f=_21d.substring(_220+1);}}}return _21f;},_extractQuery:function(_223){var _224="";var _225=_223.split("?");if(_225.length>1){_224=_225[1].split("#")[0];}return _224;},_extractAnchor:function(_226){var _227="";var _228=_226.split("#");if(_228.length>1){_227=_228[_228.length-1];}return _227;}});dojo.provide("com.ibm.portal.utilities.html");dojo.require("com.ibm.portal.utilities");dojo.require("dojo.fx");com.ibm.portal.utilities.html={createAnchor:function(_229,href,id,_22c,_22d){ibm.portal.debug.entry("SkinRenderer.createAnchor",[_229,href,id,_22c,_22d]);var _22e=document.createElement("A");_22e.href=href;if(id){_22e.id=id;}if(_22d){_22e.className=_22d;}if(_22c){_22e.appendChild(document.createTextNode(_22c));}_229.appendChild(_22e);ibm.portal.debug.exit("SkinRenderer.createAnchor",[_22e]);return _22e;},createButton:function(_22f,href,id,_232,_233){ibm.portal.debug.entry("SkinRenderer.createButton",[_22f,href,id,_232,_233]);var _234=document.createElement("BUTTON");if(href){_234.href=href;}if(id){_234.id=id;}if(_233){_234.className=_233;}if(_232){_234.appendChild(document.createTextNode(_232));}_22f.appendChild(_234);ibm.portal.debug.exit("SkinRenderer.createButton",[_234]);return _234;},createImage:function(_235,src,id,_238,_239){ibm.portal.debug.entry("SkinRenderer.createImage",[_235,src,id,_238,_239]);var img=document.createElement("IMG");img.src=src;if(id){img.id=id;}if(_238){img.alt=_238;img.setAttribute("title",_238);if(_235.nodeName=="BUTTON"){_235.setAttribute("title",_238);}}if(_239){img.className=_239;}_235.appendChild(img);ibm.portal.debug.exit("SkinRenderer.createImage",[img]);return img;},createImageAnchor:function(_23b,src,id,_23e,_23f){ibm.portal.debug.entry("SkinRenderer.createImageAnchor",[_23b,src,id,_23e,_23f]);var _240=com.ibm.portal.utilities.html.createAnchor(_23b,"javascript:void(0);");var img=document.createElement("IMG");img.src=src;if(id){img.id=id;}if(_23e){img.alt=_23e;img.title=_23e;}if(_23f){img.className=_23f;}_240.appendChild(img);ibm.portal.debug.exit("SkinRenderer.createImageAnchor",[img]);return _240;},createTemporaryMarkupDiv:function(_242){ibm.portal.debug.entry("html.createTemporaryMarkupDiv");var _243={markup:_242,objects:{}};if(dojo.isIE){_243=com.ibm.portal.utilities.html.extractObjectElementsFromString(_242);}var div=document.createElement("DIV");div.innerHTML="<p style='display: none;'>&nbsp;</p>"+_243.markup;ibm.portal.debug.exit("html.createTemporaryMarkupDiv",[div]);return {node:div,objects:_243.objects};},extractObjectElementsFromString:function(_245){var _246={};var _247=/<object/gi;var _248=/<\/object>/gi;var _249=_245;var _24a=null;try{_24a=_247.exec(_249);if(_24a&&_24a.index>-1){var _24b=_24a.index;var buf;var end;var _24e;var id;while(_24b>-1){buf=_249.substring(0,_24b);end=_249.indexOf(">",_24b);if(_249.charAt(end-1)=="/"){_247.lastIndex=end;_24a=_247.exec(_249);if(_24a){_24b=_24a.index;continue;}else{break;}}_248.lastIndex=_24b;_24a=_248.exec(_249);if(_24a){end=_24a.index;}else{break;}_24e=_249.substring(_24b,end+9);id=dojo.dnd.getUniqueId();_249=buf+"<div id='"+id+"'></div>"+_249.substring(end+9);_246[id]=_24e;_247.lastIndex=0;_24a=_247.exec(_249);if(_24a){_24b=_24a.index;}else{break;}}}_245=_249;}catch(e){_246={};}return {markup:_245,objects:_246};},replaceObjectElementsInMarkup:function(_250){for(var id in _250){var _252=dojo.byId(id);if(_252){_252.outerHTML=_250[id];}}},removeNodesOnCondition:function(node,_254){if(!_254){_254=function(){return false;};}if(node&&node.childNodes){for(var i=0;i<node.childNodes.length;i++){if(_254(node.childNodes[i])){var _256=node.childNodes[i];node.removeChild(_256);delete _256;i--;}else{this.removeNodesOnCondition(node.childNodes[i],_254);}}}},getElementsByTagNames:function(_257){ibm.portal.debug.entry("html.getElementsByTagNames",[_257]);var _258=new Array();for(var i=1;i<arguments.length;i++){var _25a=_257.getElementsByTagName(arguments[i]);ibm.portal.debug.text("found "+_25a.length+" "+arguments[i]+" tags.");for(var j=0;j<_25a.length;j++){_258.push(_25a[j]);}}ibm.portal.debug.exit("html.getElementsByTagNames",[_258]);return _258;},getX:function(elem){ibm.portal.debug.entry("html.getX",[elem]);var size=0;if(elem!=null){if(elem.offsetParent!=null){size+=com.ibm.portal.utilities.html.getX(elem.offsetParent);}if(elem!=null){size+=elem.offsetLeft;}}ibm.portal.debug.exit("html.getX",[size]);return size;},getY:function(elem){ibm.portal.debug.entry("html.getY"[elem]);var size=0;if(elem!=null){if(elem.offsetParent!=null){size+=com.ibm.portal.utilities.html.getY(elem.offsetParent);}if(elem!=null){size+=elem.offsetTop;}}ibm.portal.debug.exit("html.getY",[size]);return size;},convertFormToQuery:function(_260,_261){ibm.portal.debug.entry("html.convertFormToQuery",[_260,_261]);var _262=this.getElementsByTagNames(_260,"input","select","textarea","button");var _263="";var _264="&";var _265="=";var _266=0;for(var i=0;i<_262.length;i++){var _268=this.convertInputToNameValuePairs(_262[i],_261);for(var k=0;k<_268.length;k++){var pair=_268[k];if(pair.name!=""){if(_266!=0){_263+=_264;}_263+=encodeURIComponent(pair.name);for(var j=0;j<pair.values.length;j++){if(j==0){_263+=(_265+encodeURIComponent(pair.values[j]));}else{_263+=(_264+encodeURIComponent(pair.name)+_265+encodeURIComponent(pair.values[j]));}}_266=_266+1;}}}ibm.portal.debug.exit("html.convertFormToQuery",_263);return _263;},convertInputToNameValuePairs:function(_26c,_26d){ibm.portal.debug.entry("html.convertInputToNameValuePairs",[_26c,_26d]);var type=_26c.type;ibm.portal.debug.text("Input type is: "+type);ibm.portal.debug.text("Input name is: "+_26c.name);var name="";var _270=[];var _271=[];if(!_26c.disabled){switch(type.toLowerCase()){case "text":case "password":case "hidden":name=_26c.name;_270.push(_26c.value);_271.push({name:name,values:_270});break;case "reset":case "button":if(!_26d||(_26c.name==_26d.name&&_26c.value==_26d.value)){name=_26c.name;_270.push(_26c.value);_271.push({name:name,values:_270});}break;case "radio":case "checkbox":if(_26c.checked){name=_26c.name;_270.push(_26c.value);}_271.push({name:name,values:_270});break;case "image":if(!_26d||_26c.name==_26d){name=_26c.name;if(_26c.value){_270.push(_26c.value);_271.push({name:name,values:_270});}_271.push({name:name+".x",values:[this.getX(_26c)]});_271.push({name:name+".y",values:[this.getY(_26c)]});}break;case "submit":if(!_26d||(_26c.name==_26d.name&&_26c.value==_26d.value)){name=_26c.name;if(_26c.value){_270.push(_26c.value);}_271.push({name:name,values:_270});}break;case "select-one":case "select-multiple":name=_26c.name;for(var i=0;i<_26c.options.length;i++){if(_26c.options[i].selected){var _273=_26c.options[i].value?_26c.options[i].value:_26c.options[i].text;_270.push(_273);}}if(_270.length!=0){_271.push({name:name,values:_270});}break;case "file":break;default:name=_26c.name;_270.push(_26c.value);_271.push({name:name,values:_270});}}ibm.portal.debug.exit("html.convertInputToNameValuePairs",_271);return _271;},isHidden:function(node){return dojo.style(node,"display")=="none";},hide:function(node){dojo.fx.wipeOut({node:node,duration:5}).play();},show:function(node){dojo.fx.wipeIn({node:node,duration:5}).play();},isDescendantOf:function(node,ref){var node=node.parentNode;var _279=false;while(node&&!_279){if(node==ref){_279=true;}node=node.parentNode;}return _279;}};dojo.provide("com.ibm.portal.services.PortalRestServiceRequest");dojo.require("com.ibm.portal.EventBroker");dojo.require("com.ibm.portal.services.PortalRestServiceRequestQueue");dojo.declare("com.ibm.portal.services.ContentHandlerURL",null,{constructor:function(uri,_27b,verb,_27d){ibm.portal.debug.entry("ContentHandlerURL.constructor",[uri,_27b,verb,_27d]);if(uri==null){return null;}if(!_27b){_27b=2;}var _27e=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();var _27f=_27e.getLocale();if(_27f){if(_27d){_27d+="&locale="+_27f;}else{_27d="&locale="+_27f;}}this.url="";if(uri.charAt(0)=="?"){this.url=this._fromQueryString(uri,_27d);}else{this.url=this._fromURI(uri,_27b,"download",_27d);}ibm.portal.debug.exit("ContentHandlerURL.constructor");},_fromQueryString:function(_280,_281){ibm.portal.debug.entry("fromQueryString",[_280]);var str=ibmPortalConfig["contentHandlerURI"]+_280;str=str.replace(/&amp;/g,"&");if(_281){str=str+_281;}if(str.indexOf("rep=compact")<0&&str.indexOf("rep=full")<0){str=str+"&rep=compact";}ibm.portal.debug.exit("fromQueryString",[str]);return str;},_fromURI:function(uri,_284,verb,_286){ibm.portal.debug.entry("ContentHandlerURL._fromURI",[uri,_284,verb,_286]);uri=com.ibm.portal.utilities.encodeURI(uri);var qStr="?uri="+uri;if(_284){qStr=qStr+"&levels="+encodeURIComponent(_284);}if(verb){qStr=qStr+"&mode="+encodeURIComponent(verb);}if(_286){qStr=qStr+_286;}if(qStr.indexOf("rep=compact")<0&&qStr.indexOf("rep=full")<0){qStr=qStr+"&rep=compact";}return this._fromQueryString(qStr);},getURI:function(){ibm.portal.debug.entry("ContentHandlerURL.getURI");return com.ibm.portal.utilities.decodeURI(this._extractParamValue("uri"));},getLevels:function(){return this._extractParamValue("levels");},getVerb:function(){return this._extractParamValue("verb");},_extractParamValue:function(_288){ibm.portal.debug.entry("ContentHandlerURL._extractParamValue",[_288]);var _289=this.url.indexOf(_288);var _28a=this.url.indexOf("&",_289);var _28b=this.url.slice(_289+_288.length+1,_28a);ibm.portal.debug.exit("ContentHandlerURL._extractParamValue",[_28b]);return _28b;}});dojo.require("com.ibm.portal.utilities.html");dojo.declare("com.ibm.portal.services.PortalRestServiceForm",null,{method:"GET",isMultipart:false,encoding:"application/x-www-form-urlencoded",DomId:null,constructor:function(_28c){if(_28c.getAttributeNode("method")){this.method=_28c.getAttributeNode("method").value;}if(_28c.getAttributeNode("encType")){this.encoding=_28c.getAttributeNode("encType").value;}if(_28c.getAttributeNode("id")){this.DomId=_28c.getAttributeNode("id").value;}else{DomId=_28c;}this.isMultipart=(this.encoding=="multipart/form-data");},getDOMElement:function(){return dojo.byId(this.DomId);},submit:function(){this.getDOMElement().submit();},toQuery:function(){return com.ibm.portal.utilities.html.convertFormToQuery(this.getDOMElement());}});com.ibm.portal.services.REQUEST_QUEUE=new com.ibm.portal.services.PortalRestServiceRequestQueue();dojo.declare("com.ibm.portal.services.PortalRestServiceRequest",null,{constructor:function(_28d,form,_28f,sync){ibm.portal.debug.entry("PortalRestServiceRequest.constructor",[_28d,form,_28f,sync]);this._feedURI=_28d.url;this._textOnly=_28f;this._sync=sync;this._form=form;if(!this._sync){this._sync=false;}ibm.portal.debug.exit("PortalRestServiceRequest.constructor");},create:function(data,_292,_293){this._doXmlHttpRequest("POST",data,_292,_293);},read:function(_294,_295){ibm.portal.debug.entry("PortalRestServiceRequest.read",[_294,_295]);if(!this._sync){ibm.portal.debug.text("Queueing request!");var q=com.ibm.portal.services.REQUEST_QUEUE;var me=this;q.add({execute:function(_298){com.ibm.portal.EVENT_BROKER.startRequest.fire({uri:me._feedURI});var _299=function(arg1,arg2,arg3,arg4){_294(arg1,arg2,arg3,arg4);if(_298){_298();}};if(me._textOnly){me._retrieveRawFeed(_299,_295);}else{me._retrieve(_299,_295);}}});}else{com.ibm.portal.EVENT_BROKER.startRequest.fire({uri:this._feedURI});if(this._textOnly){this._retrieveRawFeed(_294,_295);}else{this._retrieve(_294,_295);}}ibm.portal.debug.exit("PortalRestServiceRequest.read");},update:function(data,_29f,_2a0){this._doXmlHttpRequest("Put",data,_29f,_2a0);},remove:function(_2a1,_2a2){this._doXmlHttpRequest("Delete",null,_2a1,_2a2);},_retrieveRawFeed:function(_2a3,_2a4){ibm.portal.debug.entry("_retrieveRawFeed",[_2a3,_2a4]);var me=this;dojo.xhrGet({url:this._feedURI,load:function(type,data,evt){_2a3(data,_2a4);com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});},sync:this._sync});ibm.portal.debug.exit("_retrieveRawFeed");},_retrieve:function(_2a9,_2aa,_2ab,_2ac){ibm.portal.debug.entry("_retrieve",[_2a9]);if(this._form&&this._form.isMultipart){this._doIframeRequest(_2a9,_2aa);}else{this._doXmlHttpRequest("Get",null,_2a9,_2aa);}ibm.portal.debug.exit("PortalRestServiceRequest._retrieve");},_doIframeRequest:function(_2ad,_2ae){ibm.portal.debug.entry("PortalRestServiceRequest._doIframeRequest",[_2ad]);var _2af=null;var _2b0=dojo.dnd.getUniqueId();if(dojo.isIE){_2af=document.createElement("<iframe name='"+_2b0+"' id='"+_2b0+"' src='about:blank' onload='com.ibm.portal.aggregation.forms.PORTLET_FORM_HANDLER.handleMultiPartResult(this.id);'></iframe>");com.ibm.portal.aggregation.forms.PORTLET_FORM_HANDLER._callbackfns[_2b0]={fn:_2ad,args:_2ae};var url=new com.ibm.portal.utilities.HttpUrl(this._feedURI);url.addParameter("ibm.web2.contentType","text/plain");this._form.getDOMElement().setAttribute("action",url.toString());}else{ibm.portal.debug.text("Creating the iframe... name is: "+_2b0+"; url is: "+this._feedURI);_2af=document.createElement("IFRAME");_2af.setAttribute("name",_2b0);_2af.setAttribute("id",_2b0);var me=this;_2af.onload=function(){var xml=window.frames[_2b0].document;_2ad("load",xml,null,_2ae);com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});};this._form.getDOMElement().setAttribute("action",this._feedURI);}_2af.style.visibility="hidden";_2af.style.height="1px";_2af.style.width="1px";document.body.appendChild(_2af);if(window.frames[_2b0].name!=_2b0){window.frames[_2b0].name=_2b0;}ibm.portal.debug.text("Setting the iframe target attribute to: "+_2b0);this._form.getDOMElement().setAttribute("target",_2b0);this._form.submit();ibm.portal.debug.exit("PortalRestServiceRequest._doIframeRequest");},_doXmlHttpRequest:function(_2b4,body,_2b6,_2b7){ibm.portal.debug.entry("PortalRestServiceRequest._doXmlHttpRequest",[_2b4,body,_2b6,_2b7]);ibm.portal.debug.text("Attempting to retrieve: "+this._feedURI+" using method: "+_2b4+"; synchronously? "+this._sync);var me=this;var args={url:this._feedURI,content:{},headers:{},handle:function(_2ba,_2bb){ibm.portal.debug.entry("PortalRestServiceRequest.handle",[_2ba,_2bb]);var xhr=_2bb.xhr;ibm.portal.debug.text("XHR object: "+xhr);var _2bd=com.ibm.portal.services.PortalRestServiceConfig;var _2be=xhr.getResponseHeader("X-Request-Digest");if(_2be){_2bd.digest=_2be;}if(xhr.status==200){var data=_2ba;var loc=xhr.getResponseHeader("IBM-Web2-Location");if(loc){if(loc.indexOf(ibmPortalConfig["portalProtectedURI"])>=0&&me._feedURI.indexOf(ibmPortalConfig["portalPublicURI"])>=0){top.location.href=loc;return;}}var _2c1=xhr.getResponseHeader("Content-Type");if(_2c1&&_2c1.indexOf("text/html")>=0){var _2c2=me._feedURI;if(loc){_2c2=loc;}if(dojo.cookie("WASReqURL")!=null){var _2c3=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();var _2c4=_2c3.createLinkToCurrentState();var _2c5="WASReqURL="+_2c4+"; path=/";document.cookie=_2c5;}com.ibm.portal.EVENT_BROKER.redirect.fire({url:_2c2});top.location.href=_2c2;return;}ibm.portal.debug.text("Read feed: "+me._feedURI);if(dojo.isIE){var doc=dojox.data.dom.createDocument(data);_2b6("load",doc,xhr,_2b7);}else{_2b6("load",data,xhr,_2b7);}}else{_2b6("error",_2ba,xhr,_2b7);}com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});ibm.portal.debug.exit("PortalRestServiceRequest.handle");},sync:this._sync,handleAs:"xml"};if(this._form){args.content=dojo.queryToObject(this._form.toQuery());_2b4=this._form.method;}_2b4=_2b4.toUpperCase();if(_2b4!="GET"&&_2b4!="POST"){if(ibmPortalConfig&&ibmPortalConfig.xMethodOverride){args.headers["X-Method-Override"]=_2b4.toUpperCase();_2b4="Post";}}if(_2b4=="PUT"&&body){args.putData=body;}else{if(_2b4=="POST"&&body){args.postData=body;}}if(dojo.isIE){args.content["ibm.web2.contentType"]="text/xml";args.handleAs="text";}var _2c7=com.ibm.portal.services.PortalRestServiceConfig;if(_2c7.timeout){args.timeout=_2c7.timeout;}if(_2c7.digest){args.content["digest"]=_2c7.digest;}_2b4=com.ibm.portal.utilities.string.properCase(_2b4);var _2c8=dojo["xhr"+_2b4];if(_2c8){_2c8(args);}else{throw new Error("Invalid request method attempted: "+_2b4);}ibm.portal.debug.exit("PortalRestServiceRequest._doXmlHttpRequest");},toString:function(){return this._feedURI;}});com.ibm.portal.services.PortalRestServiceConfig={timeout:null,digest:null};dojo.provide("com.ibm.portal.services.PortletFragmentService");dojo.require("dojox.data.dom");dojo.require("com.ibm.portal.services.PortalRestServiceRequest");dojo.require("com.ibm.portal.utilities");dojo.require("com.ibm.portal.debug");dojo.require("com.ibm.portal.EventBroker");dojo.declare("com.ibm.portal.services.PortletFragmentURL",null,{constructor:function(uri){if(uri.indexOf("?uri=")==0){this.url=ibmPortalConfig["portalURI"]+uri;this.url=this.url.replace(/&amp;/g,"&");this.url=this.url.replace(/lm:/,"pm:");}else{if(uri.indexOf("lm:")==0){this.url=ibmPortalConfig["portalURI"]+"?uri=fragment:"+uri;this.url=this.url.replace(/lm:/,"pm:");}else{this.url=uri;}}}});dojo.declare("com.ibm.portal.services.PortletInfo",null,{constructor:function(wId,pId,_2cc,_2cd,_2ce,_2cf,_2d0,_2d1,_2d2,_2d3,_2d4){ibm.portal.debug.entry("PortletInfo.constructor",[wId,pId,_2cc,_2cd,_2ce,_2cf,_2d1]);this.windowId=wId;this.portletId=pId;this.uri="fragment:pm:oid:"+wId+"@oid:"+pId;this.markup=_2cc;this.portletModes=_2cd;this.windowStates=_2ce;this.dependentPortlets=_2cf;this.otherPortlets=_2d0;this.stateVaryExpressions=_2d2;this.updatedState=_2d1;this.currentMode=_2d3;this.currentWindowState=_2d4;ibm.portal.debug.exit("PortletInfo.constructor");}});dojo.declare("com.ibm.portal.services.PortletFragmentService",null,{namespaces:{"xsl":"http://www.w3.org/1999/XSL/Transform","thr":"http://purl.org/syndication/thread/1.0","atom":"http://www.w3.org/2005/Atom","xhtml":"http://www.w3.org/1999/xhtml","model":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements","base":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base","portal":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model","xsi":"http://www.w3.org/2001/XMLSchema-instance","state":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state","state-vary":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/portal-state-vary"},_flagPortletUrl:function(url,_2d6){ibm.portal.debug.entry("PortletFragmentService._flagPortletUrl",[url]);var _2d7=url.indexOf("uri=fragment:pm:oid:");var _2d8=new com.ibm.portal.utilities.HttpUrl(url);_2d8.addParameter("ibm.web2.keepRenderMode","false");if(_2d7<0){_2d6=_2d6.replace(/lm:/g,"fragment:pm:");_2d8.addParameter("uri",_2d6);}ibm.portal.debug.exit("PortletFragmentService._flagPortletUrl",[_2d8.toString()]);return _2d8.toString();},getPortletInfo:function(_2d9,_2da,_2db,form,_2dd){ibm.portal.debug.entry("PortletFragmentService.getPortletInfo",[_2d9,_2da,_2db,form,_2dd]);if(_2da=="#"||_2da==window.location.href+"#"){ibm.portal.debug.text("Illegal portlet url provided: "+_2da);ibm.portal.debug.text("Aborting request.");return false;}if(com.ibm.portal.utilities.isJavascriptUrl(_2da)){return eval(_2da);}if(!_2dd){com.ibm.portal.EVENT_BROKER.startFragment.fire({id:_2d9});}var _2de=_2da;if(_2de.indexOf(top.location.href)==0){_2de=_2de.substring(top.location.href.length);while(_2de.length>0&&_2de.charAt(0)=="/"){_2de=_2de.substring(1);}}if(_2de.indexOf("?")==0){var _2df=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();_2da=_2df.resolveRelativePortletURL(_2de);}if(com.ibm.portal.utilities.isExternalUrl(_2da)){self.location.href=_2da;}else{var url={url:this._flagPortletUrl(_2da,_2d9)};var _2e1=new com.ibm.portal.services.PortalRestServiceRequest(url,form);var me=this;_2e1.read(function(type,_2e4,xhr){var _2e6=null;if(type=="load"){_2e6=me.createPortletInfo(_2e4);}if(_2e4 instanceof Error){_2e6=_2e4;}if(!_2dd){me._fireEvents(_2e6,_2d9,xhr);}if(_2db){_2db(_2e6,xhr);}});}ibm.portal.debug.exit("PortletFragmentService.getPortletInfo");},readWindowID:function(_2e7){ibm.portal.debug.entry("PortletFragmentService.readWindowID",[_2e7]);var _2e8="/atom:feed/atom:entry/atom:id";var _2e9=com.ibm.portal.xpath.evaluateXPath(_2e8,_2e7,this.namespaces);var _2ea=dojox.data.dom.textContent(_2e9[0]);ibm.portal.debug.exit("PortletFragmentService.readWindowID",[_2ea.substring(4)]);return _2ea.substring(4);},readPortletID:function(_2eb){ibm.portal.debug.entry("PortletFragmentService.readPortletID",[_2eb]);var _2ec="/atom:feed/atom:id";var _2ed=com.ibm.portal.xpath.evaluateXPath(_2ec,_2eb,this.namespaces);var _2ee=dojox.data.dom.textContent(_2ed[0]);ibm.portal.debug.exit("PortletFragmentService.readPortletID",[_2ee.substring(4)]);return _2ee.substring(4);},readMarkup:function(_2ef){ibm.portal.debug.entry("PortletFragmentService.readMarkup",[_2ef]);var _2f0="/atom:feed/atom:entry/atom:content";var _2f1=com.ibm.portal.xpath.evaluateXPath(_2f0,_2ef,this.namespaces);var _2f2="";if(_2f1!=null&&_2f1.length>0){_2f2=dojox.data.dom.textContent(_2f1[0]);}ibm.portal.debug.exit("PortletFragmentService.readMarkup",[_2f2]);return _2f2;},readPortletModes:function(_2f3){ibm.portal.debug.entry("PortletFragmentService.readPortletModes",[_2f3]);var _2f4="/atom:feed/atom:entry/atom:link[@portal:rel='portlet-mode']";var _2f5=com.ibm.portal.xpath.evaluateXPath(_2f4,_2f3,this.namespaces);var _2f6=new Array();if(_2f5!=null&&_2f5.length>0){var _2f7=_2f5.length;for(var i=0;i<_2f7;i++){_2f6.push({"link":_2f5[i].getAttribute("href"),"mode":_2f5[i].getAttribute("title")});}}ibm.portal.debug.exit("PortletFragmentService.readPortletModes",[_2f6]);return _2f6;},readWindowStates:function(_2f9){ibm.portal.debug.entry("PortletFragmentService.readWindowStates",[_2f9]);var _2fa="/atom:feed/atom:entry/atom:link[@portal:rel='window-state']";var _2fb=com.ibm.portal.xpath.evaluateXPath(_2fa,_2f9,this.namespaces);var _2fc=new Array();if(_2fb!=null&&_2fb.length>0){var _2fd=_2fb.length;for(var i=0;i<_2fd;i++){_2fc.push({"link":_2fb[i].getAttribute("href"),"mode":_2fb[i].getAttribute("title")});}}ibm.portal.debug.exit("PortletFragmentService.readWindowStates",[_2fc]);return _2fc;},readDependentPortlets:function(_2ff){ibm.portal.debug.entry("PortletFragmentService.readDependentPortlets",[_2ff]);var _300="/atom:feed/atom:link[@portal:rel='dependent']";var _301=com.ibm.portal.xpath.evaluateXPath(_300,_2ff,this.namespaces);var _302=new Array();if(_301!=null&&_301.length>0){var _303=_301.length;for(var i=0;i<_303;i++){_302.push({"link":_301[i].getAttribute("href"),"portlet":_301[i].getAttribute("title"),"uri":_301[i].getAttribute("portal:uri")?_301[i].getAttribute("portal:uri"):_301[i].getAttribute("uri")});}}ibm.portal.debug.exit("PortletFragmentService.readDependentPortlets",[_302]);return _302;},readOtherPortlets:function(_305){ibm.portal.debug.entry("PortletFragmentService.readOtherPortlets",[_305]);var _306="/atom:feed/atom:link[@portal:rel='other']";var _307=com.ibm.portal.xpath.evaluateXPath(_306,_305,this.namespaces);var _308=new Array();if(_307!=null&&_307.length>0){var _309=_307.length;for(var i=0;i<_309;i++){_308.push({"link":_307[i].getAttribute("href"),"portlet":_307[i].getAttribute("title"),"uri":_307[i].getAttribute("portal:uri")});}}ibm.portal.debug.exit("PortletFragmentService.readOtherPortlets",[_308]);return _308;},readStateVaryExpressions:function(_30b){ibm.portal.debug.entry("PortletFragmentService.readStateVaryExpressions",[_30b]);var _30c="/atom:feed/atom:entry/state-vary:state-vary/state-vary:expr";var _30d=com.ibm.portal.xpath.evaluateXPath(_30c,_30b,this.namespaces);var _30e=new Array();if(_30d!=null&&_30d.length>0){var _30f=_30d.length;for(var i=0;i<_30f;i++){var _311=_30d[i].firstChild;if(_311!=null){_30e.push(_311.nodeValue);}}}ibm.portal.debug.exit("PortletFragmentService.readStateVaryExpressions",[_30e]);return _30e;},readPortletState:function(_312){return this._readPortletState(_312);},_readPortletState:function(_313){ibm.portal.debug.entry("PortletFragmentService.readPortletState",[_313]);var _314="/atom:feed/atom:entry/state:root";var _315=com.ibm.portal.xpath.evaluateXPath(_314,_313,this.namespaces);var _316=null;if(_315!=null&&_315.length>0){var doc=dojox.data.dom.createDocument();com.ibm.portal.utilities.addExternalNode(doc,_315[0]);_316=doc;}else{_314="/atom:feed/state:root";_315=com.ibm.portal.xpath.evaluateXPath(_314,_313,this.namespaces);if(_315!=null&&_315.length>0){var doc=dojox.data.dom.createDocument();com.ibm.portal.utilities.addExternalNode(doc,_315[0]);_316=doc;}}ibm.portal.debug.exit("PortletFragmentService.readPortletState",[_316]);return _316;},_fireEvents:function(_318,_319,xhr){this._fireGlobalPortletStateChange(_318,_319,xhr);},_fireGlobalPortletStateChange:function(_31b,_31c,xhr){com.ibm.portal.EVENT_BROKER.endFragment.fire({portletInfo:_31b,id:_31c,xhr:xhr});},_fireIndividualPortletStateChange:function(_31e){},createPortletInfo:function(_31f){var _320=this.readWindowID(_31f);var _321=this.readPortletID(_31f);var _322=this.readMarkup(_31f);var _323=this.readPortletModes(_31f);var _324=this.readWindowStates(_31f);var _325=this.readDependentPortlets(_31f);var _326=this.readOtherPortlets(_31f);var _327=this.readPortletState(_31f);var _328=this.readStateVaryExpressions(_31f);var _329=_327;if(_329==null){_329=this._readPortletState(_31f);}var _32a=new com.ibm.portal.state.StateManager();var _32b=_32a.newPortletAccessor(_320,_329);var mode=_32b.getPortletMode();var _32d=_32b.getWindowState();return new com.ibm.portal.services.PortletInfo(_320,_321,_322,_323,_324,_325,_326,_327,_328,mode,_32d);}});dojo.declare("com.ibm.portal.services.IndependentPortletFragmentService",com.ibm.portal.services.PortletFragmentService,{readDependentPortlets:function(_32e){ibm.portal.debug.entry("DependentPortletFragmentService.readDependentPortlets",[_32e]);var _32f=new Array();ibm.portal.debug.exit("DependentPortletFragmentService.readDependentPortlets",[_32f]);return _32f;},readOtherPortlets:function(_330){ibm.portal.debug.entry("DependentPortletFragmentService.readOtherPortlets",[_330]);var _331=new Array();ibm.portal.debug.exit("DependentPortletFragmentService.readOtherPortlets",[_331]);return _331;},readPortletState:function(_332){return null;}});if(!dojo._hasResource["ibm.portal.portlet.portlet"]){dojo._hasResource["ibm.portal.portlet.portlet"]=true;dojo.provide("ibm.portal.portlet.portlet");ibm.portal.portlet._SafeToExecute=false;if(window.addEventListener){window.addEventListener("load",function(){ibm.portal.portlet._SafeToExecute=true;},false);}else{if(window.attachEvent){window.attachEvent("onload",function(){ibm.portal.portlet._SafeToExecute=true;});}}dojo.declare("ibm.portal.portlet.PortletWindow",null,{STATUS_UNDEFINED:0,STATUS_OK:1,STATUS_ERROR:2,constructor:function(_333){if(_333==null){return;}this.windowID=_333;var _334=document.getElementById("com.ibm.wps.web2.portlet.preferences."+this.windowID);this.preferenceEditID=_334.getAttribute("editid");this.preferenceConfigID=_334.getAttribute("configid");this.preferenceEditDefaultsID=_334.getAttribute("editdefaultsid");this.pageID=_334.getAttribute("pageid");this.attributes=new Array();this._queuedFuncs=new Array();this.portletState=new ibm.portal.portlet.PortletState(_333);this.isCSA=false;try{this.isCSA=(typeof (document.isCSA)!="undefined");}catch(e){}var me=this;function executeQueued(){for(var i=0;i<me._queuedFuncs.length;i++){me._queuedFuncs[i]();}};if(window.addEventListener){window.addEventListener("load",function(){if(!ibm.portal.portlet._SafeToExecute){ibm.portal.portlet._SafeToExecute=true;}executeQueued();},false);}else{if(window.attachEvent){window.attachEvent("onload",function(){if(!ibm.portal.portlet._SafeToExecute){ibm.portal.portlet._SafeToExecute=true;}executeQueued();});}}},reportError:function(_337){var code;if(_337.getErrorCode()==ibm.portal.portlet.Error.ERROR){code="error";}else{if(_337.getErrorCode()==ibm.portal.portlet.Error.INFO){code="info";}else{if(_337.getErrorCode()==ibm.portal.portlet.Error.WARN){code="warning";}}}var _339={"_type":code,"_message":_337.getMessage(),"_details":_337.getDescription()};if(this.isCSA){dojo.publish("/portal/status",[{message:_339}]);}else{if(typeof (console)!="undefined"){if(_337.getErrorCode()==ibm.portal.portlet.Error.ERROR){console.error(_339._message+"\n"+_339._details);}else{if(_337.getErrorCode()==ibm.portal.portlet.Error.INFO){console.info(_339._message+"\n"+_339._details);}else{if(_337.getErrorCode()==ibm.portal.portlet.Error.WARN){console.warn(_339._message+"\n"+_339._details);}}}}else{alert(_339._type.toUpperCase()+"\nMessage: "+_339._message+"\nDetails: "+_339._details);}}},getAttribute:function(name){return this.attributes[name];},setAttribute:function(name,_33c){var ret=this.attributes[name];this.attributes[name]=_33c;return ret;},removeAttribute:function(name){this.attributes[name]=null;},clearAttributes:function(){this.attributes=new Array();},getPortletState:function(_33f){var _340=this.portletState;var _341=this;var _342=null;if(_33f!=null){_33f(_341,ibm.portal.portlet.PortletWindow.STATUS_OK,_340);}else{_342={"portletWindow":_341,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_340};}return _342;},setPortletState:function(_343,_344){this.portletState=_343;if(this.isCSA){if(_344==null){var _345=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();var url=_345.newPortletRenderURL(this.windowID);var _347=new com.ibm.portal.services.PortletFragmentService();_347.getPortletInfo("lm:oid:"+this.windowID+"@oid:"+this.pageID,url);}}else{var _348=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);_348.reset(_343.portletAccessor.stateDOM);var _349=_348.getSerializationManager();var _34a=_349.serialize(_348.getState());var _34b=_34a["returnObject"];var url=_34b;window.location.href=url;}return this.getPortletState(_344);},_queueUp:function(_34c){this._queuedFuncs.push(_34c);},_throwInappropriateRequestError:function(_34d){throw new Error("Cannot execute a synchronous call before the page loads! Please use an onload handler to execute this call to \""+_34d+"\".");return null;},getPortletPreferences:function(_34e){if(!ibm.portal.portlet._SafeToExecute){if(_34e){var me=this;this._queueUp(function(){me.getPortletPreferences(_34e);});return false;}else{return this._throwInappropriateRequestError("getPortletPreferences");}}var _350=this.getPortletState().returnObject.getPortletMode();this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _351=document.getElementById("com.ibm.wps.web2.portlet.root."+this.windowID).innerHTML;var idx=_351.indexOf("--portletwindowid--");var _url=_351.replace(/--portletwindowid--/g,this.windowID);if(_url.indexOf("?")<0){_url=_url+"?";}_url+="&verb=download&levels=-all&rep=compact&preferences=aggregated";this.requestedPreferenceID="pm:oid:"+this.preferenceEditID;if(_350==ibm.portal.portlet.PortletMode.CONFIG){this.requestedPreferenceID="pm:oid:"+this.preferenceConfigID;}else{if(_350==ibm.portal.portlet.PortletMode.EDIT_DEFAULTS){this.requestedPreferenceID="pm:oid:"+this.preferenceEditDefaultsID;}}var _354=this;var _355=null;dojo.xhrGet({url:_url,handleAs:"xml",headers:{"If-Modified-Since":"Thu, 1 Jan 1970 00:00:00 GMT"},sync:(_34e)?false:true,handle:function(_356,_357){var type=(_356 instanceof Error)?"error":"load";if(type=="load"){var _359=_356;if(!_359||(typeof (dojox.data.dom.innerXML(_356))=="undefined")){_359=dojox.data.dom.createDocument(_357.xhr.responseText);}var _35a=new ibm.portal.portlet.PortletPreferences(_354.windowID,_354.requestedPreferenceID,_359);if(_34e){_34e(_354,ibm.portal.portlet.PortletWindow.STATUS_OK,_35a);}else{_355={"portletWindow":_354,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_35a};}}else{if(type=="error"){if(_34e){_34e(_354,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_355={"portletWindow":_354,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _355;},setPortletPreferences:function(_35b,_35c){if(!ibm.portal.portlet._SafeToExecute){if(_35c){var me=this;this._queueUp(function(){me.setPortletPreferences(_35b,_35c);});return false;}else{return this._throwInappropriateRequestError("setPortletPreferences");}}this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _35e=document.getElementById("com.ibm.wps.web2.portlet.root."+this.windowID).innerHTML;var idx=_35e.indexOf("--portletwindowid--");var _url=_35e.replace(/--portletwindowid--/g,this.windowID);if(_url.indexOf("?")<0){_url+="?verb=download";}else{_url+="&verb=download";}var _361=_35b.requestedPreferenceID;var expr="/atom:feed/atom:entry[atom:id='"+_361+"']";var _363=ibm.portal.xml.xpath.evaluateXPath(expr,_35b.xmlData,_35b.ns);var _364;if(_363&&_363.length>0){_364=_363[0];}else{return null;}var _365=_364.parentNode;expr="/atom:feed/atom:entry";_363=ibm.portal.xml.xpath.evaluateXPath(expr,_35b.xmlData,_35b.ns);for(var i=0;i<_363.length;i++){var node=_363[i];if(node!=_364){_365.removeChild(node);}}var _368=this;var _369=null;dojo.rawXhrPut({url:_url,sync:(_35c)?false:true,putData:dojox.data.dom.innerXML(_35b.xmlData),contentType:"application/xml",handleAs:"xml",handle:function(_36a,_36b){var type=(_36a instanceof Error)?"error":"load";if(type=="load"){if(_35c){_35c(_368,ibm.portal.portlet.PortletWindow.STATUS_OK,_35b);}else{_369={"portletWindow":_368,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_35b};}}else{if(type=="error"){if(_35c){_35c(_368,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_369={"portletWindow":_368,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _369;},getUserProfile:function(_36d){if(!ibm.portal.portlet._SafeToExecute){if(_36d){var me=this;this._queueUp(function(){me.getUserProfile(_36d);});return false;}else{return this._throwInappropriateRequestError("getUserProfile");}}this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _url=document.getElementById("com.ibm.wps.web2.portlet.user."+this.windowID).innerHTML;var _370=this;var _371=null;dojo.xhrGet({url:_url,headers:{"If-Modified-Since":"Thu, 1 Jan 1970 00:00:00 GMT"},sync:(_36d)?false:true,handleAs:"xml",handle:function(_372,_373){var type=(_372 instanceof Error)?"error":"load";if(type=="load"){var _375=_372;if(!_375||(typeof (dojox.data.dom.innerXML(_372))=="undefined")){_375=dojox.data.dom.createDocument(_373.xhr.responseText);}var _376=new ibm.portal.portlet.UserProfile(_370.windowID,_375);if(_36d){_36d(_370,ibm.portal.portlet.PortletWindow.STATUS_OK,_376);}else{_371={"portletWindow":_370,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_376};}}else{if(type=="error"){if(_36d){_36d(_370,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_371={"portletWindow":_370,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _371;},setUserProfile:function(_377,_378){if(!ibm.portal.portlet._SafeToExecute){if(_378){var me=this;this._queueUp(function(){me.setUserProfile(_377,_378);});return false;}else{return this._throwInappropriateRequestError("setUserProfile");}}this.status=ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED;var _url=document.getElementById("com.ibm.wps.web2.portlet.user."+this.windowID).innerHTML;var _37b=this;var _37c=null;dojo.rawXhrPost({url:_url,sync:(_378)?false:true,postData:dojox.data.dom.innerXML(_377.xmlData),contentType:"application/xml",handleAs:"xml",handle:function(_37d,_37e){var type=(_37d instanceof Error)?"error":"load";if(type=="load"){if(_378){_378(_37b,ibm.portal.portlet.PortletWindow.STATUS_OK,_377);}else{_37c={"portletWindow":_37b,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_377};}}else{if(type=="error"){if(_378){_378(_37b,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_37c={"portletWindow":_37b,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}},transport:"XMLHTTPTransport"});return _37c;},newXMLPortletRequest:function(){return new ibm.portal.portlet.XMLPortletRequest(this.pageID,this.windowID);}});dojo.declare("ibm.portal.portlet.PortletPreferences",null,{constructor:function(_380,_381,data){this.windowID=_380;this.requestedPreferenceID=_381;this.xmlData=data;this.xsltURL=dojo.moduleUrl("ibm","portal/portlet/");this.ns={"xsl":"http://www.w3.org/1999/XSL/Transform","thr":"http://purl.org/syndication/thread/1.0","atom":"http://www.w3.org/2005/Atom","xhtml":"http://www.w3.org/1999/xhtml","model":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements","base":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base","portal":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model","xsi":"http://www.w3.org/2001/XMLSchema-instance"};this.internal_reset();},getMap:function(){if(this.result_getMap){return this.result_getMap;}var _383=ibm.portal.xml.xslt.loadXsl(this.xsltURL+"PortletPreferencesMap.xsl");if(_383.documentElement==null){alert("xslDoc is null");}var _384=ibm.portal.xml.xslt.transform(this.xmlData,_383,null,{"selectionid":this.requestedPreferenceID},true);if(_384==null){this.result_getNames=null;return null;}var _385=eval(_384);if(_385){_385=_385.preferences;}this.result_getMap=_385;return this.result_getMap;},getNames:function(){if(this.result_getNames){return this.result_getNames;}var _386=ibm.portal.xml.xslt.loadXsl(this.xsltURL+"PortletPreferencesNames.xsl");if(_386.documentElement==null){alert("xslDoc is null");}var _387=ibm.portal.xml.xslt.transform(this.xmlData,_386,null,{"selectionid":this.requestedPreferenceID},true);if(_387==null){this.result_getNames=null;return null;}var _388=eval(_387);if(_388){_388=_388.names;}this.result_getNames=_388;return this.result_getNames;},getValue:function(key,def){var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']/base:value";var _38c=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _38d;if(_38c&&_38c.length>0){_38d=_38c[0].getAttribute("value");}else{_38d=def;}return _38d;},getValues:function(key,def){var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']/base:value";var _391=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _392;if(_391&&_391.length>0){_392=new Array();for(var i=0;i<_391.length;i++){_392[i]=_391[i].getAttribute("value");}}else{_392=def;}return _392;},isReadOnly:function(key){var id=this.requestedPreferenceID;var expr="/atom:feed/atom:entry[atom:id='"+id+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _397=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _398=false;if(_397&&_397.length>0){var temp=_397[0].getAttribute("read-only");if(temp!=null){if(temp=="true"){_398=true;}}}return _398;},reset:function(key){this.internal_reset();var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _39c=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);if(_39c&&_39c.length>0){var _39d=_39c[0].parentNode;_39d.removeChild(_39c[0]);}},setValue:function(key,_39f){var _3a0=new Array();_3a0[0]=_39f;this.setValues(key,_3a0);},setValues:function(key,_3a2){this.internal_reset();var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _3a4=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3a5=null;if(_3a4&&_3a4.length>0){_3a5=_3a4[0];for(var i=_3a5.childNodes.length-1;i>=0;i--){_3a5.removeChild(_3a5.childNodes[i]);}}else{var _3a7="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*";var _3a8=ibm.portal.xml.xpath.evaluateXPath(_3a7,this.xmlData,this.ns);if(dojo.isIE){_3a5=this.xmlData.createNode(1,"model:portletpreferences",this.ns.model);}else{_3a5=this.xmlData.createElementNS(this.ns.model,"model:portletpreferences");}_3a5.setAttribute("name",key);_3a5.setAttribute("read-only","false");_3a8[0].appendChild(_3a5);}for(var i=0;i<_3a2.length;i++){var _3a9;if(dojo.isIE){_3a9=this.xmlData.createNode(1,"base:value",this.ns.base);var _3aa=this.xmlData.createNode(2,"xsi:type",this.ns.xsi);_3aa.nodeValue="String";_3a9.setAttributeNode(_3aa);}else{_3a9=this.xmlData.createElementNS(this.ns.base,"base:value");_3a9.setAttributeNS(this.ns.xsi,"xsi:type","String");}_3a9.setAttribute("value",_3a2[i]);_3a5.appendChild(_3a9);}},internal_reset:function(){this.result_getMap=null;this.result_getNames=null;},clone:function(){var _3ab=dojox.data.dom.innerXML(this.xmlData);var _3ac=dojox.data.dom.createDocument(_3ab);return new ibm.portal.portlet.PortletPreferences(this.windowID,this.requestedPreferenceID,_3ac);}});dojo.declare("ibm.portal.portlet.PortletMode",null,{VIEW:"view",EDIT:"edit",EDIT_DEFAULTS:"edit_defaults",HELP:"help",CONFIG:"config"});dojo.declare("ibm.portal.portlet.WindowState",null,{NORMAL:"normal",MINIMIZED:"minimized",MAXIMIZED:"maximized"});dojo.declare("ibm.portal.portlet.PortletState",null,{constructor:function(_3ad,_3ae){var _3af=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);if(dojo.isString(_3ad)){var _3b0=this._getExistingState(_3ad,_3af.getSerializationManager());_3af.reset(_3b0);}else{_3af.reset(_3ad);_3ad=_3ae;}this.portletAccessor=_3af.newPortletAccessor(_3ad);this.renderParameters=this.portletAccessor.getRenderParameters();},_isCSA:function(){var _3b1=false;try{_3b1=(typeof (document.isCSA)!="undefined");}catch(e){}return _3b1;},_getExistingState:function(_3b2,_3b3){var _3b4=null;if(this._isCSA()){_3b4=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState().stateDOM;}else{if(_3b3!=null){var _3b5=_3b3.deserialize(location.href);_3b4=_3b5.returnObject;}else{_3b4=dojox.data.dom.createDocument();}}return _3b4;},getPortletMode:function(){return this.portletAccessor.getPortletMode();},setPortletMode:function(_3b6){this.portletAccessor.setPortletMode(_3b6);return _3b6;},getWindowState:function(){return this.portletAccessor.getWindowState();},setWindowState:function(_3b7){this.portletAccessor.setWindowState(_3b7);return _3b7;},getParameterNames:function(){return this.renderParameters.getNames();},getParameterValue:function(name){return this.renderParameters.getValue(name);},getParameterValues:function(name){return this.renderParameters.getValues(name);},getParameterMap:function(){return this.renderParameters.getMap();},setParameterValue:function(name,_3bb){this.renderParameters.setValue(name,_3bb);return _3bb;},setParameterValues:function(name,_3bd){this.renderParameters.setValues(name,_3bd);return _3bd;},setParameterMap:function(map,_3bf){if(_3bf==true){this.renderParameters.clear();}this.renderParameters.putAll(map);return this.renderParameters.getMap();},removeParameter:function(name){this.renderParameters.remove(name);}});dojo.require("com.ibm.portal.services.PortletFragmentService");dojo.declare("ibm.portal.portlet.XMLPortletRequest",null,{onreadystatechange:null,readyState:0,responseText:null,responseXML:null,status:null,statusText:null,onportletstateready:null,_location:null,constructor:function(page,_3c2){this.pageID=page;this.windowID=_3c2;},_getXHR:function(){if(!this._xhr){this._xhr=this._createXHR();}return this._xhr;},_createXHR:function(){var _3c3=null;if(typeof (XMLHttpRequest)!="undefined"){_3c3=new XMLHttpRequest();}else{_3c3=new ActiveXObject("Microsoft.XMLHTTP");}return _3c3;},_onreadystatechangehandler:function(){var xhr=this._getXHR();this.readyState=xhr.readyState;if(this.readyState==4){this.responseText=xhr.responseText;this.responseXML=xhr.responseXML;this.status=xhr.status;this.statusText=xhr.statusText;var _3c5=new com.ibm.portal.services.PortletFragmentService();this.responseText=_3c5.readMarkup(xhr.responseXML);this.responseXML=null;this._handleDependentPortlets(_3c5.readDependentPortlets(xhr.responseXML));var _3c6=true;if(this.onportletstateready!=null){var _3c7=_3c5.readPortletState(xhr.responseXML);var _3c5=new com.ibm.portal.services.PortletFragmentService();var _3c8=_3c5.readWindowID(xhr.responseXML);var _3c9=new ibm.portal.portlet.PortletState(_3c7,_3c8);_3c6=this.onportletstateready(_3c9);}if(_3c6&&this._isCSA()){var _3ca=_3c5.createPortletInfo(xhr.responseXML);_3c5._fireGlobalPortletStateChange(_3ca);}}if(this.onreadystatechange!=null){this.onreadystatechange();}},_handleDependentPortlets:function(_3cb){if(this._isCSA()){var _3cc=new com.ibm.portal.services.PortletFragmentService();for(var i=0;i<_3cb.length;i++){var _3ce=_3cb[i].uri;_3ce=_3ce.replace(/fragment:pm:/g,"lm:");com.ibm.portal.aggregation.PORTAL_AGGREGATOR.page.getFragment(_3ce).setLoading();_3cc.getPortletInfo(_3ce,_3cb[i].link);}}else{if(_3cb.length>0){window.location.href=this._newPageURL();}}},_isCSA:function(){var _3cf=false;try{_3cf=(typeof (document.isCSA)!="undefined");}catch(e){}return _3cf;},_flag:function(_3d0){var id="lm:oid:"+this.windowID+"@oid:"+this.pageID;var _3d2=new com.ibm.portal.services.PortletFragmentService();return _3d2._flagPortletUrl(_3d0,id);},_newPageURL:function(){var _3d3=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);var _3d4=dojox.data.dom.createDocument();_3d3.reset(_3d4);var _3d5=_3d3.newPortletAccessor(this.windowID).getPortletState();var _3d6=_3d3.newSelectionAccessor(_3d5);_3d6.setPageSelection(this.pageID);var _3d7=_3d3.getSerializationManager();var _3d8=_3d7.serialize(_3d5);var _3d9=_3d8["returnObject"];var url=_3d9;return url;},open:function(_3db,uri){this.open(_3db,uri,false);},open:function(_3dd,uri,_3df){var xhr=this._getXHR();var me=this;this._location=uri;xhr.onreadystatechange=function(){me._onreadystatechangehandler();};xhr.open(_3dd,this._flag(uri),_3df);},setRequestHeader:function(_3e2,_3e3){this._getXHR().setRequestHeader(_3e2,_3e3);},send:function(data){this._getXHR().send(data);},abort:function(){this._getXHR().abort();},getAllResponseHeaders:function(){return this._getXHR().getAllResponseHeaders();},getResponseHeader:function(_3e5){return this._getXHR().getResponseHeader(_3e5);}});dojo.declare("ibm.portal.portlet.UserProfile",null,{constructor:function(_3e6,data){this.windowID=_3e6;this.xmlData=data;this.ns={"xsl":"http://www.w3.org/1999/XSL/Transform","atom":"http://www.w3.org/2005/Atom","xhtml":"http://www.w3.org/1999/xhtml","xsi":"http://www.w3.org/2001/XMLSchema-instance","um":"http://www.ibm.com/xmlns/prod/websphere/um.xsd"};},getAttribute:function(name){var expr="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']/um:attributeValue";var _3ea=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3eb=null;if(_3ea&&_3ea.length>0){if(_3ea[0].textContent){_3eb=_3ea[0].textContent;}else{_3eb=_3ea[0].text;}}return _3eb;},setAttribute:function(name,_3ed){var expr="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']/um:attributeValue";var _3ef=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3f0=null;if(_3ef&&_3ef.length>0){if(_3ef[0].textContent){_3f0=_3ef[0].textContent;_3ef[0].textContent=_3ed;}else{_3f0=_3ef[0].text;_3ef[0].text=_3ed;}}else{var _3f1="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']";var _3f2=ibm.portal.xml.xpath.evaluateXPath(_3f1,this.xmlData,this.ns);var _3f3=null;if(_3f2&&_3f2.length>0){_3f3=_3f2[0];}else{var _3f4="/atom:entry/atom:content/um:profile[@type='user']";var _3f5=ibm.portal.xml.xpath.evaluateXPath(_3f4,this.xmlData,this.ns);if(dojo.isIE){_3f3=this.xmlData.createNode(1,"um:attribute",this.ns.um);}else{_3f3=this.xmlData.createElementNS(this.ns.um,"um:attribute");}_3f3.setAttribute("type","xs:string");_3f3.setAttribute("multiValued","false");_3f3.setAttribute("name",name);_3f5[0].appendChild(_3f3);}var _3f6;if(dojo.isIE){_3f6=this.xmlData.createNode(1,"um:attributeValue",this.ns.um);_3f6.text=_3ed;}else{_3f6=this.xmlData.createElementNS(this.ns.um,"um:attributeValue");_3f6.textContent=_3ed;}_3f3.appendChild(_3f6);}return _3f0;},clone:function(){var _3f7=dojox.data.dom.innerXML(this.xmlData);var _3f8=dojox.data.dom.createDocument(_3f7);return new ibm.portal.portlet.UserProfile(this.windowID,_3f8);}});dojo.declare("ibm.portal.portlet.Error",null,{INFO:0,WARN:1,ERROR:2,constructor:function(_3f9,_3fa,_3fb){this.errorCode=_3f9;this.message=_3fa;this.description=_3fb;},getErrorCode:function(){return this.errorCode;},getMessage:function(){return this.message;},getDescription:function(){return this.description;}});var com_ibm_portal_portlet_portletwindow=new ibm.portal.portlet.PortletWindow();ibm.portal.portlet.PortletWindow.STATUS_UNDEFINED=com_ibm_portal_portlet_portletwindow.STATUS_UNDEFINED;ibm.portal.portlet.PortletWindow.STATUS_OK=com_ibm_portal_portlet_portletwindow.STATUS_OK;ibm.portal.portlet.PortletWindow.STATUS_ERROR=com_ibm_portal_portlet_portletwindow.STATUS_ERROR;com_ibm_portal_portlet_portletwindow=null;var com_ibm_portal_portlet_portletmode=new ibm.portal.portlet.PortletMode();ibm.portal.portlet.PortletMode.VIEW=com_ibm_portal_portlet_portletmode.VIEW;ibm.portal.portlet.PortletMode.EDIT=com_ibm_portal_portlet_portletmode.EDIT;ibm.portal.portlet.PortletMode.EDIT_DEFAULTS=com_ibm_portal_portlet_portletmode.EDIT_DEFAULTS;ibm.portal.portlet.PortletMode.HELP=com_ibm_portal_portlet_portletmode.HELP;ibm.portal.portlet.PortletMode.CONFIG=com_ibm_portal_portlet_portletmode.CONFIG;com_ibm_portal_portlet_portletmode=null;var com_ibm_portal_portlet_windowstate=new ibm.portal.portlet.WindowState();ibm.portal.portlet.WindowState.NORMAL=com_ibm_portal_portlet_windowstate.NORMAL;ibm.portal.portlet.WindowState.MINIMIZED=com_ibm_portal_portlet_windowstate.MINIMIZED;ibm.portal.portlet.WindowState.MAXIMIZED=com_ibm_portal_portlet_windowstate.MAXIMIZED;com_ibm_portal_portlet_windowstate=null;var com_ibm_portal_portlet_error=new ibm.portal.portlet.Error();ibm.portal.portlet.Error.INFO=com_ibm_portal_portlet_error.INFO;ibm.portal.portlet.Error.WARN=com_ibm_portal_portlet_error.WARN;ibm.portal.portlet.Error.ERROR=com_ibm_portal_portlet_error.ERROR;com_ibm_portal_portlet_error=null;}




	
	
		/*********************************************************** {COPYRIGHT-TOP} ***
* Licensed Materials - Property of IBM
* Tivoli Presentation Services
*
* (C) Copyright IBM Corp. 2002,2003 All Rights Reserved.
*
* US Government Users Restricted Rights - Use, duplication or
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
************************************************************ {COPYRIGHT-END} ***
* Change Activity on 6/20/03 version 1.17:
* @00=WCL, V3R0, 04/14/2002, JCP: Initial version
* @01=D96484, V3R2, 06/14/2002, bcourt: hide select/iframe elements
* @02=D99067, V3R2, 06/25/2002, bcourt: hide listbox scrollbar
* @03=D97043, V3R3, 09/03/2002, JCP: fix launch menu item on linux NS6
* @04=D104656, V3R3, 09/16/2002, JCP: form submit instead of triggers, mozilla compatibility
* @05=D107029, V3R4, 12/03/2002, Mark Rebuck:  Added support for timed menu hiding
* @06=D110173, V3R4, 03/24/2003, JCP: selection sometimes gets stuck
* @07=D113641, V3R4, 04/29/2003, LSR: Requirement #258 Shorten CSS Names
* @08=D113626, V3R4, 06/20/2003, JCP: clicking on text doesn't launch action on linux Moz13
*******************************************************************************/

var visibleMenu_ = null;
var padding_ = 10;

var transImg_ = "transparent.gif";

var arrowNorm_ = "contextArrowDefault.gif";
var arrowSel_ = "contextArrowSelected.gif";
var arrowDis_ = "contextArrowDisabled.gif";
var launchNorm_ = "contextLauncherDefault.gif";
var launchSel_ = "contextLauncherSelected.gif";

var arrowNormRTL_ = "contextArrowDefault.gif";
var arrowSelRTL_ = "contextArrowSelected.gif";
var arrowDisRTL_ = "contextArrowDisabled.gif";
var launchNormRTL_ = "contextLauncherDefault.gif";
var launchSelRTL_ = "contextLauncherSelected.gif";

var wclIsOpera_ = /Opera/.test(navigator.userAgent);

//ARC CHANGES FOR SPECIFYING STYLES - BEGIN
var defaultContextMenuBorderStyle_ = "lwpShadowBorder";
var defaultContextMenuTableStyle_ = "lwpBorderAll";
//ARC CHANGES FOR SPECIFYING STYLES - END

var arrowWidth_ = "12";
var arrowHeight_ = "12";

var submenuAltText_ = "+";

//ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - BEGIN
var defaultNoActionsText_ = "(0)";
var defaultNoActionsTextStyle_ = "lwpMenuItemDisabled";
//ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - END

var hideCurrentMenuTimer_ = null;

var onmousedown_ = document.onmousedown;

function clearMenuTimer( ) { //@05
   if (null != hideCurrentMenuTimer_) {
      clearTimeout( hideCurrentMenuTimer_ );
      hideCurrentMenuTimer_ = null;
   }
}

function setMenuTimer( ) { // @05
   clearMenuTimer( );
   hideCurrentMenuTimer_ = setTimeout( 'hideCurrentContextMenu( )', 2000);
}

function debug( str ) {
   /*
   if ( xbDEBUG != null ) {
      xbDEBUG.dump( str );
   }
   */
}

// constructor
function UilContextMenu( name, isLTR, width, borderStyle, tableStyle, emptyMenuText, emptyMenuTextStyle, positionUnder ) {
   // member variables
   this.name = name;
   this.items = new Array();
   this.isVisible = false;
   this.isDismissable = true;
   this.selectedItem = null;
   this.isDynamic = false;
   this.isCacheable = false;
   this.isEmpty = true;
   this.isLTR = isLTR;
   this.hiddenItems = new Array(); //@01A
   this.isHyperlinkChild = true; //  We will reset later if needed.
   
   this.bottomPositioned = positionUnder;

   // html variables
   this.launcher = null;
   this.menuTag = null;

   //ARC CHANGES FOR SPECIFYING STYLES - BEGIN
   //styles for menu
   if ( borderStyle != null )
   {
       this.menuBorderStyle = borderStyle;
   }
   else
   {
       this.menuBorderStyle = defaultContextMenuBorderStyle_;
   }
   
   if ( tableStyle != null )
   {
       this.menuTableStyle = tableStyle;
   }
   else
   {
       this.menuTableStyle = defaultContextMenuTableStyle_;
   }
   //ARC CHANGES FOR SPECIFYING STYLES - END

   //ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - BEGIN
   if ( emptyMenuText != null )
   {
   	   this.noActionsText = emptyMenuText;
   }
   else
   {
   	   this.noActionsText = defaultNoActionsText_;
   }
   
   if ( emptyMenuTextStyle != null )
   {
   	   this.noActionsTextStyle = emptyMenuTextStyle;
   }
   else
   {
   	   this.noActionsTextStyle = defaultNoActionsTextStyle_;
   }
   //ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - END

   // external methods
   this.add = UilContextMenuAdd;
   this.addSeparator = UilContextMenuAddSeparator;
   this.show = UilContextMenuShow;
   this.hide = UilContextMenuHide;

   // internal methods
   this.create = UilContextMenuCreate;
   this.getMenuItem = UilContextMenuGetMenuItem;
   this.getSelectedItem = UilContextMenuGetSelectedItem;

   if ( this.name == null ) {
      this.name = "UilContextMenu_" + allMenus_.length;
   }
}

// adds a menu item to the context menu
function UilContextMenuAdd( item ) {
   this.items[ this.items.length ] = item;
   this.isEmpty = false;
}

function UilContextMenuAddSeparator() {
   var sep = new UilMenuItem();
   sep.isSeparator = true;
   this.add( sep );
}

// shows the context menu
// launcher- html element (anchor) that is launching the menu
// launchItem- menu item that is launching the menu
function UilContextMenuShow( launcher, launchItem ) {
   if ( this.items.length == 0 ) {
      // empty context menu
      debug( 'menu is empty!' );
      //ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - BEGIN
      this.add( new UilMenuItem( this.noActionsText, false, "javascript:void(0);", null, null, null, null, this.noActionsTextStyle ) );
      //ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - END
      this.isEmpty = true;
   }

   if ( this.menuTag == null ) {
      // create the context menu html
      this.create();
   } else {
      this.menuTag.style.left = ""; //196195 //Reset
      this.menuTag.style.top = ""; //196195 //Reset
      this.menuTag.style.width = ""; //"0px"; //196195 //Reset
      this.menuTag.style.height = ""; //196195 //Reset
      this.menuTag.style.overflow = "visible"; //196195 //Reset, No horizontal and vertical scrollbars
   }

   if ( this.menuTag != null) {
      // store the launcher for later
      this.launcher = launcher;
      if ( this.launcher.tagName == "IMG" ) {
         this.isHyperlinkChild = false;

         // we want the anchor tag
         this.launcher = this.launcher.parentNode;
      }

      // boundaries of window
      var bd = new ContextMenuBrowserDimensions();
      var maxX = bd.getScrollFromLeft() + bd.getViewableAreaWidth();
      var maxY = bd.getScrollFromTop() + bd.getViewableAreaHeight();
      var minX = bd.getScrollFromLeft();
      var minY = bd.getScrollFromTop();

      debug( 'max: ' + maxX + ', ' + maxY );

      var menuWidth = getWidth( this.menuTag );
      var menuHeight = getHeight( this.menuTag );

      // move the context menu to the right of the launcher
      var posX = 0;
      var posY = 0;
      var fUseUpperY = false; //196195
      var maxUpperPosY = 0; //196195

      if ( launchItem != null ) {
         // launched from submenu
         var launchTag = launchItem.itemTag;
         var launchTagWidth = getWidth( launchTag );
         var parentTag = launchItem.parentMenu.menuTag; //@04A
         var launchOffsetX = getLeft( parentTag ); //@04C
         var launchOffsetY = getTop( parentTag ); //@04C

         posX = launchOffsetX + getLeft( launchTag ) + launchTagWidth; //@04C
         posY = launchOffsetY + getTop( launchTag ); //@04C

         if ( !this.isLTR ) {
            posX -= launchTagWidth;
            posX -= menuWidth;
         }

         // try to keep it in the window
         if ( this.isLTR ) {
            if ( posX + menuWidth > maxX ) {
               // try to show it to the left of the parent menu
               var posX1 = launchOffsetX - menuWidth;
               var posX2 = maxX - menuWidth;
               if ( 0 <= posX1 ) {
                  posX = posX1;
               }
               else {
                  posX = Math.max( minX, posX2 );
               }
            }
         }
         else {
            if ( posX < 0 ) {
               // try to show it to the right of the parent menu
               var posX1 = launchOffsetX + launchTagWidth;
               if ( posX1 + menuWidth < maxX ) {
                  posX = posX1;
               }
               else {
                  posX = Math.min( maxX, maxX - menuWidth );
               }
            }
         }

         if ( posY + menuHeight > maxY ) {
            var posY1 = maxY - menuHeight;
            posY = Math.max( minY, posY1 );
         }
      }
      else {
         // launched from menu link
         var launcherLeft = getLeft( this.launcher, true )
         if ( this.launcher.tagName == "BUTTON" || this.bottomPositioned ) {
			
             posX = launcherLeft;
             
             // bidi
             if ( !this.isLTR ) {
                 //196195 posX += getWidth( this.launcher ) - getWidth( this.menuTag );
                 posX += getWidth( this.launcher ) - menuWidth; //196195
             }

             if (this.isLTR) {
                 if ((posX + menuWidth) > maxX) {
                     //196195 begins
                     if ((posX + getWidth(this.launcher)) > maxX) {
                         posX = Math.max(minX, maxX - menuWidth);
                     }
                     else 
                     //196195 ends
                         posX = Math.max(minX, posX + getWidth( this.launcher ) - menuWidth);
                 }
                 //196195 begins 
                 else if (posX < minX) {
                     posX = minX;
                 }
                 //196195 ends 
             }
             else{
                 if (posX < minX) {
                     //196195 if ((launcherLeft + menuWidth) < maxX) {
                     if ((launcherLeft > minX) && ((launcherLeft + menuWidth) < maxX)) { //196195
                         posX = launcherLeft;
                     }
                     else{
                         posX = Math.min(minX, maxX - menuWidth);
                     }
                 }
                 //196195 begins
                 else if ( (posX + menuWidth) > maxX) {
                     if (Math.min(posX, maxX - menuWidth) >= minX)
                         posX = Math.min(posX, maxX - menuWidth);
                 }
                 //196195 ends  
             }
             
             maxUpperPosY = getTop( this.launcher, true ); //196195
             var upperVisibleHeight = maxUpperPosY - minY; //196195
             posY = getTop( this.launcher, true ) + getHeight( this.launcher );
             var lowerVisibleHeight = maxY - posY; //196195
             //196195 if ( posY + menuHeight > maxY ) {
             if ( (posY + menuHeight > maxY) && (lowerVisibleHeight < upperVisibleHeight) ) { //196195
                // top
                posY -= (menuHeight + getHeight( this.launcher ));
                fUseUpperY = true; //196195
             }

             if ( posY < minY ) {
                posY = minY;
             }
         }
         else {

             // left-right
             posX = launcherLeft + this.launcher.offsetWidth;
             posY = getTop( this.launcher, true );

             if ( !this.isLTR ) {
                posX -= this.launcher.offsetWidth;
                posX -= menuWidth;
             }

             // keep it in the window
             if ( this.isLTR ) {
                if ( posX + menuWidth > maxX ) {
                   // try to show it on the left side of the launcher
                   var posX1 = launcherLeft - menuWidth;
                   if ( posX1 > 0 ) {
                      posX = posX1;
                   }
                   else {
                      posX = Math.max( minX, maxX - menuWidth );
                   }
                }
             }
             else {
                if ( posX < minX ) {
                   // try to show it on the right side of the launcher
                   var posX1 = launcherLeft + this.launcher.offsetWidth;
                   if ( posX1 + menuWidth < maxX ) {
                      posX = posX1;
                   }
                   else {
                      posX = Math.min( minX, maxX - menuWidth );
                   }
                }
             }

             if ( posY + menuHeight > maxY ) {
                posY = Math.max( minY, maxY - menuHeight );
             }
         }
         if ( ((posX + menuWidth) > maxX) ||
              (((posY + menuHeight) > maxY) && (fUseUpperY == false)) || 
              (((posY + menuHeight) > maxUpperPosY) && (fUseUpperY == true)) ) {
             if (posX + menuWidth > maxX) {
                 this.menuTag.style.width = (maxX - posX) + "px";
             }
             else{
                 this.menuTag.style.width = menuWidth + "px";
             }

             if (fUseUpperY == false) {
                 if (posY + menuHeight > maxY) {
                     this.menuTag.style.height = (maxY - posY) + "px";
                 }
                 else {
                     this.menuTag.style.height = menuHeight + "px";
                 }
             } else {
                 if (posY + menuHeight > maxUpperPosY) {
                     this.menuTag.style.height = (maxUpperPosY - posY) + "px";
                 }
                 else {
                     this.menuTag.style.height = menuHeight + "px";
                 }
             }

             this.menuTag.style.overflow = "auto";
         } else { //196195 begins
             this.menuTag.style.width = menuWidth + "px";
             this.menuTag.style.height = menuHeight + "px";
             this.menuTag.style.overflow = "visible"; //196195
         } //196196 ends
      }

      debug( 'show ' + this.name + ': ' + posX + ', ' + posY );
      this.menuTag.style.left = posX + "px";
      this.menuTag.style.top = posY + "px";

      // make the context menu visible
      this.menuTag.style.visibility = "visible";
      this.isVisible = true;

      // set focus on the first menu item
      this.items[0].setSelected( true );
      this.items[0].anchorTag.focus();

	  /*
	  // no longer needed since fixed in Opera 9, and no other non-IE browsers need this
      // @01A - Hide any items that intersect this menu
      var coll = document.getElementsByTagName("SELECT");
      if (coll!=null)
      {
         for (i=0; i<coll.length; i++)
         {
            //Hide the element
            if (intersect(this.menuTag,coll[i]) == true ) {
               if (coll[i].style.visibility != "collapse") //@02C
               {
                  coll[i].style.visibility = "collapse"; //@02C
                  this.hiddenItems.push(coll[i]);
               }
            }
         }
      }
      coll = document.getElementsByTagName("IFRAME");
      if (coll!=null)
      {
         for (i=0; i<coll.length; i++)
         {
            //Hide the element
            if (intersect(this.menuTag,coll[i]) == true ) {
               if (coll[i].style.visibility != "hidden")
               {
                  coll[i].style.visibility = "hidden";
                  this.hiddenItems.push(coll[i]);
               }
            }
         }
      }
	  */
      // save old & set new hide action for this menu     
      onmousedown_ = document.onmousedown;
      document.onmousedown = hideCurrentContextMenu;
   }
}

// Test whether two objects overlap
function intersect(obj1 , obj2) //@01A
{
   var left1 =  parseInt(document.defaultView.getComputedStyle(obj1, '').getPropertyValue("left"));
   var right1 = left1 + parseInt(document.defaultView.getComputedStyle(obj1, '').getPropertyValue("width"));
   var top1 = parseInt(document.defaultView.getComputedStyle(obj1, '').getPropertyValue("top"));
   var bottom1 = top1 + parseInt(document.defaultView.getComputedStyle(obj1, '').getPropertyValue("height"));

   var left2 =  parseInt(document.defaultView.getComputedStyle(obj2, '').getPropertyValue("left"));
   var right2 = left2 + parseInt(document.defaultView.getComputedStyle(obj2, '').getPropertyValue("width"));
   var top2 = parseInt(document.defaultView.getComputedStyle(obj2, '').getPropertyValue("top"));
   var bottom2 = top2 + parseInt(document.defaultView.getComputedStyle(obj2, '').getPropertyValue("height"));

    //alert("Comparing: " +left1 + ", " + right1+ ", " +top1 + ", " + bottom1+ " to "  +left2 + ", "  +right2 + ", " +top2 + ", " +bottom2);
   if (lineIntersect(left1,right1, left2,right2)== true &&
       lineIntersect(top1,bottom1,top2,bottom2) == true) {
      return true;
   }
   return false;
}

// Test whether the two line segments a--b and c--d intersect.
function lineIntersect(a, b, c, d) //@01A
{
   //alert (a+"--"+b + "   " + c + "--" + d);
   //Assume that a < b && c < d
   if ( (a <= c  && c <= b) ||
        (a <= d && d <= b) ||
        (c <= a && d >= b ) )
   {
      return true;
   } else {
      return false;
   }
}

// hides the context menu
function UilContextMenuHide() {
   if ( this.menuTag != null ) {
      debug( 'hide ' + this.name );

      // hide any visible submenus first
      for ( var i=0; i<this.items.length; i++ ) {
         if ( this.items[i].submenu != null &&
              this.items[i].submenu.isVisible ) {
            this.items[i].submenu.hide();
         }
      }

      // clear selection
      if ( this.selectedItem != null ) {
         this.selectedItem.setSelected( false );
      }

      // make the context menu hidden
      this.menuTag.style.visibility = "hidden";
      this.isVisible = false;
      this.isDismissable = true;

      // @01A - Show any items that were hidden by this menu
      var itemCount = this.hiddenItems.length;
      for (i=0; i<itemCount; i++)
      {
         var item = this.hiddenItems.pop();
         item.style.visibility = "visible";
      }

      // clear the launcher
      this.launcher = null;
      
      // reset action      
      document.onmousedown = onmousedown_;
   }
}

// creates the context menu html element
function UilContextMenuCreate( recurse ) {
   if ( this.menuTag == null ) {
      this.menuTag = document.createElement( "DIV" );
      this.menuTag.style.position = "absolute";
      this.menuTag.style.cursor = "default";
      this.menuTag.style.visibility = "hidden";
      // following line does not work on Mozilla. SPR #PDIK66SJZ4
      //this.menuTag.style.width = "0px"; // this causes dynamic sizing
      //if (!this.isLTR) this.menuTag.dir = "RTL"; //196195
      this.menuTag.onmouseover = contextMenuDismissDisable;
      this.menuTag.onmouseout = contextMenuDismissEnable;
      this.menuTag.oncontextmenu = contextMenuOnContextMenu;

      var numItems = this.items.length;

      // check if this context menu contains icons or submenus
      var hasIcon = false;
      var hasSubmenu = false;
      for ( var i=0; i<numItems; i++ ) {
         if ( !this.items[i].isSeparator ) {
            if ( !hasSubmenu && this.items[i].submenu != null ) {
               hasSubmenu = true;
            }
            if ( !hasIcon && this.items[i].icon != null ) {
               hasIcon = true;
            }
            if ( hasSubmenu && hasIcon ) {
               break;
            }
         }
      }

      // create the menu items
      for ( var i=0; i<numItems; i++ ) {
         this.items[i].isFirst = ( i == 0 );
         this.items[i].isLast = ( i+1 == numItems );
         this.items[i].parentMenu = this;
         this.items[i].create( hasIcon, hasSubmenu );
      }

      // create the context menu border
      var border = document.createElement( "TABLE" );
      if (!this.isLTR) border.dir = "RTL";
      //border.className = "wclPopupMenuBorder"; //@04D
      border.rules = "none";
      border.cellPadding = 0;
      border.cellSpacing = 0;
      //border.width = "100%";
      border.border = 0;
      var borderBody = document.createElement( "TBODY" );
      var borderRow = document.createElement( "TR" );
      var borderData = document.createElement( "TD" );
      var borderDiv = document.createElement( "DIV" ); //@04A
      //borderDiv.className = "pop2"; //@04A   //@06C1
      
      //ARC CHANGES FOR SPECIFYING STYLES - BEGIN
      borderDiv.className = this.menuBorderStyle; 
      //ARC CHANGES FOR SPECIFYING STYLES - END

      borderData.appendChild( borderDiv ); //@04A
      borderRow.appendChild( borderData );
      borderBody.appendChild( borderRow );
      border.appendChild( borderBody );

      // create the context menu
      var table = document.createElement( "TABLE" );
      if (!this.isLTR) table.dir = "RTL";
      //table.className = "wclPopupMenu"; //@04D
      table.rules = "none";
      table.cellPadding = 0;
      table.cellSpacing = 0;
      table.width = "100%";
      table.border = 0;

      // add the menu items
      var tableBody = document.createElement( "TBODY" );
      table.appendChild( tableBody );

      // @04A - create another table for mozilla fix
      // (border styles not hidden correctly if set on table tag)
      var table2 = document.createElement( "TABLE" );
      if (!this.isLTR) table2.dir = "RTL";
      table2.rules = "none";
      table2.cellPadding = 0;
      table2.cellSpacing = 0;
      table2.width = "100%";
      table2.border = 0;
      var tableRow = document.createElement( "TR" );
      var tableData = document.createElement( "TD" );
      var tableDiv = document.createElement( "DIV" );
      //tableDiv.className = "pop1";     //@06C1

      //ARC CHANGES FOR SPECIFYING STYLES - BEGIN
      tableDiv.className = this.menuTableStyle;     //@06C1
      //ARC CHANGES FOR SPECIFYING STYLES - END

      var tableBody2 = document.createElement( "TBODY" );
      tableBody.appendChild( tableRow );
      tableRow.appendChild( tableData );
      tableData.appendChild( tableDiv );
      tableDiv.appendChild( table2 );
      table2.appendChild( tableBody2 );

      for ( var i=0; i<numItems; i++ ) {
         if ( this.items[i].isSeparator ) {
            this.items[i].createSeparator( tableBody2, hasSubmenu ); //@04C
         }
         else {
            tableBody2.appendChild( this.items[i].itemTag ); //@04C
         }
      }

      borderDiv.appendChild( table ); //@04C
      this.menuTag.appendChild( border );

      // add to document
      document.body.appendChild( this.menuTag );
   }

   if ( recurse ) {
      // this is used when cloning dynamic menus
      for ( var i=0; i<this.items.length; i++ ) {
         if ( this.items[i].submenu != null ) {
            this.items[i].submenu.create( recurse );
         }
      }
   }
}

// returns the menu item object associated with the html element
function UilContextMenuGetMenuItem( htmlElement ) {
   if ( htmlElement != null ) {
      if ( htmlElement.nodeType == 3 ) { //@06A
          // text node
          htmlElement = htmlElement.parentNode; //@06A
      }
      var tagName = htmlElement.tagName;
      var menuItemTag = null;
      if ( tagName == "IMG" ||
           tagName == "A" ) {
         menuItemTag = htmlElement.parentNode.parentNode;
      }
      else if ( tagName == "TD" ) {
         menuItemTag = htmlElement.parentNode;
      }
      for ( var i=0; i<this.items.length; i++ ) {
         if ( this.items[i].itemTag != null &&
              this.items[i].itemTag == menuItemTag ) {
            // found the item
            return this.items[i];
         }
         else if ( this.items[i].submenu != null &&
                   this.items[i].submenu.isVisible ) {
            // recurse through any visible submenus
            var item = this.items[i].submenu.getMenuItem( htmlElement );
            if ( item != null ) {
               // found the item
               return item;
            }
         }
      }
   }
   return null;
}

// returns the deepest selected menu item
function UilContextMenuGetSelectedItem() {
   var item = this.selectedItem;
   if ( item != null && item.submenu != null && item.submenu.isVisible ) {
      // recurse through the item's visible submenu
      return item.submenu.getSelectedItem();
   }
   return item;
}

// method called by an event handler (onmouseover for context menu div)
function contextMenuDismissEnable() {
   if ( visibleMenu_ != null ) {
      visibleMenu_.isDismissable = true;
      if (visibleMenu_.isHyperlinkChild) {
         setMenuTimer( ); // @05
      }
   }
}

// method called by an event handler (onmouseout for context menu div)
function contextMenuDismissDisable() {
   if ( visibleMenu_ != null ) {
      visibleMenu_.isDismissable = false;
      clearMenuTimer( ); // @05
   }
}

// method called by an event handler (oncontextmenu for context menu div)
function contextMenuOnContextMenu() {
   return false;
}

// constructor
function UilMenuItem( text, enabled, action, clientAction, submenu, icon, defItem,menuStyle, selectedMenuStyle ) {
   // member variables
   this.text = text;
   this.icon = icon;
   this.action = action;
   this.clientAction = clientAction;
   this.submenu = submenu;
   this.isSeparator = false;
   this.isSelected = false;
   this.isEnabled = ( enabled != null ) ? enabled : true;
   this.isDefault = ( defItem != null ) ? defItem : false;
   this.isFirst = false;
   this.isLast = false;
   this.parentMenu = null;
   
   if ( menuStyle != null ) {
      this.menuStyle = menuStyle; 
   }
   else {
      this.menuStyle = ( this.isEnabled ) ? "lwpMenuItem" : "lwpMenuItemDisabled"; 
   }

   this.selectedMenuStyle = ( selectedMenuStyle != null) ? selectedMenuStyle : "lwpSelectedMenuItem";

   // html variables
   this.itemTag = null;
   this.anchorTag = null;
   this.arrowTag = null;

   // internal methods
   this.create = UilMenuItemCreate;
   this.createSeparator = UilMenuItemCreateSeparator;
   this.setSelected = UilMenuItemSetSelected;
   this.updateStyle = UilMenuItemUpdateStyle;
   this.getNextItem = UilMenuItemGetNextItem;
   this.getPrevItem = UilMenuItemGetPrevItem;

   if ( this.submenu != null ) {
      // menu items with submenus do not have actions
      this.action = null;
   }
}

// creates the menu item html element
function UilMenuItemCreate( menuHasIcon, menuHasSubmenu ) {
   if ( !this.isSeparator ) {
      this.anchorTag = document.createElement( "A" );
      if ( this.action != null ) {
         this.anchorTag.href = "javascript:menuItemLaunchAction();";
         if ( this.clientAction != null && !wclIsOpera_ ) {
            this.anchorTag.onclick = this.clientAction;
         }
      }
      else if ( this.submenu != null ) {
         this.anchorTag.href = "javascript:void(0);";
         this.anchorTag.onclick = menuItemShowSubmenu;
      }
      else if ( this.clientAction != null ) {
         this.anchorTag.href = "javascript:menuItemLaunchAction();";
         if(!wclIsOpera_) this.anchorTag.onclick = this.clientAction;
      }
      this.anchorTag.onfocus = menuItemFocus;
      this.anchorTag.onblur = menuItemBlur;
      this.anchorTag.onkeydown = menuItemKeyDown;
      this.anchorTag.innerHTML = this.text;
//      this.anchorTag.title = this.text; 
      this.anchorTag.title = this.anchorTag.innerHTML; 
      //this.anchorTag.className = "pop5";    //@06C1
      this.anchorTag.className = this.menuStyle;    //@06C1
      if ( this.isDefault ) {
         this.anchorTag.style.fontWeight = "bold";
      }

      var td = document.createElement( "TD" );
      td.noWrap = true;
      td.style.padding = "3px";
      td.appendChild( this.anchorTag );

      // left padding or icon
      var leftPad = document.createElement( "TD" );
      leftPad.noWrap = true;
      leftPad.innerHTML = "&nbsp;";
      leftPad.style.padding = "3px";
      if ( this.icon != null ) {
         var imgTag = document.createElement( "IMG" );
         imgTag.src = this.icon;
         if (imgTag.src == "" || imgTag.src == null) {
             var imgTag1 = "<img src=\"" + this.icon + "\"";
             if ( this.text != null ) {
                imgTag1 += " alt=\'" + this.text + "\'";
                imgTag1 += " title=\'" + this.text + "\'";
             }
             imgTag1 += "/>";
             leftPad.innerHTML = imgTag1;
         } else {
             if ( this.text != null ) {
                imgTag.alt = this.text;
                imgTag.title = this.text;
             }
             leftPad.appendChild( imgTag );
         }
      }
      else {
         leftPad.width = padding_;
      }

      // right padding
      var rightPad = document.createElement( "TD" );
      rightPad.noWrap = true;
      rightPad.width = padding_;
      rightPad.innerHTML = "&nbsp;";
      rightPad.style.padding = "3px";

      this.itemTag = document.createElement( "TR" );
      this.itemTag.onmousemove = menuItemMouseMove;
      this.itemTag.onmousedown = menuItemLaunchAction;
      //this.itemTag.className = "pop5";  //@06C1
      this.itemTag.className = this.menuStyle;
      // put together the table row
      this.itemTag.appendChild( leftPad );
      this.itemTag.appendChild( td );
      this.itemTag.appendChild( rightPad );
      if ( menuHasSubmenu ) {
         // submenu arrow
         var submenuArrow = document.createElement( "TD" );
         submenuArrow.noWrap = true;
         submenuArrow.style.padding = "3px";
         if ( this.submenu != null ) {
            var submenuImg = document.createElement( "IMG" );
            submenuImg.alt = submenuAltText_;
            submenuImg.title = submenuAltText_;
            submenuImg.width = arrowWidth_;
            submenuImg.height = arrowHeight_;
            if (this.parentMenu.isLTR) submenuImg.src = arrowNorm_;
            else submenuImg.src = arrowNormRTL_;
            submenuArrow.appendChild( submenuImg );
            this.arrowTag = submenuImg;
         }
         else {
            submenuArrow.innerHTML = "&nbsp;";
         }
         this.itemTag.appendChild( submenuArrow );
      }

      // update the style of the menu item
      this.updateStyle( this.itemTag );
   }
}

// create the context menu separator html elements
function UilMenuItemCreateSeparator( tableBody, menuHasSubmenu ) {
   // create the context menu separator
   var numCols = ( menuHasSubmenu ) ? 4 : 3;

   for ( var i=0; i<4; i++ ) {
      var tr = document.createElement( "TR" );
      if ( i == 1 ) {
         //tr.className = "pop3";   //@06C1
         tr.className = "portlet-separator";   //@06C1
      }
      else if ( i == 2 ) {
         //tr.className = "pop4";   //@06C1
         tr.className = "lwpMenuBackground";   //@06C1
      }
      else {
         //tr.className = "pop5";   //@06C1
         tr.className = "lwpMenuItem";   //@06C1
      }

      var td = document.createElement( "TD" );
      td.noWrap = true;
      td.width = "100%";
      td.height = "1px";
      td.colSpan = numCols;

      //mmd - 06/09/06 - commenting out this section of code because it causes many additional requests
      //to the server everytime a context menu is opened.  after unit testing, removing piece of code
      //does not appear to affect the function of the menus
      /*var img = document.createElement( "IMG" );
      img.src = transImg_;
      img.width = 1;
      img.height = 1;
      img.style.display = "block";
      td.appendChild( img );*/

      tr.appendChild( td );
      tableBody.appendChild( tr );
   }
}

// changes the selected state for menu item
function UilMenuItemSetSelected( isSelected ) {

   if ( isSelected && !this.isSelected ) {
      debug( 'selected: ' + this.text );
      // handle the previous selection first
      if ( this.parentMenu != null &&
           this.parentMenu.isVisible &&
           this.parentMenu.selectedItem != null &&
           this.parentMenu.selectedItem != this ) {
         // hide previous selection's submenu
         if ( this.parentMenu.selectedItem.submenu != null ) {
            this.parentMenu.selectedItem.submenu.hide();
         }
         // unselect previous selection from parent menu
         this.parentMenu.selectedItem.setSelected( false );
      }

      // select this menu item
      this.isSelected = true;
      if ( this.parentMenu != null && this.parentMenu.isVisible ) {
         this.parentMenu.selectedItem = this;
      }

      // update the styles
      this.updateStyle( this.itemTag );
   }
   else if ( !isSelected && this.isSelected ) {
      debug( 'deselected: ' + this.text );
      // menu item cannot be unselected if its submenu is visible
      if ( this.submenu == null || ( this.submenu != null && !this.submenu.isVisible ) ) {
         // unselect this menu item
         this.isSelected = false;
         if ( this.parentmenu != null ) {
            this.parentmenu.selectedItem = null;
         }

         // update the styles
         this.updateStyle( this.itemTag );
      }
   }
}

// recursively set the style of the menu item html element
function UilMenuItemUpdateStyle( tag, styleID ) {
   if ( tag != null ) {
      if ( styleID == null ) {
         //styleID = "pop5";  //@06C1
         styleID = this.menuStyle;
         if ( !this.isEnabled ) {
            //styleID = "pop7"; //@06C1
            styleID = this.menuStyle; 
         }
         else if ( this.isSelected ) {
            //styleID = "pop6";  //@06C1
            styleID = this.selectedMenuStyle;  //@06C1
         }
         if ( this.arrowTag != null ) {
            if ( this.isEnabled && this.isSelected ) {
               if (this.parentMenu.isLTR) this.arrowTag.src = arrowSel_;
               else this.arrowTag.src = arrowSelRTL_;
            }
            else if ( !this.isEnabled ) {
               if (this.parentMenu.isLTR) this.arrowTag.src = arrowDis_;
               else this.arrowTag.src = arrowDisRTL_;
            }
            else {
               if (this.parentMenu.isLTR) this.arrowTag.src = arrowNorm_;
               else this.arrowTag.src = arrowNormRTL_;
            }
         }
      }
      tag.className = styleID;
      if ( tag.childNodes != null ) {
         for ( var i=0; i<tag.childNodes.length; i++ ) {
            this.updateStyle( tag.childNodes[i], styleID );
         }
      }
   }
}

// returns the next enabled, non-separator menu item after the given item
function UilMenuItemGetNextItem() {
   var menu = this.parentMenu;
   if ( menu != null ) {
      for ( var i=0; i<menu.items.length; i++ ) {
         if ( menu.items[i] == this ) {
            for ( var j=i+1; j<menu.items.length; j++ ) {
               if ( !menu.items[j].isSeparator && menu.items[j].isEnabled ) {
                  return menu.items[j];
               }
            }
            // no next item
            return null;
         }
      }
   }
   return null;
}

// returns the previous enabled, non-separator menu item before the given item
function UilMenuItemGetPrevItem() {
   var menu = this.parentMenu;
   if ( menu != null ) {
      for ( var i=menu.items.length-1; i>=0; i-- ) {
         if ( menu.items[i] == this ) {
            for ( var j=i-1; j>=0; j-- ) {
               if ( !menu.items[j].isSeparator && menu.items[j].isEnabled ) {
                  return menu.items[j];
               }
            }
            // no previous item
            return null;
         }
      }
   }
   return null;
}

// launches the action for a menu item
// method called by an event handler (href for anchor tag)
function menuItemLaunchAction() {
   if ( visibleMenu_ != null ) {
      //var evt = window.event;
      //var item = visibleMenu_.getMenuItem( evt.target );
      var item = visibleMenu_.getSelectedItem();
      if ( item != null && item.isEnabled ) {
         hideCurrentContextMenu( true );
         if ( item.clientAction != null ) {
            eval( item.clientAction );
         }
         if ( item.action != null ) {
            if ( item.action.indexOf( "javascript:" ) == 0 ) {
               eval( item.action );
            }
            else {
               //window.location.href = item.action; //@04D
            }
         }
      }
   }
}

// shows the submenu for a menu item
// method called by an event handler (onclick for anchor tag)
function menuItemShowSubmenu(evt) {
   if ( visibleMenu_ != null ) {
      var item = visibleMenu_.getMenuItem( evt.target );
      if ( item != null && item.isEnabled ) {
         var menu = item.submenu;
         if ( menu != null ) {
            menu.show( item.anchorTag, item );
         }
      }
   }
}

// focus handler for menu item
// method called by an event handler (onfocus for anchor tag)
function menuItemFocus(evt) {
   if ( visibleMenu_ != null ) {
      var item = visibleMenu_.getMenuItem( evt.target );
      if ( item != null ) {
         // select the focused menu item
         //item.anchorTag.hideFocus = item.isEnabled;
         item.setSelected( true );
      }
   }
}

// blur handler for menu item
// method called by an event handler (onblur for anchor tag)
function menuItemBlur(evt) {
   if ( visibleMenu_ != null ) {
      var item = visibleMenu_.getMenuItem( evt.target );
      if ( item != null ) {
         /* //jcp
         if ( item.isFirst && evt.shiftKey ) {
            debug( 'blur = ' + item.text );
            // user is shift tabbing off the beginning of the menu
            // set focus on the launcher
            item.parentMenu.launcher.focus();
            // hide the menu
            item.parentMenu.hide();
         }
         */
      }
   }
}

// key press handler for menu item
// method called by an event handler (onkeydown for anchor tag)
function menuItemKeyDown(evt) {
   var item = null;
   if ( visibleMenu_ != null ) {
      item = visibleMenu_.getMenuItem( evt.target );
   }
   if ( item != null ) {
      var next = null;
      switch ( evt.keyCode ) {
      case 38: // up key
         next = item.getPrevItem();
         if ( next != null ) {
            next.anchorTag.focus();
         }
         else if ( item.parentMenu != visibleMenu_ ) {
            item.parentMenu.launcher.focus();
            item.parentMenu.hide();
         }
         else {
            visibleMenu_.launcher.focus();
            hideCurrentContextMenu( true );
         }
         return false;
         break;
      case 40: // down key
         next = item.getNextItem();
         if ( next != null ) {
            next.anchorTag.focus();
         }
         else if ( item.parentMenu != visibleMenu_ ) {
            item.parentMenu.launcher.focus();
            item.parentMenu.hide();
         }
         else {
            visibleMenu_.launcher.focus();
            hideCurrentContextMenu( true );
         }
         return false;
         break;
      case 39: // right key
         if ( visibleMenu_.isLTR ) {
            if ( item.submenu != null ) {
               menuItemShowSubmenu(evt);
               item.submenu.items[0].anchorTag.focus();
            }
         }
         else {
            if ( item.parentMenu != visibleMenu_ ) {
               item.parentMenu.launcher.focus();
               item.parentMenu.hide();
            }
         }
         return false;
         break;
      case 37: // left key
         if ( visibleMenu_.isLTR ) {
            if ( item.parentMenu != visibleMenu_ ) {
               item.parentMenu.launcher.focus();
               item.parentMenu.hide();
            }
         }
         else {
            if ( item.submenu != null ) {
               menuItemShowSubmenu(evt);
               item.submenu.items[0].anchorTag.focus();
            }
         }
         return false;
         break;
      case 9: // tab key
         visibleMenu_.launcher.focus();
         hideCurrentContextMenu( true );
         break;
      case 27: // escape key
         visibleMenu_.launcher.focus();
         hideCurrentContextMenu( true );
         break;
      case 13: // enter key
         break;
      default:
         break;
      }
   }
}

// handle mouse move for menu item
// method called by an event handler (onmousemove for item tag)
function menuItemMouseMove(evt) {
   if ( visibleMenu_ != null ) {
      var item = visibleMenu_.getMenuItem( evt.target );
      if ( item != null ) {
         if ( !item.isSelected ) {
            // set focus on the anchor and select the menu item
            item.anchorTag.focus();
         }
         if ( item.submenu != null && !item.submenu.isVisible && item.isEnabled ) {
            // show the submenu
            item.submenu.show( item.anchorTag, item );
         }
      }
   }
}

// handle mouse down event for menu item
// method called by an event handler (onmousedown for item tag)
function menuItemMouseDown(evt) {
   /* //@08D
   if ( visibleMenu_ != null ) {
      var item = visibleMenu_.getMenuItem( evt.target );
      if ( item != null ) {
         item.setSelected( true );
      }
      else { //@03A
         item = visibleMenu_.getSelectedItem();
      }
      if ( item != null && item.anchorTag != evt.target ) {
         //item.anchorTag.click();
         menuItemLaunchAction();
      }
   }
   */
   menuItemLaunchAction(); //@08A
}

var allMenus_ = new Array();

//ARC CHANGES FOR SPECIFYING STYLES - BEGIN
//ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - BEGIN
function createContextMenu( name, isLTR, width, borderStyle, tableStyle, noActionsText, noActionsTextStyle, positionUnder ) {
   var menu = new UilContextMenu( name, isLTR, width, borderStyle, tableStyle, noActionsText, noActionsTextStyle, positionUnder );
   allMenus_[ allMenus_.length ] = menu;
   return menu;
}
//ARC CHANGES FOR SPECIFIYING EMPTY MENU TEXT - END
//ARC CHANGES FOR SPECIFYING STYLES - END

function getContextMenu( name ) {
   for ( var i=0; i<allMenus_.length; i++ ) {
      if ( allMenus_[i].name == name ) {
         return allMenus_[i];
      }
   }
   return null;
}

function showContextMenu( name, isDynamic, isCacheable ) {
   contextMenuShow( name, isDynamic, isCacheable, event.target, true );
}

function showContextMenu( name, launcher ) {
   contextMenuShow( name, false, false, launcher, true );
}

function contextMenuShow( name, isDynamic, isCacheable, launcher, doLoad ) {
   debug( "***** showContextMenu: " + name )

   //  We mnight need to find a suitable launcher...
   var oldLauncher = launcher;
   while ((null != launcher) && (null == launcher.tagName)) {
      launcher = launcher.parentNode;
   }
   if (null == launcher) { //  shouldn't happen, but...
      launcher = oldLauncher;
   }

   if ( eval( isDynamic ) ) {
      debug( 'showContextMenu: dynamic=true, load=' + eval( doLoad ) + ', cache=' + eval( isCacheable ) );
      // dynamically loaded menu
      if ( eval( doLoad ) ) {
         // load the url into hidden frame
         loadDynamicMenu( name );
      }

      // clone the dynamic menu from hidden frame
      menu = getDynamicMenu( name, eval( isCacheable ) );

      if ( menu == null && top.isContextMenuManager_ != null ) {
         // menu not done loading yet
         debug( 'showContextMenu: ' + name + ' added to queue' );
         top.contextMenuManagerRequest( name, window, launcher, isCacheable );
      }
   }
   else {
      debug( 'showContextMenu: static context menu' );
      // statically defined menu
      menu = getContextMenu( name );
      if ( menu == null ) {
         menu = createContextMenu( name, 150 );
      }
   }

   if ( menu != null ) {
      hideCurrentContextMenu( true );
      menu.show( launcher );
      visibleMenu_ = menu;
   }
   else {
      debug( 'showContextMenu: ' + name + ' unavailable' );
   }
   clearMenuTimer( ); // @05
}

// method called by an event handler (onmousedown for document)
function hideCurrentContextMenu( forceHide ) {
   if ( visibleMenu_ != null && ( forceHide == true || visibleMenu_.isDismissable ) ) {
//      contextMenuDismissEnable();
      if ( visibleMenu_.isVisible ) {
         visibleMenu_.hide();
      }
      if ( visibleMenu_.isDynamic && !visibleMenu_.isCacheable ) {
         uncacheContextMenu( visibleMenu_ );
      }
      visibleMenu_ = null;
   }
}

function uncacheContextMenu( menu ) {
   debug( 'uncache menu: ' + menu.name );
   // recurse
   for ( var i=0; i<menu.items.length; i++ ) {
      if ( menu.items[i].submenu != null ) {
         uncacheContextMenu( menu.items[i].submenu );
      }
   }

   // remove from all menus array
   for ( var i=0; i<allMenus_.length; i++ ) {
      if ( allMenus_[i] == menu ) {
         var temp = new Array();
         var index = 0;
         for ( var j=0; j<allMenus_.length; j++ ) {
            if ( j != i ) {
               temp[ index ] = allMenus_[ j ];
               index++;
            }
         }
         allMenus_ = temp;
         break;
      }
   }
}

function contextMenuSetIcons( transparentImage,
                              arrowDefault, arrowSelected, arrowDisabled,
                              launcherDefault, launcherSelected,
                              arrowDefaultRTL, arrowSelectedRTL, arrowDisabledRTL,
                              launcherDefaultRTL, launcherSelectedRTL ) {
   transImg_ = transparentImage;

   arrowNorm_ = arrowDefault;
   arrowSel_ = arrowSelected;
   arrowDis_ = arrowDisabled;
   launchNorm_ = launcherDefault;
   launchSel_ = launcherSelected;

   arrowNormRTL_ = arrowDefaultRTL;
   arrowSelRTL_ = arrowSelectedRTL;
   arrowDisRTL_ = arrowDisabledRTL;
   launchNormRTL_ = launcherDefaultRTL;
   launchSelRTL_ = launcherSelectedRTL;

   contextMenuPreloadImage( transImg_ );

   contextMenuPreloadImage( arrowNorm_ );
   contextMenuPreloadImage( arrowSel_ );
   contextMenuPreloadImage( arrowDis_ );
   contextMenuPreloadImage( launchNorm_ );
   contextMenuPreloadImage( launchSel_ );

   contextMenuPreloadImage( arrowNormRTL_ );
   contextMenuPreloadImage( arrowSelRTL_ );
   contextMenuPreloadImage( arrowDisRTL_ );
   contextMenuPreloadImage( launchNormRTL_ );
   contextMenuPreloadImage( launchSelRTL_ );
}

function contextMenuSetArrowIconDimensions( width, height ) {
   arrowWidth_ = width;
   arrowHeight_ = height;
}

function contextMenuPreloadImage( imgsrc ) {
   var preload = new Image();
   preload.src = imgsrc;
}

function toggleLauncherIcon( popupID, selected, isLTR ) {
   if ( selected ) {
      if ( isLTR ) {
         document.images[ popupID ].src = launchSel_;
      }
      else {
         document.images[ popupID ].src = launchSelRTL_;
      }
   }
   else {
      if ( isLTR ) {
         document.images[ popupID ].src = launchNorm_;
      }
      else {
         document.images[ popupID ].src = launchNormRTL_;
      }
   }
   return true;
}

function contextMenuSetNoActionsText( noActionsText, submenuAltText ) {
   noActionsText_ = noActionsText;
   submenuAltText_ = submenuAltText;
}

function contextMenuGetNoActionsText() {
   return noActionsText_;
}

function getWidth( tag ) {
   return tag.offsetWidth;
}

function getHeight( tag ) {
   return tag.offsetHeight;
}

function getLeft( tag, recurse ) {
   var size = 0;
   if ( tag != null ) {
      //size = parseInt( document.defaultView.getComputedStyle(tag, null).getPropertyValue("left") ); //@04D

      //@04A
      if ( recurse && tag.offsetParent != null ) {
         size += getLeft( tag.offsetParent, recurse );
      }
      if ( tag != null ) {
         size += tag.offsetLeft;
      }

   }
   return size;
}

function getTop( tag, recurse ) {
   var size = 0;
   if ( tag != null ) {
      //size = parseInt( document.defaultView.getComputedStyle(tag, null).getPropertyValue("top") ); //@04D

      //@04A
      if ( recurse && tag.offsetParent != null ) {
         size += getTop( tag.offsetParent, recurse );
      }
      if ( tag != null ) {
         size += tag.offsetTop;
      }

   }
   return size;
}

/*****************************************************
* code for dynamically loaded menus
*****************************************************/
function loadDynamicMenu( menuURL ) {
   debug( '* loadDynamicMenu: ' + menuURL );
   var menu = getContextMenu( menuURL );
   if ( menu != null ) {
      if ( menu.isVisible ) {
         // dynamic menu requested, but it's currently showing
         menu.hide();
      }
      if ( !menu.isCacheable ) {
         // make sure it's not in the cache
         uncacheContextMenu( menu );
      }
   }
   if ( getContextMenu( menuURL ) == null ) {
      if ( top.isContextMenuManager_ != null ) {
         debug( 'loadDynamicMenu: loading' );
         top.contextMenuManagerLoadDynamicMenu( menuURL );
      }
   }
}

function getDynamicMenu( menuURL, cache ) {
   debug( '* getDynamicMenu: ' + menuURL );
   var clone = getContextMenu( menuURL );
   if ( clone == null ) {
      if ( top.isContextMenuManager_ != null ) {
         if ( top.contextMenuManagerIsDynamicMenuLoaded() ) {
            var menu = top.contextMenuManagerGetDynamicMenu();
            debug( 'getDynamicMenu: fetched menu from other frame' );
            clone = cloneMenu( menu, menuURL, cache );
            if ( clone.items.length == 0 ) {
               contextMenuSetNoActionsText( top.contextMenuManagerGetNoActionsText() );
            }
         }
         else {
            debug( 'getDynamicMenu: menu not loaded' );
         }
      }
      else {
         debug( 'getDynamicMenu: menu manager not present' );
      }
   }
   else {
      debug( 'getDynamicMenu: menu previously loaded' );
   }
   return clone;
}

function cloneMenu( menu, name, cache ) {
   var clone = getContextMenu( name );
   if ( clone == null ) {
      if ( menu != null ) {
         clone = createContextMenu( name, menu.width );
      }
      else {
         clone = createContextMenu( name, 150 );
      }
      clone.isDynamic = true;
      clone.isCacheable = cache;
      if ( menu != null ) {
         for ( var i=0; i<menu.items.length; i++ ) {
            clone.add( cloneMenuItem( menu.items[i], name + "_sub" + i, cache ) );
         }
      }
   }
   return clone;
}

function cloneMenuItem( item, submenuName, cache ) {
   var submenu = null;
   if ( item.submenu != null ) {
      submenu = cloneMenu( item.submenu, submenuName, cache );
   }
   var clone = new UilMenuItem( item.text, item.isEnabled, item.action, item.clientAction, submenu, item.icon, null, null, null );
   clone.isEnabled = item.isEnabled;
   clone.isSelected = item.isSelected;
   clone.isSeparator = item.isSeparator;
   return clone;
}


//////////////////////////////////////////////////////////////////
// begin BrowserDimensions object definition
ContextMenuBrowserDimensions.prototype				= new Object();
ContextMenuBrowserDimensions.prototype.constructor = ContextMenuBrowserDimensions;
ContextMenuBrowserDimensions.superclass			= null;

function ContextMenuBrowserDimensions(){

    this.body = document.body;
    if (this.isStrictDoctype() && !this.isSafari()) {
        this.body = document.documentElement;
    }

}

ContextMenuBrowserDimensions.prototype.getScrollFromLeft = function(){
    return this.body.scrollLeft ;
}

ContextMenuBrowserDimensions.prototype.getScrollFromTop = function(){
    return this.body.scrollTop ;
}

ContextMenuBrowserDimensions.prototype.getViewableAreaWidth = function(){
    return this.body.clientWidth ;
}

ContextMenuBrowserDimensions.prototype.getViewableAreaHeight = function(){
    return this.body.clientHeight ;
}

ContextMenuBrowserDimensions.prototype.getHTMLElementWidth = function(){
    return this.body.scrollWidth ;
}

ContextMenuBrowserDimensions.prototype.getHTMLElementHeight = function(){
    return this.body.scrollHeight ;
}

ContextMenuBrowserDimensions.prototype.isStrictDoctype = function(){

    return (document.compatMode && document.compatMode != "BackCompat");

}

ContextMenuBrowserDimensions.prototype.isSafari = function(){

    return (navigator.userAgent.toLowerCase().indexOf("safari") >= 0);

}

ContextMenuBrowserDimensions.prototype.isOpera = function(){

    return /Opera/.test(navigator.userAgent);;

}

// end BrowserDimensions object definition
//////////////////////////////////////////////////////////////////


	




  
  	
  
        


delete djConfig.baseUrl;





