/* * jQuery JavaScript Library v1.3.2 * http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. * http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ (function(){var window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;}if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context);}else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]){return jQuery().find(selector);}var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret;}}else{return jQuery(context).find(selector);}}else{if(jQuery.isFunction(selector)){return jQuery(document).ready(selector);}}if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context;}return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector));},selector:"",jquery:"1.3.2",size:function(){return this.length;},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num];},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find"){ret.selector=this.selector+(this.selector?" ":"")+selector;}else{if(name){ret.selector=this.selector+"."+name+"("+selector+")";}}return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(typeof name==="string"){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name);}else{options={};options[name]=value;}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));}});},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined;}return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!=="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);}});});return ret;},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode){wrap.insertBefore(this[0]);}wrap.map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild;}return elem;}).append(this);}return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.appendChild(elem);}});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild);}});},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret;}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem);})),"find",selector);}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0];}else{return this.cloneNode(true);}});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName){return;}var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}i++;});}return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1;})),"filter",selector);},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur;}cur=cur.parentNode;closer++;}});},not:function(selector){if(typeof selector==="string"){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector);}else{selector=jQuery.multiFilter(selector,this);}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return !!selector&&this.is("."+selector);},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,"option")){return(elem.attributes.value||{}).specified?elem.value:elem.text;}if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null;}for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length){this.selectedIndex=-1;}}else{this.value=value;}}});},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,+i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first){for(var i=0,l=this.length; i1||i>0?fragment.cloneNode(true):fragment);}}if(scripts){jQuery.each(scripts,evalScript);}}return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"});}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");}if(elem.parentNode){elem.parentNode.removeChild(elem);}}function now(){return +new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}if(typeof target!=="object"&&!jQuery.isFunction(target)){target={};}if(length==i){target=this;--i;}for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options){elem.style[name]=old[name];}},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border"){return;}jQuery.each(which,function(){if(!extra){val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;}if(extra==="margin"){val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;}else{val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;}});}if(elem.offsetWidth!==0){getWH();}else{jQuery.swap(elem,props,getWH);}return Math.max(0,Math.round(val));}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(name.match(/float/i)){name=styleFloat;}if(!force&&style&&style[name]){ret=style[name];}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float";}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle){ret=computedStyle.getPropertyValue(name);}if(name=="opacity"&&ret==""){ret="1";}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}}}return ret;},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;}if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match){return[context.createElement(match[1])];}}var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number"){elem+="";}if(!elem){return;}if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">";});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!tags.indexOf("",""]||(!tags.indexOf("",""]||!tags.indexOf("",""]||!jQuery.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild;}if(!jQuery.support.tbody){var hasBody=/"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j]);}}}if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.nodeType){ret.push(elem);}else{ret=jQuery.merge(ret,elem);}});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1){ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));}fragment.appendChild(ret[i]);}}return scripts;}return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined;}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode){elem.parentNode.selectedIndex; }if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed";}elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue;}if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined;}return elem[name];}if(!jQuery.support.style&¬xml&&name=="style"){return jQuery.attr(elem.style,"cssText",value);}if(set){elem.setAttribute(name,""+value);}var attr=!jQuery.support.hrefNormalized&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set){elem[name]=value;}return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval){ret[0]=array;}else{while(i){ret[--i]=array[i];}}}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems);}return this.pushStack(ret,name,selector);};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name);}},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames,state){if(typeof state!=="boolean"){state=!jQuery.className.has(this,classNames);}jQuery.className[state?"add":"remove"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode){this.parentNode.removeChild(this);}}},empty:function(){jQuery(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild);}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id){id=elem[expando]=++uuid;}if(name&&!jQuery.cache[id]){jQuery.cache[id]={};}if(data!==undefined){jQuery.cache[id][name]=data;}return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break;}if(!name){jQuery.removeData(elem);}}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando);}}delete jQuery.cache[id];}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data)){q=jQuery.data(elem,type,jQuery.makeArray(data));}else{if(data){q.push(data);}}}return q;},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx"){fn=queue[0];}if(fn!==undefined){fn.call(elem);}}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key);}return data===undefined&&parts[1]?this.data(parts[0]):data;}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx";}if(data===undefined){return jQuery.queue(this[0],type);}return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1){queue[0].call(this);}});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});}}); /* * 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 chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[];}if(!selector||typeof selector!=="string"){return results;}var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break;}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector]){selector+=parts.shift();}set=posProcess(selector,set); }}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}if(pop==null){pop=context;}Expr.relative[cur](checkSet,pop,isXML(context));}}if(!checkSet){checkSet=set;}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector);}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else{if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}}else{makeArray(checkSet,results);}if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i=0)){if(!inplace){result.push(elem);}}else{if(inplace){curLoop[i]=false;}}}}return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase();},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}if(match[2]==="~="){match[4]=" "+match[4]+" ";}return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}return false;}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}}return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return !!elem.firstChild;},empty:function(elem){return !elem.firstChild;},has:function(elem,i,match){return !!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return imatch[3]-0;},nth:function(elem,i,match){return match[3]-0==i;},eq:function(elem,i,match){return match[3]-0==i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else{if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0;}else{if(name==="not"){var not=match[3];for(var i=0,l=not.length;i=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results;}return array;};try{Array.prototype.slice.call(document.documentElement.childNodes);}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}root.removeChild(form);})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}results=tmp;}return results;};}div.innerHTML="";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}})();if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="

";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}return oldSizzle(query,context,extra,seed);};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches;})();}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var div=document.createElement("div");div.innerHTML="
";if(div.getElementsByClassName("e").length===0){return;}div.lastChild.className="e";if(div.getElementsByClassName("e").length===1){return;}Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};})();}function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i0){match=elem;break;}}}elem=elem[dir];}checkSet[i]=match;}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16;}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument);};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i0||elem.offsetHeight>0; };Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")";}return Sizzle.matches(expr,elems);};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur);}cur=cur[dir];}return matched;};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break;}}return cur;};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n);}}return r;};return;window.Sizzle=Sizzle;})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return;}if(elem.setInterval&&elem!=window){elem=window;}if(!handler.guid){handler.guid=this.guid++;}if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].setup.call(elem,data,namespaces);}if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false);}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle);}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return;}var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""));}}else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler){delete events[type][handler.guid];}else{for(var handle in events[type]){if(namespace.test(events[type][handle].type)){delete events[type][handle];}}}if(jQuery.event.specialAll[type]){jQuery.event.specialAll[type].teardown.call(elem,namespaces);}for(ret in events[type]){break;}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false);}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}}}ret=null;delete events[type];}}});}for(ret in events){break;}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null;}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;}if(!elem){event.stopPropagation();if(this.global[type]){jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type]){jQuery.event.trigger(event,data,this.handle.elem);}});}}if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined;}event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event);}event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle){handle.apply(elem,data);}if((!elem[type]||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){event.result=false;}if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent){jQuery.event.trigger(event,data,parent,true);}}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}if(event.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(event){if(event[expando]){return event;}var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}if(!event.target){event.target=event.srcElement||document;}if(event.target.nodeType==3){event.target=event.target.parentNode;}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode;}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey;}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));}return event;},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments);};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler);},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type)){remove++;}});if(remove<1){jQuery.event.remove(this,namespaces[0],liveHandler);}}}}}};jQuery.Event=function(src){if(!this.preventDefault){return new jQuery.Event(src);}if(src&&src.type){this.originalEvent=src;this.type=src.type;}else{this.type=src;}this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;}function returnTrue(){return true;}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e){return;}if(e.preventDefault){e.preventDefault();}e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e){return;}if(e.stopPropagation){e.stopPropagation();}e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this){try{parent=parent.parentNode; }catch(e){parent=this;}}if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments);}};jQuery.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix);},teardown:function(){jQuery.event.remove(this,orig,withinElement);}};});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result;}},toggle:function(fn){var args=arguments,i=1;while(i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null;}else{if(typeof params==="object"){params=jQuery.param(params);type="POST";}}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("
").append(res.responseText.replace(//g,"")).find(selector):res.responseText);}if(callback){self.each(callback,[res.responseText,status,res]);}}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest(); },accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data);}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";}}s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head){head.removeChild(script);}};}if(s.dataType=="script"&&s.cache==null){s.cache=false;}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart");}var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset;}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=s.xhr();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password);}else{xhr.open(type,s.url,s.async);}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType);}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}xhr.abort();return false;}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s]);}var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}}}else{if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes;}if(!jsonp){success();}}else{jQuery.handleError(s,xhr,status);}complete();if(isTimeout){xhr.abort();}if(s.async){xhr=null;}}}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0){setTimeout(function(){if(xhr&&!requestDone){onreadystatechange("timeout");}},s.timeout);}}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async){onreadystatechange();}function success(){if(s.success){s.success(data,status);}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s]);}}function complete(){if(s.complete){s.complete(xhr,status);}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s]);}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop");}}return xhr;},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e);}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e]);}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url];}catch(e){}return false;},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror";}if(s&&s.dataFilter){data=s.dataFilter(data,type);}if(typeof data==="string"){if(type=="script"){jQuery.globalEval(data);}if(type=="json"){data=window["eval"]("("+data+")");}}return data;},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value);}if(jQuery.isArray(a)||a.jquery){jQuery.each(a,function(){add(this.name,this.value);});}else{for(var j in a){if(jQuery.isArray(a[j])){jQuery.each(a[j],function(){add(j,this);});}else{add(j,jQuery.isFunction(a[j])?a[j]():a[j]);}}}return s.join("&").replace(/%20/g,"+");}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;}jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback);}else{for(var i=0,l=this.length;i").appendTo("body");display=elem.css("display");if(display==="none"){display="block";}elem.remove();elemdisplay[tagName]=display;}jQuery.data(this[i],"olddisplay",display);}}for(var i=0,l=this.length;i=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true);}timers.splice(i,1);}}});if(!gotoEnd){this.dequeue();}return this;}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback);};});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue();}if(jQuery.isFunction(opt.old)){opt.old.call(this);}};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={};}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this);}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block";}},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false;}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block";}}if(this.options.hide){jQuery(this.elem).hide();}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p]);}}this.options.complete.call(this.elem);}return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null){fx.elem.style[fx.prop]=fx.now+fx.unit;}else{fx.elem[fx.prop]=fx.now;}}}});if(document.documentElement["getBoundingClientRect"]){jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0};}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0]);}var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left};};}else{jQuery.fn.offset=function(){if(!this[0]){return{top:0,left:0};}if(this[0]===this[0].ownerDocument.body){return jQuery.offset.bodyOffset(this[0]);}jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName))){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;}prevOffsetParent=offsetParent,offsetParent=elem.offsetParent;}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible"){top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;}prevComputedStyle=computedStyle;}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static"){top+=body.offsetTop,left+=body.offsetLeft;}if(prevComputedStyle.position==="fixed"){top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft);}return{top:top,left:left};};}jQuery.offset={initialize:function(){if(this.initialized){return;}var body=document.body,container=document.createElement("div"),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='
';rules={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(prop in rules){container.style[prop]=rules[prop];}container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow="hidden",innerDiv.style.position="relative";this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true;},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset){top+=parseInt(jQuery.curCSS(body,"marginTop",true),10)||0,left+=parseInt(jQuery.curCSS(body,"marginLeft",true),10)||0;}return{top:top,left:left};}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset(); offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent;}return jQuery(offsetParent);}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;jQuery.fn[method]=function(val){if(!this[0]){return null;}return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null;};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null;};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px");};});})(); /* * Inline Form Validation Engine 1.4, jQuery plugin * * Copyright(c) 2009, Cedric Dugas * http://www.position-relative.net * * Form validation engine which allow custom regex rules to be added. * Licenced under the MIT Licence */ (function($) { $.fn.validationEngine = function(settings) { if($.validationEngineLanguage){ // IS THERE A LANGUAGE LOCALISATION ? allRules = $.validationEngineLanguage.allRules }else{ allRules = {"required":{ // Add your regex rules here, you can take telephone as an example "regex":"none", "alertText":"* To pole jest obowi\u0105zkowe."}, "tytul":{ "regex":/^[^\t][0-9a-zA-Z ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\-\.,"]+$/, "alertText":"* Tytu\u0142 mo\u017ce zawiera\u0107 wy\u0142acznie litery, cyfry i spacje oraz znaki minusa, cudzysłowia, kropki i przecinka."}, "dodatkowe":{ "regex":/^[^_puste]+$/, "alertText":"Wpisz warto\u015b\u0107, albo usu\u0144 wiersz klikaj\u0105c usu\u0144."}, "selectAdres":{ "regex":/^[a-zA-Z ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\-.]+$/, "alertText":"* Wybierz adres z listy bad\u017a wprowad\u017a nowy wybieraj\u0105c opcj\u0119 Inny. Pole mo\u017ce zawiera\u0107 wy\u0142acznie litery, znaki spacji, kropki oraz minusa."}, "email":{ "regex":/^[a-zA-Z0-9_\.\-]+@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]{2,4}$/, "alertText":"* Niepoprawny adres e-mail."}, "data":{ "regex":/^[0-9]{2}\-[0-9]{2}\-[0-9]{4}$/, "alertText":"* Niepoprwany format daty. Data powina by\u0107 podana w formacie DD-MM-YYYY (np. 21-12-2010)."}, "tagi":{ "regex":/^[^_][A-Za-z0-9_ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\- ,]*[^,]$/, "alertText":"Tag musi zaczyna\u0107 si\u0119 liter\u0105 b\u0105d\u017a cyfr\u0105. Znak przecinka rozdziela tagi. Pole mo\u017ce zawiera\u0107 znaki spacji, podkre\u015blenia oraz minusa."}, "kolejne":{ "regex":/^[^\t][0-9a-zA-Z ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\-\.,'"?]+$/, "alertText":"Pole mo\u017ce zawiera\u0107 wy\u0142acznie litery, cyfry i spacje oraz znaki minusa, cudzysłowia, kropki, pytajnika, apostrofa i przecinka."}, "godzina":{ "regex":/^[0-9]{2}:[0-9]{2}$/, "alertText":"Godzina powinna by\u0107 podana w formacie HH:MM (np. 12:30)."}, "length":{ "regex":"none", "alertText":"* Nieprawid\u0142owa ilo\u015b\u0107 wprowadzonych znaków. Dozwolone od ", "alertText2":" do ", "alertText3": " znaków" }, "properURL_http_s_ftp":{ "regex":/^(ftp|http|https):\/\/(([a-zA-Z0-9_-]+\.){1,})\w{2,}?(\/|\/([\w#!:.?+=&%@!\-\/])+)*$/i, "alertText":"Wprowad\u017a adres URL w poprawnym formacie (np: http://..., ftp://...)." }, "confirm":{ "regex":"none", "alertText":"* Wpisane has\u0142a nie s\u0105 jednakowe." }, "fname":{ "regex":/^[^\t][a-zA-Z ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\-\.]+$/, "alertText":"* Imię mo\u017ce zawiera\u0107 wy\u0142\u0105cznie litery oraz znaki spacji, kropki i minusa." }, "lname":{ "regex":/^[^\t][a-zA-Z ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\-\.]+$/, "alertText":"* Nazwisko mo\u017ce zawiera\u0107 wy\u0142\u0105cznie litery oraz znaki spacji, kropki i minusa." }, "tresc":{ "regex":/^[^\t][0-9a-zA-Z ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\-\_.,'"?!]+$/, "alertText":"* Pole Opis mo\u017ce zawiera\u0107 wy\u0142acznie litery, cyfry, znaki spacji, minusa, cudzysłowia, apostrofu, pytajnika, wykrzyknika, kropki i przecinka." }, "nazwaGrupy":{ "regex":/^[^\t][0-9a-zA-Z ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\-\.,'"]+$/, "alertText":"* Nazwa mo\u017ce zawiera\u0107 wy\u0142\u0105cznie litery, cyfry, znaki spacji, minusa, cudzysłowia, apostrofu, kropki i przecinka." }, "userid":{ "regex":/^[^\t][a-zA-Z0-9\-\_\.]+$/, "alertText":"* Nazwa u\u017cytkownika mo\u017ce zawiera\u0107 wy\u0142\u0105cznie litery, cyfry, znak podkre\u015blenia, kropk\u0119 oraz znak minusa. Nie mo\u017ce zawiera\u0107 polskich znaków." }, "telefon":{ "regex":/^[0-9()_\*\+\.-]*$/, "alertText":"* Numer telefonu mo\u017ce zawiera\u0107 tylko cyfry oraz znaki nawiasów okrągłych, gwiazdki, kropki, plusa i minusa." }, "cyfry":{ "regex":/^[0-9]*$/, "alertText":"* Pole mo\u017ce zawiera\u0107 tylko cyfry." }, "podstawoweznaki":{ "regex":/^[0-9a-zA-Z_@\+\.-]*$/, "alertText":"* Pole mo\u017ce zawiera\u0107 tylko litery, cyfry oraz znaki minusa, plusa, kropki, małpy i podkreślenia." } } } settings = jQuery.extend({ allrules:allRules, inlineValidation: true, ajaxSubmit: false, promptPosition: "centerRight", // OPENNING BOX POSITION, IMPLEMENTED: topLeft, topRight, bottomLeft, centerRight, bottomRight success : false, failure : function() {} }, settings); $.validationEngine.ajaxValidArray = new Array() // ARRAY FOR AJAX: VALIDATION MEMORY $(this).bind("submit", function(caller){ // ON FORM SUBMIT, CONTROL AJAX FUNCTION IF SPECIFIED ON DOCUMENT READY $.validationEngine.onSubmitValid = true; if($.validationEngine.submitValidation(this,settings) == false){ if($.validationEngine.submitForm(this,settings) == true) {return false;} }else{ settings.failure && settings.failure(); return false; } }) if(settings.inlineValidation == true){ // Validating Inline ? $(this).find("[class^=validate]").not("[type=checkbox]").bind("blur change keyup", function(caller){ _inlinEvent(this) }) $(this).find("[class^=validate][type=checkbox]").bind("click", function(caller){ _inlinEvent(this) }) function _inlinEvent(caller){ if($.validationEngine.intercept == false || !$.validationEngine.intercept){ // STOP INLINE VALIDATION THIS TIME ONLY $.validationEngine.onSubmitValid=false; $.validationEngine.loadValidation(caller,settings); }else{ $.validationEngine.intercept = false; } } } }; $.validationEngine = { submitForm : function(caller){ if($.validationEngine.settings.ajaxSubmit){ $.ajax({ type: "POST", url: $.validationEngine.settings.ajaxSubmitFile, async: true, data: $(caller).serialize(), beforeSend: function(){ }, success: function(data){ if(data == "true"){ // EVERYTING IS FINE, SHOW SUCCESS MESSAGE $(caller).css("opacity",1) $(caller).animate({opacity: 0, height: 0}, function(){ $(caller).css("display","none") $(caller).before("
"+$.validationEngine.settings.ajaxSubmitMessage+"
") $.validationEngine.closePrompt(".formError",true) $(".ajaxSubmit").show("slow") if ($.validationEngine.settings.success){ // AJAX SUCCESS, STOP THE LOCATION UPDATE $.validationEngine.settings.success && $.validationEngine.settings.success(); return false; } }) }else{ // HOUSTON WE GOT A PROBLEM (SOMETING IS NOT VALIDATING) data = eval( "("+data+")"); errorNumber = data.jsonValidateReturn.length for(index=0; index
'); } if($.validationEngine.settings.promptPosition == "topLeft" || $.validationEngine.settings.promptPosition == "topRight"){ $(divFormError).append(arrow) $(arrow).html('
'); } } $(formErrorContent).html(promptText) callerTopPosition = $(caller).offset().top; callerleftPosition = $(caller).offset().left; callerWidth = $(caller).width() inputHeight = $(divFormError).height() /* POSITIONNING */ if($.validationEngine.settings.promptPosition == "topRight"){callerleftPosition += callerWidth -30; callerTopPosition += -inputHeight -10; } if($.validationEngine.settings.promptPosition == "topLeft"){ callerTopPosition += -inputHeight -10; } if($.validationEngine.settings.promptPosition == "centerRight"){ callerleftPosition += callerWidth +33; } if($.validationEngine.settings.promptPosition == "bottomLeft"){ callerHeight = $(caller).height(); callerleftPosition = callerleftPosition; callerTopPosition = callerTopPosition + callerHeight + 15; } if($.validationEngine.settings.promptPosition == "bottomRight"){ callerHeight = $(caller).height(); callerleftPosition += callerWidth -30; callerTopPosition += callerHeight + 15; } $(divFormError).css({ top:callerTopPosition, left:callerleftPosition, opacity:0 }) return $(divFormError).animate({"opacity":0.87},function(){return true;}); }, updatePromptText : function(caller,promptText,type,ajaxed) { // UPDATE TEXT ERROR IF AN ERROR IS ALREADY DISPLAYED linkTofield = $(caller).attr("id") + "formError"; linkTofield = linkTofield.replace("[",""); linkTofield = linkTofield.replace("]",""); var updateThisPrompt = "."+ linkTofield; if(type == "pass") { $(updateThisPrompt).addClass("greenPopup") }else{ $(updateThisPrompt).removeClass("greenPopup")}; if(type == "load") { $(updateThisPrompt).addClass("blackPopup") }else{ $(updateThisPrompt).removeClass("blackPopup")}; if(ajaxed) { $(updateThisPrompt).addClass("ajaxed") }else{ $(updateThisPrompt).removeClass("ajaxed")}; $(updateThisPrompt).find(".formErrorContent").html(promptText) callerTopPosition = $(caller).offset().top; inputHeight = $(updateThisPrompt).height() if($.validationEngine.settings.promptPosition == "bottomLeft" || $.validationEngine.settings.promptPosition == "bottomRight"){ callerHeight = $(caller).height() callerTopPosition = callerTopPosition + callerHeight + 15 } if($.validationEngine.settings.promptPosition == "centerRight"){ callerleftPosition += callerWidth +33;} if($.validationEngine.settings.promptPosition == "topLeft" || $.validationEngine.settings.promptPosition == "topRight"){ callerTopPosition = callerTopPosition -inputHeight -10 } $(updateThisPrompt).animate({ top:callerTopPosition }); }, loadValidation : function(caller,settings) { // GET VALIDATIONS TO BE EXECUTED $.validationEngine.settings = settings rulesParsing = $(caller).attr('class'); rulesRegExp = /\[(.*)\]/; getRules = rulesRegExp.exec(rulesParsing); str = getRules[1] pattern = /\W+/; result= str.split(pattern); var validateCalll = $.validationEngine.validateCall(caller,result) return validateCalll }, validateCall : function(caller,rules) { // EXECUTE VALIDATION REQUIRED BY THE USER FOR THIS FIELD var promptText ="" var prompt = $(caller).attr("id"); var caller = caller; ajaxValidate = false var callerName = $(caller).attr("name") $.validationEngine.isError = false; $.validationEngine.showTriangle = true callerType = $(caller).attr("type"); for (i=0; i 1 && callerType == "radio") { // Hack for radio group button, the validation go the first radio caller = $("input[name="+callerName+"]:first"); $.validationEngine.showTriangle = false; var callerId ="."+ $(caller).attr("id")+"formError"; if($(callerId).size()==0){ $.validationEngine.isError = true; }else{ $.validationEngine.isError = false;} } if($("input[name="+callerName+"]").size()> 1 && callerType == "checkbox") { // Hack for checkbox group button, the validation go the first radio caller = $("input[name="+callerName+"]:first"); $.validationEngine.showTriangle = false; var callerId ="div."+ $(caller).attr("id")+"formError"; if($(callerId).size()==0){ $.validationEngine.isError = true; }else{ $.validationEngine.isError = false;} } } function radioHackClose(){ if($("input[name="+callerName+"]").size()> 1 && callerType == "radio") { // Hack for radio group button, the validation go the first radio caller = $("input[name="+callerName+"]:first"); } if($("input[name="+callerName+"]").size()> 1 && callerType == "checkbox") { // Hack for checkbox group button, the validation go the first radio caller = $("input[name="+callerName+"]:first"); } } /* VALIDATION FUNCTIONS */ function _required(caller,rules){ // VALIDATE BLANK FIELD callerType = $(caller).attr("type"); if (callerType == "text" || callerType == "password" || callerType == "textarea"){ if(!$(caller).val()){ $.validationEngine.isError = true; promptText += $.validationEngine.settings.allrules[rules[i]].alertText+"
"; } } if (callerType == "radio" || callerType == "checkbox" ){ callerName = $(caller).attr("name"); if($("input[name="+callerName+"]:checked").size() == 0) { $.validationEngine.isError = true; if($("input[name="+callerName+"]").size() ==1) { promptText += $.validationEngine.settings.allrules[rules[i]].alertTextCheckboxe+"
"; }else{ promptText += $.validationEngine.settings.allrules[rules[i]].alertTextCheckboxMultiple+"
"; } } } if (callerType == "select-one") { // added by paul@kinetek.net for select boxes, Thank you callerName = $(caller).attr("id"); if(!$("select[name="+callerName+"]").val()) { $.validationEngine.isError = true; promptText += $.validationEngine.settings.allrules[rules[i]].alertText+"
"; } } if (callerType == "select-multiple") { // added by paul@kinetek.net for select boxes, Thank you callerName = $(caller).attr("id"); if(!$("#"+callerName).val()) { $.validationEngine.isError = true; promptText += $.validationEngine.settings.allrules[rules[i]].alertText+"
"; } } } function _customRegex(caller,rules,position){ // VALIDATE REGEX RULES customRule = rules[position+1]; pattern = eval($.validationEngine.settings.allrules[customRule].regex); if(!pattern.test($(caller).attr('value'))){ $.validationEngine.isError = true; promptText += $.validationEngine.settings.allrules[customRule].alertText+"
"; } } function _ajax(caller,rules,position){ // VALIDATE AJAX RULES customAjaxRule = rules[position+1]; postfile = $.validationEngine.settings.allrules[customAjaxRule].file; fieldValue = $(caller).val(); ajaxCaller = caller; fieldId = $(caller).attr("id"); ajaxValidate = true; ajaxisError = $.validationEngine.isError; /* AJAX VALIDATION HAS ITS OWN UPDATE AND BUILD UNLIKE OTHER RULES */ if(!ajaxisError){ $.ajax({ type: "POST", url: postfile, async: true, data: "validateValue="+fieldValue+"&validateId="+fieldId+"&validateError="+customAjaxRule, beforeSend: function(){ // BUILD A LOADING PROMPT IF LOAD TEXT EXIST if($.validationEngine.settings.allrules[customAjaxRule].alertTextLoad){ if(!$("div."+fieldId+"formError")[0]){ return $.validationEngine.buildPrompt(ajaxCaller,$.validationEngine.settings.allrules[customAjaxRule].alertTextLoad,"load"); }else{ $.validationEngine.updatePromptText(ajaxCaller,$.validationEngine.settings.allrules[customAjaxRule].alertTextLoad,"load"); } } }, success: function(data){ // GET SUCCESS DATA RETURN JSON data = eval( "("+data+")"); // GET JSON DATA FROM PHP AND PARSE IT ajaxisError = data.jsonValidateReturn[2]; customAjaxRule = data.jsonValidateReturn[1]; ajaxCaller = $("#"+data.jsonValidateReturn[0])[0]; fieldId = ajaxCaller; ajaxErrorLength = $.validationEngine.ajaxValidArray.length existInarray = false; if(ajaxisError == "false"){ // DATA FALSE UPDATE PROMPT WITH ERROR; _checkInArray(false) // Check if ajax validation alreay used on this field if(!existInarray){ // Add ajax error to stop submit $.validationEngine.ajaxValidArray[ajaxErrorLength] = new Array(2) $.validationEngine.ajaxValidArray[ajaxErrorLength][0] = fieldId $.validationEngine.ajaxValidArray[ajaxErrorLength][1] = false existInarray = false; } $.validationEngine.ajaxValid = false; promptText += $.validationEngine.settings.allrules[customAjaxRule].alertText+"
"; $.validationEngine.updatePromptText(ajaxCaller,promptText,"",true); }else{ _checkInArray(true) $.validationEngine.ajaxValid = true; if($.validationEngine.settings.allrules[customAjaxRule].alertTextOk){ // NO OK TEXT MEAN CLOSE PROMPT $.validationEngine.updatePromptText(ajaxCaller,$.validationEngine.settings.allrules[customAjaxRule].alertTextOk,"pass",true); }else{ ajaxValidate = false; $.validationEngine.closePrompt(ajaxCaller); } } function _checkInArray(validate){ for(x=0;x"; } } function _length(caller,rules,position){ // VALIDATE LENGTH startLength = eval(rules[position+1]); endLength = eval(rules[position+2]); feildLength = $(caller).attr('value').length; if(feildLengthendLength){ $.validationEngine.isError = true; promptText += $.validationEngine.settings.allrules["length"].alertText+startLength+$.validationEngine.settings.allrules["length"].alertText2+endLength+$.validationEngine.settings.allrules["length"].alertText3+"
" } } function _maxCheckbox(caller,rules,position){ // VALIDATE CHECKBOX NUMBER nbCheck = eval(rules[position+1]); groupname = $(caller).attr("name"); groupSize = $("input[name='"+groupname+"']:checked").size(); if(groupSize > nbCheck){ $.validationEngine.showTriangle = false $.validationEngine.isError = true; promptText += $.validationEngine.settings.allrules["maxCheckbox"].alertText+"
"; } } function _minCheckbox(caller,rules,position){ // VALIDATE CHECKBOX NUMBER nbCheck = eval(rules[position+1]); groupname = $(caller).attr("name"); groupSize = $("input[name='"+groupname+"']:checked").size(); if(groupSize < nbCheck){ $.validationEngine.isError = true; $.validationEngine.showTriangle = false; promptText += $.validationEngine.settings.allrules["minCheckbox"].alertText+" "+nbCheck+" "+$.validationEngine.settings.allrules["minCheckbox"].alertText2+"
"; } } return($.validationEngine.isError) ? $.validationEngine.isError : false; }, closePrompt : function(caller,outside) { // CLOSE PROMPT WHEN ERROR CORRECTED if(outside){ $(caller).fadeTo("fast",0,function(){ $(caller).remove(); }); return false; } if(!ajaxValidate){ linkTofield = $(caller).attr("id") + "formError"; linkTofield = linkTofield.replace("[",""); linkTofield = linkTofield.replace("]",""); closingPrompt = "."+linkTofield; $(closingPrompt).fadeTo("fast",0,function(){ $(closingPrompt).remove(); }); } }, submitValidation : function(caller,settings) { // FORM SUBMIT VALIDATION LOOPING INLINE VALIDATION var stopForm = false; $.validationEngine.settings = settings $.validationEngine.ajaxValid = true $(caller).find(".formError").remove(); var toValidateSize = $(caller).find("[class^=validate]").size(); $(caller).find("[class^=validate]").each(function(){ callerId = $(this).attr("id") if(!$("."+callerId+"formError").hasClass("ajaxed")){ // DO NOT UPDATE ALREADY AJAXED FIELDS (only happen if no normal errors, don't worry) var validationPass = $.validationEngine.loadValidation(this,settings); return(validationPass) ? stopForm = true : ""; } }); ajaxErrorLength = $.validationEngine.ajaxValidArray.length // LOOK IF SOME AJAX IS NOT VALIDATE for(x=0;x " + message; if ( typeof( console ) == "undefined" ) { console.debug( 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. if ( this.debug.enabled ) { this.debug.log( this.className, "getCookie( " + cookieName + " )" ); } cookieName = cookieName + "=" var retVal = null; if ( this.debug.enabled ) { this.debug.log( this.className, "document.cookie=" + document.cookie ); this.debug.log( this.className, "indexOf cookieName: " + document.cookie.indexOf( cookieName ) ); } if ( document.cookie.indexOf( cookieName ) >= 0 ) { var cookies = document.cookie.split(";"); var c = 0; if ( this.debug.enabled && cookies.length > 0 ) { this.debug.log( this.className, "cookies[0] = " + cookies[0] ); } while ( c < cookies.length && ( cookies[c].indexOf( cookieName ) == -1 ) ) { if ( this.debug.enabled ) { this.debug.log( this.className, "cookies[" + c + "] = " + cookies[0] ); } c=c+1; } //Make sure there's no leading or trailing spaces on our cookie name/value pair. var cookieNVP = cookies[c].replace( /^[ \s]+|[ \s]+$/, '' ); if ( this.debug.enabled ) { this.debug.log( this.className, "cookieName=\"" + cookieName + "\"." ); this.debug.log( this.className, "cookieName.length=\"" + cookieName.length + "\"." ); this.debug.log( this.className, "cookieNVP=\"" + cookieNVP + "\"." ); this.debug.log( this.className, "cookieNVP.length=\"" + cookieNVP.length + "\"." ); } var cookieValue = cookieNVP.substring( cookieName.length ); if ( this.debug.enabled ) { this.debug.log( this.className, "cookie value =\"" + cookieValue + "\"."); } if ( cookieValue != "null" ) { retVal = cookieValue; } } if ( this.debug.enabled ) { this.debug.log( this.className, "getCookie( " + cookieName + " ) return " + retVal ); } 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; if ( this.debug.enabled ) { this.debug.log( this.className, "document.cookie after setting the cookie=" + document.cookie ); } }, 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 ] + ") "); } if(wpsFLY_isIE){ this.setCookie( cookieName, "null", this._deleteDate); }else{ this.setCookie( cookieName, ""); } } } // 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] = ; // array[i+1] = ). 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 = "-9999px"; 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=''; //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 ); } } 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 ) // 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(){ if(this.isSafari()) return document.documentElement.clientHeight; 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); } BrowserDimensions.prototype.isOpera = function(){ return (navigator.userAgent.toLowerCase().indexOf("opera") >= 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() { if ( document.getElementById( this.ID ) ) { //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() { if ( document.getElementById( this.ID ) ) { //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('
  • '); document.write(flyOut[arrayIndex].altText); //document.write(''+flyOut[arrayIndex].altText+''); document.write('
  • '); } 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 ) { document.write(''); } // ----------------------------------------------------------------- // 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 = "\"\" " + 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 ); var iframeLocation = window.frames[this.iframeID].location; if ( this.debug.enabled ) { this.debug.log( this.className, "Url returned from getUrl is: " + url ); this.debug.log( this.className, "Current iframe url is: " + iframeLocation.href ); this.debug.log( this.className, "Are they equal? " + ( url == iframeLocation.href ) ); } 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. //In CSA, the state serialization service returns the url without the protocol, host, and port while //the iframe url includes this information. So we compare the complete href value AND the pathname value of //the iframe location. if ( iframeLocation.href != url && iframeLocation.pathname != 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 = " " + 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", debug: wptheme_DebugUtils, 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 if ( this.debug.enabled ) { this.debug.log( this.className, "init( " + [ doc ] + ")" ); } var cookie = this.cookieUtils.getCookie( this.cookieName ); if ( cookie && cookie != "null" ) { this.containerStatus = parseInt( cookie ); } if ( this.debug.enabled ) { this.debug.log( this.className, "containerStatus is " + this.containerStatus ); } 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.debug.enabled ) { this.debug.log( this.className, "toggle()" ); } 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. if ( this.debug.enabled ) { this.debug.log( this.className, "persist()" ); } 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. if ( this.debug.enabled ) { this.debug.log( this.className, "unpersist()" ); } 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. if ( this.debug.enabled ) { this.debug.log( this.className, "_makeVisible()" ); } 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. if ( this.debug.enabled ) { this.debug.log( this.className, "disable()" ); } 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. if ( this.debug.enabled ) { this.debug.log( this.className, "_hide()" ); } 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'; this.paletteManager.hide( document ); //Persistence cleanup. this.unpersist(); }, _show: function () { //Retrieve the applicable DOM elements. if ( this.debug.enabled ) { this.debug.log( this.className, "_show()" ); } 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["navigator"]){if(/3[\.0-9]+ Safari/.test(navigator.appVersion)&&this["console"]){this.console={_c:this.console,log:function(s){this._c.log(s);},info:function(s){this._c.info(s);},error:function(s){this._c.error(s);},warn:function(s){this._c.warn(s);}};}}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 tcn=tn+"";console[tcn]=function(){var a=Array.apply({},arguments);a.unshift(tcn+":");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 opt in djConfig){d.config[opt]=djConfig[opt];}}var _14=["Browser","Rhino","Spidermonkey","Mobile"];var t;while((t=_14.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,_18){var _19={};for(var x in _18){if(_19[x]===undefined||_19[x]!=_18[x]){obj[x]=_18[x];}}if(d["isIE"]&&_18){var p=_18.toString;if(typeof p=="function"&&p!=obj.toString&&p!=_19.toString&&p!="\nfunction toString() {\n [native code]\n}\n"){obj.toString=_18.toString;}}return obj;};dojo.mixin=function(obj,_1d){for(var i=1,l=arguments.length;i0){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(_4f){var _50=_4f.split(".");for(var i=_50.length;i>0;i--){var _52=_50.slice(0,i).join(".");if((i==1)&&!this._moduleHasPrefix(_52)){_50[0]="../"+_50[0];}else{var _53=this._getModulePrefix(_52);if(_53!=_52){_50.splice(0,i,_53);break;}}}return _50;};dojo._global_omit_module_check=false;dojo._loadModule=dojo.require=function(_54,_55){_55=this._global_omit_module_check||_55;var _56=this._loadedModules[_54];if(_56){return _56;}var _57=this._getModuleSymbols(_54).join("/")+".js";var _58=(!_55)?_54:null;var ok=this._loadPath(_57,_58);if(!ok&&!_55){throw new Error("Could not load '"+_54+"'; last tried '"+_57+"'");}if(!_55&&!this._isXDomain){_56=this._loadedModules[_54];if(!_56){throw new Error("symbol '"+_54+"' is not defined after loading '"+_57+"'");}}return _56;};dojo.provide=function(_5a){_5a=_5a+"";return (d._loadedModules[_5a]=d.getObject(_5a,true));};dojo.platformRequire=function(_5b){var _5c=_5b.common||[];var _5d=_5c.concat(_5b[d._name]||_5b["default"]||[]);for(var x=0;x<_5d.length;x++){var _5f=_5d[x];if(_5f.constructor==Array){d._loadModule.apply(d,_5f);}else{d._loadModule(_5f);}}};dojo.requireIf=function(_60,_61){if(_60===true){var _62=[];for(var i=1;i0&&!(j==1&&_73[0]=="")&&_73[j]==".."&&_73[j-1]!=".."){if(j==(_73.length-1)){_73.splice(j,1);_73[j-1]="";}else{_73.splice(j-1,2);j-=2;}}}}_70.path=_73.join("/");}}}}uri=[];if(_70.scheme){uri.push(_70.scheme,":");}if(_70.authority){uri.push("//",_70.authority);}uri.push(_70.path);if(_70.query){uri.push("?",_70.query);}if(_70.fragment){uri.push("#",_70.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(_76,url){var loc=d._getModuleSymbols(_76).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _79=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_79==-1||_79>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 _7b=document.getElementsByTagName("script");var _7c=/dojo(\.xd)?\.js(\W|$)/i;for(var i=0;i<_7b.length;i++){var src=_7b[i].getAttribute("src");if(!src){continue;}var m=src.match(_7c);if(m){if(!d.config.baseUrl){d.config.baseUrl=src.substring(0,m.index);}var cfg=_7b[i].getAttribute("djConfig");if(cfg){var _81=eval("({ "+cfg+" })");for(var x in _81){dojo.config[x]=_81[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 _89=null;var _8a=null;if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){try{_89=new XMLHttpRequest();}catch(e){}}if(!_89){for(var i=0;i<3;++i){var _8c=d._XMLHTTP_PROGIDS[i];try{_89=new ActiveXObject(_8c);}catch(e){_8a=e;}if(_89){d._XMLHTTP_PROGIDS=[_8c];break;}}}if(!_89){throw new Error("XMLHTTP not available: "+_8a);}return _89;};d._isDocumentOk=function(_8d){var _8e=_8d.status||0;return (_8e>=200&&_8e<300)||_8e==304||_8e==1223||(!_8e&&(location.protocol=="file:"||location.protocol=="chrome:"));};var _8f=window.location+"";var _90=document.getElementsByTagName("base");var _91=(_90&&_90.length>0);d._getText=function(uri,_93){var _94=this._xhrObj();if(!_91&&dojo._Url){uri=(new dojo._Url(_8f,uri)).toString();}if(d.config.cacheBust){uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");}_94.open("GET",uri,false);try{_94.send(null);if(!d._isDocumentOk(_94)){var err=Error("Unable to load "+uri+" status:"+_94.status);err.status=_94.status;err.responseText=_94.responseText;throw err;}}catch(e){if(_93){return null;}throw e;}return _94.responseText;};})();dojo._initFired=false;dojo._loadInit=function(e){dojo._initFired=true;var _97=(e&&e.type)?e.type.toLowerCase():"load";if(arguments.callee.initialized||(_97!="domcontentloaded"&&_97!="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 _99=function(_9a,fp){var _9c=_w[_9a]||function(){};_w[_9a]=function(){fp.apply(_w,arguments);_9c.apply(_w,arguments);};};if(dojo.isIE){if(!dojo.config.afterOnLoad){document.write(""+"");}var _9d=true;_99("onbeforeunload",function(){_w.setTimeout(function(){_9d=false;},0);});_99("onunload",function(){if(_9d){dojo.unloaded();}});try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");}catch(e){}}else{_99("onbeforeunload",function(){dojo.unloaded();});}})();}(function(){var mp=dojo.config["modulePaths"];if(mp){for(var _9f in mp){dojo.registerModulePath(_9f,mp[_9f]);}}})();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 _a2=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 _a2(it);}:_a2;})();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(_a9,_aa){for(var i=1,l=arguments.length;i2){return dojo._hitchArgs.apply(dojo,arguments);}if(!_b4){_b4=_b3;_b3=null;}if(dojo.isString(_b4)){_b3=_b3||dojo.global;if(!_b3[_b4]){throw (["dojo.hitch: scope[\"",_b4,"\"] is null (scope=\"",_b3,"\")"].join(""));}return function(){return _b3[_b4].apply(_b3,arguments||[]);};}return !_b3?_b4:function(){return _b4.apply(_b3,arguments||[]);};};dojo.delegate=dojo._delegate=function(obj,_b6){function TMP(){};TMP.prototype=obj;var tmp=new TMP();if(_b6){dojo.mixin(tmp,_b6);}return tmp;};dojo.partial=function(_b8){var arr=[null];return dojo.hitch.apply(dojo,arr.concat(dojo._toArray(arguments)));};dojo._toArray=function(obj,_bb,_bc){var arr=_bc||[];for(var x=_bb||0;x=0){this._fire();}return this;},_fire:function(){var _12f=this.chain;var _130=this.fired;var res=this.results[_130];var self=this;var cb=null;while((_12f.length>0)&&(this.paused==0)){var f=_12f.shift()[_130];if(!f){continue;}try{res=f(res);_130=((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);_130=1;res=err;}}this.fired=_130;this.results[_130]=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,_139,_13a){if(it===undefined){return "undefined";}var _13b=typeof it;if(_13b=="number"||_13b=="boolean"){return it+"";}if(it===null){return "null";}if(dojo.isString(it)){return dojo._escapeString(it);}if(it.nodeType&&it.cloneNode){return "";}var _13c=arguments.callee;var _13d;_13a=_13a||"";var _13e=_139?_13a+dojo.toJsonIndentStr:"";if(typeof it.__json__=="function"){_13d=it.__json__();if(it!==_13d){return _13c(_13d,_139,_13e);}}if(typeof it.json=="function"){_13d=it.json();if(it!==_13d){return _13c(_13d,_139,_13e);}}var sep=_139?" ":"";var _140=_139?"\n":"";if(dojo.isArray(it)){var res=dojo.map(it,function(obj){var val=_13c(obj,_139,_13e);if(typeof val!="string"){val="undefined";}return _140+_13e+val;});return "["+res.join(","+sep)+_140+_13a+"]";}if(_13b=="function"){return null;}var _144=[];for(var key in it){var _146;if(typeof key=="number"){_146="\""+key+"\"";}else{if(typeof key=="string"){_146=dojo._escapeString(key);}else{continue;}}val=_13c(it[key],_139,_13e);if(typeof val!="string"){continue;}_144.push(_140+_13e+_146+":"+sep+val);}return "{"+_144.join(","+sep)+_140+_13a+"}";};}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _147=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(_14b,_14c,_14d,_14e){var step=1,end=_14b.length||0,i=0;if(_14e){i=end-1;step=end=-1;}if(_14d!=undefined){i=_14d;}if((_14e&&i>end)||i>=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 _19c;var _19d;var _19e=dojo.getObject("google.gears");if(_19e){return _19e;}if(typeof GearsFactory!="undefined"){_19c=new GearsFactory();}else{if(dojo.isIE){try{_19c=new ActiveXObject("Gears.Factory");}catch(e){}}else{if(navigator.mimeTypes["application/x-googlegears"]){_19c=document.createElement("object");_19c.setAttribute("type","application/x-googlegears");_19c.setAttribute("width",0);_19c.setAttribute("height",0);_19c.style.display="none";document.documentElement.appendChild(_19c);}}}if(!_19c){return null;}dojo.setObject("google.gears.factory",_19c);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(_19f,_1a0){dojo.global=_19f;dojo.doc=_1a0;};dojo._fireCallback=function(_1a1,_1a2,_1a3){if(_1a2&&dojo.isString(_1a1)){_1a1=_1a2[_1a1];}return _1a1.apply(_1a2,_1a3||[]);};dojo.withGlobal=function(_1a4,_1a5,_1a6,_1a7){var rval;var _1a9=dojo.global;var _1aa=dojo.doc;try{dojo.setContext(_1a4,_1a4.document);rval=dojo._fireCallback(_1a5,_1a6,_1a7);}finally{dojo.setContext(_1a9,_1aa);}return rval;};dojo.withDoc=function(_1ab,_1ac,_1ad,_1ae){var rval;var _1b0=dojo.doc;try{dojo.doc=_1ab;rval=dojo._fireCallback(_1ac,_1ad,_1ae);}finally{dojo.doc=_1b0;}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 _1b5=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,_1b9,_1ba){if(node){node.removeEventListener(del._normalizeEventName(_1b9),_1ba,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,_1c0){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,_1c3){return del._fixEvent(evt,_1c3);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _1c5=dojo._listener;dojo._connect=function(obj,_1c7,_1c8,_1c9,_1ca){var _1cb=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=!_1cb?0:(!_1ca?1:2),l=[dojo._listener,del,_1c5][lid];var h=l.add(obj,_1c7,dojo.hitch(_1c8,_1c9));return [obj,_1c7,h,lid];};dojo._disconnect=function(obj,_1d0,_1d1,_1d2){([dojo._listener,del,_1c5][_1d2]).remove(obj,_1d0,_1d1);};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 _1d3=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;if(!dojo.config._allow_leaks){_1c5=iel=dojo._ie_listener={handlers:[],add:function(_1d7,_1d8,_1d9){_1d7=_1d7||dojo.global;var f=_1d7[_1d8];if(!f||!f._listeners){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d._listeners=[];f=_1d7[_1d8]=d;}return f._listeners.push(ieh.push(_1d9)-1);},remove:function(_1dd,_1de,_1df){var f=(_1dd||dojo.global)[_1de],l=f&&f._listeners;if(f&&l&&_1df--){delete ieh[l[_1df]];delete l[_1df];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_1e3,fp){if(!node){return;}_1e3=del._normalizeEventName(_1e3);if(_1e3=="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,_1e3,del._fixCallback(fp));},remove:function(node,_1e8,_1e9){_1e8=del._normalizeEventName(_1e8);iel.remove(node,_1e8,_1e9);if(_1e8=="onkeypress"){var kd=node.onkeydown;if(--kd._stealthKeydownRefs<=0){iel.remove(node,"onkeydown",kd._stealthKeydownHandle);delete kd._stealthKeydownHandle;}}},_normalizeEventName:function(_1eb){return _1eb.slice(0,2)!="on"?"on"+_1eb:_1eb;},_nop:function(){},_fixEvent:function(evt,_1ed){if(!evt){var w=_1ed&&(_1ed.ownerDocument||_1ed.document||_1ed).parentWindow||window;evt=w.event;}if(!evt){return (evt);}evt.target=evt.srcElement;evt.currentTarget=(_1ed||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _1f1=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;var _1f2=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_1f1.scrollLeft||0)-_1f2.x;evt.pageY=evt.clientY+(_1f1.scrollTop||0)-_1f2.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 _1f8=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_1f8||evt.ctrlKey){var c=_1f8?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;_1d3(evt,faux.keyCode);}},_stopPropagation:function(){this.cancelBubble=true;},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_1d3(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,_1fd){var faux=dojo.mixin({},evt,_1fd);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_200){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,_203){switch(evt.type){case "keypress":var c=evt.charCode,s=evt.shiftKey,k=evt.keyCode;k=k||_207[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,_207={"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,_20a){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c._listeners,t=h[c.target];var r=t&&t.apply(_20a,args);for(var i in ls){if(!(i in ap)){h[ls[i]].apply(_20a,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 _21e=null;dojo.addOnUnload(function(){_21e=null;});dojo._destroyElement=function(node){node=d.byId(node);try{if(!_21e||_21e.ownerDocument!=node.ownerDocument){_21e=node.ownerDocument.createElement("div");}_21e.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_21e.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_221){try{node=d.byId(node);_221=d.byId(_221);while(node){if(node===_221){return true;}node=node.parentNode;}}catch(e){}return false;};dojo.setSelectable=function(node,_223){node=d.byId(node);if(d.isMozilla){node.style.MozUserSelect=_223?"":"none";}else{if(d.isKhtml){node.style.KhtmlUserSelect=_223?"auto":"none";}else{if(d.isIE){node.unselectable=_223?"":"on";d.query("*",node).forEach(function(_224){_224.unselectable=_223?"":"on";});}}}};var _225=function(node,ref){ref.parentNode.insertBefore(node,ref);return true;};var _228=function(node,ref){var pn=ref.parentNode;if(ref==pn.lastChild){pn.appendChild(node);}else{return _225(node,ref.nextSibling);}return true;};dojo.place=function(node,_22d,_22e){if(!node||!_22d||_22e===undefined){return false;}node=d.byId(node);_22d=d.byId(_22d);if(typeof _22e=="number"){var cn=_22d.childNodes;if((_22e==0&&cn.length==0)||cn.length==_22e){_22d.appendChild(node);return true;}if(_22e==0){return _225(node,_22d.firstChild);}return _228(node,cn[_22e-1]);}switch(_22e.toLowerCase()){case "before":return _225(node,_22d);case "after":return _228(node,_22d);case "first":if(_22d.firstChild){return _225(node,_22d.firstChild);}default:_22d.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(_238,_239){return parseFloat(_239)||0;};}else{dojo._toPixelValue=function(_23a,_23b){if(!_23b){return 0;}if(_23b=="medium"){return 4;}if(_23b.slice&&(_23b.slice(-2)=="px")){return parseFloat(_23b);}with(_23a){var _23c=style.left;var _23d=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_23b;_23b=style.pixelLeft;}catch(e){_23b=0;}style.left=_23c;runtimeStyle.left=_23d;}return _23b;};}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,_242){if(_242==1){var _243=/FILTER:[^;]*;?/i;node.style.cssText=node.style.cssText.replace(_243,"");if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){i.style.cssText=i.style.cssText.replace(_243,"");});}}else{var o="Alpha(Opacity="+_242*100+")";node.style.filter=o;}if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){i.style.filter=o;});}return _242;}:function(node,_248){return node.style.opacity=_248;};var _249={left:true,top:true};var _24a=/margin|padding|width|height|max|min|offset/;var _24b=function(node,type,_24e){type=type.toLowerCase();if(d.isIE&&_24e=="auto"){if(type=="height"){return node.offsetHeight;}if(type=="width"){return node.offsetWidth;}}if(!(type in _249)){_249[type]=_24a.test(type);}return _249[type]?px(node,_24e):_24e;};var _24f=d.isIE?"styleFloat":"cssFloat";var _250={"cssFloat":_24f,"styleFloat":_24f,"float":_24f};dojo.style=function(node,_252,_253){var n=d.byId(node),args=arguments.length,op=(_252=="opacity");_252=_250[_252]||_252;if(args==3){return op?d._setOpacity(n,_253):n.style[_252]=_253;}if(args==2&&op){return d._getOpacity(n);}var s=gcs(n);if(args==2&&!d.isString(_252)){for(var x in _252){d.style(node,x,_252[x]);}return s;}return (args==1)?s:_24b(n,_252,s[_252]);};dojo._getPadExtents=function(n,_25a){var s=_25a||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,_25f){var ne="none",s=_25f||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,_265){var s=_265||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,_26a){var s=_26a||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,_271){var s=_271||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,_27c){var s=_27c||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,_283){var s=_283||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,_291,_292,_293){if(d._usesBorderBox(node)){var pb=d._getPadBorderExtents(node,_293);if(_291>=0){_291+=pb.w;}if(_292>=0){_292+=pb.h;}}d._setBox(node,NaN,NaN,_291,_292);};dojo._setMarginBox=function(node,_296,_297,_298,_299,_29a){var s=_29a||gcs(node);var bb=d._usesBorderBox(node),pb=bb?_29e:d._getPadBorderExtents(node,s),mb=d._getMarginExtents(node,s);if(_298>=0){_298=Math.max(_298-pb.w-mb.w,0);}if(_299>=0){_299=Math.max(_299-pb.h-mb.h,0);}d._setBox(node,_296,_297,_298,_299);};var _29e={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 _2aa=function(node,prop){if(!(node=(node||0).parentNode)){return 0;}var val,_2ae=0,_b=d.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0;}val=node[prop];if(val){_2ae+=val-0;if(node==_b){break;}}node=node.parentNode;}return _2ae;};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(_2b4){var dd=d.doc;if(d.isIE&&!dojo._isBodyLtr()){var de=dd.compatMode=="BackCompat"?dd.body:dd.documentElement;return _2b4+de.clientWidth-de.scrollWidth;}return _2b4;};dojo._abs=function(node,_2b8){var _2b9=node.ownerDocument;var ret={x:0,y:0};var db=d.body();if(d.isIE||(d.isFF>=3)){var _2bc=node.getBoundingClientRect();var _2bd=(d.isIE)?d._getIeDocumentElementOffset():{x:0,y:0};ret.x=_2bc.left-_2bd.x;ret.y=_2bc.top-_2bd.y;}else{if(_2b9["getBoxObjectFor"]){var bo=_2b9.getBoxObjectFor(node),b=d._getBorderExtents(node);ret.x=bo.x-b.l-_2aa(node,"scrollLeft");ret.y=bo.y-b.t-_2aa(node,"scrollTop");}else{if(node["offsetParent"]){var _2c0;if(d.isSafari&&(gcs(node).position=="absolute")&&(node.parentNode==db)){_2c0=db;}else{_2c0=db.parentNode;}if(node.parentNode!=db){var nd=node;if(d.isOpera){nd=db;}ret.x-=_2aa(nd,"scrollLeft");ret.y-=_2aa(nd,"scrollTop");}var _2c2=node;do{var n=_2c2.offsetLeft;if(!d.isOpera||n>0){ret.x+=isNaN(n)?0:n;}var t=_2c2.offsetTop;ret.y+=isNaN(t)?0:t;if(d.isSafari&&_2c2!=node){var cs=gcs(_2c2);ret.x+=px(_2c2,cs.borderLeftWidth);ret.y+=px(_2c2,cs.borderTopWidth);}_2c2=_2c2.offsetParent;}while((_2c2!=_2c0)&&_2c2);}else{if(node.x&&node.y){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}}if(_2b8){var _2c6=d._docScroll();ret.y+=_2c6.y;ret.x+=_2c6.x;}return ret;};dojo.coords=function(node,_2c8){var n=d.byId(node),s=gcs(n),mb=d._getMarginBox(n,s);var abs=d._abs(n,_2c8);mb.x=abs.x;mb.y=abs.y;return mb;};var _2cd=function(name){switch(name.toLowerCase()){case "tabindex":return (d.isIE&&d.isIE<8)?"tabIndex":"tabindex";default:return name;}};var _2cf={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(_2cd(name));return attr?attr.specified:false;};var _2d3={};var _ctr=0;var _2d5=dojo._scopeName+"attrid";dojo.attr=function(node,name,_2d8){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=_2cd(name);if(args==3){if(d.isFunction(_2d8)){var _2db=d.attr(node,_2d5);if(!_2db){_2db=_ctr++;d.attr(node,_2d5,_2db);}if(!_2d3[_2db]){_2d3[_2db]={};}var h=_2d3[_2db][name];if(h){d.disconnect(h);}else{try{delete node[name];}catch(e){}}_2d3[_2db][name]=d.connect(node,name,_2d8);}else{if(typeof _2d8=="boolean"){node[name]=_2d8;}else{node.setAttribute(name,_2d8);}}return;}else{var prop=_2cf[name.toLowerCase()];if(prop){return node[prop];}else{var _2d8=node[name];return (typeof _2d8=="boolean"||typeof _2d8=="function")?_2d8:(d.hasAttr(node,name)?node.getAttribute(name):null);}}};dojo.removeAttr=function(node,name){d.byId(node).removeAttribute(_2cd(name));};})();dojo.hasClass=function(node,_2e1){return ((" "+dojo.byId(node).className+" ").indexOf(" "+_2e1+" ")>=0);};dojo.addClass=function(node,_2e3){node=dojo.byId(node);var cls=node.className;if((" "+cls+" ").indexOf(" "+_2e3+" ")<0){node.className=cls+(cls?" ":"")+_2e3;}};dojo.removeClass=function(node,_2e6){node=dojo.byId(node);var t=dojo.trim((" "+node.className+" ").replace(" "+_2e6+" "," "));if(node.className!=t){node.className=t;}};dojo.toggleClass=function(node,_2e9,_2ea){if(_2ea===undefined){_2ea=!dojo.hasClass(node,_2e9);}dojo[_2ea?"addClass":"removeClass"](node,_2e9);};}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 _2ee=function(func,_2f0){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 (_2f0||((_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(_2f8,_2f9){return d.indexOf(this,_2f8,_2f9);},lastIndexOf:function(){return d.lastIndexOf.apply(d,d._toArray(arguments,0,[this]));},every:function(_2fa,_2fb){return d.every(this,_2fa,_2fb);},some:function(_2fc,_2fd){return d.some(this,_2fc,_2fd);},map:function(func,obj){return d.map(this,func,obj,d.NodeList);},forEach:function(_300,_301){d.forEach(this,_300,_301);return this;},coords:function(){return d.map(this,d.coords);},attr:_2ee("attr"),style:_2ee("style"),addClass:_2ee("addClass",true),removeClass:_2ee("removeClass",true),toggleClass:_2ee("toggleClass",true),connect:_2ee("connect",true),place:function(_302,_303){var item=d.query(_302)[0];return this.forEach(function(i){d.place(i,item,(_303||"last"));});},orphan:function(_306){var _307=_306?d._filterQueryResult(this,_306):this;_307.forEach(function(item){if(item.parentNode){item.parentNode.removeChild(item);}});return _307;},adopt:function(_309,_30a){var item=this[0];return d.query(_309).forEach(function(ai){d.place(ai,item,_30a||"last");});},query:function(_30d){if(!_30d){return this;}var ret=d.NodeList();this.forEach(function(item){d.query(_30d,item).forEach(function(_310){if(_310!==undefined){ret.push(_310);}});});return ret;},filter:function(_311){var _312=this;var _a=arguments;var r=d.NodeList();var rp=function(t){if(t!==undefined){r.push(t);}};if(d.isString(_311)){_312=d._filterQueryResult(this,_a[0]);if(_a.length==1){return _312;}_a.shift();}d.forEach(d.filter(_312,_a[0],_a[1]),rp);return r;},addContent:function(_317,_318){var ta=d.doc.createElement("span");if(d.isString(_317)){ta.innerHTML=_317;}else{ta.appendChild(_317);}if(_318===undefined){_318="last";}var ct=(_318=="first"||_318=="after")?"lastChild":"firstChild";this.forEach(function(item){var tn=ta.cloneNode(true);while(tn[ct]){d.place(tn[ct],item,_318);}});return this;},empty:function(){return this.forEach("item.innerHTML='';");},instantiate:function(_31d,_31e){var c=d.isFunction(_31d)?_31d:d.getObject(_31d);return this.forEach(function(i){new c(_31e||{},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 _326=dojo.isIE?"children":"childNodes";var _327=false;var _328=function(_329){if(">~+".indexOf(_329.charAt(_329.length-1))>=0){_329+=" *";}_329+=" ";var ts=function(s,e){return d.trim(_329.slice(s,e));};var _32d=[];var _32e=-1;var _32f=-1;var _330=-1;var _331=-1;var _332=-1;var inId=-1;var _334=-1;var lc="";var cc="";var _337;var x=0;var ql=_329.length;var _33a=null;var _cp=null;var _33c=function(){if(_334>=0){var tv=(_334==x)?null:ts(_334,x).toLowerCase();_33a[(">~+".indexOf(tv)<0)?"tag":"oper"]=tv;_334=-1;}};var _33e=function(){if(inId>=0){_33a.id=ts(inId,x).replace(/\\/g,"");inId=-1;}};var _33f=function(){if(_332>=0){_33a.classes.push(ts(_332+1,x).replace(/\\/g,""));_332=-1;}};var _340=function(){_33e();_33c();_33f();};for(;lc=cc,cc=_329.charAt(x),x=0){if(cc=="]"){if(!_cp.attr){_cp.attr=ts(_32e+1,x);}else{_cp.matchFor=ts((_330||_32e+1),x);}var cmf=_cp.matchFor;if(cmf){if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){_cp.matchFor=cmf.substring(1,cmf.length-1);}}_33a.attrs.push(_cp);_cp=null;_32e=_330=-1;}else{if(cc=="="){var _342=("|~^$*".indexOf(lc)>=0)?lc:"";_cp.type=_342+cc;_cp.attr=ts(_32e+1,x-_342.length);_330=x+1;}}}else{if(_32f>=0){if(cc==")"){if(_331>=0){_cp.value=ts(_32f+1,x);}_331=_32f=-1;}}else{if(cc=="#"){_340();inId=x+1;}else{if(cc=="."){_340();_332=x;}else{if(cc==":"){_340();_331=x;}else{if(cc=="["){_340();_32e=x;_cp={};}else{if(cc=="("){if(_331>=0){_cp={name:ts(_331+1,x),value:null};_33a.pseudos.push(_cp);}_32f=x;}else{if(cc==" "&&lc!=cc){_340();if(_331>=0){_33a.pseudos.push({name:ts(_331+1,x)});}_33a.hasLoops=(_33a.pseudos.length||_33a.attrs.length||_33a.classes.length);_33a.query=ts(_337,x);_33a.tag=(_33a["oper"])?null:(_33a.tag||"*");_32d.push(_33a);_33a=null;}}}}}}}}}return _32d;};var _343={"*=":function(attr,_345){return "[contains(@"+attr+", '"+_345+"')]";},"^=":function(attr,_347){return "[starts-with(@"+attr+", '"+_347+"')]";},"$=":function(attr,_349){return "[substring(@"+attr+", string-length(@"+attr+")-"+(_349.length-1)+")='"+_349+"']";},"~=":function(attr,_34b){return "[contains(concat(' ',@"+attr+",' '), ' "+_34b+" ')]";},"|=":function(attr,_34d){return "[contains(concat(' ',@"+attr+",' '), ' "+_34d+"-')]";},"=":function(attr,_34f){return "[@"+attr+"='"+_34f+"']";}};var _350=function(_351,_352,_353,_354){d.forEach(_352.attrs,function(attr){var _356;if(attr.type&&_351[attr.type]){_356=_351[attr.type](attr.attr,attr.matchFor);}else{if(attr.attr.length){_356=_353(attr.attr);}}if(_356){_354(_356);}});};var _357=function(_358){var _359=".";var _35a=_328(d.trim(_358));while(_35a.length){var tqp=_35a.shift();var _35c;var _35d="";if(tqp.oper==">"){_35c="/";tqp=_35a.shift();}else{if(tqp.oper=="~"){_35c="/following-sibling::";tqp=_35a.shift();}else{if(tqp.oper=="+"){_35c="/following-sibling::";_35d="[position()=1]";tqp=_35a.shift();}else{_35c="//";}}}_359+=_35c+tqp.tag+_35d;if(tqp.id){_359+="[@id='"+tqp.id+"'][1]";}d.forEach(tqp.classes,function(cn){var cnl=cn.length;var _360=" ";if(cn.charAt(cnl-1)=="*"){_360="";cn=cn.substr(0,cnl-1);}_359+="[contains(concat(' ',@class,' '), ' "+cn+_360+"')]";});_350(_343,tqp,function(_361){return "[@"+_361+"]";},function(_362){_359+=_362;});}return _359;};var _363={};var _364=function(path){if(_363[path]){return _363[path];}var doc=d.doc;var _367=_357(path);var tf=function(_369){var ret=[];var _36b;try{_36b=doc.evaluate(_367,_369,null,XPathResult.ANY_TYPE,null);}catch(e){console.debug("failure in exprssion:",_367,"under:",_369);console.debug(e);}var _36c=_36b.iterateNext();while(_36c){ret.push(_36c);_36c=_36b.iterateNext();}return ret;};return _363[path]=tf;};var _36d={};var _36e={};var _36f=function(_370,_371){if(!_370){return _371;}if(!_371){return _370;}return function(){return _370.apply(window,arguments)&&_371.apply(window,arguments);};};var _372=function(root){var ret=[];var te,x=0,tret=root[_326];while(te=tret[x++]){if(te.nodeType==1){ret.push(te);}}return ret;};var _378=function(root,_37a){var ret=[];var te=root;while(te=te.nextSibling){if(te.nodeType==1){ret.push(te);if(_37a){break;}}}return ret;};var _37d=function(_37e,_37f,_380,idx){var nidx=idx+1;var _383=(_37f.length==nidx);var tqp=_37f[idx];if(tqp.oper){var ecn=(tqp.oper==">")?_372(_37e):_378(_37e,(tqp.oper=="+"));if(!ecn||!ecn.length){return;}nidx++;_383=(_37f.length==nidx);var tf=_387(_37f[idx+1]);for(var x=0,ecnl=ecn.length,te;x=0);};},"^=":function(attr,_3ac){return function(elem){return (_3a4(elem,attr).indexOf(_3ac)==0);};},"$=":function(attr,_3af){var tval=" "+_3af;return function(elem){var ea=" "+_3a4(elem,attr);return (ea.lastIndexOf(_3af)==(ea.length-_3af.length));};},"~=":function(attr,_3b4){var tval=" "+_3b4+" ";return function(elem){var ea=" "+_3a4(elem,attr)+" ";return (ea.indexOf(tval)>=0);};},"|=":function(attr,_3b9){var _3ba=" "+_3b9+"-";return function(elem){var ea=" "+(elem.getAttribute(attr,2)||"");return ((ea==_3b9)||(ea.indexOf(_3ba)==0));};},"=":function(attr,_3be){return function(elem){return (_3a4(elem,attr)==_3be);};}};var _3c0={"first-child":function(name,_3c2){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,_3c6){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,_3ca){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,_3d1){return function(elem){return (elem.innerHTML.indexOf(_3d1)>=0);};},"not":function(name,_3d4){var ntf=_387(_328(_3d4)[0]);return function(elem){return (!ntf(elem));};},"nth-child":function(name,_3d8){var pi=parseInt;if(_3d8=="odd"){return function(elem){return (((_399(elem))%2)==1);};}else{if((_3d8=="2n")||(_3d8=="even")){return function(elem){return ((_399(elem)%2)==0);};}else{if(_3d8.indexOf("0n+")==0){var _3dc=pi(_3d8.substr(3));return function(elem){return (elem.parentNode[_326][_3dc-1]===elem);};}else{if((_3d8.indexOf("n+")>0)&&(_3d8.length>3)){var _3de=_3d8.split("n+",2);var pred=pi(_3de[0]);var idx=pi(_3de[1]);return function(elem){return ((_399(elem)%pred)==idx);};}else{if(_3d8.indexOf("n")==-1){var _3dc=pi(_3d8);return function(elem){return (_399(elem)==_3dc);};}}}}}}};var _3e3=(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 _398=function(_3e9){var _3ea=(_36e[_3e9.query]||_36d[_3e9.query]);if(_3ea){return _3ea;}var ff=null;if(_3e9.id){if(_3e9.tag!="*"){ff=_36f(ff,function(elem){return (elem.tagName.toLowerCase()==_3e9.tag);});}}d.forEach(_3e9.classes,function(_3ed,idx,arr){var _3f0=_3ed.charAt(_3ed.length-1)=="*";if(_3f0){_3ed=_3ed.substr(0,_3ed.length-1);}var re=new RegExp("(?:^|\\s)"+_3ed+(_3f0?".*":"")+"(?:\\s|$)");ff=_36f(ff,function(elem){return re.test(elem.className);});ff.count=idx;});d.forEach(_3e9.pseudos,function(_3f3){if(_3c0[_3f3.name]){ff=_36f(ff,_3c0[_3f3.name](_3f3.name,_3f3.value));}});_350(_3a7,_3e9,_3e3,function(_3f4){ff=_36f(ff,_3f4);});if(!ff){ff=function(){return true;};}return _36e[_3e9.query]=ff;};var _3f5={};var _38c=function(_3f6,root){var fHit=_3f5[_3f6.query];if(fHit){return fHit;}if(_3f6.id&&!_3f6.hasLoops&&!_3f6.tag){return _3f5[_3f6.query]=function(root){return [d.byId(_3f6.id)];};}var _3fa=_398(_3f6);var _3fb;if(_3f6.tag&&_3f6.id&&!_3f6.hasLoops){_3fb=function(root){var te=d.byId(_3f6.id);if(_3fa(te)){return [te];}};}else{var tret;if(!_3f6.hasLoops){_3fb=function(root){var ret=[];var te,x=0,tret=root.getElementsByTagName(_3f6.tag);while(te=tret[x++]){ret.push(te);}return ret;};}else{_3fb=function(root){var ret=[];var te,x=0,tret=root.getElementsByTagName(_3f6.tag);while(te=tret[x++]){if(_3fa(te)){ret.push(te);}}return ret;};}}return _3f5[_3f6.query]=_3fb;};var _407={};var _408={"*":d.isIE?function(root){return root.all;}:function(root){return root.getElementsByTagName("*");},"~":_378,"+":function(root){return _378(root,true);},">":_372};var _40c=function(_40d){var _40e=_328(d.trim(_40d));if(_40e.length==1){var tt=_38c(_40e[0]);tt.nozip=true;return tt;}var sqf=function(root){var _412=_40e.slice(0);var _413;if(_412[0].oper==">"){_413=[root];}else{_413=_38c(_412.shift())(root);}return _38d(_413,_412);};return sqf;};var _414=((document["evaluate"]&&!d.isSafari)?function(_415){var _416=_415.split(" ");if((document["evaluate"])&&(_415.indexOf(":")==-1)&&(_415.indexOf("+")==-1)){if(((_416.length>2)&&(_415.indexOf(">")==-1))||(_416.length>3)||(_415.indexOf("[")>=0)||((1==_416.length)&&(0<=_415.indexOf(".")))){return _364(_415);}}return _40c(_415);}:_40c);var _417=function(_418){if(_408[_418]){return _408[_418];}if(0>_418.indexOf(",")){return _408[_418]=_414(_418);}else{var _419=_418.split(/\s*,\s*/);var tf=function(root){var _41c=0;var ret=[];var tp;while(tp=_419[_41c++]){ret=ret.concat(_414(tp,tp.indexOf(" "))(root));}return ret;};return _408[_418]=tf;}};var _41f=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;}_41f++;arr[0]["_zipIdx"]=_41f;for(var x=1,te;te=arr[x];x++){if(arr[x]["_zipIdx"]!=_41f){ret.push(te);}te["_zipIdx"]=_41f;}return ret;};d.query=function(_425,root){if(_425.constructor==d.NodeList){return _425;}if(!d.isString(_425)){return new d.NodeList(_425);}if(d.isString(root)){root=d.byId(root);}return _zip(_417(_425)(root||d.doc));};d.query.pseudos=_3c0;d._filterQueryResult=function(_427,_428){var tnl=new d.NodeList();var ff=(_428)?_387(_328(_428)[0]):function(){return true;};for(var x=0,te;te=_427[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,_430){var val=obj[name];if(_d.isString(val)){obj[name]=[val,_430];}else{if(_d.isArray(val)){val.push(_430);}else{obj[name]=_430;}}};dojo.formToObject=function(_432){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,_432).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 _43c=[];var _43d={};for(var name in map){var _43f=map[name];if(_43f!=_43d[name]){var _440=enc(name)+"=";if(_d.isArray(_43f)){for(var i=0;i<_43f.length;i++){_43c.push(_440+enc(_43f[i]));}}else{_43c.push(_440+enc(_43f));}}}return _43c.join("&");};dojo.formToQuery=function(_442){return _d.objectToQuery(_d.formToObject(_442));};dojo.formToJson=function(_443,_444){return _d.toJson(_d.formToObject(_443),_444);};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dec=decodeURIComponent;_d.forEach(qp,function(item){if(item.length){var _44a=item.split("=");var name=dec(_44a.shift());var val=dec(_44a.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||null);},"json-comment-filtered":function(xhr){var _450=xhr.responseText;var _451=_450.indexOf("/*");var _452=_450.lastIndexOf("*/");if(_451==-1||_452==-1){throw new Error("JSON was not comment filtered");}return (xhr.status==204)?undefined:_d.fromJson(_450.substring(_451+2,_452));},"javascript":function(xhr){return _d.eval(xhr.responseText);},"xml":function(xhr){var _455=xhr.responseXML;if(_d.isIE&&(!_455||window.location.protocol=="file:")){_d.forEach(["MSXML2","Microsoft","MSXML","MSXML3"],function(_456){try{var dom=new ActiveXObject(_456+".XMLDOM");dom.async=false;dom.loadXML(xhr.responseText);_455=dom;}catch(e){}});}return _455;}};dojo._contentHandlers["json-comment-optional"]=function(xhr){var _459=_d._contentHandlers;try{return _459["json-comment-filtered"](xhr);}catch(e){return _459["json"](xhr);}};dojo._ioSetArgs=function(args,_45b,_45c,_45d){var _45e={args:args,url:args.url};var _45f=null;if(args.form){var form=_d.byId(args.form);var _461=form.getAttributeNode("action");_45e.url=_45e.url||(_461?_461.value:null);_45f=_d.formToObject(form);}var _462=[{}];if(_45f){_462.push(_45f);}if(args.content){_462.push(args.content);}if(args.preventCache){_462.push({"dojo.preventCache":new Date().valueOf()});}_45e.query=_d.objectToQuery(_d.mixin.apply(null,_462));_45e.handleAs=args.handleAs||"text";var d=new _d.Deferred(_45b);d.addCallbacks(_45c,function(_464){return _45d(_464,d);});var ld=args.load;if(ld&&_d.isFunction(ld)){d.addCallback(function(_466){return ld.call(args,_466,_45e);});}var err=args.error;if(err&&_d.isFunction(err)){d.addErrback(function(_468){return err.call(args,_468,_45e);});}var _469=args.handle;if(_469&&_d.isFunction(_469)){d.addBoth(function(_46a){return _469.call(args,_46a,_45e);});}d.ioArgs=_45e;return d;};var _46b=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 _470=function(dfd){return _d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);};var _472=function(_473,dfd){console.debug(_473);return _473;};var _475=function(args){var dfd=_d._ioSetArgs(args,_46b,_470,_472);dfd.ioArgs.xhr=_d._xhrObj(dfd.ioArgs.args);return dfd;};var _478=null;var _479=[];var _47a=function(){var now=(new Date()).getTime();if(!_d._blockAsync){for(var i=0,tif;i<_479.length&&(tif=_479[i]);i++){var dfd=tif.dfd;try{if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_479.splice(i--,1);}else{if(tif.ioCheck(dfd)){_479.splice(i--,1);tif.resHandle(dfd);}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)0){setTimeout(_p,de);return _t;}_p();return _t;},_play:function(_4af){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 _4b1=_t.curve.getValue(_t._percent);if(!_t._percent){if(!_t._startRepeatCount){_t._startRepeatCount=_t.repeat;}_t._fire("onBegin",[_4b1]);}_t._fire("onPlay",[_4b1]);_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(_4b2,_4b3){this._stopTimer();this._active=this._paused=true;this._percent=_4b2;if(_4b3){this.play();}return this;},stop:function(_4b4){if(!this._timer){return this;}this._stopTimer();if(_4b4){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 _4b9=[];var _4ba={run:function(){}};var _4bb=null;dojo._Animation.prototype._startTimer=function(){if(!this._timer){this._timer=d.connect(_4ba,"run",this,"_cycle");ctr++;}if(!_4bb){_4bb=setInterval(d.hitch(_4ba,"run"),this.rate);}};dojo._Animation.prototype._stopTimer=function(){if(this._timer){d.disconnect(this._timer);this._timer=null;ctr--;}if(ctr<=0){clearInterval(_4bb);_4bb=null;ctr=0;}};var _4bc=(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 _4c0=d.mixin({properties:{}},args);var _4c1=(_4c0.properties.opacity={});_4c1.start=!("start" in _4c0)?function(){return Number(d.style(_4c0.node,"opacity"));}:_4c0.start;_4c1.end=_4c0.end;var anim=d.animateProperty(_4c0);d.connect(anim,"beforeBegin",d.partial(_4bc,_4c0.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 _4c6=function(_4c7){this._properties=_4c7;for(var p in _4c7){var prop=_4c7[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 _4ce=prop.start;if(_4ce instanceof d.Color){ret[p]=d.blendColors(_4ce,prop.end,r,prop.tempColor).toCss();}else{if(!d.isArray(_4ce)){ret[p]=((prop.end-_4ce)*r)+_4ce+(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 _4d4=(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):(_4d4?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(_4d4){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 _4c6(pm);});d.connect(anim,"onAnimate",anim,function(_4d8){for(var s in _4d8){d.style(this.node,s,_4d8[s]);}});return anim;};dojo.anim=function(node,_4db,_4dc,_4dd,_4de,_4df){return d.animateProperty({node:node,duration:_4dc||d._Animation.prototype.duration,properties:_4db,easing:_4dd,onEnd:_4de}).play(_4df||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(_4e0,_4e1,_4e2){_4e2=dojo.i18n.normalizeLocale(_4e2);var _4e3=_4e2.split("-");var _4e4=[_4e0,"nls",_4e1].join(".");var _4e5=dojo._loadedModules[_4e4];if(_4e5){var _4e6;for(var i=_4e3.length;i>0;i--){var loc=_4e3.slice(0,i).join("_");if(_4e5[loc]){_4e6=_4e5[loc];break;}}if(!_4e6){_4e6=_4e5.ROOT;}if(_4e6){var _4e9=function(){};_4e9.prototype=_4e6;return new _4e9();}}throw new Error("Bundle not found: "+_4e1+" in "+_4e0+" , locale="+_4e2);};dojo.i18n.normalizeLocale=function(_4ea){var _4eb=_4ea?_4ea.toLowerCase():dojo.locale;if(_4eb=="root"){_4eb="ROOT";}return _4eb;};dojo.i18n._requireLocalization=function(_4ec,_4ed,_4ee,_4ef){var _4f0=dojo.i18n.normalizeLocale(_4ee);var _4f1=[_4ec,"nls",_4ed].join(".");var _4f2="";if(_4ef){var _4f3=_4ef.split(",");for(var i=0;i<_4f3.length;i++){if(_4f0.indexOf(_4f3[i])==0){if(_4f3[i].length>_4f2.length){_4f2=_4f3[i];}}}if(!_4f2){_4f2="ROOT";}}var _4f5=_4ef?_4f2:_4f0;var _4f6=dojo._loadedModules[_4f1];var _4f7=null;if(_4f6){if(dojo.config.localizationComplete&&_4f6._built){return;}var _4f8=_4f5.replace(/-/g,"_");var _4f9=_4f1+"."+_4f8;_4f7=dojo._loadedModules[_4f9];}if(!_4f7){_4f6=dojo["provide"](_4f1);var syms=dojo._getModuleSymbols(_4ec);var _4fb=syms.concat("nls").join("/");var _4fc;dojo.i18n._searchLocalePath(_4f5,_4ef,function(loc){var _4fe=loc.replace(/-/g,"_");var _4ff=_4f1+"."+_4fe;var _500=false;if(!dojo._loadedModules[_4ff]){dojo["provide"](_4ff);var _501=[_4fb];if(loc!="ROOT"){_501.push(loc);}_501.push(_4ed);var _502=_501.join("/")+".js";_500=dojo._loadPath(_502,null,function(hash){var _504=function(){};_504.prototype=_4fc;_4f6[_4fe]=new _504();for(var j in hash){_4f6[_4fe][j]=hash[j];}});}else{_500=true;}if(_500&&_4f6[_4fe]){_4fc=_4f6[_4fe];}else{_4f6[_4fe]=_4fc;}if(_4ef){return true;}});}if(_4ef&&_4f0!=_4f2){_4f6[_4f0.replace(/-/g,"_")]=_4f6[_4f2.replace(/-/g,"_")];}};(function(){var _506=dojo.config.extraLocale;if(_506){if(!_506 instanceof Array){_506=[_506];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_50a,_50b){req(m,b,_50a,_50b);if(_50a){return;}for(var i=0;i<_506.length;i++){req(m,b,_506[i],_50b);}};}})();dojo.i18n._searchLocalePath=function(_50d,down,_50f){_50d=dojo.i18n.normalizeLocale(_50d);var _510=_50d.split("-");var _511=[];for(var i=_510.length;i>0;i--){_511.push(_510.slice(0,i).join("-"));}_511.push(false);if(down){_511.reverse();}for(var j=_511.length-1;j>=0;j--){var loc=_511[j]||"ROOT";var stop=_50f(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_516,_517){function preload(_518){_518=dojo.i18n.normalizeLocale(_518);dojo.i18n._searchLocalePath(_518,true,function(loc){for(var i=0;i<_517.length;i++){if(_517[i]==loc){dojo["require"](_516+"_"+loc);return true;}}return false;});};preload();var _51b=dojo.config.extraLocale||[];for(var i=0;i<_51b.length;i++){preload(_51b[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.length0;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,_52d){return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){if(_52d&&_52d.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_531){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i_547){var _54b=Math.pow(10,_547);if(_548>0){_54b*=10/_548;_547++;}_546=Math.round(_546*_54b)/_54b;_549=String(_546).split(".");_54a=(_549[1]&&_549[1].length)||0;if(_54a>_547){_549[1]=_549[1].substr(0,_547);_546=Number(_549.join("."));}}return _546;};dojo.number._formatAbsolute=function(_54c,_54d,_54e){_54e=_54e||{};if(_54e.places===true){_54e.places=0;}if(_54e.places===Infinity){_54e.places=6;}var _54f=_54d.split(".");var _550=(_54e.places>=0)?_54e.places:(_54f[1]&&_54f[1].length)||0;if(!(_54e.round<0)){_54c=dojo.number.round(_54c,_550,_54e.round);}var _551=String(Math.abs(_54c)).split(".");var _552=_551[1]||"";if(_54e.places){_551[1]=dojo.string.pad(_552.substr(0,_54e.places),_54e.places,"0",true);}else{if(_54f[1]&&_54e.places!==0){var pad=_54f[1].lastIndexOf("0")+1;if(pad>_552.length){_551[1]=dojo.string.pad(_552,pad,"0",true);}var _554=_54f[1].length;if(_554<_552.length){_551[1]=_552.substr(0,_554);}}else{if(_551[1]){_551.pop();}}}var _555=_54f[0].replace(",","");pad=_555.indexOf("0");if(pad!=-1){pad=_555.length-pad;if(pad>_551[0].length){_551[0]=dojo.string.pad(_551[0],pad);}if(_555.indexOf("#")==-1){_551[0]=_551[0].substr(_551[0].length-pad);}}var _556=_54f[0].lastIndexOf(",");var _557,_558;if(_556!=-1){_557=_54f[0].length-_556-1;var _559=_54f[0].substr(0,_556);_556=_559.lastIndexOf(",");if(_556!=-1){_558=_559.length-_556-1;}}var _55a=[];for(var _55b=_551[0];_55b;){var off=_55b.length-_557;_55a.push((off>0)?_55b.substr(off):_55b);_55b=(off>0)?_55b.slice(0,off):"";if(_558){_557=_558;delete _558;}}_551[0]=_55a.reverse().join(_54e.group||",");return _551.join(_54e.decimal||".");};dojo.number.regexp=function(_55d){return dojo.number._parseInfo(_55d).regexp;};dojo.number._parseInfo=function(_55e){_55e=_55e||{};var _55f=dojo.i18n.normalizeLocale(_55e.locale);var _560=dojo.i18n.getLocalization("dojo.cldr","number",_55f);var _561=_55e.pattern||_560[(_55e.type||"decimal")+"Format"];var _562=_560.group;var _563=_560.decimal;var _564=1;if(_561.indexOf("%")!=-1){_564/=100;}else{if(_561.indexOf("‰")!=-1){_564/=1000;}else{var _565=_561.indexOf("¤")!=-1;if(_565){_562=_560.currencyGroup||_562;_563=_560.currencyDecimal||_563;}}}var _566=_561.split(";");if(_566.length==1){_566.push("-"+_566[0]);}var re=dojo.regexp.buildGroupRE(_566,function(_568){_568="(?:"+dojo.regexp.escapeString(_568,".")+")";return _568.replace(dojo.number._numberPatternRE,function(_569){var _56a={signed:false,separator:_55e.strict?_562:[_562,""],fractional:_55e.fractional,decimal:_563,exponent:false};var _56b=_569.split(".");var _56c=_55e.places;if(_56b.length==1||_56c===0){_56a.fractional=false;}else{if(_56c===undefined){_56c=_56b[1].lastIndexOf("0")+1;}if(_56c&&_55e.fractional==undefined){_56a.fractional=true;}if(!_55e.places&&(_56c<_56b[1].length)){_56c+=","+_56b[1].length;}_56a.places=_56c;}var _56d=_56b[0].split(",");if(_56d.length>1){_56a.groupSize=_56d.pop().length;if(_56d.length>1){_56a.groupSize2=_56d.pop().length;}}return "("+dojo.number._realNumberRegexp(_56a)+")";});},true);if(_565){re=re.replace(/(\s*)(\u00a4{1,3})(\s*)/g,function(_56e,_56f,_570,_571){var prop=["symbol","currency","displayName"][_570.length-1];var _573=dojo.regexp.escapeString(_55e[prop]||_55e.currency||"");_56f=_56f?"\\s":"";_571=_571?"\\s":"";if(!_55e.strict){if(_56f){_56f+="*";}if(_571){_571+="*";}return "(?:"+_56f+_573+_571+")?";}return _56f+_573+_571;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_562,decimal:_563,factor:_564};};dojo.number.parse=function(_574,_575){var info=dojo.number._parseInfo(_575);var _577=(new RegExp("^"+info.regexp+"$")).exec(_574);if(!_577){return NaN;}var _578=_577[1];if(!_577[1]){if(!_577[2]){return NaN;}_578=_577[2];info.factor*=-1;}_578=_578.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return Number(_578)*info.factor;};dojo.number._realNumberRegexp=function(_579){_579=_579||{};if(!("places" in _579)){_579.places=Infinity;}if(typeof _579.decimal!="string"){_579.decimal=".";}if(!("fractional" in _579)||/^0/.test(_579.places)){_579.fractional=[true,false];}if(!("exponent" in _579)){_579.exponent=[true,false];}if(!("eSigned" in _579)){_579.eSigned=[true,false];}var _57a=dojo.number._integerRegexp(_579);var _57b=dojo.regexp.buildGroupRE(_579.fractional,function(q){var re="";if(q&&(_579.places!==0)){re="\\"+_579.decimal;if(_579.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_579.places+"}";}}return re;},true);var _57e=dojo.regexp.buildGroupRE(_579.exponent,function(q){if(q){return "([eE]"+dojo.number._integerRegexp({signed:_579.eSigned})+")";}return "";});var _580=_57a+_57b;if(_57b){_580="(?:(?:"+_580+")|(?:"+_57b+"))";}return _580+_57e;};dojo.number._integerRegexp=function(_581){_581=_581||{};if(!("signed" in _581)){_581.signed=[true,false];}if(!("separator" in _581)){_581.separator="";}else{if(!("groupSize" in _581)){_581.groupSize=3;}}var _582=dojo.regexp.buildGroupRE(_581.signed,function(q){return q?"[-+]":"";},true);var _584=dojo.regexp.buildGroupRE(_581.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=_581.groupSize,grp2=_581.groupSize2;if(grp2){var _588="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_588+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_588;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _582+_584;};}if(!dojo._hasResource["dojo.date"]){dojo._hasResource["dojo.date"]=true;dojo.provide("dojo.date");dojo.date.getDaysInMonth=function(_589){var _58a=_589.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_58a==1&&dojo.date.isLeapYear(_589)){return 29;}return days[_58a];};dojo.date.isLeapYear=function(_58c){var year=_58c.getFullYear();return !(year%400)||(!(year%4)&&!!(year%100));};dojo.date.getTimezoneName=function(_58e){var str=_58e.toString();var tz="";var _591;var pos=str.indexOf("(");if(pos>-1){tz=str.substring(++pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_591=str.match(pat))){tz=_591[1];}else{str=_58e.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_591=str.match(pat))){tz=_591[1];}}}return (tz=="AM"||tz=="PM")?"":tz;};dojo.date.compare=function(_594,_595,_596){_594=new Date(Number(_594));_595=new Date(Number(_595||new Date()));if(_596!=="undefined"){if(_596=="date"){_594.setHours(0,0,0,0);_595.setHours(0,0,0,0);}else{if(_596=="time"){_594.setFullYear(0,0,0);_595.setFullYear(0,0,0);}}}if(_594>_595){return 1;}if(_594<_595){return -1;}return 0;};dojo.date.add=function(date,_598,_599){var sum=new Date(Number(date));var _59b=false;var _59c="Date";switch(_598){case "day":break;case "weekday":var days,_59e;var mod=_599%5;if(!mod){days=(_599>0)?5:-5;_59e=(_599>0)?((_599-5)/5):((_599+5)/5);}else{days=mod;_59e=parseInt(_599/5);}var strt=date.getDay();var adj=0;if(strt==6&&_599>0){adj=1;}else{if(strt==0&&_599<0){adj=-1;}}var trgt=strt+days;if(trgt==0||trgt==6){adj=(_599>0)?2:-2;}_599=(7*_59e)+days+adj;break;case "year":_59c="FullYear";_59b=true;break;case "week":_599*=7;break;case "quarter":_599*=3;case "month":_59b=true;_59c="Month";break;case "hour":case "minute":case "second":case "millisecond":_59c="UTC"+_598.charAt(0).toUpperCase()+_598.substring(1)+"s";}if(_59c){sum["set"+_59c](sum["get"+_59c]()+_599);}if(_59b&&(sum.getDate()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 (_5b3+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 (_5b3+mod)<0:adj=2;}}}days+=adj;days-=(_5ad*2);}_5a7=days;break;case "year":_5a7=_5a6;break;case "month":_5a7=(_5a4.getMonth()-_5a3.getMonth())+(_5a6*12);break;case "week":_5a7=parseInt(dojo.date.difference(_5a3,_5a4,"day")/7);break;case "day":_5a7/=24;case "hour":_5a7/=60;case "minute":_5a7/=60;case "second":_5a7/=1000;case "millisecond":_5a7*=_5a4.getTime()-_5a3.getTime();}return Math.round(_5a7);};}if(!dojo._hasResource["dojo.cldr.supplemental"]){dojo._hasResource["dojo.cldr.supplemental"]=true;dojo.provide("dojo.cldr.supplemental");dojo.cldr.supplemental.getFirstDayOfWeek=function(_5b4){var _5b5={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 _5b6=dojo.cldr.supplemental._region(_5b4);var dow=_5b5[_5b6];return (dow===undefined)?1:dow;};dojo.cldr.supplemental._region=function(_5b8){_5b8=dojo.i18n.normalizeLocale(_5b8);var tags=_5b8.split("-");var _5ba=tags[1];if(!_5ba){_5ba={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",he:"il",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[tags[0]];}else{if(_5ba.length==4){_5ba=tags[2];}}return _5ba;};dojo.cldr.supplemental.getWeekend=function(_5bb){var _5bc={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 _5bd={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 _5be=dojo.cldr.supplemental._region(_5bb);var _5bf=_5bc[_5be];var end=_5bd[_5be];if(_5bf===undefined){_5bf=6;}if(end===undefined){end=0;}return {start:_5bf,end:end};};}if(!dojo._hasResource["dojo.date.locale"]){dojo._hasResource["dojo.date.locale"]=true;dojo.provide("dojo.date.locale");(function(){function formatPattern(_5c1,_5c2,_5c3,_5c4){return _5c4.replace(/([a-z])\1*/ig,function(_5c5){var s,pad;var c=_5c5.charAt(0);var l=_5c5.length;var _5ca=["abbr","wide","narrow"];switch(c){case "G":s=_5c2[(l<4)?"eraAbbr":"eraNames"][_5c1.getFullYear()<0?0:1];break;case "y":s=_5c1.getFullYear();switch(l){case 1:break;case 2:if(!_5c3){s=String(s);s=s.substr(s.length-2);break;}default:pad=true;}break;case "Q":case "q":s=Math.ceil((_5c1.getMonth()+1)/3);pad=true;break;case "M":case "L":var m=_5c1.getMonth();var _5cc;switch(l){case 1:case 2:s=m+1;pad=true;break;case 3:case 4:case 5:_5cc=_5ca[l-3];break;}if(_5cc){var _5cd=(c=="L")?"standalone":"format";var _5ce=["months",_5cd,_5cc].join("-");s=_5c2[_5ce][m];}break;case "w":var _5cf=0;s=dojo.date.locale._getWeekOfYear(_5c1,_5cf);pad=true;break;case "d":s=_5c1.getDate();pad=true;break;case "D":s=dojo.date.locale._getDayOfYear(_5c1);pad=true;break;case "E":case "e":case "c":var d=_5c1.getDay();var _5d1;switch(l){case 1:case 2:if(c=="e"){var _5d2=dojo.cldr.supplemental.getFirstDayOfWeek(options.locale);d=(d-_5d2+7)%7;}if(c!="c"){s=d+1;pad=true;break;}case 3:case 4:case 5:_5d1=_5ca[l-3];break;}if(_5d1){var _5d3=(c=="c")?"standalone":"format";var _5d4=["days",_5d3,_5d1].join("-");s=_5c2[_5d4][d];}break;case "a":var _5d5=(_5c1.getHours()<12)?"am":"pm";s=_5c2[_5d5];break;case "h":case "H":case "K":case "k":var h=_5c1.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=_5c1.getMinutes();pad=true;break;case "s":s=_5c1.getSeconds();pad=true;break;case "S":s=Math.round(_5c1.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case "v":case "z":s=dojo.date.getTimezoneName(_5c1);if(s){break;}l=4;case "Z":var _5d7=_5c1.getTimezoneOffset();var tz=[(_5d7<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_5d7)/60),2),dojo.string.pad(Math.abs(_5d7)%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: "+_5c4);}if(pad){s=dojo.string.pad(s,l);}return s;});};dojo.date.locale.format=function(_5d9,_5da){_5da=_5da||{};var _5db=dojo.i18n.normalizeLocale(_5da.locale);var _5dc=_5da.formatLength||"short";var _5dd=dojo.date.locale._getGregorianBundle(_5db);var str=[];var _5df=dojo.hitch(this,formatPattern,_5d9,_5dd,_5da.fullYear);if(_5da.selector=="year"){var year=_5d9.getFullYear();if(_5db.match(/^zh|^ja/)){year+="年";}return year;}if(_5da.selector!="time"){var _5e1=_5da.datePattern||_5dd["dateFormat-"+_5dc];if(_5e1){str.push(_processPattern(_5e1,_5df));}}if(_5da.selector!="date"){var _5e2=_5da.timePattern||_5dd["timeFormat-"+_5dc];if(_5e2){str.push(_processPattern(_5e2,_5df));}}var _5e3=str.join(" ");return _5e3;};dojo.date.locale.regexp=function(_5e4){return dojo.date.locale._parseInfo(_5e4).regexp;};dojo.date.locale._parseInfo=function(_5e5){_5e5=_5e5||{};var _5e6=dojo.i18n.normalizeLocale(_5e5.locale);var _5e7=dojo.date.locale._getGregorianBundle(_5e6);var _5e8=_5e5.formatLength||"short";var _5e9=_5e5.datePattern||_5e7["dateFormat-"+_5e8];var _5ea=_5e5.timePattern||_5e7["timeFormat-"+_5e8];var _5eb;if(_5e5.selector=="date"){_5eb=_5e9;}else{if(_5e5.selector=="time"){_5eb=_5ea;}else{_5eb=_5e9+" "+_5ea;}}var _5ec=[];var re=_processPattern(_5eb,dojo.hitch(this,_buildDateTimeRE,_5ec,_5e7,_5e5));return {regexp:re,tokens:_5ec,bundle:_5e7};};dojo.date.locale.parse=function(_5ee,_5ef){var info=dojo.date.locale._parseInfo(_5ef);var _5f1=info.tokens,_5f2=info.bundle;var re=new RegExp("^"+info.regexp+"$");var _5f4=re.exec(_5ee);if(!_5f4){return null;}var _5f5=["abbr","wide","narrow"];var _5f6=[1970,0,1,0,0,0,0];var amPm="";var _5f8=dojo.every(_5f4,function(v,i){if(!i){return true;}var _5fb=_5f1[i-1];var l=_5fb.length;switch(_5fb.charAt(0)){case "y":if(l!=2&&_5ef.strict){_5f6[0]=v;}else{if(v<100){v=Number(v);var year=""+new Date().getFullYear();var _5fe=year.substring(0,2)*100;var _5ff=Math.min(Number(year.substring(2,4))+20,99);var num=(v<_5ff)?_5fe+v:_5fe-100+v;_5f6[0]=num;}else{if(_5ef.strict){return false;}_5f6[0]=v;}}break;case "M":if(l>2){var _601=_5f2["months-format-"+_5f5[l-3]].concat();if(!_5ef.strict){v=v.replace(".","").toLowerCase();_601=dojo.map(_601,function(s){return s.replace(".","").toLowerCase();});}v=dojo.indexOf(_601,v);if(v==-1){return false;}}else{v--;}_5f6[1]=v;break;case "E":case "e":var days=_5f2["days-format-"+_5f5[l-3]].concat();if(!_5ef.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":_5f6[1]=0;case "d":_5f6[2]=v;break;case "a":var am=_5ef.am||_5f2.am;var pm=_5ef.pm||_5f2.pm;if(!_5ef.strict){var _607=/\./g;v=v.replace(_607,"").toLowerCase();am=am.replace(_607,"").toLowerCase();pm=pm.replace(_607,"").toLowerCase();}if(_5ef.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;}_5f6[3]=v;break;case "m":_5f6[4]=v;break;case "s":_5f6[5]=v;break;case "S":_5f6[6]=v;}return true;});var _608=+_5f6[3];if(amPm==="p"&&_608<12){_5f6[3]=_608+12;}else{if(amPm==="a"&&_608==12){_5f6[3]=0;}}var _609=new Date(_5f6[0],_5f6[1],_5f6[2],_5f6[3],_5f6[4],_5f6[5],_5f6[6]);if(_5ef.strict){_609.setFullYear(_5f6[0]);}var _60a=_5f1.join("");if(!_5f8||(_60a.indexOf("M")!=-1&&_609.getMonth()!=_5f6[1])||(_60a.indexOf("d")!=-1&&_609.getDate()!=_5f6[2])){return null;}return _609;};function _processPattern(_60b,_60c,_60d,_60e){var _60f=function(x){return x;};_60c=_60c||_60f;_60d=_60d||_60f;_60e=_60e||_60f;var _611=_60b.match(/(''|[^'])+/g);var _612=false;dojo.forEach(_611,function(_613,i){if(!_613){_611[i]="";}else{_611[i]=(_612?_60d:_60c)(_613);_612=!_612;}});return _60e(_611.join(""));};function _buildDateTimeRE(_615,_616,_617,_618){_618=dojo.regexp.escapeString(_618);if(!_617.strict){_618=_618.replace(" a"," ?a");}return _618.replace(/([a-z])\1*/ig,function(_619){var s;var c=_619.charAt(0);var l=_619.length;var p2="",p3="";if(_617.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=_617.am||_616.am||"AM";var pm=_617.pm||_616.pm||"PM";if(_617.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(_615){_615.push(_619);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};})();(function(){var _621=[];dojo.date.locale.addCustomFormats=function(_622,_623){_621.push({pkg:_622,name:_623});};dojo.date.locale._getGregorianBundle=function(_624){var _625={};dojo.forEach(_621,function(desc){var _627=dojo.i18n.getLocalization(desc.pkg,desc.name,_624);_625=dojo.mixin(_625,_627);},this);return _625;};})();dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");dojo.date.locale.getNames=function(item,type,use,_62b){var _62c;var _62d=dojo.date.locale._getGregorianBundle(_62b);var _62e=[item,use,type];if(use=="standAlone"){_62c=_62d[_62e.join("-")];}_62e[1]="format";return (_62c||_62d[_62e.join("-")]).concat();};dojo.date.locale.isWeekend=function(_62f,_630){var _631=dojo.cldr.supplemental.getWeekend(_630);var day=(_62f||new Date()).getDay();if(_631.end<_631.start){_631.end+=7;if(day<_631.start){day+=7;}}return day>=_631.start&&day<=_631.end;};dojo.date.locale._getDayOfYear=function(_633){return dojo.date.difference(new Date(_633.getFullYear(),0,1),_633)+1;};dojo.date.locale._getWeekOfYear=function(_634,_635){if(arguments.length==1){_635=0;}var _636=new Date(_634.getFullYear(),0,1).getDay();var adj=(_636-_635+7)%7;var week=Math.floor((dojo.date.locale._getDayOfYear(_634)+adj-1)/7);if(_636==_635){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(_639,_63a){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 _63b=dojo.date.stamp._isoRegExp.exec(_639);var _63c=null;if(_63b){_63b.shift();if(_63b[1]){_63b[1]--;}if(_63b[6]){_63b[6]*=1000;}if(_63a){_63a=new Date(_63a);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _63a["get"+prop]();}).forEach(function(_63e,_63f){if(_63b[_63f]===undefined){_63b[_63f]=_63e;}});}_63c=new Date(_63b[0]||1970,_63b[1]||0,_63b[2]||1,_63b[3]||0,_63b[4]||0,_63b[5]||0,_63b[6]||0);var _640=0;var _641=_63b[7]&&_63b[7].charAt(0);if(_641!="Z"){_640=((_63b[8]||0)*60)+(Number(_63b[9])||0);if(_641!="-"){_640*=-1;}}if(_641){_640-=_63c.getTimezoneOffset();}if(_640){_63c.setTime(_63c.getTime()+_640*60000);}}return _63c;};dojo.date.stamp.toISOString=function(_642,_643){var _=function(n){return (n<10)?"0"+n:n;};_643=_643||{};var _646=[];var _647=_643.zulu?"getUTC":"get";var date="";if(_643.selector!="time"){var year=_642[_647+"FullYear"]();date=["0000".substr((year+"").length)+year,_(_642[_647+"Month"]()+1),_(_642[_647+"Date"]())].join("-");}_646.push(date);if(_643.selector!="date"){var time=[_(_642[_647+"Hours"]()),_(_642[_647+"Minutes"]()),_(_642[_647+"Seconds"]())].join(":");var _64b=_642[_647+"Milliseconds"]();if(_643.milliseconds){time+="."+(_64b<100?"0":"")+_(_64b);}if(_643.zulu){time+="Z";}else{if(_643.selector!="time"){var _64c=_642.getTimezoneOffset();var _64d=Math.abs(_64c);time+=(_64c>0?"-":"+")+_(Math.floor(_64d/60))+":"+_(_64d%60);}}_646.push(time);}return _646.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;var _64f=d._scopeName+"Type";var qry="["+_64f+"]";function val2type(_651){if(d.isString(_651)){return "string";}if(typeof _651=="number"){return "number";}if(typeof _651=="boolean"){return "boolean";}if(d.isFunction(_651)){return "function";}if(d.isArray(_651)){return "array";}if(_651 instanceof Date){return "date";}if(_651 instanceof d._Url){return "url";}return "object";};function str2obj(_652,type){switch(type){case "string":return _652;case "number":return _652.length?Number(_652):NaN;case "boolean":return typeof _652=="boolean"?_652:!(_652.toLowerCase()=="false");case "function":if(d.isFunction(_652)){_652=_652.toString();_652=d.trim(_652.substring(_652.indexOf("{")+1,_652.length-1));}try{if(_652.search(/[^\w\.]+/i)!=-1){_652=d.parser._nameAnonFunc(new Function(_652),this);}return d.getObject(_652,false);}catch(e){return new Function();}case "array":return _652.split(/\s*,\s*/);case "date":switch(_652){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_652);}case "url":return d.baseUrl+_652;default:return d.fromJson(_652);}};var _654={};function getClassInfo(_655){if(!_654[_655]){var cls=d.getObject(_655);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_655+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _657=cls.prototype;var _658={};for(var name in _657){if(name.charAt(0)=="_"){continue;}var _65a=_657[name];_658[name]=val2type(_65a);}_654[_655]={cls:cls,params:_658};}return _654[_655];};this._functionFromScript=function(_65b){var _65c="";var _65d="";var _65e=_65b.getAttribute("args");if(_65e){d.forEach(_65e.split(/\s*,\s*/),function(part,idx){_65c+="var "+part+" = arguments["+idx+"]; ";});}var _661=_65b.getAttribute("with");if(_661&&_661.length){d.forEach(_661.split(/\s*,\s*/),function(part){_65c+="with("+part+"){";_65d+="}";});}return new Function(_65c+_65b.innerHTML+_65d);};this.instantiate=function(_663){var _664=[];d.forEach(_663,function(node){if(!node){return;}var type=node.getAttribute(_64f);if((!type)||(!type.length)){return;}var _667=getClassInfo(type);var _668=_667.cls;var ps=_668._noScript||_668.prototype._noScript;var _66a={};var _66b=node.attributes;for(var name in _667.params){var item=_66b.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _66e=item.value;switch(name){case "class":_66e=node.className;break;case "style":_66e=node.style&&node.style.cssText;}var _66f=_667.params[name];_66a[name]=str2obj(_66e,_66f);}if(!ps){var _670=[],_671=[];d.query("> script[type^='dojo/']",node).orphan().forEach(function(_672){var _673=_672.getAttribute("event"),type=_672.getAttribute("type"),nf=d.parser._functionFromScript(_672);if(_673){if(type=="dojo/connect"){_670.push({event:_673,func:nf});}else{_66a[_673]=nf;}}else{_671.push(nf);}});}var _675=_668["markupFactory"];if(!_675&&_668["prototype"]){_675=_668.prototype["markupFactory"];}var _676=_675?_675(_66a,node,_668):new _668(_66a,node);_664.push(_676);var _677=node.getAttribute("jsId");if(_677){d.setObject(_677,_676);}if(!ps){d.forEach(_670,function(_678){d.connect(_676,_678.event,null,_678.func);});d.forEach(_671,function(func){func.call(_676);});}});d.forEach(_664,function(_67a){if(_67a&&_67a.startup&&!_67a._started&&(!_67a.getParent||!_67a.getParent())){_67a.startup();}});return _664;};this.parse=function(_67b){var list=d.query(qry,_67b);var _67d=this.instantiate(list);return _67d;};}();(function(){var _67e=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,_67e);}else{dojo._loaders.unshift(_67e);}})();dojo.parser._anonCtr=0;dojo.parser._anon={};dojo.parser._nameAnonFunc=function(_67f,_680){var jpn="$joinpoint";var nso=(_680||dojo.parser._anon);if(dojo.isIE){var cn=_67f["__dojoNameCache"];if(cn&&nso[cn]===_67f){return _67f["__dojoNameCache"];}}var ret="__"+dojo.parser._anonCtr++;while(typeof nso[ret]!="undefined"){ret="__"+dojo.parser._anonCtr++;}nso[ret]=_67f;return ret;};}if(!dojo._hasResource["dojo.xml.XslTransform"]){dojo._hasResource["dojo.xml.XslTransform"]=true;dojo.provide("dojo.xml.XslTransform");dojo.xml.XslTransform=function(_685){window.console.log("XslTransform is supported by Internet Explorer and Mozilla, with limited support in Opera 9 (no document function support).");var _686=dojo.isIE;var _687=["Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];var _688=["Msxml2.FreeThreadedDOMDocument.5.0","MSXML2.FreeThreadedDOMDocument.4.0","MSXML2.FreeThreadedDOMDocument.3.0"];var _689=["Msxml2.XSLTemplate.5.0","Msxml2.XSLTemplate.4.0","MSXML2.XSLTemplate.3.0"];function getActiveXImpl(_68a){for(var i=0;i<_68a.length;i++){try{var _68c=new ActiveXObject(_68a[i]);if(_68c){return _68a[i];}}catch(e){}}dojo.raise("Could not find an ActiveX implementation in:\n\n "+_68a);};if(_685==null||_685==undefined){dojo.raise("You must pass the URI String for the XSL file to be used!");return false;}var _68d=null;var _68e=null;if(_686){_68d=new ActiveXObject(getActiveXImpl(_688));}else{_68e=new XSLTProcessor();_68d=document.implementation.createDocument("","",null);_68d.addEventListener("load",onXslLoad,false);}_68d.async=false;_68d.load(_685);if(_686){var xslt=new ActiveXObject(getActiveXImpl(_689));xslt.stylesheet=_68d;_68e=xslt.createProcessor();}function onXslLoad(){_68e.importStylesheet(_68d);};function getResultDom(_690,_691){if(_686){addIeParams(_691);var _692=getIeResultDom(_690);removeIeParams(_691);return _692;}else{return getMozillaResultDom(_690,_691);}};function addIeParams(_693){if(!_693){return;}for(var i=0;i<_693.length;i++){_68e.addParameter(_693[i][0],_693[i][1]);}};function removeIeParams(_695){if(!_695){return;}for(var i=0;i<_695.length;i++){_68e.addParameter(_695[i][0],"");}};function getIeResultDom(_697){_68e.input=_697;var _698=new ActiveXObject(getActiveXImpl(_687));_698.async=false;_698.validateOnParse=false;_68e.output=_698;_68e.transform();if(_698.parseError.errorCode!=0){var err=_698.parseError;dojo.raise("err.errorCode: "+err.errorCode+"\n\nerr.reason: "+err.reason+"\n\nerr.url: "+err.url+"\n\nerr.srcText: "+err.srcText);}return _698;};function getIeResultStr(_69a,_69b){_68e.input=_69a;_68e.transform();return _68e.output;};function addMozillaParams(_69c){if(!_69c){return;}for(var i=0;i<_69c.length;i++){_68e.setParameter(null,_69c[i][0],_69c[i][1]);}};function getMozillaResultDom(_69e,_69f){addMozillaParams(_69f);var _6a0=_68e.transformToDocument(_69e);_68e.clearParameters();return _6a0;};function getMozillaResultStr(_6a1,_6a2,_6a3){addMozillaParams(_6a2);var _6a4=_68e.transformToFragment(_6a1,_6a3);var _6a5=new XMLSerializer();_68e.clearParameters();return _6a5.serializeToString(_6a4);};this.getResultString=function(_6a6,_6a7,_6a8){var _6a9=null;if(_686){addIeParams(_6a7);_6a9=getIeResultStr(_6a6,_6a7);removeIeParams(_6a7);}else{_6a9=getMozillaResultStr(_6a6,_6a7,_6a8);}return _6a9;};this.transformToContentPane=function(_6aa,_6ab,_6ac,_6ad){var _6ae=this.getResultString(_6aa,_6ab,_6ad);_6ac.setContent(_6ae);};this.transformToRegion=function(_6af,_6b0,_6b1,_6b2){try{var _6b3=this.getResultString(_6af,_6b0,_6b2);_6b1.innerHTML=_6b3;}catch(e){dojo.raise(e.message+"\n\n xsltUri: "+_685);}};this.transformToDocument=function(_6b4,_6b5){return getResultDom(_6b4,_6b5);};this.transformToWindow=function(_6b6,_6b7,_6b8,_6b9){try{_6b8.open();_6b8.write(this.getResultString(_6b6,_6b7,_6b9));_6b8.close();}catch(e){dojo.raise(e.message+"\n\n xsltUri: "+_685);}};};}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);_6bd=history.length;};if(dojo.exists("tests.back-hash")){back.getHash=getHash;back.setHash=setHash;}var _6be=(typeof (window)!=="undefined")?window.location.href:"";var _6bf=(typeof (window)!=="undefined")?getHash():"";var _6c0=null;var _6c1=null;var _6c2=null;var _6c3=null;var _6c4=[];var _6c5=[];var _6c6=false;var _6c7=false;var _6bd;function handleBackButton(){var _6c8=_6c5.pop();if(!_6c8){return;}var last=_6c5[_6c5.length-1];if(!last&&_6c5.length==0){last=_6c0;}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");}}}}_6c4.push(_6c8);};back.goBack=handleBackButton;function handleForwardButton(){var last=_6c4.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");}}}_6c5.push(last);};back.goForward=handleForwardButton;function createState(url,args,hash){return {"url":url,"kwArgs":args,"urlHash":hash};};function getUrlQuery(url){var _6cf=url.split("?");if(_6cf.length<2){return null;}else{return _6cf[1];}};function loadIframeHistory(){var url=(dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html"))+"?"+(new Date()).getTime();_6c6=true;if(_6c3){dojo.isSafari?_6c3.location=url:window.frames[_6c3.name].location=url;}else{}return url;};function checkLocation(){if(!_6c7){var hsl=_6c5.length;var hash=getHash();if((hash===_6bf||window.location.href==_6be)&&(hsl==1)){handleBackButton();return;}if(_6c4.length>0){if(_6c4[_6c4.length-1].urlHash===hash){handleForwardButton();return;}}if((hsl>=2)&&(_6c5[hsl-2])){if(_6c5[hsl-2].urlHash===hash){handleBackButton();return;}}if(dojo.isSafari&&dojo.isSafari<3){var _6d3=history.length;if(_6d3>_6bd){handleForwardButton();}else{if(_6d3<_6bd){handleBackButton();}}_6bd=_6d3;}}};back.init=function(){if(dojo.byId("dj_history")){return;}var src=dojo.config["dojoIframeHistoryUrl"]||dojo.moduleUrl("dojo","resources/iframe_history.html");document.write("");};back.setInitialState=function(args){_6c0=createState(_6be,args,_6bf);};back.addToHistory=function(args){_6c4=[];var hash=null;var url=null;if(!_6c3){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");}_6c3=window.frames["dj_history"];}if(!_6c2){_6c2=document.createElement("a");dojo.body().appendChild(_6c2);_6c2.style.display="none";}if(args["changeUrl"]){hash=""+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());if(_6c5.length==0&&_6c0.urlHash==hash){_6c0=createState(url,args,hash);return;}else{if(_6c5.length>0&&_6c5[_6c5.length-1].urlHash==hash){_6c5[_6c5.length-1]=createState(url,args,hash);return;}}_6c7=true;setTimeout(function(){setHash(hash);_6c7=false;},1);_6c2.href=hash;if(dojo.isIE){url=loadIframeHistory();var _6d9=args["back"]||args["backButton"]||args["handle"];var tcb=function(_6db){if(getHash()!=""){setTimeout(function(){setHash(hash);},1);}_6d9.apply(this,[_6db]);};if(args["back"]){args.back=tcb;}else{if(args["backButton"]){args.backButton=tcb;}else{if(args["handle"]){args.handle=tcb;}}}var _6dc=args["forward"]||args["forwardButton"]||args["handle"];var tfw=function(_6de){if(getHash()!=""){setHash(hash);}if(_6dc){_6dc.apply(this,[_6de]);}};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(!_6c1){_6c1=setInterval(checkLocation,200);}}}}else{url=loadIframeHistory();}_6c5.push(createState(url,args,hash));};back._iframeLoaded=function(evt,_6e0){var _6e1=getUrlQuery(_6e0.href);if(_6e1==null){if(_6c5.length==1){handleBackButton();}return;}if(_6c6){_6c6=false;return;}if(_6c5.length>=2&&_6e1==getUrlQuery(_6c5[_6c5.length-2].url)){handleBackButton();}else{if(_6c4.length>0&&_6e1==getUrlQuery(_6c4[_6c4.length-1].url)){handleForwardButton();}}};})();}if(!dojo._hasResource["dojo.cookie"]){dojo._hasResource["dojo.cookie"]=true;dojo.provide("dojo.cookie");dojo.cookie=function(name,_6e3,_6e4){var c=document.cookie;if(arguments.length==1){var _6e6=c.match(new RegExp("(?:^|; )"+dojo.regexp.escapeString(name)+"=([^;]*)"));return _6e6?decodeURIComponent(_6e6[1]):undefined;}else{_6e4=_6e4||{};var exp=_6e4.expires;if(typeof exp=="number"){var d=new Date();d.setTime(d.getTime()+exp*24*60*60*1000);exp=_6e4.expires=d;}if(exp&&exp.toUTCString){_6e4.expires=exp.toUTCString();}_6e3=encodeURIComponent(_6e3);var _6e9=name+"="+_6e3;for(propName in _6e4){_6e9+="; "+propName;var _6ea=_6e4[propName];if(_6ea!==true){_6e9+="="+_6ea;}}document.cookie=_6e9;}};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 _6ec={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 _6ed={CHF:5};var _6ee=_6ec[code],_6ef=_6ed[code];if(typeof _6ee=="undefined"){_6ee=2;}if(typeof _6ef=="undefined"){_6ef=0;}return {places:_6ee,round:_6ef};};}if(!dojo._hasResource["dojo.currency"]){dojo._hasResource["dojo.currency"]=true;dojo.provide("dojo.currency");dojo.currency._mixInDefaults=function(_6f0){_6f0=_6f0||{};_6f0.type="currency";var _6f1=dojo.i18n.getLocalization("dojo.cldr","currency",_6f0.locale)||{};var iso=_6f0.currency;var data=dojo.cldr.monetary.getData(iso);dojo.forEach(["displayName","symbol","group","decimal"],function(prop){data[prop]=_6f1[iso+"_"+prop];});data.fractional=[true,false];return dojo.mixin(data,_6f0);};dojo.currency.format=function(_6f5,_6f6){return dojo.number.format(_6f5,dojo.currency._mixInDefaults(_6f6));};dojo.currency.regexp=function(_6f7){return dojo.number.regexp(dojo.currency._mixInDefaults(_6f7));};dojo.currency.parse=function(_6f8,_6f9){return dojo.number.parse(_6f8,dojo.currency._mixInDefaults(_6f9));};}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");dojo.provide("dojo.fx.Toggler");(function(){var _6fa={_fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[]);}return this;}};var _6fd=function(_6fe){this._index=-1;this._animations=_6fe||[];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(_6fd,{_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(_700,_701){if(!this._current){this._current=this._animations[this._index=0];}if(!_701&&this._current.status()=="playing"){return this;}var _702=dojo.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin");}),_703=dojo.connect(this._current,"onBegin",this,function(arg){this._fire("onBegin",arguments);}),_705=dojo.connect(this._current,"onPlay",this,function(arg){this._fire("onPlay",arguments);dojo.disconnect(_702);dojo.disconnect(_703);dojo.disconnect(_705);});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(_709,_70a){this.pause();var _70b=this.duration*_709;this._current=null;dojo.some(this._animations,function(a){if(a.duration<=_70b){this._current=a;return true;}_70b-=a.duration;return false;});if(this._current){this._current.gotoPercent(_70b/_current.duration,_70a);}return this;},stop:function(_70d){if(this._current){if(_70d){for(;this._index+11){var _75a=node.ownerDocument||dojo.doc;dojox.data.dom.replaceChildren(node,_75a.createTextNode(text));return text;}else{if(node.textContent!==undefined){return node.textContent;}var _75b="";if(node==null){return _75b;}for(var i=0;i=0;};}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"]);if(dojo.config.afterOnLoad&&dojo.isBrowser){window.setTimeout(dojo._fakeLoadInit,1000);}})(); /* 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. */ dojo.provide("dijit.dijit");if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){var _1=dojo.global;var _2=dojo.doc;if(_2.selection){return !_2.selection.createRange().text;}else{var _3=_1.getSelection();if(dojo.isString(_3)){return !_3;}else{return _3.isCollapsed||!_3.toString();}}},getBookmark:function(){var _4,_5=dojo.doc.selection;if(_5){var _6=_5.createRange();if(_5.type.toUpperCase()=="CONTROL"){if(_6.length){_4=[];var i=0,_8=_6.length;while(i<_8){_4.push(_6.item(i++));}}else{_4=null;}}else{_4=_6.getBookmark();}}else{if(window.getSelection){_5=dojo.global.getSelection();if(_5){_6=_5.getRangeAt(0);_4=_6.cloneRange();}}else{console.warn("No idea how to store the current selection for this browser!");}}return _4;},moveToBookmark:function(_9){var _a=dojo.doc;if(_a.selection){var _b;if(dojo.isArray(_9)){_b=_a.body.createControlRange();dojo.forEach(_9,"range.addElement(item)");}else{_b=_a.selection.createRange();_b.moveToBookmark(_9);}_b.select();}else{var _c=dojo.global.getSelection&&dojo.global.getSelection();if(_c&&_c.removeAllRanges){_c.removeAllRanges();_c.addRange(_9);}else{console.warn("No idea how to restore selection for this browser!");}}},getFocus:function(_d,_e){return {node:_d&&dojo.isDescendant(dijit._curFocus,_d.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_e||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_e||dojo.global,dijit.getBookmark):null,openedForWindow:_e};},focus:function(_f){if(!_f){return;}var _10="node" in _f?_f.node:_f,_11=_f.bookmark,_12=_f.openedForWindow;if(_10){var _13=(_10.tagName.toLowerCase()=="iframe")?_10.contentWindow:_10;if(_13&&_13.focus){try{_13.focus();}catch(e){}}dijit._onFocusNode(_10);}if(_11&&dojo.withGlobal(_12||dojo.global,dijit.isCollapsed)){if(_12){_12.focus();}try{dojo.withGlobal(_12||dojo.global,dijit.moveToBookmark,null,[_11]);}catch(e){}}},_activeStack:[],registerWin:function(_14){if(!_14){_14=window;}dojo.connect(_14.document,"onmousedown",function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);dijit._onTouchNode(evt.target||evt.srcElement);});var _16=_14.document.body||_14.document.getElementsByTagName("body")[0];if(_16){if(dojo.isIE){_16.attachEvent("onactivate",function(evt){if(evt.srcElement.tagName.toLowerCase()!="body"){dijit._onFocusNode(evt.srcElement);}});_16.attachEvent("ondeactivate",function(evt){dijit._onBlurNode(evt.srcElement);});}else{_16.addEventListener("focus",function(evt){dijit._onFocusNode(evt.target);},true);_16.addEventListener("blur",function(evt){dijit._onBlurNode(evt.target);},true);}}_16=null;},_onBlurNode:function(_1b){dijit._prevFocus=dijit._curFocus;dijit._curFocus=null;if(dijit._justMouseDowned){return;}if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);}dijit._clearActiveWidgetsTimer=setTimeout(function(){delete dijit._clearActiveWidgetsTimer;dijit._setStack([]);dijit._prevFocus=null;},100);},_onTouchNode:function(_1c){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _1d=[];try{while(_1c){if(_1c.dijitPopupParent){_1c=dijit.byId(_1c.dijitPopupParent).domNode;}else{if(_1c.tagName&&_1c.tagName.toLowerCase()=="body"){if(_1c===dojo.body()){break;}_1c=dijit.getDocumentWindow(_1c.ownerDocument).frameElement;}else{var id=_1c.getAttribute&&_1c.getAttribute("widgetId");if(id){_1d.unshift(id);}_1c=_1c.parentNode;}}}}catch(e){}dijit._setStack(_1d);},_onFocusNode:function(_1f){if(_1f&&_1f.tagName&&_1f.tagName.toLowerCase()=="body"){return;}dijit._onTouchNode(_1f);if(_1f==dijit._curFocus){return;}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus;}dijit._curFocus=_1f;dojo.publish("focusNode",[_1f]);},_setStack:function(_20){var _21=dijit._activeStack;dijit._activeStack=_20;for(var _22=0;_22=_22;i--){var _24=dijit.byId(_21[i]);if(_24){_24._focused=false;_24._hasBeenBlurred=true;if(_24._onBlur){_24._onBlur();}if(_24._setStateClass){_24._setStateClass();}dojo.publish("widgetBlur",[_24]);}}for(i=_22;i<_20.length;i++){_24=dijit.byId(_20[i]);if(_24){_24._focused=true;if(_24._onFocus){_24._onFocus();}if(_24._setStateClass){_24._setStateClass();}dojo.publish("widgetFocus",[_24]);}}}});dojo.addOnLoad(dijit.registerWin);}if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};},add:function(_25){if(this._hash[_25.id]){throw new Error("Tried to register widget with id=="+_25.id+" but that id is already registered");}this._hash[_25.id]=_25;},remove:function(id){delete this._hash[id];},forEach:function(_27){for(var id in this._hash){_27(this._hash[id]);}},filter:function(_29){var res=new dijit.WidgetSet();this.forEach(function(_2b){if(_29(_2b)){res.add(_2b);}});return res;},byId:function(id){return this._hash[id];},byClass:function(cls){return this.filter(function(_2e){return _2e.declaredClass==cls;});}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_2f){var id;do{id=_2f+"_"+(_2f in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_2f]:dijit._widgetTypeCtr[_2f]=0);}while(dijit.byId(id));return id;};if(dojo.isIE){dojo.addOnUnload(function(){dijit.registry.forEach(function(_31){_31.destroy();});});}dijit.byId=function(id){return (dojo.isString(id))?dijit.registry.byId(id):id;};dijit.byNode=function(_33){return dijit.registry.byId(_33.getAttribute("widgetId"));};dijit.getEnclosingWidget=function(_34){while(_34){if(_34.getAttribute&&_34.getAttribute("widgetId")){return dijit.registry.byId(_34.getAttribute("widgetId"));}_34=_34.parentNode;}return null;};dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};dijit._isElementShown=function(_35){var _36=dojo.style(_35);return (_36.visibility!="hidden")&&(_36.visibility!="collapsed")&&(_36.display!="none");};dijit.isTabNavigable=function(_37){if(dojo.hasAttr(_37,"disabled")){return false;}var _38=dojo.hasAttr(_37,"tabindex");var _39=dojo.attr(_37,"tabindex");if(_38&&_39>=0){return true;}var _3a=_37.nodeName.toLowerCase();if(((_3a=="a"&&dojo.hasAttr(_37,"href"))||dijit._tabElements[_3a])&&(!_38||_39>=0)){return true;}return false;};dijit._getTabNavigable=function(_3b){var _3c,_3d,_3e,_3f,_40,_41;var _42=function(_43){dojo.query("> *",_43).forEach(function(_44){var _45=dijit._isElementShown(_44);if(_45&&dijit.isTabNavigable(_44)){var _46=dojo.attr(_44,"tabindex");if(!dojo.hasAttr(_44,"tabindex")||_46==0){if(!_3c){_3c=_44;}_3d=_44;}else{if(_46>0){if(!_3e||_46<_3f){_3f=_46;_3e=_44;}if(!_40||_46>=_41){_41=_46;_40=_44;}}}}if(_45){_42(_44);}});};if(dijit._isElementShown(_3b)){_42(_3b);}return {first:_3c,last:_3d,lowest:_3e,highest:_40};};dijit.getFirstInTabbingOrder=function(_47){var _48=dijit._getTabNavigable(dojo.byId(_47));return _48.lowest?_48.lowest:_48.first;};dijit.getLastInTabbingOrder=function(_49){var _4a=dijit._getTabNavigable(dojo.byId(_49));return _4a.last?_4a.last:_4a.highest;};}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var _4b=dojo.global;var _4c=dojo.doc;var w=0,h=0;var de=_4c.documentElement;var dew=de.clientWidth,deh=de.clientHeight;if(dojo.isMozilla){var _52,_53,_54,_55;var dbw=_4c.body.clientWidth;if(dbw>dew){_52=dew;_54=dbw;}else{_54=dew;_52=dbw;}var dbh=_4c.body.clientHeight;if(dbh>deh){_53=deh;_55=dbh;}else{_55=deh;_53=dbh;}w=(_54>_4b.innerWidth)?_52:_54;h=(_55>_4b.innerHeight)?_53:_55;}else{if(!dojo.isOpera&&_4b.innerWidth){w=_4b.innerWidth;h=_4b.innerHeight;}else{if(dojo.isIE&&de&&deh){w=dew;h=deh;}else{if(dojo.body().clientWidth){w=dojo.body().clientWidth;h=dojo.body().clientHeight;}}}}var _58=dojo._docScroll();return {w:w,h:h,l:_58.x,t:_58.y};};dijit.placeOnScreen=function(_59,pos,_5b,_5c){var _5d=dojo.map(_5b,function(_5e){return {corner:_5e,pos:pos};});return dijit._place(_59,_5d);};dijit._place=function(_5f,_60,_61){var _62=dijit.getViewport();if(!_5f.parentNode||String(_5f.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(_5f);}var _63=null;dojo.some(_60,function(_64){var _65=_64.corner;var pos=_64.pos;if(_61){_61(_5f,_64.aroundCorner,_65);}var _67=_5f.style;var _68=_67.display;var _69=_67.visibility;_67.visibility="hidden";_67.display="";var mb=dojo.marginBox(_5f);_67.display=_68;_67.visibility=_69;var _6b=(_65.charAt(1)=="L"?pos.x:Math.max(_62.l,pos.x-mb.w)),_6c=(_65.charAt(0)=="T"?pos.y:Math.max(_62.t,pos.y-mb.h)),_6d=(_65.charAt(1)=="L"?Math.min(_62.l+_62.w,_6b+mb.w):pos.x),_6e=(_65.charAt(0)=="T"?Math.min(_62.t+_62.h,_6c+mb.h):pos.y),_6f=_6d-_6b,_70=_6e-_6c,_71=(mb.w-_6f)+(mb.h-_70);if(_63==null||_71<_63.overflow){_63={corner:_65,aroundCorner:_64.aroundCorner,x:_6b,y:_6c,w:_6f,h:_70,overflow:_71};}return !_71;});_5f.style.left=_63.x+"px";_5f.style.top=_63.y+"px";if(_63.overflow&&_61){_61(_5f,_63.aroundCorner,_63.corner);}return _63;};dijit.placeOnScreenAroundElement=function(_72,_73,_74,_75){_73=dojo.byId(_73);var _76=_73.style.display;_73.style.display="";var _77=_73.offsetWidth;var _78=_73.offsetHeight;var _79=dojo.coords(_73,true);_73.style.display=_76;var _7a=[];for(var _7b in _74){_7a.push({aroundCorner:_7b,corner:_74[_7b],pos:{x:_79.x+(_7b.charAt(1)=="L"?0:_77),y:_79.y+(_7b.charAt(0)=="T"?0:_78)}});}return dijit._place(_72,_7a,_75);};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){if(dojo.isSafari&&!doc._parentWindow){var fix=function(win){win.document._parentWindow=win;for(var i=0;i0&&_81[pi].parent===_81[pi-1].widget;pi--){}return _81[pi];};_8f.push(dojo.connect(_8b,"onkeypress",this,function(evt){if(evt.keyCode==dojo.keys.ESCAPE&&_86.onCancel){dojo.stopEvent(evt);_86.onCancel();}else{if(evt.keyCode==dojo.keys.TAB){dojo.stopEvent(evt);var _93=_90();if(_93&&_93.onCancel){_93.onCancel();}}}}));if(_87.onCancel){_8f.push(dojo.connect(_87,"onCancel",null,_86.onCancel));}_8f.push(dojo.connect(_87,_87.onExecute?"onExecute":"onChange",null,function(){var _94=_90();if(_94&&_94.onExecute){_94.onExecute();}}));_81.push({wrapper:_8b,iframe:_8d,widget:_87,parent:_86.parent,onExecute:_86.onExecute,onCancel:_86.onCancel,onClose:_86.onClose,handlers:_8f});if(_87.onOpen){_87.onOpen(_8e);}return _8e;};this.close=function(_95){while(dojo.some(_81,function(_96){return _96.widget==_95;})){var top=_81.pop(),_98=top.wrapper,_99=top.iframe,_9a=top.widget,_9b=top.onClose;if(_9a.onClose){_9a.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_9a||!_9a.domNode){return;}this.prepare(_9a.domNode);_99.destroy();dojo._destroyElement(_98);if(_9b){_9b();}}};}();dijit._frames=new function(){var _9c=[];this.pop=function(){var _9d;if(_9c.length){_9d=_9c.pop();_9d.style.display="";}else{if(dojo.isIE){var _9e="");com.ibm.portal.aggregation.forms.PORTLET_FORM_HANDLER._callbackfns[_2dc]={fn:_2d9,args:_2da};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: "+_2dc+"; url is: "+this._feedURI);_2db=document.createElement("IFRAME");_2db.setAttribute("name",_2dc);_2db.setAttribute("id",_2dc);var me=this;_2db.onload=function(){var xml=window.frames[_2dc].document;_2d9("load",xml,null,_2da);com.ibm.portal.EVENT_BROKER.endRequest.fire({uri:me._feedURI});};this._form.getDOMElement().setAttribute("action",this._feedURI);}_2db.style.visibility="hidden";_2db.style.height="1px";_2db.style.width="1px";document.body.appendChild(_2db);if(window.frames[_2dc].name!=_2dc){window.frames[_2dc].name=_2dc;}ibm.portal.debug.text("Setting the iframe target attribute to: "+_2dc);this._form.getDOMElement().setAttribute("target",_2dc);this._form.submit();ibm.portal.debug.exit("PortalRestServiceRequest._doIframeRequest");},_doXmlHttpRequest:function(_2e0,body,_2e2,_2e3){ibm.portal.debug.entry("PortalRestServiceRequest._doXmlHttpRequest",[_2e0,body,_2e2,_2e3]);ibm.portal.debug.text("Attempting to retrieve: "+this._feedURI+" using method: "+_2e0+"; synchronously? "+this._sync);var me=this;var args={url:this._feedURI,content:{},headers:{"X-IBM-XHR":"true"},handle:function(_2e6,_2e7){ibm.portal.debug.entry("PortalRestServiceRequest.handle",[_2e6,_2e7]);if(_2e6 instanceof Error&&_2e6.dojoType==="cancel"){_2e2("cancel",_2e6,null,_2e3);return;}var xhr=_2e7.xhr;ibm.portal.debug.text("XHR object: "+xhr);var _2e9=com.ibm.portal.services.PortalRestServiceConfig;var _2ea=xhr.getResponseHeader("X-Request-Digest");if(_2ea){_2e9.digest=_2ea;}if(xhr.status==200){var data=_2e6;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 _2ed=xhr.getResponseHeader("Content-Type");ibm.portal.debug.text("content-type is: "+_2ed);if(/^text\/html/.exec(_2ed)&&loc&&(loc.indexOf(ibmPortalConfig["portalProtectedURI"])>-1||loc.indexOf(ibmPortalConfig["portalPublicURI"])>-1)){ibm.portal.debug.text("content-type is text .. follow IBM-Web2-Location");top.location.href=loc;return;}var auth=com.ibm.ajax.auth;var _2ef=false;if(me._customResponseValidator){_2ef=me._customResponseValidator(_2e6,_2e7);}if(!_2ef){_2ef=auth.isAuthenticationRequired(_2e6,_2e7);}if(_2ef){auth.authenticationHandler(_2e6,_2e7,me._onauthenticated);return;}ibm.portal.debug.text("Read feed: "+me._feedURI);if(dojo.isIE){var doc=dojox.data.dom.createDocument(data);_2e2("load",doc,xhr,_2e3);}else{_2e2("load",data,xhr,_2e3);}}else{if(xhr.status==401||xhr.status==0){ibm.portal.debug.text("Basic auth 401 found, trigger reload");com.ibm.ajax.auth.authenticationHandler();return;}else{_2e2("error",_2e6,xhr,_2e3);}}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());_2e0=this._form.method;}_2e0=_2e0.toUpperCase();if(_2e0!="GET"&&_2e0!="POST"){if(ibmPortalConfig&&ibmPortalConfig.xMethodOverride){args.headers["X-Method-Override"]=_2e0.toUpperCase();_2e0="Post";}}if(_2e0=="PUT"&&body){args.putData=body;}else{if(_2e0=="POST"&&body){args.postData=body;}}if(dojo.isIE){args.content["ibm.web2.contentType"]="text/xml";args.handleAs="text";}var _2f1=com.ibm.portal.services.PortalRestServiceConfig;if(_2f1.timeout){args.timeout=_2f1.timeout;}if(_2f1.digest){args.content["digest"]=_2f1.digest;}_2e0=com.ibm.portal.utilities.string.properCase(_2e0);var _2f2=dojo["xhr"+_2e0];if(_2f2){this._deferred=_2f2(args);}else{throw new Error("Invalid request method attempted: "+_2e0);}ibm.portal.debug.exit("PortalRestServiceRequest._doXmlHttpRequest");},toString:function(){return this._feedURI;}});com.ibm.portal.services.PortalRestServiceConfig={timeout:null,digest:null};com.ibm.ajax.auth.setAuthenticationHandler(function(){if(typeof (document.isCSA)=="undefined"){top.location.reload();}else{ibm.portal.debug.entry("DefaultAuthenticationHandler");ibm.portal.debug.text("Illegal response content-type detected!");ibm.portal.debug.text("Parameterized redirect URL is: "+ibmPortalConfig["contentModelBlankURL"]);var _2f3=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();var _2f4=ibmPortalConfig["contentModelBlankURL"].replace("-----oid-----",_2f3.getPageSelection());ibm.portal.debug.text("fullPageRefreshURL is currently: "+_2f4);if(dojo.cookie("WASReqURL")!=null){var _2f5=_2f3.createLinkToCurrentState();var _2f6="WASReqURL="+_2f5+"; path=/";document.cookie=_2f6;}ibm.portal.debug.text("Redirecting to: "+_2f4);com.ibm.portal.EVENT_BROKER.redirect.fire({url:_2f4});top.location.href=_2f4;ibm.portal.debug.exit("DefaultAuthenticationHandler");}});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(/&/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,_2fa,_2fb,_2fc,_2fd,_2fe,_2ff,_300,_301,_302,_303){ibm.portal.debug.entry("PortletInfo.constructor",[wId,pId,_2fa,_2fb,_2fc,_2fd,_2ff,_303]);this.windowId=wId;this.portletId=pId;this.uri="fragment:pm:oid:"+wId+"@oid:"+pId;this.markup=_2fa;this.portletModes=_2fb;this.windowStates=_2fc;this.dependentPortlets=_2fd;this.otherPortlets=_2fe;this.stateVaryExpressions=_300;this.updatedState=_2ff;this.currentMode=_301;this.currentWindowState=_302;this.portletTitle=_303;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"},activeRequests:{},constructor:function(){this.staticContext=com.ibm.portal.services.PortletFragmentService.prototype;},_flagPortletUrl:function(url,_305){ibm.portal.debug.entry("PortletFragmentService._flagPortletUrl",[url]);var _306=url.indexOf("uri=fragment:pm:oid:");var _307=new com.ibm.portal.utilities.HttpUrl(url);_307.addParameter("ibm.web2.keepRenderMode","false");if(_306<0){_305=_305.replace(/lm:/g,"fragment:pm:");_307.addParameter("uri",_305);}ibm.portal.debug.exit("PortletFragmentService._flagPortletUrl",[_307.toString()]);return _307.toString();},getPortletInfo:function(_308,_309,_30a,form,_30c){ibm.portal.debug.entry("PortletFragmentService.getPortletInfo",[_308,_309,_30a,form,_30c]);if(_309=="#"||_309==window.location.href+"#"){ibm.portal.debug.text("Illegal portlet url provided: "+_309);ibm.portal.debug.text("Aborting request.");return false;}if(com.ibm.portal.utilities.isJavascriptUrl(_309)){return eval(_309);}var _30d=_309;if(_30d.indexOf(top.location.href)==0){_30d=_30d.substring(top.location.href.length);while(_30d.length>0&&_30d.charAt(0)=="/"){_30d=_30d.substring(1);}}if(_30d.indexOf("?")==0){var _30e=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState();_309=_30e.resolveRelativePortletURL(_30d);}if(com.ibm.portal.utilities.isExternalUrl(_309)){self.location.href=_309;}else{var url={url:this._flagPortletUrl(_309,_308)};var _310=ibmPortalConfig.enforceOneActivePortletRequest;if(_310){var _311=this.staticContext.activeRequests;if(_311[_308]!==undefined&&_311[_308]!==null){_311[_308].cancel();com.ibm.portal.EVENT_BROKER.cancelFragmentUpdate.fire({id:_308});_311[_308]=null;}}var _312=new com.ibm.portal.services.PortalRestServiceRequest(url,form);if(!_30c){com.ibm.portal.EVENT_BROKER.startFragment.fire({id:_308});}if(_310){_311[_308]=_312;}var me=this;_312.read(function(type,_315,xhr){if(_310){_311[_308]=null;}if(!_312.cancelled){var _317=null;if(type=="load"){_317=me.createPortletInfo(_315);}if(_315 instanceof Error){_317=_315;}if(!_30c){me._fireEvents(_317,_308,xhr);}if(_30a){_30a(_317,xhr);}}});}ibm.portal.debug.exit("PortletFragmentService.getPortletInfo");},readWindowID:function(_318){ibm.portal.debug.entry("PortletFragmentService.readWindowID",[_318]);var _319="/atom:feed/atom:entry/atom:id";var _31a=com.ibm.portal.xpath.evaluateXPath(_319,_318,this.namespaces);var _31b=dojox.data.dom.textContent(_31a[0]);ibm.portal.debug.exit("PortletFragmentService.readWindowID",[_31b.substring(4)]);return _31b.substring(4);},readPortletID:function(_31c){ibm.portal.debug.entry("PortletFragmentService.readPortletID",[_31c]);var _31d="/atom:feed/atom:id";var _31e=com.ibm.portal.xpath.evaluateXPath(_31d,_31c,this.namespaces);var _31f=dojox.data.dom.textContent(_31e[0]);ibm.portal.debug.exit("PortletFragmentService.readPortletID",[_31f.substring(4)]);return _31f.substring(4);},readMarkup:function(_320){ibm.portal.debug.entry("PortletFragmentService.readMarkup",[_320]);var _321="/atom:feed/atom:entry/atom:content";var _322=com.ibm.portal.xpath.evaluateXPath(_321,_320,this.namespaces);var _323="";if(_322!=null&&_322.length>0){_323=dojox.data.dom.textContent(_322[0]);}ibm.portal.debug.exit("PortletFragmentService.readMarkup",[_323]);return _323;},readPortletModes:function(_324){ibm.portal.debug.entry("PortletFragmentService.readPortletModes",[_324]);var _325="/atom:feed/atom:entry/atom:link[@portal:rel='portlet-mode']";var _326=com.ibm.portal.xpath.evaluateXPath(_325,_324,this.namespaces);var _327=new Array();if(_326!=null&&_326.length>0){var _328=_326.length;for(var i=0;i<_328;i++){_327.push({"link":_326[i].getAttribute("href"),"mode":_326[i].getAttribute("title")});}}ibm.portal.debug.exit("PortletFragmentService.readPortletModes",[_327]);return _327;},readWindowStates:function(_32a){ibm.portal.debug.entry("PortletFragmentService.readWindowStates",[_32a]);var _32b="/atom:feed/atom:entry/atom:link[@portal:rel='window-state']";var _32c=com.ibm.portal.xpath.evaluateXPath(_32b,_32a,this.namespaces);var _32d=new Array();if(_32c!=null&&_32c.length>0){var _32e=_32c.length;for(var i=0;i<_32e;i++){_32d.push({"link":_32c[i].getAttribute("href"),"mode":_32c[i].getAttribute("title")});}}ibm.portal.debug.exit("PortletFragmentService.readWindowStates",[_32d]);return _32d;},readDependentPortlets:function(_330){ibm.portal.debug.entry("PortletFragmentService.readDependentPortlets",[_330]);var _331="/atom:feed/atom:link[@portal:rel='dependent']";var _332=com.ibm.portal.xpath.evaluateXPath(_331,_330,this.namespaces);var _333=new Array();if(_332!=null&&_332.length>0){var _334=_332.length;for(var i=0;i<_334;i++){_333.push({"link":_332[i].getAttribute("href"),"portlet":_332[i].getAttribute("title"),"uri":_332[i].getAttribute("portal:uri")?_332[i].getAttribute("portal:uri"):_332[i].getAttribute("uri")});}}ibm.portal.debug.exit("PortletFragmentService.readDependentPortlets",[_333]);return _333;},readOtherPortlets:function(_336){ibm.portal.debug.entry("PortletFragmentService.readOtherPortlets",[_336]);var _337="/atom:feed/atom:link[@portal:rel='other']";var _338=com.ibm.portal.xpath.evaluateXPath(_337,_336,this.namespaces);var _339=new Array();if(_338!=null&&_338.length>0){var _33a=_338.length;for(var i=0;i<_33a;i++){_339.push({"link":_338[i].getAttribute("href"),"portlet":_338[i].getAttribute("title"),"uri":_338[i].getAttribute("portal:uri")});}}ibm.portal.debug.exit("PortletFragmentService.readOtherPortlets",[_339]);return _339;},readStateVaryExpressions:function(_33c){ibm.portal.debug.entry("PortletFragmentService.readStateVaryExpressions",[_33c]);var _33d="/atom:feed/atom:entry/state-vary:state-vary/state-vary:expr";var _33e=com.ibm.portal.xpath.evaluateXPath(_33d,_33c,this.namespaces);var _33f=new Array();if(_33e!=null&&_33e.length>0){var _340=_33e.length;for(var i=0;i<_340;i++){var _342=_33e[i].firstChild;if(_342!=null){_33f.push(_342.nodeValue);}}}ibm.portal.debug.exit("PortletFragmentService.readStateVaryExpressions",[_33f]);return _33f;},readPortletState:function(_343){return this._readPortletState(_343);},_readPortletState:function(_344){ibm.portal.debug.entry("PortletFragmentService.readPortletState",[_344]);var _345="/atom:feed/atom:entry/state:root";var _346=com.ibm.portal.xpath.evaluateXPath(_345,_344,this.namespaces);var _347=null;if(_346!=null&&_346.length>0){var doc=dojox.data.dom.createDocument();com.ibm.portal.utilities.addExternalNode(doc,_346[0]);_347=doc;}else{_345="/atom:feed/state:root";_346=com.ibm.portal.xpath.evaluateXPath(_345,_344,this.namespaces);if(_346!=null&&_346.length>0){var doc=dojox.data.dom.createDocument();com.ibm.portal.utilities.addExternalNode(doc,_346[0]);_347=doc;}}ibm.portal.debug.exit("PortletFragmentService.readPortletState",[_347]);return _347;},readPortletTitle:function(_349){return this._readPortletTitle(_349);},_readPortletTitle:function(_34a){ibm.portal.debug.entry("PortletFragmentService.readPortletTitle",[_34a]);var _34b="/atom:feed/atom:entry/atom:title";var _34c=com.ibm.portal.xpath.evaluateXPath(_34b,_34a,this.namespaces);var _34d=dojox.data.dom.textContent(_34c[0]);ibm.portal.debug.exit("PortletFragmentService.readPortletTitle",_34d);return _34d;},_fireEvents:function(_34e,_34f,xhr){this._fireGlobalPortletStateChange(_34e,_34f,xhr);},_fireGlobalPortletStateChange:function(_351,_352,xhr){com.ibm.portal.EVENT_BROKER.endFragment.fire({portletInfo:_351,id:_352,xhr:xhr});},_fireIndividualPortletStateChange:function(_354){},createPortletInfo:function(_355){var _356=this.readWindowID(_355);var _357=this.readPortletID(_355);var _358=this.readMarkup(_355);var _359=this.readPortletModes(_355);var _35a=this.readWindowStates(_355);var _35b=this.readDependentPortlets(_355);var _35c=this.readOtherPortlets(_355);var _35d=this.readPortletState(_355);var _35e=this.readStateVaryExpressions(_355);var _35f=this.readPortletTitle(_355);var _360=_35d;if(_360==null){_360=this._readPortletState(_355);}var _361=new com.ibm.portal.state.StateManager();var _362=_361.newPortletAccessor(_356,_360);var mode=_362.getPortletMode();var _364=_362.getWindowState();return new com.ibm.portal.services.PortletInfo(_356,_357,_358,_359,_35a,_35b,_35c,_35d,_35e,mode,_364,_35f);}});dojo.declare("com.ibm.portal.services.IndependentPortletFragmentService",com.ibm.portal.services.PortletFragmentService,{readDependentPortlets:function(_365){ibm.portal.debug.entry("DependentPortletFragmentService.readDependentPortlets",[_365]);var _366=new Array();ibm.portal.debug.exit("DependentPortletFragmentService.readDependentPortlets",[_366]);return _366;},readOtherPortlets:function(_367){ibm.portal.debug.entry("DependentPortletFragmentService.readOtherPortlets",[_367]);var _368=new Array();ibm.portal.debug.exit("DependentPortletFragmentService.readOtherPortlets",[_368]);return _368;},readPortletState:function(_369){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(_36a){if(_36a==null){return;}this.windowID=_36a;var _36b=document.getElementById("com.ibm.wps.web2.portlet.preferences."+this.windowID);this.preferenceEditID=_36b.getAttribute("editid");this.preferenceConfigID=_36b.getAttribute("configid");this.preferenceEditDefaultsID=_36b.getAttribute("editdefaultsid");this.pageID=_36b.getAttribute("pageid");this.attributes=new Array();this._queuedFuncs=new Array();this.portletState=new ibm.portal.portlet.PortletState(_36a);this.isCSA=false;try{this.isCSA=(typeof (document.isCSA)!="undefined");}catch(e){}var me=this;function executeQueued(){for(var i=0;i0){_39b=_39a[0];}else{return null;}var _39c=_39b.parentNode;expr="/atom:feed/atom:entry";_39a=ibm.portal.xml.xpath.evaluateXPath(expr,_392.xmlData,_392.ns);for(var i=0;i<_39a.length;i++){var node=_39a[i];if(node!=_39b){_39c.removeChild(node);}}var _39f=this;var _3a0=null;dojo.rawXhrPut({url:_url,sync:(_393)?false:true,putData:dojox.data.dom.innerXML(_392.xmlData),contentType:"application/xml",headers:{"X-IBM-XHR":"true"},handleAs:"xml",handle:function(_3a1,_3a2){if(_39f.isAuthenticationRequired(_3a2.xhr,_3a2.args.handleAs)){_39f.doAuthentication();}else{var type=(_3a1 instanceof Error)?"error":"load";if(type=="load"){if(_393){_393(_39f,ibm.portal.portlet.PortletWindow.STATUS_OK,_392);}else{_3a0={"portletWindow":_39f,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_392};}}else{if(type=="error"){if(_393){_393(_39f,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_3a0={"portletWindow":_39f,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}}},transport:"XMLHTTPTransport"});return _3a0;},getUserProfile:function(_3a4){if(!ibm.portal.portlet._SafeToExecute){if(_3a4){var me=this;this._queueUp(function(){me.getUserProfile(_3a4);});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 _3a7=this;var _3a8=null;dojo.xhrGet({url:_url,headers:{"X-IBM-XHR":"true","If-Modified-Since":"Thu, 1 Jan 1970 00:00:00 GMT"},sync:(_3a4)?false:true,handleAs:"xml",handle:function(_3a9,_3aa){if(_3a7.isAuthenticationRequired(_3aa.xhr,_3aa.args.handleAs)){_3a7.doAuthentication();}else{var type=(_3a9 instanceof Error)?"error":"load";if(type=="load"){var _3ac=_3a9;if(!_3ac||(typeof (dojox.data.dom.innerXML(_3a9))=="undefined")){_3ac=dojox.data.dom.createDocument(_3aa.xhr.responseText);}var _3ad=new ibm.portal.portlet.UserProfile(_3a7.windowID,_3ac);if(_3a4){_3a4(_3a7,ibm.portal.portlet.PortletWindow.STATUS_OK,_3ad);}else{_3a8={"portletWindow":_3a7,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_3ad};}}else{if(type=="error"){if(_3a4){_3a4(_3a7,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_3a8={"portletWindow":_3a7,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}}},transport:"XMLHTTPTransport"});return _3a8;},setUserProfile:function(_3ae,_3af){if(!ibm.portal.portlet._SafeToExecute){if(_3af){var me=this;this._queueUp(function(){me.setUserProfile(_3ae,_3af);});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 _3b2=this;var _3b3=null;dojo.rawXhrPost({url:_url,sync:(_3af)?false:true,postData:dojox.data.dom.innerXML(_3ae.xmlData),contentType:"application/xml",headers:{"X-IBM-XHR":"true"},handleAs:"xml",handle:function(_3b4,_3b5){if(_3b2.isAuthenticationRequired(_3b5.xhr,_3b5.args.handleAs)){_3b2.doAuthentication();}else{var type=(_3b4 instanceof Error)?"error":"load";if(type=="load"){if(_3af){_3af(_3b2,ibm.portal.portlet.PortletWindow.STATUS_OK,_3ae);}else{_3b3={"portletWindow":_3b2,"status":ibm.portal.portlet.PortletWindow.STATUS_OK,"returnObject":_3ae};}}else{if(type=="error"){if(_3af){_3af(_3b2,ibm.portal.portlet.PortletWindow.STATUS_ERROR,null);}else{_3b3={"portletWindow":_3b2,"status":ibm.portal.portlet.PortletWindow.STATUS_ERROR,"returnObject":null};}}}}},transport:"XMLHTTPTransport"});return _3b3;},newXMLPortletRequest:function(){return new ibm.portal.portlet.XMLPortletRequest(this);},isAuthenticationRequired:function(_3b7,_3b8){if(_3b7.readyState!=4){throw new Error("isAuthenticationRequired should only be called with a COMPLETED XMLHttpRequest! The readyState on the given XMLHttpRequest is not 4 (COMPLETE)!");}var _3b9={dojoType:"valid"};var _3ba={xhr:_3b7,args:{handleAs:_3b8}};return com.ibm.ajax.auth.isAuthenticationRequired(_3b9,_3ba);},setAuthenticationHandler:function(_3bb){this._authenticationFn=_3bb;},doAuthentication:function(){if(this._authenticationFn){this._authenticationFn();}else{com.ibm.ajax.auth.authenticationHandler();}}});dojo.declare("ibm.portal.portlet.PortletPreferences",null,{constructor:function(_3bc,_3bd,data){this.windowID=_3bc;this.requestedPreferenceID=_3bd;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 _3bf=ibm.portal.xml.xslt.loadXsl(this.xsltURL+"PortletPreferencesMap.xsl");if(_3bf.documentElement==null){alert("xslDoc is null");}var _3c0=ibm.portal.xml.xslt.transform(this.xmlData,_3bf,null,{"selectionid":this.requestedPreferenceID},true);if(_3c0==null){this.result_getNames=null;return null;}var _3c1=eval(_3c0);if(_3c1){_3c1=_3c1.preferences;}this.result_getMap=_3c1;return this.result_getMap;},getNames:function(){if(this.result_getNames){return this.result_getNames;}var _3c2=ibm.portal.xml.xslt.loadXsl(this.xsltURL+"PortletPreferencesNames.xsl");if(_3c2.documentElement==null){alert("xslDoc is null");}var _3c3=ibm.portal.xml.xslt.transform(this.xmlData,_3c2,null,{"selectionid":this.requestedPreferenceID},true);if(_3c3==null){this.result_getNames=null;return null;}var _3c4=eval(_3c3);if(_3c4){_3c4=_3c4.names;}this.result_getNames=_3c4;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 _3c8=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3c9;if(_3c8&&_3c8.length>0){_3c9=_3c8[0].getAttribute("value");}else{_3c9=def;}return _3c9;},getValues:function(key,def){var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']/base:value";var _3cd=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3ce;if(_3cd&&_3cd.length>0){_3ce=new Array();for(var i=0;i<_3cd.length;i++){_3ce[i]=_3cd[i].getAttribute("value");}}else{_3ce=def;}return _3ce;},isReadOnly:function(key){var id=this.requestedPreferenceID;var expr="/atom:feed/atom:entry[atom:id='"+id+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _3d3=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3d4=false;if(_3d3&&_3d3.length>0){var temp=_3d3[0].getAttribute("read-only");if(temp!=null){if(temp=="true"){_3d4=true;}}}return _3d4;},reset:function(key){this.internal_reset();var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _3d8=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);if(_3d8&&_3d8.length>0){var _3d9=_3d8[0].parentNode;_3d9.removeChild(_3d8[0]);}},setValue:function(key,_3db){var _3dc=new Array();_3dc[0]=_3db;this.setValues(key,_3dc);},setValues:function(key,_3de){this.internal_reset();var expr="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*/model:portletpreferences[@name='"+key+"']";var _3e0=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _3e1=null;if(_3e0&&_3e0.length>0){_3e1=_3e0[0];for(var i=_3e1.childNodes.length-1;i>=0;i--){_3e1.removeChild(_3e1.childNodes[i]);}}else{var _3e3="/atom:feed/atom:entry[atom:id='"+this.requestedPreferenceID+"']/atom:content/*";var _3e4=ibm.portal.xml.xpath.evaluateXPath(_3e3,this.xmlData,this.ns);if(dojo.isIE){_3e1=this.xmlData.createNode(1,"model:portletpreferences",this.ns.model);}else{_3e1=this.xmlData.createElementNS(this.ns.model,"model:portletpreferences");}_3e1.setAttribute("name",key);_3e1.setAttribute("read-only","false");_3e4[0].appendChild(_3e1);}for(var i=0;i<_3de.length;i++){var _3e5;if(dojo.isIE){_3e5=this.xmlData.createNode(1,"base:value",this.ns.base);var _3e6=this.xmlData.createNode(2,"xsi:type",this.ns.xsi);_3e6.nodeValue="String";_3e5.setAttributeNode(_3e6);}else{_3e5=this.xmlData.createElementNS(this.ns.base,"base:value");_3e5.setAttributeNS(this.ns.xsi,"xsi:type","String");}_3e5.setAttribute("value",_3de[i]);_3e1.appendChild(_3e5);}},internal_reset:function(){this.result_getMap=null;this.result_getNames=null;},clone:function(){var _3e7=dojox.data.dom.innerXML(this.xmlData);var _3e8=dojox.data.dom.createDocument(_3e7);return new ibm.portal.portlet.PortletPreferences(this.windowID,this.requestedPreferenceID,_3e8);}});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(_3e9,_3ea){var _3eb=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);if(dojo.isString(_3e9)){var _3ec=this._getExistingState(_3e9,_3eb.getSerializationManager());_3eb.reset(_3ec);}else{_3eb.reset(_3e9);_3e9=_3ea;}this.portletAccessor=_3eb.newPortletAccessor(_3e9);this.renderParameters=this.portletAccessor.getRenderParameters();},_isCSA:function(){var _3ed=false;try{_3ed=(typeof (document.isCSA)!="undefined");}catch(e){}return _3ed;},_getExistingState:function(_3ee,_3ef){var _3f0=null;if(this._isCSA()){_3f0=com.ibm.portal.navigation.controller.NAVIGATION_CONTROLLER.getState().stateDOM;}else{if(_3ef!=null){var _3f1=_3ef.deserialize(location.href);_3f0=_3f1.returnObject;}else{_3f0=dojox.data.dom.createDocument();}}return _3f0;},getPortletMode:function(){return this.portletAccessor.getPortletMode();},setPortletMode:function(_3f2){this.portletAccessor.setPortletMode(_3f2);return _3f2;},getWindowState:function(){return this.portletAccessor.getWindowState();},setWindowState:function(_3f3){this.portletAccessor.setWindowState(_3f3);return _3f3;},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,_3f7){this.renderParameters.setValue(name,_3f7);return _3f7;},setParameterValues:function(name,_3f9){this.renderParameters.setValues(name,_3f9);return _3f9;},setParameterMap:function(map,_3fb){if(_3fb==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,_async:null,constructor:function(_3fd){var _3fe=this.declaredClass+".constructor";ibm.portal.debug.entry(_3fe,[_3fd]);this.pageID=_3fd.pageID;this.windowID=_3fd.windowID;this.windowObj=_3fd;ibm.portal.debug.exit(_3fe);},_getXHR:function(){var _3ff=this.declaredClass+"._getXHR";ibm.portal.debug.entry(_3ff);if(!this._xhr){this._xhr=this._createXHR();}ibm.portal.debug.exit(_3ff,this._xhr);return this._xhr;},_createXHR:function(){var _400=this.declaredClass+"._createXHR";ibm.portal.debug.entry(_400);var _401=null;if(typeof (XMLHttpRequest)!="undefined"){_401=new XMLHttpRequest();}else{_401=new ActiveXObject("Microsoft.XMLHTTP");}ibm.portal.debug.exit(_400,_401);return _401;},_onreadystatechangehandler:function(){var _402=this.declaredClass+"._onreadystatechangehandler";ibm.portal.debug.entry(_402);if(!this.handled){var xhr=this._getXHR();this.readyState=xhr.readyState;ibm.portal.debug.text("ready state is "+xhr.readyState);if(this.readyState==4){var _404=this.windowObj.isAuthenticationRequired(xhr,"xml");ibm.portal.debug.text("is auth required: "+_404);if(_404){this.windowObj.doAuthentication(xhr);return;}else{this.responseText=xhr.responseText;this.responseXML=xhr.responseXML;this.status=xhr.status;this.statusText=xhr.statusText;var _405=new com.ibm.portal.services.PortletFragmentService();var _406=_405.createPortletInfo(xhr.responseXML);this.responseText=_406.markup;this.responseXML=null;var _407=true;var _408=_406.updatedState;if(this.onportletstateready!=null){var _409=_406.windowId;var _40a=new ibm.portal.portlet.PortletState(_408,_409);_407=this.onportletstateready(_40a);}if(_407&&this._isCSA()){_405._fireGlobalPortletStateChange(_406);}this._handleDependentPortlets(_405.readDependentPortlets(xhr.responseXML),_408);this.handled=true;}}if(this.onreadystatechange!=null){this.onreadystatechange();}}ibm.portal.debug.exit(_402);},_handleDependentPortlets:function(_40b,_40c){var _40d=this.declaredClass+"._handleDependentPortlets";ibm.portal.debug.entry(_40d,[_40b,_40c]);if(!this._isCSA()){if(_40b.length>0){window.location.href=this._newPageURL(_40c);}}ibm.portal.debug.exit(_40d);},_isCSA:function(){var _40e=this.declaredClass+"._isCSA";ibm.portal.debug.entry(_40e);var _40f=false;try{_40f=(typeof (document.isCSA)!="undefined");}catch(e){}ibm.portal.debug.exit(_40e,_40f);return _40f;},_flag:function(_410){var _411=this.declaredClass+"._flag";ibm.portal.debug.entry(_411,[_410]);var id="lm:oid:"+this.windowID+"@oid:"+this.pageID;var _413=new com.ibm.portal.services.PortletFragmentService();var url=_413._flagPortletUrl(_410,id);ibm.portal.debug.exit(_411,url);return url;},_newPageURL:function(_415){var _416=this.declaredClass+"._newPageURL";ibm.portal.debug.entry(_416,[_415]);ibm.portal.debug.text(dojox.data.dom.innerXML(_415));var _417=new com.ibm.portal.state.StateManager(ibmPortalConfig["contentHandlerURI"]);var _418=_415;if(!_415){_418=dojox.data.dom.createDocument();}_417.reset(_418);var _419=_417.getSerializationManager();var _41a=_419.serialize(_418);var _41b=_41a["returnObject"];var url=_41b;ibm.portal.debug.exit(_416,url);return url;},open:function(_41d,uri){var _41f=this.declaredClass+".open";ibm.portal.debug.entry(_41f,[_41d,uri]);this.open(_41d,uri,false);ibm.portal.debug.exit(_41f);},open:function(_420,uri,_422){var _423=this.declaredClass+".open";ibm.portal.debug.entry(_423,[_420,uri,_422]);var xhr=this._getXHR();var me=this;this._location=uri;if(_422==undefined){_422=false;}this._async=_422;xhr.onreadystatechange=function(){me._onreadystatechangehandler();};xhr.open(_420,this._flag(uri),_422);xhr.setRequestHeader("X-IBM-XHR","true");ibm.portal.debug.exit(_423);},setRequestHeader:function(_426,_427){var _428=this.declaredClass+".setRequestHeader";ibm.portal.debug.entry(_428,[_426,_427]);this._getXHR().setRequestHeader(_426,_427);ibm.portal.debug.exit(_428);},send:function(data){var _42a=this.declaredClass+".send";ibm.portal.debug.entry(_42a,[data]);this._getXHR().send(data);if(!this._async){this._onreadystatechangehandler();}ibm.portal.debug.exit(_42a);},abort:function(){var _42b=this.declaredClass+".abort";ibm.portal.debug.entry(_42b);this._getXHR().abort();ibm.portal.debug.exit(_42b);},getAllResponseHeaders:function(){return this._getXHR().getAllResponseHeaders();},getResponseHeader:function(_42c){return this._getXHR().getResponseHeader(_42c);}});dojo.declare("ibm.portal.portlet.UserProfile",null,{constructor:function(_42d,data){this.windowID=_42d;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 _431=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _432=null;if(_431&&_431.length>0){if(_431[0].textContent){_432=_431[0].textContent;}else{_432=_431[0].text;}}return _432;},setAttribute:function(name,_434){var expr="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']/um:attributeValue";var _436=ibm.portal.xml.xpath.evaluateXPath(expr,this.xmlData,this.ns);var _437=null;if(_436&&_436.length>0){if(_436[0].textContent){_437=_436[0].textContent;_436[0].textContent=_434;}else{_437=_436[0].text;_436[0].text=_434;}}else{var _438="/atom:entry/atom:content/um:profile[@type='user']/um:attribute[@name='"+name+"']";var _439=ibm.portal.xml.xpath.evaluateXPath(_438,this.xmlData,this.ns);var _43a=null;if(_439&&_439.length>0){_43a=_439[0];}else{var _43b="/atom:entry/atom:content/um:profile[@type='user']";var _43c=ibm.portal.xml.xpath.evaluateXPath(_43b,this.xmlData,this.ns);if(dojo.isIE){_43a=this.xmlData.createNode(1,"um:attribute",this.ns.um);}else{_43a=this.xmlData.createElementNS(this.ns.um,"um:attribute");}_43a.setAttribute("type","xs:string");_43a.setAttribute("multiValued","false");_43a.setAttribute("name",name);_43c[0].appendChild(_43a);}var _43d;if(dojo.isIE){_43d=this.xmlData.createNode(1,"um:attributeValue",this.ns.um);_43d.text=_434;}else{_43d=this.xmlData.createElementNS(this.ns.um,"um:attributeValue");_43d.textContent=_434;}_43a.appendChild(_43d);}return _437;},clone:function(){var _43e=dojox.data.dom.innerXML(this.xmlData);var _43f=dojox.data.dom.createDocument(_43e);return new ibm.portal.portlet.UserProfile(this.windowID,_43f);}});dojo.declare("ibm.portal.portlet.Error",null,{INFO:0,WARN:1,ERROR:2,constructor:function(_440,_441,_442){this.errorCode=_440;this.message=_441;this.description=_442;},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= 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