
function ig_WebControl(id){if(arguments.length>0){this.init(id);}}
ig_WebControl.prototype.init=function(id){this._id=id;var o=ig_all[id];if(o&&o._deleteMe)
o._deleteMe();ig_all[id]=this;this._posted=this._postRequest=0;ig_shared._isPosted=false;this.postField=ig_csom.getElementById(this.getClientID()+"_Data");this.clientState=ig_ClientState.createRootNode();this.rootNode=ig_ClientState.addNode(this.clientState,"XMLRootNode");}
ig_WebControl.prototype.constructor=ig_WebControl;ig_WebControl.prototype.getElement=function(){return this._element;}
ig_WebControl.prototype.getID=function(){return this._id;}
ig_WebControl.prototype.getUniqueID=function(){return this._uniqueID;}
ig_WebControl.prototype.getClientID=function(){return this._clientID;}
ig_WebControl.prototype.updateControlState=function(propName,propValue){if(this.controlState==null)
this.controlState=ig_ClientState.addNode(this.rootNode,"ControlState");ig_ClientState.setPropertyValue(this.controlState,propName,propValue);if(this.postField!=null)
this.postField.value=ig_ClientState.getText(this.clientState);}
ig_WebControl.prototype.addStateItem=function(name,value){if(this.stateItems==null)
this.stateItems=ig_ClientState.addNode(this.rootNode,"StateItems");var stateItem=ig_ClientState.addNode(this.stateItems,"StateItem");this.updateStateItem(stateItem,name,value);return stateItem;}
ig_WebControl.prototype.updateStateItem=function(stateItem,propName,propValue){ig_ClientState.setPropertyValue(stateItem,propName,propValue);if(this.postField!=null)
this.postField.value=ig_ClientState.getText(this.clientState);}
ig_WebControl.prototype.fireServerEvent=function(eventName,data){if(ig_shared._isPosted)
return;if(this._postRequest==-1){this._postRequest=0;return;}
this._postRequest=0;try{ig_shared._isPosted=true;__doPostBack(this._uniqueID,eventName+":"+data);}
catch(e){}}
ig_WebControl.prototype.removeEventListener=function(name,handler){var i,evts=this._clientEvents?this._clientEvents[name]:null;if(evts!=null)for(i=0;i<evts.length;i++)
if(evts[i]!=null&&evts[i]._handler==handler){delete evts[i];evts[i]=null;return;}}
ig_WebControl.prototype.addEventListener=function(name,handler,obj,post){if(typeof handler!="function")
return;if(!this._clientEvents)this._clientEvents=new Object();var i,evts=this._clientEvents[name];if(evts==null)
evts=this._clientEvents[name]=new Array();var i0=evts.length;for(i=0;i<evts.length;i++){if(evts[i]==null)
i0=i;else if(evts[i]._handler==handler)
return;}
var evt=new ig_EventObject();evt._object=obj;evts[i0]={_webcontrol:this,_eventName:name,_handler:handler,_autoPostBack:(post==true),_event:evt};}
ig_WebControl.prototype.fireEvent=function(name,evnt){if(!name||this._isInitializing||!this._clientEvents)
return false;this._postRequest=this._postAsync=0;var evt,evts=this._clientEvents[name];var cancel=false,postAsync=0,post=0,i=(evts==null)?0:evts.length;if(i==0)
return false;if(evnt=="check")
return true;var args=this.fireEvent.arguments;while(i-->0){if(evts[i]==null)
continue;evt=evts[i]._event;evt.reset();evt.event=evnt;evt.needPostBack=evts[i]._autoPostBack;try{evts[i]._handler(this,evt,args[2],args[3],args[4],args[5],args[6],args[7]);}catch(ex){continue;}
if(evt.cancelPostBack)
post=-1;else if(post==0){if(evt.needPostBack)
post=1;else if(evt.needAsyncPostBack)
postAsync=1;}
if(evt.cancel)
cancel=true;evt.event=null;}
if(!cancel||post<0)
this._postRequest=post;if(!cancel&&post==0)
this._postAsync=postAsync;return cancel;}
ig_WebControl.prototype._decodeProps=function(props){for(var i=0;i<props.length;i++){if(props[i]!=null){if(props[i].push!=null)
this._decodeProps(props[i]);if(typeof props[i]=="string"){props[i]=decodeURI(props[i]);props[i]=unescape(props[i].replace(/\+/g," "));props[i]=unescape(props[i]);}}}}
ig_WebControl.prototype._initControlProps=function(props){this._decodeProps(props);this._props=props[0];this._uniqueID=this._props[0];this._clientID=this._props[1];var i=props[1]?props[1].length:0;while(i-->0)try{this.addEventListener(props[1][i][0],eval(props[1][i][1]),null,props[1][i][2]);}catch(e)
{window.status="Can't find "+props[1][i][1];}
this._objects=props[2];this._collections=props[3];}
function ig_initShared(){this.ScriptVersion="5.3.20053.14";try{this.AgentName=navigator.userAgent.toLowerCase();}catch(e){this.AgentName="";}
this.MajorVersionNumber=parseInt(navigator.appVersion);this.IsDom=document.getElementById?true:false;this.IsNetscape62=this.AgentName.indexOf("netscape6")>=0;var i=this.AgentName.indexOf("netscape/7.");this.Netscape7=(i>0)?this.AgentName.charCodeAt(i+11)-48:-1;this.IsNetscape=document.layers!=null;this.IsNetscape6=(this.IsDom&&navigator.appName=="Netscape");this.IsSafari=this.AgentName.indexOf("safari")>=0;this.IsFireFox=this.AgentName.indexOf("firefox")>=0;this.IsFireFox10=this.AgentName.indexOf("firefox/1.0")>=0;this.IsFireFox20=this.AgentName.indexOf("firefox/2.0")>=0;this.IsFireFox15=this.IsFireFox20||this.AgentName.indexOf("firefox/1.5")>=0;this.IsOpera=this.AgentName.indexOf("opera")>=0;this.IsMac=this.AgentName.indexOf("mac")>=0;this.IsIE=document.all!=null&&!this.IsOpera&&!this.IsSafari;this.IsIE4=this.IsIE&&!this.IsDom;this.IsIE4Plus=this.IsIE&&this.MajorVersionNumber>=4;this.IsIE5=this.IsIE&&this.IsDom;this.IsIE50=this.IsIE5&&this.AgentName.indexOf("msie 5.0")>0;this.IsWin=this.AgentName.indexOf("win")>=0;this.IsIEWin=this.IsIE&&this.IsWin;this.IsIE55=this.IsIEWin&&this.AgentName.indexOf("msie 5.5")>0;this.IsIE6=this.IsIEWin&&this.AgentName.indexOf("msie 6.0")>0;this.IsIE7=this.IsIEWin&&this.AgentName.indexOf("msie 7.0")>0;this.IsIE55Plus=this.IsIE55||this.IsIE6||this.IsIE7;this.IsStandardsMode=(document.compatMode=="CSS1Compat");this.attrID="ig_mark";this._isPosted=false;this.isFormPosted=function(){return this._isPosted;}
this.getElementById=function(tagName){if(this.IsIE)
return document.all[tagName];else
return document.getElementById(tagName);}
this.isArray=function(a){return a!=null&&a.length!=null;}
this.isEmpty=function(o){return!(this.isArray(o)&&o.length>0);}
this.notEmpty=function(o){return(this.isArray(o)&&o.length>0);}
this.getRuntimeStyle=function(elem){if(!elem)
return null;var s=elem.currentStyle;if(s)
return s;var win=document.defaultView;if(!win)
win=window;if(win.getComputedStyle)
s=win.getComputedStyle(elem,'');return s?s:elem.style;}
this.getStyleValue=function(style,prop,elem){if(!style)
style=this.getRuntimeStyle(elem);if(!style)
return null;var val=style[prop];if(!this.isEmpty(val)||!style.getPropertyValue)
return val;return style.getPropertyValue(prop);}
this.addEventListener=function(elem,evtName,fn,flag){try{if(elem.addEventListener){elem.addEventListener(evtName,fn,flag==true);return;}}catch(ex){}
try{if(elem.attachEvent){elem.attachEvent("on"+evtName,fn);return;}}catch(ex){}
eval("var old=elem.on"+evtName);var sF=fn.toString();var i=sF.indexOf("(")+1;try{if((typeof old=="function")&&i>10){old=old.toString();var args=old.substring(old.indexOf("(")+1,old.indexOf(")"));args=ig_shared.replace(args," ","");if(args.length>0)args=args.split(",");old=old.substring(old.indexOf("{")+1,old.lastIndexOf("}"));sF=sF.substring(9,i);if(old.indexOf(sF)>=0)return;var s="fn=new Function(";for(i=0;i<args.length;i++){if(i>0)sF+=",";s+="\""+args[i]+"\",";sF+=args[i];}
sF+=");"+old;eval(s+"sF)");}
eval("elem.on"+evtName+"=fn");}catch(ex){}}
this.removeEventListener=function(elem,evt,fn){try{if(elem&&elem.removeEventListener){elem.removeEventListener(evt,fn);return;}}catch(ex){}
try{if(elem&&elem.detachEvent)
elem.detachEvent('on'+evt,fn);}catch(ex){}}
this.getSourceElement=function(evnt,o){if(evnt.target)
return evnt.target;else
if(evnt.srcElement)
return evnt.srcElement;else
return o;}
this.getText=function(e){if(e==null)return"";var i,v=null,ii=(e.childNodes==null)?0:e.childNodes.length;for(i=-1;i<ii;i++){var ei=(i<0)?e:e.childNodes[i];if(ei.nodeName=="#text")v=(v==null)?ei.nodeValue:v+" "+ei.nodeValue;}
if(v!=null)return v;if((v=e.text)!=null)return v;try{return e.innerText;}catch(ex){}
try{return e.innerHTML;}catch(ex){}
return"";}
this.setText=function(e,text){if(e==null)return false;if(text==null)text="";var i,ii=(e.childNodes==null)?0:e.childNodes.length;for(i=-1;i<ii;i++){var ei=(i<0)?e:e.childNodes[i];if(ei.nodeName=="#text"){if(text!=null){ei.nodeValue=text;text=null;}
else ei.nodeValue="";}}
if(text!=null)try{if(e.text!=null)e.text=text;else if(e.innerText!=null)e.innerText=text;else e.innerHTML=text;text=null;}catch(ex){}
return text==null;}
this.setEnabled=function(e,bEnabled){if(this.IsIE)
e.disabled=!bEnabled;}
this.getEnabled=function(e){if(this.IsIE)
return!e.disabled;}
this.navigateUrl=function(targetUrl,targetFrame){if(targetUrl==null||targetUrl.length==0)
return;var newUrl=targetUrl.toLowerCase();if(newUrl.indexOf("javascript:")==0)
eval(targetUrl);else
if(targetFrame!=null&&targetFrame!=""){if(ig_shared.getElementById(targetFrame)!=null)
ig_shared.getElementById(targetFrame).src=targetUrl;else{var oFrame=ig_searchFrames(top,targetFrame);if(oFrame!=null)
oFrame.location=targetUrl;else
if(targetFrame=="_self"||targetFrame=="_parent"||targetFrame=="_media"||targetFrame=="_top"||targetFrame=="_blank"||targetFrame=="_search")
window.open(targetUrl,targetFrame);else
window.open(targetUrl);}}
else{try{location.href=targetUrl;}
catch(x){}}}
function ig_searchFrames(frame,targetFrame){if(frame.frames[targetFrame]!=null)
return frame.frames[targetFrame];var i;for(i=0;i<frame.frames.length;i++){var subFrame=ig_searchFrames(frame.frames[i],targetFrame);if(subFrame!=null)
return subFrame;}
return null;}
this.findControl=function(startElement,idList,closestMatch){var item;var searchString="";var i=0;var partialId=idList.split(":");while(partialId[i+1]!=null&&partialId[i+1].length>0){searchString+=partialId[i]+".*";i++;}
searchString+=partialId[i]+"$";var searchExp=new RegExp(searchString);var curElement;if(startElement!=null)
curElement=startElement.firstChild;else
curElement=window.document.firstChild;while(curElement!=null){if(curElement.id!=null&&(curElement.id.search(searchExp))!=-1){ig_dispose(searchExp);return curElement;}
item=this.findControl(curElement,idList);if(item!=null){ig_dispose(searchExp);return item;}
curElement=curElement.nextSibling;}
ig_dispose(searchExp);if(closestMatch)
return findClosestMatch(startElement,partialId);else return null;}
this.createTransparentPanel=function(){if(!this.IsIE)return null;var transLayer=document.createElement("IFRAME");transLayer.style.zIndex=1000;transLayer.frameBorder="no";transLayer.scrolling="no";transLayer.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity=0);";transLayer.style.visibility='hidden';transLayer.style.display='none';transLayer.style.position="absolute";transLayer.src='javascript:new String("<html></html>")';var e=document.body.firstChild;document.body.insertBefore(transLayer,e);return new ig_TransparentPanel(transLayer);}
this.isInside=function(evt,container,elem,shift){var to=evt.toElement;if(to==null)to=evt.relatedTarget;if(to!=null&&shift!=-1){while(to!=null){if(to==container)return true;to=to.parentNode;}
return false;}
if(elem==null)elem=container;if(shift==null)shift=0;var z,x=-evt.clientX,y=-evt.clientY;var w=elem.offsetWidth,h=elem.offsetHeight;while(elem!=null){if((z=elem.offsetLeft)!=null){x+=z;y+=elem.offsetTop;}
elem=elem.offsetParent;}
return x<-1&&y<-1&&1<x+w&&2+shift<y+h;}
this.createHoverBehavior=function(objectToCallBackWith,element,mouseOverHandler,mouseOutHandler){element.__callBackObject=objectToCallBackWith;element.__isEventReady=true;objectToCallBackWith.__onFilteredMouseOver=mouseOverHandler;objectToCallBackWith.__onFilteredMouseOut=mouseOutHandler;this.addEventListener(element,"mouseover",ig_filterMouseOverEvents,false);this.addEventListener(element,"mouseout",ig_filterMouseOutEvents,false);}
this.getCBManager=function(form){if(!ig_all._ig_cbManager)
ig_all._ig_cbManager=new ig_callBackManager(form);return ig_all._ig_cbManager;}
this.addCBEventListener=function(evalCtl,elemID){if(!this._cbListeners)
this._cbListeners=new Array();var i=-1;while(++i<this._cbListeners.length)
if(this._cbListeners[i].evalCtl==evalCtl)
return;this._cbListeners[i]={evalCtl:evalCtl,elemID:elemID};}
this.addCBSubmitListener=function(fn){this.addCBEventListener(fn);}
this.addCBErrorListener=function(fn){var el=this._cbError;if(!el)
el=this._cbError=new Array();el[el.length]=fn;}
this.getForm=function(){var form=document.forms[0];if(!form&&(form=document.form1)==null){var i=-1,eds=document.getElementsByTagName('INPUT');while(!form&&++i<eds.length)
form=eds[i].form;}
return form;}
this.getElement=function(id,form){var e=document.getElementById(id);if(e)
return e;if(!form)
form=this.getForm();return form?form[id]:null;}
this.absPosition=function(elem,pan,pos,ie,ed){var z,htm=null,e=elem,body=document.body;var i=1,ok=0,y=0,x=0,pe=e;var elemH=e?e.offsetHeight:-1,elemW=e?e.offsetWidth:0;while(e!=null){if(ok<1||e==body){if((z=e.offsetLeft)!=null)
x+=z;if((z=e.offsetTop)!=null)
y+=z;}
if(e.nodeName=="HTML")
htm=body=e;if(e==body)
break;z=e.scrollLeft;if(z==null||z==0)
z=pe.scrollLeft;if(z!=null&&z>0)
x-=z;z=e.scrollTop;if(z==null||z==0)
z=pe.scrollTop;if(z!=null&&z>0)
y-=z;pe=e.parentNode;e=e.offsetParent;if(pe.tagName=="TR")
pe=e;if(e==body&&pe.tagName=="DIV"){e=pe;ok++;}}
if(elem&&document.elementFromPoint){var xOld=x,yOld=y;ok=true;var x0=body.scrollLeft,y0=body.scrollTop;while(++i<16){z=(i>2)?((i&2)-1)*(i&14)/2*5:2;e=document.elementFromPoint(x+z-x0,y+z-y0);if(!e||e==ed||e==elem)
break;}
if(i>15||!e)
ok=false;x+=z;y+=z;i=z=0;while(ok&&++i<22){if(z==0)x--;else y--;e=document.elementFromPoint(x-x0,y-y0);if(!e||i>20)
ok=false;if(e!=ed&&e!=elem)
if(z>0)
break;else{i=z=1;x++;}}
if(ok){x--;y--;}
else{x=xOld;y=yOld;}}
if(!pan)
return{x:x,y:y};var zIndex=9999;while(elem){if(elem.nodeName=='BODY'||elem.nodeName=='FORM')
break;z=this.getStyleValue(null,'zIndex',elem);if(z&&z.substring)z=(z.length>4&&z.charCodeAt(0)<58)?parseInt(z):0;if(z&&z>=zIndex)zIndex=z+1;elem=elem.parentNode;}
ok=pan.style;ok.position='absolute';ok.visibility='visible';ok.display='';ok.zIndex=zIndex+1;ed=ed?0:20;var panH=pan.offsetHeight,panW=pan.offsetWidth;var iH=body.clientHeight,iW=body.clientWidth,iL=body.scrollLeft,iT=body.scrollTop;if(!iH||iH<50){iH=body.offsetHeight-ed;iW=body.offsetWidth-ed;}
z=body;while(!htm&&(z=z.parentNode)!=null)
if(z.nodeName=='HTML')
htm=z;if(htm){z=htm.clientHeight;i=htm.offsetHeight;if(z&&z>20&&!ig_shared.IsOpera){iH=z;iW=htm.clientWidth;iL=htm.scrollLeft;iT=htm.scrollTop;}}
if(elemH<0){x=++iL;y=++iT;elemH=--iH;elemW=--iW;}
if(iH<20)
iH=20;if(iW<90)
iW=90;if(!pos)
pos=0;if(typeof pos=='object'){if((z=pos.x)!=null)
x+=z;if((z=pos.y)!=null)
y+=z;pos=0;}
if((pos&4)!=0)
x+=elemW;else if((pos&3)==3)
x-=panW;else if((pos&1)!=0)
x+=(elemW>>1)-(panW>>1);else if((pos&2)!=0)
x+=elemW-panW;if((pos&8)!=0)
y+=(elemH>>1)-(panH>>1);else if((pos&16)!=0)
y+=elemH-panH;else if((pos&32)!=0)
y-=panH;else if((pos&64)!=0)
y+=elemH;if(y+panH>iH+iT){if((pos&64)!=0&&y-iT-3>panH+elemH)
y-=panH+elemH;else
y=iH+iT-panH;}
if(y<iT)
y=iT;if(x+panW>iW+iL){if((pos&4)!=0&&x-iL-3>panW+elemW)
x-=panW+elemW;else
x=iW+iL-panW;}
if(x<iL)
x=iL;if(ig_csom.IsMac&&(ig_csom.IsIE||ig_csom.IsSafari)){x+=ig_csom.IsIE?5:-5;y+=ig_csom.IsIE?11:-7;}
ok.left=x+'px';ok.top=y+'px';if(ie&&(z=ie.Element)!=null)
ie=z;if(!ie||(z=ie.style)==null)
return;z.position='absolute';z.left=--x+'px';z.top=--y+'px';z.width=(panW+2)+'px';z.height=(panH+2)+'px';z.visibility='visible';z.display='';z.zIndex=zIndex;}
this.isName=function(n){return n&&n.indexOf('=')<0&&n.indexOf(':')<0&&n.indexOf('(')<0&&n.indexOf(';')<0&&n.indexOf(',')<0&&n.indexOf('[')<0&&n.indexOf('{')<0&&n.indexOf('\"')<0&&n.indexOf("'")<0;}
this.replace=function(txt,s0,s1){while(txt.indexOf(s0)>=0)
txt=txt.replace(s0,s1);return txt;}
this.addTabListener=function(fn){var i,i1,tabs=this._tabListeners;if(!tabs)
tabs=this._tabListeners=new Array();i=i1=tabs.length;while(i-->0){if(!tabs[i])i1=i;if(tabs[i]==fn)return;}
tabs[i1]=fn;}
this.removeTabListener=function(fn){var t,ok=false,tabs=this._tabListeners;var i=tabs?tabs.length:0;while(i-->0)if(tabs[i]){if(tabs[i]==fn)tabs[i]=null;else ok=true;}
if(!ok)
this._tabListeners=null;}
this.fireTabChange=function(){var tabs=this._tabListeners;var i=tabs?tabs.length:0;while(i-->0)if(tabs[i])
try{eval(tabs[i]);}catch(ex){}}}
function ig_delete(o){ig_dispose(o);}
function ig_filterMouseOverEvents(evt){var element=ig_shared.getSourceElement(evt);if(!element.__isEventReady){while(element!=null&&!element.__isEventReady&&element.tagName!="BODY")element=element.parentNode;}
if(element&&element.__isEventReady&&(element._hasMouse||!ig_isMouseOverSourceAChild(evt,element))){element._hasMouse=true;element.__callBackObject.__onFilteredMouseOver(evt);}}
function ig_filterMouseOutEvents(evt){var element=ig_shared.getSourceElement(evt);if(!element.__isEventReady){while(element!=null&&!element.__isEventReady&&element.tagName!="BODY")element=element.parentNode;}
if(element&&element.__isEventReady&&!ig_isMouseOutSourceAChild(evt,element)){element._hasMouse=false;element.__callBackObject.__onFilteredMouseOut(evt);}}
function ig_isMouseOverSourceAChild(evt,element){var evnt=evt?evt:window.event;if(evnt==null)return false;var from=evnt.fromElement&&typeof evnt.fromElement!="undefined"?evnt.fromElement:evnt.relatedTarget;if(from==element)return true;if(from==null)return false;return ig_isAChildOfB(from,element);}
function ig_isMouseOutSourceAChild(evt,element){var evnt=window.event?window.event:evt;if(!evnt)return false;var to=evnt.toElement&&typeof evnt.toElement!="undefined"?evnt.toElement:evnt.relatedTarget;if(to==element)return true;if(to==null)return false;return ig_isAChildOfB(to,element);}
function ig_isAChildOfB(a,b){if(a==null||b==null)return false;while(a!=null){a=a.parentNode;if(a==b)return true;}
return false;}
function ig_getWebControlById(id){var i,o=null;if(!ig_shared.isEmpty(id))if((o=ig_all[id])==null)for(i in ig_all){if((o=ig_all[i])!=null)if(o._id==id||o._clientID==id||o._uniqueID==id)
return o;o=null;}
return o;}
if(typeof ig_all!="object")
var ig_all=new Object();function ig_cancelEvent(e,type){if(e==null)if((e=window.event)==null)return;if(type&&e.type!=type)return;if(e.stopPropagation!=null)e.stopPropagation();if(e.preventDefault!=null)e.preventDefault();e.cancelBubble=true;e.returnValue=false;}
function ig_TransparentPanel(transLayer){this.Element=transLayer;this.show=function(){this.Element.style.visibility="visible";this.Element.style.display="";}
this.hide=function(){this.Element.style.visibility="hidden";this.Element.style.display="none";}
this.setPosition=function(top,left,width,height){this.Element.style.top=top;this.Element.style.left=left;this.Element.style.width=width;this.Element.style.height=height;}}
if(typeof ig_shared!="object")
var ig_shared=new ig_initShared();var ig_csom=ig_shared,ig=ig_shared;if((typeof Function!='undefined')&&(typeof Function.prototype!='undefined')&&(typeof Function.apply!='function')){Function.prototype.apply=function(obj,args){var result,fn='ig_apply'
while(typeof obj[fn]!='undefined')fn+=fn;obj[fn]=this;var length=(((ig_shared.isArray(args))&&(typeof args=='object'))?args.length:0);switch(length){case 0:result=obj[fn]();break;default:for(var item=0,params='';item<args.length;item++){if(item!=0)params+=',';params+='args['+item+']';}
result=eval('obj.'+fn+'('+params+');');break;}
ig_dispose(obj[fn]);return result;};}
function findClosestMatch(startElement,partialId){var item;var searchString="";var i=0;while(partialId[i+1]!=null&&partialId[i+1].length>0){searchString+="("+partialId[i]+")?";i++;}
searchString+=partialId[i]+"$";var searchExp=new RegExp(searchString);var curElement=startElement.firstChild;while(curElement!=null){if(curElement.id!=null&&(curElement.id.search(searchExp))!=-1){return curElement;}
item=findClosestMatch(curElement,partialId);if(item!=null)return item;curElement=curElement.nextSibling;}
return null;}
function ig_EventObject(){this.event=null;this.cancel=false;this.cancelPostBack=false;this.needPostBack=false;this.reset=function(){this.event=null;this.needPostBack=false;this.cancel=false;this.cancelPostBack=false;this.needAsyncPostBack=false;}}
function ig_fireEvent(oControl,eventName){var i,fn=eventName;if(!fn||!oControl)return false;if(ig_shared.isName(fn)){fn+="(oControl";for(i=2;i<ig_fireEvent.arguments.length;i++)
fn+=", ig_fireEvent.arguments["+i+"]";fn+=");";}
try{eval(fn);}
catch(i){window.status="Can't eval "+fn;return false;}
return true;}
function ig_dispose(obj){if(ig_shared.IsIE&&ig_shared.IsWin)
for(var item in obj){var t=typeof obj[item];if(obj[item]&&t!='undefined'&&!obj[item].tagName&&!obj[item].disposing&&t!='boolean'&&t!='number'&&t!='string'&&t!='function'){try{obj[item].disposing=true;ig_dispose(obj[item]);}catch(e1){;}}
try{delete obj[item];}catch(e2){;}}}
function ig_initClientState(){this.XmlDoc=document;this.createRootNode=function(){if(!ig_shared.IsIE){var str='<?xml version="1.0"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><ClientState id="vs"></ClientState></html>';var p=new DOMParser();var doc=p.parseFromString(str,"text/xml");this.XmlDoc=doc;return doc.getElementById("vs");}
if(ig_shared.IsIE50)this.XmlDoc=ig_createActiveXFromProgIDs(["MSXML2.DOMDocument","Microsoft.XMLDOM"]);return this.createNode("ClientState");}
this.setPropertyValue=function(element,name,value){if(element!=null)element.setAttribute(name,escape(value));}
this.getPropertyValue=function(element,name){if(element==null)return"";return unescape(element.getAttribute(name));}
this.addNode=function(element,nodeName){var newNode=this.createNode(nodeName);if(element!=null)element.appendChild(newNode);return newNode;}
this.removeNode=function(element,nodeName){var nodeToRemove=this.findNode(element,nodeName);if(element!=null)
return element.removeChild(nodeToRemove);return null;}
this.createNode=function(nodeName){return this.XmlDoc.createElement(nodeName);}
this.findNode=function(element,node){if(element==null)return null;var curElement=element.firstChild;while(curElement!=null){if(curElement.nodeName==node||curElement==node){return curElement;}
var item=this.findNode(curElement,node);if(item!=null)return item;curElement=curElement.nextSibling;}
return null;}
this.getText=function(element){if(element==null)return"";if(ig_shared.IsIE55Plus)return escape(element.innerHTML);return escape(this.XmlToString(element));}
this.XmlToString=function(startElem){var str="";if(!startElem)return"";var curElement=startElem.firstChild;while(curElement!=null){str+="<"+curElement.tagName+" ";for(var i=0;i<curElement.attributes.length;i++){var attrib=curElement.attributes[i];str+=attrib.nodeName+"=\""+attrib.nodeValue+"\" ";}
str+=">";str+=this.XmlToString(curElement);str+="</"+curElement.tagName+">";curElement=curElement.nextSibling;}
return str;}}
function ig_xmlNode(name){this.lastChild=null;this.name=name;this.getText=function(){return escape(this.toString());}
this.childNodes=new Array();this.toString=function(){var i,s=(this.name==null)?"":"<"+this.name;if(this.props!=null)for(i=0;i<this.props.length;i++)
s+=" "+this.props[i].name+"=\""+this.props[i].value+"\"";if(this.name!=null)s+=">";for(i=0;i<this.childNodes.length;i++)
s+=this.childNodes[i].toString();if(this.name!=null)s+="</"+this.name+">";return s;}
this.addNode=function(node,unique){if(node==null)return null;if(unique==true)if((unique=this.findNode(node))!=null)return unique;if(node.name==null)node=new ig_xmlNode(node);node.parentNode=this;this.lastChild=node;return this.childNodes[this.childNodes.length]=node;}
this.appendChild=this.addNode;this.setAttribute=function(name,value){if(name==null)return;if(this.props==null)this.props=new Array();var prop,i=this.props.length;value=(value==null)?"":value;while(i-->0){prop=this.props[i];if(prop.name==name){prop.value=value;return;}}
prop=new Object();prop.name=name;prop.value=value;this.props[this.props.length]=prop;}
this.setPropertyValue=function(name,value){this.setAttribute(name,(value==null)?value:escape(value));}
this.findNode=function(node,descendants){if(node!=null)for(var i=0;i<this.childNodes.length;i++){var n=this.childNodes[i];if(n!=null){if(n.name==node||n==node){n.index=i;return n;}
if(descendants==true&&(n=n.findNode(node))!=null)return n;}}
return null;}
this.removeNode=function(n){if((n=this.findNode(n))==null)return n;var i=-1,j=0,a=new Array(),a0=n.parentNode.childNodes;while(++i<a0.length)if(i!=n.index)a[j++]=a0[i];n.parentNode.childNodes=a;this.lastChild=a.length<=0?null:a[a.length-1];return n;}
this.getPropertyValue=function(name){var i=(this.props==null)?0:this.props.length;while(i-->0)
if(this.props[i].name==name)
return unescape(this.props[i].value);return null;}}
function ig_xmlNodeStatic(){this.createRootNode=function(){return new ig_xmlNode("Temp");}
this.addNode=function(e,n){return(e==null)?(new ig_xmlNode(n)):e.addNode(n);}
this.removeNode=function(e,n){return(e==null)?e:e.removeNode(n);}
this.findNode=function(e,n){return(e==null)?e:e.findNode(n);}
this.setPropertyValue=function(e,n,v){if(e!=null)e.setPropertyValue(n,v);}
this.getPropertyValue=function(e,n){return(e==null)?"":e.getPropertyValue(n);}
this.getText=function(e){var s="",i=(e==null)?0:e.childNodes.length;for(var j=0;j<i;j++)s+=e.childNodes[j].getText();return s;}}
try{ig_shared.addEventListener(window,"load",ig_handleEvent);}catch(ex){}
try{ig_shared.addEventListener(window,"unload",ig_handleEvent);}catch(ex){}
try{ig_shared.addEventListener(window,"resize",ig_handleEvent);}catch(ex){}
function ig_findElemWithAttr(elem,attr){while(elem!=null){try{if(elem.getAttribute!=null&&!ig_shared.isEmpty(elem.getAttribute(attr)))
return elem;}catch(ex){}
elem=elem.parentNode;}
return null;}
function ig_handleEvent(evt){if(evt==null)if((evt=window.event)==null)return;var obj,attr=ig_shared.attrID,src=evt.target,type=evt.type;if(ig_shared.isEmpty(type))return;var fn="obj._on"+type.substring(0,1).toUpperCase()+type.substring(1);if(!src)
src=evt.srcElement;if(type=="load"||type=="unload"||type=="resize"||!src){for(obj in ig_all){if((obj=ig_all[obj])==null)
continue;eval("if("+fn+"!=null){"+fn+"(src,evt); obj=null;}");if(obj&&obj._onHandleEvent)
obj._onHandleEvent(src,evt);}
if(type=="unload"){ig_dispose(ig_all);for(var id in ig_all)if(ig_all[id])
ig_all[id].base=null;}
return;}
var elem=ig_findElemWithAttr(src,attr);if(elem==null)
elem=ig_findElemWithAttr(this,attr);if(elem!=null&&(obj=ig_getWebControlById(elem.getAttribute(attr)))!=null){eval("if("+fn+"!=null){"+fn+"(src,evt); obj=null;}");if(obj!=null&&obj._onHandleEvent!=null)
obj._onHandleEvent(src,evt);}}
function ig_handleTimer(obj){var i,all=ig_shared._timers,fn=ig_shared._timerFn;if(obj){if(!obj._onTimer)return;if(!all)ig_shared._timers=all=new Array();i=all.length;while(i-->0)if(all[i]==obj)break;if(i<0)all[all.length]=obj;if(!fn)ig_shared._timerFn=fn=window.setInterval(ig_handleTimer,200);return;}
if(!fn)return;for(i=0;i<all.length;i++)if(all[i]&&all[i]._onTimer)if(!all[i]._onTimer())
obj=true;if(obj)return;window.clearInterval(fn);delete ig_shared._timerFn;}
var ig_ClientState=null;if(!ig_shared.IsIE55Plus||!ig_shared.IsWin)ig_ClientState=new ig_xmlNodeStatic();else ig_ClientState=new ig_initClientState();var _asyncSmartCallbacks=new Array();var _inCallback=false;function ig_SmartCallback(clientContext,serverContext,callbackFunction,uniqueId,control,waitResponse){var _callbackFunction;var _url=null;var _postdata="";var _async=true;this._registeredControls=new Array();this._control=control;this._waitResponse=(waitResponse===true);this._progressIndicator=null;this._registeredControls[0]={clientContext:clientContext,serverContext:serverContext,callbackFunction:callbackFunction,uniqueId:uniqueId,control:control};if(typeof XMLHttpRequest!="undefined"){__xmlHttpRequest=new XMLHttpRequest();}
else if(typeof ActiveXObject!="undefined"){try{__xmlHttpRequest=ig_createActiveXFromProgIDs(["MSXML2.XMLHTTP","Microsoft.XMLHTTP"]);}
catch(e){}}
this.registerControl=function(clientContext,serverContext,callbackFunction,uniqueId,control){this._registeredControls.push({clientContext:clientContext,serverContext:serverContext,callbackFunction:callbackFunction,uniqueId:uniqueId,control:control});}
this._xmlHttpRequest=__xmlHttpRequest;this.execute=function(){var exec=true;if(this.beforeCallback!=null)
exec=this.beforeCallback();if(exec)try{if(this._progressIndicator!=null)
this._progressIndicator.display();this.formatCallbackArguments();this.registerSmartCallback();this._xmlHttpRequest.open("POST",this.getUrl(),!this._waitResponse);this._xmlHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this._xmlHttpRequest.onreadystatechange=this._responseComplete;this._xmlHttpRequest.send(this.getCallbackArguments());}catch(exec){}}
this.getCallbackArguments=function(){return this._callbackArguments;}
this.setCallbackArguments=function(callbackArguments){this._callbackArguments=callbackArguments;}
this.getUrl=function(){if(this._url==null){return this.getForm().action;}
return this._url;}
this.setUrl=function(url){this._url=url;}
this.getForm=function(){var form;if(document.forms.length>1){for(var i=0;i<document.forms.length;i++){if(document.forms[i].method=="post"&&document.forms[i].action!=""){form=document.forms[i];break;}}
if(form==null)
form=document.forms[0];}
else
form=document.forms[0];if(!form)
form=document.form1;return form;}
this.setProgressIndicator=function(value){this._progressIndicator=value;}
this._responseComplete=function(){var proccessComplete=null;for(var i=0;i<_asyncSmartCallbacks.length;i++){smartCallback=_asyncSmartCallbacks[i];if(smartCallback&&smartCallback._xmlHttpRequest&&(smartCallback._xmlHttpRequest.readyState==4)){_asyncSmartCallbacks[i]=null;smartCallback.processSmartCallback();proccessComplete=smartCallback;}}
if(proccessComplete!=null){if(proccessComplete.callbackFinished!=null)
proccessComplete.callbackFinished();proccessComplete._control=null;proccessComplete._registeredControls=null;proccessComplete._progressIndicator=null;ig_dispose(proccessComplete);proccessComplete=null;}}
this.processSmartCallback=function(){var responseString=this._xmlHttpRequest.responseText;var startIndex=responseString.indexOf("_ig_start");var endIndex=responseString.indexOf("_ig_end");var length=endIndex;if(startIndex>-1&&endIndex>-1){responseString=responseString.substring(startIndex+9,length);var response=eval(responseString);var index;for(index=0;index<response.length;index++){controlResponse=response[index];var header=controlResponse[0];var payload=controlResponse[1].replace(/\ig_NL/g,"\n");for(var i=0;i<this._registeredControls.length;i++){if(this._registeredControls[i]!=null&&header==this._registeredControls[i].uniqueId){if(payload.length>0){if(this._registeredControls[i].clientContext.requestType!=null&&this._registeredControls[i].clientContext.requestType=="styles")
this._resolveStyles(payload);else if(this._registeredControls[i].callbackFunction!=null)
this._registeredControls[i].callbackFunction(payload,this._registeredControls[i].clientContext);else if(this._registeredControls[i].control.callbackRender!=null)
this._registeredControls[i].control.callbackRender(payload,this._registeredControls[i].clientContext);}
this._registeredControls[i]=null;break;}}}}
if(this._progressIndicator!=null)
this._progressIndicator.hide();}
this._resolveStyles=function(response){var json=eval(response.replace(/\^/g,"\""));var key=json[0];var styleBlock=eval(json[1]);if(styleBlock!=null&&styleBlock.length>0){var styles=document.getElementsByTagName("style");for(var i=0;i<styles.length;i++){var rules;if(ig_shared.IsIE)
rules=styles[i].styleSheet.rules
else
rules=styles[i].sheet.cssRules
for(var j=0;j<rules.length;j++){if(rules[j].selectorText.indexOf(key)>-1){try{if(ig_shared.IsIE)
styles[i].styleSheet.removeRule(0);else
styles[i].sheet.deleteRule(0);}catch(e){};}}
for(var j=0;j<styleBlock.length;j++){if(styleBlock[j]!=null){if(ig_shared.IsIE)
styles[i].styleSheet.addRule(styleBlock[j][0],styleBlock[j][1],0);else
styles[i].sheet.insertRule(styleBlock[j][0]+"{"+styleBlock[j][1]+"}",0);}}}}
return;}
this.registerSmartCallback=function(){var index;for(index=0;index<_asyncSmartCallbacks.length;index++)
if(!_asyncSmartCallbacks[index])
break;_asyncSmartCallbacks[index]=this;return index;}
this.formatCallbackArguments=function(){try{if(__igSubmit)
__igSubmit();}catch(exec){}
var form=this.getForm();if(!form)return;var count=form.elements.length;var element;for(var i=0;i<count;i++){element=form.elements[i];if(element.tagName.toLowerCase()=="input"&&(element.type=="hidden"||element.type=='password'||element.type=='text'||((element.type=="checkbox"||element.type=='radio')&&element.checked)))
this.addCallbackField(element.name,element.value);else if(element.tagName.toLowerCase()=="textarea")
this.addCallbackField(element.name,element.value);else if(element.tagName.toLowerCase()=="select"){var o=element.options.length;while(o-->0){if(element.options[o].selected)
this.addCallbackField(element.name,element.options[o].value);}}}
var args=_postdata+"__EVENTTARGET=&__EVENTARGUMENT=&"+"__CALLBACKID="+
this._registeredControls[0].uniqueId+"&__CALLBACKPARAM=";var xml='&lt;SmartCallback&gt;';if(this._registeredControls!=null){for(var i=0;i<this._registeredControls.length;i++){xml+="&lt;Control";var control=this._registeredControls[i];xml+=" id='"+control.uniqueId+"'";for(property in control.serverContext){if(control.serverContext[property]!=null){var value=control.serverContext[property].toString();while(value.indexOf("'")!=-1){value=value.replace("'","^^");}
xml+=" "+property+"='"+escape(escape(value))+"'";}}
xml+="/&gt;"}}
xml+="&lt;/SmartCallback&gt;";xml=escape(xml);args+=xml;this.setCallbackArguments(args);}
this.addCallbackField=function(name,value){_postdata+=name+"="+this.encodeValue(value)+"&";}
this.isAsynchronous=function(){return _async;}
this.setAsynchronous=function(async){_async=async;}
this.encodeValue=function(uri){if(encodeURIComponent!=null)
return encodeURIComponent(uri);else
return escape(parameter);}}
ig_createCallback=function(method,context){return function(){method.apply(context,[null]);}}
var ViewportOrientationEnum=new function(){this.Horizontal=0;this.Vertical=1;}
var AnimationDirectionEnum=new function(){this.Up=1;this.Down=2;this.Left=3;this.Right=4;}
var AnimationRateEnum=new function(){this.Static=0;this.Accelerate=1;this.Decelerate=2;this.AccelDecel=3;this.Linear=4;}
ig_viewport=function(){this.createViewport=function(elem,orientation){if(this.elem)
return;this.elem=elem;this.orientation=orientation;this.div=document.createElement("div");this.div.style.position="relative";this.table=document.createElement("table");var tr=document.createElement("tr");var tbody=document.createElement("tbody");this.td1=document.createElement("td");this.td2=document.createElement("td");this.div.style.overflow="hidden";this.div.style.width=elem.offsetWidth+"px";this.div.style.height=elem.offsetHeight+"px";this.table.cellSpacing="0px";this.table.cellPadding="0px";this.div.appendChild(this.table);this.table.appendChild(tbody);tbody.appendChild(tr);tr.appendChild(this.td1);this.td1.style.verticalAlign="top";this.td2.style.verticalAlign="top";this.table.style.height="100%";this.td1.style.height="100%";this.td2.style.height="100%";if(this.orientation==ViewportOrientationEnum.Horizontal){tr.appendChild(this.td2);}
else{tr=document.createElement("tr");tbody.appendChild(tr);tr.appendChild(this.td2);}
elem.parentNode.insertBefore(this.div,elem);this.td1.appendChild(elem);this.animate=new ig_SlideAnimation();}
this.transferPositionToDiv=function(elem,oldElem){if(elem.style.position!=""&&elem.style.position!="static"){this.div.style.position=elem.style.position;elem.style.position="static";if(oldElem)
oldElem.style.position="static";}
this.div.style.top=elem.style.top;this.div.style.left=elem.style.left;elem.style.top="";elem.style.left="";if(oldElem){oldElem.style.top="";oldElem.style.left="";}}
this.scroll=function(eCurrent,eNew,direction,rate){this.direction=direction;this.animate.setElement(this.table);this.animate.setContainer(this.div);this.animate.setDirection(direction);this.animate.setRate(rate);switch(this.direction){case AnimationDirectionEnum.Down:case AnimationDirectionEnum.Right:if(this.td1.firstChild!=null)
this.td1.removeChild(this.td1.firstChild);this.td1.appendChild(eCurrent);if(this.td2.firstChild!=null)
this.td2.removeChild(this.td2.firstChild);this.td2.appendChild(eNew);this.animate.startPos=0;this.animate.finishPos=this.td1.offsetWidth;break;case AnimationDirectionEnum.Up:case AnimationDirectionEnum.Left:if(this.td1.firstChild!=null)
this.td1.removeChild(this.td1.firstChild);this.td1.appendChild(eNew);if(this.td2.firstChild!=null)
this.td2.removeChild(this.td2.firstChild);this.td2.appendChild(eCurrent);this.div.scrollLeft=this.td1.offsetWidth;this.animate.startPos=this.div.scrollLeft;this.animate.finishPos=0;break;}
this.animate.play();}}
ig_WebAnimation=function(){this.timerInterval=30;this.startPos=0;var _inProgress;this.eContainer=null;this.duration=null;this.cancel=false;}
ig_WebAnimation.prototype.getElement=function(){return this.element;}
ig_WebAnimation.prototype.setElement=function(value){this.element=value;}
ig_WebAnimation.prototype.getTimerInterval=function(){return timerInterval;}
ig_WebAnimation.prototype.setTimerInterval=function(value){timerInterval=value;}
ig_WebAnimation.prototype.isInProgress=function(){return _inProgress;}
ig_WebAnimation.prototype.cancelAnimation=function(){clearTimeout(this.timerId);this.cancel=true;}
ig_WebAnimation.prototype.setContainer=function(container){this.eContainer=container;}
ig_WebAnimation.prototype.getContainer=function(){return this.eContainer;}
ig_WebAnimation.prototype.onBegin=function(){}
ig_WebAnimation.prototype.onNext=function(){}
ig_WebAnimation.prototype.onEnd=function(){}
ig_WebAnimation.prototype.play=function(){this.currentPos=this.startPos;this.cancel=false;this.begin();if(!this.cancel)
this.timerId=setInterval(ig_createCallback(this.tickHandler,this,null),this.timerInterval);}
ig_WebAnimation.prototype.tickHandler=function(){if(this.cancel||!this.next()){clearTimeout(this.timerId);this.end();}}
ig_WebAnimation.prototype.getDuration=function(){return this.duration;}
ig_WebAnimation.prototype.setDuration=function(value){this.duration=value;}
ig_WebAnimation.prototype.calcDurationIncrement=function(){return this.distance/(this.duration/this.timerInterval);}
ig_WebAnimation.prototype.ensureContainer=function(e){var parent=e.parentNode;if(parent.getAttribute("container")=='1')
return;if(e.getAttribute("container")=='1')
return;var eDiv=window.document.createElement("DIV");eDiv.setAttribute("container",'1');eDiv.cssText='overflow:hidden; position:absolute;z-index:12000;';parent.insertBefore(eDiv,e);parent.removeChild(e);eDiv.appendChild(e);}
ig_WebAnimation.prototype.removeContainer=function(){var container=this._element;var child=container.firstChild;if(container.getAttribute("container")!='1'){container=container.parentNode;if(container.getAttribute("container")!='1')
return;}
var parent=container.parentNode;container.removeChild(child);parent.removeChild(container);delete container;parent.appendChild(child);}
ig_SlideAnimation.prototype=new ig_WebAnimation();function ig_SlideAnimation(direction,rate){this.init(direction,rate);return this;}
ig_SlideAnimation.prototype.init=function(direction,rate){if(direction)
this.direction=direction;else
this.direction=AnimationDirectionEnum.Right;if(rate)
this.rate=rate;else
this.rate=AnimationRateEnum.Linear;}
ig_SlideAnimation.prototype.getDirection=function(){return this.direction;}
ig_SlideAnimation.prototype.setDirection=function(value){this.direction=value;}
ig_SlideAnimation.prototype.getRate=function(){return this.rate;}
ig_SlideAnimation.prototype.setRate=function(value){this.rate=value;}
ig_SlideAnimation.prototype.begin=function(){switch(this.direction){case AnimationDirectionEnum.Up:case AnimationDirectionEnum.Down:this.distance=Math.abs(this.finishPos-this.startPos);break;case AnimationDirectionEnum.Right:case AnimationDirectionEnum.Left:this.distance=Math.abs(this.finishPos-this.startPos);break;}
switch(this.rate){case AnimationRateEnum.Accelerate:this.increment=1;break;case AnimationRateEnum.Decelerate:this.increment=.5*Math.abs(this.distance);;break;case AnimationRateEnum.AccelDecel:this.midPoint=this.distance/2;this.accel=true;this.increment=1;break;case AnimationRateEnum.Linear:if(this.duration!=null)
this.increment=this.calcDurationIncrement();else{if(this.increment==null)
this.increment=30;this._originalIncrement=this.increment;this.increment=1;var totalCount=0;var temp=1;var distance=this.distance;while(temp*2<this._originalIncrement){temp*=2;distance-=temp*2;totalCount++;}
this._acelCount=totalCount;temp=this._originalIncrement;totalCount*=2;totalCount+=parseInt(distance/this._originalIncrement);this._decelCount=totalCount-this._acelCount;this._currentCount=1;}
break;}
this.onBegin();}
ig_SlideAnimation.prototype.next=function(){switch(this.direction){case AnimationDirectionEnum.Down:case AnimationDirectionEnum.Right:this.currentPos+=this.increment;if(this.currentPos>this.finishPos)
return false;if(this.direction==AnimationDirectionEnum.Right)
this.getContainer().scrollLeft=this.currentPos;else
this.getContainer().scrollTop=this.currentPos;break;case AnimationDirectionEnum.Up:case AnimationDirectionEnum.Left:this.currentPos-=this.increment;if(this.currentPos<this.finishPos)
return false;if(this.direction==AnimationDirectionEnum.Left)
this.getContainer().scrollLeft=this.currentPos;else
this.getContainer().scrollTop=this.currentPos;break;}
switch(this.rate){case AnimationRateEnum.Accelerate:this.increment*=2;break;case AnimationRateEnum.Decelerate:this.increment=Math.max(2,this.increment/2);break;case AnimationRateEnum.AccelDecel:if(this.accel){if(this.direction==AnimationDirectionEnum.Right||this.direction==AnimationDirectionEnum.Down){if(this.currentPos+this.increment>=this.midPoint){this.accel=false;this.increment=this.midPoint/2;}
else
this.increment*=2;}
else{if(this.currentPos-this.increment<=this.midPoint){this.accel=false;this.increment=this.midPoint/2;}
else
this.increment*=2;}}
else{this.increment=Math.max(2,this.increment/2);}
break;case AnimationRateEnum.Linear:if(this.duration==null){if(this._currentCount<=this._acelCount)
this.increment*=2;else if(this._currentCount>this._decelCount){this.increment=Math.pow(2,this._acelCount);if(this._acelCount>3)
this._acelCount--;}
else
this.increment=this._originalIncrement;this._currentCount++;}
break;}
this.onNext();return true;}
ig_SlideAnimation.prototype.end=function(){this.getContainer().scrollLeft=this.finishPos;if(this.rate==AnimationRateEnum.Linear&&this.duration==null){this._currentCount=0;this.increment=this._originalIncrement;}
this.onEnd();}
ig_SlideRevealAnimation.prototype=new ig_SlideAnimation();function ig_SlideRevealAnimation(direction,rate){this.init(direction,rate);return this;}
ig_SlideRevealAnimation.prototype.begin=function(){this.eContainer.style.overflow="hidden";this.element.style.position="relative";this.distance=Math.abs(this.finishPos-this.startPos);this.currentPos=this.startPos;switch(this.direction){case AnimationDirectionEnum.Up:this.element.style.top=this.currentPos.toString();break;case AnimationDirectionEnum.Down:this.element.style.display="";this.element.style.top=this.currentPos.toString();break;case AnimationDirectionEnum.Right:this.element.style.display="";this.element.style.left=this.currentPos.toString();break;case AnimationDirectionEnum.Left:this.element.style.left=this.currentPos.toString();break;}
switch(this.rate){case AnimationRateEnum.Accelerate:this.increment=1;break;case AnimationRateEnum.Decelerate:this.increment=.5*Math.abs(this.distance);;break;case AnimationRateEnum.AccelDecel:this.midPoint=this.distance/2;this.accel=true;this.increment=1;break;case AnimationRateEnum.Linear:if(!this.increment)
this.increment=20;break;}
this.onBegin();}
ig_SlideRevealAnimation.prototype.next=function(){switch(this.direction){case AnimationDirectionEnum.Down:case AnimationDirectionEnum.Right:this.currentPos+=this.increment;if(this.currentPos>this.finishPos)
return false;if(this.direction==AnimationDirectionEnum.Right)
this.element.style.left=this.currentPos.toString();else
this.element.style.top=this.currentPos.toString();break;case AnimationDirectionEnum.Up:case AnimationDirectionEnum.Left:this.currentPos-=this.increment;if(this.currentPos<this.finishPos)
return false;if(this.direction==AnimationDirectionEnum.Left)
this.element.style.left=this.currentPos.toString();else
this.element.style.top=this.currentPos.toString();break;}
switch(this.rate){case AnimationRateEnum.Accelerate:this.increment*=2;break;case AnimationRateEnum.Decelerate:this.increment=Math.max(2,this.increment/2);break;case AnimationRateEnum.AccelDecel:if(this.accel){if(this.direction==AnimationDirectionEnum.Right||this.direction==AnimationDirectionEnum.Down){if(this.currentPos+this.increment>=this.midPoint){this.accel=false;this.increment=this.midPoint/2;}
else
this.increment*=2;}
else{if(this.currentPos-this.increment<=this.midPoint){this.accel=false;this.increment=this.midPoint/2;}
else
this.increment*=2;}}
else{this.increment=Math.max(2,this.increment/2);}
break;}
this.onNext();return true;}
ig_SlideRevealAnimation.prototype.end=function(){if(this.cancel)
return;if(this.direction==AnimationDirectionEnum.Left||this.direction==AnimationDirectionEnum.Right)
this.element.style.left=this.finishPos;else
this.element.style.top=this.finishPos;this.onEnd();}
ig_RevealAnimation.prototype=new ig_WebAnimation();function ig_RevealAnimation(direction,rate){this.init(direction,rate);return this;}
ig_RevealAnimation.prototype.init=function(direction,rate){if(direction)
this.direction=direction;else
this.direction=AnimationDirectionEnum.Right;if(rate)
this.rate=rate;else
this.rate=AnimationRateEnum.Linear;}
ig_RevealAnimation.prototype.getDirection=function(){return this.direction;}
ig_RevealAnimation.prototype.setDirection=function(value){this.direction=value;}
ig_RevealAnimation.prototype.getRate=function(){return this.rate;}
ig_RevealAnimation.prototype.setRate=function(value){this.rate=value;}
ig_RevealAnimation.prototype.begin=function(){this.element.style.overflow="hidden";this.distance=Math.abs(this.finishPos-this.startPos);switch(this.direction){case AnimationDirectionEnum.Up:if(!this.startPos)
this.startPos=this.element.scrollHeight;break;case AnimationDirectionEnum.Down:if(!this.startPos)
this.startPos=1;break;}
switch(this.rate){case AnimationRateEnum.Accelerate:this.increment=1;break;case AnimationRateEnum.Decelerate:this.increment=.5*Math.abs(this.distance);;break;case AnimationRateEnum.AccelDecel:this.midPoint=this.distance/2;this.accel=true;this.increment=1;break;case AnimationRateEnum.Linear:if(!this.increment)
this.increment=20;break;}
this.onBegin();this.currentPos=this.startPos;}
ig_RevealAnimation.prototype.next=function(){switch(this.direction){case AnimationDirectionEnum.Down:this.currentPos+=this.increment;if(this.currentPos>this.finishPos)
return false;break;case AnimationDirectionEnum.Up:this.currentPos-=this.increment;if(this.currentPos<this.finishPos)
return false;break;}
this.element.style.height=this.currentPos;switch(this.rate){case AnimationRateEnum.Accelerate:this.increment*=2;break;case AnimationRateEnum.Decelerate:this.increment=Math.max(2,this.increment/2);break;case AnimationRateEnum.AccelDecel:if(this.accel){if(this.direction==AnimationDirectionEnum.Right||this.direction==AnimationDirectionEnum.Down){if(this.currentPos+this.increment>=this.midPoint){this.accel=false;this.increment=this.midPoint/2;}
else
this.increment*=2;}
else{if(this.currentPos-this.increment<=this.midPoint){this.accel=false;this.increment=this.midPoint/2;}
else
this.increment*=2;}}
else{this.increment=Math.max(2,this.increment/2);}
break;}
this.onNext();return true;}
ig_RevealAnimation.prototype.end=function(){switch(this.direction){case AnimationDirectionEnum.Down:this.element.style.height="";break;case AnimationDirectionEnum.Up:this.element.style.display="none";break;}
this.element.style.overflow="";this.element.style.width="";this.onEnd();}
var ig_Location={TopLeft:0,TopCenter:1,TopRight:2,TopInfront:3,TopBehind:4,MiddleLeft:8,MiddleCenter:9,MiddleRight:10,MiddleInfront:11,MiddleBehind:12,BottomLeft:16,BottomCenter:17,BottomRight:18,BottomInfront:19,BottomBehind:20,AboveLeft:32,AboveCenter:33,AboveRight:34,AboveInfront:35,AboveBehind:36,BelowLeft:64,BelowCenter:65,BelowRight:66,BelowInfront:67,BelowBehind:68};function ig_progressIndicator(imageUrl,relativeContainer){this._img=imageUrl;this._rc=relativeContainer;this.setImageUrl=function(url){if(this._elem)
this._elem.parentNode.removeChild(this._elem);this._elem=null;this._img=url;}
this.getImageUrl=function(){return this._img;}
this.setTemplate=function(html){var elem=this._elem;this._html=html;if(elem){if(elem.tagName=='DIV'&&html){elem.innerHTML=html;return;}
elem.parentNode.removeChild(elem);this._elem=null;}}
this.getTemplate=function(){return this._html;}
this.setLocation=function(location){this._location=location;}
this.setCssStyle=function(css){this._css=css;}
this.setRelativeContainer=function(elem){this._rc=elem;}
this.display=function(rc,loc){this.visible=true;var elem=this._elem;if(!rc)
rc=this._rc;if(!elem){var body=document.body,append=!ig_shared.IsIE||document.readyState=='complete';if(this._html){elem=document.createElement('DIV');if(append)
body.appendChild(elem);else
body.insertBefore(elem,body.firstChild);elem.innerHTML=this._html;}
else{elem=document.createElement('IMG');if(append)
body.appendChild(elem);else
body.insertBefore(elem,body.firstChild);var img=this._img;if(!img)
img=(typeof ig_pi_imageUrl=='string')?ig_pi_imageUrl:'/ig_common/images/ig_progressIndicator.gif';elem.src=img;}
elem.unselectable='on';this._elem=elem;}
if(this._css)
elem.className=this._css;if(loc==null)
if((loc=this._location)==null)
loc=ig_Location.BottomRight;ig_shared.absPosition(rc,elem,loc);}
this.hide=function(){this.visible=false;if(this._elem)
this._elem.style.display='none';}}
function ig_callBackManager(form){if(!form)if((form=ig_shared.getForm())==null)
return;this._onUnload=function(){var f=this._form;if(!f)
return;this._form=this._submit=this._style=null;ig_shared.removeEventListener(f,'submit',this._onFormSubmit);ig_shared.removeEventListener(f,'click',this._onFormEvt);ig_shared.removeEventListener(f,'mousedown',this._onFormEvt);ig_shared.removeEventListener(f,'mouseup',this._onFormEvt);if(f._ig_cb_submit){f.submit=f._ig_cb_submit;f._ig_cb_submit=null;}
if(this._onsubmit)
f.onsubmit=this._onsubmit;}
this.addPanel=function(control,id,elemID,rc,link,ids,post,noResp){if(!this._form||!control)
return;var i=-1;while(++i<this._panels.length)
if(this._panels[i].elemID==elemID)
break;this._panels[i]={control:control,id:id,elemID:elemID,rc:rc,link:link,ids:ids,post:post,noResp:noResp};}
this.addCallBack=function(control,id,rc,flag){var e,ee,j,form=this._form;if(!control||!form)
return;if(!this._ok){form.submit();return;}
if(!id){id=control.id;rc=control.rc;control=control.control;}
var i=null,args=this._submitElem;if(args){args+='&';this._submitElem=null;}
else args='';if(this._wait)
return true;if(this._jsSrcs.length>0){if(flag==-1)
return true;this._killJsSrc();}
var id1=this._elemID,id2=this._evtElem;if(id2)
id2=id2.id;var triggers=[id2,this._subID,id1];if(!id1)
id1=id2;if(control.beforeCBSubmit)
i=control.beforeCBSubmit(id1);var lsnrs=ig_shared._cbListeners;var elem,count=lsnrs?lsnrs.length:0;while(count-->0){var fn=lsnrs[count];if(fn)if((fn=fn.evalCtl)!=null)try{if(typeof fn=='function')
fn=fn(id1);else if(fn)
fn=eval(fn).onCBSubmit(id1);if(!i)
i=fn;}catch(e){}}
if(i=='fullPostBack'){form.submit();return;}
if(i=='cancelSubmit'||i===true)
return;var resp=(i!='cancelResponse'),request=null;try{if(this._ie)
request=ig_createActiveXFromProgIDs(["MSXML2.XMLHTTP","Microsoft.XMLHTTP"]);else
request=new XMLHttpRequest();}catch(e){}
if(!request)
return;if(resp){id1=this.__id(id1);id2=this.__id(id2);ee=this._panels;i=ee.length;while(i-->0&&resp){e=ee[i].noResp;j=e?e.length:e;while(j-->0)if(e[j]==id1||e[j]==id2)
resp=false;}}
this._wait=true;var tags=['INPUT','TEXTAREA','SELECT'],evs=['__EVENTTARGET','__EVENTARGUMENT'];var vs=control.getCBSubmitElems?control.getCBSubmitElems(flag):null;var elems=vs?vs:form.elements;var count=j=elems.length;if(vs){elems=new Array();count=0;while(j-->0){e=vs[j];for(var t=0;t<3;t++)try{if(e.tagName==tags[0]){elems[count++]=e;break;}
ee=e.getElementsByTagName(tags[t]);for(i=0;i<ee.length;i++)
elems[count++]=ee[i];}catch(ex){}}
vs=this._vs;for(i=0;i<vs.length;i+=2)
elems[count++]=form[vs[i]];}
while(count-->0){if((elem=elems[count])==null)
continue;var val=null,name=elem.name;var tag=ig_csom.isEmpty(name)?null:elem.tagName;i=2;if(tag==tags[0]){var type=elem.type;if(type=='text'||type=='password'||type=='hidden'||((type=='checkbox'||type=='radio')&&elem.checked))
val=elem.value;}
else if(tag==tags[1])
val=elem.value;else if(tag==tags[2]){var o=elem.options;i=o?o.length:0;while(i-->0)if(o[i].selected)
args+=name+'='+this._encode(o[i].value)+'&';}
if(val!=null){args+=name+'='+this._encode(val)+'&';while(i-->0)if(name==evs[i]){elem.value='';evs[i]=null;}}}
i=2;while(i-->0)if(evs[i])
args+=evs[i]+'=&';var postKey='_'+Math.random(),cb=-1;while(++cb<this._callBacks.length)
if(!this._callBacks[cb])
break;args+='__IG_CALLBACK='+this._encode(id+'#'+postKey);try{request.open('POST',form.action,true);try{if(this._ie||request.setRequestHeader)
request.setRequestHeader('Content-Type','application/x-www-form-urlencoded');}catch(e){}
if(resp){if(!(i=this._ie))try{i=!request.addEventListener;}
catch(e){i=true;}
if(i)
request.onreadystatechange=this._responseEvt;else
request.addEventListener('load',this._responseEvt,false);}
request.send(args);ig_shared._isPosted=false;if(resp){window.setTimeout("try{ig_all._ig_cbManager._timeOut('"+postKey+"');}catch(i){}",this._timeLimit+1000);cb=this._callBacks[cb]={request:request,id:id,postKey:postKey,control:control,timer:control._timer,time:(new Date()).getTime(),triggers:triggers};if(rc!==false){cb.pis=new Array();if(!rc||rc.nodeName)
cb.pis[0]=this._showPI(rc,control);else for(i=0;i<rc.length;i++)
cb.pis[i]=this._showPI(rc[i],control);}}}
catch(e){}
this._wait=false;}
this._timeOut=function(key){var cb,i=this._callBacks.length;while(i-->0)if((cb=this._callBacks[i])!=null)
if(cb.postKey==key)
break;if(i<0)
return;var j=cb.control;if(j&&j.onError)
j.onError(6);j=cb.pis?cb.pis.length:0;while(j-->0)
cb.pis[j].hide();delete this._callBacks[i];}
this._showPI=function(rc,ctl){var pis=this._indicators;if(!pis)
pis=this._indicators=new Array();var pi=null,j=pis.length,i=-1;while(++i<j){pi=pis[i];if(!pi.visible)
break;}
if(i==j)
pi=pis[j]=new ig_progressIndicator();if(ctl.fixPI)
ctl.fixPI(pi);if(pi._rc)
rc=null;pi.display(rc);return pi;}
this.setHtml=function(txt,elem){if(!txt||!elem)
return null;var i=0,css='';while(ig_shared.IsOpera){var i0=txt.indexOf('<style ',i),i1=txt.indexOf('<style>',i),i2=txt.indexOf('<STYLE ',i),i3=txt.indexOf('<STYLE>',i);if(i>i0||(i1>=i&&i0>i1))
i0=i1;if(i>i0||(i2>=i&&i0>i2))
i0=i2;if(i>i0||(i3>=i&&i0>i3))
i0=i3;i1=txt.indexOf('>',i0);if(i>i0||i0>i1)
break;i2=txt.indexOf('</style>',i0);i3=txt.indexOf('</STYLE>',i0);if(i1>i2||(i3>i1&&i2>i3))
i2=i3;if(i1>i2)
break;css+=txt.substring(i1+1,i2);txt=txt.substring(0,i0)+txt.substring(i2+8);i=i0;}
if(css.length>5)
this._setCss(null,css,elem.id+'_ig_css');i=-3;while((i=txt.indexOf('<&>3',i+=3))>=0)
txt=txt.replace('<&>3','<&>');i=0;while(true){var iLen=txt.length;var i1=txt.indexOf('<script',i),i2=txt.indexOf('<SCRIPT',i);if(i1>i2&&i2>=i)
i1=i2;if(i1<i)
break;var t=this._fixScript(txt,i1);if(t==null)
i=i1+7;else
txt=t;}
this._fireBeforeResponse(elem);elem.innerHTML=txt;return txt;}
this._fixScript=function(txt,i){var i2=txt.indexOf('>',i);if(i2<i)
return null;var i3=txt.indexOf('</script>',i2),i4=txt.indexOf('</SCRIPT>',i2);if(i3>i4&&i4>i)
i3=i4;var js=txt.substring(i,i2);if(js.toLowerCase().indexOf('javascript')<0)
return null;var first=js.indexOf('IG_FIRST')>0;js=txt.substring(i2+1,i3);txt=txt.substring(0,i)+txt.substring(i3+9);if(js.length<2)
return txt;if(!this._scripts)
this._scripts=new Array();i=this._scripts.length;this._scripts[i]=js;if(first){while(i-->0)
this._scripts[i+1]=this._scripts[i];this._scripts[0]=js;}
return txt;}
this._fireBeforeResponse=function(elem){var el,ec,control,i=-1,lsnrs=ig_shared._cbListeners;if(lsnrs)while(++i<lsnrs.length){if((el=lsnrs[i].elemID)==null)
continue;if((el=ig_shared.getElement(el,this._form))==null)
continue;try{control=eval(ec=lsnrs[i].evalCtl);}
catch(ex){continue;}
while((el=el.parentNode)!=null)
if(el==elem){if(control.onCBBeforeResponse)
control.onCBBeforeResponse();var cb=this._cb;if(!cb||!control.onCBAfterResponse)
continue;if(!cb.lsnrs)
cb.lsnrs=new Array();cb.lsnrs[cb.lsnrs.length]=ec;}}}
this._form=form;this._timeLimit=20000;this._vs=['__VIEWSTATE',null,'__EVENTVALIDATION',null];this._sep='<&>0';this._sepLen=this._sep.length;this._setPan=function(p,se){this._panelToSubmit=p;this._submitElem=se;if(p)this._panTime=(new Date()).getTime();else this._evtElem=null;}
this._getPan=function(){var t=this._panTime;if(!t||t+500<(new Date()).getTime())
this._submitElem=this._panelToSubmit=this._panTime=null;return this._panelToSubmit;}
this._doPostBack=function(target,arg){var me=ig_all._ig_cbManager,evt=window.event;if(!me||me._wait)
return ig_cancelEvent(evt,'submit');var pan=me._findPanel(target),form=me._form;if(!pan){me._evtElem=null;me._oldPostBack(target,arg);return;}
me._setPan(pan);var e=form?form.__EVENTTARGET:null;if(e)
e.value=target;e=form?form.__EVENTARGUMENT:null;if(e)
e.value=arg;me._elemID=target;me._onFormSubmit();me._elemID=null;ig_cancelEvent(evt,'submit');}
this._isMatch=function(x,v){if(x==v)
return true;var len=x?x.length:0;if(len--<2)
return false;var wc0=x.charCodeAt(0)==42,wc1=x.charCodeAt(len)==42;if(wc1)x=x.substring(0,len);if(wc0)x=x.substring(1);var i=v.indexOf(x);if(wc0){if(wc1)return i>=0;i=v.lastIndexOf(x);return i>=0&&i+len==v.length;}
return wc1&&i==0;}
this.__id=function(id){return id?id.replace(/\:/g,'_').replace(/\$/g,'_'):id;}
this._findPanel=function(id,e){var j,i,pans=this._panels.length,form=this._form;if(this._wait||pans<1)
return null;if(e)
id=e.id;else if(!id)
return null;var id0=id;id=this.__id(id);if(!e&&id)
if((e=ig_shared.getElement(id,form))==null)
if((e=ig_shared.getElement(id+"_Data",form))==null)
if((e=ig_shared.getElement(id+"_hidden",form))==null)
if((e=ig_shared.getElement(id.replace(/\_/g,'x'),form))!=null)
if(id0!=id)if((e=ig_shared.getElement(id0,form))==null)
e=ig_shared.getElement(id0+"_Data",form);id0=id;while(e||id){if(id||(e&&e.id))for(i=0;i<pans;i++){var p=this._panels[i];if(e&&p.elemID==e.id){if(p.post)for(j=0;j<p.post.length;j++)
if(this._isMatch(p.post[j],id0))
return null;return p;}
if(p.ids&&id)for(j=0;j<p.ids.length;j++)
if(this._isMatch(p.ids[j],id0))
return p;if(p.noResp&&id)for(j=0;j<p.noResp.length;j++)
if(this._isMatch(p.noResp[j],id0))
return p;}
id=null;if(e)
e=e.parentNode;}
return null;}
this._onFormEvt=function(evt){if(!evt)
if((evt=window.event)==null)
return;var elem=evt.target;if(!elem)
if((elem=evt.srcElement)==null)
elem=this;var me=ig_all._ig_cbManager,type=elem.type,tag=elem.tagName,name=elem.name;if(!me)
return;me._evtElem=elem;me._evtTime=(new Date()).getTime();if(evt.type!='click'||elem.disabled)
return;me._subID=me._submitElem=null;var pan=me._findPanel(null,elem);if(!pan)
return;var val=null,x=evt.offsetX;if(type=='image'&&tag=='INPUT')
val=name+'.x='+(x?x:1)+'&'+name+'.y='+(x?evt.offsetY:1);else if(type=='submit'&&(tag=='BUTTON'||tag=='INPUT'))
val=name+'='+me._encode(elem.value);else
return;me._setPan(pan,ig_csom.isEmpty(me._subID=name)?null:val);}
this._encode=function(val){return(typeof encodeURIComponent=='function')?encodeURIComponent(val):escape(val);}
this._restore=function(){for(var i=0;i<3;i+=2){var val=this._vs[i+1],e=ig_shared.getElement(this._vs[i],this._form);if(e&&val)
e.value=val;}}
this._onFormSubmit=function(evt,me){var my=me&&me._vs;if(!my){me=ig_all._ig_cbManager;if(!evt)
evt=window.event;}
if(me&&me._wait)
me=null;if(me&&me._onsubmit&&!my){try{me._onsubTime=(new Date()).getTime();if(me._onsubmit()===false)
me=null;}catch(ex){me=null;}
if(evt&&evt.returnValue==false&&evt.type=='submit')
me=null;}
if(!me)
return ig_cancelEvent(evt,'submit');var form=me._form,pan=me._getPan(),pp=me._panels;if(!pan||!form||form.action!=form._ig_cb_act)
return true;ig_cancelEvent(evt,'submit');var p,rc=pan.rc,i=pp.length,id=pan.link;if(id)while(i-->0)
if((p=pp[i])!=null)
if(p.elemID==id||p.id==id)
pan=p;if(pan)
me.addCallBack(pan.control,pan.id,rc?rc:pan.rc);me._setPan(null);return false;}
this._responseEvt=function(){var me=ig_all._ig_cbManager;if(!me||me._wait)
return;for(var i=0;i<me._callBacks.length;i++){var j=-1,cb=me._callBacks[i];if(cb&&me._doResponse(cb)){if(cb.pis)
j=cb.pis.length;while(j-->0)
cb.pis[j].hide();me._cb=me._scripts=null;delete me._callBacks[i];if(!me._jsWait&&cb.timer)
me._timer(cb.id,true);}}}
this._doCss=function(e,v){e.cssText=v;var e1,ss=document.styleSheets;var i=ss.length;while(i-->0){e1=ss[i];if(e1==e)
return;if(!e1.readOnly&&!e1.disabled&&e1.type=='text/css')
break;}
if(i<0)
return;}
this._doResponse=function(cb){var request=cb.request;if(!request||request.readyState!=4)
return false;var txt=request.responseText,sep=this._sep,sepLen=this._sepLen;if(!txt)
return(new Date()).getTime()-cb.time>this._timeLimit;this.serverError=null;var e,i,i0=txt.indexOf(sep);var iID=txt.indexOf(sep,i0+sepLen);var iKey=txt.indexOf(sep,iID+sepLen);if(i0<0||iID<0||iKey<0)
return false;this.triggers=cb.triggers;this._jsWait=false;var id=txt.substring(i0+sepLen,iID),postKey=txt.substring(iID+sepLen,iKey);this._error=0;if(postKey.indexOf('<error>')==0){i=this._panels.length;this.serverError=txt.split(this._sep)[3];while(i-->0){e=this._panels[i].control;if(e&&e.onError)
e.onError(1);}
var lsnrs=ig_shared._cbError;i=lsnrs?lsnrs.length:0;while(i-->0)try{lsnrs[i](cb.control,cb.triggers,this.serverError);}catch(e){}
this._restore();try{this._submit(9);}catch(e){}
return true;}
if(id==cb.id&&postKey==cb.postKey){if(this._cb){window.setTimeout("try{ig_all._ig_cbManager._responseEvt();}catch(i){}",1);return this._killCB++>20;}
this._cb=cb;this._killCB=0;txt=txt.substring(iKey+sepLen);var vals=txt.split(sep),old=this._vs;for(i=2;i<vals.length-1;i+=2){var index=-1,v0=vals[i],v1=vals[i+1];if(v0==old[2])
index=2;else if(v0==old[0])
index=0;else if(v0&&v0.indexOf('<')!=0)
continue;vals[i]=vals[i+1]=null;if(index>-1){e=ig_shared.getElement(v0,this._form);if(e){old[index+1]=e.value;e.value=v1;}}
else if(v0=='<script>')
this._scripts=new Array(v1);else if(v0=='<jssrc>'){e=document.scripts;if(!e||e.length<2)
e=document.getElementsByTagName('SCRIPT');if(!e)
continue;var s,x=-1,src='';while(++x<e.length)if(e[x])if((s=e[x].src)!=null)
src+=s;v1=v1.split('|');this._scriptCount=0;x=-1;while(++x<v1.length){s=v1[x].replace('&amp;','&');if(src.indexOf((s.charCodeAt(0)<47)?s.substring(1):s)<0)
this._addJS(this._runScript(s,true),s,cb);}}
else if(v0=='<style>')
this._setCss(this._style,v1);}
var ctl=cb.control;if(vals[0]=='<error>'){this.serverError=vals[1];this._error=2;}
else if(ctl&&ctl.doResponse)try{ctl.doResponse(vals,this);}catch(e){this._error|=4;}
cb._js=this._scripts;if(this._jsWait)
window.setTimeout("try{ig_all._ig_cbManager._killJsSrc('"+id+"');}catch(i){}",3000);else
this._jsDelay(cb);if(this._error>0&&ctl.onError)
ctl.onError(this._error);return true;}
return false;}
this._setCss=function(e,v,id,bad){try{if((!id||bad)&&document.createStyleSheet){var e0=e?e.owningElement:null;e=e0?e0.parentElement:null;if(e&&e.parentNode)
e.removeChild(e0);e0=document.createStyleSheet();if(!bad)this._style=e0;this._doCss(e0,v);return e0;}
if(id)
e=document.getElementById(id);if(!e){e=document.createElement('STYLE');e.type='text/css';var h=document.getElementsByTagName('HEAD');h=(h&&h.length>0)?h[0]:document.body;h.appendChild(e);if(id)
e.id=id;else if(!bad)
this._style=e;}
e.innerHTML=v;return e;}catch(e){this._error|=32;}}
this._jsDelay=function(cb){if(!cb)
return;var i,ctl=cb.control,js=cb._js;cb.control=cb._js=null;if(js)for(i=0;i<js.length;i++)
this._runScript(js[i]);if(cb.lsnrs)for(i=0;i<cb.lsnrs.length;i++)try{eval(cb.lsnrs[i]).onCBAfterResponse();}catch(ex){}
cb.lsnrs=null;if(ctl&&ctl.afterCBResponse)
ctl.afterCBResponse();}
this._addJS=function(se,src,cb){if(!se)
return;this._jsWait=true;var js=this._jsSrcs;var j=-1,jL=js.length;while(++j<jL)if(js[j].src==src){js[j].cb[js[j].cb.length]=cb;return;}
js[jL]={se:se,src:src,cb:[cb]};ig_shared.addEventListener(se,'readystatechange',this._removeJS);}
this._removeJS=function(se){var me=ig_all._ig_cbManager;if(!me||!se)
return;var e=se.srcElement;if(e){if(e.readyState!='loaded')
return;se=e;}
ig_shared.removeEventListener(se,'readystatechange',me._removeJS);var js=me._jsSrcs;var x,i,cbx,cb=null,j=-1,jL=js?js.length:0;while(++j<jL)if(js[j].se==se){cb=js[j].cb;js[j].se=null;}
i=cb?cb.length:0;while(i-->0){var cbi=cb[i];j=jL;while(j-->0&&cbi)if(js[j].se){cbx=js[j].cb;x=cbx.length;while(x-->0)if(cbx[x]==cbi){cbi=null;break;}}
if(!cbi)
continue;j=jL;while(j-->0){if(js[j].se)
se=null;cbx=js[j].cb;x=cbx.length;while(x-->0)if(cbx[x]==cbi)
delete cbx[x];}
if(se){while(++j<jL)
delete js[j];me._jsSrcs=new Array();}
me._jsDelay(cbi);if(cbi.timer)
me._timer(cbi.id,true);}}
this._killJsSrc=function(id){var me=ig_all._ig_cbManager;var js=me?me._jsSrcs:null;var j=js?js.length:0;while(j-->0){var x=-1,cbx=js[j].cb;while(++x<cbx.length)
if(cbx[x]&&(cbx[x].id==id||!id))
me._removeJS(js[j].se);}
if(!id&&this._jsSrcs.length>0)
this._jsSrcs=new Array();}
this._timer=function(id,wait){var me=ig_all._ig_cbManager;var pan,cb=me?me._callBacks:null;var i=cb?cb.length:0;while(i-->0)if(cb[i]&&cb[i].id==id)
return;i=me._panels.length;while(i-->0){pan=me._panels[i];if(pan.id==id)
break;}
if(i>=0)
i=pan.control._timer;if(!i||i<1)
return;if(!wait){pan.wait=false;if(!me.addCallBack(pan,null,null,-1))
return;}
if(!pan.wait)
window.setTimeout("try{ig_all._ig_cbManager._timer('"+id+"');}catch(i){}",i);pan.wait=true;}
this._runScript=function(js,src){var e=document.getElementsByTagName('HEAD');e=(e&&e.length>0)?e[0]:document.body;if(js&&js.length>1)try{if(!src){try{eval(js);return;}
catch(ex){}}
var se=document.createElement('SCRIPT');se.type='text/javascript';if(src)
se.src=js;else
se.text=js;e.appendChild(se);if(src&&document.all)
return se;}
catch(ex){this._error|=16;}}
this.newPanel=function(id,uid,ids,prop,post,noResp){var elem=document.getElementById(id);if(!elem)
return;var o=ig_all[id];if(o)
ig_dispose(o);var pi={loc:ig_Location.MiddleCenter};pi.setImageUrl=function(v){this.url=v;}
pi.getImageUrl=function(){return this.url;}
pi.setTemplate=function(v){this.html=v;}
pi.getTemplate=function(){return this.html;}
pi.setLocation=function(v){this.loc=v;}
pi.getLocation=function(){return this.loc;}
pi.setRelativeContainer=function(v){this.rc=v;}
pi.getRelativeContainer=function(){return this.rc;}
o=ig_all[id]={_id:id,_uniqueID:uid,_element:elem,_pi:pi,_evts:prop};var t=o._timer=prop[5]?prop[5]:0;o.getTimer=function(){return this._timer;}
o.setTimer=function(v){this._timer=v;}
o.getID=function(){return this._id;}
o.getUniqueID=function(){return this._uniqueID;}
o.getElement=function(){return this._element;}
o.getProgressIndicator=function(){return this._pi;}
o.findControl=function(id){return ig_shared.findControl(this._element,id);}
o._fire=function(evt,p3){evt=this._evts?this._evts[evt]:null;if(!evt)
return false;var evtO=new ig_EventObject();ig_fireEvent(this,ig_shared.replace(evt,"&quot;","'"),evtO,p3);if(evtO.cancelResponse)
return'cancelResponse';if(evtO.fullPostBack)
return'fullPostBack';return evtO.cancel;}
o.beforeCBSubmit=function(src){return this._fire(1,src);}
o.afterCBResponse=function(){this._fire(3);}
o.onError=function(flags){this._fire(4,flags);}
o.doResponse=function(vals,man){if(!this._fire(2))for(var i=0;i+1<vals.length;i+=2){var e,v,v0=vals[i],v1=vals[i+1];if(!v0)
continue;if(v0.indexOf('-')==0){e=ig_shared.getElement(v=v0.substring(2),man._form);if(!e)
e=ig_shared.getElement(man.__id(v),man._form);if(e)
v0=v0.charCodeAt(1);if(v0==51)
e.innerHTML=v1;else if(v1=='&nbsp;')
v1='';if(v0==48)
e.value=v1;if(v0==49)
e.checked=v1.toLowerCase()=='true';if(v0==50)
e.selectedIndex=parseInt(v1);if(v0==52)
e.src=v1;continue;}
e=ig_getWebControlById(v0);if(e){man.setHtml(v1,e._element);continue;}
try{var multi=v0.indexOf('+')==0;e=eval(multi?v0.substring(1):v0);if(e&&e.doResponse){if(multi){v1=parseInt(v1);v0=new Array();while(v1-->0){v0[v0.length]=vals[i+=2];v0[v0.length]=vals[i+1];}}
else
v0=[v0,v1];e.doResponse(v0,man);}}catch(e){man._error|=8;}}}
o.fixPI=function(pi){var p=this._pi;pi.setLocation(p.loc);if(pi._html!=p.html)
pi.setTemplate(p.html);if(pi._img!=p.url)
pi.setImageUrl(p.url);pi._rc=p.rc;}
o.refresh=function(){try{ig_all._ig_cbManager.addCallBack(this,this._uniqueID,this._element,-1);}catch(e){}}
this.addPanel(o,uid,id,elem,null,ids,post,noResp);o._fire(0);if(t>0)
window.setTimeout("try{ig_all._ig_cbManager._timer('"+uid+"');}catch(i){}",t);}
this._submit=function(flag){var me=ig_all._ig_cbManager;if(!me)
return;var pan=me._getPan(),elem=me._evtElem,f=me._form;if(!pan&&elem&&flag!=9){if((new Date()).getTime()<me._evtTime+((elem.nodeName=='A')?200:30))
me._setPan(pan=me._findPanel(null,elem));if(pan)
if(!me._onFormSubmit(null,me))
return;me._setPan(null);}
if(f&&f._ig_cb_submit)try{pan=me._onsubTime;if(pan&&(new Date()).getTime()-pan>100)
pan=null;if(me._onsubmit&&!flag&&!pan)try{if(me._onsubmit()===false)
return;}catch(ex){}
f._ig_cb_submit();}catch(me){}}
this._callBacks=new Array();this._panels=new Array();this._jsSrcs=new Array();this._ie=typeof ActiveXObject!='undefined';this._ok=this._ie||typeof XMLHttpRequest!='undefined';if(!this._ok)
return;form._ig_cb_act=form.action;this._onsubmit=form.onsubmit;form.onsubmit=null;form._ig_cb_submit=form.submit;form.submit=this._submit;ig_shared.addEventListener(form,'submit',this._onFormSubmit,true);ig_shared.addEventListener(form,'click',this._onFormEvt,true);ig_shared.addEventListener(form,'mousedown',this._onFormEvt,true);ig_shared.addEventListener(form,'mouseup',this._onFormEvt,true);this._oldPostBack=window.__doPostBack;if(this._oldPostBack)
window.__doPostBack=this._doPostBack;}
function ig_createActiveXFromProgIDs(progIDs){var e;for(var i=0;i<progIDs.length;i++){try{var activeX=new ActiveXObject(progIDs[i]);return activeX;}
catch(e){;}}
return null;}
function ig$(id){var o=null;if(typeof ig_getWebControlById=="function")
o=ig_getWebControlById(id);if(o)
return o;if(typeof igedit_getById=="function")
o=igedit_getById(id);if(o)
return o;if(typeof igtab_getTabById=="function")
o=igtab_getTabById(id);if(o)
return o;if(typeof igcal_getCalendarById=="function")
o=igcal_getCalendarById(id);if(o)
return o;if(typeof igdrp_getComboById=="function")
o=igdrp_getComboById(id);if(o)
return o;if(typeof iged_getById=="function")
o=iged_getById(id);if(o)
return o;if(typeof iglbar_getListbarById=="function")
o=iglbar_getListbarById(id);if(o)
return o;if(typeof igcmbo_getComboById=="function")
o=igcmbo_getComboById(id);if(o)
return o;if(typeof igtbl_getGridById=="function")
o=igtbl_getGridById(id);if(o)
return o;if(typeof igtbar_getToolbarById=="function")
o=igtbar_getToolbarById(id);if(o)
return o;if(typeof igmenu_getMenuById=="function")
o=igmenu_getMenuById(id);if(o)
return o;if(typeof igtree_getTreeById=="function")
o=igtree_getTreeById(id);return o;}

(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<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one)
return value;values.push(value);}}
return values;}
return(elem.value||"").replace(/\r/g,"");}
return undefined;}
if(typeof value==="number")
value+='';return this.each(function(){if(this.nodeType!=1)
return;if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type))
this.checked=(jQuery.inArray(this.value,value)>=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;i<l;i++)
callback.call(root(this[i],first),this.length>1||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<length;i++)
if((options=arguments[i])!=null)
for(var name in options){var src=target[name],copy=options[name];if(target===copy)
continue;if(deep&&copy&&typeof copy==="object"&&!copy.nodeType)
target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)
target[name]=copy;}
return target;};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)
window.jQuery=_jQuery;return jQuery;},isFunction:function(obj){return toString.call(obj)==="[object Function]";},isArray:function(obj){return toString.call(obj)==="[object Array]";},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument);},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval)
script.appendChild(document.createTextNode(data));else
script.text=data;head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object)
if(callback.apply(object[name],args)===false)
break;}else
for(;i<length;)
if(callback.apply(object[i++],args)===false)
break;}else{if(length===undefined){for(name in object)
if(callback.call(object[name],name,object[name])===false)
break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}
return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))
value=value.call(elem,i);return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))
elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)
elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-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+"></"+tag+">";});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)
div=div.lastChild;if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!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&&notxml&&!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&&notxml&&name=="style")
return jQuery.attr(elem.style,"cssText",value);if(set)
elem.setAttribute(name,""+value);var attr=!jQuery.support.hrefNormalized&&notxml&&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;i<length;i++)
if(array[i]===elem)
return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null)
if(elem.nodeType!=8)
first[pos++]=elem;}else
while((elem=second[i++])!=null)
first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}
return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)
if(!inv!=!callback(elems[i],i))
ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)
ret[ret.length]=value;}
return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,'0'])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")
ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret),name,selector);};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?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);});}});(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<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}}
return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];}
for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}
if(!set){set=context.getElementsByTagName("*");}
return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[];}
if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}}
if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}}
if(found!==undefined){if(!inplace){curLoop=result;}
expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}
break;}}}
if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr;}else{break;}}
old=expr;}
return curLoop;};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase();}
for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}
checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part;}}
if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":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<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}
if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}
return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;}
for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=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 i<match[3]-0;},gt:function(elem,i,match){return i>match[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<l;i++){if(not[i]===elem){return false;}}
return true;}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while(node=node.previousSibling){if(node.nodeType===1)return false;}
if(type=='first')return true;node=elem;case'last':while(node=node.nextSibling){if(node.nodeType===1)return false;}
return true;case'nth':var first=match[2],last=match[3];if(first==1&&last==0){return true;}
var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}}
parent.sizcache=doneName;}
var diff=elem.nodeIndex-last;if(first==0){return diff==0;}else{return(diff%first==0&&diff/first>=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<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}}
return ret;};}
var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true;}
return ret;};}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true;}
return ret;};}else if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;}
return ret;};}
(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";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="<a href='#'></a>";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="<p class='TEST'></p>";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="<div class='test e'></div><div class='test'></div>";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;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(elem.nodeName===cur){match=elem;break;}
elem=elem[dir];}
checkSet[i]=match;}}}
function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}
if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){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;i<l;i++){Sizzle(selector,root[i],tmpSet);}
return Sizzle.filter(later,tmpSet);};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0;};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||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<args.length)
jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)
fn.call(document,jQuery);else
jQuery.readyList.push(fn);return this;},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this;},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this;}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem)
elems.push({elem:elem,fn:fn});}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest");});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false)
return(stop=false);});return stop;}
function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".");}
jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery);});jQuery.readyList=null;}
jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready();},false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready();}});if(document.documentElement.doScroll&&window==window.top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}
jQuery.ready();})();}
jQuery.event.add(window,"load",jQuery.ready);}
jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,"+"change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});jQuery(window).bind('unload',function(){for(var id in jQuery.cache)
if(id!=1&&jQuery.cache[id].handle)
jQuery.event.remove(jQuery.cache[id].handle.elem);});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return;}
jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){}
root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id];}
root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee);});div.cloneNode(true).fireEvent("onclick");}
jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";if(document.body){document.body.appendChild(div);}
jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;if(document.body){document.body.removeChild(div).style.display='none';}});})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string")
return this._load(url);var off=url.indexOf(" ");if(off>=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("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/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<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName];}else{var elem=jQuery("<"+tagName+" />").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<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||"";}
return this;}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none")
jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"));}
for(var i=0,l=this.length;i<l;i++){this[i].style.display="none";}
return this;}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]();}):this.animate(genFx("toggle",3),fn,fn2);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)
return opt.complete.call(this);if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}
if(opt.overflow!=null)
this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))
e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}
if(parts[1])
end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)
this.queue([]);this.each(function(){for(var i=timers.length-1;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<timers.length;i++)
if(!timers[i]())
timers.splice(i--,1);if(!timers.length){clearInterval(timerId);timerId=undefined;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>=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='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:'absolute',top:0,left:0,margin:0,border:0,width:'1px',height:'1px',visibility:'hidden'};for(prop in rules)container.style[prop]=rules[prop];container.innerHTML=html;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");};});})();
;jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b);},hasScroll:function(el,a){if($(el).css('overflow')=='hidden'){return false;}
var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(el[scroll]>0){return true;}
el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size));},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width);},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=='role'?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)));};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""));}):removeAttr.call(this,name));};}
$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove");});return _remove.apply(this,arguments);},enableSelection:function(){return this.attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui');},disableSelection:function(){return this.attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false;});},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css('position')))||(/absolute/).test(this.css('position'))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,'position',1))&&(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}
return(/fixed/).test(this.css('position'))||!scrollParent.length?$(document):scrollParent;}});$.extend($.expr[':'],{data:function(elem,i,match){return!!$.data(elem,match[3]);},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,'tabindex');return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:'a'==nodeName||'area'==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)['area'==nodeName?'parents':'closest'](':hidden').length;},tabbable:function(element){var tabIndex=$.attr(element,'tabindex');return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(':focusable');}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}
var methods=getMethods('getter');if(args.length==1&&typeof args[0]=='string'){methods=methods.concat(getMethods('getterSetter'));}
return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}
if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args));});};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind('setData.'+name,function(event,key,value){if(event.target==element){return self._setData(key,value);}}).bind('getData.'+name,function(event,key){if(event.target==element){return self._getData(key);}}).bind('remove',function(){return self.destroy();});};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter='option';};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').removeAttr('aria-disabled');},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key);}
options={};options[key]=value;}
$.each(options,function(key,value){self._setData(key,value);});},_getData:function(key){return this.options[key];},_setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element
[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled'+' '+
this.namespace+'-state-disabled').attr("aria-disabled",value);}},enable:function(){this._setData('disabled',false);},disable:function(){this._setData('disabled',true);},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop];}}
this.element.trigger(event,data);return!($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented());}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(event){return self._mouseDown(event);}).bind('click.'+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false;}});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
this.started=false;},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return;}
(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true;}
this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true;},this.options.delay);}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true;}}
this._mouseMoveDelegate=function(event){return self._mouseMove(event);};this._mouseUpDelegate=function(event){return self._mouseUp(event);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true;},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event);}
if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));}
return!this._mouseStarted;},_mouseUp:function(event){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event);}
return false;},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(event){return this.mouseDelayMet;},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);(function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=='original'&&!(/^(?:r|a|f)/).test(this.element.css("position")))
this.element[0].style.position='relative';(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit();},destroy:function(){if(!this.element.data('draggable'))return;this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable"
+" ui-draggable-dragging"
+" ui-draggable-disabled");this._mouseDestroy();},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is('.ui-resizable-handle'))
return false;this.handle=this._getHandle(event);if(!this.handle)
return false;return true;},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager)
$.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt)
this._adjustOffsetFromHelper(o.cursorAt);if(o.containment)
this._setContainment();this._trigger("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(this,event);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true;},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();this._trigger('drag',event,ui);this.position=ui.position;}
if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+'px';if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+'px';if($.ui.ddmanager)$.ui.ddmanager.drag(this,event);return false;},_mouseStop:function(event){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour)
dropped=$.ui.ddmanager.drop(this,event);if(this.dropped){dropped=this.dropped;this.dropped=false;}
if((this.options.revert=="invalid"&&!dropped)||(this.options.revert=="valid"&&dropped)||this.options.revert===true||($.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped))){var self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._trigger("stop",event);self._clear();});}else{this._trigger("stop",event);this._clear();}
return false;},_getHandle:function(event){var handle=!this.options.handle||!$(this.options.handle,this.element).length?true:false;$(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==event.target)handle=true;});return handle;},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event])):(o.helper=='clone'?this.element.clone():this.element);if(!helper.parents('body').length)
helper.appendTo((o.appendTo=='parent'?this.element[0].parentNode:o.appendTo));if(helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(helper.css("position")))
helper.css("position","absolute");return helper;},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined)this.offset.click.left=obj.left+this.margins.left;if(obj.right!=undefined)this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;if(obj.top!=undefined)this.offset.click.top=obj.top+this.margins.top;if(obj.bottom!=undefined)this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=='absolute'&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();}
if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=='html'&&$.browser.msie))
po={top:0,left:0};return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.element.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()};}else{return{top:0,left:0};}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},_setContainment:function(){var o=this.options;if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=='document'?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!(/^(document|window|parent)$/).test(o.containment)&&o.containment.constructor!=Array){var ce=$(o.containment)[0];if(!ce)return;var co=$(o.containment).offset();var over=($(ce).css("overflow")!='hidden');this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top];}else if(o.containment.constructor==Array){this.containment=o.containment;}},_convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top
+this.offset.relative.top*mod
+this.offset.parent.top*mod
-($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left
+this.offset.relative.left*mod
+this.offset.parent.left*mod
-($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))};},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=='relative'&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset();}
var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0])pageX=this.containment[0]+this.offset.click.left;if(event.pageY-this.offset.click.top<this.containment[1])pageY=this.containment[1]+this.offset.click.top;if(event.pageX-this.offset.click.left>this.containment[2])pageX=this.containment[2]+this.offset.click.left;if(event.pageY-this.offset.click.top>this.containment[3])pageY=this.containment[3]+this.offset.click.top;}
if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}}
return{top:(pageY
-this.offset.click.top
-this.offset.relative.top
-this.offset.parent.top
+($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX
-this.offset.click.left
-this.offset.relative.left
-this.offset.parent.left
+($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))};},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval)this.helper.remove();this.helper=null;this.cancelHelperRemoval=false;},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type=="drag")this.positionAbs=this._convertPositionTo("absolute");return $.widget.prototype._trigger.call(this,type,event,ui);},plugins:{},_uiHash:function(event){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs};}}));$.extend($.ui.draggable,{version:"1.7",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui){var inst=$(this).data("draggable"),o=inst.options,uiSortable=$.extend({},ui,{item:inst.element});inst.sortables=[];$(o.connectToSortable).each(function(){var sortable=$.data(this,'sortable');if(sortable&&!sortable.options.disabled){inst.sortables.push({instance:sortable,shouldRevert:sortable.options.revert});sortable._refreshItems();sortable._trigger("activate",event,uiSortable);}});},stop:function(event,ui){var inst=$(this).data("draggable"),uiSortable=$.extend({},ui,{item:inst.element});$.each(inst.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;inst.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=='original')
this.instance.currentItem.css({top:'auto',left:'auto'});}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable);}});},drag:function(event,ui){var inst=$(this).data("draggable"),self=this;var checkPos=function(o){var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var helperTop=this.positionAbs.top,helperLeft=this.positionAbs.left;var itemHeight=o.height,itemWidth=o.width;var itemTop=o.top,itemLeft=o.left;return $.ui.isOver(helperTop+dyClick,helperLeft+dxClick,itemTop,itemLeft,itemHeight,itemWidth);};$.each(inst.sortables,function(i){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return ui.helper[0];};event.target=this.instance.currentItem[0];this.instance._mouseCapture(event,true);this.instance._mouseStart(event,true,true);this.instance.offset.click.top=inst.offset.click.top;this.instance.offset.click.left=inst.offset.click.left;this.instance.offset.parent.left-=inst.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=inst.offset.parent.top-this.instance.offset.parent.top;inst._trigger("toSortable",event);inst.dropped=this.instance.element;inst.currentItem=inst.element;this.instance.fromOutside=inst;}
if(this.instance.currentItem)this.instance._mouseDrag(event);}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger('out',event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder)this.instance.placeholder.remove();inst._trigger("fromSortable",event);inst.dropped=false;}};});}});$.ui.plugin.add("draggable","cursor",{start:function(event,ui){var t=$('body'),o=$(this).data('draggable').options;if(t.css("cursor"))o._cursor=t.css("cursor");t.css("cursor",o.cursor);},stop:function(event,ui){var o=$(this).data('draggable').options;if(o._cursor)$('body').css("cursor",o._cursor);}});$.ui.plugin.add("draggable","iframeFix",{start:function(event,ui){var o=$(this).data('draggable').options;$(o.iframeFix===true?"iframe":o.iframeFix).each(function(){$('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css($(this).offset()).appendTo("body");});},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this);});}});$.ui.plugin.add("draggable","opacity",{start:function(event,ui){var t=$(ui.helper),o=$(this).data('draggable').options;if(t.css("opacity"))o._opacity=t.css("opacity");t.css('opacity',o.opacity);},stop:function(event,ui){var o=$(this).data('draggable').options;if(o._opacity)$(ui.helper).css('opacity',o._opacity);}});$.ui.plugin.add("draggable","scroll",{start:function(event,ui){var i=$(this).data("draggable");if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!='HTML')i.overflowOffset=i.scrollParent.offset();},drag:function(event,ui){var i=$(this).data("draggable"),o=i.options,scrolled=false;if(i.scrollParent[0]!=document&&i.scrollParent[0].tagName!='HTML'){if(!o.axis||o.axis!='x'){if((i.overflowOffset.top+i.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity)
i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop+o.scrollSpeed;else if(event.pageY-i.overflowOffset.top<o.scrollSensitivity)
i.scrollParent[0].scrollTop=scrolled=i.scrollParent[0].scrollTop-o.scrollSpeed;}
if(!o.axis||o.axis!='y'){if((i.overflowOffset.left+i.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity)
i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft+o.scrollSpeed;else if(event.pageX-i.overflowOffset.left<o.scrollSensitivity)
i.scrollParent[0].scrollLeft=scrolled=i.scrollParent[0].scrollLeft-o.scrollSpeed;}}else{if(!o.axis||o.axis!='x'){if(event.pageY-$(document).scrollTop()<o.scrollSensitivity)
scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);else if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity)
scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);}
if(!o.axis||o.axis!='y'){if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity)
scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);else if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity)
scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}}
if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(i,event);}});$.ui.plugin.add("draggable","snap",{start:function(event,ui){var i=$(this).data("draggable"),o=i.options;i.snapElements=[];$(o.snap.constructor!=String?(o.snap.items||':data(draggable)'):o.snap).each(function(){var $t=$(this);var $o=$t.offset();if(this!=i.element[0])i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left});});},drag:function(event,ui){var inst=$(this).data("draggable"),o=inst.options;var d=o.snapTolerance;var x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(var i=inst.snapElements.length-1;i>=0;i--){var l=inst.snapElements[i].left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top,b=t+inst.snapElements[i].height;if(!((l-d<x1&&x1<r+d&&t-d<y1&&y1<b+d)||(l-d<x1&&x1<r+d&&t-d<y2&&y2<b+d)||(l-d<x2&&x2<r+d&&t-d<y1&&y1<b+d)||(l-d<x2&&x2<r+d&&t-d<y2&&y2<b+d))){if(inst.snapElements[i].snapping)(inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));inst.snapElements[i].snapping=false;continue;}
if(o.snapMode!='inner'){var ts=Math.abs(t-y2)<=d;var bs=Math.abs(b-y1)<=d;var ls=Math.abs(l-x2)<=d;var rs=Math.abs(r-x1)<=d;if(ts)ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top-inst.margins.top;if(bs)ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top-inst.margins.top;if(ls)ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left-inst.margins.left;if(rs)ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left-inst.margins.left;}
var first=(ts||bs||ls||rs);if(o.snapMode!='outer'){var ts=Math.abs(t-y1)<=d;var bs=Math.abs(b-y2)<=d;var ls=Math.abs(l-x1)<=d;var rs=Math.abs(r-x2)<=d;if(ts)ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top-inst.margins.top;if(bs)ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top-inst.margins.top;if(ls)ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left-inst.margins.left;if(rs)ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left-inst.margins.left;}
if(!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first))
(inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})));inst.snapElements[i].snapping=(ts||bs||ls||rs||first);};}});$.ui.plugin.add("draggable","stack",{start:function(event,ui){var o=$(this).data("draggable").options;var group=$.makeArray($(o.stack.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||o.stack.min)-(parseInt($(b).css("zIndex"),10)||o.stack.min);});$(group).each(function(i){this.style.zIndex=o.stack.min+i;});this[0].style.zIndex=o.stack.min+group.length;}});$.ui.plugin.add("draggable","zIndex",{start:function(event,ui){var t=$(ui.helper),o=$(this).data("draggable").options;if(t.css("zIndex"))o._zIndex=t.css("zIndex");t.css('zIndex',o.zIndex);},stop:function(event,ui){var o=$(this).data("draggable").options;if(o._zIndex)$(ui.helper).css('zIndex',o._zIndex);}});})(jQuery);(function($){$.widget("ui.droppable",{_init:function(){var o=this.options,accept=o.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&$.isFunction(this.options.accept)?this.options.accept:function(d){return d.is(accept);};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};$.ui.ddmanager.droppables[this.options.scope]=$.ui.ddmanager.droppables[this.options.scope]||[];$.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"));},destroy:function(){var drop=$.ui.ddmanager.droppables[this.options.scope];for(var i=0;i<drop.length;i++)
if(drop[i]==this)
drop.splice(i,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");},_setData:function(key,value){if(key=='accept'){this.options.accept=value&&$.isFunction(value)?value:function(d){return d.is(accept);};}else{$.widget.prototype._setData.apply(this,arguments);}},_activate:function(event){var draggable=$.ui.ddmanager.current;if(this.options.activeClass)this.element.addClass(this.options.activeClass);(draggable&&this._trigger('activate',event,this.ui(draggable)));},_deactivate:function(event){var draggable=$.ui.ddmanager.current;if(this.options.activeClass)this.element.removeClass(this.options.activeClass);(draggable&&this._trigger('deactivate',event,this.ui(draggable)));},_over:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0])return;if(this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.hoverClass)this.element.addClass(this.options.hoverClass);this._trigger('over',event,this.ui(draggable));}},_out:function(event){var draggable=$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0])return;if(this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.hoverClass)this.element.removeClass(this.options.hoverClass);this._trigger('out',event,this.ui(draggable));}},_drop:function(event,custom){var draggable=custom||$.ui.ddmanager.current;if(!draggable||(draggable.currentItem||draggable.element)[0]==this.element[0])return false;var childrenIntersection=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var inst=$.data(this,'droppable');if(inst.options.greedy&&$.ui.intersect(draggable,$.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance)){childrenIntersection=true;return false;}});if(childrenIntersection)return false;if(this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){if(this.options.activeClass)this.element.removeClass(this.options.activeClass);if(this.options.hoverClass)this.element.removeClass(this.options.hoverClass);this._trigger('drop',event,this.ui(draggable));return this.element;}
return false;},ui:function(c){return{draggable:(c.currentItem||c.element),helper:c.helper,position:c.position,absolutePosition:c.positionAbs,offset:c.positionAbs};}});$.extend($.ui.droppable,{version:"1.7",eventPrefix:'drop',defaults:{accept:'*',activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:'default',tolerance:'intersect'}});$.ui.intersect=function(draggable,droppable,toleranceMode){if(!droppable.offset)return false;var x1=(draggable.positionAbs||draggable.position.absolute).left,x2=x1+draggable.helperProportions.width,y1=(draggable.positionAbs||draggable.position.absolute).top,y2=y1+draggable.helperProportions.height;var l=droppable.offset.left,r=l+droppable.proportions.width,t=droppable.offset.top,b=t+droppable.proportions.height;switch(toleranceMode){case'fit':return(l<x1&&x2<r&&t<y1&&y2<b);break;case'intersect':return(l<x1+(draggable.helperProportions.width/2)&&x2-(draggable.helperProportions.width/2)<r&&t<y1+(draggable.helperProportions.height/2)&&y2-(draggable.helperProportions.height/2)<b);break;case'pointer':var draggableLeft=((draggable.positionAbs||draggable.position.absolute).left+(draggable.clickOffset||draggable.offset.click).left),draggableTop=((draggable.positionAbs||draggable.position.absolute).top+(draggable.clickOffset||draggable.offset.click).top),isOver=$.ui.isOver(draggableTop,draggableLeft,t,l,droppable.proportions.height,droppable.proportions.width);return isOver;break;case'touch':return((y1>=t&&y1<=b)||(y2>=t&&y2<=b)||(y1<t&&y2>b))&&((x1>=l&&x1<=r)||(x2>=l&&x2<=r)||(x1<l&&x2>r));break;default:return false;break;}};$.ui.ddmanager={current:null,droppables:{'default':[]},prepareOffsets:function(t,event){var m=$.ui.ddmanager.droppables[t.options.scope];var type=event?event.type:null;var list=(t.currentItem||t.element).find(":data(droppable)").andSelf();droppablesLoop:for(var i=0;i<m.length;i++){if(m[i].options.disabled||(t&&!m[i].options.accept.call(m[i].element[0],(t.currentItem||t.element))))continue;for(var j=0;j<list.length;j++){if(list[j]==m[i].element[0]){m[i].proportions.height=0;continue droppablesLoop;}};m[i].visible=m[i].element.css("display")!="none";if(!m[i].visible)continue;m[i].offset=m[i].element.offset();m[i].proportions={width:m[i].element[0].offsetWidth,height:m[i].element[0].offsetHeight};if(type=="mousedown")m[i]._activate.call(m[i],event);}},drop:function(draggable,event){var dropped=false;$.each($.ui.ddmanager.droppables[draggable.options.scope],function(){if(!this.options)return;if(!this.options.disabled&&this.visible&&$.ui.intersect(draggable,this,this.options.tolerance))
dropped=this._drop.call(this,event);if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){this.isout=1;this.isover=0;this._deactivate.call(this,event);}});return dropped;},drag:function(draggable,event){if(draggable.options.refreshPositions)$.ui.ddmanager.prepareOffsets(draggable,event);$.each($.ui.ddmanager.droppables[draggable.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible)return;var intersects=$.ui.intersect(draggable,this,this.options.tolerance);var c=!intersects&&this.isover==1?'isout':(intersects&&this.isover==0?'isover':null);if(!c)return;var parentInstance;if(this.options.greedy){var parent=this.element.parents(':data(droppable):eq(0)');if(parent.length){parentInstance=$.data(parent[0],'droppable');parentInstance.greedyChild=(c=='isover'?1:0);}}
if(parentInstance&&c=='isover'){parentInstance['isover']=0;parentInstance['isout']=1;parentInstance._out.call(parentInstance,event);}
this[c]=1;this[c=='isout'?'isover':'isout']=0;this[c=="isover"?"_over":"_out"].call(this,event);if(parentInstance&&c=='isout'){parentInstance['isout']=0;parentInstance['isover']=1;parentInstance._over.call(parentInstance,event);}});}};})(jQuery);(function($){$.widget("ui.resizable",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this.element.addClass("ui-resizable");$.extend(this,{_aspectRatio:!!(o.aspectRatio),aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||'ui-resizable-helper':null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css('position'))&&$.browser.opera)
this.element.css({position:'relative',top:'auto',left:'auto'});this.element.wrap($('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css('position'),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css('top'),left:this.element.css('left')}));this.element=this.element.parent().data("resizable",this.element.data('resizable'));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css('resize');this.originalElement.css('resize','none');this._proportionallyResizeElements.push(this.originalElement.css({position:'static',zoom:1,display:'block'}));this.originalElement.css({margin:this.originalElement.css('margin')});this._proportionallyResize();}
this.handles=o.handles||(!$('.ui-resizable-handle',this.element).length?"e,s,se":{n:'.ui-resizable-n',e:'.ui-resizable-e',s:'.ui-resizable-s',w:'.ui-resizable-w',se:'.ui-resizable-se',sw:'.ui-resizable-sw',ne:'.ui-resizable-ne',nw:'.ui-resizable-nw'});if(this.handles.constructor==String){if(this.handles=='all')this.handles='n,e,s,w,se,sw,ne,nw';var n=this.handles.split(",");this.handles={};for(var i=0;i<n.length;i++){var handle=$.trim(n[i]),hname='ui-resizable-'+handle;var axis=$('<div class="ui-resizable-handle '+hname+'"></div>');if(/sw|se|ne|nw/.test(handle))axis.css({zIndex:++o.zIndex});if('se'==handle){axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');};this.handles[handle]='.ui-resizable-'+handle;this.element.append(axis);}}
this._renderAxis=function(target){target=target||this.element;for(var i in this.handles){if(this.handles[i].constructor==String)
this.handles[i]=$(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var axis=$(this.handles[i],this.element),padWrapper=0;padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth();var padPos=['padding',/ne|nw|n/.test(i)?'Top':/se|sw|s/.test(i)?'Bottom':/^e$/.test(i)?'Right':'Left'].join("");target.css(padPos,padWrapper);this._proportionallyResize();}
if(!$(this.handles[i]).length)
continue;}};this._renderAxis(this.element);this._handles=$('.ui-resizable-handle',this.element).disableSelection();this._handles.mouseover(function(){if(!self.resizing){if(this.className)
var axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);self.axis=axis&&axis[1]?axis[1]:'se';}});if(o.autoHide){this._handles.hide();$(this.element).addClass("ui-resizable-autohide").hover(function(){$(this).removeClass("ui-resizable-autohide");self._handles.show();},function(){if(!self.resizing){$(this).addClass("ui-resizable-autohide");self._handles.hide();}});}
this._mouseInit();},destroy:function(){this._mouseDestroy();var _destroy=function(exp){$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();};if(this.elementIsWrapper){_destroy(this.element);var wrapper=this.element;wrapper.parent().append(this.originalElement.css({position:wrapper.css('position'),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css('top'),left:wrapper.css('left')})).end().remove();}
this.originalElement.css('resize',this.originalResizeStyle);_destroy(this.originalElement);},_mouseCapture:function(event){var handle=false;for(var i in this.handles){if($(this.handles[i])[0]==event.target)handle=true;}
return this.options.disabled||!!handle;},_mouseStart:function(event){var o=this.options,iniPos=this.element.position(),el=this.element;this.resizing=true;this.documentScroll={top:$(document).scrollTop(),left:$(document).scrollLeft()};if(el.is('.ui-draggable')||(/absolute/).test(el.css('position'))){el.css({position:'absolute',top:iniPos.top,left:iniPos.left});}
if($.browser.opera&&(/relative/).test(el.css('position')))
el.css({position:'relative',top:'auto',left:'auto'});this._renderProxy();var curleft=num(this.helper.css('left')),curtop=num(this.helper.css('top'));if(o.containment){curleft+=$(o.containment).scrollLeft()||0;curtop+=$(o.containment).scrollTop()||0;}
this.offset=this.helper.offset();this.position={left:curleft,top:curtop};this.size=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalPosition={left:curleft,top:curtop};this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()};this.originalMousePosition={left:event.pageX,top:event.pageY};this.aspectRatio=(typeof o.aspectRatio=='number')?o.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var cursor=$('.ui-resizable-'+this.axis).css('cursor');$('body').css('cursor',cursor=='auto'?this.axis+'-resize':cursor);el.addClass("ui-resizable-resizing");this._propagate("start",event);return true;},_mouseDrag:function(event){var el=this.helper,o=this.options,props={},self=this,smp=this.originalMousePosition,a=this.axis;var dx=(event.pageX-smp.left)||0,dy=(event.pageY-smp.top)||0;var trigger=this._change[a];if(!trigger)return false;var data=trigger.apply(this,[event,dx,dy]),ie6=$.browser.msie&&$.browser.version<7,csdif=this.sizeDiff;if(this._aspectRatio||event.shiftKey)
data=this._updateRatio(data,event);data=this._respectSize(data,event);this._propagate("resize",event);el.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length)
this._proportionallyResize();this._updateCache(data);this._trigger('resize',event,this.ui());return false;},_mouseStop:function(event){this.resizing=false;var o=this.options,self=this;if(this._helper){var pr=this._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&$.ui.hasScroll(pr[0],'left')?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var s={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css('left'),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css('top'),10)+(self.position.top-self.originalPosition.top))||null;if(!o.animate)
this.element.css($.extend(s,{top:top,left:left}));self.helper.height(self.size.height);self.helper.width(self.size.width);if(this._helper&&!o.animate)this._proportionallyResize();}
$('body').css('cursor','auto');this.element.removeClass("ui-resizable-resizing");this._propagate("stop",event);if(this._helper)this.helper.remove();return false;},_updateCache:function(data){var o=this.options;this.offset=this.helper.offset();if(isNumber(data.left))this.position.left=data.left;if(isNumber(data.top))this.position.top=data.top;if(isNumber(data.height))this.size.height=data.height;if(isNumber(data.width))this.size.width=data.width;},_updateRatio:function(data,event){var o=this.options,cpos=this.position,csize=this.size,a=this.axis;if(data.height)data.width=(csize.height*this.aspectRatio);else if(data.width)data.height=(csize.width/this.aspectRatio);if(a=='sw'){data.left=cpos.left+(csize.width-data.width);data.top=null;}
if(a=='nw'){data.top=cpos.top+(csize.height-data.height);data.left=cpos.left+(csize.width-data.width);}
return data;},_respectSize:function(data,event){var el=this.helper,o=this.options,pRatio=this._aspectRatio||event.shiftKey,a=this.axis,ismaxw=isNumber(data.width)&&o.maxWidth&&(o.maxWidth<data.width),ismaxh=isNumber(data.height)&&o.maxHeight&&(o.maxHeight<data.height),isminw=isNumber(data.width)&&o.minWidth&&(o.minWidth>data.width),isminh=isNumber(data.height)&&o.minHeight&&(o.minHeight>data.height);if(isminw)data.width=o.minWidth;if(isminh)data.height=o.minHeight;if(ismaxw)data.width=o.maxWidth;if(ismaxh)data.height=o.maxHeight;var dw=this.originalPosition.left+this.originalSize.width,dh=this.position.top+this.size.height;var cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);if(isminw&&cw)data.left=dw-o.minWidth;if(ismaxw&&cw)data.left=dw-o.maxWidth;if(isminh&&ch)data.top=dh-o.minHeight;if(ismaxh&&ch)data.top=dh-o.maxHeight;var isNotwh=!data.width&&!data.height;if(isNotwh&&!data.left&&data.top)data.top=null;else if(isNotwh&&!data.top&&data.left)data.left=null;return data;},_proportionallyResize:function(){var o=this.options;if(!this._proportionallyResizeElements.length)return;var element=this.helper||this.element;for(var i=0;i<this._proportionallyResizeElements.length;i++){var prel=this._proportionallyResizeElements[i];if(!this.borderDif){var b=[prel.css('borderTopWidth'),prel.css('borderRightWidth'),prel.css('borderBottomWidth'),prel.css('borderLeftWidth')],p=[prel.css('paddingTop'),prel.css('paddingRight'),prel.css('paddingBottom'),prel.css('paddingLeft')];this.borderDif=$.map(b,function(v,i){var border=parseInt(v,10)||0,padding=parseInt(p[i],10)||0;return border+padding;});}
if($.browser.msie&&!(!($(element).is(':hidden')||$(element).parents(':hidden').length)))
continue;prel.css({height:(element.height()-this.borderDif[0]-this.borderDif[2])||0,width:(element.width()-this.borderDif[1]-this.borderDif[3])||0});};},_renderProxy:function(){var el=this.element,o=this.options;this.elementOffset=el.offset();if(this._helper){this.helper=this.helper||$('<div style="overflow:hidden;"></div>');var ie6=$.browser.msie&&$.browser.version<7,ie6offset=(ie6?1:0),pxyoffset=(ie6?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+pxyoffset,height:this.element.outerHeight()+pxyoffset,position:'absolute',left:this.elementOffset.left-ie6offset+'px',top:this.elementOffset.top-ie6offset+'px',zIndex:++o.zIndex});this.helper.appendTo("body").disableSelection();}else{this.helper=this.element;}},_change:{e:function(event,dx,dy){return{width:this.originalSize.width+dx};},w:function(event,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx};},n:function(event,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy};},s:function(event,dx,dy){return{height:this.originalSize.height+dy};},se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]));},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]));},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]));},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]));}},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this.ui()]);(n!="resize"&&this._trigger(n,event,this.ui()));},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition};}}));$.extend($.ui.resizable,{version:"1.7",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});$.ui.plugin.add("resizable","alsoResize",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options;_store=function(exp){$(exp).each(function(){$(this).data("resizable-alsoresize",{width:parseInt($(this).width(),10),height:parseInt($(this).height(),10),left:parseInt($(this).css('left'),10),top:parseInt($(this).css('top'),10)});});};if(typeof(o.alsoResize)=='object'&&!o.alsoResize.parentNode){if(o.alsoResize.length){o.alsoResize=o.alsoResize[0];_store(o.alsoResize);}
else{$.each(o.alsoResize,function(exp,c){_store(exp);});}}else{_store(o.alsoResize);}},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,os=self.originalSize,op=self.originalPosition;var delta={height:(self.size.height-os.height)||0,width:(self.size.width-os.width)||0,top:(self.position.top-op.top)||0,left:(self.position.left-op.left)||0},_alsoResize=function(exp,c){$(exp).each(function(){var el=$(this),start=$(this).data("resizable-alsoresize"),style={},css=c&&c.length?c:['width','height','top','left'];$.each(css||['width','height','top','left'],function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0)
style[prop]=sum||null;});if(/relative/.test(el.css('position'))&&$.browser.opera){self._revertToRelativePosition=true;el.css({position:'absolute',top:'auto',left:'auto'});}
el.css(style);});};if(typeof(o.alsoResize)=='object'&&!o.alsoResize.nodeType){$.each(o.alsoResize,function(exp,c){_alsoResize(exp,c);});}else{_alsoResize(o.alsoResize);}},stop:function(event,ui){var self=$(this).data("resizable");if(self._revertToRelativePosition&&$.browser.opera){self._revertToRelativePosition=false;el.css({position:'relative'});}
$(this).removeData("resizable-alsoresize-start");}});$.ui.plugin.add("resizable","animate",{stop:function(event,ui){var self=$(this).data("resizable"),o=self.options;var pr=self._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&$.ui.hasScroll(pr[0],'left')?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var style={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css('left'),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css('top'),10)+(self.position.top-self.originalPosition.top))||null;self.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseInt(self.element.css('width'),10),height:parseInt(self.element.css('height'),10),top:parseInt(self.element.css('top'),10),left:parseInt(self.element.css('left'),10)};if(pr&&pr.length)$(pr[0]).css({width:data.width,height:data.height});self._updateCache(data);self._propagate("resize",event);}});}});$.ui.plugin.add("resizable","containment",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options,el=self.element;var oc=o.containment,ce=(oc instanceof $)?oc.get(0):(/parent/.test(oc))?el.parent().get(0):oc;if(!ce)return;self.containerElement=$(ce);if(/document/.test(oc)||oc==document){self.containerOffset={left:0,top:0};self.containerPosition={left:0,top:0};self.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight};}
else{var element=$(ce),p=[];$(["Top","Right","Left","Bottom"]).each(function(i,name){p[i]=num(element.css("padding"+name));});self.containerOffset=element.offset();self.containerPosition=element.position();self.containerSize={height:(element.innerHeight()-p[3]),width:(element.innerWidth()-p[1])};var co=self.containerOffset,ch=self.containerSize.height,cw=self.containerSize.width,width=($.ui.hasScroll(ce,"left")?ce.scrollWidth:cw),height=($.ui.hasScroll(ce)?ce.scrollHeight:ch);self.parentData={element:ce,left:co.left,top:co.top,width:width,height:height};}},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,ps=self.containerSize,co=self.containerOffset,cs=self.size,cp=self.position,pRatio=o._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=self.containerElement;if(ce[0]!=document&&(/static/).test(ce.css('position')))cop=co;if(cp.left<(self._helper?co.left:0)){self.size.width=self.size.width+(self._helper?(self.position.left-co.left):(self.position.left-cop.left));if(pRatio)self.size.height=self.size.width/o.aspectRatio;self.position.left=o.helper?co.left:0;}
if(cp.top<(self._helper?co.top:0)){self.size.height=self.size.height+(self._helper?(self.position.top-co.top):self.position.top);if(pRatio)self.size.width=self.size.height*o.aspectRatio;self.position.top=self._helper?co.top:0;}
self.offset.left=self.parentData.left+self.position.left;self.offset.top=self.parentData.top+self.position.top;var woset=Math.abs((self._helper?self.offset.left-cop.left:(self.offset.left-cop.left))+self.sizeDiff.width),hoset=Math.abs((self._helper?self.offset.top-cop.top:(self.offset.top-co.top))+self.sizeDiff.height);var isParent=self.containerElement.get(0)==self.element.parent().get(0),isOffsetRelative=/relative|absolute/.test(self.containerElement.css('position'));if(isParent&&isOffsetRelative)woset-=self.parentData.left;if(woset+self.size.width>=self.parentData.width){self.size.width=self.parentData.width-woset;if(pRatio)self.size.height=self.size.width/o.aspectRatio;}
if(hoset+self.size.height>=self.parentData.height){self.size.height=self.parentData.height-hoset;if(pRatio)self.size.width=self.size.height*o.aspectRatio;}},stop:function(event,ui){var self=$(this).data("resizable"),o=self.options,cp=self.position,co=self.containerOffset,cop=self.containerPosition,ce=self.containerElement;var helper=$(self.helper),ho=helper.offset(),w=helper.outerWidth()-self.sizeDiff.width,h=helper.outerHeight()-self.sizeDiff.height;if(self._helper&&!o.animate&&(/relative/).test(ce.css('position')))
$(this).css({left:ho.left-cop.left-co.left,width:w,height:h});if(self._helper&&!o.animate&&(/static/).test(ce.css('position')))
$(this).css({left:ho.left-cop.left-co.left,width:w,height:h});}});$.ui.plugin.add("resizable","ghost",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options,cs=self.size;self.ghost=self.originalElement.clone();self.ghost.css({opacity:.25,display:'block',position:'relative',height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass('ui-resizable-ghost').addClass(typeof o.ghost=='string'?o.ghost:'');self.ghost.appendTo(self.helper);},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options;if(self.ghost)self.ghost.css({position:'relative',height:self.size.height,width:self.size.width});},stop:function(event,ui){var self=$(this).data("resizable"),o=self.options;if(self.ghost&&self.helper)self.helper.get(0).removeChild(self.ghost.get(0));}});$.ui.plugin.add("resizable","grid",{resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,cs=self.size,os=self.originalSize,op=self.originalPosition,a=self.axis,ratio=o._aspectRatio||event.shiftKey;o.grid=typeof o.grid=="number"?[o.grid,o.grid]:o.grid;var ox=Math.round((cs.width-os.width)/(o.grid[0]||1))*(o.grid[0]||1),oy=Math.round((cs.height-os.height)/(o.grid[1]||1))*(o.grid[1]||1);if(/^(se|s|e)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;}
else if(/^(ne)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy;}
else if(/^(sw)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.left=op.left-ox;}
else{self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy;self.position.left=op.left-ox;}}});var num=function(v){return parseInt(v,10)||0;};var isNumber=function(value){return!isNaN(parseInt(value,10));};})(jQuery);(function($){$.widget("ui.selectable",$.extend({},$.ui.mouse,{_init:function(){var self=this;this.element.addClass("ui-selectable");this.dragged=false;var selectees;this.refresh=function(){selectees=$(self.options.filter,self.element[0]);selectees.each(function(){var $this=$(this);var pos=$this.offset();$.data(this,"selectable-item",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:false,selected:$this.hasClass('ui-selected'),selecting:$this.hasClass('ui-selecting'),unselecting:$this.hasClass('ui-unselecting')});});};this.refresh();this.selectees=selectees.addClass("ui-selectee");this._mouseInit();this.helper=$(document.createElement('div')).css({border:'1px dotted black'}).addClass("ui-selectable-helper");},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();},_mouseStart:function(event){var self=this;this.opos=[event.pageX,event.pageY];if(this.options.disabled)
return;var options=this.options;this.selectees=$(options.filter,this.element[0]);this._trigger("start",event);$('body').append(this.helper);this.helper.css({"z-index":100,"position":"absolute","left":event.clientX,"top":event.clientY,"width":0,"height":0});if(options.autoRefresh){this.refresh();}
this.selectees.filter('.ui-selected').each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected=true;if(!event.metaKey){selectee.$element.removeClass('ui-selected');selectee.selected=false;selectee.$element.addClass('ui-unselecting');selectee.unselecting=true;self._trigger("unselecting",event,{unselecting:selectee.element});}});$(event.target).parents().andSelf().each(function(){var selectee=$.data(this,"selectable-item");if(selectee){selectee.$element.removeClass("ui-unselecting").addClass('ui-selecting');selectee.unselecting=false;selectee.selecting=true;selectee.selected=true;self._trigger("selecting",event,{selecting:selectee.element});return false;}});},_mouseDrag:function(event){var self=this;this.dragged=true;if(this.options.disabled)
return;var options=this.options;var x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;if(x1>x2){var tmp=x2;x2=x1;x1=tmp;}
if(y1>y2){var tmp=y2;y2=y1;y1=tmp;}
this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});this.selectees.each(function(){var selectee=$.data(this,"selectable-item");if(!selectee||selectee.element==self.element[0])
return;var hit=false;if(options.tolerance=='touch'){hit=(!(selectee.left>x2||selectee.right<x1||selectee.top>y2||selectee.bottom<y1));}else if(options.tolerance=='fit'){hit=(selectee.left>x1&&selectee.right<x2&&selectee.top>y1&&selectee.bottom<y2);}
if(hit){if(selectee.selected){selectee.$element.removeClass('ui-selected');selectee.selected=false;}
if(selectee.unselecting){selectee.$element.removeClass('ui-unselecting');selectee.unselecting=false;}
if(!selectee.selecting){selectee.$element.addClass('ui-selecting');selectee.selecting=true;self._trigger("selecting",event,{selecting:selectee.element});}}else{if(selectee.selecting){if(event.metaKey&&selectee.startselected){selectee.$element.removeClass('ui-selecting');selectee.selecting=false;selectee.$element.addClass('ui-selected');selectee.selected=true;}else{selectee.$element.removeClass('ui-selecting');selectee.selecting=false;if(selectee.startselected){selectee.$element.addClass('ui-unselecting');selectee.unselecting=true;}
self._trigger("unselecting",event,{unselecting:selectee.element});}}
if(selectee.selected){if(!event.metaKey&&!selectee.startselected){selectee.$element.removeClass('ui-selected');selectee.selected=false;selectee.$element.addClass('ui-unselecting');selectee.unselecting=true;self._trigger("unselecting",event,{unselecting:selectee.element});}}}});return false;},_mouseStop:function(event){var self=this;this.dragged=false;var options=this.options;$('.ui-unselecting',this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass('ui-unselecting');selectee.unselecting=false;selectee.startselected=false;self._trigger("unselected",event,{unselected:selectee.element});});$('.ui-selecting',this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass('ui-selecting').addClass('ui-selected');selectee.selecting=false;selectee.selected=true;selectee.startselected=true;self._trigger("selected",event,{selected:selectee.element});});this._trigger("stop",event);this.helper.remove();return false;}}));$.extend($.ui.selectable,{version:"1.7",defaults:{appendTo:'body',autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:'*',tolerance:'touch'}});})(jQuery);(function($){$.widget("ui.sortable",$.extend({},$.ui.mouse,{_init:function(){var o=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css('float')):false;this.offset=this.element.offset();this._mouseInit();},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--)
this.items[i].item.removeData("sortable-item");},_mouseCapture:function(event,overrideHandle){if(this.reverting){return false;}
if(this.options.disabled||this.options.type=='static')return false;this._refreshItems(event);var currentItem=null,self=this,nodes=$(event.target).parents().each(function(){if($.data(this,'sortable-item')==self){currentItem=$(this);return false;}});if($.data(event.target,'sortable-item')==self)currentItem=$(event.target);if(!currentItem)return false;if(this.options.handle&&!overrideHandle){var validHandle=false;$(this.options.handle,currentItem).find("*").andSelf().each(function(){if(this==event.target)validHandle=true;});if(!validHandle)return false;}
this.currentItem=currentItem;this._removeCurrentsFromItems();return true;},_mouseStart:function(event,overrideHandle,noActivation){var o=this.options,self=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt)
this._adjustOffsetFromHelper(o.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide();}
this._createPlaceholder();if(o.containment)
this._setContainment();if(o.cursor){if($('body').css("cursor"))this._storedCursor=$('body').css("cursor");$('body').css("cursor",o.cursor);}
if(o.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",o.opacity);}
if(o.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",o.zIndex);}
if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!='HTML')
this.overflowOffset=this.scrollParent.offset();this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions)
this._cacheHelperProportions();if(!noActivation){for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("activate",event,self._uiHash(this));}}
if($.ui.ddmanager)
$.ui.ddmanager.current=this;if($.ui.ddmanager&&!o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(this,event);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(event);return true;},_mouseDrag:function(event){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs;}
if(this.options.scroll){var o=this.options,scrolled=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!='HTML'){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity)
this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed;else if(event.pageY-this.overflowOffset.top<o.scrollSensitivity)
this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed;if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity)
this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed;else if(event.pageX-this.overflowOffset.left<o.scrollSensitivity)
this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed;}else{if(event.pageY-$(document).scrollTop()<o.scrollSensitivity)
scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);else if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity)
scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity)
scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);else if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity)
scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}
if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(this,event);}
this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+'px';if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+'px';for(var i=this.items.length-1;i>=0;i--){var item=this.items[i],itemElement=item.item[0],intersection=this._intersectsWithPointer(item);if(!intersection)continue;if(itemElement!=this.currentItem[0]&&this.placeholder[intersection==1?"next":"prev"]()[0]!=itemElement&&!$.ui.contains(this.placeholder[0],itemElement)&&(this.options.type=='semi-dynamic'?!$.ui.contains(this.element[0],itemElement):true)){this.direction=intersection==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item);}else{break;}
this._trigger("change",event,this._uiHash());break;}}
this._contactContainers(event);if($.ui.ddmanager)$.ui.ddmanager.drag(this,event);this._trigger('sort',event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false;},_mouseStop:function(event,noPropagation){if(!event)return;if($.ui.ddmanager&&!this.options.dropBehaviour)
$.ui.ddmanager.drop(this,event);if(this.options.revert){var self=this;var cur=self.placeholder.offset();self.reverting=true;$(this.helper).animate({left:cur.left-this.offset.parent.left-self.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:cur.top-this.offset.parent.top-self.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){self._clear(event);});}else{this._clear(event,noPropagation);}
return false;},cancel:function(){var self=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original")
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");else
this.currentItem.show();for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,self._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",null,self._uiHash(this));this.containers[i].containerCache.over=0;}}}
if(this.placeholder[0].parentNode)this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode)this.helper.remove();$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$(this.domPosition.prev).after(this.currentItem);}else{$(this.domPosition.parent).prepend(this.currentItem);}
return true;},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||'id')||'').match(o.expression||(/(.+)[-=_](.+)/));if(res)str.push((o.key||res[1]+'[]')+'='+(o.key&&o.expression?res[1]:res[2]));});return str.join('&');},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute||'id')||'');});return ret;},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var isOverElement=(y1+dyClick)>t&&(y1+dyClick)<b&&(x1+dxClick)>l&&(x1+dxClick)<r;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?'width':'height']>item[this.floating?'width':'height'])){return isOverElement;}else{return(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b);}},_intersectsWithPointer:function(item){var isOverElementHeight=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width),isOverElement=isOverElementHeight&&isOverElementWidth,verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(!isOverElement)
return false;return this.floating?(((horizontalDirection&&horizontalDirection=="right")||verticalDirection=="down")?2:1):(verticalDirection&&(verticalDirection=="down"?2:1));},_intersectsWithSides:function(item){var isOverBottomHalf=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+(item.height/2),item.height),isOverRightHalf=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+(item.width/2),item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return((horizontalDirection=="right"&&isOverRightHalf)||(horizontalDirection=="left"&&!isOverRightHalf));}else{return verticalDirection&&((verticalDirection=="down"&&isOverBottomHalf)||(verticalDirection=="up"&&!isOverBottomHalf));}},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return delta!=0&&(delta>0?"down":"up");},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!=0&&(delta>0?"right":"left");},refresh:function(event){this._refreshItems(event);this.refreshPositions();},_connectWith:function(){var options=this.options;return options.connectWith.constructor==String?[options.connectWith]:options.connectWith;},_getItemsAsjQuery:function(connected){var self=this;var items=[];var queries=[];var connectWith=this._connectWith();if(connectWith&&connected){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],'sortable');if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper"),inst]);}};};}
queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var i=queries.length-1;i>=0;i--){queries[i][0].each(function(){items.push(this);});};return $(items);},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data(sortable-item)");for(var i=0;i<this.items.length;i++){for(var j=0;j<list.length;j++){if(list[j]==this.items[i].item[0])
this.items.splice(i,1);};};},_refreshItems:function(event){this.items=[];this.containers=[this];var items=this.items;var self=this;var queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]];var connectWith=this._connectWith();if(connectWith){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],'sortable');if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst);}};};}
for(var i=queries.length-1;i>=0;i--){var targetData=queries[i][1];var _queries=queries[i][0];for(var j=0,queriesLength=_queries.length;j<queriesLength;j++){var item=$(_queries[j]);item.data('sortable-item',targetData);items.push({item:item,instance:targetData,width:0,height:0,left:0,top:0});};};},refreshPositions:function(fast){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset();}
for(var i=this.items.length-1;i>=0;i--){var item=this.items[i];if(item.instance!=this.currentContainer&&this.currentContainer&&item.item[0]!=this.currentItem[0])
continue;var t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight();}
var p=t.offset();item.left=p.left;item.top=p.top;};if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this);}else{for(var i=this.containers.length-1;i>=0;i--){var p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight();};}},_createPlaceholder:function(that){var self=that||this,o=self.options;if(!o.placeholder||o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){var el=$(document.createElement(self.currentItem[0].nodeName)).addClass(className||self.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!className)
el.style.visibility="hidden";return el;},update:function(container,p){if(className&&!o.forcePlaceholderSize)return;if(!p.height()){p.height(self.currentItem.innerHeight()-parseInt(self.currentItem.css('paddingTop')||0,10)-parseInt(self.currentItem.css('paddingBottom')||0,10));};if(!p.width()){p.width(self.currentItem.innerWidth()-parseInt(self.currentItem.css('paddingLeft')||0,10)-parseInt(self.currentItem.css('paddingRight')||0,10));};}};}
self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem));self.currentItem.after(self.placeholder);o.placeholder.update(self,self.placeholder);},_contactContainers:function(event){for(var i=this.containers.length-1;i>=0;i--){if(this._intersectsWith(this.containers[i].containerCache)){if(!this.containers[i].containerCache.over){if(this.currentContainer!=this.containers[i]){var dist=10000;var itemWithLeastDistance=null;var base=this.positionAbs[this.containers[i].floating?'left':'top'];for(var j=this.items.length-1;j>=0;j--){if(!$.ui.contains(this.containers[i].element[0],this.items[j].item[0]))continue;var cur=this.items[j][this.containers[i].floating?'left':'top'];if(Math.abs(cur-base)<dist){dist=Math.abs(cur-base);itemWithLeastDistance=this.items[j];}}
if(!itemWithLeastDistance&&!this.options.dropOnEmpty)
continue;this.currentContainer=this.containers[i];itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,true):this._rearrange(event,null,this.containers[i].element,true);this._trigger("change",event,this._uiHash());this.containers[i]._trigger("change",event,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);}
this.containers[i]._trigger("over",event,this._uiHash(this));this.containers[i].containerCache.over=1;}}else{if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0;}}};},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):(o.helper=='clone'?this.currentItem.clone():this.currentItem);if(!helper.parents('body').length)
$(o.appendTo!='parent'?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0]);if(helper[0]==this.currentItem[0])
this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(helper[0].style.width==''||o.forceHelperSize)helper.width(this.currentItem.width());if(helper[0].style.height==''||o.forceHelperSize)helper.height(this.currentItem.height());return helper;},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined)this.offset.click.left=obj.left+this.margins.left;if(obj.right!=undefined)this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;if(obj.top!=undefined)this.offset.click.top=obj.top+this.margins.top;if(obj.bottom!=undefined)this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=='absolute'&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();}
if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=='html'&&$.browser.msie))
po={top:0,left:0};return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()};}else{return{top:0,left:0};}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)};},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},_setContainment:function(){var o=this.options;if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=='document'?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!(/^(document|window|parent)$/).test(o.containment)){var ce=$(o.containment)[0];var co=$(o.containment).offset();var over=($(ce).css("overflow")!='hidden');this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top];}},_convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top
+this.offset.relative.top*mod
+this.offset.parent.top*mod
-($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left
+this.offset.relative.left*mod
+this.offset.parent.left*mod
-($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))};},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=='relative'&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset();}
var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0])pageX=this.containment[0]+this.offset.click.left;if(event.pageY-this.offset.click.top<this.containment[1])pageY=this.containment[1]+this.offset.click.top;if(event.pageX-this.offset.click.left>this.containment[2])pageX=this.containment[2]+this.offset.click.left;if(event.pageY-this.offset.click.top>this.containment[3])pageY=this.containment[3]+this.offset.click.top;}
if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}}
return{top:(pageY
-this.offset.click.top
-this.offset.relative.top
-this.offset.parent.top
+($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX
-this.offset.click.left
-this.offset.relative.left
-this.offset.parent.left
+($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))};},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=='down'?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var self=this,counter=this.counter;window.setTimeout(function(){if(counter==self.counter)self.refreshPositions(!hardRefresh);},0);},_clear:function(event,noPropagation){this.reverting=false;var delayedTriggers=[],self=this;if(!this._noFinalSort&&this.currentItem[0].parentNode)this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS){if(this._storedCSS[i]=='auto'||this._storedCSS[i]=='static')this._storedCSS[i]='';}
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");}else{this.currentItem.show();}
if(this.fromOutside&&!noPropagation)delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside));});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!noPropagation)delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash());});if(!$.ui.contains(this.element[0],this.currentItem[0])){if(!noPropagation)delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash());});for(var i=this.containers.length-1;i>=0;i--){if($.ui.contains(this.containers[i].element[0],this.currentItem[0])&&!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("receive",event,this._uiHash(this));};}).call(this,this.containers[i]));delayedTriggers.push((function(c){return function(event){c._trigger("update",event,this._uiHash(this));};}).call(this,this.containers[i]));}};};for(var i=this.containers.length-1;i>=0;i--){if(!noPropagation)delayedTriggers.push((function(c){return function(event){c._trigger("deactivate",event,this._uiHash(this));};}).call(this,this.containers[i]));if(this.containers[i].containerCache.over){delayedTriggers.push((function(c){return function(event){c._trigger("out",event,this._uiHash(this));};}).call(this,this.containers[i]));this.containers[i].containerCache.over=0;}}
if(this._storedCursor)$('body').css("cursor",this._storedCursor);if(this._storedOpacity)this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=='auto'?'':this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event);};this._trigger("stop",event,this._uiHash());}
return false;}
if(!noPropagation)this._trigger("beforeStop",event,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0])this.helper.remove();this.helper=null;if(!noPropagation){for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event);};this._trigger("stop",event,this._uiHash());}
this.fromOutside=false;return true;},_trigger:function(){if($.widget.prototype._trigger.apply(this,arguments)===false){this.cancel();}},_uiHash:function(inst){var self=inst||this;return{helper:self.helper,placeholder:self.placeholder||$([]),position:self.position,absolutePosition:self.positionAbs,offset:self.positionAbs,item:self.currentItem,sender:inst?inst.element:null};}}));$.extend($.ui.sortable,{getter:"serialize toArray",version:"1.7",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:'auto',cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:'> *',opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}});})(jQuery);(function($){$.widget("ui.accordion",{_init:function(){var o=this.options,self=this;this.running=0;if(o.collapsible==$.ui.accordion.defaults.collapsible&&o.alwaysOpen!=$.ui.accordion.defaults.alwaysOpen){o.collapsible=!o.alwaysOpen;}
if(o.navigation){var current=this.element.find("a").filter(o.navigationFilter);if(current.length){if(current.filter(o.header).length){this.active=current;}else{this.active=current.parent().parent().prev();current.addClass("ui-accordion-content-active");}}}
this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix");}
this.headers=this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){$(this).addClass('ui-state-hover');}).bind("mouseleave.accordion",function(){$(this).removeClass('ui-state-hover');}).bind("focus.accordion",function(){$(this).addClass('ui-state-focus');}).bind("blur.accordion",function(){$(this).removeClass('ui-state-focus');});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass('ui-accordion-content-active');$("<span/>").addClass("ui-icon "+o.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);if($.browser.msie){this.element.find('a').css('zoom','1');}
this.resize();this.element.attr('role','tablist');this.headers.attr('role','tab').bind('keydown',function(event){return self._keydown(event);}).next().attr('role','tabpanel');this.headers.not(this.active||"").attr('aria-expanded','false').attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr('tabIndex','0');}else{this.active.attr('aria-expanded','true').attr('tabIndex','0');}
if(!$.browser.safari)
this.headers.find('a').attr('tabIndex','-1');if(o.event){this.headers.bind((o.event)+".accordion",function(event){return self._clickHandler.call(self,event,this);});}},destroy:function(){var o=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind('.accordion').removeData('accordion');this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var contents=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(o.autoHeight||o.fillHeight){contents.css("height","");}},_setData:function(key,value){if(key=='alwaysOpen'){key='collapsible';value=!value;}
$.widget.prototype._setData.apply(this,arguments);},_keydown:function(event){var o=this.options,keyCode=$.ui.keyCode;if(o.disabled||event.altKey||event.ctrlKey)
return;var length=this.headers.length;var currentIndex=this.headers.index(event.target);var toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:return this._clickHandler({target:event.target},event.target);}
if(toFocus){$(event.target).attr('tabIndex','-1');$(toFocus).attr('tabIndex','0');toFocus.focus();return false;}
return true;},resize:function(){var o=this.options,maxHeight;if(o.fillSpace){if($.browser.msie){var defOverflow=this.element.parent().css('overflow');this.element.parent().css('overflow','hidden');}
maxHeight=this.element.parent().height();if($.browser.msie){this.element.parent().css('overflow',defOverflow);}
this.headers.each(function(){maxHeight-=$(this).outerHeight();});var maxPadding=0;this.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height());}).height(Math.max(0,maxHeight-maxPadding)).css('overflow','auto');}else if(o.autoHeight){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight());}).height(maxHeight);}},activate:function(index){var active=this._findActive(index)[0];this._clickHandler({target:active},active);},_findActive:function(selector){return selector?typeof selector=="number"?this.headers.filter(":eq("+selector+")"):this.headers.not(this.headers.not(selector)):selector===false?$([]):this.headers.filter(":eq(0)");},_clickHandler:function(event,target){var o=this.options;if(o.disabled)return false;if(!event.target&&o.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass('ui-accordion-content-active');var toHide=this.active.next(),data={options:o,newHeader:$([]),oldHeader:o.active,newContent:$([]),oldContent:toHide},toShow=(this.active=$([]));this._toggle(toShow,toHide,data);return false;}
var clicked=$(event.currentTarget||target);var clickedIsActive=clicked[0]==this.active[0];if(this.running||(!o.collapsible&&clickedIsActive)){return false;}
this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass('ui-accordion-content-active');if(!clickedIsActive){clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);clicked.next().addClass('ui-accordion-content-active');}
var toShow=clicked.next(),toHide=this.active.next(),data={options:o,newHeader:clickedIsActive&&o.collapsible?$([]):clicked,oldHeader:this.active,newContent:clickedIsActive&&o.collapsible?$([]):toShow.find('> *'),oldContent:toHide.find('> *')},down=this.headers.index(this.active[0])>this.headers.index(clicked[0]);this.active=clickedIsActive?$([]):clicked;this._toggle(toShow,toHide,data,clickedIsActive,down);return false;},_toggle:function(toShow,toHide,data,clickedIsActive,down){var o=this.options,self=this;this.toShow=toShow;this.toHide=toHide;this.data=data;var complete=function(){if(!self)return;return self._completed.apply(self,arguments);};this._trigger("changestart",null,this.data);this.running=toHide.size()===0?toShow.size():toHide.size();if(o.animated){var animOptions={};if(o.collapsible&&clickedIsActive){animOptions={toShow:$([]),toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace};}else{animOptions={toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace};}
if(!o.proxied){o.proxied=o.animated;}
if(!o.proxiedDuration){o.proxiedDuration=o.duration;}
o.animated=$.isFunction(o.proxied)?o.proxied(animOptions):o.proxied;o.duration=$.isFunction(o.proxiedDuration)?o.proxiedDuration(animOptions):o.proxiedDuration;var animations=$.ui.accordion.animations,duration=o.duration,easing=o.animated;if(!animations[easing]){animations[easing]=function(options){this.slide(options,{easing:easing,duration:duration||700});};}
animations[easing](animOptions);}else{if(o.collapsible&&clickedIsActive){toShow.toggle();}else{toHide.hide();toShow.show();}
complete(true);}
toHide.prev().attr('aria-expanded','false').attr("tabIndex","-1").blur();toShow.prev().attr('aria-expanded','true').attr("tabIndex","0").focus();},_completed:function(cancel){var o=this.options;this.running=cancel?0:--this.running;if(this.running)return;if(o.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""});}
this._trigger('change',null,this.data);}});$.extend($.ui.accordion,{version:"1.7",defaults:{active:null,alwaysOpen:true,animated:'slide',autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase();}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return;}
if(!options.toShow.size()){options.toHide.animate({height:"hide"},options);return;}
var overflow=options.toShow.css('overflow'),percentDone,showProps={},hideProps={},fxAttrs=["height","paddingTop","paddingBottom"],originalWidth;var s=options.toShow;originalWidth=s[0].style.width;s.width(parseInt(s.parent().width(),10)-parseInt(s.css("paddingLeft"),10)-parseInt(s.css("paddingRight"),10)-parseInt(s.css("borderLeftWidth"),10)-parseInt(s.css("borderRightWidth"),10));$.each(fxAttrs,function(i,prop){hideProps[prop]='hide';var parts=(''+$.css(options.toShow[0],prop)).match(/^([\d+-.]+)(.*)$/);showProps[prop]={value:parts[1],unit:parts[2]||'px'};});options.toShow.css({height:0,overflow:'hidden'}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{step:function(now,settings){if(settings.prop=='height'){percentDone=(settings.now-settings.start)/(settings.end-settings.start);}
options.toShow[0].style[settings.prop]=(percentDone*showProps[settings.prop].value)+showProps[settings.prop].unit;},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","");}
options.toShow.css("width",originalWidth);options.toShow.css({overflow:overflow});options.complete();}});},bounceslide:function(options){this.slide(options,{easing:options.down?"easeOutBounce":"swing",duration:options.down?1000:200});},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700});}}});})(jQuery);(function($){var setDataSwitch={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},uiDialogClasses='ui-dialog '+'ui-widget '+'ui-widget-content '+'ui-corner-all ';$.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr('title');var self=this,options=this.options,title=options.title||this.originalTitle||'&nbsp;',titleId=$.ui.dialog.getTitleId(this.element),uiDialog=(this.uiDialog=$('<div/>')).appendTo(document.body).hide().addClass(uiDialogClasses+options.dialogClass).css({position:'absolute',overflow:'hidden',zIndex:options.zIndex}).attr('tabIndex',-1).css('outline',0).keydown(function(event){(options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&self.close(event));}).attr({role:'dialog','aria-labelledby':titleId}).mousedown(function(event){self.moveToTop(false,event);}),uiDialogContent=this.element.show().removeAttr('title').addClass('ui-dialog-content '+'ui-widget-content').appendTo(uiDialog),uiDialogTitlebar=(this.uiDialogTitlebar=$('<div></div>')).addClass('ui-dialog-titlebar '+'ui-widget-header '+'ui-corner-all '+'ui-helper-clearfix').prependTo(uiDialog),uiDialogTitlebarClose=$('<a href="#"/>').addClass('ui-dialog-titlebar-close '+'ui-corner-all').attr('role','button').hover(function(){uiDialogTitlebarClose.addClass('ui-state-hover');},function(){uiDialogTitlebarClose.removeClass('ui-state-hover');}).focus(function(){uiDialogTitlebarClose.addClass('ui-state-focus');}).blur(function(){uiDialogTitlebarClose.removeClass('ui-state-focus');}).mousedown(function(ev){ev.stopPropagation();}).click(function(event){self.close(event);return false;}).appendTo(uiDialogTitlebar),uiDialogTitlebarCloseText=(this.uiDialogTitlebarCloseText=$('<span/>')).addClass('ui-icon '+'ui-icon-closethick').text(options.closeText).appendTo(uiDialogTitlebarClose),uiDialogTitle=$('<span/>').addClass('ui-dialog-title').attr('id',titleId).html(title).prependTo(uiDialogTitlebar);uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();(options.draggable&&$.fn.draggable&&this._makeDraggable());(options.resizable&&$.fn.resizable&&this._makeResizable());this._createButtons(options.buttons);this._isOpen=false;(options.bgiframe&&$.fn.bgiframe&&uiDialog.bgiframe());(options.autoOpen&&this.open());},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind('.dialog').removeData('dialog').removeClass('ui-dialog-content ui-widget-content').hide().appendTo('body');this.uiDialog.remove();(this.originalTitle&&this.element.attr('title',this.originalTitle));},close:function(event){var self=this;if(false===self._trigger('beforeclose',event)){return;}
(self.overlay&&self.overlay.destroy());self.uiDialog.unbind('keypress.ui-dialog');(self.options.hide?self.uiDialog.hide(self.options.hide,function(){self._trigger('close',event);}):self.uiDialog.hide()&&self._trigger('close',event));$.ui.dialog.overlay.resize();self._isOpen=false;},isOpen:function(){return this._isOpen;},moveToTop:function(force,event){if((this.options.modal&&!force)||(!this.options.stack&&!this.options.modal)){return this._trigger('focus',event);}
if(this.options.zIndex>$.ui.dialog.maxZ){$.ui.dialog.maxZ=this.options.zIndex;}
(this.overlay&&this.overlay.$el.css('z-index',$.ui.dialog.overlay.maxZ=++$.ui.dialog.maxZ));var saveScroll={scrollTop:this.element.attr('scrollTop'),scrollLeft:this.element.attr('scrollLeft')};this.uiDialog.css('z-index',++$.ui.dialog.maxZ);this.element.attr(saveScroll);this._trigger('focus',event);},open:function(){if(this._isOpen){return;}
var options=this.options,uiDialog=this.uiDialog;this.overlay=options.modal?new $.ui.dialog.overlay(this):null;(uiDialog.next().length&&uiDialog.appendTo('body'));this._size();this._position(options.position);uiDialog.show(options.show);this.moveToTop(true);(options.modal&&uiDialog.bind('keypress.ui-dialog',function(event){if(event.keyCode!=$.ui.keyCode.TAB){return;}
var tabbables=$(':tabbable',this),first=tabbables.filter(':first')[0],last=tabbables.filter(':last')[0];if(event.target==last&&!event.shiftKey){setTimeout(function(){first.focus();},1);}else if(event.target==first&&event.shiftKey){setTimeout(function(){last.focus();},1);}}));$([]).add(uiDialog.find('.ui-dialog-content :tabbable:first')).add(uiDialog.find('.ui-dialog-buttonpane :tabbable:first')).add(uiDialog).filter(':first').focus();this._trigger('open');this._isOpen=true;},_createButtons:function(buttons){var self=this,hasButtons=false,uiDialogButtonPane=$('<div></div>').addClass('ui-dialog-buttonpane '+'ui-widget-content '+'ui-helper-clearfix');this.uiDialog.find('.ui-dialog-buttonpane').remove();(typeof buttons=='object'&&buttons!==null&&$.each(buttons,function(){return!(hasButtons=true);}));if(hasButtons){$.each(buttons,function(name,fn){$('<button type="button"></button>').addClass('ui-state-default '+'ui-corner-all').text(name).click(function(){fn.apply(self.element[0],arguments);}).hover(function(){$(this).addClass('ui-state-hover');},function(){$(this).removeClass('ui-state-hover');}).focus(function(){$(this).addClass('ui-state-focus');}).blur(function(){$(this).removeClass('ui-state-focus');}).appendTo(uiDialogButtonPane);});uiDialogButtonPane.appendTo(this.uiDialog);}},_makeDraggable:function(){var self=this,options=this.options,heightBeforeDrag;this.uiDialog.draggable({cancel:'.ui-dialog-content',handle:'.ui-dialog-titlebar',containment:'document',start:function(){heightBeforeDrag=options.height;$(this).height($(this).height()).addClass("ui-dialog-dragging");(options.dragStart&&options.dragStart.apply(self.element[0],arguments));},drag:function(){(options.drag&&options.drag.apply(self.element[0],arguments));},stop:function(){$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);(options.dragStop&&options.dragStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize();}});},_makeResizable:function(handles){handles=(handles===undefined?this.options.resizable:handles);var self=this,options=this.options,resizeHandles=typeof handles=='string'?handles:'n,e,s,w,se,sw,ne,nw';this.uiDialog.resizable({cancel:'.ui-dialog-content',alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:options.minHeight,start:function(){$(this).addClass("ui-dialog-resizing");(options.resizeStart&&options.resizeStart.apply(self.element[0],arguments));},resize:function(){(options.resize&&options.resize.apply(self.element[0],arguments));},handles:resizeHandles,stop:function(){$(this).removeClass("ui-dialog-resizing");options.height=$(this).height();options.width=$(this).width();(options.resizeStop&&options.resizeStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize();}}).find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se');},_position:function(pos){var wnd=$(window),doc=$(document),pTop=doc.scrollTop(),pLeft=doc.scrollLeft(),minTop=pTop;if($.inArray(pos,['center','top','right','bottom','left'])>=0){pos=[pos=='right'||pos=='left'?pos:'center',pos=='top'||pos=='bottom'?pos:'middle'];}
if(pos.constructor!=Array){pos=['center','middle'];}
if(pos[0].constructor==Number){pLeft+=pos[0];}else{switch(pos[0]){case'left':pLeft+=0;break;case'right':pLeft+=wnd.width()-this.uiDialog.outerWidth();break;default:case'center':pLeft+=(wnd.width()-this.uiDialog.outerWidth())/2;}}
if(pos[1].constructor==Number){pTop+=pos[1];}else{switch(pos[1]){case'top':pTop+=0;break;case'bottom':pTop+=wnd.height()-this.uiDialog.outerHeight();break;default:case'middle':pTop+=(wnd.height()-this.uiDialog.outerHeight())/2;}}
pTop=Math.max(pTop,minTop);this.uiDialog.css({top:pTop,left:pLeft});},_setData:function(key,value){(setDataSwitch[key]&&this.uiDialog.data(setDataSwitch[key],value));switch(key){case"buttons":this._createButtons(value);break;case"closeText":this.uiDialogTitlebarCloseText.text(value);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(uiDialogClasses+value);break;case"draggable":(value?this._makeDraggable():this.uiDialog.draggable('destroy'));break;case"height":this.uiDialog.height(value);break;case"position":this._position(value);break;case"resizable":var uiDialog=this.uiDialog,isResizable=this.uiDialog.is(':data(resizable)');(isResizable&&!value&&uiDialog.resizable('destroy'));(isResizable&&typeof value=='string'&&uiDialog.resizable('option','handles',value));(isResizable||this._makeResizable(value));break;case"title":$(".ui-dialog-title",this.uiDialogTitlebar).html(value||'&nbsp;');break;case"width":this.uiDialog.width(value);break;}
$.widget.prototype._setData.apply(this,arguments);},_size:function(){var options=this.options;this.element.css({height:0,minHeight:0,width:'auto'});var nonContentHeight=this.uiDialog.css({height:'auto',width:options.width}).height();this.element.css({minHeight:Math.max(options.minHeight-nonContentHeight,0),height:options.height=='auto'?'auto':Math.max(options.height-nonContentHeight,0)});}});$.extend($.ui.dialog,{version:"1.7",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:'close',dialogClass:'',draggable:true,hide:null,height:'auto',maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:'center',resizable:true,show:null,stack:true,title:'',width:300,zIndex:1000},getter:'isOpen',uuid:0,maxZ:0,getTitleId:function($el){return'ui-dialog-title-'+($el.attr('id')||++this.uuid);},overlay:function(dialog){this.$el=$.ui.dialog.overlay.create(dialog);}});$.extend($.ui.dialog.overlay,{instances:[],maxZ:0,events:$.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),function(event){return event+'.dialog-overlay';}).join(' '),create:function(dialog){if(this.instances.length===0){setTimeout(function(){$(document).bind($.ui.dialog.overlay.events,function(event){var dialogZ=$(event.target).parents('.ui-dialog').css('zIndex')||0;return(dialogZ>$.ui.dialog.overlay.maxZ);});},1);$(document).bind('keydown.dialog-overlay',function(event){(dialog.options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&dialog.close(event));});$(window).bind('resize.dialog-overlay',$.ui.dialog.overlay.resize);}
var $el=$('<div></div>').appendTo(document.body).addClass('ui-widget-overlay').css({width:this.width(),height:this.height()});(dialog.options.bgiframe&&$.fn.bgiframe&&$el.bgiframe());this.instances.push($el);return $el;},destroy:function($el){this.instances.splice($.inArray(this.instances,$el),1);if(this.instances.length===0){$([document,window]).unbind('.dialog-overlay');}
$el.remove();},height:function(){if($.browser.msie&&$.browser.version<7){var scrollHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(scrollHeight<offsetHeight){return $(window).height()+'px';}else{return scrollHeight+'px';}}else{return $(document).height()+'px';}},width:function(){if($.browser.msie&&$.browser.version<7){var scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(scrollWidth<offsetWidth){return $(window).width()+'px';}else{return scrollWidth+'px';}}else{return $(document).width()+'px';}},resize:function(){var $overlays=$([]);$.each($.ui.dialog.overlay.instances,function(){$overlays=$overlays.add(this);});$overlays.css({width:0,height:0}).css({width:$.ui.dialog.overlay.width(),height:$.ui.dialog.overlay.height()});}});$.extend($.ui.dialog.overlay.prototype,{destroy:function(){$.ui.dialog.overlay.destroy(this.$el);}});})(jQuery);(function($){$.widget("ui.slider",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider"
+" ui-slider-"+this.orientation
+" ui-widget"
+" ui-widget-content"
+" ui-corner-all");this.range=$([]);if(o.range){if(o.range===true){this.range=$('<div></div>');if(!o.values)o.values=[this._valueMin(),this._valueMin()];if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]];}}else{this.range=$('<div></div>');}
this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui-slider-range-"+o.range);}
this.range.addClass("ui-widget-header");}
if($(".ui-slider-handle",this.element).length==0)
$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");if(o.values&&o.values.length){while($(".ui-slider-handle",this.element).length<o.values.length)
$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle");}
this.handles=$(".ui-slider-handle",this.element).addClass("ui-state-default"
+" ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault();}).hover(function(){$(this).addClass('ui-state-hover');},function(){$(this).removeClass('ui-state-hover');}).focus(function(){$(".ui-slider .ui-state-focus").removeClass('ui-state-focus');$(this).addClass('ui-state-focus');}).blur(function(){$(this).removeClass('ui-state-focus');});this.handles.each(function(i){$(this).data("index.ui-slider-handle",i);});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui-slider-handle");if(self.options.disabled)
return;switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");self._start(event,index);}
break;}
var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index);}else{curVal=newVal=self.value();}
switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax())return;newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin())return;newVal=curVal-step;break;}
self._slide(event,index,newVal);return ret;}).keyup(function(event){var index=$(this).data("index.ui-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui-state-active");}});this._refreshValue();},destroy:function(){this.handles.remove();this.element.removeClass("ui-slider"
+" ui-slider-horizontal"
+" ui-slider-vertical"
+" ui-slider-disabled"
+" ui-widget"
+" ui-widget-content"
+" ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();},_mouseCapture:function(event){var o=this.options;if(o.disabled)
return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i;}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index]);}
this._start(event,index);self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is('.ui-slider-handle');this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top
-(closestHandle.height()/2)
-(parseInt(closestHandle.css('borderTopWidth'),10)||0)
-(parseInt(closestHandle.css('borderBottomWidth'),10)||0)
+(parseInt(closestHandle.css('marginTop'),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);return true;},_mouseStart:function(event){return true;},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false;},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false;},_detectOrientation:function(){this.orientation=this.options.orientation=='vertical'?'vertical':'horizontal';},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if('horizontal'==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0);}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0);}
var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1)percentMouse=1;if(percentMouse<0)percentMouse=0;if('vertical'==this.orientation)
percentMouse=1-percentMouse;var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2))
normValue+=this.options.step;return parseFloat(normValue.toFixed(5));},_start:function(event,index){this._trigger("start",event,this._uiHash(index));},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((index==0&&newVal>=otherVal)||(index==1&&newVal<=otherVal))
newVal=otherVal;if(newVal!=this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed=this._trigger("slide",event,this._uiHash(index,newVal,newValues));var otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,(event.type=='mousedown'&&this.options.animate),true);}}}else{if(newVal!=this.value()){var allowed=this._trigger("slide",event,this._uiHash(index,newVal));if(allowed!==false){this._setData('value',newVal,(event.type=='mousedown'&&this.options.animate));}}}},_stop:function(event,index){this._trigger("stop",event,this._uiHash(index));},_change:function(event,index){this._trigger("change",event,this._uiHash(index));},value:function(newValue){if(arguments.length){this._setData("value",newValue);this._change(null,0);}
return this._value();},values:function(index,newValue,animated,noPropagation){if(arguments.length>1){this.options.values[index]=newValue;this._refreshValue(animated);if(!noPropagation)this._change(null,index);}
if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(index);}else{return this.value();}}else{return this._values();}},_setData:function(key,value,animated){$.widget.prototype._setData.apply(this,arguments);switch(key){case'orientation':this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(animated);break;case'value':this._refreshValue(animated);break;}},_step:function(){var step=this.options.step;return step;},_value:function(){var val=this.options.value;if(val<this._valueMin())val=this._valueMin();if(val>this._valueMax())val=this._valueMax();return val;},_values:function(index){if(arguments.length){var val=this.options.values[index];if(val<this._valueMin())val=this._valueMin();if(val>this._valueMax())val=this._valueMax();return val;}else{return this.options.values;}},_valueMin:function(){var valueMin=this.options.min;return valueMin;},_valueMax:function(){var valueMax=this.options.max;return valueMax;},_refreshValue:function(animate){var oRange=this.options.range,o=this.options,self=this;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=='horizontal'?'left':'bottom']=valPercent+'%';$(this).stop(1,1)[animate?'animate':'css'](_set,o.animate);if(self.options.range===true){if(self.orientation=='horizontal'){(i==0)&&self.range.stop(1,1)[animate?'animate':'css']({left:valPercent+'%'},o.animate);(i==1)&&self.range[animate?'animate':'css']({width:(valPercent-lastValPercent)+'%'},{queue:false,duration:o.animate});}else{(i==0)&&self.range.stop(1,1)[animate?'animate':'css']({bottom:(valPercent)+'%'},o.animate);(i==1)&&self.range[animate?'animate':'css']({height:(valPercent-lastValPercent)+'%'},{queue:false,duration:o.animate});}}
lastValPercent=valPercent;});}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=='horizontal'?'left':'bottom']=valPercent+'%';this.handle.stop(1,1)[animate?'animate':'css'](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?'animate':'css']({width:valPercent+'%'},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?'animate':'css']({width:(100-valPercent)+'%'},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?'animate':'css']({height:valPercent+'%'},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?'animate':'css']({height:(100-valPercent)+'%'},{queue:false,duration:o.animate});}},_uiHash:function(index,value,values){var multiple=this.options.values&&this.options.values.length;return{handle:this.handles[index],value:value||(multiple?this.values(index):this.value()),values:values||(multiple&&this.values())};}}));$.extend($.ui.slider,{getter:"value values",version:"1.7",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:'horizontal',range:false,step:1,value:0,values:null}});})(jQuery);(function($){$.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable;}
this._tabify(true);},_setData:function(key,value){if(key=='selected'){if(this.options.collapsible&&value==this.options.selected){return;}
this.select(value);}
else{this.options[key]=value;if(key=='deselectable'){this.options.collapsible=value;}
this._tabify();}},_tabId:function(a){return a.title&&a.title.replace(/\s/g,'_').replace(/[^A-Za-z0-9\-_:\.]/g,'')||this.options.idPrefix+$.data(a);},_sanitizeSelector:function(hash){return hash.replace(/:/g,'\\:');},_cookie:function(){var cookie=this.cookie||(this.cookie=this.options.cookie.name||'ui-tabs-'+$.data(this.list[0]));return $.cookie.apply(null,[cookie].concat($.makeArray(arguments)));},_ui:function(tab,panel){return{tab:tab,panel:panel,index:this.anchors.index(tab)};},_cleanup:function(){this.lis.filter('.ui-state-processing').removeClass('ui-state-processing').find('span:data(label.tabs)').each(function(){var el=$(this);el.html(el.data('label.tabs')).removeData('label.tabs');});},_tabify:function(init){this.list=this.element.children('ul:first');this.lis=$('li:has(a[href])',this.list);this.anchors=this.lis.map(function(){return $('a',this)[0];});this.panels=$([]);var self=this,o=this.options;var fragmentId=/^#.+/;this.anchors.each(function(i,a){var href=$(a).attr('href');var hrefBase=href.split('#')[0],baseEl;if(hrefBase&&(hrefBase===location.toString().split('#')[0]||(baseEl=$('base')[0])&&hrefBase===baseEl.href)){href=a.hash;a.href=href;}
if(fragmentId.test(href)){self.panels=self.panels.add(self._sanitizeSelector(href));}
else if(href!='#'){$.data(a,'href.tabs',href);$.data(a,'load.tabs',href.replace(/#.*$/,''));var id=self._tabId(a);a.href='#'+id;var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).addClass('ui-tabs-panel ui-widget-content ui-corner-bottom').insertAfter(self.panels[i-1]||self.list);$panel.data('destroy.tabs',true);}
self.panels=self.panels.add($panel);}
else{o.disabled.push(i);}});if(init){this.element.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all');this.list.addClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');this.lis.addClass('ui-state-default ui-corner-top');this.panels.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom');if(o.selected===undefined){if(location.hash){this.anchors.each(function(i,a){if(a.hash==location.hash){o.selected=i;return false;}});}
if(typeof o.selected!='number'&&o.cookie){o.selected=parseInt(self._cookie(),10);}
if(typeof o.selected!='number'&&this.lis.filter('.ui-tabs-selected').length){o.selected=this.lis.index(this.lis.filter('.ui-tabs-selected'));}
o.selected=o.selected||0;}
else if(o.selected===null){o.selected=-1;}
o.selected=((o.selected>=0&&this.anchors[o.selected])||o.selected<0)?o.selected:0;o.disabled=$.unique(o.disabled.concat($.map(this.lis.filter('.ui-state-disabled'),function(n,i){return self.lis.index(n);}))).sort();if($.inArray(o.selected,o.disabled)!=-1){o.disabled.splice($.inArray(o.selected,o.disabled),1);}
this.panels.addClass('ui-tabs-hide');this.lis.removeClass('ui-tabs-selected ui-state-active');if(o.selected>=0&&this.anchors.length){this.panels.eq(o.selected).removeClass('ui-tabs-hide');this.lis.eq(o.selected).addClass('ui-tabs-selected ui-state-active');self.element.queue("tabs",function(){self._trigger('show',null,self._ui(self.anchors[o.selected],self.panels[o.selected]));});this.load(o.selected);}
$(window).bind('unload',function(){self.lis.add(self.anchors).unbind('.tabs');self.lis=self.anchors=self.panels=null;});}
else{o.selected=this.lis.index(this.lis.filter('.ui-tabs-selected'));}
this.element[o.collapsible?'addClass':'removeClass']('ui-tabs-collapsible');if(o.cookie){this._cookie(o.selected,o.cookie);}
for(var i=0,li;(li=this.lis[i]);i++){$(li)[$.inArray(i,o.disabled)!=-1&&!$(li).hasClass('ui-tabs-selected')?'addClass':'removeClass']('ui-state-disabled');}
if(o.cache===false){this.anchors.removeData('cache.tabs');}
this.lis.add(this.anchors).unbind('.tabs');if(o.event!='mouseover'){var addState=function(state,el){if(el.is(':not(.ui-state-disabled)')){el.addClass('ui-state-'+state);}};var removeState=function(state,el){el.removeClass('ui-state-'+state);};this.lis.bind('mouseover.tabs',function(){addState('hover',$(this));});this.lis.bind('mouseout.tabs',function(){removeState('hover',$(this));});this.anchors.bind('focus.tabs',function(){addState('focus',$(this).closest('li'));});this.anchors.bind('blur.tabs',function(){removeState('focus',$(this).closest('li'));});}
var hideFx,showFx;if(o.fx){if($.isArray(o.fx)){hideFx=o.fx[0];showFx=o.fx[1];}
else{hideFx=showFx=o.fx;}}
function resetStyle($el,fx){$el.css({display:''});if($.browser.msie&&fx.opacity){$el[0].style.removeAttribute('filter');}}
var showTab=showFx?function(clicked,$show){$(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');$show.hide().removeClass('ui-tabs-hide').animate(showFx,showFx.duration||'normal',function(){resetStyle($show,showFx);self._trigger('show',null,self._ui(clicked,$show[0]));});}:function(clicked,$show){$(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');$show.removeClass('ui-tabs-hide');self._trigger('show',null,self._ui(clicked,$show[0]));};var hideTab=hideFx?function(clicked,$hide){$hide.animate(hideFx,hideFx.duration||'normal',function(){self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');$hide.addClass('ui-tabs-hide');resetStyle($hide,hideFx);self.element.dequeue("tabs");});}:function(clicked,$hide,$show){self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');$hide.addClass('ui-tabs-hide');self.element.dequeue("tabs");};this.anchors.bind(o.event+'.tabs',function(){var el=this,$li=$(this).closest('li'),$hide=self.panels.filter(':not(.ui-tabs-hide)'),$show=$(self._sanitizeSelector(this.hash));if(($li.hasClass('ui-tabs-selected')&&!o.collapsible)||$li.hasClass('ui-state-disabled')||$li.hasClass('ui-state-processing')||self._trigger('select',null,self._ui(this,$show[0]))===false){this.blur();return false;}
o.selected=self.anchors.index(this);self.abort();if(o.collapsible){if($li.hasClass('ui-tabs-selected')){o.selected=-1;if(o.cookie){self._cookie(o.selected,o.cookie);}
self.element.queue("tabs",function(){hideTab(el,$hide);}).dequeue("tabs");this.blur();return false;}
else if(!$hide.length){if(o.cookie){self._cookie(o.selected,o.cookie);}
self.element.queue("tabs",function(){showTab(el,$show);});self.load(self.anchors.index(this));this.blur();return false;}}
if(o.cookie){self._cookie(o.selected,o.cookie);}
if($show.length){if($hide.length){self.element.queue("tabs",function(){hideTab(el,$hide);});}
self.element.queue("tabs",function(){showTab(el,$show);});self.load(self.anchors.index(this));}
else{throw'jQuery UI Tabs: Mismatching fragment identifier.';}
if($.browser.msie){this.blur();}});this.anchors.bind('click.tabs',function(){return false;});},destroy:function(){var o=this.options;this.abort();this.element.unbind('.tabs').removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible').removeData('tabs');this.list.removeClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');this.anchors.each(function(){var href=$.data(this,'href.tabs');if(href){this.href=href;}
var $this=$(this).unbind('.tabs');$.each(['href','load','cache'],function(i,prefix){$this.removeData(prefix+'.tabs');});});this.lis.unbind('.tabs').add(this.panels).each(function(){if($.data(this,'destroy.tabs')){$(this).remove();}
else{$(this).removeClass(['ui-state-default','ui-corner-top','ui-tabs-selected','ui-state-active','ui-state-hover','ui-state-focus','ui-state-disabled','ui-tabs-panel','ui-widget-content','ui-corner-bottom','ui-tabs-hide'].join(' '));}});if(o.cookie){this._cookie(null,o.cookie);}},add:function(url,label,index){if(index===undefined){index=this.anchors.length;}
var self=this,o=this.options,$li=$(o.tabTemplate.replace(/#\{href\}/g,url).replace(/#\{label\}/g,label)),id=!url.indexOf('#')?url.replace('#',''):this._tabId($('a',$li)[0]);$li.addClass('ui-state-default ui-corner-top').data('destroy.tabs',true);var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).data('destroy.tabs',true);}
$panel.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide');if(index>=this.lis.length){$li.appendTo(this.list);$panel.appendTo(this.list[0].parentNode);}
else{$li.insertBefore(this.lis[index]);$panel.insertBefore(this.panels[index]);}
o.disabled=$.map(o.disabled,function(n,i){return n>=index?++n:n;});this._tabify();if(this.anchors.length==1){$li.addClass('ui-tabs-selected ui-state-active');$panel.removeClass('ui-tabs-hide');this.element.queue("tabs",function(){self._trigger('show',null,self._ui(self.anchors[0],self.panels[0]));});this.load(0);}
this._trigger('add',null,this._ui(this.anchors[index],this.panels[index]));},remove:function(index){var o=this.options,$li=this.lis.eq(index).remove(),$panel=this.panels.eq(index).remove();if($li.hasClass('ui-tabs-selected')&&this.anchors.length>1){this.select(index+(index+1<this.anchors.length?1:-1));}
o.disabled=$.map($.grep(o.disabled,function(n,i){return n!=index;}),function(n,i){return n>=index?--n:n;});this._tabify();this._trigger('remove',null,this._ui($li.find('a')[0],$panel[0]));},enable:function(index){var o=this.options;if($.inArray(index,o.disabled)==-1){return;}
this.lis.eq(index).removeClass('ui-state-disabled');o.disabled=$.grep(o.disabled,function(n,i){return n!=index;});this._trigger('enable',null,this._ui(this.anchors[index],this.panels[index]));},disable:function(index){var self=this,o=this.options;if(index!=o.selected){this.lis.eq(index).addClass('ui-state-disabled');o.disabled.push(index);o.disabled.sort();this._trigger('disable',null,this._ui(this.anchors[index],this.panels[index]));}},select:function(index){if(typeof index=='string'){index=this.anchors.index(this.anchors.filter('[href$='+index+']'));}
else if(index===null){index=-1;}
if(index==-1&&this.options.collapsible){index=this.options.selected;}
this.anchors.eq(index).trigger(this.options.event+'.tabs');},load:function(index){var self=this,o=this.options,a=this.anchors.eq(index)[0],url=$.data(a,'load.tabs');this.abort();if(!url||this.element.queue("tabs").length!==0&&$.data(a,'cache.tabs')){this.element.dequeue("tabs");return;}
this.lis.eq(index).addClass('ui-state-processing');if(o.spinner){var span=$('span',a);span.data('label.tabs',span.html()).html(o.spinner);}
this.xhr=$.ajax($.extend({},o.ajaxOptions,{url:url,success:function(r,s){$(self._sanitizeSelector(a.hash)).html(r);self._cleanup();if(o.cache){$.data(a,'cache.tabs',true);}
self._trigger('load',null,self._ui(self.anchors[index],self.panels[index]));try{o.ajaxOptions.success(r,s);}
catch(e){}
self.element.dequeue("tabs");}}));},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr;}
this._cleanup();},url:function(index,url){this.anchors.eq(index).removeData('cache.tabs').data('load.tabs',url);},length:function(){return this.anchors.length;}});$.extend($.ui.tabs,{version:'1.7',getter:'length',defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:'click',fx:null,idPrefix:'ui-tabs-',panelTemplate:'<div></div>',spinner:'<em>Loading&#8230;</em>',tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});$.extend($.ui.tabs.prototype,{rotation:null,rotate:function(ms,continuing){var self=this,o=this.options;var rotate=self._rotate||(self._rotate=function(e){clearTimeout(self.rotation);self.rotation=setTimeout(function(){var t=o.selected;self.select(++t<self.anchors.length?t:0);},ms);if(e){e.stopPropagation();}});var stop=self._unrotate||(self._unrotate=!continuing?function(e){if(e.clientX){self.rotate(null);}}:function(e){t=o.selected;rotate();});if(ms){this.element.bind('tabsshow',rotate);this.anchors.bind(o.event+'.tabs',stop);rotate();}
else{clearTimeout(self.rotation);this.element.unbind('tabsshow',rotate);this.anchors.unbind(o.event+'.tabs',stop);delete this._rotate;delete this._unrotate;}}});})(jQuery);(function($){$.extend($.ui,{datepicker:{version:"1.7"}});var PROP_NAME='datepicker';function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId='ui-datepicker-div';this._inlineClass='ui-datepicker-inline';this._appendClass='ui-datepicker-append';this._triggerClass='ui-datepicker-trigger';this._dialogClass='ui-datepicker-dialog';this._disableClass='ui-datepicker-disabled';this._unselectableClass='ui-datepicker-unselectable';this._currentClass='ui-datepicker-current-day';this._dayOverClass='ui-datepicker-days-cell-over';this.regional=[];this.regional['']={closeText:'Done',prevText:'Prev',nextText:'Next',currentText:'Today',monthNames:['January','February','March','April','May','June','July','August','September','October','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],dayNames:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesShort:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],dayNamesMin:['Su','Mo','Tu','We','Th','Fr','Sa'],dateFormat:'mm/dd/yy',firstDay:0,isRTL:false};this._defaults={showOn:'focus',showAnim:'show',showOptions:{},defaultDate:null,appendText:'',buttonText:'...',buttonImage:'',buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:'-10:+10',showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:'+10',minDate:null,maxDate:null,duration:'normal',beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:'',altFormat:'',constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional['']);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>');}
$.extend(Datepicker.prototype,{markerClassName:'hasDatepicker',log:function(){if(this.debug)
console.log.apply('',arguments);},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this;},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute('date:'+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue);}catch(err){inlineSettings[attrName]=attrValue;}}}
var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=='div'||nodeName=='span');if(!target.id)
target.id='dp'+(++this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=='input'){this._connectDatepicker(target,inst);}else if(inline){this._inlineDatepicker(target,inst);}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,'\\\\$1');return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))};},_connectDatepicker:function(target,inst){var input=$(target);if(input.hasClass(this.markerClassName))
return;var appendText=this._get(inst,'appendText');var isRTL=this._get(inst,'isRTL');if(appendText)
input[isRTL?'before':'after']('<span class="'+this._appendClass+'">'+appendText+'</span>');var showOn=this._get(inst,'showOn');if(showOn=='focus'||showOn=='both')
input.focus(this._showDatepicker);if(showOn=='button'||showOn=='both'){var buttonText=this._get(inst,'buttonText');var buttonImage=this._get(inst,'buttonImage');var trigger=$(this._get(inst,'buttonImageOnly')?$('<img/>').addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==''?buttonText:$('<img/>').attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?'before':'after'](trigger);trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target)
$.datepicker._hideDatepicker();else
$.datepicker._showDatepicker(target);return false;});}
input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value;}).bind("getData.datepicker",function(event,key){return this._get(inst,key);});$.data(target,PROP_NAME,inst);},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName))
return;divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value;}).bind("getData.datepicker",function(event,key){return this._get(inst,key);});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst);},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id='dp'+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$('body').append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst);}
extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY];}
this._dialogInput.css('left',this._pos[0]+'px').css('top',this._pos[1]+'px');inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI)
$.blockUI(this.dpDiv);$.data(this._dialogInput[0],PROP_NAME,inst);return this;},_destroyDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return;}
var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=='input'){$target.siblings('.'+this._appendClass).remove().end().siblings('.'+this._triggerClass).remove().end().removeClass(this.markerClassName).unbind('focus',this._showDatepicker).unbind('keydown',this._doKeyDown).unbind('keypress',this._doKeyPress);}else if(nodeName=='div'||nodeName=='span')
$target.removeClass(this.markerClassName).empty();},_enableDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return;}
var nodeName=target.nodeName.toLowerCase();if(nodeName=='input'){target.disabled=false;$target.siblings('button.'+this._triggerClass).each(function(){this.disabled=false;}).end().siblings('img.'+this._triggerClass).css({opacity:'1.0',cursor:''});}
else if(nodeName=='div'||nodeName=='span'){var inline=$target.children('.'+this._inlineClass);inline.children().removeClass('ui-state-disabled');}
this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value);});},_disableDatepicker:function(target){var $target=$(target);if(!$target.hasClass(this.markerClassName)){return;}
var nodeName=target.nodeName.toLowerCase();if(nodeName=='input'){target.disabled=true;$target.siblings('button.'+this._triggerClass).each(function(){this.disabled=true;}).end().siblings('img.'+this._triggerClass).css({opacity:'0.5',cursor:'default'});}
else if(nodeName=='div'||nodeName=='span'){var inline=$target.children('.'+this._inlineClass);inline.children().addClass('ui-state-disabled');}
this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value);});this._disabledInputs[this._disabledInputs.length]=target;},_isDisabledDatepicker:function(target){if(!target){return false;}
for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target)
return true;}
return false;},_getInst:function(target){try{return $.data(target,PROP_NAME);}
catch(err){throw'Missing instance data for this datepicker';}},_optionDatepicker:function(target,name,value){var settings=name||{};if(typeof name=='string'){settings={};settings[name]=value;}
var inst=this._getInst(target);if(inst){if(this._curInst==inst){this._hideDatepicker(null);}
extendRemove(inst.settings,settings);var date=new Date();extendRemove(inst,{rangeStart:null,endDay:null,endMonth:null,endYear:null,selectedDay:date.getDate(),selectedMonth:date.getMonth(),selectedYear:date.getFullYear(),currentDay:date.getDate(),currentMonth:date.getMonth(),currentYear:date.getFullYear(),drawMonth:date.getMonth(),drawYear:date.getFullYear()});this._updateDatepicker(inst);}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value);},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst);}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst);}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline)
this._setDateFromField(inst);return(inst?this._getDate(inst):null);},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is('.ui-datepicker-rtl');inst._keyEvent=true;if($.datepicker._datepickerShowing)
switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,'');break;case 13:var sel=$('td.'+$.datepicker._dayOverClass+', td.'+$.datepicker._currentClass,inst.dpDiv);if(sel[0])
$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0]);else
$.datepicker._hideDatepicker(null,$.datepicker._get(inst,'duration'));return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,'duration'));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,'stepBigMonths'):-$.datepicker._get(inst,'stepMonths')),'M');break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,'stepBigMonths'):+$.datepicker._get(inst,'stepMonths')),'M');break;case 35:if(event.ctrlKey||event.metaKey)$.datepicker._clearDate(event.target);handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey)$.datepicker._gotoToday(event.target);handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey)$.datepicker._adjustDate(event.target,(isRTL?+1:-1),'D');handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey)$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,'stepBigMonths'):-$.datepicker._get(inst,'stepMonths')),'M');break;case 38:if(event.ctrlKey||event.metaKey)$.datepicker._adjustDate(event.target,-7,'D');handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey)$.datepicker._adjustDate(event.target,(isRTL?-1:+1),'D');handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey)$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,'stepBigMonths'):+$.datepicker._get(inst,'stepMonths')),'M');break;case 40:if(event.ctrlKey||event.metaKey)$.datepicker._adjustDate(event.target,+7,'D');handled=event.ctrlKey||event.metaKey;break;default:handled=false;}
else if(event.keyCode==36&&event.ctrlKey)
$.datepicker._showDatepicker(this);else{handled=false;}
if(handled){event.preventDefault();event.stopPropagation();}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,'constrainInput')){var chars=$.datepicker._possibleChars($.datepicker._get(inst,'dateFormat'));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<' '||!chars||chars.indexOf(chr)>-1);}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!='input')
input=$('input',input.parentNode)[0];if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input)
return;var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,'beforeShow');extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,'');$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog)
input.value='';if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight;}
var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css('position')=='fixed';return!isFixed;});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop;}
var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:'absolute',display:'block',top:'-1000px'});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?'static':(isFixed?'fixed':'absolute')),display:'none',left:offset.left+'px',top:offset.top+'px'});if(!inst.inline){var showAnim=$.datepicker._get(inst,'showAnim')||'show';var duration=$.datepicker._get(inst,'duration');var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7)
$('iframe.ui-datepicker-cover').css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4});};if($.effects&&$.effects[showAnim])
inst.dpDiv.show(showAnim,$.datepicker._get(inst,'showOptions'),duration,postProcess);else
inst.dpDiv[showAnim](duration,postProcess);if(duration=='')
postProcess();if(inst.input[0].type!='hidden')
inst.input[0].focus();$.datepicker._curInst=inst;}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find('iframe.ui-datepicker-cover').css({width:dims.width,height:dims.height}).end().find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a').bind('mouseout',function(){$(this).removeClass('ui-state-hover');if(this.className.indexOf('ui-datepicker-prev')!=-1)$(this).removeClass('ui-datepicker-prev-hover');if(this.className.indexOf('ui-datepicker-next')!=-1)$(this).removeClass('ui-datepicker-next-hover');}).bind('mouseover',function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');$(this).addClass('ui-state-hover');if(this.className.indexOf('ui-datepicker-prev')!=-1)$(this).addClass('ui-datepicker-prev-hover');if(this.className.indexOf('ui-datepicker-next')!=-1)$(this).addClass('ui-datepicker-next-hover');}}).end().find('.'+this._dayOverClass+' a').trigger('mouseover').end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass('ui-datepicker-multi-'+cols).css('width',(width*cols)+'em');}else{inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');}
inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?'add':'remove')+'Class']('ui-datepicker-multi');inst.dpDiv[(this._get(inst,'isRTL')?'add':'remove')+'Class']('ui-datepicker-rtl');if(inst.input&&inst.input[0].type!='hidden'&&inst==$.datepicker._curInst)
$(inst.input[0]).focus();},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,'isRTL')?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset;},_findPos:function(obj){while(obj&&(obj.type=='hidden'||obj.nodeType!=1)){obj=obj.nextSibling;}
var position=$(obj).offset();return[position.left,position.top];},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME)))
return;if(inst.stayOpen)
this._selectDate('#'+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,'duration'));var showAnim=this._get(inst,'showAnim');var postProcess=function(){$.datepicker._tidyDialog(inst);};if(duration!=''&&$.effects&&$.effects[showAnim])
inst.dpDiv.hide(showAnim,$.datepicker._get(inst,'showOptions'),duration,postProcess);else
inst.dpDiv[(duration==''?'hide':(showAnim=='slideDown'?'slideUp':(showAnim=='fadeIn'?'fadeOut':'hide')))](duration,postProcess);if(duration=='')
this._tidyDialog(inst);var onClose=this._get(inst,'onClose');if(onClose)
onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():''),inst]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:'absolute',left:'0',top:'-100px'});if($.blockUI){$.unblockUI();$('body').append(this.dpDiv);}}
this._inDialog=false;}
this._curInst=null;},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');},_checkExternalClick:function(event){if(!$.datepicker._curInst)
return;var $target=$(event.target);if(($target.parents('#'+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI))
$.datepicker._hideDatepicker(null,'');},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return;}
this._adjustInstDate(inst,offset+
(period=='M'?this._get(inst,'showCurrentAtPos'):0),period);this._updateDatepicker(inst);},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,'gotoCurrent')&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear;}
else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();}
this._notifyChange(inst);this._adjustDate(target);},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst['selected'+(period=='M'?'Month':'Year')]=inst['draw'+(period=='M'?'Month':'Year')]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target);},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie)
inst.input[0].focus();inst._selectingMonthYear=!inst._selectingMonthYear;},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return;}
var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$('a',td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null;}
this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst);}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,'');},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input)
inst.input.val(dateStr);this._updateAlternate(inst);var onSelect=this._get(inst,'onSelect');if(onSelect)
onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst]);else if(inst.input)
inst.input.trigger('change');if(inst.inline)
this._updateDatepicker(inst);else if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,'duration'));this._lastInput=inst.input[0];if(typeof(inst.input[0])!='object')
inst.input[0].focus();this._lastInput=null;}},_updateAlternate:function(inst){var altField=this._get(inst,'altField');if(altField){var altFormat=this._get(inst,'altFormat')||this._get(inst,'dateFormat');var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr);});}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),''];},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate);}else if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1;}}
return Math.floor(((checkDate-firstMon)/86400000)/7)+1;},parseDate:function(format,value,settings){if(format==null||value==null)
throw'Invalid arguments';value=(typeof value=='object'?value.toString():value+'');if(value=='')
return null;var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches)
iFormat++;return matches;};var getNumber=function(match){lookAhead(match);var origSize=(match=='@'?14:(match=='y'?4:(match=='o'?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>='0'&&value.charAt(iValue)<='9'){num=num*10+parseInt(value.charAt(iValue++),10);size--;}
if(size==origSize)
throw'Missing number at position '+iValue;return num;};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++)
size=Math.max(size,names[j].length);var name='';var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++)
if(name==names[i])
return i+1;size--;}
throw'Unknown name at position '+iInit;};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat))
throw'Unexpected literal at position '+iValue;iValue++;};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal)
if(format.charAt(iFormat)=="'"&&!lookAhead("'"))
literal=false;else
checkLiteral();else
switch(format.charAt(iFormat)){case'd':day=getNumber('d');break;case'D':getName('D',dayNamesShort,dayNames);break;case'o':doy=getNumber('o');break;case'm':month=getNumber('m');break;case'M':month=getName('M',monthNamesShort,monthNames);break;case'y':year=getNumber('y');break;case'@':var date=new Date(getNumber('@'));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'"))
checkLiteral();else
literal=true;break;default:checkLiteral();}}
if(year==-1)
year=new Date().getFullYear();else if(year<100)
year+=new Date().getFullYear()-new Date().getFullYear()%100+
(year<=shortYearCutoff?0:-100);if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim)
break;month++;day-=dim;}while(true);}
var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day)
throw'Invalid date';return date;},ATOM:'yy-mm-dd',COOKIE:'D, dd M yy',ISO_8601:'yy-mm-dd',RFC_822:'D, d M y',RFC_850:'DD, dd-M-y',RFC_1036:'D, d M y',RFC_1123:'D, d M yy',RFC_2822:'D, d M yy',RSS:'D, d M y',TIMESTAMP:'@',W3C:'yy-mm-dd',formatDate:function(format,date,settings){if(!date)
return'';var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches)
iFormat++;return matches;};var formatNumber=function(match,value,len){var num=''+value;if(lookAhead(match))
while(num.length<len)
num='0'+num;return num;};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value]);};var output='';var literal=false;if(date)
for(var iFormat=0;iFormat<format.length;iFormat++){if(literal)
if(format.charAt(iFormat)=="'"&&!lookAhead("'"))
literal=false;else
output+=format.charAt(iFormat);else
switch(format.charAt(iFormat)){case'd':output+=formatNumber('d',date.getDate(),2);break;case'D':output+=formatName('D',date.getDay(),dayNamesShort,dayNames);break;case'o':var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--)
doy+=this._getDaysInMonth(date.getFullYear(),m);output+=formatNumber('o',doy,3);break;case'm':output+=formatNumber('m',date.getMonth()+1,2);break;case'M':output+=formatName('M',date.getMonth(),monthNamesShort,monthNames);break;case'y':output+=(lookAhead('y')?date.getFullYear():(date.getYear()%100<10?'0':'')+date.getYear()%100);break;case'@':output+=date.getTime();break;case"'":if(lookAhead("'"))
output+="'";else
literal=true;break;default:output+=format.charAt(iFormat);}}
return output;},_possibleChars:function(format){var chars='';var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++)
if(literal)
if(format.charAt(iFormat)=="'"&&!lookAhead("'"))
literal=false;else
chars+=format.charAt(iFormat);else
switch(format.charAt(iFormat)){case'd':case'm':case'y':case'@':chars+='0123456789';break;case'D':case'M':return null;case"'":if(lookAhead("'"))
chars+="'";else
literal=true;break;default:chars+=format.charAt(iFormat);}
return chars;},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name];},_setDateFromField:function(inst){var dateFormat=this._get(inst,'dateFormat');var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate;}catch(event){this.log(event);date=defaultDate;}
inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst);},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,'defaultDate'),new Date());var minDate=this._getMinMaxDate(inst,'min',true);var maxDate=this._getMinMaxDate(inst,'max');date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date;},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date;};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||'d'){case'd':case'D':day+=parseInt(matches[1],10);break;case'w':case'W':day+=parseInt(matches[1],10)*7;break;case'm':case'M':month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case'y':case'Y':year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;}
matches=pattern.exec(offset);}
return new Date(year,month,day);};date=(date==null?defaultDate:(typeof date=='string'?offsetString(date,this._getDaysInMonth):(typeof date=='number'?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=='Invalid Date'?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0);}
return this._daylightSavingAdjust(date);},_daylightSavingAdjust:function(date){if(!date)return null;date.setHours(date.getHours()>12?date.getHours()+2:0);return date;},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear)
this._notifyChange(inst);this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?'':this._formatDate(inst));}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=='')?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate;},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,'isRTL');var showButtonPanel=this._get(inst,'showButtonPanel');var hideIfNoPrevNext=this._get(inst,'hideIfNoPrevNext');var navigationAsDateFormat=this._get(inst,'navigationAsDateFormat');var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,'showCurrentAtPos');var stepMonths=this._get(inst,'stepMonths');var stepBigMonths=this._get(inst,'stepBigMonths');var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,'min',true);var maxDate=this._getMinMaxDate(inst,'max');var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--;}
if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--;}}}
inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,'prevText');prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+'\', -'+stepMonths+', \'M\');"'+' title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?'e':'w')+'">'+prevText+'</span></a>':(hideIfNoPrevNext?'':'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?'e':'w')+'">'+prevText+'</span></a>'));var nextText=this._get(inst,'nextText');nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+'\', +'+stepMonths+', \'M\');"'+' title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?'w':'e')+'">'+nextText+'</span></a>':(hideIfNoPrevNext?'':'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?'w':'e')+'">'+nextText+'</span></a>'));var currentText=this._get(inst,'currentText');var gotoDate=(this._get(inst,'gotoCurrent')&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,'closeText')+'</button>':'');var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:'')+
(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+'\');"'+'>'+currentText+'</button>':'')+(isRTL?'':controls)+'</div>':'';var firstDay=parseInt(this._get(inst,'firstDay'),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,'dayNames');var dayNamesShort=this._get(inst,'dayNamesShort');var dayNamesMin=this._get(inst,'dayNamesMin');var monthNames=this._get(inst,'monthNames');var monthNamesShort=this._get(inst,'monthNamesShort');var beforeShowDay=this._get(inst,'beforeShowDay');var showOtherMonths=this._get(inst,'showOtherMonths');var calculateWeek=this._get(inst,'calculateWeek')||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html='';for(var row=0;row<numMonths[0];row++){var group='';for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=' ui-corner-all';var calender='';if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+='first';cornerClass=' ui-corner-'+(isRTL?'right':'left');break;case numMonths[1]-1:calender+='last';cornerClass=' ui-corner-'+(isRTL?'left':'right');break;default:calender+='middle';cornerClass='';break;}
calender+='">';}
calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+
(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):'')+
(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):'')+
this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead>'+'<tr>';var thead='';for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+='<th'+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':'')+'>'+'<span title="'+dayNames[day]+'">'+dayNamesMin[day]+'</span></th>';}
calender+=thead+'</tr></thead><tbody>';var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth)
inst.selectedDay=Math.min(inst.selectedDay,daysInMonth);var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+='<tr>';var tbody='';for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,'']);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+
((dow+firstDay+6)%7>=5?' ui-datepicker-week-end':'')+
(otherMonth?' ui-datepicker-other-month':'')+
((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?' '+this._dayOverClass:'')+
(unselectable?' '+this._unselectableClass+' ui-state-disabled':'')+
(otherMonth&&!showOtherMonths?'':' '+daySettings[1]+
(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?' '+this._currentClass:'')+
(printDate.getTime()==today.getTime()?' ui-datepicker-today':''))+'"'+
((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':'')+
(unselectable?'':' onclick="DP_jQuery.datepicker._selectDay(\'#'+
inst.id+'\','+drawMonth+','+drawYear+', this);return false;"')+'>'+
(otherMonth?(showOtherMonths?printDate.getDate():'&#xa0;'):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+'</span>':'<a class="ui-state-default'+
(printDate.getTime()==today.getTime()?' ui-state-highlight':'')+
(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?' ui-state-active':'')+'" href="#">'+printDate.getDate()+'</a>'))+'</td>';printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate);}
calender+=tbody+'</tr>';}
drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++;}
calender+='</tbody></table>'+(isMultiMonth?'</div>'+
((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':''):'');group+=calender;}
html+=group;}
html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':'');inst._keyEvent=false;return html;},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,'changeMonth');var changeYear=this._get(inst,'changeYear');var showMonthAfterYear=this._get(inst,'showMonthAfterYear');var html='<div class="ui-datepicker-title">';var monthHtml='';if(secondary||!changeMonth)
monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+'</span> ';else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" '+'onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+'\', this, \'M\');" '+'onclick="DP_jQuery.datepicker._clickMonthYear(\'#'+inst.id+'\');"'+'>';for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth()))
monthHtml+='<option value="'+month+'"'+
(month==drawMonth?' selected="selected"':'')+'>'+monthNamesShort[month]+'</option>';}
monthHtml+='</select>';}
if(!showMonthAfterYear)
html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?'&#xa0;':'');if(secondary||!changeYear)
html+='<span class="ui-datepicker-year">'+drawYear+'</span>';else{var years=this._get(inst,'yearRange').split(':');var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10;}else if(years[0].charAt(0)=='+'||years[0].charAt(0)=='-'){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10);}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10);}
year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" '+'onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+'\', this, \'Y\');" '+'onclick="DP_jQuery.datepicker._clickMonthYear(\'#'+inst.id+'\');"'+'>';for(;year<=endYear;year++){html+='<option value="'+year+'"'+
(year==drawYear?' selected="selected"':'')+'>'+year+'</option>';}
html+='</select>';}
if(showMonthAfterYear)
html+=(secondary||changeMonth||changeYear?'&#xa0;':'')+monthHtml;html+='</div>';return html;},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=='Y'?offset:0);var month=inst.drawMonth+(period=='M'?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+
(period=='D'?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,'min',true);var maxDate=this._getMinMaxDate(inst,'max');date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=='M'||period=='Y')
this._notifyChange(inst);},_notifyChange:function(inst){var onChange=this._get(inst,'onChangeMonthYear');if(onChange)
onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst]);},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,'numberOfMonths');return(numMonths==null?[1,1]:(typeof numMonths=='number'?[1,numMonths]:numMonths));},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+'Date'),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date));},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate();},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay();},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0)
date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()));return this._isInRange(inst,date);},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,'min');var maxDate=this._getMinMaxDate(inst,'max');return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate));},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,'shortYearCutoff');shortYearCutoff=(typeof shortYearCutoff!='string'?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,'dayNamesShort'),dayNames:this._get(inst,'dayNames'),monthNamesShort:this._get(inst,'monthNamesShort'),monthNames:this._get(inst,'monthNames')};},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear;}
var date=(day?(typeof day=='object'?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,'dateFormat'),date,this._getFormatConfig(inst));}});function extendRemove(target,props){$.extend(target,props);for(var name in props)
if(props[name]==null||props[name]==undefined)
target[name]=props[name];return target;};function isArray(a){return(a&&(($.browser.safari&&typeof a=='object'&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))));};$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find('body').append($.datepicker.dpDiv);$.datepicker.initialized=true;}
var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=='string'&&(options=='isDisabled'||options=='getDate'))
return $.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this[0]].concat(otherArgs));return this.each(function(){typeof options=='string'?$.datepicker['_'+options+'Datepicker'].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options);});};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7";window.DP_jQuery=$;})(jQuery);(function($){$.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar"
+" ui-widget"
+" ui-widget-content"
+" ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=$('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue();},destroy:function(){this.element.removeClass("ui-progressbar"
+" ui-widget"
+" ui-widget-content"
+" ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();$.widget.prototype.destroy.apply(this,arguments);},value:function(newValue){arguments.length&&this._setData("value",newValue);return this._value();},_setData:function(key,value){switch(key){case'value':this.options.value=value;this._refreshValue();this._trigger('change',null,{});break;}
$.widget.prototype._setData.apply(this,arguments);},_value:function(){var val=this.options.value;if(val<this._valueMin())val=this._valueMin();if(val>this._valueMax())val=this._valueMax();return val;},_valueMin:function(){var valueMin=0;return valueMin;},_valueMax:function(){var valueMax=100;return valueMax;},_refreshValue:function(){var value=this.value();this.valueDiv[value==this._valueMax()?'addClass':'removeClass']("ui-corner-right");this.valueDiv.width(value+'%');this.element.attr("aria-valuenow",value);}});$.extend($.ui.progressbar,{version:"1.7",defaults:{value:0}});})(jQuery);;jQuery.effects||(function($){$.effects={version:"1.7",save:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null)element.data("ec.storage."+set[i],element[0].style[set[i]]);}},restore:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null)element.css(set[i],element.data("ec.storage."+set[i]));}},setMode:function(el,mode){if(mode=='toggle')mode=el.is(':hidden')?'show':'hide';return mode;},getBaseline:function(origin,original){var y,x;switch(origin[0]){case'top':y=0;break;case'middle':y=0.5;break;case'bottom':y=1;break;default:y=origin[0]/original.height;};switch(origin[1]){case'left':x=0;break;case'center':x=0.5;break;case'right':x=1;break;default:x=origin[1]/original.width;};return{x:x,y:y};},createWrapper:function(element){if(element.parent().is('.ui-effects-wrapper'))
return element.parent();var props={width:element.outerWidth(true),height:element.outerHeight(true),'float':element.css('float')};element.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var wrapper=element.parent();if(element.css('position')=='static'){wrapper.css({position:'relative'});element.css({position:'relative'});}else{var top=element.css('top');if(isNaN(parseInt(top,10)))top='auto';var left=element.css('left');if(isNaN(parseInt(left,10)))left='auto';wrapper.css({position:element.css('position'),top:top,left:left,zIndex:element.css('z-index')}).show();element.css({position:'relative',top:0,left:0});}
wrapper.css(props);return wrapper;},removeWrapper:function(element){if(element.parent().is('.ui-effects-wrapper'))
return element.parent().replaceWith(element);return element;},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){unit=element.cssUnit(x);if(unit[0]>0)value[x]=unit[0]*factor+unit[1];});return value;},animateClass:function(value,duration,easing,callback){var cb=(typeof easing=="function"?easing:(callback?callback:null));var ea=(typeof easing=="string"?easing:null);return this.each(function(){var offset={};var that=$(this);var oldStyleAttr=that.attr("style")||'';if(typeof oldStyleAttr=='object')oldStyleAttr=oldStyleAttr["cssText"];if(value.toggle){that.hasClass(value.toggle)?value.remove=value.toggle:value.add=value.toggle;}
var oldStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add)that.addClass(value.add);if(value.remove)that.removeClass(value.remove);var newStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add)that.removeClass(value.add);if(value.remove)that.addClass(value.remove);for(var n in newStyle){if(typeof newStyle[n]!="function"&&newStyle[n]&&n.indexOf("Moz")==-1&&n.indexOf("length")==-1&&newStyle[n]!=oldStyle[n]&&(n.match(/color/i)||(!n.match(/color/i)&&!isNaN(parseInt(newStyle[n],10))))&&(oldStyle.position!="static"||(oldStyle.position=="static"&&!n.match(/left|top|bottom|right/))))offset[n]=newStyle[n];}
that.animate(offset,duration,ea,function(){if(typeof $(this).attr("style")=='object'){$(this).attr("style")["cssText"]="";$(this).attr("style")["cssText"]=oldStyleAttr;}else $(this).attr("style",oldStyleAttr);if(value.add)$(this).addClass(value.add);if(value.remove)$(this).removeClass(value.remove);if(cb)cb.apply(this,arguments);});});}};function _normalizeArguments(a,m){var o=a[1]&&a[1].constructor==Object?a[1]:{};if(m)o.mode=m;var speed=a[1]&&a[1].constructor!=Object?a[1]:(o.duration?o.duration:a[2]);speed=$.fx.off?0:typeof speed==="number"?speed:$.fx.speeds[speed]||$.fx.speeds._default;var callback=o.callback||($.isFunction(a[1])&&a[1])||($.isFunction(a[2])&&a[2])||($.isFunction(a[3])&&a[3]);return[a[0],o,speed,callback];}
$.fn.extend({_show:$.fn.show,_hide:$.fn.hide,__toggle:$.fn.toggle,_addClass:$.fn.addClass,_removeClass:$.fn.removeClass,_toggleClass:$.fn.toggleClass,effect:function(fx,options,speed,callback){return $.effects[fx]?$.effects[fx].call(this,{method:fx,options:options||{},duration:speed,callback:callback}):null;},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0])))
return this._show.apply(this,arguments);else{return this.effect.apply(this,_normalizeArguments(arguments,'show'));}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0])))
return this._hide.apply(this,arguments);else{return this.effect.apply(this,_normalizeArguments(arguments,'hide'));}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(arguments[0].constructor==Function))
return this.__toggle.apply(this,arguments);else{return this.effect.apply(this,_normalizeArguments(arguments,'toggle'));}},addClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{add:classNames},speed,easing,callback]):this._addClass(classNames);},removeClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{remove:classNames},speed,easing,callback]):this._removeClass(classNames);},toggleClass:function(classNames,speed,easing,callback){return((typeof speed!=="boolean")&&speed)?$.effects.animateClass.apply(this,[{toggle:classNames},speed,easing,callback]):this._toggleClass(classNames,speed);},morph:function(remove,add,speed,easing,callback){return $.effects.animateClass.apply(this,[{add:add,remove:remove},speed,easing,callback]);},switchClass:function(){return this.morph.apply(this,arguments);},cssUnit:function(key){var style=this.css(key),val=[];$.each(['em','px','%','pt'],function(i,unit){if(style.indexOf(unit)>0)
val=[parseFloat(style),unit];});return val;}});$.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){$.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);}
fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2],10),255),0)].join(",")+")";};});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)
return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return[parseInt(result[1],10),parseInt(result[2],10),parseInt(result[3],10)];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];if(result=/rgba\(0, 0, 0, 0\)/.exec(color))
return colors['transparent'];return colors[$.trim(color).toLowerCase()];}
function getColor(elem,attr){var color;do{color=$.curCSS(elem,attr);if(color!=''&&color!='transparent'||$.nodeName(elem,"body"))
break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};$.easing.jswing=$.easing.swing;$.extend($.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return $.easing[$.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-$.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return $.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return $.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});})(jQuery);(function($){$.effects.blind=function(o){return this.queue(function(){var el=$(this),props=['position','top','left'];var mode=$.effects.setMode(el,o.options.mode||'hide');var direction=o.options.direction||'vertical';$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:'hidden'});var ref=(direction=='vertical')?'height':'width';var distance=(direction=='vertical')?wrapper.height():wrapper.width();if(mode=='show')wrapper.css(ref,0);var animation={};animation[ref]=mode=='show'?distance:0;wrapper.animate(animation,o.duration,o.options.easing,function(){if(mode=='hide')el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(el[0],arguments);el.dequeue();});});};})(jQuery);(function($){$.effects.bounce=function(o){return this.queue(function(){var el=$(this),props=['position','top','left'];var mode=$.effects.setMode(el,o.options.mode||'effect');var direction=o.options.direction||'up';var distance=o.options.distance||20;var times=o.options.times||5;var speed=o.duration||250;if(/show|hide/.test(mode))props.push('opacity');$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=='up'||direction=='down')?'top':'left';var motion=(direction=='up'||direction=='left')?'pos':'neg';var distance=o.options.distance||(ref=='top'?el.outerHeight({margin:true})/3:el.outerWidth({margin:true})/3);if(mode=='show')el.css('opacity',0).css(ref,motion=='pos'?-distance:distance);if(mode=='hide')distance=distance/(times*2);if(mode!='hide')times--;if(mode=='show'){var animation={opacity:1};animation[ref]=(motion=='pos'?'+=':'-=')+distance;el.animate(animation,speed/2,o.options.easing);distance=distance/2;times--;};for(var i=0;i<times;i++){var animation1={},animation2={};animation1[ref]=(motion=='pos'?'-=':'+=')+distance;animation2[ref]=(motion=='pos'?'+=':'-=')+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing);distance=(mode=='hide')?distance*2:distance/2;};if(mode=='hide'){var animation={opacity:0};animation[ref]=(motion=='pos'?'-=':'+=')+distance;el.animate(animation,speed/2,o.options.easing,function(){el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);});}else{var animation1={},animation2={};animation1[ref]=(motion=='pos'?'-=':'+=')+distance;animation2[ref]=(motion=='pos'?'+=':'-=')+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);});};el.queue('fx',function(){el.dequeue();});el.dequeue();});};})(jQuery);(function($){$.effects.clip=function(o){return this.queue(function(){var el=$(this),props=['position','top','left','height','width'];var mode=$.effects.setMode(el,o.options.mode||'hide');var direction=o.options.direction||'vertical';$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:'hidden'});var animate=el[0].tagName=='IMG'?wrapper:el;var ref={size:(direction=='vertical')?'height':'width',position:(direction=='vertical')?'top':'left'};var distance=(direction=='vertical')?animate.height():animate.width();if(mode=='show'){animate.css(ref.size,0);animate.css(ref.position,distance/2);}
var animation={};animation[ref.size]=mode=='show'?distance:0;animation[ref.position]=mode=='show'?0:distance/2;animate.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=='hide')el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(el[0],arguments);el.dequeue();}});});};})(jQuery);(function($){$.effects.drop=function(o){return this.queue(function(){var el=$(this),props=['position','top','left','opacity'];var mode=$.effects.setMode(el,o.options.mode||'hide');var direction=o.options.direction||'left';$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=='up'||direction=='down')?'top':'left';var motion=(direction=='up'||direction=='left')?'pos':'neg';var distance=o.options.distance||(ref=='top'?el.outerHeight({margin:true})/2:el.outerWidth({margin:true})/2);if(mode=='show')el.css('opacity',0).css(ref,motion=='pos'?-distance:distance);var animation={opacity:mode=='show'?1:0};animation[ref]=(mode=='show'?(motion=='pos'?'+=':'-='):(motion=='pos'?'-=':'+='))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=='hide')el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);el.dequeue();}});});};})(jQuery);(function($){$.effects.explode=function(o){return this.queue(function(){var rows=o.options.pieces?Math.round(Math.sqrt(o.options.pieces)):3;var cells=o.options.pieces?Math.round(Math.sqrt(o.options.pieces)):3;o.options.mode=o.options.mode=='toggle'?($(this).is(':visible')?'hide':'show'):o.options.mode;var el=$(this).show().css('visibility','hidden');var offset=el.offset();offset.top-=parseInt(el.css("marginTop"),10)||0;offset.left-=parseInt(el.css("marginLeft"),10)||0;var width=el.outerWidth(true);var height=el.outerHeight(true);for(var i=0;i<rows;i++){for(var j=0;j<cells;j++){el.clone().appendTo('body').wrap('<div></div>').css({position:'absolute',visibility:'visible',left:-j*(width/cells),top:-i*(height/rows)}).parent().addClass('ui-effects-explode').css({position:'absolute',overflow:'hidden',width:width/cells,height:height/rows,left:offset.left+j*(width/cells)+(o.options.mode=='show'?(j-Math.floor(cells/2))*(width/cells):0),top:offset.top+i*(height/rows)+(o.options.mode=='show'?(i-Math.floor(rows/2))*(height/rows):0),opacity:o.options.mode=='show'?0:1}).animate({left:offset.left+j*(width/cells)+(o.options.mode=='show'?0:(j-Math.floor(cells/2))*(width/cells)),top:offset.top+i*(height/rows)+(o.options.mode=='show'?0:(i-Math.floor(rows/2))*(height/rows)),opacity:o.options.mode=='show'?1:0},o.duration||500);}}
setTimeout(function(){o.options.mode=='show'?el.css({visibility:'visible'}):el.css({visibility:'visible'}).hide();if(o.callback)o.callback.apply(el[0]);el.dequeue();$('div.ui-effects-explode').remove();},o.duration||500);});};})(jQuery);(function($){$.effects.fold=function(o){return this.queue(function(){var el=$(this),props=['position','top','left'];var mode=$.effects.setMode(el,o.options.mode||'hide');var size=o.options.size||15;var horizFirst=!(!o.options.horizFirst);var duration=o.duration?o.duration/2:$.fx.speeds._default/2;$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:'hidden'});var widthFirst=((mode=='show')!=horizFirst);var ref=widthFirst?['width','height']:['height','width'];var distance=widthFirst?[wrapper.width(),wrapper.height()]:[wrapper.height(),wrapper.width()];var percent=/([0-9]+)%/.exec(size);if(percent)size=parseInt(percent[1],10)/100*distance[mode=='hide'?0:1];if(mode=='show')wrapper.css(horizFirst?{height:0,width:size}:{height:size,width:0});var animation1={},animation2={};animation1[ref[0]]=mode=='show'?distance[0]:size;animation2[ref[1]]=mode=='show'?distance[1]:0;wrapper.animate(animation1,duration,o.options.easing).animate(animation2,duration,o.options.easing,function(){if(mode=='hide')el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(el[0],arguments);el.dequeue();});});};})(jQuery);(function($){$.effects.highlight=function(o){return this.queue(function(){var el=$(this),props=['backgroundImage','backgroundColor','opacity'];var mode=$.effects.setMode(el,o.options.mode||'show');var color=o.options.color||"#ffff99";var oldColor=el.css("backgroundColor");$.effects.save(el,props);el.show();el.css({backgroundImage:'none',backgroundColor:color});var animation={backgroundColor:oldColor};if(mode=="hide")animation['opacity']=0;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide")el.hide();$.effects.restore(el,props);if(mode=="show"&&$.browser.msie)this.style.removeAttribute('filter');if(o.callback)o.callback.apply(this,arguments);el.dequeue();}});});};})(jQuery);(function($){$.effects.pulsate=function(o){return this.queue(function(){var el=$(this);var mode=$.effects.setMode(el,o.options.mode||'show');var times=o.options.times||5;var duration=o.duration?o.duration/2:$.fx.speeds._default/2;if(mode=='hide')times--;if(el.is(':hidden')){el.css('opacity',0);el.show();el.animate({opacity:1},duration,o.options.easing);times=times-2;}
for(var i=0;i<times;i++){el.animate({opacity:0},duration,o.options.easing).animate({opacity:1},duration,o.options.easing);};if(mode=='hide'){el.animate({opacity:0},duration,o.options.easing,function(){el.hide();if(o.callback)o.callback.apply(this,arguments);});}else{el.animate({opacity:0},duration,o.options.easing).animate({opacity:1},duration,o.options.easing,function(){if(o.callback)o.callback.apply(this,arguments);});};el.queue('fx',function(){el.dequeue();});el.dequeue();});};})(jQuery);(function($){$.effects.puff=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||'hide');var percent=parseInt(o.options.percent,10)||150;options.fade=true;var original={height:el.height(),width:el.width()};var factor=percent/100;el.from=(mode=='hide')?original:{height:original.height*factor,width:original.width*factor};options.from=el.from;options.percent=(mode=='hide')?percent:100;options.mode=mode;el.effect('scale',options,o.duration,o.callback);el.dequeue();});};$.effects.scale=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||'effect');var percent=parseInt(o.options.percent,10)||(parseInt(o.options.percent,10)==0?0:(mode=='hide'?0:100));var direction=o.options.direction||'both';var origin=o.options.origin;if(mode!='effect'){options.origin=origin||['middle','center'];options.restore=true;}
var original={height:el.height(),width:el.width()};el.from=o.options.from||(mode=='show'?{height:0,width:0}:original);var factor={y:direction!='horizontal'?(percent/100):1,x:direction!='vertical'?(percent/100):1};el.to={height:original.height*factor.y,width:original.width*factor.x};if(o.options.fade){if(mode=='show'){el.from.opacity=0;el.to.opacity=1;};if(mode=='hide'){el.from.opacity=1;el.to.opacity=0;};};options.from=el.from;options.to=el.to;options.mode=mode;el.effect('size',options,o.duration,o.callback);el.dequeue();});};$.effects.size=function(o){return this.queue(function(){var el=$(this),props=['position','top','left','width','height','overflow','opacity'];var props1=['position','top','left','overflow','opacity'];var props2=['width','height','overflow'];var cProps=['fontSize'];var vProps=['borderTopWidth','borderBottomWidth','paddingTop','paddingBottom'];var hProps=['borderLeftWidth','borderRightWidth','paddingLeft','paddingRight'];var mode=$.effects.setMode(el,o.options.mode||'effect');var restore=o.options.restore||false;var scale=o.options.scale||'both';var origin=o.options.origin;var original={height:el.height(),width:el.width()};el.from=o.options.from||original;el.to=o.options.to||original;if(origin){var baseline=$.effects.getBaseline(origin,original);el.from.top=(original.height-el.from.height)*baseline.y;el.from.left=(original.width-el.from.width)*baseline.x;el.to.top=(original.height-el.to.height)*baseline.y;el.to.left=(original.width-el.to.width)*baseline.x;};var factor={from:{y:el.from.height/original.height,x:el.from.width/original.width},to:{y:el.to.height/original.height,x:el.to.width/original.width}};if(scale=='box'||scale=='both'){if(factor.from.y!=factor.to.y){props=props.concat(vProps);el.from=$.effects.setTransition(el,vProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,vProps,factor.to.y,el.to);};if(factor.from.x!=factor.to.x){props=props.concat(hProps);el.from=$.effects.setTransition(el,hProps,factor.from.x,el.from);el.to=$.effects.setTransition(el,hProps,factor.to.x,el.to);};};if(scale=='content'||scale=='both'){if(factor.from.y!=factor.to.y){props=props.concat(cProps);el.from=$.effects.setTransition(el,cProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,cProps,factor.to.y,el.to);};};$.effects.save(el,restore?props:props1);el.show();$.effects.createWrapper(el);el.css('overflow','hidden').css(el.from);if(scale=='content'||scale=='both'){vProps=vProps.concat(['marginTop','marginBottom']).concat(cProps);hProps=hProps.concat(['marginLeft','marginRight']);props2=props.concat(vProps).concat(hProps);el.find("*[width]").each(function(){child=$(this);if(restore)$.effects.save(child,props2);var c_original={height:child.height(),width:child.width()};child.from={height:c_original.height*factor.from.y,width:c_original.width*factor.from.x};child.to={height:c_original.height*factor.to.y,width:c_original.width*factor.to.x};if(factor.from.y!=factor.to.y){child.from=$.effects.setTransition(child,vProps,factor.from.y,child.from);child.to=$.effects.setTransition(child,vProps,factor.to.y,child.to);};if(factor.from.x!=factor.to.x){child.from=$.effects.setTransition(child,hProps,factor.from.x,child.from);child.to=$.effects.setTransition(child,hProps,factor.to.x,child.to);};child.css(child.from);child.animate(child.to,o.duration,o.options.easing,function(){if(restore)$.effects.restore(child,props2);});});};el.animate(el.to,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=='hide')el.hide();$.effects.restore(el,restore?props:props1);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);el.dequeue();}});});};})(jQuery);(function($){$.effects.shake=function(o){return this.queue(function(){var el=$(this),props=['position','top','left'];var mode=$.effects.setMode(el,o.options.mode||'effect');var direction=o.options.direction||'left';var distance=o.options.distance||20;var times=o.options.times||3;var speed=o.duration||o.options.duration||140;$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=='up'||direction=='down')?'top':'left';var motion=(direction=='up'||direction=='left')?'pos':'neg';var animation={},animation1={},animation2={};animation[ref]=(motion=='pos'?'-=':'+=')+distance;animation1[ref]=(motion=='pos'?'+=':'-=')+distance*2;animation2[ref]=(motion=='pos'?'-=':'+=')+distance*2;el.animate(animation,speed,o.options.easing);for(var i=1;i<times;i++){el.animate(animation1,speed,o.options.easing).animate(animation2,speed,o.options.easing);};el.animate(animation1,speed,o.options.easing).animate(animation,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);});el.queue('fx',function(){el.dequeue();});el.dequeue();});};})(jQuery);(function($){$.effects.slide=function(o){return this.queue(function(){var el=$(this),props=['position','top','left'];var mode=$.effects.setMode(el,o.options.mode||'show');var direction=o.options.direction||'left';$.effects.save(el,props);el.show();$.effects.createWrapper(el).css({overflow:'hidden'});var ref=(direction=='up'||direction=='down')?'top':'left';var motion=(direction=='up'||direction=='left')?'pos':'neg';var distance=o.options.distance||(ref=='top'?el.outerHeight({margin:true}):el.outerWidth({margin:true}));if(mode=='show')el.css(ref,motion=='pos'?-distance:distance);var animation={};animation[ref]=(mode=='show'?(motion=='pos'?'+=':'-='):(motion=='pos'?'-=':'+='))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=='hide')el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback)o.callback.apply(this,arguments);el.dequeue();}});});};})(jQuery);(function($){$.effects.transfer=function(o){return this.queue(function(){var elem=$(this),target=$(o.options.to),endPosition=target.offset(),animation={top:endPosition.top,left:endPosition.left,height:target.innerHeight(),width:target.innerWidth()},startPosition=elem.offset(),transfer=$('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(o.options.className).css({top:startPosition.top,left:startPosition.left,height:elem.innerHeight(),width:elem.innerWidth(),position:'absolute'}).animate(animation,o.duration,o.options.easing,function(){transfer.remove();(o.callback&&o.callback.apply(elem[0],arguments));elem.dequeue();});});};})(jQuery);

(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+
(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)
this.insertBefore(document.createElement(html),this.firstChild);});}
return this;};})(jQuery);

jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};

(function($){$.fn.ajaxSubmit=function(options){if(typeof options=='function')
options={success:options};options=$.extend({url:this.attr('action')||window.location,type:this.attr('method')||'GET'},options||{});var veto={};$.event.trigger('form.pre.serialize',[this,options,veto]);if(veto.veto)return this;var a=this.formToArray(options.semantic);if(options.data){for(var n in options.data)
a.push({name:n,value:options.data[n]});}
if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false)return this;$.event.trigger('form.submit.validate',[a,this,options,veto]);if(veto.veto)return this;var q=$.param(a);if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}
else
options.data=q;var $form=this,callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm();});if(options.clearForm)callbacks.push(function(){$form.clearForm();});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){if(this.evalScripts)
$(options.target).attr("innerHTML",data).evalScripts().each(oldSuccess,arguments);else
$(options.target).html(data).each(oldSuccess,arguments);});}
else if(options.success)
callbacks.push(options.success);options.success=function(data,status){for(var i=0,max=callbacks.length;i<max;i++)
callbacks[i](data,status,$form);};var files=$('input:file',this).fieldValue();var found=false;for(var j=0;j<files.length;j++)
if(files[j])
found=true;if(options.iframe||found)
fileUpload();else
$.ajax(options);$.event.trigger('form.submit.notify',[this,options]);return this;function fileUpload(){var form=$form[0];var opts=$.extend({},$.ajaxSettings,options);var id='jqFormIO'+$.fn.ajaxSubmit.counter++;var $io=$('<iframe id="'+id+'" name="'+id+'" />');var io=$io[0];var op8=$.browser.opera&&window.opera.version()<9;if($.browser.msie||op8)io.src='javascript:false;document.write("");';$io.css({position:'absolute',top:'-1000px',left:'-1000px'});var xhr={responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){}};var g=opts.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr,opts]);var cbInvoked=0;var timedOut=0;setTimeout(function(){$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);var encAttr=form.encoding?'encoding':'enctype';var t=$form.attr('target');$form.attr({target:id,method:'POST',action:opts.url});form[encAttr]='multipart/form-data';if(opts.timeout)
setTimeout(function(){timedOut=true;cb();},opts.timeout);form.submit();$form.attr('target',t);},10);function cb(){if(cbInvoked++)return;io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var ok=true;try{if(timedOut)throw'timeout';var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(opts.dataType=='json'||opts.dataType=='script'){var ta=doc.getElementsByTagName('textarea')[0];data=ta?ta.value:xhr.responseText;if(opts.dataType=='json')
eval("data = "+data);else
$.globalEval(data);}
else if(opts.dataType=='xml'){data=xhr.responseXML;if(!data&&xhr.responseText!=null)
data=toXml(xhr.responseText);}
else{data=xhr.responseText;}}
catch(e){ok=false;$.handleError(opts,xhr,'error',e);}
if(ok){opts.success(data,'success');if(g)$.event.trigger("ajaxSuccess",[xhr,opts]);}
if(g)$.event.trigger("ajaxComplete",[xhr,opts]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(opts.complete)opts.complete(xhr,ok?'success':'error');setTimeout(function(){$io.remove();xhr.responseXML=null;},100);};function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}
else
doc=(new DOMParser()).parseFromString(s,'text/xml');return(doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror')?doc:null;};};};$.fn.ajaxSubmit.counter=0;$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().submit(submitHandler).each(function(){this.formPluginId=$.fn.ajaxForm.counter++;$.fn.ajaxForm.optionHash[this.formPluginId]=options;$(":submit,input:image",this).click(clickHandler);});};$.fn.ajaxForm.counter=1;$.fn.ajaxForm.optionHash={};function clickHandler(e){var $form=this.form;$form.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){$form.clk_x=e.offsetX;$form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$(this).offset();$form.clk_x=e.pageX-offset.left;$form.clk_y=e.pageY-offset.top;}else{$form.clk_x=e.pageX-this.offsetLeft;$form.clk_y=e.pageY-this.offsetTop;}}
setTimeout(function(){$form.clk=$form.clk_x=$form.clk_y=null;},10);};function submitHandler(){var id=this.formPluginId;var options=$.fn.ajaxForm.optionHash[id];$(this).ajaxSubmit(options);return false;};$.fn.ajaxFormUnbind=function(){this.unbind('submit',submitHandler);return this.each(function(){$(":submit,input:image",this).unbind('click',clickHandler);});};$.fn.formToArray=function(semantic){var a=[];if(this.length==0)return a;var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els)return a;for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n)continue;if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el)
a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});continue;}
var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)
a.push({name:n,value:v[j]});}
else if(v!==null&&typeof v!='undefined')
a.push({name:n,value:v});}
if(!semantic&&form.clk){var inputs=form.getElementsByTagName("input");for(var i=0,max=inputs.length;i<max;i++){var input=inputs[i];var n=input.name;if(n&&!input.disabled&&input.type=="image"&&form.clk==input)
a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}}
return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++)
a.push({name:n,value:v[i]});}
else if(v!==null&&typeof v!='undefined')
a.push({name:this.name,value:v});});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length))
continue;v.constructor==Array?$.merge(val,v):val.push(v);}
return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful=='undefined')successful=true;if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1))
return null;if(tag=='select'){var index=el.selectedIndex;if(index<0)return null;var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=$.browser.msie&&!(op.attributes['value'].specified)?op.text:op.value;if(one)return v;a.push(v);}}
return a;}
return el.value;};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=='text'||t=='password'||tag=='textarea')
this.value='';else if(t=='checkbox'||t=='radio')
this.checked=false;else if(tag=='select')
this.selectedIndex=-1;});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType))
this.reset();});};})(jQuery);

jQuery.fn.editable=function(target,options,callback){if(this.length==0){return(this);};var settings={target:target,name:'value',id:'id',type:'text',width:'auto',height:'auto',event:'click',onblur:'cancel',loadtype:'GET'};if(options){jQuery.extend(settings,options);};var callback=callback||function(){};jQuery(this).attr('title',settings.tooltip);jQuery(this)[settings.event](function(e){var self=this;if(self.editing){return;}
var width=('auto'==settings.width)?jQuery(self).width():settings.width;var height=('auto'==settings.height)?jQuery(self).height():settings.height;self.editing=true;self.revert=jQuery(self).html();self.innerHTML='';var f=document.createElement('form');if(settings.cssclass){if('inherit'==settings.cssclass){jQuery(f).attr('class',jQuery(self).attr('class'));}else{jQuery(f).attr('class',settings.cssclass);}}
if(settings.style){if('inherit'==settings.style){jQuery(f).attr('style',jQuery(self).attr('style'));jQuery(f).css('display',jQuery(self).css('display'));}else{jQuery(f).attr('style',settings.style);}}
var i;switch(settings.type){case'textarea':i=document.createElement('textarea');if(settings.rows){i.rows=settings.rows;}else{jQuery(i).height(height);}
if(settings.cols){i.cols=settings.cols;}else{jQuery(i).width(width);}
break;case'select':i=document.createElement('select');break;default:i=document.createElement('input');i.type=settings.type;jQuery(i).width(width);jQuery(i).height(height);i.setAttribute('autocomplete','off');}
if(settings.getload){settings.loadurl=settings.getload;settings.loadtype='GET';}else if(settings.postload){settings.loadurl=settings.postload;settings.loadtype='POST';}
if(settings.loadurl){var data={};data[settings.id]=self.id;jQuery.ajax({type:settings.loadtype,url:settings.loadurl,data:data,success:function(str){setInputContent(str);}});}else if(settings.data){setInputContent(settings.data);}else{setInputContent(self.revert);}
i.name=settings.name;f.appendChild(i);if(settings.submit){var b=document.createElement('input');b.type='submit';b.className="button";b.value=settings.submit;f.appendChild(b);}
if(settings.cancel){var b=document.createElement('input');b.type='button';b.className="button";b.value=settings.cancel;jQuery(b).click(function(){reset();});f.appendChild(b);}
self.appendChild(f);i.focus();if(settings.select){i.select();}
jQuery(i).keydown(function(e){if(e.keyCode==27){e.preventDefault();reset();}});var t;if('cancel'==settings.onblur){jQuery(i).blur(function(e){t=setTimeout(reset,500)});}else if('submit'==settings.onblur){jQuery(i).blur(function(e){jQuery(f).submit();});}else{jQuery(i).blur(function(e){});}
jQuery(f).submit(function(e){if(t){clearTimeout(t);}
e.preventDefault();if(jQuery.isFunction(settings.target)){var str=settings.target.apply(self,[jQuery(i).val(),settings]);self.innerHTML=str;self.editing=false;callback.apply(self,[self.innerHTML,settings]);}else{var p={};p[i.name]=jQuery(i).val();p[settings.id]=self.id;jQuery(self).html(settings.indicator);jQuery.post(settings.target,p,function(str){self.innerHTML=str;self.editing=false;callback.apply(self,[self.innerHTML,settings]);});}
return false;});function reset(){self.innerHTML=self.revert;self.editing=false;};function setInputContent(str){if(jQuery.isFunction(str)){str=str.apply(self,[self.revert,settings]);}
switch(settings.type){case'select':if(String==str.constructor){eval("var json = "+str);for(var key in json){if('selected'==key){continue;}
o=document.createElement('option');o.value=key;var text=document.createTextNode(json[key]);o.appendChild(text)
if(key==json['selected']){o.selected=true;}
i.appendChild(o);}}
break;default:i.value=str.replace(/&amp;/g,"&");break;}}});return(this);}
;if(window.jQuery&&!window.jQuery.createTemplate){(function(){var Template=function(s,includes,settings){this._tree=[];this._param={};this._includes=null;this._templates={};this._templates_code={};this.settings=jQuery.extend({disallow_functions:false,filter_data:true,filter_params:false,runnable_functions:false,clone_data:true,clone_params:true},settings);this.f_cloneData=(this.settings.f_cloneData!==undefined)?(this.settings.f_cloneData):(TemplateUtils.cloneData);this.f_escapeString=(this.settings.f_escapeString!==undefined)?(this.settings.f_escapeString):(TemplateUtils.escapeHTML);this.splitTemplates(s,includes);if(s){this.setTemplate(this._templates_code['MAIN'],includes,this.settings);}
this._templates_code=null;};Template.prototype.version='0.7.5';Template.DEBUG_MODE=true;Template.prototype.splitTemplates=function(s,includes){var reg=/\{#template *(\w*?)( .*)*\}/g;var iter,tname,se;var lastIndex=null;var _template_settings=[];while((iter=reg.exec(s))!=null){lastIndex=reg.lastIndex;tname=iter[1];se=s.indexOf('{#/template '+tname+'}',lastIndex);if(se==-1){throw new Error('jTemplates: Template "'+tname+'" is not closed.');}
this._templates_code[tname]=s.substring(lastIndex,se);_template_settings[tname]=TemplateUtils.optionToObject(iter[2]);}
if(lastIndex===null){this._templates_code['MAIN']=s;return;}
for(var i in this._templates_code){if(i!='MAIN'){this._templates[i]=new Template();}}
for(var i in this._templates_code){if(i!='MAIN'){this._templates[i].setTemplate(this._templates_code[i],jQuery.extend({},includes||{},this._templates||{}),jQuery.extend({},this.settings,_template_settings[i]));this._templates_code[i]=null;}}};Template.prototype.setTemplate=function(s,includes,settings){if(s==undefined){this._tree.push(new TextNode('',1));return;}
s=s.replace(/[\n\r]/g,'');s=s.replace(/\{\*.*?\*\}/g,'');this._includes=jQuery.extend({},this._templates||{},includes||{});this.settings=new Object(settings);var node=this._tree;var op=s.match(/\{#.*?\}/g);var ss=0,se=0;var e;var literalMode=0;var elseif_level=0;for(var i=0,l=(op)?(op.length):(0);i<l;++i){if(literalMode){se=s.indexOf('{#/literal}');if(se==-1){throw new Error("jTemplates: No end of literal.");}
if(se>ss){node.push(new TextNode(s.substring(ss,se),1));}
ss=se+11;literalMode=0;i=jQuery.inArray('{#/literal}',op);continue;}
se=s.indexOf(op[i],ss);if(se>ss){node.push(new TextNode(s.substring(ss,se),literalMode));}
var ppp=op[i].match(/\{#([\w\/]+).*?\}/);var op_=RegExp.$1;switch(op_){case'elseif':++elseif_level;node.switchToElse();case'if':e=new opIF(op[i],node);node.push(e);node=e;break;case'else':node.switchToElse();break;case'/if':while(elseif_level){node=node.getParent();--elseif_level;}
case'/for':case'/foreach':node=node.getParent();break;case'foreach':e=new opFOREACH(op[i],node,this);node.push(e);node=e;break;case'for':e=opFORFactory(op[i],node,this);node.push(e);node=e;break;case'include':node.push(new Include(op[i],this._includes));break;case'param':node.push(new UserParam(op[i]));break;case'cycle':node.push(new Cycle(op[i]));break;case'ldelim':node.push(new TextNode('{',1));break;case'rdelim':node.push(new TextNode('}',1));break;case'literal':literalMode=1;break;case'/literal':if(Template.DEBUG_MODE){throw new Error("jTemplates: No begin of literal.");}
break;default:if(Template.DEBUG_MODE){throw new Error('jTemplates: unknown tag '+op_+'.');}}
ss=se+op[i].length;}
if(s.length>ss){node.push(new TextNode(s.substr(ss),literalMode));}};Template.prototype.get=function(d,param,element,deep){++deep;var $T=d,_param1,_param2;if(this.settings.clone_data){$T=this.f_cloneData(d,{escapeData:(this.settings.filter_data&&deep==1),noFunc:this.settings.disallow_functions},this.f_escapeString);}
if(!this.settings.clone_params){_param1=this._param;_param2=param;}else{_param1=this.f_cloneData(this._param,{escapeData:(this.settings.filter_params),noFunc:false},this.f_escapeString);_param2=this.f_cloneData(param,{escapeData:(this.settings.filter_params&&deep==1),noFunc:false},this.f_escapeString);}
var $P=jQuery.extend({},_param1,_param2);var $Q=element;$Q.version=this.version;var ret='';for(var i=0,l=this._tree.length;i<l;++i){ret+=this._tree[i].get($T,$P,$Q,deep);}
--deep;return ret;};Template.prototype.setParam=function(name,value){this._param[name]=value;};TemplateUtils=function(){};TemplateUtils.escapeHTML=function(txt){return txt.replace(/&/g,'&amp;').replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/"/g,'&quot;').replace(/'/g,'&#39;');};TemplateUtils.cloneData=function(d,filter,f_escapeString){if(d==null){return d;}
switch(d.constructor){case Object:var o={};for(var i in d){o[i]=TemplateUtils.cloneData(d[i],filter,f_escapeString);}
if(!filter.noFunc){if(d.hasOwnProperty("toString"))
o.toString=d.toString;}
return o;case Array:var o=[];for(var i=0,l=d.length;i<l;++i){o[i]=TemplateUtils.cloneData(d[i],filter,f_escapeString);}
return o;case String:return(filter.escapeData)?(f_escapeString(d)):(d);case Function:if(filter.noFunc){if(Template.DEBUG_MODE)
throw new Error("jTemplates: Functions are not allowed.");else
return undefined;}
default:return d;}};TemplateUtils.optionToObject=function(optionText){if(optionText===null||optionText===undefined){return{};}
var o=optionText.split(/[= ]/);if(o[0]===''){o.shift();}
var obj={};for(var i=0,l=o.length;i<l;i+=2){obj[o[i]]=o[i+1];}
return obj;};var TextNode=function(val,literalMode){this._value=val;this._literalMode=literalMode;};TextNode.prototype.get=function(d,param,element,deep){var t=this._value;if(!this._literalMode){var $T=d;var $P=param;var $Q=element;t=t.replace(/\{(.*?)\}/g,function(__a0,__a1){try{var tmp=eval(__a1);if(typeof tmp=='function'){var settings=jQuery.data(element,'jTemplate').settings;if(settings.disallow_functions||!settings.runnable_functions){return'';}else{tmp=tmp($T,$P,$Q);}}
return(tmp===undefined)?(""):(String(tmp));}catch(e){if(Template.DEBUG_MODE)
throw e;return"";}});}
return t;};var opIF=function(oper,par){this._parent=par;oper.match(/\{#(?:else)*if (.*?)\}/);this._cond=RegExp.$1;this._onTrue=[];this._onFalse=[];this._currentState=this._onTrue;};opIF.prototype.push=function(e){this._currentState.push(e);};opIF.prototype.getParent=function(){return this._parent;};opIF.prototype.switchToElse=function(){this._currentState=this._onFalse;};opIF.prototype.get=function(d,param,element,deep){var $T=d;var $P=param;var $Q=element;var ret='';try{var tab=(eval(this._cond))?(this._onTrue):(this._onFalse);for(var i=0,l=tab.length;i<l;++i){ret+=tab[i].get(d,param,element,deep);}}catch(e){if(Template.DEBUG_MODE)
throw e;}
return ret;};opFORFactory=function(oper,par,template){if(oper.match(/\{#for (\w+?) *= *(\S+?) +to +(\S+?) *(?:step=(\S+?))*\}/)){oper='{#foreach opFORFactory.funcIterator as '+RegExp.$1+' begin='+(RegExp.$2||0)+' end='+(RegExp.$3||-1)+' step='+(RegExp.$4||1)+' extData=$T}';return new opFOREACH(oper,par,template);}else{throw new Error('jTemplates: Operator failed "find": '+oper);}};opFORFactory.funcIterator=function(i){return i;};var opFOREACH=function(oper,par,template){this._parent=par;this._template=template;oper.match(/\{#foreach (.+?) as (\w+?)( .+)*\}/);this._arg=RegExp.$1;this._name=RegExp.$2;this._option=RegExp.$3||null;this._option=TemplateUtils.optionToObject(this._option);this._onTrue=[];this._onFalse=[];this._currentState=this._onTrue;};opFOREACH.prototype.push=function(e){this._currentState.push(e);};opFOREACH.prototype.getParent=function(){return this._parent;};opFOREACH.prototype.switchToElse=function(){this._currentState=this._onFalse;};opFOREACH.prototype.get=function(d,param,element,deep){try{var $T=d;var $P=param;var $Q=element;var fcount=eval(this._arg);var key=[];var mode=typeof fcount;if(mode=='object'){var arr=[];jQuery.each(fcount,function(k,v){key.push(k);arr.push(v);});fcount=arr;}
var extData=(this._option.extData!==undefined)?(eval(this._option.extData)):{};var s=Number(eval(this._option.begin)||0),e;var step=Number(eval(this._option.step)||1);if(mode!='function'){e=fcount.length;}else{if(this._option.end===undefined||this._option.end===null){e=Number.MAX_VALUE;}else{e=Number(eval(this._option.end))+((step>0)?(1):(-1));}}
var ret='';var i,l;if(this._option.count){var tmp=s+Number(eval(this._option.count));e=(tmp>e)?(e):(tmp);}
if((e>s&&step>0)||(e<s&&step<0)){var iteration=0;var _total=(mode!='function')?(Math.ceil((e-s)/step)):undefined;var ckey,cval;for(;((step>0)?(s<e):(s>e));s+=step,++iteration){ckey=key[s];if(mode!='function'){cval=fcount[s];}else{cval=fcount(s);if(cval===undefined||cval===null){break;}}
if((typeof cval=='function')&&(this._template.settings.disallow_functions||!this._template.settings.runnable_functions)){continue;}
if((mode=='object')&&(ckey in Object)){continue;}
$T=extData;var p=$T[this._name]=cval;$T[this._name+'$index']=s;$T[this._name+'$iteration']=iteration;$T[this._name+'$first']=(iteration==0);$T[this._name+'$last']=(s+step>=e);$T[this._name+'$total']=_total;$T[this._name+'$key']=(ckey!==undefined&&ckey.constructor==String)?(this._template.f_escapeString(ckey)):(ckey);$T[this._name+'$typeof']=typeof cval;for(i=0,l=this._onTrue.length;i<l;++i){ret+=this._onTrue[i].get($T,param,element,deep);}
delete $T[this._name+'$index'];delete $T[this._name+'$iteration'];delete $T[this._name+'$first'];delete $T[this._name+'$last'];delete $T[this._name+'$total'];delete $T[this._name+'$key'];delete $T[this._name+'$typeof'];delete $T[this._name];}}else{for(i=0,l=this._onFalse.length;i<l;++i){ret+=this._onFalse[i].get($T,param,element,deep);}}
return ret;}catch(e){if(Template.DEBUG_MODE)
throw e;return"";}};var Include=function(oper,includes){oper.match(/\{#include (.*?)(?: root=(.*?))?\}/);this._template=includes[RegExp.$1];if(this._template==undefined){if(Template.DEBUG_MODE)
throw new Error('jTemplates: Cannot find include: '+RegExp.$1);}
this._root=RegExp.$2;};Include.prototype.get=function(d,param,element,deep){var $T=d;try{return this._template.get(eval(this._root),param,element,deep);}catch(e){if(Template.DEBUG_MODE)
throw e;}};var UserParam=function(oper){oper.match(/\{#param name=(\w*?) value=(.*?)\}/);this._name=RegExp.$1;this._value=RegExp.$2;};UserParam.prototype.get=function(d,param,element,deep){var $T=d;var $P=param;var $Q=element;try{param[this._name]=eval(this._value);}catch(e){if(Template.DEBUG_MODE)
throw e;param[this._name]=undefined;}
return'';};var Cycle=function(oper){oper.match(/\{#cycle values=(.*?)\}/);this._values=eval(RegExp.$1);this._length=this._values.length;if(this._length<=0){throw new Error('jTemplates: cycle has no elements');}
this._index=0;this._lastSessionID=-1;};Cycle.prototype.get=function(d,param,element,deep){var sid=jQuery.data(element,'jTemplateSID');if(sid!=this._lastSessionID){this._lastSessionID=sid;this._index=0;}
var i=this._index++%this._length;return this._values[i];};jQuery.fn.setTemplate=function(s,includes,settings){if(s.constructor===Template){return jQuery(this).each(function(){jQuery.data(this,'jTemplate',s);jQuery.data(this,'jTemplateSID',0);});}else{return jQuery(this).each(function(){jQuery.data(this,'jTemplate',new Template(s,includes,settings));jQuery.data(this,'jTemplateSID',0);});}};jQuery.fn.setTemplateURL=function(url_,includes,settings){var s=jQuery.ajax({url:url_,async:false}).responseText;return jQuery(this).setTemplate(s,includes,settings);};jQuery.fn.setTemplateElement=function(elementName,includes,settings){var s=$('#'+elementName).val();if(s==null){s=$('#'+elementName).html();s=s.replace(/&lt;/g,"<").replace(/&gt;/g,">");}
s=jQuery.trim(s);s=s.replace(/^<\!\[CDATA\[([\s\S]*)\]\]>$/im,'$1');s=s.replace(/^<\!--([\s\S]*)-->$/im,'$1');return jQuery(this).setTemplate(s,includes,settings);};jQuery.fn.hasTemplate=function(){var count=0;jQuery(this).each(function(){if(jQuery.data(this,'jTemplate')){++count;}});return count;};jQuery.fn.removeTemplate=function(){jQuery(this).processTemplateStop();return jQuery(this).each(function(){jQuery.removeData(this,'jTemplate');});};jQuery.fn.setParam=function(name,value){return jQuery(this).each(function(){var t=jQuery.data(this,'jTemplate');if(t===undefined){if(Template.DEBUG_MODE)
throw new Error('jTemplates: Template is not defined.');else
return;}
t.setParam(name,value);});};jQuery.fn.processTemplate=function(d,param){return jQuery(this).each(function(){var t=jQuery.data(this,'jTemplate');if(t===undefined){if(Template.DEBUG_MODE)
throw new Error('jTemplates: Template is not defined.');else
return;}
jQuery.data(this,'jTemplateSID',jQuery.data(this,'jTemplateSID')+1);jQuery(this).html(t.get(d,param,this,0));});};jQuery.fn.processTemplateURL=function(url_,param,options){var that=this;options=jQuery.extend({type:'GET',async:true,cache:false},options);jQuery.ajax({url:url_,type:options.type,data:options.data,dataFilter:options.dataFilter,async:options.async,cache:options.cache,timeout:options.timeout,dataType:'json',success:function(d){var r=jQuery(that).processTemplate(d,param);if(options.on_success){options.on_success(r);}},error:options.on_error,complete:options.on_complete});return this;};var Updater=function(url,param,interval,args,objs,options){this._url=url;this._param=param;this._interval=interval;this._args=args;this.objs=objs;this.timer=null;this._options=options||{};var that=this;jQuery(objs).each(function(){jQuery.data(this,'jTemplateUpdater',that);});this.run();};Updater.prototype.run=function(){this.detectDeletedNodes();if(this.objs.length==0){return;}
var that=this;jQuery.getJSON(this._url,this._args,function(d){var r=jQuery(that.objs).processTemplate(d,that._param);if(that._options.on_success){that._options.on_success(r);}});this.timer=setTimeout(function(){that.run();},this._interval);};Updater.prototype.detectDeletedNodes=function(){this.objs=jQuery.grep(this.objs,function(o){if(jQuery.browser.msie){var n=o.parentNode;while(n&&n!=document){n=n.parentNode;}
return n!=null;}else{return o.parentNode!=null;}});};jQuery.fn.processTemplateStart=function(url,param,interval,args,options){return new Updater(url,param,interval,args,this,options);};jQuery.fn.processTemplateStop=function(){return jQuery(this).each(function(){var updater=jQuery.data(this,'jTemplateUpdater');if(updater==null){return;}
var that=this;updater.objs=jQuery.grep(updater.objs,function(o){return o!=that;});jQuery.removeData(this,'jTemplateUpdater');});};jQuery.extend({createTemplate:function(s,includes,settings){return new Template(s,includes,settings);},createTemplateURL:function(url_,includes,settings){var s=jQuery.ajax({url:url_,async:false}).responseText;return new Template(s,includes,settings);},jTemplatesDebugMode:function(value){Template.DEBUG_MODE=value;}});})(jQuery);};

(function($){$.fn.addOption=function()
{var add=function(el,v,t,sO)
{var option=document.createElement("option");option.value=v,option.text=t;var o=el.options;var oL=o.length;if(!el.cache)
{el.cache={};for(var i=0;i<oL;i++)
{el.cache[o[i].value]=i;}}
if(typeof el.cache[v]=="undefined")el.cache[v]=oL;el.options[el.cache[v]]=option;if(sO)
{option.selected=true;}};var a=arguments;if(a.length==0)return this;var sO=true;var m=false;var items,v,t;if(typeof(a[0])=="object")
{m=true;items=a[0];}
if(a.length>=2)
{if(typeof(a[1])=="boolean")sO=a[1];else if(typeof(a[2])=="boolean")sO=a[2];if(!m)
{v=a[0];t=a[1];}}
this.each(function()
{if(this.nodeName.toLowerCase()!="select")return;if(m)
{for(var item in items)
{add(this,item,items[item],sO);}}
else
{add(this,v,t,sO);}});return this;};$.fn.ajaxAddOption=function(url,params,select,fn,args)
{if(typeof(url)!="string")return this;if(typeof(params)!="object")params={};if(typeof(select)!="boolean")select=true;this.each(function()
{var el=this;$.getJSON(url,params,function(r)
{$(el).addOption(r,select);if(typeof fn=="function")
{if(typeof args=="object")
{fn.apply(el,args);}
else
{fn.call(el);}}});});return this;};$.fn.removeOption=function()
{var a=arguments;if(a.length==0)return this;var ta=typeof(a[0]);var v,i;if(ta=="string"||ta=="object"||ta=="function")v=a[0];else if(ta=="number")i=a[0];else return this;this.each(function()
{if(this.nodeName.toLowerCase()!="select")return;if(this.cache)this.cache=null;var remove=false;var o=this.options;if(!!v)
{var oL=o.length;for(var i=oL-1;i>=0;i--)
{if(v.constructor==RegExp)
{if(o[i].value.match(v))
{remove=true;}}
else if(o[i].value==v)
{remove=true;}
if(remove&&a[1]===true)remove=o[i].selected;if(remove)
{o[i]=null;}
remove=false;}}
else
{if(remove&&a[1]===true)remove=o[i].selected;if(remove)
{this.remove(i);}}});return this;};$.fn.sortOptions=function(ascending)
{var a=typeof(ascending)=="undefined"?true:!!ascending;this.each(function()
{if(this.nodeName.toLowerCase()!="select")return;var o=this.options;var oL=o.length;var sA=[];for(var i=0;i<oL;i++)
{sA[i]={v:o[i].value,t:o[i].text}}
sA.sort(function(o1,o2)
{o1t=o1.t.toLowerCase(),o2t=o2.t.toLowerCase();if(o1t==o2t)return 0;if(a)
{return o1t<o2t?-1:1;}
else
{return o1t>o2t?-1:1;}});for(var i=0;i<oL;i++)
{o[i].text=sA[i].t;o[i].value=sA[i].v;}});return this;};$.fn.selectOptions=function(value,clear)
{var v=value;var vT=typeof(value);var c=clear||false;if(vT!="string"&&vT!="function"&&vT!="object")return this;this.each(function()
{if(this.nodeName.toLowerCase()!="select")return this;var o=this.options;var oL=o.length;for(var i=0;i<oL;i++)
{if(v.constructor==RegExp)
{if(o[i].value.match(v))
{o[i].selected=true;}
else if(c)
{o[i].selected=false;}}
else
{if(o[i].value==v)
{o[i].selected=true;}
else if(c)
{o[i].selected=false;}}}});return this;};$.fn.copyOptions=function(to,which)
{var w=which||"selected";if($(to).size()==0)return this;this.each(function()
{if(this.nodeName.toLowerCase()!="select")return this;var o=this.options;var oL=o.length;for(var i=0;i<oL;i++)
{if(w=="all"||(w=="selected"&&o[i].selected))
{$(to).addOption(o[i].value,o[i].text);}}});return this;};$.fn.containsOption=function(value,fn)
{var found=false;var v=value;var vT=typeof(v);var fT=typeof(fn);if(vT!="string"&&vT!="function"&&vT!="object")return fT=="function"?this:found;this.each(function()
{if(this.nodeName.toLowerCase()!="select")return this;if(found&&fT!="function")return false;var o=this.options;var oL=o.length;for(var i=0;i<oL;i++)
{if(v.constructor==RegExp)
{if(o[i].value.match(v))
{found=true;if(fT=="function")fn.call(o[i]);}}
else
{if(o[i].value==v)
{found=true;if(fT=="function")fn.call(o[i]);}}}});return fT=="function"?this:found;};$.fn.selectedValues=function()
{var v=[];this.find("option:selected").each(function()
{v[v.length]=this.value;});return v;};$.fn.selectedTextValues=function()
{var v=[];this.find("option:selected").each(function()
{v[v.length]=this.text;});return v;};})(jQuery);

(function($){function TimeEntry(){this._disabledInputs=[];this.regional=[];this.regional['']={show24Hours:false,separator:':',ampmPrefix:'',ampmNames:['AM','PM'],spinnerTexts:['Now','Previous field','Next field','Increment','Decrement']};this._defaults={appendText:'',showSeconds:false,timeSteps:[1,1,1],initialField:0,useMouseWheel:true,defaultTime:null,minTime:null,maxTime:null,spinnerImage:'timeEntry.png',spinnerSize:[20,20,8],spinnerIncDecOnly:false,spinnerRepeat:[500,250],beforeShow:null,beforeSetTime:null};$.extend(this._defaults,this.regional['']);}
var PROP_NAME='timeEntry';$.extend(TimeEntry.prototype,{markerClassName:'hasTimeEntry',setDefaults:function(options){extendRemove(this._defaults,options||{});},_connectTimeEntry:function(target,options){var input=$(target);if(input.is('.'+this.markerClassName)){return;}
var inst={};inst.options=$.extend({},options);inst._selectedHour=0;inst._selectedMinute=0;inst._selectedSecond=0;inst._field=0;inst.input=$(target);$.data(target,PROP_NAME,inst);var spinnerImage=this._get(inst,'spinnerImage');var spinnerText=this._get(inst,'spinnerText');var spinnerSize=this._get(inst,'spinnerSize');var appendText=this._get(inst,'appendText');var spinner=(!spinnerImage?null:$('<span class="timeEntry_control" _timeid="'+inst._id+'" style="display: inline-block; background: url(\''+spinnerImage+'\') 0 0 no-repeat; '+'width: '+spinnerSize[0]+'px; height: '+spinnerSize[1]+'px;'+
($.browser.mozilla&&$.browser.version.substr(0,3)!='1.9'?' padding-left: '+spinnerSize[0]+'px; padding-bottom: '+
(spinnerSize[1]-18)+'px;':'')+'"></span>'));input.wrap('<span class="timeEntry_wrap"></span>').after(appendText?'<span class="timeEntry_append">'+appendText+'</span>':'').after(spinner||'');input.addClass(this.markerClassName).bind('focus.timeEntry',this._doFocus).bind('blur.timeEntry',this._doBlur).bind('click.timeEntry',this._doClick).bind('keydown.timeEntry',this._doKeyDown).bind('keypress.timeEntry',this._doKeyPress);if($.browser.mozilla){input.bind('input.timeEntry',function(event){$.timeentry._parseTime(inst);});}
if($.browser.msie){input.bind('paste.timeEntry',function(event){setTimeout(function(){$.timeentry._parseTime(inst);},1);});}
if(this._get(inst,'useMouseWheel')&&$.fn.mousewheel){input.mousewheel(this._doMouseWheel);}
if(spinner){spinner.mousedown(this._handleSpinner).mouseup(this._endSpinner).mouseout(this._endSpinner).mousemove(this._describeSpinner);}},_enableTimeEntry:function(input){this._enableDisable(input,false);},_disableTimeEntry:function(input){this._enableDisable(input,true);},_enableDisable:function(input,disable){var inst=$.data(input,PROP_NAME);if(!inst){return;}
input.disabled=disable;if(input.nextSibling&&input.nextSibling.nodeName.toLowerCase()=='span'){$.timeEntry._changeSpinner(inst,input.nextSibling,(disable?5:-1));}
$.timeEntry._disabledInputs=$.map($.timeEntry._disabledInputs,function(value){return(value==input?null:value);});if(disable){$.timeEntry._disabledInputs[$.timeEntry._disabledInputs.length]=input;}},_isDisabledTimeEntry:function(input){for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==input){return true;}}
return false;},_changeTimeEntry:function(input,options){var inst=$.data(input,PROP_NAME);if(inst){var currentTime=this._extractTime(inst);extendRemove(inst.options,options||{});if(currentTime){this._setTime(inst,new Date(0,0,0,currentTime[0],currentTime[1],currentTime[2]));}}
$.data(input,PROP_NAME,inst);},_destroyTimeEntry:function(input){$input=$(input);if(!$input.is('.'+this.markerClassName)){return;}
$input.removeClass(this.markerClassName).unbind('focus.timeEntry').unbind('blur.timeEntry').unbind('click.timeEntry').unbind('keydown.timeEntry').unbind('keypress.timeEntry');if($.browser.mozilla){$input.unbind('input.timeEntry');}
if($.browser.msie){$input.unbind('paste.timeEntry');}
if($.fn.mousewheel){$input.unmousewheel();}
this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==input?null:value);});input.parentNode.parentNode.replaceChild(input,input.parentNode);$.removeData(input,PROP_NAME);},_setTimeTimeEntry:function(input,time){var inst=$.data(input,PROP_NAME);if(inst){this._setTime(inst,time?(typeof time=='object'?new Date(time.getTime()):time):null);}},_getTimeTimeEntry:function(input){var inst=$.data(input,PROP_NAME);var currentTime=(inst?this._extractTime(inst):null);return(!currentTime?null:new Date(0,0,0,currentTime[0],currentTime[1],currentTime[2]));},_doFocus:function(target){var input=(target.nodeName&&target.nodeName.toLowerCase()=='input'?target:this);if($.timeEntry._lastInput==input){return;}
if($.timeEntry._isDisabledTimeEntry(input)){return;}
var inst=$.data(input,PROP_NAME);$.timeEntry._focussed=true;$.timeEntry._lastInput=input;$.timeEntry._blurredInput=null;var beforeShow=$.timeEntry._get(inst,'beforeShow');extendRemove(inst.options,(beforeShow?beforeShow.apply(input,[input]):{}));$.data(input,PROP_NAME,inst);$.timeEntry._parseTime(inst);},_doBlur:function(event){$.timeEntry._blurredInput=$.timeEntry._lastInput;$.timeEntry._lastInput=null;},_doClick:function(event){var input=event.target;var inst=$.data(input,PROP_NAME);if(!$.timeEntry._focussed){var fieldSize=$.timeEntry._get(inst,'separator').length+2;inst._field=0;if($.browser.msie){var value=input.value;var offsetX=event.clientX+document.documentElement.scrollLeft-
$(event.srcElement).offset().left;for(var field=0;field<=Math.max(1,inst._secondField,inst._ampmField);field++){var end=(field!=inst._ampmField?(field*fieldSize)+2:(inst._ampmField*fieldSize)+$.timeEntry._get(inst,'ampmPrefix').length+
$.timeEntry._get(inst,'ampmNames')[0].length);input.value=value.substring(0,end);var range=input.createTextRange();if(offsetX<range.boundingWidth){inst._field=field;break;}}
input.value=value;}
else{for(var field=0;field<=Math.max(1,inst._secondField,inst._ampmField);field++){var start=(field!=inst._ampmField?(field*fieldSize)+2:(inst._ampmField*fieldSize)+$.timeEntry._get(inst,'ampmPrefix').length+
$.timeEntry._get(inst,'ampmNames')[0].length);if(input.selectionStart<start){inst._field=field;break;}}}}
$.data(input,PROP_NAME,inst);$.timeEntry._showField(inst);$.timeEntry._focussed=false;},_doKeyDown:function(event){if(event.keyCode>=48){return true;}
var inst=$.data(event.target,PROP_NAME);switch(event.keyCode){case 9:return(event.shiftKey?$.timeEntry._previousField(inst,true):$.timeEntry._nextField(inst,true));case 35:if(event.ctrlKey){$.timeEntry._setValue(inst,'');}
else{inst._field=Math.max(1,inst._secondField,inst._ampmField);$.timeEntry._adjustField(inst,0);}
break;case 36:if(event.ctrlKey){$.timeEntry._setTime(inst);}
else{inst._field=0;$.timeEntry._adjustField(inst,0);}
break;case 37:$.timeEntry._previousField(inst,false);break;case 38:$.timeEntry._adjustField(inst,+1);break;case 39:$.timeEntry._nextField(inst,false);break;case 40:$.timeEntry._adjustField(inst,-1);break;case 46:$.timeEntry._setValue(inst,'');break;}
return false;},_doKeyPress:function(event){var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);if(chr<' '){return true;}
var inst=$.data(event.target,PROP_NAME);$.timeEntry._handleKeyPress(inst,chr);return false;},_doMouseWheel:function(event,delta){delta=($.browser.opera?-delta/Math.abs(delta):delta);var inst=$.data(event.target,PROP_NAME);$.timeEntry._adjustField(inst,delta);event.preventDefault();},_describeSpinner:function(event){var spinner=$.timeEntry._getSpinnerTarget(event);var inst=$.data(spinner.previousSibling,PROP_NAME);spinner.title=$.timeEntry._get(inst,'spinnerTexts')[$.timeEntry._getSpinnerRegion(inst,event)];},_handleSpinner:function(event){var spinner=$.timeEntry._getSpinnerTarget(event);var input=spinner.previousSibling;if($.timeEntry._isDisabledTimeEntry(input)){return;}
if(input==$.timeEntry._blurredInput){$.timeEntry._lastInput=input;$.timeEntry._blurredInput=null;}
$.timeEntry._cancelled=false;var inst=$.data(input,PROP_NAME);$.timeEntry._doFocus(input);var region=$.timeEntry._getSpinnerRegion(inst,event);$.timeEntry._changeSpinner(inst,spinner,region);$.timeEntry._actionSpinner(inst,region);var spinnerRepeat=$.timeEntry._get(inst,'spinnerRepeat');if(!$.timeEntry._cancelled&&region>=3&&spinnerRepeat[0]){$.timeEntry._timer=setTimeout(function(){$.timeEntry._repeatSpinner(inst,region);},spinnerRepeat[0]);$(spinner).one('mouseout',$.timeEntry._releaseSpinner).one('mouseup',$.timeEntry._releaseSpinner);}},_actionSpinner:function(inst,region){switch(region){case 0:this._setTime(inst);break;case 1:this._previousField(inst,false);break;case 2:this._nextField(inst,false);break;case 3:this._adjustField(inst,+1);break;case 4:this._adjustField(inst,-1);break;}},_repeatSpinner:function(inst,region){if($.timeEntry._cancelled){return;}
$.timeEntry._lastInput=$.timeEntry._blurredInput;this._actionSpinner(inst,region);this._timer=setTimeout(function(){$.timeEntry._repeatSpinner(inst,region);},this._get(inst,'spinnerRepeat')[1]);},_releaseSpinner:function(event){$.timeEntry._cancelled=true;clearTimeout($.timeEntry._timer);},_endSpinner:function(event){$.timeEntry._cancelled=true;var spinner=$.timeEntry._getSpinnerTarget(event);var input=spinner.previousSibling;var inst=$.data(input,PROP_NAME);if(!$.timeEntry._isDisabledTimeEntry(input)){$.timeEntry._changeSpinner(inst,spinner,-1);}
if(!$.browser.opera){$.timeEntry._lastInput=$.timeEntry._blurredInput;}
if($.timeEntry._lastInput){$.timeEntry._showField(inst);}},_getSpinnerTarget:function(event){return(event.target?event.target:event.srcElement);},_getSpinnerRegion:function(inst,event){var spinner=this._getSpinnerTarget(event);var pos=($.browser.opera||$.browser.safari?$.timeEntry._findPos(spinner):$(spinner).offset());var scrolled=($.browser.safari?$.timeEntry._findScroll(spinner):[document.documentElement.scrollLeft,document.documentElement.scrollTop]);var spinnerIncDecOnly=this._get(inst,'spinnerIncDecOnly');var left=(spinnerIncDecOnly?99:event.clientX+scrolled[0]-pos.left-($.browser.msie?1:0));var top=event.clientY+scrolled[1]-pos.top-($.browser.msie?1:0);var spinnerSize=this._get(inst,'spinnerSize');var right=(spinnerIncDecOnly?99:spinnerSize[0]-left);var bottom=spinnerSize[1]-top;if(spinnerSize[2]>0&&Math.abs(left-right)<=spinnerSize[2]&&Math.abs(top-bottom)<=spinnerSize[2]){return 0;}
var min=Math.min(left,top,right,bottom);return(min==left?1:(min==right?2:(min==top?3:4)));},_changeSpinner:function(inst,spinner,region){$(spinner).css('background-position','-'+((region+1)*this._get(inst,'spinnerSize')[0])+'px 0px');},_findPos:function(obj){var curLeft=curTop=0;if(obj.offsetParent){curLeft=obj.offsetLeft;curTop=obj.offsetTop;while(obj=obj.offsetParent){var origCurLeft=curLeft;curLeft+=obj.offsetLeft;if(curLeft<0){curLeft=origCurLeft;}
curTop+=obj.offsetTop;}}
return{left:curLeft,top:curTop};},_findScroll:function(obj){var isFixed=false;$(obj).parents().each(function(){isFixed|=$(this).css('position')=='fixed';});if(isFixed){return[0,0];}
var scrollLeft=obj.scrollLeft;var scrollTop=obj.scrollTop;while(obj=obj.parentNode){scrollLeft+=obj.scrollLeft||0;scrollTop+=obj.scrollTop||0;}
return[scrollLeft,scrollTop];},_get:function(inst,name){return(inst.options[name]!=null?inst.options[name]:$.timeEntry._defaults[name]);},_parseTime:function(inst){var currentTime=this._extractTime(inst);var showSeconds=this._get(inst,'showSeconds');if(currentTime){inst._selectedHour=currentTime[0];inst._selectedMinute=currentTime[1];inst._selectedSecond=currentTime[2];}
else{var now=this._constrainTime(inst);inst._selectedHour=now[0];inst._selectedMinute=now[1];inst._selectedSecond=(showSeconds?now[2]:0);}
inst._secondField=(showSeconds?2:-1);inst._ampmField=(this._get(inst,'show24Hours')?-1:(showSeconds?3:2));inst._lastChr='';inst._field=Math.max(0,Math.min(Math.max(1,inst._secondField,inst._ampmField),this._get(inst,'initialField')));if(inst.input.val()!=''){this._showTime(inst);}},_extractTime:function(inst){var value=inst.input.val();var separator=this._get(inst,'separator');var currentTime=value.split(separator);if(separator==''&&value!=''){currentTime[0]=value.substring(0,2);currentTime[1]=value.substring(2,4);currentTime[2]=value.substring(4,6);}
var ampmNames=this._get(inst,'ampmNames');var show24Hours=this._get(inst,'show24Hours');if(currentTime.length>=2){var isAM=!show24Hours&&(value.indexOf(ampmNames[0])>-1);var isPM=!show24Hours&&(value.indexOf(ampmNames[1])>-1);var hour=parseInt(currentTime[0],10);hour=(isNaN(hour)?0:hour);hour=((isAM||isPM)&&hour==12?0:hour)+(isPM?12:0);var minute=parseInt(currentTime[1],10);minute=(isNaN(minute)?0:minute);var second=(currentTime.length>=3?parseInt(currentTime[2],10):0);second=(isNaN(second)||!this._get(inst,'showSeconds')?0:second);return this._constrainTime(inst,[hour,minute,second]);}
return null;},_constrainTime:function(inst,fields){var specified=(fields!=null);if(!specified){var now=this._determineTime(this._get(inst,'defaultTime'))||new Date();fields=[now.getHours(),now.getMinutes(),now.getSeconds()];}
var reset=false;var timeSteps=this._get(inst,'timeSteps');for(var i=0;i<timeSteps.length;i++){if(reset){fields[i]=0;}
else if(timeSteps[i]>1){fields[i]=Math.round(fields[i]/timeSteps[i])*timeSteps[i];reset=true;}}
return fields;},_showTime:function(inst){var show24Hours=this._get(inst,'show24Hours');var separator=this._get(inst,'separator');var currentTime=(this._formatNumber(show24Hours?inst._selectedHour:((inst._selectedHour+11)%12)+1)+separator+
this._formatNumber(inst._selectedMinute)+
(this._get(inst,'showSeconds')?separator+
this._formatNumber(inst._selectedSecond):'')+
(show24Hours?'':this._get(inst,'ampmPrefix')+
this._get(inst,'ampmNames')[(inst._selectedHour<12?0:1)]));this._setValue(inst,currentTime);this._showField(inst);},_showField:function(inst){var input=inst.input[0];var separator=this._get(inst,'separator');var fieldSize=separator.length+2;var start=(inst._field!=inst._ampmField?(inst._field*fieldSize):(inst._ampmField*fieldSize)-separator.length+this._get(inst,'ampmPrefix').length);var end=start+(inst._field!=inst._ampmField?2:this._get(inst,'ampmNames')[0].length);if(input.setSelectionRange){input.setSelectionRange(start,end);}
else if(input.createTextRange){var range=input.createTextRange();range.moveStart('character',start);range.moveEnd('character',end-inst.input.val().length);range.select();}
if(!input.disabled){try{input.focus();}
catch(e){}}},_formatNumber:function(value){return(value<10?'0':'')+value;},_setValue:function(inst,value){inst.input.val(value).trigger('change');},_previousField:function(inst,moveOut){var atFirst=(inst.input.val()==''||inst._field==0);if(!atFirst){inst._field--;}
this._showField(inst);inst._lastChr='';$.data(inst.input[0],PROP_NAME,inst);return(atFirst&&moveOut);},_nextField:function(inst,moveOut){var atLast=(inst.input.val()==''||inst._field==Math.max(1,inst._secondField,inst._ampmField));if(!atLast){inst._field++;}
this._showField(inst);inst._lastChr='';$.data(inst.input[0],PROP_NAME,inst);return(atLast&&moveOut);},_adjustField:function(inst,offset){if(inst.input.val()==''){offset=0;}
var timeSteps=this._get(inst,'timeSteps');this._setTime(inst,new Date(0,0,0,inst._selectedHour+(inst._field==0?offset*timeSteps[0]:0)+
(inst._field==inst._ampmField?offset*12:0),inst._selectedMinute+(inst._field==1?offset*timeSteps[1]:0),inst._selectedSecond+(inst._field==inst._secondField?offset*timeSteps[2]:0)));},_setTime:function(inst,time){time=this._determineTime(time);var fields=this._constrainTime(inst,time?[time.getHours(),time.getMinutes(),time.getSeconds()]:null);time=new Date(0,0,0,fields[0],fields[1],fields[2]);var time=this._normaliseTime(time);var minTime=this._normaliseTime(this._determineTime(this._get(inst,'minTime')));var maxTime=this._normaliseTime(this._determineTime(this._get(inst,'maxTime')));time=(minTime&&time<minTime?minTime:(maxTime&&time>maxTime?maxTime:time));var beforeSetTime=this._get(inst,'beforeSetTime');if(beforeSetTime){time=beforeSetTime.apply(inst.input[0],[this._getTimeTimeEntry(inst.input[0]),time,minTime,maxTime]);}
inst._selectedHour=time.getHours();inst._selectedMinute=time.getMinutes();inst._selectedSecond=time.getSeconds();this._showTime(inst);$.data(inst.input[0],PROP_NAME,inst);},_determineTime:function(setting){var offsetNumeric=function(offset){var time=new Date();time.setTime(time.getTime()+offset*1000);return time;};var offsetString=function(offset){var time=new Date();var hour=time.getHours();var minute=time.getMinutes();var second=time.getSeconds();var pattern=/([+-]?[0-9]+)\s*(s|S|m|M|h|H)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||'s'){case's':case'S':second+=parseInt(matches[1]);break;case'm':case'M':minute+=parseInt(matches[1]);break;case'h':case'H':hour+=parseInt(matches[1]);break;}
matches=pattern.exec(offset);}
time=new Date(0,0,10,hour,minute,second,0);if(/^!/.test(offset)){if(time.getDate()>10){time=new Date(0,0,10,23,59,59);}
else if(time.getDate()<10){time=new Date(0,0,10,0,0,0);}}
return time;};return(setting?(typeof setting=='string'?offsetString(setting):(typeof setting=='number'?offsetNumeric(setting):setting)):null);},_normaliseTime:function(time){if(!time){return null;}
time.setFullYear(1900);time.setMonth(0);time.setDate(0);return time;},_handleKeyPress:function(inst,chr){if(chr==this._get(inst,'separator')){this._nextField(inst,false);}
else if(chr>='0'&&chr<='9'){var value=(inst._lastChr+chr)*1;var show24Hours=this._get(inst,'show24Hours');var hour=(inst._field==0&&((show24Hours&&value<24)||(value>=1&&value<=12))?value+(!show24Hours&&inst._selectedHour>=12?12:0):inst._selectedHour);var minute=(inst._field==1&&value<60?value:inst._selectedMinute);var second=(inst._field==inst._secondField&&value<60?value:inst._selectedSecond);var fields=this._constrainTime(inst,[hour,minute,second]);this._setTime(inst,new Date(0,0,0,fields[0],fields[1],fields[2]));inst._lastChr=chr;}
else if(!this._get(inst,'show24Hours')){var ampmNames=this._get(inst,'ampmNames');if((chr==ampmNames[0].substring(0,1).toLowerCase()&&inst._selectedHour>=12)||(chr==ampmNames[1].substring(0,1).toLowerCase()&&inst._selectedHour<12)){var saveField=inst._field;inst._field=inst._ampmField;this._adjustField(inst,+1);inst._field=saveField;this._showField(inst);}}}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=null;}}
return target;}
$.fn.timeEntry=function(options){var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=='string'&&(options=='isDisabled'||options=='getTime')){return $.timeEntry['_'+options+'TimeEntry'].apply($.timeEntry,[this[0]].concat(otherArgs));}
return this.each(function(){var nodeName=this.nodeName.toLowerCase();if(nodeName=='input'){if(typeof options=='string'){$.timeEntry['_'+options+'TimeEntry'].apply($.timeEntry,[this].concat(otherArgs));}
else{var inlineSettings={};for(attrName in $.timeEntry._defaults){var attrValue=this.getAttribute('time:'+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue);}
catch(err){inlineSettings[attrName]=attrValue;}}}
$.timeEntry._connectTimeEntry(this,$.extend(inlineSettings,options));}}});};$.timeEntry=new TimeEntry();})(jQuery);

(function($){$.widget("ui.autocomplete",{_init:function(){$.extend(this.options,{delay:this.options.url?$.Autocompleter.defaults.delay:10,max:!this.options.scroll?10:150,highlight:this.options.highlight||function(value){return value;},formatMatch:this.options.formatMatch||this.options.formatItem});new $.Autocompleter(this.element[0],this.options);},result:function(handler){return this.element.bind("result",handler);},search:function(handler){return this.element.trigger("search",[handler]);},flushCache:function(){return this.element.trigger("flushCache");},setData:function(key,value){return this.element.trigger("setOptions",[{key:value}]);},destroy:function(){return this.element.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);if(options.result)$input.bind('result.autocomplete',options.result);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=false;return false;}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev();}else{onChange(0,true);}
break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}
break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}
break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}
break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}
break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}
if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}
$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])
cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)
return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v;}
v+=options.multipleSeparator;}
$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}
function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}
var currentValue=$input.val();if(!skipPrevCheck&&currentValue==previousValue)
return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)
currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value){return[""];}
var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value))
result[i]=$.trim(value);});return result;}
function lastWord(value){if(!options.multiple)
return value;var words=trimWords(value);return words[words.length-1];}
function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$.Autocompleter.Selection(input,previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.autocomplete("search",function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}
else
$input.val("");}});}
if(wasVisible)
$.Autocompleter.Selection($(input),$(input).val().length,$(input).val().length);};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)
term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){if($.isFunction($.Autocompleter.customParseData)){data=$.Autocompleter.customParseData.call(this,data);}
var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}
else if(options.source&&typeof options.source=='function'){var resultData=options.source(term);var parsed=(options.parse)?options.parse(resultData):resultData;cache.add(term,parsed);success(term,parsed);}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}
return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ui-autocomplete-input",resultsClass:"ui-autocomplete-results",loadingClass:"ui-autocomplete-loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.extend($.ui.autocomplete,{defaults:$.Autocompleter.defaults});$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)
s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}
if(!data[q]){length++;}
data[q]=value;}
function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)
continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])
stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}
setTimeout(populate,25);function flush(){data={};length=0;}
return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)
return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}
return csub;}else
if(data[q]){return data[q];}else
if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}
return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ui-autocomplete-over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)
return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)
element.css("width",options.width);needsInit=false;}
function target(event){var element=event.target;while(element&&element.tagName!="LI")
element=element.parentNode;if(!element)
return[];return element;}
function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}
function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}
function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])
continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)
continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ui-autocomplete-even":"ui-autocomplete-odd").appendTo(list)[0];$.data(li,"ui-autocomplete-data",data[i]);}
listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}
if($.fn.bgiframe)
list.bgiframe();}
return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE)
active=-1;$(input).triggerHandler("autocompletehide",[{},{options:options}],options["hide"]);},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+$(input)[0].offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}
$(input).triggerHandler("autocompleteshow",[{},{options:options}],options["show"]);},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ui-autocomplete-data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}
field.focus();};})(jQuery);

(function($){var map=new Array();$.Watermark={ShowAll:function(){for(var i=0;i<map.length;i++){if(map[i].obj.val()==""){map[i].obj.val(map[i].text);map[i].obj.css("color",map[i].WatermarkColor);}else{map[i].obj.css("color",map[i].DefaultColor);}}},HideAll:function(){for(var i=0;i<map.length;i++){if(map[i].obj.val()==map[i].text)
map[i].obj.val("");}}}
$.fn.Watermark=function(text,color){if(!color)
color="#aaa";return this.each(function(){var input=$(this);var defaultColor=input.css("color");map[map.length]={text:text,obj:input,DefaultColor:defaultColor,WatermarkColor:color};function clearMessage(){if(input.val()==text)
input.val("");input.css("color",defaultColor);}
function insertMessage(){if(input.val().length==0||input.val()==text){input.val(text);input.css("color",color);}else
input.css("color",defaultColor);}
input.focus(clearMessage);input.blur(insertMessage);input.change(insertMessage);insertMessage();});};})(jQuery);

$Conarc=window.$Conarc||{};$Conarc.AutoComplete={init:function(jqControls,settings){jqControls.filter(":input:not([icInit])").filter(".caAutoComplete_ClientNameSearch").caAutoComplete($.ConarcExt.virtualPath+"DataService/iChannelRestDataService.svc/AutoCompleteEntityNameSearch?sessionId="+$.ConarcExt.getSessionId()+"&",settings).attr("icInit",true).end().filter(".caAutoComplete_SiteCodeCompanySearch").caAutoComplete($.ConarcExt.virtualPath+"Common/AutoComplete.wcsx?PageAction=SiteCodeClientSearch&NoCache"+new Date().getTime()+"&",settings).attr("icInit",true).end();}}
$.fn.caAutoComplete=function(url,settings,data){settings=$.extend({},$.Autocompleter.defaults,settings);settings=$.extend({},{minChars:2,matchContains:true,width:300,url:url,extraParams:data},settings);return this.each(function(){var jqThis=$(this);if(jqThis.hasClass("caAutoComplete_ClientNameSearch")){settings.extraParams=$.extend({},{entityType:jqThis.attr("entityType")},settings.extraParams);}
settings=$.extend({},{formatItem:function(row,i,num){var val=jqThis.val();if(val==""){return"";}
return eval("row[0].replace(/"+val+"/gi, '<b>"+val+"</b>')");}},settings);$.Autocompleter(this,settings);});}
$.Autocompleter.customParseData=function(data){if(data.substring(0,1)=="\""&&data.substring(data.length-1)=="\""){data=data.substring(1);data=data.substring(0,data.length-1);}
if(data.indexOf("ResponseError")>=0){var json=eval("json="+data);if(json.EntitySearchResults){var newData="";$.each(json.EntitySearchResults,function(){newData+=(newData.length>0?"\n":"")+this.EntityName+"|"+this.EntityId;});data=newData;}}
return data;}

$Conarc=window.$Conarc||{};$Conarc.CheckBox={bindSelectAll:function(parent,children){var jqParent=$(parent);var jqChildren=$(children);jqParent.click(function(){jqChildren.setChecked(this.checked);});}}
$.fn.setChecked=function(checked){return this.each(function(){if(typeof this.checked!="undefined")
this.checked=checked;});};$.fn.checkedValues=function(){var v=[];this.filter(":checked").each(function(){v[v.length]=this.value;});return v;};

window.$Conarc=window.$Conarc||{};$Conarc.DatePicker={init:function(settings){settings=$.extend({},{},{showOn:'button',buttonImageOnly:true,buttonImage:$.ConarcExt.virtualPath+'images/calendar.gif',closeText:"Close",showStatus:true,showAnim:'slideDown',dayNamesMin:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],showButtonPanel:true,changeMonth:true,changeYear:true});$.datepicker.setDefaults(settings);}};

(function($){function fixedParseInt(value){if(typeof value=="string"){value=value.replace(/^0+/g,'')}
return parseInt(value);}
var dateUtil={dayshort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daylong:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthshort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthlong:["January","February","March","April","May","June","July","August","September","October","November","December"],monthdays:[31,28,31,30,31,30,31,31,30,31,30,31],millisecond:1,second:1000,minute:1000*60,hour:1000*60*60,day:1000*60*60*24,week:1000*60*60*24*7,year:1000*60*60*24*365,commonformats:["m/d/y h:i a","mmm d H:i:s y","d/m/yyyy","dd/mm/yyyy","dd-mm-yyyy","dd-mm-yy","d mmmm yyyy","dd mmmm yyyy","dd mmmm yy","d mmmm yy","dd.mm.yyyy","d.m.yyyy","d.m.y","d. mmmm yy","d. mmmm yyyy","d mmm yyyy","dd mmm yyyy","d mmm yy","dd mmm yy","yyyy mmmm dd","yy mmmm dd","yyyy mmmm d","yy mmmm d","yyyy-mm-dd","yyyy.mm.dd","mmmm d, yyyy","mmmm dd, yyyy","mmmm d, yy","mmmm dd, yy","mmm d, yy","mmm d, yyyy","mmm dd, yy","mmm. d, yyyy","mmm. dd, yyyy","mmm. d, yy","mmm. dd, yy","mm/dd/yyyy","mm-dd-yyyy","mm.dd.yy","m/d/yy","mm/dd/yy","mm/dd/yyyy","ddd, dd mmm yyyy","ddd mmm dd yyyy HH:ii:ss","yyyy-j","yyyy-jjj","yyyyjjjj","yyyyj"],pad:function(x){return(x<0||x>9?"":"0")+x;},getTokens:function(str){var tokens=[];var curtoken="";var curchar="";var lastchar="";var idx=0;while(idx<str.length){curchar=str.charAt(idx);curtoken="";while(str.charAt(idx)==curchar&&idx<str.length){curtoken+=str.charAt(idx++);};tokens.push(curtoken);};return tokens;},dateDiff:function(unit,start,end){start=dateUtil.parseDate(start);end=dateUtil.parseDate(end);if(!start||!end){return null;}
var diff=end.getTime()-start.getTime();switch(unit.toLowerCase()){case"ms":{diff=diff;break;};case"s":{diff=diff/this.second;break;};case"i":{diff=diff/this.minute;break;};case"h":{diff=diff/this.hour;break;};case"d":{diff=diff/this.day;break;};case"w":{diff=diff/this.week;break;};case"y":{diff=diff/this.year;break;};};return diff;},dateAdd:function(unit,amt,date){var diff=0;switch(unit.toLowerCase()){case"ms":{diff=amt*this.millisecond;break;};case"s":{diff=amt*this.second;break;};case"i":{diff=amt*this.minute;break;};case"h":{diff=amt*this.hour;break;};case"d":{diff=amt*this.day;break;};case"w":{diff=amt*this.week;break;};case"y":{diff=amt*this.year;break;};default:{return 0;};};var date=dateUtil.parseDate(date);var mills=(date)?date.getTime()+diff:diff;var nd=new Date();nd.setTime(mills);return nd;},d:function(date){return date.getDate().toString();},dd:function(date){return this.pad(this.d(date));},ddd:function(date){return this.dayshort[date.getDay()];},dddd:function(date){return this.daylong[date.getDay()];},j:function(date){var y=date.getFullYear();var ds=new Date(y,0,0);return Math.round(this.dateDiff("d",ds,date));},m:function(date){return date.getMonth()+1;},mm:function(date){return this.pad(date.getMonth()+1);},mmm:function(date){return this.monthshort[date.getMonth()];},mmmm:function(date){return this.monthlong[date.getMonth()];},y:function(date){return fixedParseInt(date.getFullYear().toString().substr(2));},yy:function(date){return this.pad(this.y(date));},yyyy:function(date){return date.getFullYear();},h:function(date){return(date.getHours()>12?date.getHours()-12:date.getHours());},hh:function(date){return this.pad(this.h(date));},H:function(date){return date.getHours();},HH:function(date){return this.pad(this.H(date));},i:function(date){return date.getMinutes();},ii:function(date){return this.pad(this.i(date));},s:function(date){return date.getSeconds();},ss:function(date){return this.pad(this.s(date));},a:function(date){return(this.H(date)<12?"am":"pm");},A:function(date){return(this.H(date)<12?"AM":"PM");},O:function(date){var tz=(date.getTimezoneOffset()/60)*-1;return(tz<0?tz:"+"+tz);},short:function(date){return this.m(date)+"/"+this.d(date)+"/"+this.yy(date);},medium:function(date){return this.mmm(date)+" "+this.d(date)+", "+this.yyyy(date);},long:function(date){return this.mmmm(date)+" "+this.d(date)+", "+this.yyyy(date);},shorttime:function(date){return this.short(date)+" "+this.HH(date)+":"+this.ii(date);},mediumtime:function(date){return this.medium(date)+" "+this.HH(date)+":"+this.ii(date);},longtime:function(date){return this.long(date)+" "+this.hh(date)+":"+this.ii(date)+":"+this.ss(date)+" "+this.A(date);},iso8610:function(date){return this.yyyy(date)+"-"+this.mm(date)+"-"+this.dd(date)+"T"+this.HH(date)+this.ii(date)+":"+this.ss(date)+this.O(date);},yyyymmdd:function(date){return this.yyyy(date)+"-"+this.mm(date)+"-"+this.dd(date);},format:function(date,format){if(!format){format="medium";};var output="";if(!dateUtil.isDate(date)){return date;};switch(format){case"short":{output+=this.short(date);break;};case"medium":{output+=this.medium(date);break;};case"long":{output+=this.long(date);break;};case"shorttime":{output+=this.shorttime(date);break;};case"mediumtime":{output+=this.mediumtime(date);break;};case"longtime":{output+=this.longtime(date);break;};case"iso8610":{output+=this.iso8610(date);break;};case"yyyymmdd":{output+=this.yyyymmdd(date);break;};default:{var tokens=this.getTokens(format);for(var x=0;x<tokens.length;x++){var part="";switch(tokens[x]){case"d":{part+=this.d(date);break;};case"dd":{part+=this.dd(date);break;};case"ddd":{part+=this.ddd(date);break;};case"dddd":{part+=this.dddd(date);break;};case"m":{part+=this.m(date);break;};case"mm":{part+=this.mm(date);break;};case"mmm":{part+=this.mmm(date);break;};case"mmmm":{part+=this.mmmm(date);break;};case"y":{part+=this.y(date);break;};case"yy":{part+=this.yy(date);break;};case"yyyy":{part+=this.yyyy(date);break;};case"h":{part+=this.h(date);break;};case"hh":{part+=this.hh(date);break;};case"H":{part+=this.H(date);break;};case"HH":{part+=this.H(date);break;};case"i":{part+=this.i(date);break;};case"ii":{part+=this.ii(date);break;};case"s":{part+=this.s(date);break;};case"ss":{part+=this.ss(date);break;};case"a":{part+=this.a(date);break;};case"A":{part+=this.A(date);break;};case"O":{part+=this.O(date);break;};case"j":case"jjj":{part+=this.j(date);break;};default:{part+=tokens[x];break;};};output+=part;};break;}};return output;},parseDate:function(val,format){if(!val){return null;}
val=val.toString();if(!format){for(var i=0;i<this.commonformats.length;i++){var d=this.parseDate(val,this.commonformats[i]);if(d!=null){return d;};};return null;};this.isInteger=function(val){for(var i=0;i<val.length;i++){if("1234567890".indexOf(val.charAt(i))==-1){return false;};};return true;};this.getInt=function(str,i,minlength,maxlength){for(var x=maxlength;x>=minlength;x--){var token=str.substring(i,i+x);if(token.length<minlength){return null;};if(this.isInteger(token)){return token;};};return null;};var day=0;var month=0;var year=0;var hour=0;var minute=0;var second=0;var ampm;var min,max;var jullian=false;var tokens=this.getTokens(format);idx=0;for(var x=0;x<tokens.length;x++){token=tokens[x];switch(token){case"d":case"dd":{day=this.getInt(val,idx,token.length,2);if(day<1||day>31||day==null){return null;}
idx+=day.length;break;};case"ddd":case"dddd":{var names=(token=="ddd"?this.dayshort:this.daylong);for(var check=0;check<names.length;check++){if(val.substr(idx,names[check].length).toLowerCase()==names[check].toLowerCase()){day=check;idx+=names[check].length;break;};};break;};case"j":case"jjj":{var day=this.getInt(val,idx,token.length,3);if(day<1||day>366||day==null){return null;};idx+=day.length;jullian=true;break;};case"m":case"mm":{month=this.getInt(val,idx,token.length,2);if(month<1||month>12||month==null){return null;};idx+=month.length;month=fixedParseInt(month)-1;break;};case"mmm":case"mmmm":{var names=(token=="mmm")?this.monthshort:this.monthlong;for(var check=0;check<names.length;check++){if(val.substr(idx,names[check].length).toLowerCase()==names[check].toLowerCase()){month=check;idx+=names[check].length;break;};};break;};case"yyyy":case"yy":case"y":{max=4;min=token.length;if(token=="y"){min=2;max=4;}
year=this.getInt(val,idx,min,max);if(year==null){return null;}
idx+=year.length;if(year.length==2){if(year>70){year=1900+fixedParseInt(year);}else{year=2000+fixedParseInt(year);}};break;};case"HH":case"H":case"hh":case"h":{hour=this.getInt(val,idx,token.length,2);var maxhour=12;if(token=="HH"||token=="H"){maxhour=23;};if(hour<0||hour>maxhour||hour==null){return null;};idx+=hour.length;break;};case"i":case"ii":case"s":case"ss":{minute=this.getInt(val,idx,token.length,2);if(minute<0||minute>59||minute==null){return null;};idx+=minute.length;break;};case"a":case"A":{var ampm=val.substr(idx,2).toUpperCase();if(ampm=="AM"||ampm=="PM"){idx+=ampm.length;}
else{return null;};break;}
default:{var check=val.substr(idx,token.length);if(check!=token){return null;}
idx+=token.length;};};};if(!jullian){if(month==2){if(((year%4==0)&&(year%100!=0))||(year%400==0)){if(day>29){return null;};};}
else{if(day<1||day>this.monthdays[month]){return null;};};};if(fixedParseInt(hour)<12&&ampm=="PM"){hour=fixedParseInt(hour)+12;}
else if(fixedParseInt(hour)>11&&ampm=="AM"){hour=fixedParseInt(hour)-12;};return new Date(year,month,day,hour,minute,second);},isDate:function(date,format){d=dateUtil.parseDate(date,format);if(d!=null){return true;}else{return false;};}};$.Dates={convertWcfDate:function(date){if(typeof(date)=="string"&&date.substring(0,5)=="/Date"&&date.substring(date.length-1)=="/"){return eval(" new "+date.substring(1,date.length-1));}
return date;},parseDate:function(val,format){return dateUtil.parseDate(val,format);},formatDate:function(date,format){return dateUtil.format(date,format);},dateDiff:function(unit,start,end){return dateUtil.dateDiff(unit,start,end);},dateAdd:function(unit,amt,date){return dateUtil.dateAdd(unit,amt,date);},isDate:function(date,format){return dateUtil.isDate(date,format);},getDateTimeString:function(jqDate,jqTime){var retVal="";if(jqDate&&jqDate.length==1){retVal+=jqDate.val();}
retVal+=" ";if(jqTime&&jqTime.length==1){retVal+=jqTime.val();}
return $.trim(retVal);}}})(jQuery);

$Conarc=window.$Conarc||{};$.extend($.ui.dialog.defaults,{closeOnEscape:false,modal:true});function createMsgPanel(text,image){var retVal=$("<div />");if(image&&typeof image=="string"&&image!=""){retVal.append('<div style="float:left; margin: 0px 10px 0px 0px"><img src="'+image+'"  /></div>');}
return retVal.append('<div style="float:left">'+text+'</div>').append('<div style="clear:both" />');}
$.DialogWindow={displayConfirm:function(settings){var text=(typeof settings=="string"?settings:settings.text);settings=$.extend({},{title:"Confirm",modal:true,buttons:{Ok:function(){$(this).dialog("close").dialog("destroy").remove();}}},settings);var dw=createMsgPanel(text,$.ConarcExt.virtualPath+'images/QandA_24.png');return dw.dialog(settings);},displayError:function(settings){var text=(typeof settings=="string"?settings:settings.text);settings=$.extend({},{title:"Error",modal:true,buttons:{Close:function(){$(this).dialog("close").dialog("destroy").remove();}}},settings);var dw=createMsgPanel(text,$.ConarcExt.virtualPath+'formimages/error.png');return dw.dialog(settings);},displayProcessing:function(settings){settings=settings||{};var text=(typeof settings=="string"?settings:settings.text)||"Processing...";settings=$.extend({},{title:"Please wait.",modal:true,resizable:false,closeOnEscape:false,autoOpen:true},settings);settings.text=text;var dw=createMsgPanel(text,$.ConarcExt.virtualPath+'images/indicator.gif');return dw.dialog(settings);}}

$Conarc=window.$Conarc||{};var documentTagsClass=function(){var docTagTree={settings:{documentPk:null,fileAreaSiteId:null,jqFileTagParent:null,jqTargetControl:null,ensureParentSelected:false},data:{},editorDialog:null,tree:null,previousCheckedValues:null,renderChildren:function(fileTags){docTagTree.setData(fileTags);var settings=$.extend({},docTagTree.settings,{FileTags:fileTags});var jqTemp=$("<div></div>");jqTemp.setTemplate(settings.treeItemTemplate);jqTemp.processTemplate(settings);return jqTemp.html();},getSelectedValues:function(){return docTagTree.settings.jqTargetControl.find(":checked").checkedValues();},createOptions:function(jqMenuItem,optionText){jqMenuItem.children("li").each(function(){var jqThis=$(this);var newOptionText=optionText+(optionText==""?"":"\\")+jqThis.children("label:first").text();var jqOption=$("<option></option>");jqOption.text(newOptionText);jqOption.val(jqThis.attr("fileTagId"));docTagTree.settings.jqFileTagParent.append(jqOption);docTagTree.createOptions(jqThis.children("ul"),newOptionText);});},setData:function(fileTags){$.each(fileTags,function(){docTagTree.data["FileTag_"+this.FileTagId]=this;});},bindEditItem:function(){docTagTree.tree.find(".editItem").click(function(){docTagTree.previousCheckedValues=docTagTree.getSelectedValues();var fileTagId=$(this).parent().attr("fileTagId");var fileTag=docTagTree.data["FileTag_"+fileTagId];$.extend(fileTag,{IsAdmin:docTagTree.settings.isAdmin});var jqData=$("<div />").setTemplate($("#FileTagsEditor_EditTemplate").html()).processTemplate(fileTag).dialog({title:"Edit:  "+fileTag.FileTag,buttons:{Close:function(){jqData.dialog("close").dialog("destroy").remove();}}});var ddlReAssignFiles=jqData.find("#FileTagsEditor_ddlReAssignFiles")
if(ddlReAssignFiles.length){ddlReAssignFiles.html(docTagTree.settings.jqFileTagParent.html());ddlReAssignFiles.removeOption(fileTagId);}
jqData.find("#FileTagsEditor_btnDelete").click(function(){$.iChannelProxy.deleteFileTag({success:function(data){if(data.ResponseError&&data.ResponseError.Message){$.DialogWindow.displayError(data.ResponseError.Message);}
else{docTagTree.loadDocumentTags();jqData.dialog("close").dialog("destroy").remove();}},data:{fileTagId:fileTagId}});});jqData.find("#FileTagsEditor_btnChange").click(function(){var newFileTag=jqData.find("#FileTagsEditor_txtFileTag").val();if(!newFileTag||newFileTag==""){$.DialogWindow.displayError("Document Tag cannot be empty");jqData.find("#FileTagsEditor_txtFileTag").focus();return false;}
$.iChannelProxy.reLabelFileTag({async:false,success:function(data){if(data.ResponseError&&data.ResponseError.Message){$.DialogWindow.displayError(data.ResponseError.Message);}
else{docTagTree.loadDocumentTags();jqData.dialog("close").dialog("destroy").remove();}},data:{fileTagId:fileTagId,fileTag:newFileTag}});});jqData.find("#FileTagsEditor_btnReAssign").click(function(){var newFileTagId=ddlReAssignFiles.val();if(!newFileTagId||newFileTagId==""){$.DialogWindow.displayError("Invalid Re-Assign Selection");jqData.find("#FileTagsEditor_btnReAssign").focus();return false;}
$.iChannelProxy.reAssignFileTag({async:false,success:function(data){if(data.ResponseError&&data.ResponseError.Message){$.DialogWindow.displayError(data.ResponseError.Message);}
else{docTagTree.loadDocumentTags();jqData.dialog("close").dialog("destroy").remove();}},data:{fileTagId:fileTagId,newFileTagId:newFileTagId}});});});},loadDocumentTags:function(newFileTagId){var fileTagParentVal="";if(docTagTree.settings.jqFileTagParent){fileTagParentVal=docTagTree.settings.jqFileTagParent.val();}
$.iChannelProxy.getFileTagList({success:function(data){if(docTagTree.previousCheckedValues){docTagTree.previousCheckedValues=docTagTree.getSelectedValues();}
docTagTree.settings.jqTargetControl.css("color","black");if(data.ResponseError&&data.ResponseError.Message){docTagTree.settings.jqTargetControl.html(data.ResponseError.Message).css("color","red");return;}
if(docTagTree.settings.jqFileTagParent){docTagTree.settings.jqFileTagParent.removeOption(/./);docTagTree.settings.jqFileTagParent.addOption("","");}
if(data.FileTags==null){docTagTree.settings.jqTargetControl.html("No Document Tags found...").css("color","red");}
else{docTagTree.setData(data.FileTags);docTagTree.settings.FileTags=data.FileTags;docTagTree.tree=$Conarc.Tree.init(docTagTree.settings);if(docTagTree.previousCheckedValues){docTagTree.tree.find(":checked").setChecked(false);$.each(docTagTree.previousCheckedValues,function(){docTagTree.tree.find(':checkbox[value='+this+']').setChecked(true);});}
if(newFileTagId){docTagTree.tree.find(':checkbox[value='+newFileTagId+']').setChecked(true);}
docTagTree.tree.find(":checked").parents("ul").show();docTagTree.tree.find(":checked").parents("li.collapsed").removeClass("collapsed").addClass("expanded");if(docTagTree.settings.jqFileTagParent){docTagTree.createOptions(docTagTree.tree,"");}}
if(docTagTree.settings.jqFileTagParent){docTagTree.settings.jqFileTagParent.val(fileTagParentVal);}
if(docTagTree.tree){if(docTagTree.settings.ensureParentSelected===true){docTagTree.tree.find(":checkbox").click(function(){var jqThis=$(this);if(this.checked){jqThis.parents("li").each(function(){var fileTagId=$(this).attr("fileTagId");docTagTree.tree.find(':checkbox[value='+fileTagId+']:not(:checked)').click();});}});docTagTree.tree.find(":checked").parents("li").each(function(){var fileTagId=$(this).attr("fileTagId");docTagTree.tree.find(':checkbox[value='+fileTagId+']:not(:checked)').click();});}}
docTagTree.previousCheckedValues=docTagTree.getSelectedValues();if(docTagTree.tree){docTagTree.bindEditItem();}},data:{fileAreaSiteId:docTagTree.settings.fileAreaSiteId,fileId:docTagTree.settings.documentPk}});},addNewFileTag:function(fileTag,parentFileTagId,addToFileArea){$.iChannelProxy.addNewFileTag({success:function(data){docTagTree.loadDocumentTags(data.Result);},data:{fileTag:fileTag,parentFileTagId:parentFileTagId,fileAreaSiteId:(addToFileArea?docTagTree.settings.fileAreaSiteId:null)}});},init:function(){if(this.settings.editorView===true){this.settings.treeItemTemplate='<ul class="ui-helper-clearfix">{#foreach $T.FileTags as item}<li class="ui-helper-clearfix" fileTagId="{$T.item.FileTagId}"><div class="arrow"></div><div class="editItem"></div><input type="checkbox" value="{$T.item.FileTagId}" style="display:none" /><label class="{#if $T.item.IsFileAreaTag==true}fileAreaTag{#else}rootSiteTag{#/if}">{$T.item.FileTag}</label>{#if $T.item.FileTags != null}{$Conarc.DocumentTagsTreeEditor.renderChildren($T.item.FileTags)}{#/if}</li>{#/for}</ul>';}
else{this.settings.treeItemTemplate='<ul>{#foreach $T.FileTags as item}<li fileTagId="{$T.item.FileTagId}"><div class="arrow"></div><input type="checkbox" value="{$T.item.FileTagId}" {#if $T.item.Selected}checked="checked"{#/if} /><label class="{#if $T.item.IsFileAreaTag==true}fileAreaTag{#else}rootSiteTag{#/if}">{$T.item.FileTag}</label>{#if $T.item.FileTags != null}{$Conarc.DocumentTagsTree.renderChildren($T.item.FileTags)}{#/if}</li>{#/for}</ul>';}
docTagTree.loadDocumentTags();if(docTagTree.settings.fileAreaSiteId&&docTagTree.settings.fileAreaSiteId>0&&$(".caFileTagsEdit:not([icInit])").length>0){var mainDocTagTree=docTagTree;$(".caFileTagsEdit:not([icInit])").css("cursor","pointer").attr("alt","Edit Document Tags").click(function(){var height=550;if($(document.body).height()<height){var temp=$(document.body).height()-30;if(temp>0){height=temp;}}
if(typeof(docTagTree.editorDialog)!="undefined"&&docTagTree.editorDialog){docTagTree.editorDialog.dialog("destroy").remove();}
var jqDialog=$('<div style="overflow:auto;">Loading...</div>');jqDialog.dialog({title:"Document Tags Editor",height:height,width:450,closeOnEscape:false,buttons:{Close:function(){jqDialog.dialog("close").dialog("destroy").remove();jqDialog=null;}},close:function(){if($.isFunction(docTagTree.settings.onClose)){docTagTree.settings.onClose();}}});$.ajax({type:"GET",url:$.ConarcExt.virtualPath+"wc.dll?cadoc~CADOCMANAGE~DMDocuments~DisplayFileTagsEditor~~~~&FileAreaSiteId="+docTagTree.settings.fileAreaSiteId,dataType:"html",cache:false,success:function(data,textStatus){if(jqDialog){jqDialog.html(data);}},error:function(data,textStatus){jqDialog.html("Error:  "+data.status+" - "+data.statusText);}});docTagTree.editorDialog=jqDialog;return false;}).attr("icInit",true);}}};return{settings:null,getTree:function(){return docTagTree.tree;},renderChildren:function(fileTags){return docTagTree.renderChildren(fileTags);},getSelectedValues:function(){return docTagTree.getSelectedValues();},addNewFileTag:function(fileTag,parentFileTagId,addToFileArea){return docTagTree.addNewFileTag(fileTag,parentFileTagId,addToFileArea);},loadDocumentTags:function(newFileTagId){return docTagTree.loadDocumentTags(newFileTagId);},init:function(settings){this.settings=$.extend(docTagTree.settings,settings);docTagTree.init();return this;}};}
$Conarc.DocumentTagsTree=documentTagsClass();$Conarc.DocumentTagsTreeEditor=documentTagsClass();

(function($){$.formatDate=function(date,pattern){var result=[];while(pattern.length>0){$.formatDate.patternParts.lastIndex=0;var matched=$.formatDate.patternParts.exec(pattern);if(matched){result.push($.formatDate.patternValue[matched[0]].call(this,date));pattern=pattern.slice(matched[0].length);}
else{result.push(pattern.charAt(0));pattern=pattern.slice(1);}}
return result.join('');};$.formatDate.patternParts=/^(yy(yy)?|M(M(M(M)?)?)?|d(d)?|EEE(E)?|a|H(H)?|h(h)?|m(m)?|s(s)?|S)/;$.formatDate.monthNamesShort=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];$.formatDate.monthNames=['January','February','March','April','May','June','July','August','September','October','November','December'];$.formatDate.dayNamesShort=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];$.formatDate.dayNames=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];$.formatDate.patternValue={yy:function(date){return $.toFixedWidth(date.getFullYear(),2);},yyyy:function(date){return date.getFullYear().toString();},MMMM:function(date){return $.formatDate.monthNames[date.getMonth()];},MMM:function(date){return $.formatDate.monthNames[date.getMonth()].substr(0,3);},MM:function(date){return $.toFixedWidth(date.getMonth()+1,2);},M:function(date){return date.getMonth()+1;},dd:function(date){return $.toFixedWidth(date.getDate(),2);},d:function(date){return date.getDate();},EEEE:function(date){return $.formatDate.dayNames[date.getDay()];},EEE:function(date){return $.formatDate.dayNames[date.getDay()].substr(0,3);},HH:function(date){return $.toFixedWidth(date.getHours(),2);},H:function(date){return date.getHours();},hh:function(date){var hours=date.getHours();return $.toFixedWidth(hours>12?hours-12:hours,2);},h:function(date){return date.getHours()%12;},mm:function(date){return $.toFixedWidth(date.getMinutes(),2);},m:function(date){return date.getMinutes();},ss:function(date){return $.toFixedWidth(date.getSeconds(),2);},s:function(date){return date.getSeconds();},S:function(date){return $.toFixedWidth(date.getMilliseconds(),3);},a:function(date){return date.getHours()<12?'AM':'PM';}};})(jQuery);

$Conarc=window.$Conarc||{};$Conarc.HtmlEditor={resizeInit:function(settings){var jqNotesFrame=$("#"+settings.controlId+"___Frame");if(jqNotesFrame.length==0){return;}
var loNotesFrame=jqNotesFrame[0];var jqNotesInnerBody=null;var isNotesExpanded=false;var origNotesHeight=settings.height||jqNotesFrame.height();var jqContentAndInnerFrame=$("#"+settings.panelId+" .body .content, #"+loNotesFrame.id);$(window).resize(function(){jqContentAndInnerFrame.height(origNotesHeight);});function resizeNotesContent(){jqNotesInnerBody.height(jqNotesFrame.height());var toolbarHeight=jqNotesInnerBody.find("#xToolbarRow").height();jqNotesInnerBody.find("#xEditingArea iframe").height(jqNotesFrame.height()-toolbarHeight);origNotesHeight=jqNotesFrame.height();}
jqNotesFrame.load(function(){var innerDoc=(this.contentDocument)?this.contentDocument:this.contentWindow.document;jqNotesInnerBody=$(innerDoc.body);jqNotesInnerBody.find("#xExpandHandle, #xCollapseHandle").click(function(){setTimeout(resizeNotesContent,100);setTimeout(resizeNotesContent,500);});origNotesHeight=origNotesHeight||100;jqNotesInnerBody.height(origNotesHeight);jqContentAndInnerFrame.height(origNotesHeight);});$("#"+settings.panelId).resizable({alsoResize:"#"+loNotesFrame.id,start:function(){jqNotesFrame.css("visibility","hidden");},resize:function(){$("#"+settings.panelId).find(".body .content").height(jqNotesFrame.height());},stop:function(){jqNotesFrame.css("visibility","visible");resizeNotesContent();}});return{setHeight:function(height){jqContentAndInnerFrame.height(height);}}}}
$.fn.caHtmlEditor=function(){if(this.length==0){return this;}
var fckBasePath=$.ConarcExt.virtualPath+'fckeditor/';var jqControls=this;if(typeof(FCKeditor)=="undefined"){$.getScript(fckBasePath+'fckeditor.js',function(){jqControls.caHtmlEditor();});return jqControls;}
return this.each(function(){var fck=new FCKeditor(this.id);fck.BasePath=fckBasePath;fck.ToolbarSet='ConarcBasic';fck.ReplaceTextarea();});};

function dropDownListAddNewOnChange(control){var jqThis=$(control);var val=jqThis.val();if(val=="(Add New)"){$("#"+control.id+"_text").val("");$("#"+control.id+"_span").css("display","block");}
else{$("#"+control.id+"_text").val(val);$("#"+control.id+"_span").css("display","none");}}
if(typeof $get!="function"){function $get(id){if(typeof id=="string"){var jqControl=$("#"+id);if(jqControl.length>0){return jqControl[0];}
return document.getElementById(id);}
return null;}}

(function($){$.iChannelProxy={ajaxSetup:{async:true,cache:false,dataType:"json",type:"GET",error:function(xmlHttpRequest,textStatus,errorThrown){alert("Ajax Error:  "+textStatus);},success:function(data){}},getAutoCompleteEntityNameSearch:function(settings){settings=$.extend({},$.iChannelProxy.ajaxSetup,settings);if(!settings||!settings.data){alert("getAutoCompleteEntityNameSearch - Missing data");return;}
settings.data.sessionId=$.ConarcExt.getSessionId();settings.url=$.ConarcExt.virtualPath+"DataService/iChannelRestDataService.svc/AutoCompleteEntityNameSearch";$.ajax(settings);},getGeneralSearchContactList:function(settings){settings=$.extend({},$.iChannelProxy.ajaxSetup,settings);if(!settings||!settings.data){alert("getGeneralSearchContactList - Missing data");return;}
settings.data.sessionId=$.ConarcExt.getSessionId();settings.url=$.ConarcExt.virtualPath+"DataService/iChannelRestDataService.svc/GetGeneralSearchContactList";$.ajax(settings);},getActivityContactList:function(settings){settings=$.extend({},$.iChannelProxy.ajaxSetup,settings);if(!settings||!settings.data){alert("getActivityContactList - Missing data");return;}
settings.data.sessionId=$.ConarcExt.getSessionId();settings.url=$.ConarcExt.virtualPath+"DataService/iChannelRestDataService.svc/GetActivityContactList";$.ajax(settings);},getTaskContactList:function(settings){settings=$.extend({},$.iChannelProxy.ajaxSetup,settings);if(!settings||!settings.data){alert("getTaskContactList - Missing data");return;}
settings.data.sessionId=$.ConarcExt.getSessionId();settings.url=$.ConarcExt.virtualPath+"DataService/iChannelRestDataService.svc/GetTaskContactList";$.ajax(settings);},getFileTagList:function(settings){settings=$.extend({},$.iChannelProxy.ajaxSetup,settings);if(!settings||!settings.data){alert("getFileTagList - Missing data");return;}
settings.data.sessionId=$.ConarcExt.getSessionId();settings.url=$.ConarcExt.virtualPath+"DataService/iChannelRestDataService.svc/GetFileTagList";$.ajax(settings);},deleteFileTag:function(settings){settings=$.extend({},$.iChannelProxy.ajaxSetup,settings);if(!settings||!settings.data){alert("deleteFileTag - Missing data");return;}
settings.data.sessionId=$.ConarcExt.getSessionId();settings.url=$.ConarcExt.virtualPath+"DataService/iChannelRestDataService.svc/DeleteFileTag";$.ajax(settings);},addNewFileTag:function(settings){settings=$.extend({},$.iChannelProxy.ajaxSetup,settings);if(!settings||!settings.data){alert("addNewFileTag - Missing data");return;}
settings.data.sessionId=$.ConarcExt.getSessionId();settings.url=$.ConarcExt.virtualPath+"DataService/iChannelRestDataService.svc/AddNewFileTag";$.ajax(settings);},reLabelFileTag:function(settings){settings=$.extend({},$.iChannelProxy.ajaxSetup,settings);if(!settings||!settings.data){alert("reLabelFileTag - Missing data");return;}
settings.data.sessionId=$.ConarcExt.getSessionId();settings.url=$.ConarcExt.virtualPath+"DataService/iChannelRestDataService.svc/ReLabelFileTag";$.ajax(settings);},reAssignFileTag:function(settings){settings=$.extend({},$.iChannelProxy.ajaxSetup,settings);if(!settings||!settings.data){alert("reAssignFileTag - Missing data");return;}
settings.data.sessionId=$.ConarcExt.getSessionId();settings.url=$.ConarcExt.virtualPath+"DataService/iChannelRestDataService.svc/ReAssignFileTag";$.ajax(settings);},documentSearch:function(settings){settings=$.extend({},$.iChannelProxy.ajaxSetup,settings);if(!settings||!settings.data){alert("documentSearch - Missing data");return;}
settings.data.sessionId=$.ConarcExt.getSessionId();settings.url=$.ConarcExt.virtualPath+"DataService/iChannelRestDataService.svc/DocumentSearch";$.ajax(settings);}};})(jQuery);

var jqBodyLoadingDialog;$.keyCode=$.keyCode||{};$.keyCode.F7=118;function createBasicPanel(settings){var panel=$('<div><div class="header"><div class="outer"><div class="inner"><div class="content"></div></div></div></div><div class="bottomOuter"><div class="body"><div class="outer"><div class="inner"><div class="content"></div></div></div></div><div class="footer"><div class="outer"><div class="inner"><div class="content"></div></div></div></div></div></div>');if(settings.panelCssClass){panel.addClass(settings.panelCssClass);}
if(settings.headerHtml){getPanelHeader(panel).html(settings.headerHtml);}
if(settings.bodyHtml){getPanelBody(panel).html(settings.bodyHtml);}
if(settings.footerHtml){getPanelFooter(panel).html(settings.footerHtml);}
return panel;}
function getPanelHeader(panel){return $(".header .content",panel);}
function getPanelBody(panel){return $(".body .content",panel);}
function getPanelFooter(panel){return $(".footer .content",panel);}
$.ConarcExt={virtualPath:"",PageInit:function(settings){var caDatePickerSettings=(settings||{}).caDatePickerSettings;$Conarc.DatePicker.init();$Conarc.AutoComplete.init($("*").filter(":input:not([icInit])"),(settings||{}).caAutoComplete);$("*").filter(":input:not([icInit])").filter(".caTrimText").blur(function(){if(this.value){this.value=$.trim(this.value);}}).end().filter(".caDatePicker").datepicker(caDatePickerSettings).attr("size",11).attr("maxlength",11).end().filter(".caTimeEntry").caTimeEntry().end().filter(".caSpellChecker, textarea").caSpellChecker().end().filter(".caHtmlEditor").caHtmlEditor().end().attr("icInit",true).end().filter(".styledPanel:has(.collapsable)").each(function(){var jqState=$("#"+this.id+"_collapsable_state");if(jqState.length==0){jqState=$('<input type="hidden" name="'+this.id+"_collapsable_state"+'" id="'+this.id+"_collapsable_state"+'" />');$(this).before(jqState);}
var jqBottom=$(".bottomOuter",this);var jqExpandImg=$(".header .collapsable img",this).click(function(){if(jqExpandImg.hasClass("expanded")){jqExpandImg.removeClass("expanded").addClass("collapsed");jqState.val("collapsed");jqBottom.slideUp();}
else{jqExpandImg.removeClass("collapsed").addClass("expanded");jqBottom.slideDown();jqState.val("expanded");}});if(jqExpandImg.hasClass("collapsed")){jqBottom.hide();}}).end();$(".ui-datepicker-trigger").attr("alt","show/hide date picker").attr("title","show/hide date picker");return{};},UI:{createTraceWriter:function(){var tw=$('<textarea style="width:100%" rows="10"></textarea>');tw.write=function(value){this.text(value+'\n\r'+this.text());}
$(document.body).append(tw);return tw;},dualListBox:{init:function(settings){var jqLeftListBox=$(settings.leftListBoxElement);var jqRightListBox=$(settings.rightListBoxElement);if(jqLeftListBox.length==0||jqRightListBox.length==0){return false;}
function addSelected(){jqRightListBox.find("option").each(function(){this.selected=false;});jqRightListBox.append(jqLeftListBox.find("option:selected"));if($.isFunction(settings.addCompleted)){settings.addCompleted.call();}}
jqLeftListBox.dblclick(addSelected);if(settings.addSelectedButtonElement){$(settings.addSelectedButtonElement).click(addSelected);}
if(settings.addAllButtonElement){$(settings.addAllButtonElement).click(function(){jqLeftListBox.selectOptions(/./);addSelected();});}
function remove(jqItemList){var jqUnselected;if(settings.addRemovedOptGroup===false){jqUnselected=jqLeftListBox;}
else{jqUnselected=jqLeftListBox.find("optgroup[label=Removed]");if(jqUnselected.length==0){jqUnselected=$('<optgroup label="Removed"></optgroup>');jqLeftListBox.prepend(jqUnselected);}}
jqLeftListBox.find("option").each(function(){this.selected=false;});jqUnselected.append(jqItemList);if($.isFunction(settings.removeCompleted)){settings.removeCompleted.call();}}
function removeSelected(){remove(jqRightListBox.find("option:selected"));}
jqRightListBox.dblclick(removeSelected);if(settings.removeSelectedButtonElement){$(settings.removeSelectedButtonElement).click(removeSelected);}
if(settings.removeAllButtonElement){$(settings.removeAllButtonElement).click(function(){jqRightListBox.selectOptions(/./);removeSelected();});}}},panel:{createBubblePanel:function(settings){settings=settings||{};settings.bodyHtml=settings.bodyHtml||"&nbsp;";settings.panelCssClass="bubblePanel";settings.headerHtml=null;settings.footerHtml="<img border=\"0\" height=\"13px\" src=\""+$.ConarcExt.virtualPath+"images/spacer.gif\" />";var panel=createBasicPanel(settings);panel.html=function(html){return getPanelBody(panel).html("<div style=\"padding:5px;\">"+html+"</div>");}
return panel;},createStyledPanel:function(settings){settings=$.extend({},{panelCssClass:"styledPanel",headerHtml:"&nbsp;",bodyHtml:"&nbsp;",footerHtml:"&nbsp;"},settings);var panel=createBasicPanel(settings);panel.getHeader=function(){return getPanelHeader(this);},panel.getBody=function(){return $(".body .content",this);}
panel.getFooter=function(){return getPanelFooter(this);}
return panel;},setResize:function(panel,control){var body=$(".body .content",panel);var bodyHeightDiff=panel.height()-body.height();var controlHeightDiff=0;var controlWidthDiff=0;if(control){controlHeightDiff=panel.height()-control.height();controlWidthDiff=panel.width()-control.width();}
panel.resizable({handles:"se",minHeight:panel.height(),minWidth:250,resize:function(e,ui){body.height(ui.size.height-bodyHeightDiff);if(control){control.height(ui.size.height-controlHeightDiff).width(ui.size.width-controlWidthDiff);}}});}}},getSessionId:function(){var sessionId="";if(document.cookie&&document.cookie!=''){$.each(document.cookie.split(';'),function(){var cookie=this.split("=");if($.trim(cookie[0].toUpperCase())=="CONARC"){sessionId=decodeURIComponent(cookie[1]);}});}
return sessionId;}};$.fn.bubblePanel=function(settings){settings=$.extend({},{bubblePanelCss:"bubblePanelHoverPanel",mouseOverCss:"mouseOver",loadingHtml:"<div style=\"height:100%;width:100%;text-align:center;vertical-align:middle;\"><img src=\""+$.ConarcExt.virtualPath+"images/indicator.gif\" />&nbsp;loading...</div>"},settings);var panel=$.ConarcExt.UI.panel.createBubblePanel(settings.bubblePanelSettings);var jqLastActiveControl=null;var jqTargetControlList=null;var bodyEvent;if(settings.htmlUrl&&!settings.beforeShow){settings.beforeShow=function(panel,jqTargetControl){$.ajax({type:"GET",url:settings.htmlUrl,async:true,dataType:"html",cache:false,success:function(data,textStatus){panel.html(data);jqTargetControl.data("cachedHtml",data);},error:function(data,textStatus){panel.html("Error:  "+data.status+" - "+data.statusText);}});}}
if(settings.bubblePanelCss){panel.addClass(settings.bubblePanelCss);}
function bubblePanelMouseOver(event){event=event||bodyEvent;var jqTargetControl=$(this).addClass(settings.mouseOverCss);if(!(panel.attr("isVisible")==="true")){clearTimeout(panel.attr("timerId"));panel.attr("timerId",setTimeout(function(){if(!jqTargetControl.hasClass(settings.mouseOverCss)){checkActiveControl(jqTargetControl);return;}
var cachedHtml=jqTargetControl.data("cachedHtml");if(cachedHtml){panel.html(cachedHtml);}
else{if(settings.loadingHtml){panel.html(settings.loadingHtml);}
if(settings.beforeShow){settings.beforeShow(panel,jqTargetControl);}}
var position=jqTargetControl.position();panel.attr("timerId","").attr("isVisible","true").css("top",event.pageY).css("left",event.pageX).slideDown("fast",function(){checkActiveControl(jqTargetControl);});},250))}}
function bubblePanelMouseOut(){var jqTargetControl=$(this).removeClass(settings.mouseOverCss);if(panel.attr("isVisible")==="true"){clearTimeout(panel.attr("timerId"));panel.attr("timerId",setTimeout(function(){if(jqTargetControl.hasClass(settings.mouseOverCss)){checkActiveControl(jqTargetControl);return}
panel.attr("timerId","").attr("isVisible","false").slideUp("fast",function(){checkActiveControl(jqTargetControl);});},600));}}
function checkActiveControl(jqTargetControl){var jqActiveTarget=jqTargetControlList.filter("."+settings.mouseOverCss);if(!jqTargetControl||(jqActiveTarget.length>0&&jqActiveTarget!=jqTargetControl)){bubblePanelMouseOver.call(jqActiveTarget);jqLastActiveControl=jqActiveTarget;}}
$(document.body).mousemove(function(e){bodyEvent=e;}).append(panel);panel.hover(function(event){clearTimeout(panel.attr("timerId"));event.stopPropagation();event.preventDefault()
return false;},function(){bubblePanelMouseOut.call(jqLastActiveControl);return false;});jqTargetControlList=this.each(function(){$(this).hover(bubblePanelMouseOver,bubblePanelMouseOut);});return jqTargetControlList;};$.fn.caTimeEntry=function(settings){if(typeof settings=='string'){var param2=(arguments.length>1?arguments[1]:null);return $(this).timeEntry(settings,param2);}
else{settings=$.extend({},{ampmPrefix:' ',spinnerImage:$.ConarcExt.virtualPath+'images/timeEntry.png',timeSteps:[1,30,1],spinnerSize:[0,0,0],spinnerIncDecOnly:true},settings);return this.each(function(){var val=$(this).val();var date=new Date(val);var jqThis=$(this).width("55px").timeEntry(settings);jqThis.timeEntry("setTime",date);});}};$.fn.displayLoading=function(hide){return this.each(function(){if(this.nodeName.toLowerCase()=="body"){if(hide){if(jqBodyLoadingDialog){jqBodyLoadingDialog.caDialog("close");jqBodyLoadingDialog=null;}}
else{jqBodyLoadingDialog=$('<div><img src="'+$.ConarcExt.virtualPath+'images/loading.gif" /></div>');jqBodyLoadingDialog.caDialog({title:"",modal:true,draggable:false,resizable:false,height:120,width:175,closeOnEscape:false,dialogClass:"loadingPanel"});}}
else if(this.nodeName.toLowerCase()=="select"){if(this.nodeName.toLowerCase()=="select"){$(this).find("OPTION, OPTGROUP").remove().end().addOption("-1","loading...").disable()[0].selectedIndex=-1;};}});}
$.fn.zebraStripe=function(){return this.filter(":not(:hidden)").filter(":odd").addClass("rowLight").end().filter(":even").addClass("rowDark").end().end();}
$.fn.resizeToMaxHeight=function(min){if(!this){return;}
var max=(min||0);this.each(function(){max=Math.max(max,$(this).height());});max=Math.max(max,0);return this.each(function(){$(this).height(max);});};$.fn.resizeToMaxWidth=function(min){if(!this){return;}
var max=(min||0);this.each(function(){max=Math.max(max,$(this).width());});max=Math.max(max,0);return this.each(function(){$(this).width(max);});};$.fn.selectedValues=function(){var v=[];this.find("option:selected").each(function(){v[v.length]=this.value;});return v;};$.fn.setReadOnly=function(readonly){return this.filter('input:text').attr('readonly',readonly).css('opacity',readonly?0.5:1.0);};$.fn.enable=function(){return this.each(function(){if(typeof this.disabled!="undefined")this.disabled=false;});};$.fn.disable=function(){return this.each(function(){if(typeof this.disabled!="undefined")this.disabled=true;});};$.fn.getClassNames=function(){if(name=this.attr("className")){return name.split(" ");}
else{return[];}};$.fn.replaceWith=function(html){return this.after(html).remove();};$.fn.setPanelOverflowHeight=function(maxHeight){return this.each(function(){var jqThis=jQuery(this);if(jqThis.height()>maxHeight){jqThis.height(maxHeight).css("overflow-y","auto");}})};$.toFixedWidth=function(value,length,fill){if(!fill){fill='0';}
var result=value.toString();var padding=length-result.length;if(padding<0){result=result.substr(-padding);}
else{for(var n=0;n<padding;n++)result=fill+result;}
return result;};

(function($){var jqPageMessage=null;function getPageMessage(){if(jqPageMessage==null){var jqPageMessage=$(".pageMessage");if(jqPageMessage.length==0){jqPageMessage=$('<div class="pageMessage" style="display:none" />');if($(".pageHeader").length>0){$(".pageHeader").after(jqPageMessage);}
else if($(".buttonPanel").length>0){$(".buttonPanel").after(jqPageMessage);}
else{$("body :first").before(jqPageMessage);}}}
return jqPageMessage;}
function addPageMessage(jqParent,groupData,itemCss){if(!groupData||!groupData.Text||!groupData.Data||!itemCss){return;}
jqParent.append('<div class="pmTitle">'+groupData.Text+'</div>');$.each(groupData.Data,function(){var jqMsg=$('<div class="'+itemCss+'">'+this.Message.replace(/\n/g,"<br />")+'</div>');if(this.ControlId){var jqControl=$("#"+this.ControlId);if(jqControl.length>0){jqMsg.html("");jqMsg.append($('<a href="#" controlId="'+this.ControlId+'" tabId="'+(this.TabId||"")+'">'+this.Message+"</a>"));}}
jqParent.append(jqMsg);});}
$.PageMessage={clear:function(){var jqPM=getPageMessage();jqPM.slideUp();jqPM.html("");},display:function(data){var jqPM=getPageMessage();var jqDiv=$("<div />");if(data&&(data.Error||data.Warning||data.Success)){addPageMessage(jqDiv,data.Error,"pmError");addPageMessage(jqDiv,data.Warning,"pmWarning");addPageMessage(jqDiv,data.Success,"pmSuccess");this.clear();jqPM.append("<table><tr><td>"+jqDiv.html()+"</td></tr></table>");jqPM.find("a").click(function(){if(this.tabId&&this.tabId!=""){alert("selecting a tab has not been implemented yet");}
if(this.controlId){$("#"+this.controlId).focus();}});jqPM.slideDown();}
else{this.clear();}}}})(jQuery);

(function($){$Conarc=(typeof $Conarc=="undefined"?{}:$Conarc);$Conarc.SaveNotification=(function(){var trackChanges=true;var trackingControlsSelector=":input:not(.skipSubmitNotifcation):not(:button):not([type=hidden])";var jqTrackingControls=null;function getControls(){if(!jqTrackingControls){jqTrackingControls=$(trackingControlsSelector);}
return jqTrackingControls;}
function getHasChanges(){var hasChanges=false;getControls().each(function(){if((this.type=="text"||this.type=="textarea"||this.type=="hidden")&&this.defaultValue!=this.value){hasChanges=true;return false;}
else{if((this.type=="radio"||this.type=="checkbox")&&this.defaultChecked!=this.checked){hasChanges=true;return false;}
else{if((this.type=="select-one"||this.type=="select-multiple")){for(var x=0;x<this.length;x++){if(this.options[x].selected!=this.options[x].defaultSelected){hasChanges=true;return false;}}}}}});return hasChanges;}
function reset(){getControls().each(function(){if(this.type=="text"||this.type=="textarea"||this.type=="hidden"){this.defaultValue=this.value;}
if(this.type=="radio"||this.type=="checkbox"){this.defaultChecked=this.checked;}
if(this.type=="select-one"||this.type=="select-multiple"){for(var x=0;x<this.length;x++){this.options[x].defaultSelected=this.options[x].selected}}});}
function init(){if($.browser.msie){window.onbeforeunload=function(){if(trackChanges&&getHasChanges()){window.event.returnValue="There are unsaved changes";}}}}
return{init:function(selector){trackingControlsSelector=selector||trackingControlsSelector;init();reset();},reset:function(){reset();},suspend:function(){trackChanges=false;},resume:function(){trackChanges=true;},hasChanges:function(){return getHasChanges();}}})();})(jQuery);

(function($){$.SpellChecker={activeControl:null,instance:null,options:{allowMultipleDialogs:false,modal:true,showFinishedMessage:false,showNoErrorsMessage:false,spellCheckingText:"Spell Checking Document...",windowHeight:410,windowWidth:380,windowX:100,windowY:100,allowCaseInsensitiveSuggestions:true,allowMixedCase:false,allowWordsWithDigits:false,allowXML:true,checkHyphenatedText:true,includeUserDictionaryInSuggestions:false,languageParser:"English",separateHyphenWords:false,suggestionsMethod:"HASHING_SUGGESTIONS",allowCapitalizedWords:true,checkCompoundWorkds:false,considerationRange:"-1",splitWorkThreshold:"3",suggestSplitWords:true,userDictionaryFile:"",dictionary:"",autoPostBackSpellCheckComplete:false},getInstance:function(){if(this.instance==null){this.instance=ig_CreateWebSpellChecker([["WebSpellChecker1","WebSpellChecker1",this.options.checkCompoundWorkds,this.options.considerationRange,this.options.allowCapitalizedWords,this.options.allowWordsWithDigits,this.options.allowXML,this.options.includeUserDictionaryInSuggestions,this.options.languageParser,this.options.checkHyphenatedText,this.options.modal,$.ConarcExt.virtualPath+"common/SpellCheckerDialog.aspx",this.options.separateHyphenWords,this.options.showFinishedMessage,this.options.showNoErrorsMessage,this.options.spellCheckingText,this.options.suggestionsMethod,this.options.suggestSplitWords,"",this.options.userDictionaryFile,this.options.windowHeight,this.options.windowWidth,this.options.windowX,this.options.windowY,this.options.allowMixedCase,this.options.autoPostBackSpellCheckComplete,this.options.allowMultipleDialogs,"",this.options.dictionary,this.options.allowCaseInsensitiveSuggestions,"","","",this.options.splitWorkThreshold],[["GetText","$.SpellChecker.events.getText",false],["SetText","$.SpellChecker.events.setText",false],["SpellCheckComplete","$.SpellChecker.events.spellCheckComplete",false],["WordCorrected","$.SpellChecker.events.wordCorrected",false],["BeforeSpellCheckBegins","$.SpellChecker.events.beforeSpellCheckBegins",false]],[],[]]);}
return this.instance;},checkSpelling:function(element){this.activeControl=$(element);if(this.activeControl.length>0){this.getInstance().checkTextComponent(this.activeControl[0].id);}},events:{beforeSpellCheckBegins:function(oWebSpellChecker,oEvent,uncheckedText){},spellCheckComplete:function(oWebSpellChecker,oEvent,uncheckedText,checkedText){if(uncheckedText==checkedText){alert("No Spelling Errors In Text...")}},wordCorrected:function(oWebSpellChecker,oEvent,uncheckedWord,checkedWord){},getText:function(oWebSpellChecker,oEvent,uncheckedText){return $.SpellChecker.activeControl.html();},setText:function(oWebSpellChecker,oEvent,checkedText){oEvent.cancel=true;$.SpellChecker.activeControl.html(checkedText);}}};$.fn.caSpellChecker=function(){return this.keyup(function(ev){if(ev.which==$.keyCode.F7){$.SpellChecker.checkSpelling(this);}});};})(jQuery);

window.$Conarc=window.$Conarc||{};(function($){var tabContentTemplate='<a href="#{href}"><span>#{label}</span></a>';$.ui.tabs.defaults.tabTemplate='<li>'+tabContentTemplate+'</li>';function getFrameList(){return $("iframe").filter(function(){return!(this.id.length>8&&this.id.substring(this.id.length-8)=="___Frame");});}
$.fn.caTabs=function(settings){var jqTabs=$(this);jqTabs.find("li").dblclick(function(){var tabIndex=jqTabs.data('selected.tabs');this.unselect=true;$(this).removeClass("ui-tabs-selected");jqTabs.tabs("select",tabIndex);});getFrameList().load(function(){resizeIFrame(this);});return jqTabs.tabs().bind("tabsselect",function(event,ui){jqTabs.find("a").attr("title","");var controlId=ui.tab.href.substring(ui.tab.href.indexOf("#"));$("#lastSelectedTab").val(ui.index);$(".caActionButton").enable();if(controlId){var jqIFrame=$(controlId+" iframe[origsrc]");if(jqIFrame.length>0){$(ui.tab).attr("title","Double Click tab to refresh contents");var loIFrame=jqIFrame[0];loIFrame.contentWindow.location=jqIFrame.attr("origsrc");$(".caActionButton").disable();}}});};jqContentTable=null;function getContentTableHeight(){jqContentTable=$("#tblTabContent");if(jqContentTable.length>0){var height;var top=jqContentTable.position().top;try{height=Math.max($(document.body).innerHeight()-top-20,300);}
catch(e){height=Math.max(document.body.scrollHeight-top-20,300);}
jqContentTable.height(height);return height;}
return 300;}
function resizeIFrame(loIFrame){var innerDoc=(loIFrame.contentDocument)?loIFrame.contentDocument:loIFrame.contentWindow.document;$(innerDoc.body).height("100%");$(loIFrame).height(getContentTableHeight());}
function resizePage(){getContentTableHeight();getFrameList().filter(":visible").each(function(){resizeIFrame(this);});}
$(window).resize(function(){resizePage();});$Conarc.Tabs={addCountText:function(settings){if(settings.count>0){var jqContent=$('<font style="position:relative; top: -3px;right:-3px;color: '+(settings.isRecent?"red;":"black")+'">('+settings.count+')</font>');if(settings.bubbleUrl){jqContent.bubblePanel({htmlUrl:settings.bubbleUrl});}
settings.jqTabContent.find(".tabContent").append(jqContent);}
return settings.jqTabContent;},init:function(settings){settings=$.extend({},{},settings);settings.expand=$.extend({},{tabTemplate:"",expandTargetId:null,expandable:false,expanded:false,template:'<div class="expandTab"><div class="ui-tabs-nav">'+tabContentTemplate.replace("#{href}","javascript:void(0);").replace("#{label}",'<img class="expanded" src="'+$.ConarcExt.virtualPath+"images/blank.gif"+'" /></div>'),expand:function(){if(settings.expand.expandTargetId!=null){$("#"+settings.expand.expandTargetId).slideUp("normal",function(){resizePage();});resizePage();$(this).removeClass("expanded").addClass("collapsed");}},collapse:function(){if(settings.expand.expandTargetId!=null){$("#"+settings.expand.expandTargetId).slideDown("normal",function(){resizePage();});resizePage();$(this).removeClass("collapsed").addClass("expanded");}}},settings.expand||{});var jqTarget=$("#"+settings.targetId).addClass("ui-tabs");var jqDiv=$('<div class="ui-tabs-div"></div>');jqTarget.append(jqDiv);jqTarget=jqDiv;var tabTemplate=$.ui.tabs.defaults.tabTemplate.replace("#{href}","{$T.item.controlId}").replace("#{label}","{$T.item.text}").replace("<li>",'<li id="{$T.item.id}" class="ui-state-default ui-corner-top">');var template='<ul>{#foreach $T.items as item}'+tabTemplate+'{#/for}</ul>';jqTarget.setTemplate(template);jqTarget.processTemplate(settings);$.each(settings.items,function(){if(this.visible===false){jqTarget.find("#"+this.id).hide();}});var jqTabs=jqTarget.caTabs(settings);jqTabs.find("ul:first").removeClass("ui-widget-header").removeClass("ui-corner-all");jqTarget.addClass("ui-helper-clearfix");if(settings.expand.expandable===true){var jqDiv=$(settings.expand.template);var jqImg=jqDiv.find("img");jqTarget.prepend(jqDiv);if(settings.expand.expanded&&settings.expand.expandTargetId!=null){$("#"+settings.expand.expandTargetId).hide();jqImg.attr("css","expanded");jqImg.toggle(settings.expand.collapse,settings.expand.expand);}
else{jqImg.toggle(settings.expand.expand,settings.expand.collapse);}}
jqTabs.find("a").wrap('<div class="tabOuter"><div class="tabInner"><div class="tabContent"></div></div></div>');if(jqTabs.find(".ui-tabs-selected").length==0){jqTabs.find("li:first").addClass("ui-tabs-selected");}
return jqTabs;}}})(jQuery);

$Conarc=window.$Conarc||{};$Conarc.Tree={defaults:{targetId:null,treeItemTemplate:""},init:function(settings){settings=$.extend({},this.defaults,settings);var jqTarget=settings.jqTargetControl;var jqRoot=$('<ul class="tree"></ul>');jqTarget.setTemplate(settings.treeItemTemplate);jqTarget.processTemplate(settings);jqTarget.find(".arrow").click(function(){var jqThis=$(this);var jqParent=jqThis.parent();if(jqParent.find("ul").length>0){if(jqParent.hasClass("collapsed")){jqParent.removeClass("collapsed").addClass("expanded").find("ul:first").slideDown();}
else{jqParent.removeClass("expanded").addClass("collapsed").find("ul:first").slideUp();}}
if(settings.afterClicked){settings.afterClicked.call(this,jqParent);}});var jqTreeRoot=jqTarget.find("ul:first").addClass("tree");jqTreeRoot.find("li:has(ul)").addClass("collapsed").end().find("ul").hide();return jqTreeRoot;}}

$Conarc=window.$Conarc||{};(function($){$Conarc.WebPage={pageAction:{saveSubscrSetting:function(params){$.ajax({type:"GET",url:params.page+"?PageAction=AjaxPreserveSubscriberSetting&SettingKey="+params.settingKey
+"&SettingVal="+params.settingVal
+"&SubScriberFormSettingId="+params.subScriberFormSettingId
+"&NoCache="+new Date().getTime()});}}};})(jQuery);

function ig_CreateWebSpellChecker(props){if(!ig_WebControl.prototype.isPrototypeOf(ig_WebSpellChecker.prototype)){ig_WebSpellChecker.prototype=new ig_WebControl();ig_WebSpellChecker.prototype.constructor=ig_WebSpellChecker;ig_WebSpellChecker.prototype.base=ig_WebControl.prototype;ig_WebSpellChecker.prototype.init=function(props){this._isInitializing=true;this._initControlProps(props);var o;if(ig_all)
o=ig_all[this.getClientID()];this.base.init.apply(this,[this.getClientID()]);this._isInitializing=false;this._spellChecker=this;var id=this.getButtonId();if(id!=null&&id.length>0){var button=document.getElementById(id);if(button!=null){button._spellChecker=this;ig_shared.addEventListener(button,"click",this._buttonClick,true);}}}
ig_WebSpellChecker.prototype._onUnload=function(src,evnt){if(this._window!=null)
this._window.close();}
ig_WebSpellChecker.prototype._buttonClick=function(evnt){var elem=evnt.target;if(evnt.srcElement)
elem=evnt.srcElement
elem._spellChecker.checkTextComponent();if(!ig_shared.IsIE)ig_cancelEvent(evnt);}
ig_WebSpellChecker.prototype.checkTextComponent=function(textComponentId){if(textComponentId==null)
textComponentId=this._spellChecker.getTextComponentId()
var textToBeChecked=this._spellChecker._escQuotes(this._spellChecker._escEntities(this._spellChecker.getText(textComponentId)));this._spellChecker.checkSpelling(textToBeChecked,null,textComponentId);}
ig_WebSpellChecker.prototype.checkSpelling=function(textToBeChecked,returnFunc,textComponentId){if(textToBeChecked!=null&&textToBeChecked.length>0){textToBeChecked=escape(textToBeChecked.replace(/\+/g,"%2B"));if(textComponentId==null&&returnFunc!=null)
this._spellChecker._returnFunc=returnFunc;else
this._spellChecker._returnFunc=null;if(textComponentId==null)
textComponentId="";var doc="<html><meta http-equiv='Content-Type' content='text/html; charset=utf-8'>";doc+="<font face='arial, helvetica' size=2>"+this._spellChecker.getSpellCheckText()+"</font>";var dialogUrl=this._spellChecker.getWebSpellCheckerDialogPage();if(dialogUrl.length>0)
doc+="<form accept-charset='UTF-8' action='"+dialogUrl+"' method='post'>";else{doc+="<form accept-charset='UTF-8' action='"+document.forms[0].action+"' method='post'>";}
doc+="<input type='hidden' name='textToCheck' value=\""+textToBeChecked+"\">";doc+="<input type='hidden' name='UserDictionaryFile' value='"+this._spellChecker.getUserDictionaryFile()+"'>";doc+="<input type='hidden' name='SuggestionsMethod' value='"+this._spellChecker.getSuggestionsMethod()+"'>";doc+="<input type='hidden' name='LanguageParser' value='"+this._spellChecker.getLanguageParser()+"'>";doc+="<input type='hidden' name='SeparateHyphenWords' value='"+this._spellChecker.getSeparateHyphenWords()+"'>";doc+="<input type='hidden' name='AllowWordsWithDigits' value='"+this._spellChecker.getAllowWordsWithDigits()+"'>";doc+="<input type='hidden' name='SuggestSplitWords' value='"+this._spellChecker.getSuggestSplitWords()+"'>";doc+="<input type='hidden' name='CheckCompoundWords' value='"+this._spellChecker.getCheckCompoundWords()+"'>";doc+="<input type='hidden' name='WebSpellCheckerId' value='"+this._spellChecker.getClientID()+"'>";doc+="<input type='hidden' name='AllowMixedCase' value='"+this._spellChecker.getAllowMixedCase()+"'>";doc+="<input type='hidden' name='IncludeUserDictionaryInSuggestions' value='"+this._spellChecker.getIncludeUserDictionaryInSuggestions()+"'>";doc+="<input type='hidden' name='CheckHyphenatedText' value='"+this._spellChecker.getCheckHyphenatedText()+"'> ";doc+="<input type='hidden' name='AllowXML' value='"+this._spellChecker.getAllowXML()+"'>";doc+="<input type='hidden' name='AllowCapitalizedWords' value='"+this._spellChecker.getAllowCapitalizedWords()+"'>";doc+="<input type='hidden' name='AllowCaseInsensitiveSuggestions' value='"+this._spellChecker.getAllowCaseInsensitiveSuggestions()+"'>";doc+="<input type='hidden' name='ConsiderationRange' value='"+this._spellChecker.getConsiderationRange()+"'>";doc+="<input type='hidden' name='Dictionary' value='"+this._spellChecker.getDictionary()+"'>";doc+="<input type='hidden' name='TextComponentId' value ='"+textComponentId+"'>";doc+="<input type='hidden' name='SplitWordThreshold' value='"+this._spellChecker.getSplitWordThreshold()+"'>";doc+="<input type='hidden' name='FormId' value='"+(window.document.forms&&window.document.forms.length>0?window.document.forms[0].id:window.document.body.id)+"'>";doc+="</form></body>";doc+="</html>";var url="";var left=this._spellChecker.getWindowX()>0?"left="+this._spellChecker.getWindowX()+", ":"";var top=this._spellChecker.getWindowY()>0?"top="+this._spellChecker.getWindowY()+", ":"";var width="width="+this._spellChecker.getWindowWidth();var height="height="+this._spellChecker.getWindowHeight();if(!this._spellChecker._onBeforeSpellCheckBegins(textToBeChecked)){if(!this._spellChecker.getModal()){var name="WebSpellChecker";if(this._spellChecker.getAllowMultipleDialogs())
name="";this._spellChecker._openNonModalWindow(url,name,'resizable=yes,scrollbars=auto,dependent=yes,toolbar=no, '+left+top+'status=no,location=no,menubar=no,'+width+','+height,doc);}
else{var pair=[this._spellChecker,doc,document];if(!ig_shared.IsIE55Plus)
this._spellChecker._openNonModalWindow(url,name,'modal=yes,resizable=yes,scrollbars=auto,dependent=yes,toolbar=no, '+left+top+'status=no,location=no,menubar=no,'+width+','+height,doc);else{url=this._spellChecker.getWebSpellCheckerDialogPage();if(url==""||url.length==0){url=document.forms[0].action;if(url.indexOf("?")==-1){url+="?";}
else{url+="&";}
url+="Modal="+window.document.forms[0].id;}
showModalDialog(url,pair,"dialogHeight:"+(this._spellChecker.getWindowHeight()+5)+"px; dialogWidth: "+(this._spellChecker.getWindowWidth()+5)+"px; "+(this._spellChecker.getWindowX()>=0?"dialogLeft:"+this._spellChecker.getWindowX()+"; ":"")+(this._spellChecker.getWindowY()>=0?"dialogTop:"+this._spellChecker.getWindowY()+"; ":"")+" center: Yes; help: No; resizable: No; status: No; scroll: No");}}}}
else
return null;}
ig_WebSpellChecker.prototype._fireFoxFireFinishedServerEvent=function(){this._ffFinishedTimerId=setInterval(ig_createCallback(this._delayCallbackHandler,this,null),500);}
ig_WebSpellChecker.prototype._delayCallbackHandler=function(){clearTimeout(this._ffFinishedTimerId);this._fireSpellCheckComplete();}
ig_WebSpellChecker.prototype._fireSpellCheckComplete=function(){var tempUniqueId=this.getUniqueID().replace(/\$/g,"_");var hiddenInput=document.getElementById(tempUniqueId);if(hiddenInput==null){hiddenInput=document.createElement("input");hiddenInput.type="hidden";hiddenInput.id=tempUniqueId;hiddenInput.name=tempUniqueId;hiddenInput.value="";var element=document.getElementById(this.getClientID()+"_Data");element.parentNode.appendChild(hiddenInput);}
this.fireServerEvent("SpellCheck","Finished");}
ig_WebSpellChecker.prototype._openNonModalWindow=function(url,name,params,doc){this._window=window.open(url,name,params);this._window.focus();this._window.document.open();this._window.document.write(doc);this._window.document.close();this._window.document.forms[0].submit();}
ig_WebSpellChecker.prototype.getText=function(textComponentId){var text="";var textComponentDelegate=this._getTextComponentObjectDelegate()
if(textComponentId==null)
textComponentId=this.getTextComponentId();if(textComponentDelegate==null||textComponentDelegate.length==0){var textElement=null;try{textElement=igedit_getById(textComponentId);}
catch(e){}
if(textElement==null){try{textElement=iged_getById(textComponentId);}
catch(e){}}
if(textElement!=null)
text=textElement.getText();else{textElement=document.getElementById(textComponentId);if(textElement!=null)
text=textElement.value;}
var getText=this._onGetText(text)
if(getText=="")
return text;else
return getText;}
else{var getTextDelegate=this._getTextComponentGetTextDelegate();if(getTextDelegate!=null&&getTextDelegate.length>0){textComponentDelegate=eval(textComponentDelegate);if(textComponentDelegate!=null){var textElement=textComponentDelegate(textComponentId);if(textElement!=null){getTextDelegate=eval("textElement."+getTextDelegate);if(getTextDelegate!=null){textElement.__mygettextfunc=getTextDelegate;var text=textElement.__mygettextfunc();return text;}}}}
return"";}}
ig_WebSpellChecker.prototype.setText=function(textComponentId,value){if(!this._onSetText(value)){var textComponentDelegate=this._getTextComponentObjectDelegate()
if(textComponentId==null)
textComponentId=this.getTextComponentId();if(textComponentDelegate==null||textComponentDelegate.length==0){var textElement=null;try{textElement=igedit_getById(textComponentId);}
catch(e){}
if(textElement==null){try{textElement=iged_getById(textComponentId);}
catch(e){}}
if(textElement!=null)
textElement.setText(value);else{textElement=document.getElementById(textComponentId);if(textElement!=null)
textElement.value=value;}}
else{var setTextDelegate=this._getTextComponentSetTextDelegate();if(setTextDelegate!=null&&setTextDelegate.length>0){textComponentDelegate=eval(textComponentDelegate);if(textComponentDelegate!=null){var textElement=textComponentDelegate(textComponentId);if(textElement!=null){setTextDelegate=eval("textElement."+setTextDelegate);if(setTextDelegate!=null){textElement.__mysettextfunc=setTextDelegate;textElement.__mysettextfunc(value);}}}}}}}
ig_WebSpellChecker.prototype.getCheckCompoundWords=function(){return this._props[2];}
ig_WebSpellChecker.prototype.getConsiderationRange=function(){return this._props[3];}
ig_WebSpellChecker.prototype.getAllowCapitalizedWords=function(){return this._props[4];}
ig_WebSpellChecker.prototype.getAllowWordsWithDigits=function(){return this._props[5];}
ig_WebSpellChecker.prototype.getAllowXML=function(){return this._props[6];}
ig_WebSpellChecker.prototype.getIncludeUserDictionaryInSuggestions=function(){return this._props[7];}
ig_WebSpellChecker.prototype.getLanguageParser=function(){return this._props[8];}
ig_WebSpellChecker.prototype.getCheckHyphenatedText=function(){return this._props[9];}
ig_WebSpellChecker.prototype.getModal=function(){return this._props[10];}
ig_WebSpellChecker.prototype.getWebSpellCheckerDialogPage=function(){return this._props[11];}
ig_WebSpellChecker.prototype.setWebSpellCheckerDialogPage=function(value){this._props[11]=value;}
ig_WebSpellChecker.prototype.getSeparateHyphenWords=function(){return this._props[12];}
ig_WebSpellChecker.prototype.getShowFinishedMessage=function(){return this._props[13];}
ig_WebSpellChecker.prototype.getShowNoErrorsMessage=function(){return this._props[14];}
ig_WebSpellChecker.prototype.getSpellCheckText=function(){return this._props[15];}
ig_WebSpellChecker.prototype.getSuggestionsMethod=function(){return this._props[16];}
ig_WebSpellChecker.prototype.getSuggestSplitWords=function(){return this._props[17];}
ig_WebSpellChecker.prototype.getTextComponentId=function(){return this._props[18];}
ig_WebSpellChecker.prototype.setTextComponentId=function(value){this._props[18]=value;}
ig_WebSpellChecker.prototype.getUserDictionaryFile=function(){return this._props[19];}
ig_WebSpellChecker.prototype.getWindowHeight=function(){return this._props[20];}
ig_WebSpellChecker.prototype.getWindowWidth=function(){return this._props[21];}
ig_WebSpellChecker.prototype.getWindowX=function(){return this._props[22];}
ig_WebSpellChecker.prototype.getWindowY=function(){return this._props[23];}
ig_WebSpellChecker.prototype.getAllowMixedCase=function(){return this._props[24];}
ig_WebSpellChecker.prototype.getAutoPostBackSpellCheckComplete=function(){return this._props[25];}
ig_WebSpellChecker.prototype.getAllowMultipleDialogs=function(){return this._props[26];}
ig_WebSpellChecker.prototype.getButtonId=function(){return this._props[27];}
ig_WebSpellChecker.prototype.getDictionary=function(){return this._props[28];}
ig_WebSpellChecker.prototype.getAllowCaseInsensitiveSuggestions=function(){return this._props[29];}
ig_WebSpellChecker.prototype._getTextComponentObjectDelegate=function(){return this._props[30];}
ig_WebSpellChecker.prototype._getTextComponentGetTextDelegate=function(){return this._props[31];}
ig_WebSpellChecker.prototype._getTextComponentSetTextDelegate=function(){return this._props[32];}
ig_WebSpellChecker.prototype.getSplitWordThreshold=function(){return this._props[33];}
ig_WebSpellChecker.prototype._escQuotes=function(text){var rx=new RegExp("\"","g");return text.replace(rx,"&#34;");}
ig_WebSpellChecker.prototype._escEntities=function(text){var rx=new RegExp("&","g");return text.replace(rx,"&amp;");}
ig_WebSpellChecker.prototype._onGetText=function(text){return this._fireEvent("GetText",null,text);}
ig_WebSpellChecker.prototype._onSetText=function(text){return this.fireEvent("SetText",null,text);}
ig_WebSpellChecker.prototype._onSpellCheckComplete=function(oldText,correctedText){return this.fireEvent("SpellCheckComplete",null,oldText,correctedText);}
ig_WebSpellChecker.prototype._onWordCorrected=function(oldWord,newWord){return this._fireEvent("WordCorrected",null,oldWord,newWord);}
ig_WebSpellChecker.prototype._onBeforeSpellCheckBegins=function(text){return this.fireEvent("BeforeSpellCheckBegins",null,text);}
ig_WebSpellChecker.prototype._fireEvent=function(name,evnt){if(!name||this._isInitializing||!this._clientEvents)
return false;this._postRequest=0;var evt,evts=this._clientEvents[name];var cancel=false,post=0,i=(evts==null)?0:evts.length;if(i==0)
return false;if(evnt=="check")
return true;var args=this._fireEvent.arguments;var returnVal="";while(i-->0){if(evts[i]==null)
continue;evt=evts[i]._event;evt.reset();evt.event=evnt;evt.needPostBack=evts[i]._autoPostBack;try{returnVal=evts[i]._handler(this,evt,args[2],args[3],args[4],args[5],args[6]);}catch(ex){continue;}}
if(returnVal==null)
returnVal="";return returnVal;}}
return new ig_WebSpellChecker(props);}
function ig_WebSpellChecker(props){if(arguments.length!=0)
this.init(props);}

function ig_CreateWebSpellCheckerDialog(props){if(!ig_WebControl.prototype.isPrototypeOf(ig_WebSpellCheckerDialog.prototype)){ig_WebSpellCheckerDialog.prototype=new ig_WebControl();ig_WebSpellCheckerDialog.prototype.constructor=ig_WebSpellCheckerDialog;ig_WebSpellCheckerDialog.prototype.base=ig_WebControl.prototype;ig_WebSpellCheckerDialog.prototype.init=function(props){this._isInitializing=true;this._initControlProps(props);this.base.init.apply(this,[this.getClientID()]);this._isInitializing=false;this._spellCheckFinished=false;this._duplicateWord=false;this._showXMLTags=false;this._currentWordIndex=0;this._ignoreWordIndexes=new Object();this._dialog=this;this._webSpellChecker=null;this._openerWindow=null;this._oldText="";}
ig_WebSpellCheckerDialog.prototype._onLoad=function(src,evnt){if(window.dialogArguments){this._webSpellChecker=window.dialogArguments[0];this._openerWindow=window.dialogArguments[2].window;if(!this._openerWindow)
this._openerWindow=window.dialogArguments[2].parentWindow;if(window.dialogArguments[1]!="Loaded"){var formChildren=document.forms[0].childNodes;for(var i=formChildren.length-1;i>=0;i--){if(formChildren[i].tagName!="SCRIPT"&&formChildren[i].tagName!="STYLE"&&formChildren[i].tagName!="LINK")
document.forms[0].removeChild(formChildren[i]);}
var iframe=document.createElement("IFRAME");iframe.style.height="100%";iframe.style.width="100%";var html=window.dialogArguments[1];window.dialogArguments[1]="Loaded";iframe.src='javascript:new String("<html></html>")';document.forms[0].appendChild(iframe);iframe.contentWindow.document.open();iframe.contentWindow.document.write(html);iframe.contentWindow.document.close();iframe.contentWindow.document.forms[0].submit();return;}}
else if(window.opener!=null){this._webSpellChecker=window.opener.ig_getWebControlById(this._dialog.getWebSpellCheckerId());this._openerWindow=window.opener;}
if(this._webSpellChecker!=null){this._oldText=this.getText();var element=document.getElementById(this.getChangeAllButtonId());if(element!=null){element._dialog=this;ig_shared.addEventListener(element,"click",this.changeAll,true);}
element=document.getElementById(this.getChangeButtonId());if(element!=null){element._dialog=this;ig_shared.addEventListener(element,"click",this.change,true);}
element=document.getElementById(this.getFinishButtonId());if(element!=null){element._dialog=this;element.onclick=this.finish;}
element=document.getElementById(this.getIgnoreAllButtonId());if(element!=null)
if(element!=null){element._dialog=this;ig_shared.addEventListener(element,"click",this.ignoreAll,true);}
element=document.getElementById(this.getIgnoreButtonId());if(element!=null){element._dialog=this;ig_shared.addEventListener(element,"click",this.ignoreCurrent,true);}
element=document.getElementById(this.getAddButtonId());if(element!=null){element._dialog=this;element.onclick=this.addCurrent;}
element=document.getElementById(this.getSuggestionBoxId());if(element!=null){element._dialog=this;ig_shared.addEventListener(element,"dblclick",this.change,true);element.onchange=this.changeSuggestions;}
element=document.getElementById(this.getChangeToBoxId());if(element!=null){ig_shared.addEventListener(element,"keypress",this.keyPress,true);}
var label=document.createElement("LABEL");this._changeToLabelId="changeToLabel508";label.id=this._changeToLabelId;label.htmlFor=this.getChangeToBoxId();label.style.display="none";document.body.appendChild(label);label=document.createElement("LABEL");label.id="suggestionLabel508";label.htmlFor=this.getSuggestionBoxId();label.style.display="none";document.body.appendChild(label);this.refresh();}}
ig_WebSpellCheckerDialog.prototype.keyPress=function(evnt){if(evnt.keyCode==13)
return false;}
ig_WebSpellCheckerDialog.prototype.change=function(evt){var elem=_ig_ResolveElemFromEvnt(evt);var dialog=elem._dialog
if(dialog._currentWordIndex<dialog.getBadWords().length){dialog.changeWord(dialog._currentWordIndex);dialog.nextWord();}
ig_cancelEvent(evt);}
ig_WebSpellCheckerDialog.prototype.changeAll=function(evt){var elem=_ig_ResolveElemFromEvnt(evt);var dialog=elem._dialog
var badWords=dialog.getBadWords();if(dialog._currentWordIndex<badWords.length){var currentWord=badWords.getItem(dialog._currentWordIndex).getText();dialog.changeWord(dialog._currentWordIndex);for(var i=dialog._currentWordIndex+1;i<badWords.length;i++){if(!dialog._ignoreWordIndexes[i]&&badWords.getItem(i).getText()==currentWord){dialog.changeWord(i);dialog._ignoreWordIndexes[i]=true;}}
dialog.nextWord();}
ig_cancelEvent(evt);}
ig_WebSpellCheckerDialog.prototype.ignoreCurrent=function(evt){var elem=_ig_ResolveElemFromEvnt(evt);var dialog=elem._dialog;if(dialog._currentWordIndex<dialog.getBadWords().length){dialog.nextWord();}
ig_cancelEvent(evt);}
ig_WebSpellCheckerDialog.prototype.ignoreAll=function(evt){var dialog=null;if(evt){var elem=_ig_ResolveElemFromEvnt(evt);dialog=elem._dialog;}
else
dialog=this;var badWords=dialog.getBadWords();if(dialog._currentWordIndex<badWords.length){var currentWord=badWords.getItem(dialog._currentWordIndex).getText();for(var i=dialog._currentWordIndex+1;i<badWords.length;i++){if(!dialog._ignoreWordIndexes[i]&&badWords.getItem(i).getText()==currentWord){dialog._ignoreWordIndexes[i]=true;}}
dialog.nextWord();}
ig_cancelEvent(evt);}
ig_WebSpellCheckerDialog.prototype.changeSuggestions=function(){var suggestions=document.getElementById(this._dialog.getSuggestionBoxId());var changeToBox=document.getElementById(this._dialog.getChangeToBoxId());var suggestion=suggestions.options[suggestions.selectedIndex].text;if(suggestion!=this._dialog.getNoSuggestionsText()){changeToBox.value=suggestion;}}
ig_WebSpellCheckerDialog.prototype.addCurrent=function(){var addButton=this;var badWords=this._dialog.getBadWords();var currentWord=badWords.getItem(this._dialog._currentWordIndex).getText();if(addButton)
addButton.disabled=true;var addFrame=document.createElement("IFRAME");addFrame.style.height="0px";addFrame.style.width="0px";addFrame.style.visibility="hidden";document.body.appendChild(addFrame);addFrame.contentWindow.document.open();var hiddenInputs="<input type='hidden' name='UserDictionaryFile' value='"+this._dialog.getUserDictionaryFile()+"'>";hiddenInputs+="<input type='hidden' name='Add' value='"+currentWord+"'>";addFrame.contentWindow.document.write("<html><head></head><body><form method='post' action='"+this._dialog._openerWindow.location.href+"'>"+hiddenInputs+"</form></body></html>");addFrame.contentWindow.document.close();addFrame.contentWindow.document.forms[0].submit();addButton.disabled=false;this._dialog.ignoreAll();}
ig_WebSpellCheckerDialog.prototype.finish=function(){if(this._dialog._webSpellChecker!=null){var textComponentId=this._dialog.getTextComponentId();if(textComponentId!=null&&textComponentId.length>0)
this._dialog._webSpellChecker.setText(textComponentId,this._dialog.getText());else if(this._dialog._webSpellChecker._returnFunc!=null)
this._dialog._webSpellChecker._returnFunc(this._dialog.getText());this._dialog._webSpellChecker._onSpellCheckComplete(this._dialog._oldText,this._dialog.getText());var stateItem=this._dialog._webSpellChecker.addStateItem("Finished","SpellCheck");this._dialog._webSpellChecker.updateStateItem(stateItem,"OldText",this._dialog._oldText);this._dialog._webSpellChecker.updateStateItem(stateItem,"CorrectedText",this._dialog.getText());if(this._dialog._webSpellChecker.getAutoPostBackSpellCheckComplete()){if(!ig_shared.IsIE)
this._dialog._webSpellChecker._fireFoxFireFinishedServerEvent();else
this._dialog._webSpellChecker._fireSpellCheckComplete();}}
window.close();}
ig_WebSpellCheckerDialog.prototype.moveWordOffsets=function(delta,start){var badWords=this.getBadWords();for(i=start;i<badWords.length;i++){var badWord=badWords.getItem(i);badWord.setStartPosition(badWord.getStartPosition()+delta);badWord.setEndPosition(badWord.getEndPosition()+delta);}}
ig_WebSpellCheckerDialog.prototype.changeWord=function(index){var newText="";var changeToBox=document.getElementById(this.getChangeToBoxId());var newWord=changeToBox.value;var badWords=this.getBadWords();var badWord=badWords.getItem(index);if(this._duplicateWord&&changeToBox.value==''){badWord.setStartPosition((badWord.getStartPosition()-1));}
if(this._dialog._webSpellChecker!=null){var override=this._dialog._webSpellChecker._onWordCorrected(badWord.getText(),newWord);if(override!="")
newWord=override;}
newText+=this.getText().substring(0,badWord.getStartPosition());newText+=newWord;newText+=this.getText().substring(badWord.getEndPosition(),this.getText().length);this.moveWordOffsets(newWord.length-this.getText().substring(badWord.getStartPosition(),badWord.getEndPosition()).length,index+1);this.setText(newText);}
ig_WebSpellCheckerDialog.prototype._fixScrollPosition=function(){var documentTextPanel=document.getElementById(this.getDocumentTextPanelId());clearTimeout(this._scrollInterval);for(var i=0;i<documentTextPanel.childNodes.length;i++){var spans=documentTextPanel.getElementsByTagName("SPAN");for(var j=0;j<spans.length;j++){if(spans[j].className==this.getBadWordsStyleClassName()){documentTextPanel.scrollTop=spans[j].offsetTop;break;}}}}
ig_WebSpellCheckerDialog.prototype.refresh=function(){var documentTextPanel=document.getElementById(this.getDocumentTextPanelId());var suggestions=document.getElementById(this.getSuggestionBoxId());var changeToBox=document.getElementById(this.getChangeToBoxId());var badWords=this.getBadWords();var badWord=badWords.getItem(this._currentWordIndex);var changeToLabel=document.getElementById(this._changeToLabelId);if(documentTextPanel!=null){if(this._currentWordIndex<this.getBadWords().length){documentTextPanel.innerHTML="";var beginning=this.textToHtml(this.getText().substring(0,badWord.getStartPosition()));var spanHtml="<span id='highlight' class='"+this.getBadWordsStyleClassName()+"' style='height:1px;'>";spanHtml+=this.getText().substring(badWord.getStartPosition(),badWord.getEndPosition());spanHtml+="</span>";var end=this.textToHtml(this.getText().substring(badWord.getEndPosition(),this.getText().length));documentTextPanel.innerHTML=beginning+spanHtml+end+"<br/><br/>";suggestions.options.length=0;this._scrollInterval=setInterval(ig_createCallback(this._fixScrollPosition,this,null),100);var n=badWord.getSuggestions().count;if(n==0){changeToBox.value=badWord.getText();suggestions.options[0]=new Option(this.getNoSuggestionsText());}
else if(badWord.getSuggestions().getItem(0)=="Remove duplicate word"){suggestions.options[0]=new Option(badWords[currentWordIndex].suggestions[0]);suggestions.selectedIndex=0;changeToBox.value='';this._duplicateWord=true;}
else{changeToBox.value=badWord.getSuggestions().getItem(0);for(var i=0;i<n;i++){suggestions.options[i]=new Option(badWord.getSuggestions().getItem(i));}
suggestions.selectedIndex=0;this._duplicateWord=false;}
changeToLabel.innerHTML="Change From "+badWord.getText()+" To "+changeToBox.value;changeToBox.select();}
else{documentTextPanel.innerHTML=this.textToHtml(this.getText());changeToBox.value="";suggestions.options.length=0;suggestions.options[0]=new Option(this.getNoSuggestionsText());if(badWords.length>0){if(this._webSpellChecker.getShowFinishedMessage())
alert(this.getFinishedText());}
else{if(this._webSpellChecker.getShowNoErrorsMessage())
alert(this.getNoErrorsText());}
this._spellCheckFinished=true;this.finish();}}}
ig_WebSpellCheckerDialog.prototype.textToHtml=function(t){if(this._showXMLTags){var ltexp=new RegExp("<");while(ltexp.test(t))
t=t.replace(ltexp,"&lt;");var gtexp=new RegExp(">");while(gtexp.test(t))
t=t.replace(gtexp,"&gt;");}
else{}
var newlineexp=new RegExp("\n");while(newlineexp.test(t))
t=t.replace(newlineexp,"<br>");return t;}
ig_WebSpellCheckerDialog.prototype.nextWord=function(){var badWords=this.getBadWords();while(this._currentWordIndex++<badWords.length&&this._ignoreWordIndexes[this._currentWordIndex]);var changeButton=document.getElementById(this.getChangeButtonId());var changeAllButton=document.getElementById(this.getChangeAllButtonId());var ignoreButton=document.getElementById(this.getIgnoreButtonId());var ignoreAllButton=document.getElementById(this.getIgnoreAllButtonId());if(this._currentWordIndex>=badWords.length){if(changeButton!=null)
changeButton.disabled=true;if(changeAllButton!=null)
changeAllButton.disabled=true;if(ignoreButton!=null)
ignoreButton.disabled=true;if(ignoreAllButton!=null)
ignoreAllButton.disabled=true;}
this.refresh();}
ig_WebSpellCheckerDialog.prototype.getDocumentTextPanelId=function(){return this._props[2];}
ig_WebSpellCheckerDialog.prototype.getChangeAllButtonId=function(){return this._props[3];}
ig_WebSpellCheckerDialog.prototype.getChangeButtonId=function(){return this._props[4];}
ig_WebSpellCheckerDialog.prototype.getChangeToBoxId=function(){return this._props[5];}
ig_WebSpellCheckerDialog.prototype.getFinishButtonId=function(){return this._props[6];}
ig_WebSpellCheckerDialog.prototype.getIgnoreAllButtonId=function(){return this._props[7];}
ig_WebSpellCheckerDialog.prototype.getIgnoreButtonId=function(){return this._props[8];}
ig_WebSpellCheckerDialog.prototype.getSuggestionBoxId=function(){return this._props[9];}
ig_WebSpellCheckerDialog.prototype.getAddButtonId=function(){return this._props[10];}
ig_WebSpellCheckerDialog.prototype.getText=function(){return this._props[11];}
ig_WebSpellCheckerDialog.prototype.setText=function(val){this._props[11]=val;}
ig_WebSpellCheckerDialog.prototype.getNoErrorsText=function(){return this._props[12];}
ig_WebSpellCheckerDialog.prototype.getFinishedText=function(){return this._props[13];}
ig_WebSpellCheckerDialog.prototype.getNoSuggestionsText=function(){return this._props[14];}
ig_WebSpellCheckerDialog.prototype.getUserDictionaryFile=function(){return this._props[15];}
ig_WebSpellCheckerDialog.prototype.getWebSpellCheckerId=function(){return this._props[16];}
ig_WebSpellCheckerDialog.prototype.getBadWordsStyleClassName=function(){return this._props[17];}
ig_WebSpellCheckerDialog.prototype.getTextComponentId=function(){return this._props[18];}
ig_WebSpellCheckerDialog.prototype.getBadWords=function(){if(this._collections[0]==null)
return null;if(this._badWords==null)
this._badWords=new ig_BadWordsCollection(this._collections[0]);return this._badWords;return this._props[10];}
ig_WebSpellCheckerDialog.prototype._onUnload=function(src,evnt){this._webSpellChecker=null;this._dialog=null;this._openerWindow=null;}}
return new ig_WebSpellCheckerDialog(props);}
function ig_WebSpellCheckerDialog(props){if(arguments.length!=0)
this.init(props);}
function ig_BadWordsCollection(props){this._props=props;this.length=props.length;this.getItem=function(index){if(index<0||index>this.length)
return null;if(this[index]==null)
this[index]=ig_CreateBadWord(this._props[index])
return(this[index]);}}
function ig_CreateBadWord(props){if(!ig_BadWord.prototype.isPrototypeOf(this.prototype)){ig_BadWord.prototype.getText=function(){return this._props[0];}
ig_BadWord.prototype.gete=function(){return this._props[1];}
ig_BadWord.prototype.getStartPosition=function(){return parseInt(this._props[2]);}
ig_BadWord.prototype.setStartPosition=function(val){this._props[2]=val;}
ig_BadWord.prototype.getEndPosition=function(){return parseInt(this._props[3]);}
ig_BadWord.prototype.setEndPosition=function(val){this._props[3]=val;}
ig_BadWord.prototype.getSuggestions=function(){if(this._suggestions==null)
this._suggestions=new ig_SuggestionsCollection(this._props[4]);return this._suggestions;}}
return new ig_BadWord(props);}
function _ig_ResolveElemFromEvnt(evnt){if(evnt.target)
return evnt.target;else if(evnt.srcElement)
return evnt.srcElement;}
function ig_BadWord(props){this._props=props;}
function ig_SuggestionsCollection(props){this._props=props;this.count=this._props.length;this.getItem=function(index){if(index<0||index>this.count)
return null;if(this[index]==null)
this[index]=this._props[index]
return(this[index]);}}

Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
if(x.month||x.months){this.addMonths(x.month||x.months);}
if(x.year||x.years){this.addYears(x.year||x.years);}
if(x.day||x.days){this.addDays(x.day||x.days);}
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
if(!x.second&&x.second!==0){x.second=-1;}
if(!x.minute&&x.minute!==0){x.minute=-1;}
if(!x.hour&&x.hour!==0){x.hour=-1;}
if(!x.day&&x.day!==0){x.day=-1;}
if(!x.month&&x.month!==0){x.month=-1;}
if(!x.year&&x.year!==0){x.year=-1;}
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
if(x.timezone){this.setTimezone(x.timezone);}
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
break;}
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
rx.push(r[0]);s=r[1];}
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
try{r=(px[i].call(this,s));}catch(e){r=null;}
if(r){return r;}}
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
rx.push(r[0]);s=r[1];}
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
s=q[1];}
if(!r){throw new $P.Exception(s);}
if(q){throw new $P.Exception(q[1]);}
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
if(!last&&q[1].length===0){last=true;}
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
if(rx[1].length<best[1].length){best=rx;}
if(best[1].length===0){break;}}
if(best[0].length===0){return best;}
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
best[1]=q[1];}
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
if(this.now){return new Date();}
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
if(!this.unit){this.unit="day";}
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
this[this.unit+"s"]=this.value*orient;}
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
if(this.month&&!this.day){this.day=1;}
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
fn=_C[keys]=_.any.apply(null,px);}
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.
