(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;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){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;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){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==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])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).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,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});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,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));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 this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];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.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
return(this[0].value||"").replace(/\r/g,"");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/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: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));},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);},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);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};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(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")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 expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
script.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},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];}},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 value&&value.constructor==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 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){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;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}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&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}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){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';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=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");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.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?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(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
ret=jQuery.merge(ret,elem);});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,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)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;return elem[name];}if(msie&&notxml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&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||array.split||array.setInterval||array.call)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.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else
while(elem=second[i++])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.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing"}});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));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});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){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.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).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},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;},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;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===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 parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===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(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var 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 timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();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.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};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,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},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.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){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,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);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});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);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,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);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?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",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,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 remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=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();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();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){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){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.dataFilter);}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(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!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||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){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(filter)data=filter(data,type);if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=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"){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;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},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;}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;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:[],timerId:null,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.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&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;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.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(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";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)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)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,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};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;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;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";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br);};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0);};});})();(function(jQuery){jQuery.fn.pngFix=function(){var ie55=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 5.5")!=-1);var ie6=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 6.0")!=-1);if(jQuery.browser.msie&&(ie55||ie6)){jQuery(this).find("img[@src$=.png]").each(function(){var prevStyle='';var strNewHTML='';var imgId=(jQuery(this).attr('id'))?'id="'+jQuery(this).attr('id')+'" ':'';var imgClass=(jQuery(this).attr('class'))?'class="'+jQuery(this).attr('class')+'" ':'';var imgTitle=(jQuery(this).attr('title'))?'title="'+jQuery(this).attr('title')+'" ':'';var imgAlt=(jQuery(this).attr('alt'))?'alt="'+jQuery(this).attr('alt')+'" ':'';var imgAlign=(jQuery(this).attr('align'))?'float:'+jQuery(this).attr('align')+';':'';var imgHand=(jQuery(this).parent().attr('href'))?'cursor:hand;':'';if(this.style.border){prevStyle+='border:'+this.style.border+';';this.style.border='';}
if(this.style.padding){prevStyle+='padding:'+this.style.padding+';';this.style.padding='';}
if(this.style.margin){prevStyle+='margin:'+this.style.margin+';';this.style.margin='';}
var imgStyle=(this.style.cssText);strNewHTML+='<span '+imgId+imgClass+imgTitle+imgAlt;strNewHTML+='style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+imgAlign+imgHand;strNewHTML+='width:'+jQuery(this).width()+'px;'+'height:'+jQuery(this).height()+'px;';strNewHTML+='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader'+'(src=\''+jQuery(this).attr('src')+'\', sizingMethod=\'scale\');';strNewHTML+=imgStyle+'"></span>';if(prevStyle!=''){strNewHTML='<span style="position:relative;display:inline-block;'+prevStyle+imgHand+'width:'+jQuery(this).width()+'px;'+'height:'+jQuery(this).height()+'px;'+'">'+strNewHTML+'</span>';}
jQuery(this).hide();jQuery(this).after(strNewHTML);});}};})(jQuery);(function($){$.fn.jqm=function(o){var _o={zIndex:3000,overlay:50,overlayClass:'jqmOverlay',closeClass:'jqmClose',trigger:'.jqModal',ajax:false,target:false,modal:false,toTop:false,onShow:false,onHide:false,onLoad:false};return this.each(function(){if(this._jqm)return;s++;this._jqm=s;H[s]={c:$.extend(_o,o),a:false,w:$(this).addClass('jqmID'+s),s:s};if(_o.trigger)$(this).jqmAddTrigger(_o.trigger);});};$.fn.jqmAddClose=function(e){hs(this,e,'jqmHide');return this;};$.fn.jqmAddTrigger=function(e){hs(this,e,'jqmShow');return this;};$.fn.jqmShow=function(t){return this.each(function(){if(!H[this._jqm].a)$.jqm.open(this._jqm,t)});};$.fn.jqmHide=function(t){return this.each(function(){if(H[this._jqm].a)$.jqm.close(this._jqm,t)});};$.jqm={hash:{},open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(/^\d+$/.test(h.w.css('z-index')))?h.w.css('z-index'):c.zIndex,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});h.t=t;h.a=true;h.w.css('z-index',z);if(c.modal){if(!A[0])F('bind');A.push(s);o.css('cursor','wait');}
else if(c.overlay>0)h.w.jqmAddClose(o);else o=false;h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):false;if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in{Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}
if(c.ajax){var r=c.target||h.w,u=c.ajax,r=(typeof r=='string')?$(r,h.w):$(r),u=(u.substr(0,1)=='@')?$(t).attr(u.substring(1)):u;r.load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});}
else if(cc)h.w.jqmAddClose($(cc,h.w));if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o);(c.onShow)?c.onShow(h):h.w.show();e(h);return false;},close:function(s){var h=H[s];h.a=false;if(A[0]){A.pop();if(!A[0])F('unbind');}
if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();}return false;}};var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version=="6.0"),i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i);f(h);},f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(e){}},F=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);},m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return!r;},hs=function(w,e,y){var s=[];w.each(function(){s.push(this._jqm)});$(e).each(function(){if(this[y])$.extend(this[y],s);else{this[y]=s;$(this).click(function(){for(var i in{jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return false;});}});};})(jQuery);var _jsver=11;for(var z=2;z<6;z++)document.write("<scr"+"ipt language=\"JavaScript1."+z+"\">_jsver = 1"+z+";</scr"+"ipt>");function _a(){this.version="139";this.instances=0;this.objects=new Object();this.librarypath="";this.autodetect=true;this.modules=new Array("field","functions|12","validation");this.packages=new Object();this.validators=new Array();this.containers=new Object();this.jsver=new Object();for(var z=1;z<9;z++)this.jsver["1"+z]="1."+z;this.errorColor="red";this.styleAttribute="backgroundColor";this.useErrorColorCoding=(document.all||document.getElementById)?true:false;this.validateAll=false;this.allowSubmitOnError=false;this.customValidators=0;this.resetOnInit=false;this.showStatusMsgs=true;this.reAttribs="gi";return true;}
qFormAPI=new _a();function _a_setLibraryPath(path){if(path.substring(path.length-1)!='/')path+='/';this.librarypath=path;return true;}
_a.prototype.setLibraryPath=_a_setLibraryPath;function _a_include(src,path,ver){var source=src;if(!source)return true;if(!path)var path=this.librarypath+"qforms/";if(!ver)var ver="";if(source.substring(source.length-3)!=".js")source+=".js";var thisPackage=source.substring(0,source.length-3);var strJS="<scr"+"ipt language=\"JavaScript";var strEJS="\"></scr"+"ipt>";if(this.packages[thisPackage])return true;if(thisPackage=="*"){for(var i=0;i<this.modules.length;i++){var source=this.modules[i];var ver="99";if(source.indexOf("|")>-1){ver=source.substring(source.indexOf("|")+1);source=source.substring(0,source.indexOf("|"));}
if(_jsver>ver&&this.autodetect){document.write(strJS+this.jsver[ver]+"\" src=\""+path+source+"_js"+ver+".js"+strEJS);}else{document.write(strJS+"\" src=\""+path+source+".js"+strEJS);}
this.packages[source]=true;}}else{if(!this.autodetect||_jsver<12||ver.length==0){document.write(strJS+"\" src=\""+path+source+strEJS);}else if(this.autodetect&&(parseInt(_jsver,10)>=parseInt(ver,10))){source=source.substring(0,source.length-3)+"_js"+ver+source.substring(source.length-3);document.write(strJS+this.jsver[ver]+"\" src=\""+path+source+strEJS);}else{document.write(strJS+"\" src=\""+path+source+strEJS);}}
this.packages[thisPackage]=true;return true;}
_a.prototype.include=_a_include;function _a_unload(){var isFramed=false;for(obj in qFormAPI.objects){qFormAPI.objects[obj]._status="idle";if(!!qFormAPI.objects[obj]._frame)isFramed=true;}
if(isFramed){this.objects=new Object();this.containers=new Object();}
return true;}
_a.prototype.unload=_a_unload;function _a_validate(qForm){if(!this.validateAll)return qFormAPI.objects[qForm].validate();var aryErrors=new Array();for(obj in qFormAPI.objects){qFormAPI.objects[obj].checkForErrors();for(var i=0;i<qFormAPI.objects[obj]._queue.errors.length;i++){aryErrors[aryErrors.length]=qFormAPI.objects[obj]._queue.errors[i];}}
if(aryErrors.length==0)return true;var strError="The following error(s) occurred:\n";for(var i=0;i<aryErrors.length;i++)strError+=" - "+aryErrors[i]+"\n";var result=false;if(this._allowSubmitOnError&&this._showAlerts)result=confirm(strError+"\nAre you sure you want to continue?");else if(this._allowSubmitOnError&&!this._showAlerts)result=true;else alert(strError);return result;}
_a.prototype.validate=_a_validate;function _a_reset(hardReset){for(obj in qFormAPI.objects)qFormAPI.objects[obj].reset(hardReset);return true;}
_a.prototype.reset=_a_reset;function _a_getFields(){stcAllData=new Object();for(obj in qFormAPI.objects){var tmpStruct=qFormAPI.objects[obj].getFields();for(field in tmpStruct){if(!stcAllData[field]){stcAllData[field]=tmpStruct[field];}else{stcAllData[field]+=","+tmpStruct[field];}}}
return stcAllData;}
_a.prototype.getFields=_a_getFields;function _a_setFields(struct,rd,ra){for(obj in qFormAPI.objects)qFormAPI.objects[obj].setFields(struct,rd,ra);}
_a.prototype.setFields=_a_setFields;function _a_dump(){var str="";formData=this.getFields();for(field in formData)str+=field+" = "+formData[field]+"\n";alert(str);}
_a.prototype.dump=_a_dump;function qForm(name,parent,frame){if(name==null)return true;if(!name)return alert("No form specified.");qFormAPI.instances++;if(qFormAPI.instances==1)window.onunload=new Function(_functionToString(window.onunload,";qFormAPI.unload();"));this._name=name;this._parent=(!!parent)?parent:null;this._frame=(!!frame)?frame:null;this._status=null;this._queue=new Object();this._queue.errorFields=",";this._queue.errors=new Array();this._queue.validation=new Array();this._showAlerts=true;this._allowSubmitOnError=qFormAPI.allowSubmitOnError;this._locked=false;this._skipValidation=false;qFormAPI.objects[this._name]=this;this._pointer="qFormAPI.objects['"+this._name+"']";this.init();return true;}
new qForm(null,null,null);function _q_init(){if(!this._name)return false;if(this._parent&&document.layers)this._form=this._parent+".document."+this._name;else this._form="document."+this._name;if(this._frame)this._form=this._frame+"."+this._form;this.obj=eval(this._form);if(!this.obj)return alert("The form \""+this._name+"\" does not exist. This error \nwill occur if the Form object was initialized before the form \nhas been created or if it simply doesn't exist. Please make \nsure to initialize the Form object after page loads to avoid \npotential problems.");this.onSubmit=new Function(_functionToString(this.obj.onsubmit,""));var strSubmitCheck=this._pointer+".submitCheck();";if(this._frame)strSubmitCheck="top."+strSubmitCheck;this.obj.onsubmit=new Function("return "+strSubmitCheck);this._fields=new Array();this._pointers=new Object();for(var j=0;j<this.obj.elements.length;j++)this.addField(this.obj.elements[j].name);this._status="initialized";if(qFormAPI.resetOnInit)this.reset();return true;}
qForm.prototype.init=_q_init;function _q_addField(field){if(typeof field=="undefined"||field.length==0)return false;o=this.obj[field];if(typeof o=="undefined")return false;if(typeof o.type=="undefined")o=o[0];if((!!o.type)&&(typeof this[field]=="undefined")&&(field.length>0)){this[field]=new Field(o,field,this._name);this._fields[this._fields.length]=field;this._pointers[field.toLowerCase()]=this[field];}
return true;}
qForm.prototype.addField=_q_addField;function _q_removeField(field){if(typeof this[field]=="undefined")return false;var f=this._fields;for(var i=0;i<f.length;i++){if(f[i]==field){var fp=i;break;}}
if(_jsver>=12){delete this[field];f.splice(fp,1);delete this._pointers[field.toLowerCase()];var q=this._queue.validation;for(var j=0;j<q.length;j++){if(q[j][0]==field){q.splice(j,1);j--;}}}
return true;}
qForm.prototype.removeField=_q_removeField;function _q_submitCheck(){if(this._status=="submitting"||this._status=="validating")return false;this._status="submitting";var result=qFormAPI.validate(this._name);if(result){var x=this.onSubmit();if(typeof x=="boolean")result=x;}
if(!result){this._status="idle";}else{_setContainerValues(this);}
return result;}
qForm.prototype.submitCheck=_q_submitCheck;qForm.prototype.onSubmit=new Function("");function _q_addMethod(name,fn,type){if(arguments.length<2)return alert("To create a new method, you must specify \nboth a name and function to run: \n  obj.addMethod(\"checkTime\", _isTime);");var type=_param(arguments[2],"from").toLowerCase();if(type=="field")type="Field";else type="qForm";if(typeof fn=="function"){strFN=fn.toString();strFN=strFN.substring(strFN.indexOf(" "),strFN.indexOf("("));eval(type+".prototype."+name+" = "+strFN);}else{var fnTemp=new Function(fn);eval(type+".prototype."+name+" = fnTemp;");}
return true;}
qForm.prototype.addMethod=_q_addMethod;function _q_addEvent(event,cmd,append){if(arguments.length<2)return alert("Invalid arguments. Please use the format \naddEvent(event, command, [append]).");var append=_param(arguments[2],true,"boolean");_addEvent(this._pointer+".obj",arguments[0],arguments[1],append);return true;}
qForm.prototype.addEvent=_q_addEvent;function _q_required(fields,value){var value=_param(arguments[1],true,"boolean");aryField=_removeSpaces(fields).split(",");for(var i=0;i<aryField.length;i++){if(!this[aryField[i]])return alert("The form field \""+aryField[i]+"\" does not exist.");this[aryField[i]].required=value;}
return true;}
qForm.prototype.required=_q_required;function _q_optional(fields){this.required(fields,false);return true;}
qForm.prototype.optional=_q_optional;function _q_forceValidation(fields,value){var value=_param(arguments[1],true,"boolean");aryField=_removeSpaces(fields).split(",");for(var i=0;i<aryField.length;i++){if(!this[aryField[i]])return alert("The form field \""+aryField[i]+"\" does not exist.");this[aryField[i]].validate=value;}
return true;}
qForm.prototype.forceValidation=_q_forceValidation;function _q_submit(){var x=false;if(this._status=="submitting")return false;if(this.obj.onsubmit())x=this.obj.submit();return(typeof x=="undefined")?true:x;}
qForm.prototype.submit=_q_submit;function _q_disabled(status){var objExists=(typeof this.obj.disabled=="boolean")?true:false;if(arguments.length==0)var status=(this.obj.disabled)?false:true;if(!objExists)this._locked=status;else this.obj.disabled=status;return true;}
qForm.prototype.disabled=_q_disabled;function _q_reset(hardReset){if(this._status==null)return false;for(var j=0;j<this._fields.length;j++){this[this._fields[j]].setValue(((!!hardReset)?null:this[this._fields[j]].defaultValue),true,false);if(this[this._fields[j]]._queue.dependencies.length>0)this[this._fields[j]].enforceDependency();}
return true;}
qForm.prototype.reset=_q_reset;function _q_getFields(){if(this._status==null)return false;struct=new Object();for(var j=0;j<this._fields.length;j++)struct[this._fields[j]]=this[this._fields[j]].getValue();return struct;}
qForm.prototype.getFields=_q_getFields;function _q_setFields(struct,rd,ra){if(this._status==null)return false;var resetDefault=_param(arguments[1],false,"boolean");var resetAll=_param(arguments[2],true,"boolean");if(resetAll)this.reset();for(key in struct){var obj=this._pointers[key.toLowerCase()];if(obj){obj.setValue(struct[key],true,false);if(resetDefault)obj.defaultValue=struct[key];}}
return true;}
qForm.prototype.setFields=_q_setFields;function _q_hasChanged(){if(this._status==null)return false;var b=false;for(var j=0;j<this._fields.length;j++){if(this[this._fields[j]].getValue()!=this[this._fields[j]].defaultValue){b=true;break;}}
return b;}
qForm.prototype.hasChanged=_q_hasChanged;function _q_changedFields(){if(this._status==null)return false;struct=new Object();for(var j=0;j<this._fields.length;j++){if(this[this._fields[j]].getValue()!=this[this._fields[j]].defaultValue){struct[this._fields[j]]=this[this._fields[j]].getValue();}}
return struct;}
qForm.prototype.changedFields=_q_changedFields;function _q_dump(){var str="";var f=this.getFields();for(fld in f)str+=fld+" = "+f[fld]+"\n";alert(str);}
qForm.prototype.dump=_q_dump;function Field(form,field,formName,init){if(arguments.length>3)return true;this._queue=new Object();this._queue.dependencies=new Array();this._queue.validation=new Array();this.qForm=qFormAPI.objects[formName];this.name=field;this.path=this.qForm._form+"['"+field+"']";this.pointer=this.qForm._pointer+"['"+field+"']";this.obj=eval(this.path);this.locked=false;this.description=field.toLowerCase();this.required=false;this.validate=false;this.container=false;this.type=(!this.obj.type&&!!this.obj[0])?this.obj[0].type:this.obj.type;this.validatorAttached=false;var value=this.getValue();this.defaultValue=value;this.lastValue=value;this.init();return true;}
new Field(null,null,null,true);function _f_init(){if(qFormAPI.useErrorColorCoding&&this.obj.style)this.styleValue=(!!this.obj.style[qFormAPI.styleAttribute])?this.obj.style[qFormAPI.styleAttribute].toLowerCase():"";if(document.layers&&(this.type=="radio"||this.type=="checkbox")&&!!this.obj[0]){this.addEvent("onclick","return "+this.pointer+".allowFocus();");}else{this.addEvent("onfocus","return "+this.pointer+".allowFocus();");}}
Field.prototype.init=_f_init;function _f_allowFocus(){if(qFormAPI.useErrorColorCoding&&this.obj.style){if(this.qForm._queue.errorFields.indexOf(","+this.name+",")>-1)this.obj.style[qFormAPI.styleAttribute]=this.styleValue;}
this.lastValue=this.getValue();var result=this.checkIfLocked();if((this.type.indexOf("select")>-1)&&!result){this.resetLast();this.blur();}
if(!result)this.onFocus();return result;}
Field.prototype.allowFocus=_f_allowFocus;Field.prototype.onFocus=new Function("");function _f_addEvent(event,cmd,append){if(arguments.length<2)return alert("Invalid arguments. Please use the format \naddEvent(event, command, [append]).");var append=_param(arguments[2],true,"boolean");if((this.type=="radio"||this.type=="checkbox")&&!!this.obj[0]){for(var i=0;i<this.obj.length;i++)_addEvent(this.path+"["+i+"]",arguments[0],arguments[1],append);}else{_addEvent(this.path,arguments[0],arguments[1],append);}
return true;}
Field.prototype.addEvent=_f_addEvent;function _f_disabled(s){var status=arguments[0];var oField=(this.type=="radio")?this.obj[0]:this.obj;var objExists=(typeof oField.disabled=="boolean")?true:false;if(arguments.length==0)var status=(oField.disabled)?false:true;if(!objExists)this.locked=status;else{if(!!this.obj[0]&&this.type.indexOf("select")==-1)for(var i=0;i<this.obj.length;i++)this.obj[i].disabled=status;else this.obj.disabled=status;}
return true;}
Field.prototype.disabled=_f_disabled;function _f_checkIfLocked(showMsg){var bShowMsg=_param(arguments[0],this.qForm._showAlerts);if(this.isLocked()){this.blur();if(bShowMsg)alert("This field is disabled.");return false;}
return true;}
Field.prototype.checkIfLocked=_f_checkIfLocked;function _f_isLocked(){var isLocked=this.locked;if(this.qForm._locked)isLocked=true;return isLocked;}
Field.prototype.isLocked=_f_isLocked;function _f_isDisabled(){if(typeof this.obj.disabled=="boolean"){var isDisabled=this.obj.disabled;if(this.qForm.obj.disabled)isDisabled=true;return isDisabled;}else{return false;}}
Field.prototype.isDisabled=_f_isDisabled;function _f_focus(){if(!!this.obj.focus)this.obj.focus();}
Field.prototype.focus=_f_focus;function _f_blur(){if(!!this.obj.blur)this.obj.blur();}
Field.prototype.blur=_f_blur;function _f_select(){if(!!this.obj.select)this.obj.select();}
Field.prototype.select=_f_select;function _f_reset(){this.setValue(this.defaultValue,true,false);}
Field.prototype.reset=_f_reset;function _f_getValue(){var type=(this.type.substring(0,6)=="select")?"select":this.type;var value=new Array();if(type=="select"){if(this.type=="select-one"&&!this.container){value[value.length]=(this.obj.selectedIndex==-1)?"":this.obj[this.obj.selectedIndex].value;}else{for(var i=0;i<this.obj.length;i++){if((this.obj[i].selected||this.container)&&(!this.dummyContainer)){value[value.length]=this.obj[i].value;}}}}else if((type=="checkbox")||(type=="radio")){if(!!this.obj[0]&&!this.obj.value){for(var i=0;i<this.obj.length;i++)if(this.obj[i].checked)value[value.length]=this.obj[i].value;}else if(this.obj.checked){value[value.length]=this.obj.value;}}else{value[value.length]=this.obj.value;}
return value.join(",");}
Field.prototype.getValue=_f_getValue;function _f_setValue(value,bReset,doEvents){this.lastValue=this.getValue();var reset=_param(arguments[1],true,"boolean");var doEvents=_param(arguments[2],true,"boolean");var type=(this.type.substring(0,6)=="select")?"select":this.type;var v;if(type=="select"){var bSelectOne=(this.type=="select-one")?true:false;var orig=value;value=","+value+",";bLookForFirst=true;if(!this.container){for(var i=0;i<this.obj.length;i++){v=this.obj[i].value;bSelectItem=(value.indexOf(","+v+",")>-1)?true:false;if(bSelectItem&&(bLookForFirst||!bSelectOne))this.obj[i].selected=true;else if(reset||bSelectOne)this.obj[i].selected=false;if(bSelectItem&&bLookForFirst)bLookForFirst=false;}
if(bSelectOne&&bLookForFirst){if(this.defaultValue==orig)if(this.obj.length>0)this.obj[0].selected=true;else this.setValue(this.defaultValue);}}else{newValues=new Object();for(var i=0;i<this.boundContainers.length;i++){var sCName=this.qForm._name+"_"+this.boundContainers[i];if(qFormAPI.containers[sCName]){for(key in qFormAPI.containers[sCName]){if(value.indexOf(","+key+",")>-1){newValues[key]=qFormAPI.containers[sCName][key];}}}}
this.populate(newValues,reset)}}else if((type=="checkbox")||(type=="radio")){if(!!this.obj[0]&&!this.obj.value){value=","+value+",";for(var i=0;i<this.obj.length;i++){if(value.indexOf(","+this.obj[i].value+",")>-1)this.obj[i].checked=true;else if(reset)this.obj[i].checked=false;}}else if(this.obj.value==value){this.obj.checked=true;}else if(reset){this.obj.checked=false;}}else{this.obj.value=(!value)?"":value;}
if(doEvents){this.triggerEvent("onblur");if(this.lastValue!=value)this.triggerEvent("onchange");}
this.onSetValue();return true;}
Field.prototype.setValue=_f_setValue;Field.prototype.onSetValue=new Function("");function _f_triggerEvent(event){oEvent=eval("this.obj."+event);if((this.obj.type=="checkbox")||(this.obj.type=="radio")&&!!this.obj[0]){for(var k=0;k<this.obj.length;k++){oEvent=eval("this.obj[k]."+event);if(typeof oEvent=="function")oEvent();}}else if(typeof oEvent=="function"){oEvent();}}
Field.prototype.triggerEvent=_f_triggerEvent;function _q_addValidator(name,fn){if(arguments.length<2)return alert("To create a new validation object, you must specify \nboth a name and function to run: \n  obj.addValidator(\"isTime\", __isTime);");if(typeof fn=="string"){var _func=new Function(fn);_addValidator(name,_func);}else{_addValidator(name,fn);}
return true;}
qForm.prototype.addValidator=_q_addValidator;function _f_validateExp(expression,error,cmd){var expression=_param(arguments[0],"false");var error=_param(arguments[1],"An error occurred on the field '\"+this.description+\"'.");var cmd=_param(arguments[2]);var strFn="if( "+expression+" ){ this.error = \""+error+"\";}";if(cmd.length>0)strFn+=cmd;strValidateExp="_validateExp"+qFormAPI.customValidators;_addValidator(strValidateExp,new Function(strFn));eval(this.pointer+".validate"+strValidateExp+"();");qFormAPI.customValidators++;}
Field.prototype.validateExp=_f_validateExp;function _addValidator(name,fn,alwaysRun){var alwaysRun=_param(arguments[2],false,"boolean");if(arguments.length<2)return alert("To create a new validation object, you must specify \nboth a name and function to run: \n  _addValidator(\"isTime\", __isTime);");if(name.substring(0,2).toLowerCase()=="is")name=name.substring(2);for(var a=0;a<qFormAPI.validators.length;a++)if(qFormAPI.validators[a]==name)return alert("The "+name+" validator has already been loaded.");qFormAPI.validators[qFormAPI.validators.length]=name;if(qFormAPI.showStatusMsgs&&name.substring(0,12)!="_validateExp"){window.status="Initializing the validate"+name+"() and is"+name+"() validation scripts...";setTimeout("window.status = ''",100);}
var strFN=fn.toString();var strName=strFN.substring(strFN.indexOf(" "),strFN.indexOf("("));var strArguments=strFN.substring(strFN.indexOf("(")+1,strFN.indexOf(")"));while(strArguments.indexOf(" ")>-1)strArguments=strArguments.substring(0,strArguments.indexOf(" "))+strArguments.substring(strArguments.indexOf(" ")+1);var strBody="var display = (this.qForm._status == 'validating') ? false : true;\n";strBody+="if( (display && this.isLocked()) || this.qForm._status.substring(0,5) == 'error') return false;\n this.value = this.getValue();";if(!alwaysRun)strBody+="if( !display && this.value.length == 0 && !this.required ) return false;\n";strBody+="this.error = '';\n";strBody+=strFN.substring(strFN.indexOf("{")+1,strFN.lastIndexOf("}"));strBody+="if( this.error.length > 0 && !!errorMsg) this.error = errorMsg;\n";strBody+="if( display && this.error.length > 0 ){\n";strBody+="if( this.qForm._status.indexOf('_ShowError') > -1 ){\n";strBody+="this.qForm._status = 'error';\n";strBody+="alert(this.error);\n";strBody+="setTimeout(this.pointer + \".focus();\", 1);\n";strBody+="setTimeout(this.pointer + \".qForm._status='idle';\", 100);\n";strBody+="} return false;\n";strBody+="} else if ( display ){ return true; } return this.error;\n";var strNewFN="new Function(";var aryArguments=strArguments.split(",");for(var i=0;i<aryArguments.length;i++){if(aryArguments[i]!="")strNewFN+="\""+aryArguments[i]+"\",";}
var strRuleFN=strNewFN;strNewFN+="\"errorMsg\",strBody);";eval("Field.prototype.is"+name+" = "+strNewFN);var strRule="var cmd = this.pointer + '.is"+name+"';\n";strRule+="cmd += '( ';\n";strRule+="for( i=0; i < arguments.length; i++ ){ \n";strRule+="if( typeof arguments[i] == 'string' ) cmd += '\"' + arguments[i] + '\",';\n";strRule+="else cmd += arguments[i] + ',';\n";strRule+="}\n";strRule+="cmd = cmd.substring(0, cmd.length-1);\n";strRule+="cmd += ')';\n";strRule+="this.qForm._queue.validation[this.qForm._queue.validation.length] = new Array(this.name, cmd);\n";strRule+="this._queue.validation[this._queue.validation.length] = cmd;\n";strRule+="if( !this.validatorAttached ){ this.addEvent('onblur', this.pointer + '.checkForErrors()');";strRule+="this.validatorAttached = true;}\n";strRule+="return true;\n";strRuleFN+="\"errorMsg\",strRule);";eval("Field.prototype.validate"+name+" = "+strRuleFN);return true;}
function _f_checkForErrors(){if(!this.validate||this.qForms._skipValidation)return true;this.qForm._status+="_ShowError";for(var i=0;i<this._queue.validation.length;i++)if(!eval(this._queue.validation[i]))break;setTimeout(this.pointer+".qForm._status = 'idle';",100);return true;}
Field.prototype.checkForErrors=_f_checkForErrors;function _q_validate(){if(!qFormAPI.packages.validation||this._skipValidation)return true;this.checkForErrors();if(this._queue.errors.length==0)return true;var result=this.onError();if(result==false)return true;var strError="The following error(s) occurred:\n";for(var i=0;i<this._queue.errors.length;i++)strError+=" - "+this._queue.errors[i]+"\n";var result=false;if(this._allowSubmitOnError&&this._showAlerts)result=confirm(strError+"\nAre you sure you want to continue?");else if(this._allowSubmitOnError&&!this._showAlerts)result=true;else alert(strError);return result;}
qForm.prototype.validate=_q_validate;function _q_checkForErrors(){var status=this._status;this._status="validating";this._queue.errors=new Array();aryQueue=new Array();this._queue.errorFields=",";for(var j=0;j<this._fields.length;j++){if(this[this._fields[j]].required)aryQueue[aryQueue.length]=new Array(this._fields[j],this._pointer+"['"+this._fields[j]+"'].isNotEmpty(\"The "+this[this._fields[j]].description+" field is required.\");");if(qFormAPI.useErrorColorCoding&&this[this._fields[j]].obj.style)this[this._fields[j]].obj.style[qFormAPI.styleAttribute]=this[this._fields[j]].styleValue;}
for(var i=0;i<aryQueue.length;i++)this[aryQueue[i][0]].throwError(eval(aryQueue[i][1]));for(var i=0;i<this._queue.validation.length;i++)this[this._queue.validation[i][0]].throwError(eval(this._queue.validation[i][1]));this.onValidate();this._status=status;return true;}
qForm.prototype.checkForErrors=_q_checkForErrors;qForm.prototype.onValidate=new Function("");qForm.prototype.onError=new Function("");function _f_throwError(error){var q=this.qForm;if((typeof error=="string")&&(error.length>0)&&(q._queue.errorFields.indexOf(","+this.name+",")==-1)){q._queue.errors[q._queue.errors.length]=error;q._queue.errorFields+=this.name+",";if(qFormAPI.useErrorColorCoding&&this.obj.style)this.obj.style[qFormAPI.styleAttribute]=qFormAPI.errorColor;return true;}
return false;}
Field.prototype.throwError=_f_throwError;function _addEvent(obj,event,cmd,append){if(arguments.length<3)return alert("Invalid arguments. Please use the format \n_addEvent(object, event, command, [append]).");var append=_param(arguments[3],true,"boolean");var event=arguments[0]+"."+arguments[1].toLowerCase();var objEvent=eval(event);var strEvent=(objEvent)?objEvent.toString():"";strEvent=strEvent.substring(strEvent.indexOf("{")+1,strEvent.lastIndexOf("}"));strEvent=(append)?(strEvent+cmd):(cmd+strEvent);strEvent+="\n";eval(event+" = new Function(strEvent)");return true;}
function _functionToString(fn,cmd,append){if(arguments.length<1)return alert("Invalid arguments. Please use the format \n_functionToString(function, [command], [append]).");var append=_param(arguments[2],true,"boolean");var strFunction=(!fn)?"":fn.toString();strFunction=strFunction.substring(strFunction.indexOf("{")+1,strFunction.lastIndexOf("}"));if(cmd)strFunction=(append)?(strFunction+cmd+"\n"):(cmd+strFunction+"\n");return strFunction;}
function _param(v,d,t){if(typeof d=="undefined")d="";if(typeof t=="undefined")t="string";if(t=="number"&&typeof v=="string")var v=parseFloat(arguments[0]);var value=(typeof v!="undefined"&&typeof v==t.toLowerCase())?v:d;return value;}
function _removeSpaces(v){while(v.indexOf(" ")>-1)v=v.substring(0,v.indexOf(" "))+v.substring(v.indexOf(" ")+1);return v;}
function _setContainerValues(obj){for(var i=0;i<obj._fields.length;i++){if(obj[obj._fields[i]].container&&obj[obj._fields[i]].type.substring(0,6)=="select"){for(var x=0;x<obj[obj._fields[i]].obj.length;x++){obj[obj._fields[i]].obj[x].selected=(!obj[obj._fields[i]].dummyContainer);}}}}
function _MaskAPI(){this.version="0.4a";this.instances=0;this.objects={};}
MaskAPI=new _MaskAPI();function Mask(m,t){this.mask=m;this.type=(typeof t=="string")?t:"string";this.error=[];this.errorCodes=[];this.value="";this.strippedValue="";this.allowPartial=false;this.id=MaskAPI.instances++;this.ref="MaskAPI.objects['"+this.id+"']";MaskAPI.objects[this.id]=this;}
Mask.prototype.attach=function(o){$addEvent(o,"onkeydown","return "+this.ref+".isAllowKeyPress(event, this);",true);$addEvent(o,"onkeyup","return "+this.ref+".getKeyPress(event, this);",true);$addEvent(o,"onblur","this.value = "+this.ref+".format(this.value);",true);}
Mask.prototype.isAllowKeyPress=function(e,o){if(this.type!="string")return true;var xe=new qEvent(e);if(((xe.keyCode>47)&&(o.value.length>=this.mask.length))&&!xe.ctrlKey)return false;return true;}
Mask.prototype.getKeyPress=function(e,o,_u){this.allowPartial=true;var xe=new qEvent(e);if((xe.keyCode>47)||(_u==true)||(xe.keyCode==8||xe.keyCode==46)){var v=o.value,d;if(xe.keyCode==8||xe.keyCode==46)d=true;else d=false
if(this.type=="number")this.value=this.setNumber(v,d);else if(this.type=="date")this.value=this.setDateKeyPress(v,d);else this.value=this.setGeneric(v,d);o.value=this.value;}
this.allowPartial=false;return true;}
Mask.prototype.format=function(s){if(this.type=="number")this.value=this.setNumber(s);else if(this.type=="date")this.value=this.setDate(s);else this.value=this.setGeneric(s);return this.value;}
Mask.prototype.throwError=function(c,e,v){this.error[this.error.length]=e;this.errorCodes[this.errorCodes.length]=c;if(typeof v=="string")return v;return true;}
Mask.prototype.setGeneric=function(_v,_d){var v=_v,m=this.mask;var r="x#*",rt=[],nv="",t,x,a=[],j=0,rx={"x":"A-Za-z","#":"0-9","*":"A-Za-z0-9"};v=v.replace(new RegExp("[^"+rx["*"]+"]","gi"),"");if((_d==true)&&(v.length==this.strippedValue.length))v=v.substring(0,v.length-1);this.strippedValue=v;var b=[];for(var i=0;i<m.length;i++){x=m.charAt(i);t=(r.indexOf(x)>-1);if(x=="!")x=m.charAt(i++);if((t&&!this.allowPartial)||(t&&this.allowPartial&&(rt.length<v.length)))rt[rt.length]="["+rx[x]+"]";a[a.length]={"chr":x,"mask":t};}
var hasOneValidChar=false;if(!this.allowPartial&&!(new RegExp(rt.join(""))).test(v))return this.throwError(1,"The value \""+_v+"\" must be in the format "+this.mask+".",_v);else if((this.allowPartial&&(v.length>0))||!this.allowPartial){for(i=0;i<a.length;i++){if(a[i].mask){while(v.length>0&&!(new RegExp(rt[j])).test(v.charAt(j)))v=(v.length==1)?"":v.substring(1);if(v.length>0){nv+=v.charAt(j);hasOneValidChar=true;}
j++;}else nv+=a[i].chr;if(this.allowPartial&&(j>v.length))break;}}
if(this.allowPartial&&!hasOneValidChar)nv="";if(this.allowPartial){if(nv.length<a.length)this.nextValidChar=rx[a[nv.length].chr];else this.nextValidChar=null;}
return nv;}
Mask.prototype.setNumber=function(_v,_d){var v=String(_v).replace(/[^\d.-]*/gi,""),m=this.mask;v=v.replace(/\./,"d").replace(/\./g,"").replace(/d/,".");if(!/^[\$]?((\$?[\+-]?([0#]{1,3},)?[0#]*(\.[0#]*)?)|([\+-]?\([\+-]?([0#]{1,3},)?[0#]*(\.[0#]*)?\)))$/.test(m))
return this.throwError(1,"An invalid mask was specified for the \nMask constructor.",_v);if((_d==true)&&(v.length==this.strippedValue.length))v=v.substring(0,v.length-1);if(this.allowPartial&&(v.replace(/[^0-9]/,"").length==0))return v;this.strippedValue=v;if(v.length==0)v=NaN;var vn=Number(v);if(isNaN(vn))return this.throwError(2,"The value entered was not a number.",_v);if(m.length==0)return v;var vi=String(Math.abs((v.indexOf(".")>-1)?v.split(".")[0]:v));var vd=(v.indexOf(".")>-1)?v.split(".")[1]:"";var _vd=vd;var isNegative=(vn!=0&&Math.abs(vn)*-1==vn);var show={"$":/^[\$]/.test(m),"(":(isNegative&&(m.indexOf("(")>-1)),"+":((m.indexOf("+")!=-1)&&!isNegative)}
show["-"]=(isNegative&&(!show["("]||(m.indexOf("-")!=-1)));m=m.replace(/[^#0.,]*/gi,"");var dm=(m.indexOf(".")>-1)?m.split(".")[1]:"";if(dm.length==0){vi=String(Math.round(Number(vi)));vd="";}else{var md=dm.lastIndexOf("0")+1;if(vd.length>dm.length)vd=String(Math.round(Number(vd.substring(0,dm.length+1))/10));else while(vd.length<md)vd+="0";}
var im=(m.indexOf(".")>-1)?m.split(".")[0]:m;im=im.replace(/[^0#]+/gi,"");var mv=im.indexOf("0")+1;if(mv>0){mv=im.length-mv+1;while(vi.length<mv)vi="0"+vi;}
if(/[#0]+,[#0]{3}/.test(m)){var x=[],i=0,n=Number(vi);while(n>999){x[i]="00"+String(n%1000);x[i]=x[i].substring(x[i].length-3);n=Math.floor(n/1000);i++;}
x[i]=String(n%1000);vi=x.reverse().join(",");}
if((vd.length>0&&!this.allowPartial)||((dm.length>0)&&this.allowPartial&&(v.indexOf(".")>-1)&&(_vd.length>=vd.length))){v=vi+"."+vd;}else if((dm.length>0)&&this.allowPartial&&(v.indexOf(".")>-1)&&(_vd.length<vd.length)){v=vi+"."+_vd;}else{v=vi;}
if(show["$"])v=this.mask.replace(/(^[\$])(.+)/gi,"$")+v;if(show["+"])v="+"+v;if(show["-"])v="-"+v;if(show["("])v="("+v+")";return v;}
Mask.prototype.setDate=function(_v){var v=_v,m=this.mask;var a,e,mm,dd,yy,x,s;a=m.split(/[^mdy]+/);s=m.split(/[mdy]+/);e=v.split(/[^0-9]/);if(s[0].length==0)s.splice(0,1);for(var i=0;i<a.length;i++){x=a[i].charAt(0).toLowerCase();if(x=="m")mm=parseInt(e[i],10)-1;else if(x=="d")dd=parseInt(e[i],10);else if(x=="y")yy=parseInt(e[i],10);}
if(String(yy).length<3){yy=2000+yy;if((new Date()).getFullYear()+20<yy)yy=yy-100;}
var d=new Date(yy,mm,dd);if(d.getDate()!=dd)return this.throwError(1,"An invalid day was entered.",_v);else if(d.getMonth()!=mm)return this.throwError(2,"An invalid month was entered.",_v);var nv="";for(i=0;i<a.length;i++){x=a[i].charAt(0).toLowerCase();if(x=="m"){mm++;if(a[i].length==2){mm="0"+mm;mm=mm.substring(mm.length-2);}
nv+=mm;}else if(x=="d"){if(a[i].length==2){dd="0"+dd;dd=dd.substring(dd.length-2);}
nv+=dd;}else if(x=="y"){if(a[i].length==2)nv+=d.getYear();else nv+=d.getFullYear();}
if(i<a.length-1)nv+=s[i];}
return nv;}
Mask.prototype.setDateKeyPress=function(_v,_d){var v=_v,m=this.mask,k=v.charAt(v.length-1);var a,e,c,ml,vl,mm="",dd="",yy="",x,p,z;if(_d==true){while((/[^0-9]/gi).test(v.charAt(v.length-1)))v=v.substring(0,v.length-1);if((/[^0-9]/gi).test(this.strippedValue.charAt(this.strippedValue.length-1)))v=v.substring(0,v.length-1);if(v.length==0)return"";}
a=m.split(/[^mdy]/);s=m.split(/[mdy]+/);if(s[0].length==0)s.splice(0,1);e=v.split(/[^0-9]/);p=(e.length>0)?e.length-1:0;c=a[p].charAt(0);ml=a[p].length;for(var i=0;i<e.length;i++){x=a[i].charAt(0).toLowerCase();if(x=="m")mm=parseInt(e[i],10)-1;else if(x=="d")dd=parseInt(e[i],10);else if(x=="y")yy=parseInt(e[i],10);}
var nv="";var j=0;for(i=0;i<e.length;i++){x=a[i].charAt(0).toLowerCase();if(x=="m"){z=((/[^0-9]/).test(k)&&c=="m");mm++;if((e[i].length==2&&mm<10)||(a[i].length==2&&c!="m")||(mm>1&&c=="m")||(z&&a[i].length==2)){mm="0"+mm;mm=mm.substring(mm.length-2);}
vl=String(mm).length;ml=2;nv+=mm;}else if(x=="d"){z=((/[^0-9]/).test(k)&&c=="d");if((e[i].length==2&&dd<10)||(a[i].length==2&&c!="d")||(dd>3&&c=="d")||(z&&a[i].length==2)){dd="0"+dd;dd=dd.substring(dd.length-2);}
vl=String(dd).length;ml=2;nv+=dd;}else if(x=="y"){z=((/[^0-9]/).test(k)&&c=="y");if(c=="y")yy=String(yy);else{if(a[i].length==2)yy=d.getYear();else yy=d.getFullYear();}
if((e[i].length==2&&yy<10)||(a[i].length==2&&c!="y")||(z&&a[i].length==2)){yy="0"+yy;yy=yy.substring(yy.length-2);}
ml=a[i].length;vl=String(yy).length;nv+=yy;}
if(((ml==vl||z)&&(x==c)&&(i<s.length))||(i<s.length&&x!=c))nv+=s[i];}
if(nv.length>m.length)nv=nv.substring(0,m.length);this.strippedValue=(nv=="NaN")?"":nv;return this.strippedValue;}
function qEvent(e){if(window.Event){var isKeyPress=(e.type.substring(0,3)=="key");this.keyCode=(isKeyPress)?parseInt(e.which,10):0;this.button=(!isKeyPress)?parseInt(e.which,10):0;this.srcElement=e.target;this.type=e.type;this.x=e.pageX;this.y=e.pageY;this.screenX=e.screenX;this.screenY=e.screenY;if(document.layers){this.altKey=((e.modifiers&Event.ALT_MASK)>0);this.ctrlKey=((e.modifiers&Event.CONTROL_MASK)>0);this.shiftKey=((e.modifiers&Event.SHIFT_MASK)>0);this.keyCode=this.translateKeyCode(this.keyCode);}else{this.altKey=e.altKey;this.ctrlKey=e.ctrlKey;this.shiftKey=e.shiftKey;}}else{e=window.event;this.keyCode=parseInt(e.keyCode,10);this.button=e.button;this.srcElement=e.srcElement;this.type=e.type;if(document.all){this.x=e.clientX+document.body.scrollLeft;this.y=e.clientY+document.body.scrollTop;}else{this.x=e.clientX;this.y=e.clientY;}
this.screenX=e.screenX;this.screenY=e.screenY;this.altKey=e.altKey;this.ctrlKey=e.ctrlKey;this.shiftKey=e.shiftKey;}
if(this.button==0){this.setKeyPressed(this.keyCode);this.keyChar=String.fromCharCode(this.keyCode);}}
qEvent.prototype.translateKeyCode=function(i){var l={};if(!!document.layers){if(this.keyCode>96&&this.keyCode<123)return this.keyCode-32;l={96:192,126:192,33:49,64:50,35:51,36:52,37:53,94:54,38:55,42:56,40:57,41:48,92:220,124:220,125:221,93:221,91:219,123:219,39:222,34:222,47:191,63:191,46:190,62:190,44:188,60:188,45:189,95:189,43:187,61:187,59:186,58:186,"null":null}}
return(!!l[i])?l[i]:i;}
qEvent.prototype.setKP=function(i,s){this.keyPressedCode=i;this.keyNonChar=(typeof s=="string");this.keyPressed=(this.keyNonChar)?s:String.fromCharCode(i);this.isNumeric=(parseInt(this.keyPressed,10)==this.keyPressed);this.isAlpha=((this.keyCode>64&&this.keyCode<91)&&!this.altKey&&!this.ctrlKey);return true;}
qEvent.prototype.setKeyPressed=function(i){var b=this.shiftKey;if(!b&&(i>64&&i<91))return this.setKP(i+32);if(i>95&&i<106)return this.setKP(i-48);switch(i){case 49:case 51:case 52:case 53:if(b)i=i-16;break;case 50:if(b)i=64;break;case 54:if(b)i=94;break;case 55:if(b)i=38;break;case 56:if(b)i=42;break;case 57:if(b)i=40;break;case 48:if(b)i=41;break;case 192:if(b)i=126;else i=96;break;case 189:if(b)i=95;else i=45;break;case 187:if(b)i=43;else i=61;break;case 220:if(b)i=124;else i=92;break;case 221:if(b)i=125;else i=93;break;case 219:if(b)i=123;else i=91;break;case 222:if(b)i=34;else i=39;break;case 186:if(b)i=58;else i=59;break;case 191:if(b)i=63;else i=47;break;case 190:if(b)i=62;else i=46;break;case 188:if(b)i=60;else i=44;break;case 106:case 57379:i=42;break;case 107:case 57380:i=43;break;case 109:case 57381:i=45;break;case 110:i=46;break;case 111:case 57378:i=47;break;case 8:return this.setKP(i,"[backspace]");case 9:return this.setKP(i,"[tab]");case 13:return this.setKP(i,"[enter]");case 16:case 57389:return this.setKP(i,"[shift]");case 17:case 57390:return this.setKP(i,"[ctrl]");case 18:case 57388:return this.setKP(i,"[alt]");case 19:case 57402:return this.setKP(i,"[break]");case 20:return this.setKP(i,"[capslock]");case 32:return this.setKP(i,"[space]");case 91:return this.setKP(i,"[windows]");case 93:return this.setKP(i,"[properties]");case 33:case 57371:return this.setKP(i*-1,"[pgup]");case 34:case 57372:return this.setKP(i*-1,"[pgdown]");case 35:case 57370:return this.setKP(i*-1,"[end]");case 36:case 57369:return this.setKP(i*-1,"[home]");case 37:case 57375:return this.setKP(i*-1,"[left]");case 38:case 57373:return this.setKP(i*-1,"[up]");case 39:case 57376:return this.setKP(i*-1,"[right]");case 40:case 57374:return this.setKP(i*-1,"[down]");case 45:case 57382:return this.setKP(i*-1,"[insert]");case 46:case 57383:return this.setKP(i*-1,"[delete]");case 144:case 57400:return this.setKP(i*-1,"[numlock]");}
if(i>111&&i<124)return this.setKP(i*-1,"[f"+(i-111)+"]");return this.setKP(i);}
function $addEvent(o,_e,c,_b){var e=_e.toLowerCase(),b=(typeof _b=="boolean")?_b:true,x=(o[e])?o[e].toString():"";x=x.substring(x.indexOf("{")+1,x.lastIndexOf("}"));x=((b)?(x+c):(c+x))+"\n";return o[e]=(!!window.Event)?new Function("event",x):new Function(x);};(function(){var $$;$$=jQuery.fn.flash=function(htmlOptions,pluginOptions,replace,update){var block=replace||$$.replace;pluginOptions=$$.copy($$.pluginOptions,pluginOptions);if(!$$.hasFlash(pluginOptions.version)){if(pluginOptions.expressInstall&&$$.hasFlash(6,0,65)){var expressInstallOptions={flashvars:{MMredirectURL:location,MMplayerType:'PlugIn',MMdoctitle:jQuery('title').text()}};}else if(pluginOptions.update){block=update||$$.update;}else{return this;}}
htmlOptions=$$.copy($$.htmlOptions,expressInstallOptions,htmlOptions);return this.each(function(){block.call(this,$$.copy(htmlOptions));});};$$.copy=function(){var options={},flashvars={};for(var i=0;i<arguments.length;i++){var arg=arguments[i];if(arg==undefined)continue;jQuery.extend(options,arg);if(arg.flashvars==undefined)continue;jQuery.extend(flashvars,arg.flashvars);}
options.flashvars=flashvars;return options;};$$.hasFlash=function(){if(/hasFlash\=true/.test(location))return true;if(/hasFlash\=false/.test(location))return false;var pv=$$.hasFlash.playerVersion().match(/\d+/g);var rv=String([arguments[0],arguments[1],arguments[2]]).match(/\d+/g)||String($$.pluginOptions.version).match(/\d+/g);for(var i=0;i<3;i++){pv[i]=parseInt(pv[i]||0);rv[i]=parseInt(rv[i]||0);if(pv[i]<rv[i])return false;if(pv[i]>rv[i])return true;}
return true;};$$.hasFlash.playerVersion=function(){try{try{var axo=new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');try{axo.AllowScriptAccess='always';}
catch(e){return'6,0,0';}}catch(e){}
return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g,',').match(/^,?(.+),?$/)[1];}catch(e){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1];}}catch(e){}}
return'0,0,0';};$$.htmlOptions={height:240,flashvars:{},pluginspage:'http://www.adobe.com/go/getflashplayer',src:'#',type:'application/x-shockwave-flash',width:320};$$.pluginOptions={expressInstall:false,update:true,version:'6.0.65'};$$.replace=function(htmlOptions){this.innerHTML='<div class="alt">'+this.innerHTML+'</div>';jQuery(this).addClass('flash-replaced').prepend($$.transform(htmlOptions));};$$.update=function(htmlOptions){var url=String(location).split('?');url.splice(1,0,'?hasFlash=true&');url=url.join('');var msg='<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+url+'">Click here.</a></p>';this.innerHTML='<span class="alt">'+this.innerHTML+'</span>';jQuery(this).addClass('flash-update').prepend(msg);};function toAttributeString(){var s='';for(var key in this)
if(typeof this[key]!='function')
s+=key+'="'+this[key]+'" ';return s;};function toFlashvarsString(){var s='';for(var key in this)
if(typeof this[key]!='function')
s+=key+'='+encodeURIComponent(this[key])+'&';return s.replace(/&$/,'');};$$.transform=function(htmlOptions){htmlOptions.toString=toAttributeString;if(htmlOptions.flashvars)htmlOptions.flashvars.toString=toFlashvarsString;return'<embed '+String(htmlOptions)+'/>';};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};});}})();(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 a=this.formToArray(options.semantic);if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false)return this;var veto={};$.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;callbacks.push(function(data,status){$(options.target).attr("innerHTML",data).evalScripts().each(oldSuccess,[data,status]);});}
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);};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',encAttr:'multipart/form-data',action:opts.url});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===null)continue;if(v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)
a.push({name:n,value:v[j]});}
else
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.extend(jQuery.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}
var validator=jQuery.data(this[0],'validator');if(validator){return validator;}
validator=new jQuery.validator(options,this[0]);jQuery.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.find("input.cancel:submit").click(function(){validator.cancelSubmit=true;});this.submit(function(event){if(validator.settings.debug)
event.preventDefault();function handle(){if(validator.settings.submitHandler){validator.settings.submitHandler.call(validator,validator.currentForm);return false;}
return true;}
if(validator.cancelSubmit){validator.cancelSubmit=false;return handle();}
if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false;}
return handle();}else{validator.focusInvalid();return false;}});}
return validator;},valid:function(){if(jQuery(this[0]).is('form')){return this.validate().form();}else{var valid=true;var validator=jQuery(this[0].form).validate();this.each(function(){valid=validator.element(this)&&valid;});return valid;}},rules:function(){var element=this[0];var data=jQuery.validator.normalizeRules(jQuery.extend({},jQuery.validator.metadataRules(element),jQuery.validator.classRules(element),jQuery.validator.attributeRules(element),jQuery.validator.staticRules(element)),element);var rules=[];if(data.required){rules.push({method:'required',parameters:data.required});delete data.required;}
jQuery.each(data,function(method,value){rules.push({method:method,parameters:value});});return rules;},push:function(t){return this.setArray(this.add(t).get());}});jQuery.extend(jQuery.expr[":"],{blank:"!jQuery.trim(a.value)",filled:"!!jQuery.trim(a.value)",unchecked:"!a.checked"});jQuery.format=function(source,params){if(arguments.length==1)
return function(){var args=jQuery.makeArray(arguments);args.unshift(source);return jQuery.format.apply(this,args);};if(arguments.length>2&&params.constructor!=Array){params=jQuery.makeArray(arguments).slice(1);}
if(params.constructor!=Array){params=[params];}
jQuery.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),n);});return source;};jQuery.validator=function(options,form){this.settings=jQuery.extend({},jQuery.validator.defaults,options);this.currentForm=form;this.init();};jQuery.extend(jQuery.validator,{defaults:{messages:{},errorClass:"error",errorElement:"label",focusInvalid:true,errorContainer:jQuery([]),errorLabelContainer:jQuery([]),onsubmit:true,ignore:[],onfocusin:function(element){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass);this.errorsFor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastElement){this.element(element);}},onclick:function(element){if(element.name in this.submitted)
this.element(element);},highlight:function(element,errorClass){jQuery(element).addClass(errorClass);},unhighlight:function(element,errorClass){jQuery(element).removeClass(errorClass);}},setDefaults:function(settings){jQuery.extend(jQuery.validator.defaults,settings);},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein gültiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:jQuery.format("Please enter no more than {0} characters."),maxLength:jQuery.format("Please enter no more than {0} characters."),minlength:jQuery.format("Please enter at least {0} characters."),minLength:jQuery.format("Please enter at least {0} characters."),rangelength:jQuery.format("Please enter a value between {0} and {1} characters long."),rangeLength:jQuery.format("Please enter a value between {0} and {1} characters long."),rangeValue:jQuery.format("Please enter a value between {0} and {1}."),range:jQuery.format("Please enter a value between {0} and {1}."),maxValue:jQuery.format("Please enter a value less than or equal to {0}."),max:jQuery.format("Please enter a value less than or equal to {0}."),minValue:jQuery.format("Please enter a value greater than or equal to {0}."),min:jQuery.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=jQuery(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||jQuery(this.currentForm);this.containers=jQuery(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();function delegate(event){var validator=jQuery.data(this[0].form,"validator");validator.settings["on"+event.type]&&validator.settings["on"+event.type].call(validator,this[0]);}
jQuery(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",delegate).delegate("click",":radio, :checkbox",delegate);},form:function(){this.prepareForm();var elements=this.elements();for(var i=0;elements[i];i++){this.check(elements[i]);}
jQuery.extend(this.submitted,this.errorMap);this.invalid=jQuery.extend({},this.errorMap);jQuery(this.currentForm).triggerHandler("invalid-form.validate",[this]);this.showErrors();return this.valid();},element:function(element){element=this.clean(element);this.lastElement=element;this.prepareElement(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}
if(!this.numberOfInvalids()){this.toHide.push(this.containers);}
this.showErrors();return result;},showErrors:function(errors){if(errors){jQuery.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]});}
this.successList=jQuery.grep(this.successList,function(element){return!(element.name in errors);});}
this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors();},resetForm:function(){if(jQuery.fn.resetForm)
jQuery(this.currentForm).resetForm();this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass);},numberOfInvalids:function(){var count=0;for(var i in this.invalid)
count++;return count;},hideErrors:function(){this.addWrapper(this.toHide).hide();},valid:function(){return this.size()==0;},size:function(){return this.errorList.length;},focusInvalid:function(){if(this.settings.focusInvalid){try{jQuery(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus();}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&jQuery.grep(this.errorList,function(n){return n.element.name==lastActive.name;}).length==1&&lastActive;},elements:function(){var validator=this;var rulesCache={};return jQuery([]).add(this.currentForm.elements).filter("input, select, textarea").not(":submit, :reset, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulesCache||!jQuery(this).rules().length)
return false;rulesCache[this.name]=true;return true;});},clean:function(selector){return jQuery(selector)[0];},errors:function(){return jQuery(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext);},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=jQuery([]);this.toHide=jQuery([]);this.formSubmitted=false;},prepareForm:function(){this.reset();this.toHide=this.errors().push(this.containers);},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(this.clean(element));},check:function(element){element=this.clean(element);this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorClass);var rules=jQuery(element).rules();for(var i=0;rules[i];i++){var rule=rules[i];try{var result=jQuery.validator.methods[rule.method].call(this,jQuery.trim(element.value),element,rule.parameters);if(result=="dependency-mismatch")
return;if(result=="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return;}
if(!result){this.formatAndAdd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.warn("exception occured when checking element "+element.id
+", check the '"+rule.method+"' method");throw e;}}
if(rules.length)
this.successList.push(element);return true;},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==String?m:m[method]);},findDefined:function(){for(var i=0;i<arguments.length;i++){if(arguments[i]!==undefined)
return arguments[i];}
return undefined;},defaultMessage:function(element,method){return this.findDefined(this.customMessage(element.name,method),element.title||undefined,jQuery.validator.messages[method],"<strong>Warning: No message defined for "+element.name+"</strong>");},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method);if(typeof message=="function")
message=message.call(this,rule.parameters,element);this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message;},addWrapper:function(toToggle){if(this.settings.wrapper)
toToggle.push(toToggle.parents(this.settings.wrapper));return toToggle;},defaultShowErrors:function(){for(var i=0;this.errorList[i];i++){var error=this.errorList[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorClass);this.showLabel(error.element,error.message);}
if(this.errorList.length){this.toShow.push(this.containers);}
if(this.settings.success){for(var i=0;this.successList[i];i++){this.showLabel(this.successList[i]);}}
this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show();},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass().addClass(this.settings.errorClass);label.attr("generated")&&label.html(message);}else{label=jQuery("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(element),generated:true}).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+">").parent();}
if(!this.labelContainer.append(label).length)
this.settings.errorPlacement?this.settings.errorPlacement(label,jQuery(element)):label.insertAfter(element);}
if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addClass(this.settings.success):this.settings.success(label);}
this.toShow.push(label);},errorsFor:function(element){return this.errors().filter("[@for='"+this.idOrName(element)+"']");},idOrName:function(element){return this.checkable(element)?element.name:element.id||element.name;},rules:function(element){return jQuery(element).rules();},checkable:function(element){return /radio|checkbox/i.test(element.type);},findByName:function(name){var form=this.currentForm;return jQuery(document.getElementsByName(name)).map(function(index,element){return element.form==form&&element||null;});},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case'select':return jQuery("option:selected",element).length;case'input':if(this.checkable(element))
return this.findByName(element.name).filter(':checked').length;}
return value.length;},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true;},dependTypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!jQuery(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return!jQuery.validator.methods.required.call(this,jQuery.trim(element.value),element)&&"dependency-mismatch";},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true;}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0)
this.pendingRequest=0;delete this.pending[element.name];if(valid&&this.pendingRequest==0&&this.formSubmitted&&this.form()){jQuery(this.currentForm).submit();}},previousValue:function(element){return jQuery.data(element,"previousValue")||jQuery.data(element,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(element,"remote")});}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){className.constructor==String?this.classRuleSettings[className]=rules:jQuery.extend(this.classRuleSettings,className);},classRules:function(element){var rules={};var classes=jQuery(element).attr('class');classes&&jQuery.each(classes.split(' '),function(){if(this in jQuery.validator.classRuleSettings){jQuery.extend(rules,jQuery.validator.classRuleSettings[this]);}});return rules;},attributeRules:function(element){var rules={};var $element=jQuery(element);for(method in jQuery.validator.methods){var value=$element.attr(method);if(value!==undefined&&value!==''){rules[method]=value;}}
if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;delete rules.maxLength;}
return rules;},metadataRules:function(element){if(!jQuery.metadata)return{};var meta=jQuery.data(element.form,'validator').settings.meta;return meta?jQuery(element).metadata()[meta]:jQuery(element).metadata();},staticRules:function(element){var rules={};var validator=jQuery.data(element.form,'validator');if(validator.settings.rules){rules=jQuery.validator.normalizeRule(validator.settings.rules[element.name])||{};}
return rules;},normalizeRules:function(rules,element){jQuery.each({minLength:'minlength',maxLength:'maxlength',rangeLength:'rangelength',minValue:'min',maxValue:'max',rangeValue:'range'},function(dep,curr){if(rules[dep]){rules[curr]=rules[dep];delete rules[dep];}});jQuery.each(rules,function(rule,parameter){rules[rule]=jQuery.isFunction(parameter)?parameter(element):parameter;});jQuery.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=Number(rules[this]);}});jQuery.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[Number(rules[this][0]),Number(rules[this][1])];}});if(jQuery.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}
if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}
return rules;},normalizeRule:function(data){if(typeof data=="string"){var transformed={};transformed[data]=true;data=transformed;}
return data;},addMethod:function(name,method,message){jQuery.validator.methods[name]=method;jQuery.validator.messages[name]=message;if(method.length<3){jQuery.validator.addClassRules(name,jQuery.validator.normalizeRule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element))
return"dependency-mismatch";switch(element.nodeName.toLowerCase()){case'select':var options=jQuery("option:selected",element);return options.length>0&&(element.type=="select-multiple"||(jQuery.browser.msie&&!(options[0].attributes['value'].specified)?options[0].text:options[0].value).length>0);case'input':if(this.checkable(element))
return this.getLength(value,element)>0;default:return value.length>0;}},remote:function(value,element,param){if(this.optional(element))
return"dependency-mismatch";var previous=this.previousValue(element);if(!this.settings.messages[element.name])
this.settings.messages[element.name]={};this.settings.messages[element.name].remote=typeof previous.message=="function"?previous.message(value):previous.message;if(previous.old!==value){previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;jQuery.ajax({url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){if(!response){var errors={};errors[element.name]=response||validator.defaultMessage(element,"remote");validator.showErrors(errors);}else{var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);validator.showErrors();}
previous.valid=response;validator.stopRequest(element,response);}});return"pending";}else if(this.pending[element.name]){return"pending";}
return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getLength(value,element)>=param;},minLength:function(value,element,param){return jQuery.validator.methods.minlength.apply(this,arguments);},maxlength:function(value,element,param){return this.optional(element)||this.getLength(value,element)<=param;},maxLength:function(value,element,param){return jQuery.validator.methods.maxlength.apply(this,arguments);},rangelength:function(value,element,param){var length=this.getLength(value,element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},rangeLength:function(value,element,param){return jQuery.validator.methods.rangelength.apply(this,arguments);},min:function(value,element,param){return this.optional(element)||value>=param;},minValue:function(){return jQuery.validator.methods.min.apply(this,arguments);},max:function(value,element,param){return this.optional(element)||value<=param;},maxValue:function(){return jQuery.validator.methods.max.apply(this,arguments);},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},rangeValue:function(){return jQuery.validator.methods.range.apply(this,arguments);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value));},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},dateDE:function(value,element){return this.optional(element)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},numberDE:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element))
return"dependency-mismatch";var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);var nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9)
nDigit-=9;}
nCheck+=nDigit;bEven=!bEven;}
return(nCheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param:"png|jpe?g|gif";return this.optional(element)||value.match(new RegExp(".("+param+")$","i"));},equalTo:function(value,element,param){return value==jQuery(param).val();}}});;(function($){var ajax=$.ajax;var pendingRequests={};$.ajax=function(settings){settings=jQuery.extend(settings,jQuery.extend({},jQuery.ajaxSettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingRequests[port]){pendingRequests[port].abort();}
return pendingRequests[port]=ajax.apply(this,arguments);}
return ajax.apply(this,arguments);};})(jQuery);;(function($){$.extend($.event.special,{focusin:{setup:function(){if($.browser.msie)
return false;this.addEventListener("focus",$.event.special.focusin.handler,true);},teardown:function(){if($.browser.msie)
return false;this.removeEventListener("focus",$.event.special.focusin.handler,true);},handler:function(event){var args=Array.prototype.slice.call(arguments,1);args.unshift($.extend($.event.fix(event),{type:"focusin"}));return $.event.handle.apply(this,args);}},focusout:{setup:function(){if($.browser.msie)
return false;this.addEventListener("blur",$.event.special.focusout.handler,true);},teardown:function(){if($.browser.msie)
return false;this.removeEventListener("blur",$.event.special.focusout.handler,true);},handler:function(event){var args=Array.prototype.slice.call(arguments,1);args.unshift($.extend($.event.fix(event),{type:"focusout"}));return $.event.handle.apply(this,args);}}});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});},triggerEvent:function(type,target){return this.triggerHandler(type,[jQuery.event.fix({type:type,target:target})]);}})})(jQuery);var isIE6=navigator.userAgent.toLowerCase().indexOf('msie 6')!=-1;jQuery.fn.megamenu=function(options){options=jQuery.extend({activate_action:"mouseover",deactivate_action:"mouseleave",show_method:"slideDown",hide_method:"slideUp",justify:"left",enable_js_shadow:true,shadow_size:3,mm_timeout:250},options);var $megamenu_object=this;if(options.activate_action=="click")options.mm_timeout=0;$megamenu_object.children("li").each(function(){jQuery(this).addClass("mm-item");jQuery(".mm-item").css({'float':options.justify});jQuery(this).find("div:first").addClass("mm-item-content");jQuery(this).find("a:first").addClass("mm-item-link");var $mm_item_content=jQuery(this).find(".mm-item-content");var $mm_item_link=jQuery(this).find(".mm-item-link");$mm_item_content.hide();jQuery(document).bind("click",function(){jQuery(".mm-item-content").hide();jQuery(".mm-item-link").removeClass("mm-item-link-hover");});jQuery(this).bind("click",function(e){e.stopPropagation();});$mm_item_content.wrapInner('<div class="mm-content-base"></div>');if(options.enable_js_shadow==true){$mm_item_content.append('<div class="mm-js-shadow"></div>');}
var $mm_timer=0;jQuery(this).bind(options.activate_action,function(e){e.stopPropagation();var mm_item_link_obj=jQuery(this).find("a.mm-item-link");var mm_item_content_obj=jQuery(this).find("div.mm-item-content");clearTimeout($mm_timer);$mm_timer=setTimeout(function(){mm_item_link_obj.addClass("mm-item-link-hover");mm_item_content_obj.css({'top':($mm_item_link.offset().top+$mm_item_link.outerHeight())-1+"px",'left':($mm_item_link.offset().left)-5+'px'})
if(options.justify=="left"){var mm_object_right_end=$megamenu_object.offset().left+$megamenu_object.outerWidth();var mm_content_right_end=$mm_item_link.offset().left+$mm_item_content.outerWidth()-5;if(mm_content_right_end>=mm_object_right_end){mm_item_content_obj.css({'left':($mm_item_link.offset().left-(mm_content_right_end-mm_object_right_end))-2+'px'});}}else if(options.justify=="right"){var mm_object_left_end=$megamenu_object.offset().left;var mm_content_left_end=$mm_item_link.offset().left-mm_item_content_obj.outerWidth()+
$mm_item_link.outerWidth()+5;if(mm_content_left_end<=mm_object_left_end){mm_item_content_obj.css({'left':mm_object_left_end+2+'px'});}else{mm_item_content_obj.css({'left':mm_content_left_end+'px'});}}
if(options.enable_js_shadow==true){mm_item_content_obj.find(".mm-js-shadow").height(mm_item_content_obj.height());mm_item_content_obj.find(".mm-js-shadow").width(mm_item_content_obj.width());mm_item_content_obj.find(".mm-js-shadow").css({'top':(options.shadow_size)+(isIE6?2:0)+"px",'left':(options.shadow_size)+(isIE6?2:0)+"px",'opacity':0.5});}
switch(options.show_method){case"simple":mm_item_content_obj.show();break;case"slideDown":mm_item_content_obj.height("auto");mm_item_content_obj.slideDown('fast');break;case"fadeIn":mm_item_content_obj.fadeTo('fast',1);break;default:mm_item_content_obj.each(options.show_method);break;}},options.mm_timeout);});jQuery(this).bind(options.deactivate_action,function(e){e.stopPropagation();clearTimeout($mm_timer);var mm_item_link_obj=jQuery(this).find("a.mm-item-link");var mm_item_content_obj=jQuery(this).find("div.mm-item-content");switch(options.hide_method){case"simple":mm_item_content_obj.hide();mm_item_link_obj.removeClass("mm-item-link-hover");break;case"slideUp":mm_item_content_obj.slideUp('fast',function(){mm_item_link_obj.removeClass("mm-item-link-hover");});break;case"fadeOut":mm_item_content_obj.fadeOut('fast',function(){mm_item_link_obj.removeClass("mm-item-link-hover");});break;default:mm_item_content_obj.each(options.hide_method);mm_item_link_obj.removeClass("mm-item-link-hover");break;}
if(mm_item_content_obj.length<1)mm_item_link_obj.removeClass("mm-item-link-hover");});});this.find(">li:last").after('<li class="clear-fix"></li>');this.show();};var Cufon=(function(){var m=function(){return m.replace.apply(null,arguments)};var x=m.DOM={ready:(function(){var C=false,E={loaded:1,complete:1};var B=[],D=function(){if(C){return}C=true;for(var F;F=B.shift();F()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",D,false);window.addEventListener("pageshow",D,false)}if(!window.opera&&document.readyState){(function(){E[document.readyState]?D():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");D()}catch(F){setTimeout(arguments.callee,1)}})()}q(window,"load",D);return function(F){if(!arguments.length){D()}else{C?F():B.push(F)}}})(),root:function(){return document.documentElement||document.body}};var n=m.CSS={Size:function(C,B){this.value=parseFloat(C);this.unit=String(C).match(/[a-z%]*$/)[0]||"px";this.convert=function(D){return D/B*this.value};this.convertFrom=function(D){return D/this.value*B};this.toString=function(){return this.value+this.unit}},addClass:function(C,B){var D=C.className;C.className=D+(D&&" ")+B;return C},color:j(function(C){var B={};B.color=C.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(E,D,F){B.opacity=parseFloat(F);return"rgb("+D+")"});return B}),fontStretch:j(function(B){if(typeof B=="number"){return B}if(/%$/.test(B)){return parseFloat(B)/100}return{"ultra-condensed":0.5,"extra-condensed":0.625,condensed:0.75,"semi-condensed":0.875,"semi-expanded":1.125,expanded:1.25,"extra-expanded":1.5,"ultra-expanded":2}[B]||1}),getStyle:function(C){var B=document.defaultView;if(B&&B.getComputedStyle){return new a(B.getComputedStyle(C,null))}if(C.currentStyle){return new a(C.currentStyle)}return new a(C.style)},gradient:j(function(F){var G={id:F,type:F.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},C=F.substr(F.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var E=0,B=C.length,D;E<B;++E){D=C[E].split("=",2).reverse();G.stops.push([D[1]||E/(B-1),D[0]])}return G}),quotedList:j(function(E){var D=[],C=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,B;while(B=C.exec(E)){D.push(B[3]||B[1])}return D}),recognizesMedia:j(function(G){var E=document.createElement("style"),D,C,B;E.type="text/css";E.media=G;try{E.appendChild(document.createTextNode("/**/"))}catch(F){}C=g("head")[0];C.insertBefore(E,C.firstChild);D=(E.sheet||E.styleSheet);B=D&&!D.disabled;C.removeChild(E);return B}),removeClass:function(D,C){var B=RegExp("(?:^|\\s+)"+C+"(?=\\s|$)","g");D.className=D.className.replace(B,"");return D},supports:function(D,C){var B=document.createElement("span").style;if(B[D]===undefined){return false}B[D]=C;return B[D]===C},textAlign:function(E,D,B,C){if(D.get("textAlign")=="right"){if(B>0){E=" "+E}}else{if(B<C-1){E+=" "}}return E},textShadow:j(function(F){if(F=="none"){return null}var E=[],G={},B,C=0;var D=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(B=D.exec(F)){if(B[0]==","){E.push(G);G={};C=0}else{if(B[1]){G.color=B[1]}else{G[["offX","offY","blur"][C++]]=B[2]}}}E.push(G);return E}),textTransform:(function(){var B={uppercase:function(C){return C.toUpperCase()},lowercase:function(C){return C.toLowerCase()},capitalize:function(C){return C.replace(/\b./g,function(D){return D.toUpperCase()})}};return function(E,D){var C=B[D.get("textTransform")];return C?C(E):E}})(),whiteSpace:(function(){var D={inline:1,"inline-block":1,"run-in":1};var C=/^\s+/,B=/\s+$/;return function(H,F,G,E){if(E){if(E.nodeName.toLowerCase()=="br"){H=H.replace(C,"")}}if(D[F.get("display")]){return H}if(!G.previousSibling){H=H.replace(C,"")}if(!G.nextSibling){H=H.replace(B,"")}return H}})()};n.ready=(function(){var B=!n.recognizesMedia("all"),E=false;var D=[],H=function(){B=true;for(var K;K=D.shift();K()){}};var I=g("link"),J=g("style");function C(K){return K.disabled||G(K.sheet,K.media||"screen")}function G(M,P){if(!n.recognizesMedia(P||"all")){return true}if(!M||M.disabled){return false}try{var Q=M.cssRules,O;if(Q){search:for(var L=0,K=Q.length;O=Q[L],L<K;++L){switch(O.type){case 2:break;case 3:if(!G(O.styleSheet,O.media.mediaText)){return false}break;default:break search}}}}catch(N){}return true}function F(){if(document.createStyleSheet){return true}var L,K;for(K=0;L=I[K];++K){if(L.rel.toLowerCase()=="stylesheet"&&!C(L)){return false}}for(K=0;L=J[K];++K){if(!C(L)){return false}}return true}x.ready(function(){if(!E){E=n.getStyle(document.body).isUsable()}if(B||(E&&F())){H()}else{setTimeout(arguments.callee,10)}});return function(K){if(B){K()}else{D.push(K)}}})();function s(D){var C=this.face=D.face,B={"\u0020":1,"\u00a0":1,"\u3000":1};this.glyphs=D.glyphs;this.w=D.w;this.baseSize=parseInt(C["units-per-em"],10);this.family=C["font-family"].toLowerCase();this.weight=C["font-weight"];this.style=C["font-style"]||"normal";this.viewBox=(function(){var F=C.bbox.split(/\s+/);var E={minX:parseInt(F[0],10),minY:parseInt(F[1],10),maxX:parseInt(F[2],10),maxY:parseInt(F[3],10)};E.width=E.maxX-E.minX;E.height=E.maxY-E.minY;E.toString=function(){return[this.minX,this.minY,this.width,this.height].join(" ")};return E})();this.ascent=-parseInt(C.ascent,10);this.descent=-parseInt(C.descent,10);this.height=-this.ascent+this.descent;this.spacing=function(L,N,E){var O=this.glyphs,M,K,G,P=[],F=0,J=-1,I=-1,H;while(H=L[++J]){M=O[H]||this.missingGlyph;if(!M){continue}if(K){F-=G=K[H]||0;P[I]-=G}F+=P[++I]=~~(M.w||this.w)+N+(B[H]?E:0);K=M.k}P.total=F;return P}}function f(){var C={},B={oblique:"italic",italic:"oblique"};this.add=function(D){(C[D.style]||(C[D.style]={}))[D.weight]=D};this.get=function(H,I){var G=C[H]||C[B[H]]||C.normal||C.italic||C.oblique;if(!G){return null}I={normal:400,bold:700}[I]||parseInt(I,10);if(G[I]){return G[I]}var E={1:1,99:0}[I%100],K=[],F,D;if(E===undefined){E=I>400}if(I==500){I=400}for(var J in G){if(!k(G,J)){continue}J=parseInt(J,10);if(!F||J<F){F=J}if(!D||J>D){D=J}K.push(J)}if(I<F){I=F}if(I>D){I=D}K.sort(function(M,L){return(E?(M>=I&&L>=I)?M<L:M>L:(M<=I&&L<=I)?M>L:M<L)?-1:1});return G[K[0]]}}function r(){function D(F,G){if(F.contains){return F.contains(G)}return F.compareDocumentPosition(G)&16}function B(G){var F=G.relatedTarget;if(!F||D(this,F)){return}C(this,G.type=="mouseover")}function E(F){C(this,F.type=="mouseenter")}function C(F,G){setTimeout(function(){var H=d.get(F).options;m.replace(F,G?h(H,H.hover):H,true)},10)}this.attach=function(F){if(F.onmouseenter===undefined){q(F,"mouseover",B);q(F,"mouseout",B)}else{q(F,"mouseenter",E);q(F,"mouseleave",E)}}}function u(){var C=[],D={};function B(H){var E=[],G;for(var F=0;G=H[F];++F){E[F]=C[D[G]]}return E}this.add=function(F,E){D[F]=C.push(E)-1};this.repeat=function(){var E=arguments.length?B(arguments):C,F;for(var G=0;F=E[G++];){m.replace(F[0],F[1],true)}}}function A(){var D={},B=0;function C(E){return E.cufid||(E.cufid=++B)}this.get=function(E){var F=C(E);return D[F]||(D[F]={})}}function a(B){var D={},C={};this.extend=function(E){for(var F in E){if(k(E,F)){D[F]=E[F]}}return this};this.get=function(E){return D[E]!=undefined?D[E]:B[E]};this.getSize=function(F,E){return C[F]||(C[F]=new n.Size(this.get(F),E))};this.isUsable=function(){return!!B}}function q(C,B,D){if(C.addEventListener){C.addEventListener(B,D,false)}else{if(C.attachEvent){C.attachEvent("on"+B,function(){return D.call(C,window.event)})}}}function v(C,B){var D=d.get(C);if(D.options){return C}if(B.hover&&B.hoverables[C.nodeName.toLowerCase()]){b.attach(C)}D.options=B;return C}function j(B){var C={};return function(D){if(!k(C,D)){C[D]=B.apply(null,arguments)}return C[D]}}function c(F,E){var B=n.quotedList(E.get("fontFamily").toLowerCase()),D;for(var C=0;D=B[C];++C){if(i[D]){return i[D].get(E.get("fontStyle"),E.get("fontWeight"))}}return null}function g(B){return document.getElementsByTagName(B)}function k(C,B){return C.hasOwnProperty(B)}function h(){var C={},B,F;for(var E=0,D=arguments.length;B=arguments[E],E<D;++E){for(F in B){if(k(B,F)){C[F]=B[F]}}}return C}function o(E,M,C,N,F,D){var K=document.createDocumentFragment(),H;if(M===""){return K}var L=N.separate;var I=M.split(p[L]),B=(L=="words");if(B&&t){if(/^\s/.test(M)){I.unshift("")}if(/\s$/.test(M)){I.push("")}}for(var J=0,G=I.length;J<G;++J){H=z[N.engine](E,B?n.textAlign(I[J],C,J,G):I[J],C,N,F,D,J<G-1);if(H){K.appendChild(H)}}return K}function l(D,M){var C=D.nodeName.toLowerCase();if(M.ignore[C]){return}var E=!M.textless[C];var B=n.getStyle(v(D,M)).extend(M);var F=c(D,B),G,K,I,H,L,J;if(!F){return}for(G=D.firstChild;G;G=I){K=G.nodeType;I=G.nextSibling;if(E&&K==3){if(H){H.appendData(G.data);D.removeChild(G)}else{H=G}if(I){continue}}if(H){D.replaceChild(o(F,n.whiteSpace(H.data,B,H,J),B,M,G,D),H);H=null}if(K==1){if(G.firstChild){if(G.nodeName.toLowerCase()=="cufon"){z[M.engine](F,null,B,M,G,D)}else{arguments.callee(G,M)}}J=G}}}var t=" ".split(/\s+/).length==0;var d=new A();var b=new r();var y=new u();var e=false;var z={},i={},w={autoDetect:false,engine:null,forceHitArea:false,hover:false,hoverables:{a:true},ignore:{applet:1,canvas:1,col:1,colgroup:1,head:1,iframe:1,map:1,optgroup:1,option:1,script:1,select:1,style:1,textarea:1,title:1,pre:1},printable:true,selector:(window.Sizzle||(window.jQuery&&function(B){return jQuery(B)})||(window.dojo&&dojo.query)||(window.Ext&&Ext.query)||(window.YAHOO&&YAHOO.util&&YAHOO.util.Selector&&YAHOO.util.Selector.query)||(window.$$&&function(B){return $$(B)})||(window.$&&function(B){return $(B)})||(document.querySelectorAll&&function(B){return document.querySelectorAll(B)})||g),separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"};var p={words:/\s/.test("\u00a0")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};m.now=function(){x.ready();return m};m.refresh=function(){y.repeat.apply(y,arguments);return m};m.registerEngine=function(C,B){if(!B){return m}z[C]=B;return m.set("engine",C)};m.registerFont=function(D){if(!D){return m}var B=new s(D),C=B.family;if(!i[C]){i[C]=new f()}i[C].add(B);return m.set("fontFamily",'"'+C+'"')};m.replace=function(D,C,B){C=h(w,C);if(!C.engine){return m}if(!e){n.addClass(x.root(),"cufon-active cufon-loading");n.ready(function(){n.addClass(n.removeClass(x.root(),"cufon-loading"),"cufon-ready")});e=true}if(C.hover){C.forceHitArea=true}if(C.autoDetect){delete C.fontFamily}if(typeof C.textShadow=="string"){C.textShadow=n.textShadow(C.textShadow)}if(typeof C.color=="string"&&/^-/.test(C.color)){C.textGradient=n.gradient(C.color)}else{delete C.textGradient}if(!B){y.add(D,arguments)}if(D.nodeType||typeof D=="string"){D=[D]}n.ready(function(){for(var F=0,E=D.length;F<E;++F){var G=D[F];if(typeof G=="string"){m.replace(C.selector(G),C,true)}else{l(G,C)}}});return m};m.set=function(B,C){w[B]=C;return m};return m})();Cufon.registerEngine("vml",(function(){var e=document.namespaces;if(!e){return}e.add("cvml","urn:schemas-microsoft-com:vml");e=null;var b=document.createElement("cvml:shape");b.style.behavior="url(#default#VML)";if(!b.coordsize){return}b=null;var h=(document.documentMode||0)<8;document.write(('<style type="text/css">cufoncanvas{text-indent:0;}@media screen{cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}cufoncanvas{position:absolute;text-align:left;}cufon{display:inline-block;position:relative;vertical-align:'+(h?"middle":"text-bottom")+";}cufon cufontext{position:absolute;left:-10000in;font-size:1px;}a cufon{cursor:pointer}}@media print{cufon cufoncanvas{display:none;}}</style>").replace(/;/g,"!important;"));function c(i,j){return a(i,/(?:em|ex|%)$|^[a-z-]+$/i.test(j)?"1em":j)}function a(l,m){if(m==="0"){return 0}if(/px$/i.test(m)){return parseFloat(m)}var k=l.style.left,j=l.runtimeStyle.left;l.runtimeStyle.left=l.currentStyle.left;l.style.left=m.replace("%","em");var i=l.style.pixelLeft;l.style.left=k;l.runtimeStyle.left=j;return i}function f(l,k,j,n){var i="computed"+n,m=k[i];if(isNaN(m)){m=k.get(n);k[i]=m=(m=="normal")?0:~~j.convertFrom(a(l,m))}return m}var g={};function d(p){var q=p.id;if(!g[q]){var n=p.stops,o=document.createElement("cvml:fill"),i=[];o.type="gradient";o.angle=180;o.focus="0";o.method="sigma";o.color=n[0][1];for(var m=1,l=n.length-1;m<l;++m){i.push(n[m][0]*100+"% "+n[m][1])}o.colors=i.join(",");o.color2=n[l][1];g[q]=o}return g[q]}return function(ac,G,Y,C,K,ad,W){var n=(G===null);if(n){G=K.alt}var I=ac.viewBox;var p=Y.computedFontSize||(Y.computedFontSize=new Cufon.CSS.Size(c(ad,Y.get("fontSize"))+"px",ac.baseSize));var y,q;if(n){y=K;q=K.firstChild}else{y=document.createElement("cufon");y.className="cufon cufon-vml";y.alt=G;q=document.createElement("cufoncanvas");y.appendChild(q);if(C.printable){var Z=document.createElement("cufontext");Z.appendChild(document.createTextNode(G));y.appendChild(Z)}if(!W){y.appendChild(document.createElement("cvml:shape"))}}var ai=y.style;var R=q.style;var l=p.convert(I.height),af=Math.ceil(l);var V=af/l;var P=V*Cufon.CSS.fontStretch(Y.get("fontStretch"));var U=I.minX,T=I.minY;R.height=af;R.top=Math.round(p.convert(T-ac.ascent));R.left=Math.round(p.convert(U));ai.height=p.convert(ac.height)+"px";var F=Y.get("color");var ag=Cufon.CSS.textTransform(G,Y).split("");var L=ac.spacing(ag,f(ad,Y,p,"letterSpacing"),f(ad,Y,p,"wordSpacing"));if(!L.length){return null}var k=L.total;var x=-U+k+(I.width-L[L.length-1]);var ah=p.convert(x*P),X=Math.round(ah);var O=x+","+I.height,m;var J="r"+O+"ns";var u=C.textGradient&&d(C.textGradient);var o=ac.glyphs,S=0;var H=C.textShadow;var ab=-1,aa=0,w;while(w=ag[++ab]){var D=o[ag[ab]]||ac.missingGlyph,v;if(!D){continue}if(n){v=q.childNodes[aa];while(v.firstChild){v.removeChild(v.firstChild)}}else{v=document.createElement("cvml:shape");q.appendChild(v)}v.stroked="f";v.coordsize=O;v.coordorigin=m=(U-S)+","+T;v.path=(D.d?"m"+D.d+"xe":"")+"m"+m+J;v.fillcolor=F;if(u){v.appendChild(u.cloneNode(false))}var ae=v.style;ae.width=X;ae.height=af;if(H){var s=H[0],r=H[1];var B=Cufon.CSS.color(s.color),z;var N=document.createElement("cvml:shadow");N.on="t";N.color=B.color;N.offset=s.offX+","+s.offY;if(r){z=Cufon.CSS.color(r.color);N.type="double";N.color2=z.color;N.offset2=r.offX+","+r.offY}N.opacity=B.opacity||(z&&z.opacity)||1;v.appendChild(N)}S+=L[aa++]}var M=v.nextSibling,t,A;if(C.forceHitArea){if(!M){M=document.createElement("cvml:rect");M.stroked="f";M.className="cufon-vml-cover";t=document.createElement("cvml:fill");t.opacity=0;M.appendChild(t);q.appendChild(M)}A=M.style;A.width=X;A.height=af}else{if(M){q.removeChild(M)}}ai.width=Math.max(Math.ceil(p.convert(k*P)),0);if(h){var Q=Y.computedYAdjust;if(Q===undefined){var E=Y.get("lineHeight");if(E=="normal"){E="1em"}else{if(!isNaN(E)){E+="em"}}Y.computedYAdjust=Q=0.5*(a(ad,E)-parseFloat(ai.height))}if(Q){ai.marginTop=Math.ceil(Q)+"px";ai.marginBottom=Q+"px"}}return y}})());Cufon.registerEngine("canvas",(function(){var b=document.createElement("canvas");if(!b||!b.getContext||!b.getContext.apply){return}b=null;var a=Cufon.CSS.supports("display","inline-block");var e=!a&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId));var f=document.createElement("style");f.type="text/css";f.appendChild(document.createTextNode(("cufon{text-indent:0;}@media screen,projection{cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;"+(e?"":"font-size:1px;line-height:1px;")+"}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}"+(a?"cufon canvas{position:relative;}":"cufon canvas{position:absolute;}")+"}@media print{cufon{padding:0;}cufon canvas{display:none;}}").replace(/;/g,"!important;")));document.getElementsByTagName("head")[0].appendChild(f);function d(p,h){var n=0,m=0;var g=[],o=/([mrvxe])([^a-z]*)/g,k;generate:for(var j=0;k=o.exec(p);++j){var l=k[2].split(",");switch(k[1]){case"v":g[j]={m:"bezierCurveTo",a:[n+~~l[0],m+~~l[1],n+~~l[2],m+~~l[3],n+=~~l[4],m+=~~l[5]]};break;case"r":g[j]={m:"lineTo",a:[n+=~~l[0],m+=~~l[1]]};break;case"m":g[j]={m:"moveTo",a:[n=~~l[0],m=~~l[1]]};break;case"x":g[j]={m:"closePath"};break;case"e":break generate}h[g[j].m].apply(h,g[j].a)}return g}function c(m,k){for(var j=0,h=m.length;j<h;++j){var g=m[j];k[g.m].apply(k,g.a)}}return function(V,w,P,t,C,W){var k=(w===null);if(k){w=C.getAttribute("alt")}var A=V.viewBox;var m=P.getSize("fontSize",V.baseSize);var B=0,O=0,N=0,u=0;var z=t.textShadow,L=[];if(z){for(var U=z.length;U--;){var F=z[U];var K=m.convertFrom(parseFloat(F.offX));var I=m.convertFrom(parseFloat(F.offY));L[U]=[K,I];if(I<B){B=I}if(K>O){O=K}if(I>N){N=I}if(K<u){u=K}}}var Z=Cufon.CSS.textTransform(w,P).split("");var E=V.spacing(Z,~~m.convertFrom(parseFloat(P.get("letterSpacing"))||0),~~m.convertFrom(parseFloat(P.get("wordSpacing"))||0));if(!E.length){return null}var h=E.total;O+=A.width-E[E.length-1];u+=A.minX;var s,n;if(k){s=C;n=C.firstChild}else{s=document.createElement("cufon");s.className="cufon cufon-canvas";s.setAttribute("alt",w);n=document.createElement("canvas");s.appendChild(n);if(t.printable){var S=document.createElement("cufontext");S.appendChild(document.createTextNode(w));s.appendChild(S)}}var aa=s.style;var H=n.style;var j=m.convert(A.height);var Y=Math.ceil(j);var M=Y/j;var G=M*Cufon.CSS.fontStretch(P.get("fontStretch"));var J=h*G;var Q=Math.ceil(m.convert(J+O-u));var o=Math.ceil(m.convert(A.height-B+N));n.width=Q;n.height=o;H.width=Q+"px";H.height=o+"px";B+=A.minY;H.top=Math.round(m.convert(B-V.ascent))+"px";H.left=Math.round(m.convert(u))+"px";var r=Math.max(Math.ceil(m.convert(J)),0)+"px";if(a){aa.width=r;aa.height=m.convert(V.height)+"px"}else{aa.paddingLeft=r;aa.paddingBottom=(m.convert(V.height)-1)+"px"}var X=n.getContext("2d"),D=j/A.height;X.scale(D,D*M);X.translate(-u,-B);X.save();function T(){var x=V.glyphs,ab,l=-1,g=-1,y;X.scale(G,1);while(y=Z[++l]){var ab=x[Z[l]]||V.missingGlyph;if(!ab){continue}if(ab.d){X.beginPath();if(ab.code){c(ab.code,X)}else{ab.code=d("m"+ab.d,X)}X.fill()}X.translate(E[++g],0)}X.restore()}if(z){for(var U=z.length;U--;){var F=z[U];X.save();X.fillStyle=F.color;X.translate.apply(X,L[U]);T()}}var q=t.textGradient;if(q){var v=q.stops,p=X.createLinearGradient(0,A.minY,0,A.maxY);for(var U=0,R=v.length;U<R;++U){p.addColorStop.apply(p,v[U])}X.fillStyle=p}else{X.fillStyle=P.get("color")}T();return s}})());
/*
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Copyright 1990-1992 Bitstream Inc.  All rights reserved.
 */
Cufon.registerFont({"w":179,"face":{"font-family":"Swis721 Cn BT","font-weight":400,"font-stretch":"condensed","units-per-em":"360","panose-1":"2 11 5 6 2 2 2 3 2 4","ascent":"288","descent":"-72","x-height":"5","bbox":"-14 -292 342 85","underline-thickness":"25.8398","underline-position":"-21.4453","unicode-range":"U+0020-U+007E"},"glyphs":{" ":{"w":89},"!":{"d":"32,0r0,-37r30,0r0,37r-30,0xm38,-67r-8,-127r0,-77r33,0v2,72,-4,138,-8,204r-17,0","w":93},"\"":{"d":"92,-252r0,97r-24,0r0,-97r24,0xm40,-252r0,97r-24,0r0,-97r24,0","w":107},"#":{"d":"170,-151r-45,0r-17,47r46,0xm162,-256r-28,80r45,0r29,-80r29,0r-29,80r53,0r-9,25r-53,0r-16,46r56,0r-9,26r-56,0r-29,80r-29,0r29,-80r-46,0r-28,80r-29,0r28,-80r-55,0r10,-26r54,0r16,-46r-58,0r9,-25r59,0r28,-80r29,0","w":276},"$":{"d":"80,-244v-29,2,-44,46,-26,70v5,7,14,12,26,16r0,-86xm165,-76v1,46,-25,74,-69,76r0,35r-16,0r0,-35v-48,0,-71,-36,-66,-86r29,0v-1,35,6,61,37,61r0,-101v-38,-14,-63,-30,-63,-75v0,-40,25,-65,63,-67r0,-24r16,0r0,24v41,3,62,25,61,70v-9,-1,-24,3,-29,-2v0,-26,-10,-39,-32,-43r0,91v43,17,67,27,69,76xm96,-24v36,1,50,-52,29,-78v-6,-8,-16,-14,-29,-18r0,96"},"%":{"d":"185,-22v31,2,28,-56,19,-78v-24,-25,-44,-3,-44,37v0,24,5,40,25,41xm185,0v-38,0,-49,-26,-49,-67v0,-40,13,-65,49,-65v37,0,50,26,50,65v0,39,-14,67,-50,67xm66,-157v32,0,35,-89,0,-89v-23,0,-24,19,-25,48v0,24,5,40,25,41xm66,-135v-38,0,-50,-26,-49,-68v0,-39,13,-65,48,-65v38,0,50,25,50,65v-1,39,-14,68,-49,68xm54,5r122,-277r20,0r-121,277r-21,0","w":251},"&":{"d":"102,-247v-40,3,-22,57,-5,76v27,-11,48,-70,5,-76xm88,-135v-48,18,-50,112,12,113v22,0,37,-13,47,-27xm200,-126v-2,30,-9,55,-21,73r36,53r-35,0r-18,-26v-15,18,-37,30,-67,31v-45,1,-76,-35,-75,-80v1,-42,23,-61,54,-80v-35,-33,-37,-116,28,-116v30,0,54,22,53,52v0,33,-21,52,-45,67r52,76v4,-14,8,-32,9,-50r29,0","w":220},"'":{"d":"40,-252r0,97r-24,0r0,-97r24,0","w":55},"(":{"d":"109,-271v-63,83,-57,268,0,350r-20,0v-33,-55,-56,-100,-56,-176v0,-72,23,-127,56,-174r20,0","w":114},")":{"d":"10,79v55,-83,63,-266,0,-350r20,0v34,48,56,102,56,174v0,75,-23,121,-56,176r-20,0","w":114},"*":{"d":"90,-186r-32,46r-20,-15r35,-43r-52,-14r8,-24r50,18r0,-53r21,0r0,53r50,-17r9,23r-52,14r35,43r-21,15","w":180},"+":{"d":"162,-215r0,95r93,0r0,25r-93,0r0,95r-25,0r0,-95r-92,0r0,-25r92,0r0,-95r25,0","w":299},",":{"d":"28,35v12,-3,16,-18,15,-35r-15,0r0,-37r32,0v2,40,1,82,-32,89r0,-17","w":90},"-":{"d":"16,-85r0,-32r87,0r0,32r-87,0","w":118,"k":{"Y":26,"X":13,"W":8,"V":20,"T":24}},".":{"d":"29,0r0,-37r32,0r0,37r-32,0","w":90},"\/":{"d":"102,-277r-96,310r-20,0r97,-310r19,0","w":100},"0":{"d":"90,-246v-46,7,-42,43,-42,111v0,67,-4,106,42,114v46,-9,41,-42,41,-113v0,-66,3,-104,-41,-112xm91,5v-69,0,-74,-55,-74,-139v0,-84,5,-138,73,-138v67,0,73,62,73,138v0,82,-5,139,-72,139"},"1":{"d":"27,-222v39,1,61,-14,63,-50r24,0r0,272r-29,0r0,-199r-58,0r0,-23"},"2":{"d":"159,-199v0,92,-102,95,-111,171r114,0r0,28r-144,0v-10,-88,84,-113,107,-171v13,-33,0,-77,-37,-75v-32,1,-41,28,-39,65r-29,0v-3,-55,20,-91,70,-92v44,0,69,29,69,74"},"3":{"d":"86,5v-50,0,-73,-33,-72,-86r30,0v-1,37,9,60,42,60v31,0,44,-22,45,-55v1,-39,-24,-57,-63,-52r0,-25v37,1,55,-12,55,-48v1,-27,-14,-45,-39,-45v-29,0,-37,22,-36,54r-29,0v-2,-47,23,-80,66,-80v75,0,93,113,30,128v32,6,47,28,47,67v0,51,-26,82,-76,82"},"4":{"d":"36,-95r73,0r3,-139xm109,0r0,-69r-98,0r0,-26r101,-177r26,0r0,177r25,0r0,26r-25,0r0,69r-29,0"},"5":{"d":"160,-91v0,55,-22,96,-74,96v-47,0,-70,-28,-71,-76v9,2,25,-3,30,2v0,28,13,48,40,48v33,0,44,-29,44,-66v-1,-37,-10,-65,-44,-65v-20,0,-34,10,-39,26r-25,-2r15,-140r114,0r0,28r-91,0r-10,81v5,-12,24,-21,43,-20v45,0,68,39,68,88"},"6":{"d":"91,-148v-34,0,-42,23,-42,60v0,37,12,67,44,67v31,0,42,-29,41,-66v0,-36,-11,-61,-43,-61xm128,-208v5,-42,-55,-51,-69,-16v-6,15,-12,42,-14,84v33,-66,120,-27,120,52v0,52,-24,93,-72,93v-65,0,-76,-54,-76,-129v0,-87,7,-144,78,-148v39,-2,63,26,63,64r-30,0"},"7":{"d":"163,-242v-47,64,-80,143,-87,242r-34,0v12,-97,46,-174,95,-238r-121,0r0,-30r147,0r0,26"},"8":{"d":"126,-203v0,-26,-13,-44,-37,-44v-24,1,-34,19,-34,45v0,24,11,43,34,43v25,0,36,-19,37,-44xm89,-133v-29,-1,-42,21,-42,52v0,36,11,60,43,60v29,0,42,-24,42,-55v-1,-36,-10,-56,-43,-57xm90,5v-84,0,-101,-139,-26,-151v-26,-8,-38,-25,-39,-57v-1,-42,25,-69,66,-69v72,0,87,111,25,125v32,8,47,28,47,68v1,51,-25,84,-73,84"},"9":{"d":"88,-119v32,0,42,-23,42,-60v0,-37,-11,-68,-44,-67v-31,1,-41,30,-41,66v0,36,11,61,43,61xm52,-59v-5,42,54,50,68,16v6,-14,12,-42,14,-84v-33,66,-120,27,-120,-52v0,-52,24,-93,72,-93v65,0,76,53,76,129v0,87,-7,144,-78,148v-39,2,-63,-26,-63,-64r31,0"},":":{"d":"29,-163r0,-37r32,0r0,37r-32,0xm29,0r0,-37r32,0r0,37r-32,0","w":90},";":{"d":"29,-163r0,-37r32,0r0,37r-32,0xm29,35v12,-3,16,-18,15,-35r-15,0r0,-37r32,0v2,40,0,81,-32,89r0,-17","w":90},"<":{"d":"253,-177r-170,70r170,69r0,27r-207,-85r0,-23r207,-85r0,27","w":299},"=":{"d":"255,-85r0,25r-210,0r0,-25r210,0xm255,-155r0,25r-210,0r0,-25r210,0","w":299},">":{"d":"253,-119r0,23r-207,85r0,-27r171,-69r-171,-70r0,-27","w":299},"?":{"d":"94,-277v76,0,88,95,35,140v-20,26,-28,40,-26,69r-27,0v-13,-63,54,-87,54,-140v0,-24,-13,-43,-36,-43v-28,1,-40,26,-38,59r-29,0v-1,-51,19,-85,67,-85xm74,0r0,-37r30,0r0,37r-30,0","w":178},"@":{"d":"44,-91v-7,126,165,150,246,89r10,14v-30,23,-69,40,-117,40v-96,0,-164,-49,-164,-144v0,-105,72,-166,177,-166v83,0,146,42,146,121v0,67,-35,112,-99,116v-23,1,-37,-8,-36,-31v-19,48,-108,40,-108,-27v0,-51,34,-98,84,-97v23,0,36,9,43,26r10,-20r23,0r-27,111v0,11,5,19,17,17v43,-6,66,-45,67,-92v2,-63,-54,-104,-121,-102v-93,2,-146,57,-151,145xm127,-78v0,38,40,48,64,26v18,-17,21,-47,29,-73v-3,-18,-14,-33,-35,-32v-35,0,-58,40,-58,79","w":360},"A":{"d":"63,-105r72,0r-36,-142xm5,0r74,-271r39,0r75,271r-31,0r-20,-78r-86,0r-20,78r-31,0","w":197,"k":{"y":6,"w":10,"v":8,"Y":21,"W":6,"V":6,"U":6,"T":26,";":-7,":":-7,".":-7,",":-7}},"B":{"d":"136,-202v0,-48,-37,-46,-83,-45r0,91v46,1,83,3,83,-46xm144,-76v0,-55,-38,-57,-91,-55r0,104v50,2,91,2,91,-49xm176,-78v0,49,-29,79,-78,78r-74,0r0,-271v72,-1,148,-10,143,68v-2,32,-11,52,-37,59v31,6,46,29,46,66","w":194,"k":{"Y":10,"W":6,"V":6,"-":-7}},"C":{"d":"104,-22v37,0,49,-35,48,-77r30,0v0,62,-25,106,-81,106v-68,0,-82,-61,-82,-142v0,-85,11,-140,84,-142v52,-2,78,33,77,86r-29,0v1,-34,-16,-61,-48,-59v-49,3,-52,51,-52,115v0,66,2,113,53,113","w":203,"k":{"S":-7,"-":-8}},"D":{"d":"157,-135v0,-75,-2,-107,-65,-110r-38,0r0,219r40,0v62,0,63,-47,63,-109xm190,-144v-1,83,-11,146,-96,144r-70,0r0,-271r77,0v69,1,90,50,89,127","w":209,"k":{"Y":6,"-":-7}},"E":{"d":"24,0r0,-271r134,0r0,28r-104,0r0,87r98,0r0,28r-98,0r0,100r105,0r0,28r-135,0","w":176},"F":{"d":"24,0r0,-271r125,0r0,28r-94,0r0,87r88,0r0,28r-88,0r0,128r-31,0","w":155,"k":{"u":8,"r":6,"o":8,"e":8,"a":8,"T":-7,"A":15,".":48,"-":6,",":48}},"G":{"d":"108,-22v45,0,55,-42,54,-92r-61,0r0,-27r90,0r0,141r-23,0r-2,-37v-9,25,-30,44,-62,44v-70,0,-85,-60,-85,-144v1,-86,15,-138,91,-140v49,-1,79,34,78,84r-30,0v-1,-35,-17,-58,-50,-58v-56,0,-58,51,-58,123v0,60,8,106,58,106","w":213,"k":{"T":6}},"H":{"d":"24,0r0,-271r31,0r0,112r101,0r0,-112r31,0r0,271r-31,0r0,-132r-101,0r0,132r-31,0","w":210},"I":{"d":"24,0r0,-271r31,0r0,271r-31,0","w":79},"J":{"d":"65,6v-48,1,-63,-37,-59,-90r29,0v-1,33,-1,66,31,64v32,-2,32,-20,32,-61r0,-190r29,0r0,211v0,45,-19,66,-62,66","w":151},"K":{"d":"24,0r0,-271r30,0r0,131r98,-131r35,0r-84,110r90,161r-37,0r-74,-135r-28,37r0,98r-30,0","w":195,"k":{"y":10,"u":6,"o":6,"e":6,"Y":10,"W":6,"U":8,"T":6,"O":10,"C":10,"-":23}},"L":{"d":"24,0r0,-271r30,0r0,242r108,0r0,29r-138,0","w":171,"k":{"y":6,"Y":38,"W":24,"V":31,"U":6,"T":43,"O":20,"A":-7,"-":29}},"M":{"d":"212,0r0,-255r-66,255r-30,0r-63,-255r0,255r-29,0r0,-271r51,0r56,231r60,-231r50,0r0,271r-29,0","w":265},"N":{"d":"24,0r0,-271r41,0r93,233r-2,-233r29,0r0,271r-39,0r-95,-239r2,239r-29,0","w":208},"O":{"d":"105,-250v-54,0,-55,46,-55,115v0,69,1,115,55,115v55,0,56,-44,56,-115v0,-72,0,-115,-56,-115xm105,7v-72,0,-86,-56,-86,-142v1,-86,12,-142,86,-142v74,0,87,55,87,142v0,88,-12,142,-87,142","w":210,"k":{"Y":6,".":13,"-":-7,",":13}},"P":{"d":"147,-195v0,-51,-42,-52,-93,-50r0,104v52,3,93,0,93,-54xm179,-195v0,69,-50,87,-125,81r0,114r-30,0r0,-271v80,-2,155,-6,155,76","w":190,"k":{"s":8,"r":6,"o":11,"n":6,"e":11,"a":11,"A":24,".":81,"-":18,",":81}},"Q":{"d":"50,-135v0,77,6,122,74,113v5,-2,9,-5,13,-8r-28,-24r17,-20r26,21v6,-23,10,-48,9,-79v-3,-74,1,-113,-56,-118v-53,6,-55,45,-55,115xm192,-135v0,41,-3,80,-17,103r30,24r-16,21r-30,-24v-11,12,-30,18,-54,18v-72,0,-86,-56,-86,-142v1,-86,12,-142,86,-142v74,0,87,55,87,142","w":210},"R":{"d":"152,-197v0,-52,-48,-48,-98,-47r0,97v51,2,98,1,98,-50xm183,-201v-2,38,-18,58,-50,66v41,3,47,36,49,81v1,30,6,48,14,54r-37,0v-11,-20,-2,-98,-24,-110v-12,-13,-53,-10,-81,-10r0,120r-30,0r0,-271v77,-1,162,-9,159,70","w":210,"k":{"y":6,"u":6,"o":6,"e":6,"a":6,"V":6,"T":13,"C":6,"A":6,".":6,",":6}},"S":{"d":"94,6v-55,0,-79,-34,-76,-92r29,0v-2,41,12,63,51,65v42,3,62,-50,40,-80v-21,-28,-99,-30,-110,-69v-16,-54,10,-107,68,-107v46,0,75,29,70,76r-27,0v0,-30,-13,-48,-43,-50v-40,-3,-59,46,-37,73v22,28,107,31,111,71v18,59,-13,113,-76,113","w":193,"k":{"S":-7}},"T":{"d":"74,0r0,-243r-69,0r0,-28r165,0r0,28r-65,0r0,243r-31,0","w":174,"k":{"y":33,"w":41,"u":28,"s":33,"r":26,"o":33,"e":33,"c":33,"a":33,"T":-8,"A":26,";":29,":":29,".":44,"-":21,",":44}},"U":{"d":"102,6v-59,0,-78,-30,-78,-100r0,-177r31,0r0,182v0,45,7,68,47,68v40,0,52,-26,52,-68r0,-182r29,0r0,177v3,70,-22,100,-81,100","w":207,"k":{"A":6}},"V":{"d":"77,0r-76,-271r33,0r61,234r62,-234r31,0r-75,271r-36,0","w":188,"k":{"u":8,"o":15,"e":15,"a":15,"A":6,";":11,":":11,".":40,"-":18,",":40}},"W":{"d":"62,0r-58,-271r32,0r42,229r48,-229r34,0r47,227r43,-227r30,0r-57,271r-33,0r-47,-221r-48,221r-33,0","w":284,"k":{"o":8,"e":8,"a":8,"A":6,".":23,"-":10,",":23}},"X":{"d":"-4,0r75,-140r-72,-131r37,0r54,103r54,-103r35,0r-73,130r76,141r-36,0r-57,-113r-58,113r-35,0","w":177,"k":{"C":6,"-":10}},"Y":{"d":"75,0r0,-105r-80,-166r36,0r59,134r63,-134r33,0r-81,166r0,105r-30,0","w":180,"k":{"u":23,"o":26,"e":26,"a":26,"O":6,"C":6,"A":21,";":13,":":13,".":53,"-":24,",":53}},"Z":{"d":"8,0r0,-28r109,-215r-103,0r0,-28r135,0r0,28r-108,214r110,0r0,29r-143,0","w":159},"[":{"d":"41,76r0,-347r64,0r0,22r-35,0r0,303r35,0r0,22r-64,0","w":114},"\\":{"d":"97,33r-97,-310r20,0r96,310r-19,0","w":100},"]":{"d":"74,76r-64,0r0,-22r35,0r0,-303r-35,0r0,-22r64,0r0,347","w":114},"^":{"d":"196,-256r90,98r-32,0r-74,-74r-75,74r-31,0r89,-98r33,0","w":360},"_":{"d":"180,60r0,25r-180,0r0,-25r180,0","w":180},"`":{"d":"111,-224r-17,0r-44,-48r31,0","w":180},"a":{"d":"70,-20v40,0,40,-46,38,-89v-15,17,-69,16,-64,57v2,18,8,33,26,32xm136,-35v0,12,5,15,17,14r0,21v-23,8,-44,-4,-43,-27v-8,18,-23,32,-48,32v-47,0,-57,-65,-35,-96v9,-23,96,-22,81,-69v0,-17,-11,-25,-30,-24v-22,0,-31,11,-30,35r-27,0v1,-42,18,-57,60,-59v82,-5,55,103,55,173","w":160},"b":{"d":"87,-182v-36,3,-39,32,-39,79v0,48,3,78,40,82v34,-5,37,-37,37,-84v0,-43,-5,-73,-38,-77xm92,4v-22,0,-39,-12,-44,-29r0,25r-26,0r0,-271r28,0r0,90v4,-15,23,-27,44,-26v46,2,63,44,62,99v0,61,-13,112,-64,112","w":172},"c":{"d":"86,-20v25,0,33,-23,34,-51r27,0v0,45,-20,76,-64,76v-53,0,-66,-46,-66,-108v0,-62,14,-105,68,-105v39,0,62,28,61,69r-28,0v-1,-25,-10,-43,-32,-43v-37,0,-39,33,-39,80v0,48,2,82,39,82","w":165},"d":{"d":"85,-21v36,-4,39,-35,39,-82v0,-47,-2,-79,-38,-79v-34,0,-39,35,-39,77v0,47,3,80,38,84xm78,-207v21,-1,40,10,44,26r0,-90r28,0r0,271r-26,0r0,-25v-5,17,-22,29,-44,29v-50,0,-64,-52,-64,-112v-1,-55,16,-96,62,-99","w":171},"e":{"d":"114,-123v0,-34,-4,-62,-33,-62v-29,0,-36,27,-36,62r69,0xm82,-18v23,0,32,-24,32,-50r28,0v0,44,-21,73,-62,73v-53,0,-64,-43,-64,-104v0,-64,10,-108,64,-109v54,-1,66,50,62,108r-97,0v0,43,2,82,37,82","w":158},"f":{"d":"89,-246v-30,-7,-34,16,-31,44r31,0r0,23r-31,0r0,179r-29,0r0,-179r-28,0r0,-23r28,0v-5,-48,10,-78,60,-69r0,25","w":93,"k":{"y":-7,"t":-13,".":13,"-":-7,",":13}},"g":{"d":"83,-183v-34,0,-37,37,-37,82v0,45,3,79,38,79v37,0,39,-33,39,-81v0,-45,-4,-80,-40,-80xm81,68v-32,1,-59,-19,-59,-49r28,0v1,17,15,24,33,25v35,0,42,-31,39,-68v-7,17,-22,28,-45,27v-51,-2,-60,-49,-61,-110v0,-57,15,-98,64,-100v22,0,38,11,43,28r0,-23r27,0r0,193v0,48,-23,76,-69,77","w":171},"h":{"d":"91,-181v-25,0,-42,18,-41,44r0,137r-28,0r0,-271r28,0r0,91v16,-39,98,-37,98,19r0,161r-28,0r0,-147v0,-23,-8,-33,-29,-34","w":169},"i":{"d":"21,-234r0,-37r29,0r0,37r-29,0xm21,0r0,-202r29,0r0,202r-29,0","w":71},"j":{"d":"26,-234r0,-37r28,0r0,37r-28,0xm54,20v0,35,-14,49,-50,48v1,-7,-2,-18,1,-24v19,-1,21,-6,21,-27r0,-219r28,0r0,222","w":74},"k":{"d":"22,0r0,-271r27,0r0,160r69,-91r33,0r-60,76r65,126r-35,0r-50,-100r-22,28r0,72r-27,0","w":152},"l":{"d":"21,0r0,-271r28,0r0,271r-28,0","w":70},"m":{"d":"48,-178v13,-35,87,-42,97,0v18,-42,103,-39,103,21r0,157r-29,0r0,-140v-1,-29,-3,-41,-29,-42v-23,0,-41,18,-41,41r0,141r-29,0r0,-141v0,-27,-7,-41,-29,-41v-23,0,-43,16,-42,40r0,142r-27,0r0,-202r26,0r0,24","w":268},"n":{"d":"91,-181v-26,0,-41,18,-41,44r0,137r-28,0r0,-202r26,0r0,25v10,-19,25,-30,51,-30v38,0,49,19,49,60r0,147r-28,0r0,-149v0,-22,-9,-31,-29,-32","w":169},"o":{"d":"87,5v-58,0,-70,-41,-71,-106v0,-63,15,-107,71,-107v56,0,72,42,71,107v-1,65,-14,106,-71,106xm87,-183v-39,0,-41,33,-41,82v0,49,2,82,41,82v38,0,40,-34,40,-82v0,-49,-1,-82,-40,-82","w":173},"p":{"d":"88,-182v-36,4,-39,33,-39,80v0,45,6,77,40,81v34,-3,36,-36,36,-81v0,-46,-3,-76,-37,-80xm94,4v-21,1,-36,-12,-43,-26r0,90r-29,0r0,-270r27,0r0,25v3,-17,22,-31,43,-30v50,1,64,46,64,105v-1,61,-10,104,-62,106","w":171},"q":{"d":"82,-21v34,-4,40,-36,40,-81v0,-47,-3,-75,-39,-80v-34,4,-37,35,-37,80v0,45,3,77,36,81xm80,-207v20,-1,39,13,42,30r0,-25r28,0r0,270r-29,0r0,-90v-7,14,-22,27,-44,26v-52,-2,-62,-45,-62,-106v0,-59,15,-103,65,-105","w":171},"r":{"d":"107,-176v-33,-12,-57,17,-57,52r0,124r-28,0r0,-202r26,0r0,33v8,-24,27,-43,59,-37r0,30","w":104,"k":{"z":-13,"y":-13,"x":-13,"w":-13,"v":-13,"u":-13,"t":-27,"r":-7,"n":-7,"m":-7,"h":-7,"f":-20,";":-7,":":-7,".":33,"-":13,",":33}},"s":{"d":"76,5v-42,0,-61,-23,-60,-66v9,3,28,-7,28,7v0,22,13,34,36,34v21,0,36,-12,35,-33v-3,-50,-103,-33,-95,-99v4,-35,21,-56,58,-56v40,0,61,18,60,59r-27,0v-1,-22,-8,-35,-31,-35v-31,0,-46,35,-25,52v26,22,92,20,89,74v-3,41,-26,63,-68,63","w":159},"t":{"d":"87,3v-30,4,-61,0,-61,-31r0,-151r-28,0r0,-23r28,0r0,-54r28,0r0,54r33,0r0,23r-33,0r0,137v-2,21,13,23,33,20r0,25","w":88},"u":{"d":"74,-20v71,-3,34,-116,43,-182r29,0r0,202r-26,0r0,-26v-7,19,-26,32,-51,31v-35,0,-48,-17,-48,-52r0,-155r29,0r0,156v1,15,8,26,24,26","w":169},"v":{"d":"60,0r-54,-202r31,0r39,158r42,-158r29,0r-56,202r-31,0","w":153,"k":{".":26,",":26}},"w":{"d":"59,0r-51,-202r29,0r37,161r31,-161r29,0r35,162r35,-162r28,0r-49,202r-28,0r-35,-157r-31,157r-30,0","w":239,"k":{".":23,"-":-7,",":23}},"x":{"d":"-3,0r57,-105r-53,-97r32,0r39,72r40,-72r31,0r-54,95r59,107r-33,0r-44,-82r-42,82r-32,0","w":145},"y":{"d":"91,9v-10,45,-29,66,-77,56r0,-26v30,12,45,-8,52,-37r-60,-204r31,0r43,163r45,-163r29,0","w":159,"k":{".":26,",":26}},"z":{"d":"8,0r0,-26r87,-151r-83,0r0,-25r117,0r0,22r-89,153r91,0r0,27r-123,0","w":139},"{":{"d":"79,-197v-3,-55,22,-63,73,-63r0,27v-84,-17,-3,133,-78,140v42,5,36,52,36,100v0,35,9,40,42,40r0,26v-52,1,-76,-8,-73,-63v2,-48,5,-101,-49,-90r0,-27v52,10,51,-39,49,-90","w":180},"|":{"d":"103,-275r0,360r-26,0r0,-360r26,0","w":180},"}":{"d":"28,-260v50,0,76,8,73,63v-2,48,-4,101,50,90r0,27v-52,-10,-52,39,-50,90v3,55,-21,64,-73,63r0,-26v85,17,5,-132,78,-140v-41,-6,-35,-52,-35,-100v0,-34,-10,-40,-43,-40r0,-27","w":180},"~":{"d":"269,-108v-33,26,-76,32,-122,12v-51,-22,-80,-8,-116,17r0,-28v20,-13,40,-24,68,-25v32,-1,75,24,102,24v29,0,46,-11,68,-27r0,27","w":299},"\u00a0":{"w":89}}});(function($){$.anythingSlider=function(el,options){var base=this;base.$el=$(el);base.el=el;base.currentPage=1;base.timer=null;base.playing=false;base.$el.data("AnythingSlider",base);base.init=function(){base.options=$.extend({},$.anythingSlider.defaults,options);base.$wrapper=base.$el.find('> div').css('overflow','hidden');base.$slider=base.$wrapper.find('> ul');base.$items=base.$slider.find('> li');base.$single=base.$items.filter(':first');base.singleWidth=base.$single.outerWidth();base.pages=base.$items.length;if(base.pages===1){base.options.autoPlay=false;}
base.buildNavigation();var $itemClone=base.$items.filter(':last').clone().addClass('cloned');if($itemClone.attr("id")!=""){base.$items.filter(':first').before($itemClone.attr('id',($itemClone.attr('id')+"-cloned")));}else{base.$items.filter(':first').before($itemClone);}
$itemClone=base.$items.filter(':first').clone().addClass('cloned');if($itemClone.attr("id")!=''){base.$items.filter(':last').after($itemClone.attr('id',($itemClone.attr('id')+"-cloned")));}else{base.$items.filter(':last').after($itemClone);}
base.$items=base.$slider.find('> li');if(base.pages>1){base.buildNextBackButtons();}
if(base.options.autoPlay){base.playing=!base.options.startStopped;base.buildAutoPlay();};if(base.options.pauseOnHover){base.$el.hover(function(){base.clearTimer();},function(){base.startStop(base.playing);});}
if((base.options.hashTags==true&&!base.gotoHash())||base.options.hashTags==false){base.setCurrentPage(1);};};base.gotoPage=function(page,autoplay){if(autoplay!==true)autoplay=false;if(!autoplay)base.startStop(false);if(typeof(page)=="undefined"||page==null){page=1;base.setCurrentPage(1);};if(page>base.pages+1)page=base.pages;if(page<0)page=1;var dir=page<base.currentPage?-1:1,n=Math.abs(base.currentPage-page),left=base.singleWidth*dir*n;base.$wrapper.filter(':not(:animated)').animate({scrollLeft:'+='+left},base.options.animationTime,base.options.easing,function(){if(page==0){base.$wrapper.scrollLeft(base.singleWidth*base.pages);page=base.pages;}else if(page>base.pages){base.$wrapper.scrollLeft(base.singleWidth);page=1;};base.setCurrentPage(page);});};base.setCurrentPage=function(page,move){if(base.options.buildNavigation){base.$nav.find('.cur').removeClass('cur');$(base.$navLinks[page-1]).addClass('cur');};if(move!==false)base.$wrapper.scrollLeft(base.singleWidth*page);base.currentPage=page;};base.goForward=function(autoplay){if(autoplay!==true)autoplay=false;base.gotoPage(base.currentPage+1,autoplay);};base.goBack=function(){base.gotoPage(base.currentPage-1);};base.gotoHash=function(){if(/^#?panel-\d+$/.test(window.location.hash)){var index=parseInt(window.location.hash.substr(7));var $item=base.$items.filter(':eq('+index+')');if($item.length!=0){base.setCurrentPage(index);return true;};};return false;};base.buildNavigation=function(){base.$nav=$("<div class='thumbNav'><ul/></div>").prependTo(base.$el);if(base.options.buildNavigation&&(base.pages>1)){base.$items.each(function(i,el){var index=i+1;var $a=$("<a href='#'></a>");if(typeof(base.options.navigationFormatter)=="function"){$a.html(base.options.navigationFormatter(index,$(this)));}else{$a.text(index);}
$a.click(function(e){base.gotoPage(index);if(base.options.hashTags)base.setHash('panel-'+index);e.preventDefault();});$("ul",base.$nav).append($a);$a.wrap("<li />");});base.$navLinks=base.$nav.find('li > a');}};base.buildNextBackButtons=function(){var $forward=$('<li class="arrow forward"><a href="#">'+base.options.forwardText+'</a></li>'),$back=$('<li class="arrow back"><a href="#">'+base.options.backText+'</a></li>');$back.click(function(e){base.goBack();e.preventDefault();});$forward.click(function(e){base.goForward();e.preventDefault();});$("ul",base.$nav).prepend($back).append($forward);};base.buildAutoPlay=function(){base.$startStop=$("<a href='#' class='start-stop'></a>").html(base.playing?base.options.stopText:base.options.startText);base.$el.prepend(base.$startStop);base.$startStop.click(function(e){base.startStop(!base.playing);e.preventDefault();});base.startStop(base.playing);};base.startStop=function(playing){if(playing!==true)playing=false;base.playing=playing;if(base.options.autoPlay)base.$startStop.toggleClass("playing",playing).html(playing?base.options.stopText:base.options.startText);if(playing){base.clearTimer();base.timer=window.setInterval(function(){base.goForward(true);},base.options.delay);}else{base.clearTimer();};};base.clearTimer=function(){if(base.timer)window.clearInterval(base.timer);};base.setHash=function(hash){if(typeof window.location.hash!=='undefined'){if(window.location.hash!==hash){window.location.hash=hash;};}else if(location.hash!==hash){location.hash=hash;};return hash;};base.init();};$.anythingSlider.defaults={easing:"swing",autoPlay:false,startStopped:false,delay:3000,animationTime:600,hashTags:true,buildNavigation:true,pauseOnHover:true,startText:"Start",stopText:"Stop",navigationFormatter:null,forwardText:"&gt;",backText:"&lt;"};$.fn.anythingSlider=function(options){if(typeof(options)=="object"){return this.each(function(i){(new $.anythingSlider(this,options));options.hashTags=false;});}else if(typeof(options)=="number"){return this.each(function(i){var anySlide=$(this).data('AnythingSlider');if(anySlide){anySlide.gotoPage(options);}});}};})(jQuery);jQuery.extend(jQuery.easing,{easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});var active_tab='ovrw_menutab';var active_div='ovrw-content';var current_product_code,current_colour_code,current_size,current_location;function init_product(){window.active_tab='ovrw_menutab';window.active_div='ovrw-content';$('#view-flash').flash({src:'{/literal}/images/product/{$product.product_code}/{$product.product_3d_flash}{literal}',width:300,height:300},{expressInstall:true});sp_fetch_colours();$("#product_size").addOption("-9","select a colour");$("#product_store").addOption("-9","select a colour");$("#location").addOption("-9","select a colour");}
function showRequest(formData,jqForm,options){var queryString=$.param(formData);alert('About to submit: \n\n'+queryString);return true;}
function showTab(id){var obj=document.getElementById(id+'_menutab');if(obj!=null){toggle_tab(obj);}
delete obj;}
function toggle_tab(obj){$('#'+window.active_tab).removeClass('active');$('#'+obj.id).addClass('active');window.active_tab=obj.id;$('#'+obj.id).blur();$('#'+window.active_div).css('display','none');window.active_div=obj.id.replace('_menutab','-content');$('#'+window.active_div).css('display','block');}
function sp_fetch_colours(){current_product_code=$("#product_code").val();$("#product_colour").removeOption(/./);$("#product_colour").addOption("-1","loading ...");$("#product_colour").addOption("-9","select a colour");$("#product_colour")[0].selectedIndex=0;$("#product_colour").ajaxAddOption("/remote/get_colour.php",{product_code:current_product_code},null,sp_sizes_loaded);}
function sp_sizes_loaded(){$("#product_colour").removeOption(/-1/);$("#product_colour")[0].selectedIndex=0;}
function sp_fetch_sizes(){current_colour_code=$("#product_colour")[0].options[$("#product_colour")[0].selectedIndex].value;if(current_colour_code==-9){$("#product_size").removeOption(/./);$("#product_size").addOption("-9","select a colour");$("#product_store").removeOption(/./);$("#product_store").addOption("-9","select a colour");$("#location").removeOption(/./);$("#location").addOption("-9","select a colour");return false;}
$("#product_size").removeOption(/./);$("#product_size").addOption("-1","loading ...");$("#product_size").addOption("-9","select a size");$("#product_size")[0].selectedIndex=0;$("#location").removeOption(/./);$("#location").addOption("-9","select a size");$("#product_store").removeOption(/./);$("#product_store").addOption("-9","select a size");$("#product_size").ajaxAddOption("/remote/get_size.php",{product_code:current_product_code,fk_colour_code:current_colour_code},null,sp_colours_loaded);}
function sp_colours_loaded(){$("#product_size").removeOption(/-1/);$("#product_size")[0].selectedIndex=0;}
function sp_fetch_locations(){current_size=$("#product_size")[0].options[$("#product_size")[0].selectedIndex].value;$("#location").removeOption(/./);$("#location").addOption("-1","loading ...");$("#location").addOption("-9","select a location");$("#location")[0].selectedIndex=0;$("#product_store").removeOption(/./);$("#product_store").addOption("-9","select a location");$("#location").ajaxAddOption("/remote/get_location.php",{product_code:current_product_code,fk_colour_code:current_colour_code,stock_size:current_size},null,sp_locations_loaded);}
function sp_locations_loaded(){$("#location").removeOption(/-1/);$("#location")[0].selectedIndex=0;}
function sp_fetch_stores(){current_location=$("#location")[0].options[$("#location")[0].selectedIndex].value;$("#product_store").removeOption(/./);$("#product_store").addOption("-1","loading ...");$("#product_store").addOption("-9","select a store");$("#product_store")[0].selectedIndex=0;$("#product_store").ajaxAddOption("/remote/get_store.php",{product_code:current_product_code,fk_colour_code:current_colour_code,stock_size:current_size,fk_location_id:current_location},null,sp_stores_loaded);}
function sp_stores_loaded(){$("#product_store").removeOption(/-1/);$("#product_store")[0].selectedIndex=0;}
function get_store_details(){current_store=$("#product_store")[0].options[$("#product_store")[0].selectedIndex].value;if(current_store!=-9){$("#store-detail").load("/remote/get_store_detail.php",{store_number:current_store});}}var requiredForAddToCart='';var colourCode='';var sizeCode='';var qtyCode='';var countColour=0;function removeDHTMLSelectBox(Field){$(Field+'_input').remove();$(Field+'_container').remove();}
function resetSelect(){colourCode=$('#product_colour_online').val();sizeCode=$('#product_size_online').val();qtyCode=$('#product_qty_online').val();requiredForAddToCart='';if(qtyCode==''){qtycode='';$('#product_qty_online')[0].selectedIndex=0;requiredForAddToCart='quantity';}
if(sizeCode==''){qtycode='';$('#product_size_online')[0].selectedIndex=0;$('#product_qty_online')[0].selectedIndex=0;requiredForAddToCart='size';}
if(colourCode==''){sizeCode='';qtycode='';$('#product_colour_online')[0].selectedIndex=0;$('#product_size_online')[0].selectedIndex=0;$('#product_qty_online')[0].selectedIndex=0;requiredForAddToCart='colour';}}
function getColour(){resetSelect();$('#product_colour_online').dropdown({url:'/remote/get_colour.php',dataType:'json',params:{success:'1',product_code:productCode,fk_colour_code:colourCode},firstoption:{id:'',name:'- Select a colour -'},success:function(){$('#product_size_online').trigger('change');var colourCount=$('#product_colour_online option').length-1;window.countColour=colourCount;if(colourCount>0){colourCode=$('#product_colour_online :selected').attr('value');if(colourCode!==null&&colourCode!==''){getSize();}}
delete colourCount;}});}
function getSize(){resetSelect();$('#addToCartForm').ajaxSubmit({url:'/remote/get_colour_value.php',type:'post',dataType:'json',success:function(json){jsonData=eval(json);if(jsonData['colourLeft']!=null&&jsonData['colourRight']!=null){if(jsonData['colourLeft']!=''&&jsonData['colourRight']!=''){$('#colourBlockLeft').css('background-color',jsonData['colourLeft']);$('#colourBlockRight').css('background-color',jsonData['colourRight']);}}}});$('#product_size_online').dropdown({url:'/remote/get_size.php',type:'get',dataType:'json',params:{success:'1',product_code:productCode,fk_colour_code:colourCode},firstoption:{id:'',name:'- Select a size -'},success:function(){$('#product_qty_online').trigger('change');var sizeCount=$('#product_size_online option').length-1;if(sizeCount>0){getQuantity();}
delete sizeCount;}});}
function getQuantity(){resetSelect();$('#product_qty_online').dropdown({url:'/remote/get_quantity.php',dataType:'json',params:{success:'1',product_code:productCode,colour_code:colourCode,product_size:sizeCode},firstoption:{id:'',name:'- Select a quantity -'},success:function(json){jsonData=eval(json);requiredForAddToCart='';$('#qty').val(0);if(jsonData!=null){if(jsonData['qty']!=null&&jsonData['qty']!=''){$('#qty').val(jsonData['qty']);}}}});}
function addToCart(){resetSelect();$('#productOnlineMessage').html('');$('#productOnlineMessage').hide();$('#item_added').hide();if(requiredForAddToCart==''){$('#addToCartForm').ajaxSubmit({url:'/remote/ajax_add_to_cart.php',params:{product_code:productCode,product_colour:colourCode,product_size:sizeCode,product_quantity:qtyCode},dataType:'json',method:'post',success:function(json){$('#productOnlineMessage').html('');$('#productOnlineMessage').hide();if(json!=null){jsonData=eval(json);if(jsonData['message']!=null&&jsonData['message']!=''){$('#productOnlineMessage').html(jsonData['message']);$('#productOnlineMessage').show();}
if(jsonData['success']!=null&&jsonData['totalQty']!=null&&jsonData['totalAmount']!=null){if(jsonData['success']==true||jsonData['success']=='true'){updateTopCartTotals(jsonData.totalQty,jsonData.totalAmount);$('#popupCartProductSum').html(jsonData.totalQty);$('#popupProductNormalPrice').html(currencyFormatted(jsonData.totalAmount));if(jsonData['totalQty']!=null&&jsonData['totalQty']!=''){if(!isNaN(jsonData['totalQty'])){if(parseFloat(jsonData['totalQty'])>0){$('#item_added').show();}}}}}}}});}else{$('#productOnlineMessage').html('Product '+requiredForAddToCart+' is missing');$('#productOnlineMessage').show();}}
(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;};})(jQuery);(function($){$.fn.dropdown=function(options){var defaults={url:null,selected:null,params:null,data:null,firstoption:null,refresh:false,success:null};options=$.extend({},defaults,options);this.each(function(){var el=this;if(options.url!=null){$.getJSON(options.url,options.params,function(json){options.data=json.data;$(this).dropdown.populateData(el,options);if(options.success!=null){options.success();}});}});return this;}
$.fn.dropdown.populateData=function(el,options){var data=options.data;var firstoption=options.firstoption;var selected=(options.selected!=null)?options.selected.split(','):new Array();if(typeof(firstoption)=='object'){el.length=1;el.options[0].value=firstoption.id;el.options[0].text=firstoption.name;}else{el.length=0;}
if(data!=null||data!=undefined){for(var i=0;i<data.length;i++){el.length++;el.options[el.length-1].value=data[i].id;el.options[el.length-1].text=data[i].name;for(var j=0;j<selected.length;j++){if(selected[j]==el.options[el.length-1].value)el.options[el.length-1].selected=true;}}}}})(jQuery);function cufonReplace(){Cufon.replace('.swiss',{fontFamily:'Swis721 Cn BT'});}
function updateTopCartTotals(totalQty,totalAmount){if(totalQty!=null&&totalAmount!=null){if(!isNaN(totalQty)&&!isNaN(totalAmount)){var qtyText=totalQty+' item';if(totalQty!=1)qtyText+='s';$('#topCartTotalQty').html(qtyText);$('#topCartTotalAmount').html('R'+currencyFormatted(totalAmount));}}}
function show_map(){var obj=document.getElementById('dialogStoreLocator');if(obj==null||typeof(obj)=='undefined'){alert('Error: Cannot open lightbox');}else{$('#dialogStoreLocator').html('');$('#dialogStoreLocator').jqm({ajax:'/store_locator/map/default.php'});$('#dialogStoreLocator').jqmShow();}
delete obj;}
function show_subscribe(){var obj=document.getElementById('dialogSubscribe');if(obj==null||typeof(obj)=='undefined'){alert('Error: Cannot open lightbox');}else{$('#dialogSubscribe').html('');$('#dialogSubscribe').jqm({ajax:'/newsletter/default.php'});$('#dialogSubscribe').jqmShow();}
delete obj;}
function submit_subscribe(){formvalid=true;subscriber_name=document.forms.subscribe.subscriber_name.value;subscriber_email=document.forms.subscribe.subscriber_email.value;if(subscriber_name==''||subscriber_email==''){alert('Please enter both your full name and your email address.');return false;}
if(!checkEmail(subscriber_email)){alert('Please enter a valid email address.');return false;}
$('#subscribe').ajaxSubmit(function(data){$('#results').html(data);});}
function checkEmail(param_email){var testresults=false;if(param_email!=''){var str=param_email;var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;if(filter.test(str)){testresults=true;}}
return testresults;}
function close_modal(){$('#dialogSubscribe').html('');$('#dialogSubscribe').jqmHide();$('#dialogStoreLocator').jqmHide();}
function submitRegister(formName){if(formName!=null&&formName!=''){$('#'+formName+'Message').show();$('#'+formName+'Message').html('Processing...');$('#'+formName).validate();if($('#'+formName).valid()){$('#'+formName).ajaxSubmit({url:'/remote/ajax_register.php',type:'post',dataType:'json',success:function(json){jsonData=eval(json);$('#'+formName+'Message').html('Response received...');if(jsonData['message']!=null&&jsonData['message']!=''){$('#'+formName+'Message').html(jsonData['message']);}
if(jsonData['captcha']!=null&&jsonData['captcha']!=''){if(jsonData['captcha']=='false'||jsonData['captcha']==false){resetSecurityNumber('verifyImage');$('#register_verification_code').val('');}}
if(jsonData['success']!=null&&(jsonData['success']==true||jsonData['success']=='true')){$('#'+formName+'Message').html('Registration successful');if(redirectUrl==null||redirectUrl=='')redirectUrl='/';if(redirectUrl!=null&&redirectUrl!=''){$('#'+formName+'Message').html('Registration successful, reloading...');top.location.href=redirectUrl;}}
return false;}});}else{$('#'+formName+'Message').html('Validation failed');}}
return false;}
var processingLogin=false;function submitLogin(formName,redirectUrl){if(formName!=null&&formName!=''){$('#'+formName).validate();$('#'+formName+'Message').html('');$('#'+formName+'Message').hide();if($('#'+formName).valid()){if(!processingLogin){processingLogin=true;$('#'+formName+'Message').html('Processing...');$('#'+formName+'Message').show();$('#'+formName).ajaxSubmit({url:'/remote/ajax_login.php',type:'post',dataType:'json',success:function(json){processingLogin=false;jsonData=eval(json);$('#'+formName+'Message').html('');$('#'+formName+'Message').hide();if(jsonData['message']!=null&&jsonData['message']!=''){$('#'+formName+'Message').html(jsonData['message']);$('#'+formName+'Message').show();}
if(jsonData['success']!=null&&jsonData['success']==true){if(redirectUrl!=null&&redirectUrl!=''){$('#'+formName+'Message').html('Redirecting...');$('#'+formName+'Message').show();top.location.href=redirectUrl;}else{$('#'+formName+'Message').html('Reloading...');$('#'+formName+'Message').show();top.location.reload();}}}});}else{$('#'+formName+'Message').html('Busy processing, please wait');$('#'+formName+'Message').show();}}}}
var processingPassword=false;function submitForgotPassword(formName){if(formName!=null&&formName!=''){if($('#'+formName)!=null){$('#'+formName+'Message').html('Processing...');$('#'+formName+'Message').show();if(!processingPassword){processingPassword=true;$('#'+formName).ajaxSubmit({url:'/remote/ajax_forgot_password.php',type:'post',dataType:'json',success:function(json){processingPassword=false;jsonData=eval(json);$('#'+formName+'Message').html('');$('#'+formName+'Message').hide();if(jsonData['message']!=null&&jsonData['message']!=''){if($('#'+formName+'Message')!=null){$('#'+formName+'Message').html(jsonData['message']);$('#'+formName+'Message').show();}}}});}else{$('#'+formName+'Message').html('Already processing, please wait');$('#'+formName+'Message').show();}}else{alert(formName+' does not seem to exist');}}else{alert('No form ID specified');}}
function toggleLogin(){$('#windowLoginFormMessage').html('');$('#windowLogin').toggle();}
function showLogin(){$('#windowLoginFormMessage').html('');$('#windowLogin').show();}
function hideLogin(){$('#windowLogin').hide();}
function logout(){$.ajax({url:'/remote/ajax_logout.php',type:'get',dataType:'json',success:function(json){document.location.href=document.location.href;},error:function(json){alert('Error: Ajax call failed');}});}
var jqmProduct=false;var jqmProductPreloaded=null;function show_product(code){$("#dialogProduct").html('');$('#dialogProduct').jqm({overlay:70});$("#dialogProduct").load("/product/default.php",{pc:code});window.jqmProductPreloaded=code;window.jqmProduct=true;$('#dialogProduct').jqmShow();}
function hide_product(){$('#dialogProduct').jqmHide();$("#dialogProduct").html('');window.jqmProduct=false;window.jqmProductPreloaded=null;}
function preload_product_lightbox(code){}
var jqmTerms=false;function showTerms(){if(!window.jqmTerms){$('#dialogTerms').jqm({overlay:70});$('#dialogTerms').load('/terms_online/default.php');window.jqmTerms=true;}
$('#dialogTerms').jqmShow();}
function hideTerms(){if(window.jqmTerms){$('#dialogTerms').jqmHide();}}
var jqmRepairs=false;function showRepairs(){if(!window.jqmRepairs){$('#dialogRepairs').jqm({overlay:70});$('#dialogRepairs').load('/repairs/default.php');window.jqmRepairs=true;}
$('#dialogRepairs').jqmShow();}
function hideRepairs(){if(window.jqmRepairs){$('#dialogRepairs').jqmHide();window.jqmRepairs=false;}}
var jqmReturns=false;function showReturns(){if(!window.jqmReturns){$('#dialogReturns').jqm({overlay:70});$('#dialogReturns').load('/returns/default.php');window.jqmReturns=true;}
$('#dialogReturns').jqmShow();}
function hideReturns(){if(window.jqmReturns){$('#dialogReturns').jqmHide();window.jqmReturns=false;}}
var jqmShippingInformation=false;function showShippingInformation(){if(!window.jqmShippingInformation){$('#dialogShippingInformation').jqm({overlay:70});$('#dialogShippingInformation').load('/shipping_information/default.php');window.jqmShippingInformation=true;}
$('#dialogShippingInformation').jqmShow();}
function hideShippingInformation(){if(window.jqmShippingInformation){$('#dialogShippingInformation').jqmHide();window.jqmShippingInformation=false;}}
function save_form(){if(window.objForm!==null){objForm.submit();}else{alert('Error: objForm is not initialised')}}
function currencyFormatted(amount){if(amount!=null&&amount!=''){if(!isNaN(amount)){var i=parseFloat(amount);if(isNaN(i))i=0.00;var minus='';if(i<0)minus='-';i=Math.abs(i);i=parseInt((i+.005)*100,10);i=i/100;s=new String(i);if(s.indexOf('.')<0)s+='.00';if(s.indexOf('.')==(s.length-2))s+='0';s=minus+s;return s;}}
return 0;}
