/* * jQuery 1.2.6 - New Wave Javascript * * Copyright (c) 2008 John Resig (jquery.com) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * $Date: 2008/08/04 01:05:03 $ * $Rev: 5685 $ */ (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=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-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]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!tags.indexOf("",""]||(!tags.indexOf("",""]||!tags.indexOf("",""]||jQuery.browser.msie&&[1,"div
","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf(""&&tags.indexOf("=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&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&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*",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 im[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=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=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=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=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("
").append(res.responseText.replace(//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;ithis.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);};});})(); eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4($){8 m=\'2.22\';8 n=$.20.21&&/2U 6.0/.1r(2V.2W);4 1B(){7(23.24&&23.24.1B)23.24.1B(\'[D] \'+2X.2Y.2Z.30(31,\'\'))};$.F.D=4(l){P B.1k(4(){l=l||{};7(l.2r==2s){32(l){25\'33\':7(B.12)1H(B.12);B.12=0;P;25\'26\':B.1j=1;P;25\'34\':B.1j=0;P;35:l={1l:l}}}7(B.12)1H(B.12);B.12=0;B.1j=0;8 c=$(B);8 d=l.27?$(l.27,B):c.36();8 e=d.37();7(e.M<2){1B(\'38; 39 3a 3b: \'+e.M);P}8 f=$.3c({},$.F.D.2t,l||{},$.2u?c.2u():$.3d?c.3e():{});7(f.28)f.29=f.2a||e.M;f.H=f.H?[f.H]:[];f.1g=f.1g?[f.1g]:[];f.1g.2v(4(){f.2b=0});7(f.1s)f.1g.J(4(){1m(e,f,0,!f.1n)});7(n&&f.1I&&!f.2w)2c(d);8 g=B.3f;f.C=V((g.1C(/w:(\\d+)/)||[])[1])||f.C;f.A=V((g.1C(/h:(\\d+)/)||[])[1])||f.A;f.W=V((g.1C(/t:(\\d+)/)||[])[1])||f.W;7(c.u(\'1J\')==\'3g\')c.u(\'1J\',\'3h\');7(f.C)c.C(f.C);7(f.A&&f.A!=\'1K\')c.A(f.A);7(f.1o){f.1t=[];1D(8 i=0;i=e.M)f.1d=0;8 h=f.1d||0;d.u({1J:\'2x\',x:0,9:0}).T().1k(4(i){8 z=h?i>=h?e.M-(i-h):h-i:e.M-i;$(B).u(\'z-1L\',z)});$(e[h]).u(\'1e\',1).S();7($.20.21)e[h].2y.2z(\'2d\');7(f.1h&&f.C)d.C(f.C);7(f.1h&&f.A&&f.A!=\'1K\')d.A(f.A);7(f.26)c.3k(4(){B.1j=1},4(){B.1j=0});8 j=$.F.D.L[f.1l];7($.2A(j))j(c,d,f);R 7(f.1l!=\'2e\')1B(\'3l 3m: \'+f.1l);d.1k(4(){8 a=$(B);B.X=(f.1h&&f.A)?f.A:a.A();B.Y=(f.1h&&f.C)?f.C:a.C()});f.y=f.y||{};f.I=f.I||{};f.G=f.G||{};d.1M(\':2f(\'+h+\')\').u(f.y);7(f.1c)$(d[h]).u(f.1c);7(f.W){7(f.18.2r==2s)f.18={3n:3o,3p:3q}[f.18]||3r;7(!f.1N)f.18=f.18/2;3s((f.W-f.18)<3t)f.W+=f.18}7(f.2g)f.1O=f.1P=f.2g;7(!f.1u)f.1u=f.18;7(!f.1E)f.1E=f.18;f.2B=e.M;f.1i=h;7(f.1o){f.O=f.1i;7(++f.1p==e.M)f.1p=0;f.O=f.1t[f.1p]}R f.O=f.1d>=(e.M-1)?0:f.1d+1;8 k=d[h];7(f.H.M)f.H[0].1Q(k,[k,k,f,2C]);7(f.1g.M>1)f.1g[1].1Q(k,[k,k,f,2C]);7(f.1F&&!f.17)f.17=f.1F;7(f.17)$(f.17).2h(\'1F\',4(){P 2i(e,f,f.1n?-1:1)});7(f.2j)$(f.2j).2h(\'1F\',4(){P 2i(e,f,f.1n?1:-1)});7(f.1v)2D(e,f);f.3u=4(a){8 b=$(a),s=b[0];7(!f.2a)f.29++;e.J(s);7(f.19)f.19.J(s);f.2B=e.M;b.u(\'1J\',\'2x\').2E(c);7(n&&f.1I&&!f.2w)2c(b);7(f.1h&&f.C)b.C(f.C);7(f.1h&&f.A&&f.A!=\'1K\')d.A(f.A);s.X=(f.1h&&f.A)?f.A:b.A();s.Y=(f.1h&&f.C)?f.C:b.C();b.u(f.y);7(1R f.Z==\'4\')f.Z(b)};7(f.W||f.1s)B.12=1S(4(){1m(e,f,0,!f.1n)},f.1s?10:f.W+(f.2F||0))})};4 1m(a,b,c,d){7(b.2b)P;8 p=a[0].1T,1w=a[b.1i],17=a[b.O];7(p.12===0&&!c)P;7(!c&&!p.1j&&((b.28&&(--b.29<=0))||(b.1U&&!b.1o&&b.O=a.M){7(b.1U)P 1W;b.O=0}7(b.1X&&1R b.1X==\'4\')b.1X(c>0,b.O,a[b.O]);1m(a,b,1,c>=0);P 1W};4 2D(b,c){8 d=$(c.1v);$.1k(b,4(i,o){8 a=(1R c.2m==\'4\')?$(c.2m(i,o)):$(\'\'+(i+1)+\'\');7(a.3z(\'3A\').M==0)a.2E(d);a.2h(c.2H,4(){c.O=i;8 p=b[0].1T,W=p.12;7(W){1H(W);p.12=0}7(1R c.2n==\'4\')c.2n(c.O,b[c.O]);1m(b,c,1,!c.1n);P 1W})});$.F.D.2l(c.1v,c.1d)};4 2c(b){4 1Y(s){8 s=V(s).3B(16);P s.M<2?\'0\'+s:s};4 2I(e){1D(;e&&e.3C.3D()!=\'3E\';e=e.1T){8 v=$.u(e,\'2J-2K\');7(v.3F(\'3G\')>=0){8 a=v.1C(/\\d+/g);P\'#\'+1Y(a[0])+1Y(a[1])+1Y(a[2])}7(v&&v!=\'3H\')P v}P\'#3I\'};b.1k(4(){$(B).u(\'2J-2K\',2I(B))})};$.F.D.2e=4(a,b,c,d){8 e=$(a),$n=$(b);$n.u(c.y);8 f=4(){$n.1Z(c.I,c.1u,c.1O,d)};e.1Z(c.G,c.1E,c.1P,4(){7(c.K)e.u(c.K);7(!c.1N)f()});7(c.1N)f()};$.F.D.L={2L:4(a,b,c){b.1M(\':2f(\'+c.1d+\')\').u(\'1e\',0);c.H.J(4(){$(B).S()});c.I={1e:1};c.G={1e:0};c.y={1e:0};c.K={N:\'U\'}}};$.F.D.3J=4(){P m};$.F.D.2t={1l:\'2L\',W:3K,1s:0,18:3L,1u:Q,1E:Q,17:Q,2j:Q,1X:Q,1v:Q,2n:Q,2H:\'1F\',2m:Q,H:Q,1g:Q,2k:Q,2g:Q,1O:Q,1P:Q,1G:Q,I:Q,G:Q,y:Q,K:Q,1V:Q,A:\'1K\',1d:0,1N:1,1o:0,1h:0,26:0,28:0,2a:0,2F:0,27:Q,1I:0,1U:0}})(2M);(4($){$.F.D.L.3M=4(d,e,f){d.u(\'14\',\'1a\');f.H.J(4(a,b,c){$(B).S();c.y.x=b.1x;c.G.x=0-a.1x});f.1c={x:0};f.I={x:0};f.K={N:\'U\'}};$.F.D.L.3N=4(d,e,f){d.u(\'14\',\'1a\');f.H.J(4(a,b,c){$(B).S();c.y.x=0-b.1x;c.G.x=a.1x});f.1c={x:0};f.I={x:0};f.K={N:\'U\'}};$.F.D.L.3O=4(d,e,f){d.u(\'14\',\'1a\');f.H.J(4(a,b,c){$(B).S();c.y.9=b.1y;c.G.9=0-a.1y});f.1c={9:0};f.I={9:0}};$.F.D.L.3P=4(d,e,f){d.u(\'14\',\'1a\');f.H.J(4(a,b,c){$(B).S();c.y.9=0-b.1y;c.G.9=a.1y});f.1c={9:0};f.I={9:0}};$.F.D.L.3Q=4(f,g,h){f.u(\'14\',\'1a\').C();h.H.J(4(a,b,c,d){$(B).S();8 e=a.1y,2o=b.1y;c.y=d?{9:2o}:{9:-2o};c.I.9=0;c.G.9=d?-e:e;g.1M(a).u(c.y)});h.1c={9:0};h.K={N:\'U\'}};$.F.D.L.3R=4(f,g,h){f.u(\'14\',\'1a\');h.H.J(4(a,b,c,d){$(B).S();8 e=a.1x,2p=b.1x;c.y=d?{x:-2p}:{x:2p};c.I.x=0;c.G.x=d?e:-e;g.1M(a).u(c.y)});h.1c={x:0};h.K={N:\'U\'}};$.F.D.L.3S=4(d,e,f){f.H.J(4(a,b,c){$(a).u(\'E\',1)});f.Z=4(a){a.T()};f.y={E:2};f.I={C:\'S\'};f.G={C:\'T\'}};$.F.D.L.3T=4(d,e,f){f.H.J(4(a,b,c){$(a).u(\'E\',1)});f.Z=4(a){a.T()};f.y={E:2};f.I={A:\'S\'};f.G={A:\'T\'}};$.F.D.L.1G=4(g,h,j){8 w=g.u(\'14\',\'2N\').C();h.u({9:0,x:0});j.H.J(4(){$(B).S()});j.18=j.18/2;j.1o=0;j.1G=j.1G||{9:-w,x:15};j.19=[];1D(8 i=0;i1;if(n.queue)m/=2;n.offset=j(n.offset);n.over=j(n.over);return this.each(function(){var a=this,b=$(a),t=l,c,d={},w=b.is('html,body');switch(typeof t){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(t)){t=j(t);break}t=$(t,this);case'object':if(t.is||t.style)c=(t=$(t)).offset()}$.each(n.axis.split(''),function(i,f){var P=f=='x'?'Left':'Top',p=P.toLowerCase(),k='scroll'+P,e=a[k],D=f=='x'?'Width':'Height';if(c){d[k]=c[p]+(w?0:e-b.offset()[p]);if(n.margin){d[k]-=parseInt(t.css('margin'+P))||0;d[k]-=parseInt(t.css('border'+P+'Width'))||0}d[k]+=n.offset[p]||0;if(n.over[p])d[k]+=t[D.toLowerCase()]()*n.over[p]}else d[k]=t[p];if(/^\d+$/.test(d[k]))d[k]=d[k]<=0?0:Math.min(d[k],h(D));if(!i&&n.queue){if(e!=d[k])g(n.onAfterFirst);delete d[k]}});g(n.onAfter);function g(a){b.animate(d,m,n.easing,a&&function(){a.call(this,l)})};function h(D){var b=w?$.browser.opera?document.body:document.documentElement:a;return b['scroll'+D]-b['client'+D]}})};function j(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); //dezinerfolio eval((function(){a="Scroller={speed:10,8dC.;d.while(dC.+C.}} J8N;d=5;&&M4M}d&&dM4dM}%4%} 0J8a,F4(F,fa@7a.4a.LP+F7Jend8e66.cancelBubble=true;6.Value=fa@;}&&(E(7J8di= Hner3||5.G3;hN.3;a=(Ed>ah-d>i7e@{-(h-d)7}e@{a=a+(d-a} To(0,aEa==a}=aJHit8KwHdow,A,A7,A82 P;l=9;d=locatiP;D&&D.HdexOfL#)!=-1&&(l/+l=C)Kl,Gck,endEl.PGck=2l=this.hash.substr(1E9.name==l;i=setILL+(9)+),107}}}}}};Hit()",b=48;while(b>=0)a=a.replace(new RegExp(" %23456789@ACDEFGHJKLMNP".charAt(b),"g"),("\042Scroller.entfunction(offsetParscrollwindow.returndocumattachEvntervala=.getElemsByTagName(a);if(offsetTop){for(i=0;i 2) ? arguments[2] : "GET"; http[i].onreadystatechange = HandleResponse; if (httpMethod == 'POST') { http[i].open("POST", url, true); http[i].setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); http[i].setRequestHeader("Content-Length", params.length); http[i].setRequestHeader("Connection", "close"); http[i].send(url_params); } else { http[i].open(httpMethod, url + "?" + url_params); http[i].send(null); } break; } } } } }(); } if (!this.COOKIE) { var COOKIE = function() { function ReturnCookieExpires(days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = date.toGMTString(); return expires; } return { Set: function (name, value, days) { if (days) { var expires = "; expires=" + ReturnCookieExpires(days); } else { var expires = ""; } document.cookie = name.toUpperCase() + "=" + value + "; expires=" + ReturnCookieExpires(-1) + "; path=/"; document.cookie = name + "=" + value + "; expires=" + ReturnCookieExpires(-1) + "; path=/"; document.cookie = name.toLowerCase() + "=" + value + expires + "; path=/"; }, Get: function (name) { var nameEQ = (name + "=").toLowerCase(); var ca = document.cookie.split(';'); for (var i = 0, j = ca.length; i < j; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1, c.length); } if (c.toLowerCase().indexOf(nameEQ) == 0) { return c.substring(nameEQ.length, c.length); } } return null; }, Alert: function () { alert('Document Cookies:\n\t' + document.cookie.replace(/; /g, '\n\t')); }, Eat: function (name) { COOKIE.Set(name, "", -1); } } }(); } if (!this.MD5) { /* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as defined in RFC 1321. * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet * Distributed under the BSD License * See http://pajhome.org.uk/crypt/md5 for more info. */ var MD5 = function () { var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } function md5_vm_test() { return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; } function core_md5(x, len) { x[len >> 5] |= 0x80 << ((len) % 32); x[(((len + 64) >>> 9) << 4) + 14] = len; var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; for(var i = 0; i < x.length; i += 16) { var olda = a; var oldb = b; var oldc = c; var oldd = d; a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); c = md5_ff(c, d, a, b, x[i+10], 17, -42063); b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); a = safe_add(a, olda); b = safe_add(b, oldb); c = safe_add(c, oldc); d = safe_add(d, oldd); } return Array(a, b, c, d); } function md5_cmn(q, a, b, x, s, t) { return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); } function md5_ff(a, b, c, d, x, s, t) { return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); } function md5_gg(a, b, c, d, x, s, t) { return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); } function md5_hh(a, b, c, d, x, s, t) { return md5_cmn(b ^ c ^ d, a, b, x, s, t); } function md5_ii(a, b, c, d, x, s, t) { return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); } function core_hmac_md5(key, data) { var bkey = str2binl(key); if (bkey.length > 16) { bkey = core_md5(bkey, key.length * chrsz); } var ipad = Array(16), opad = Array(16); for(var i = 0; i < 16; i++) { ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5C5C5C5C; } var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); return core_md5(opad.concat(hash), 512 + 128); } function safe_add(x, y) { var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); } function bit_rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); } function str2binl(str) { var bin = Array(); var mask = (1 << chrsz) - 1; for(var i = 0; i < str.length * chrsz; i += chrsz) { bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); } return bin; } function binl2str(bin) { var str = ""; var mask = (1 << chrsz) - 1; for (var i = 0; i < bin.length * 32; i += chrsz) { str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); } return str; } function binl2hex(binarray) { var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; var str = ""; for (var i = 0; i < binarray.length * 4; i++) { str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); } return str; } function binl2b64(binarray) { var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var str = ""; for (var i = 0; i < binarray.length * 4; i += 3) { var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); for (var j = 0; j < 4; j++) { if (i * 8 + j * 6 > binarray.length * 32) { str += b64pad; } else { str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); } } } return str; } return { hex_md5: function (s) { return binl2hex(core_md5(str2binl(s), s.length * chrsz)); }, b64_md5: function (s) { return binl2b64(core_md5(str2binl(s), s.length * chrsz)); }, str_md5: function (s) { return binl2str(core_md5(str2binl(s), s.length * chrsz)); } } }(); } /* MISC FUNCTIONS */ function PayViaPayPal(tmp_button) { tmp_form = tmp_button.form; tmp_form.action = "action/process_paypal.php"; tmp_form.method = "post"; SubmitForm(tmp_form.name, "store_action|process"); return true; } var isOpera = navigator.userAgent.indexOf("Opera") > -1; var isIE = navigator.userAgent.indexOf("MSIE") > 1 && !isOpera; var isMoz = navigator.userAgent.indexOf("Mozilla/5.") == 0 && !isOpera; /* FADER FUNCTIONS */ function SetNewOpacity(tmp_opacity, tmp_div) { var tmp_opacity = 100 * tmp_opacity; tmp_opacity = Math.floor(tmp_opacity); if (tmp_opacity <= 0) { tmp_div.inc = 4; tmp_opacity = 0; } else if (tmp_opacity > 90 && tmp_opacity < 100 && tmp_div.inc > 0) { tmp_div.inc = 2; } else if (tmp_opacity > 300) { tmp_opacity = 100; tmp_div.inc = -2; } else if (tmp_opacity < 90 && tmp_div.inc < 0) { tmp_div.inc = -4; } new_opacity = tmp_opacity + tmp_div.inc; //alert(tmp_div.id + " = " + tmp_div.inc + ", " + tmp_opacity + " > " + new_opacity); return new_opacity; } function TextFader(text_id, text_values) { var tmp_text = ''; var tmp_div = $$(text_id); tmp_div.text_value_array = text_values.split('`'); tmp_div.text_count = tmp_div.text_value_array.length; tmp_div.style.opacity = .10; tmp_div.style.filter = "alpha(opacity=10)"; var first_value = tmp_div.text_value_array[Math.floor(Math.random() * tmp_div.text_count)]; first_value = first_value.split(':'); first_value = first_value[0]; tmp_div.innerHTML = first_value; tmp_div.inc = 5; text_fader_interval = setInterval("GetRandomText('" + text_id + "');", 75); } function GetRandomText(tmp_id) { var tmp_text = ''; var tmp_div = $$(tmp_id); var new_opacity = SetNewOpacity(tmp_div.style.opacity, tmp_div); if (tmp_div.text_value_array.length == 1 && new_opacity >= 99) { clearInterval(text_fader_interval); } tmp_div.style.opacity = new_opacity / 100; tmp_div.style.filter = "alpha(opacity=" + new_opacity + ")"; if (new_opacity == 0) { var old_text = tmp_div.innerHTML; do { tmp_text = tmp_div.text_value_array[Math.floor(Math.random() * tmp_div.text_count)]; tmp_text = tmp_text.split(':'); tmp_text = tmp_text[0]; } while (tmp_text == old_text) tmp_div.innerHTML = tmp_text; } } function ImageFader(image_id, image_root, suffix_list) { var tmp_image = ''; var tmp_div = $$(image_id); tmp_div.image_url_root = image_root; tmp_div.image_suffix_array = suffix_list.split('`'); tmp_div.image_count = tmp_div.image_suffix_array.length; tmp_div.style.opacity = .07; tmp_div.style.filter = "alpha(opacity=7)"; var first_image = tmp_div.image_url_root + tmp_div.image_suffix_array[Math.floor(Math.random() * tmp_div.image_suffix_array.length)] + '.jpg'; $$(tmp_div.id + "_image").src = first_image; tmp_div.inc = 4; image_fader_interval = setInterval("GetRandomImage('" + image_id + "');", 75); } function GetRandomImage(tmp_id) { var tmp_div = $$(tmp_id); var new_opacity = SetNewOpacity(tmp_div.style.opacity, tmp_div); if (tmp_div.image_suffix_array.length == 1 && new_opacity >= 99) { clearInterval(image_fader_interval); } tmp_div.style.opacity = new_opacity / 100; tmp_div.style.filter = "alpha(opacity=" + new_opacity + ")"; if (new_opacity == 0) { var old_image = $$(tmp_id + "_image").src; do { tmp_image = tmp_div.image_suffix_array[Math.floor(Math.random() * tmp_div.image_count)]; } while (tmp_div.image_url_root + tmp_image + '.jpg' == old_image) $$(tmp_id + "_image").src = tmp_div.image_url_root + tmp_image + '.jpg'; } } var div_array_index = {}; var div_array = {}; function DivFader(div_id) { div_array[div_id] = GetDocDivs(div_id); div_array_index[div_id] = 0; $$(div_array[div_id][div_array_index[div_id]]).inc = 4; $$(div_array[div_id][div_array_index[div_id]]).style.display = "block"; $$(div_array[div_id][div_array_index[div_id]]).style.opacity = .01; $$(div_array[div_id][div_array_index[div_id]]).style.filter = "alpha(opacity=1)"; div_fader_interval = setInterval("GetNextDiv($$(div_array[\"" + div_id + "\"][div_array_index[\"" + div_id + "\"]]), \"" + div_id + "\");", 75); } function GetNextDiv(tmp_div, div_id) { var new_opacity = SetNewOpacity(tmp_div.style.opacity, tmp_div); if (div_array.length == 1 && new_opacity >= 99) { clearInterval(div_fader_interval); } tmp_div.style.opacity = new_opacity / 100; tmp_div.style.filter = "alpha(opacity=" + new_opacity + ")"; if (new_opacity == 0) { $$(div_array[div_id][div_array_index[div_id]]).style.display = "none"; var old_inc = $$(div_array[div_id][div_array_index[div_id]]).inc; if (++div_array_index[div_id] >= div_array[div_id].length) { div_array_index[div_id] = 0; } $$(div_array[div_id][div_array_index[div_id]]).inc = old_inc; $$(div_array[div_id][div_array_index[div_id]]).style.display = "block"; $$(div_array[div_id][div_array_index[div_id]]).style.opacity = .01; $$(div_array[div_id][div_array_index[div_id]]).style.filter = "alpha(opacity=1)"; } } /* TEST FUNCTIONS */ rxTxt = new RegExp("[^-a-zA-Z0-9,\._@ ]"); rxNum = new RegExp("[^-0-9 \., ]"); function Validate(iVal, iName, iForm, type, text, minVal, maxVal) { errTxt = ""; switch (type) { case "num": if (rxNum.test(iVal)) { errTxt = errTxt + text + " may only consist of the characters within the brackets [0-9, . -]\n"; } else { iVal = iVal*1; if (minVal != "" && iVal < (minVal*1)) { errTxt = errTxt + text + " must be greater than or equal to " + minVal + "\n"; } if (maxVal != "" && iVal > (maxVal*1)) { errTxt = errTxt + text + " must be less than or equal to " + maxVal + "\n"; } } break; case "txt": if (rxTxt.test(iVal)) { errTxt = errTxt + text + " may only consist of the following:\n\n\t0-9\n\ta-z\n\tA-Z\n\t@\n\t, (comma)\n\t. (period)\n\t- (dash)\n\t_ (underscore)\n"; } break; default: //Nothing break; } if (errTxt != "") { alert(errTxt); eval("document."+iForm+" . "+iName+".focus();"); return false; } else { return true; } } function isBlank(val) {return /^[\s]*$/.test(val);} function isDigit(num) {return /^[0-9]+$/.test(num);} function isInteger(val) {return /^[0-9]+$/.test(val);} function ValidateDate(raw_date) { if (raw_date == "") { return ""; } var min_year = arguments.length >= 2 ? arguments[1] : 0; var max_year = arguments.length >= 3 ? arguments[2] : 9999; var excluded_days = arguments.length >= 4 ? arguments[3] : ""; var date_regex = /^(1[0-9]|[0]?[1-9])[ -\/\.]?([0]?[1-9]|[1-3][0-9])[ -\/\.]?([0-9]{4}|[0-9]{2})?$/; var check = raw_date.match(date_regex); if (check == null) { alert("The date you entered could not be parsed. Please verify that you entered a valid date."); return false; } var d_day = "" + check[2]; while (d_day.length < 2) { d_day = "0" + d_day; } var d_month = "" + check[1]; while (d_month.length < 2) { d_month = "0" + d_month; } var d_year = "" + check[3]; if (d_year.length == 2) { d_year = "20" + d_year; } if (d_year.length == 0) { var tmp_date = new Date(); d_year = tmp_date.getFullYear(); } if ((1 * d_month) < 1 || (1 * d_month) > 12) { // check month range alert("Month must be between 1 and 12."); return false; } if ((1 * d_day) < 1 || (1 * d_day) > 31) { alert("Day must be between 1 and 31."); return false; } if (((1 * d_month) == 4 || (1 * d_month) == 6 || (1 * d_month) == 9 || (1 * d_month) == 11) && (1 * d_day) == 31) { alert("Month " + d_month + " doesn't have 31 days!") return false } if ((1 * d_month) == 2) { // check for february 29th var isleap = ((1 * d_year) % 4 == 0 && ((1 * d_year) % 100 != 0 || (1 * d_year) % 400 == 0)); if ((1 * d_day) > 29 || ((1 * d_day) == 29 && !isleap)) { alert("February " + (1 * d_year) + " doesn't have " + (1 * d_day) + " days!"); return false; } } if ((1 * d_year) < min_year || (1 * d_year) > max_year) { alert("The year must be between " + min_year + " and " + max_year + ". (inclusive)"); return false; } if (excluded_days != "") { var weekdayNames = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); excluded_days = excluded_days.replace(/[^,0-9]/g, ""); excluded_days = excluded_days.replace(/,/g, "|"); excluded_days = new RegExp(excluded_days, "g"); var tmp_date = new Date(); tmp_date.setFullYear(1 * d_year, (1 * d_month) - 1, 1 * d_day); //alert(tmp_date.toUTCString()); //alert(excluded_days); //alert(tmp_date.getDay()); if (excluded_days.test((tmp_date.getDay() + 1))) { alert("The day you selected is not allowed because it is a " + weekdayNames[tmp_date.getDay()] + "."); return false; } } var full_date = d_month + "/" + d_day + "/" + d_year; return full_date; } /* String Functions */ function LPad(str, len, char) { while (str.length < len) { str = char + str; } return str; } function ReturnMatches(text, regex) { var re = new RegExp(regex, "gim"); var matches = new Array(); var m; while ((m = re.exec(text)) != null) { matches.push(((typeof m[1] == "undefined") ? m[0] : m[1])); } return matches.length == 0 ? null : matches; } function StringRepeat(str, count) { var tmp_str = ""; for (var i = 0; i < count; ++i) { tmp_str += str; } return tmp_str; } function CountLeadingSpaces(tmpString) { var space_count = 0; for (var i = 0; i < tmpString.length; ++i) { if (tmpString.substr(i, 1) == "_") { ++space_count; } else { break; } } return space_count; } function replace(inString,oldText,newText) { return (inString.split(oldText).join(newText)); } /* Array Functions */ Array.prototype.indexOf=function(n){for(var i=0;i=0){var a=this.slice(),b=a.splice(i);a[i]=value;return a.concat(b);}} Array.prototype.shuffle=function(){var i=this.length,j,t;while(i--){j=Math.floor((i+1)*Math.random());t=arr[i];arr[i]=arr[j];arr[j]=t;}} Array.prototype.unique=function(){var a=[],i;this.sort();for(i=0;i0){r=r%l;}else{i=r;r=l+r%l;}return this[Math.floor(r*Math.random()-i)];}; Array.prototype.walk=function(f){var a=[],i=this.length;while(i--){a.push(f(this[i]));}return a.reverse();}; /* AJAX FUNCTIONS */ //FIXME function ChangeSelection(action, PK_item, PK_var, selection) { req_str = "div_id|selection_" + PK_item + ((PK_var != "uniques") ? ("_" + PK_var) : ("")) + "`PK_item|" + PK_item + "`PK_var|" + PK_var; tmp_date = new Date(); tmp_timestamp = tmp_date.getFullYear() + tmp_date.getDate() + tmp_date.getMinutes() + tmp_date.getMilliseconds(); if (action == "add") { req_str += "`selection|" + selection + "`i_action|add`timestamp|" + tmp_timestamp; } else if (action == "load") { req_str += "`timestamp|" + tmp_timestamp; } else if (action == "del") { req_str += "`PK_order_item|" + selection + "`i_action|del`timestamp|" + tmp_timestamp; } SendReq('get`item_selection', req_str); return; } function CreateRequestObject() { var ro; var browser = navigator.appName; if (browser == "Microsoft Internet Explorer") { ro = new ActiveXObject("Microsoft.XMLHTTP"); } else { ro = new XMLHttpRequest(); } return ro; } var http = new Object(); var http_in_use = new Array(); var num_http_objects = 35; for (var i = 0; i < num_http_objects; i++) { http[i] = CreateRequestObject(); http_in_use[i] = false; } function SendReq(action, params) { params = params.replace(/#/, "%23"); //alert(params); //s = prompt(action, "http://www.changeisnotenough.com/js/ajax_call.php?action=" + escape(action) + "¶ms=" + escape(params)); for (var i = 0; i < num_http_objects; i++) { if (http_in_use[i] == false) { if (action.indexOf("nope") != -1 && typeof document.ss_form.ajax_calls != "undefined") { alert(document.ss_form.ajax_calls.value); document.ss_form.ajax_calls.value += "http://www.changeisnotenough.com/js/ajax_call.php?action=" + action + "¶ms=" + params + "\n"; } http_in_use[i] = true; http[i].open("post", "http://www.changeisnotenough.com/js/ajax_call.php?action=" + escape(action) + "¶ms=" + escape(params)); http[i].onreadystatechange = HandleResponse; http[i].send(null); break; } } } function HandleResponse() { for (var i = 0; i < num_http_objects; ++i) { if (http_in_use[i] && http[i].readyState == 4 && http[i].status == 200) { http_in_use[i] = false; var response = http[i].responseText; //alert(i + " = " + response); var update = new Array(); if (response.indexOf("``innerHTML``") != -1) { //alert(response); update = response.split("``innerHTML``"); matches = ReturnMatches(update[0], "[_0-9a-z]+"); //alert("|" + update[0] + "|"); update[0] = matches[0]; //alert("|" + update[0] + "|"); $$(update[0]).innerHTML = update[1]; script_matches = ReturnMatches(update[1], "]*>(.*?)"); if (script_matches != null) { for (var j = 0, k = script_matches.length; j < k; ++j) { eval(script_matches[j]); } } } http[i] = CreateRequestObject(); break; } } } /* DEBUG FUNCTIONS */ function VarDump(element) { var div_name = "dumped_element" + (new Date()).getTime(); if ($$(div_name) == null){ var newDiv = document.createElement("div"); newDiv.setAttribute("id", div_name); newDiv.innerHTML = "TEMP"; document.body.appendChild(newDiv); } var dd = $$(div_name); if (typeof element == "object") { element = ObjectDump(element); } dd.innerHTML = "" + "

"; dd.style.position = "absolute"; dd.style.width = "90%"; dd.style.height = "550px"; dd.style.left = "10px"; dd.style.top = (getScrollHeight() + 10) + "px"; dd.style.visibility = "visible"; dd.style.border = "2px solid #FF0000"; dd.style.padding = "10px"; dd.style.backgroundColor = "#FFFFFF"; } function SubObjectDump(sub_object) { if (sub_object.length > 0) { if (/obj[0-9]{13}/.test(sub_object)) { eval("VarDump(" + sub_object + ");"); } } } function GetSelectedText(input){ var selection; if (document.selection && document.selection.createRange().text != ''){ // IS IE selection = document.selection.createRange().text; } else { // Not IE.. assume Mozilla? var startPos = input.selectionStart; var endPos = input.selectionEnd; selection = input.value.substring(startPos, endPos); } if (selection.length < 100 && selection.length > 0) { return selection; } else { return ""; } } function ObjectDump(element) { var element_str = ""; var object_properties = { "string": [], "number": [], "object": [], "boolean": [], "function": [] }; for (var v in element) { if (typeof element[v] == "object") { var tmp_object = "obj" + (new Date()).getTime(); eval(tmp_object + " = element[v];"); object_properties[typeof element[v]].push(v + ' = ' + element[v] + " {" + tmp_object + "}"); } else { if (typeof element[v] !== "undefined") { object_properties[typeof element[v]].push(v + ' = ' + element[v]); } } } for (var element_type in object_properties) { element_str += "\t[[" + element_type.toUpperCase() + "]]\n\n" + object_properties[element_type].sort().join("\n") + "\n\n- - - - - - - - - -\n\n"; } return element_str; } /* DOM FUNCTIONS */ function insertAfter(new_node, existing_node) { if (existing_node.nextSibling) { existing_node.parentNode.insertBefore(new_node, existing_node.nextSibling); } else { existing_node.parentNode.appendChild(new_node); } } function SetDocDivsStyle(div_search, style_param, style_value) { var doc_divs, i, j; doc_divs = GetDocDivs(div_search); for (i = 0, j = doc_divs.length; i < j; ++i) { $$(doc_divs[i]).style[style_param] = style_value; } } function GetDocDivs(div_search) { var doc_divs = new Array(); //alert(document.forms[0].name); if (arguments.length == 2) { negative_search = arguments[1]; } else { negative_search = ""; } //alert(field_search); var document_divs = document.getElementsByTagName('div'); for (i = 0, j = document_divs.length; i < j; ++i) { div_id = document_divs[i].id; if (div_id != '') { //alert(div_id + " " + div_search); if (div_id.indexOf(div_search) != -1 && (negative_search == "" || div_id.indexOf(negative_search) == -1)) { doc_divs[doc_divs.length] = div_id; } } } //fixme make it handle more tags var document_divs = document.getElementsByTagName('tr'); for (i = 0, j = document_divs.length; i < j; ++i) { div_id = document_divs[i].id; if (div_id != '') { //alert(div_id + " " + div_search); if (div_id.indexOf(div_search) != -1 && (negative_search == "" || div_id.indexOf(negative_search) == -1)) { doc_divs[doc_divs.length] = div_id; } } } return doc_divs; } function HideDocDivs(div_search) { doc_divs = GetDocDivs(div_search); for (div_id in doc_divs) { $$(doc_divs[div_id]).style.display = "none"; } } function ShowDocDivs(div_search) { doc_divs = GetDocDivs(div_search); for (div_id in doc_divs) { $$(doc_divs[div_id]).style.display = "block"; } } old_border_color = ""; function DarkenBorder(e) { old_border_color = e.style.borderColor; e.style.borderColor = "#000000"; } function RestoreBorder(e) { e.style.borderColor = old_border_color; } item_rules = Object(); function AddItemRule(field, type, length) { if (typeof item_rules[field] == 'undefined') { item_rules[field.name] = Array(type, length); } } function CleanFieldName(field_name) { field_name = replace(field_name, "_", " "); field_name = replace(field_name, "payment[", ""); field_name = replace(field_name, "]", ""); return field_name; } function PreviewImage(img_id, img_url) { img_obj = $$(img_id); img_pos = findPos(img_obj); preview_div = document.createElement('DIV'); preview_div.innerHTML = 'Loading...'; preview_div.innerHTML = '
' + '
Preview X
' + '
'; img_obj.parentNode.insertBefore(preview_div, img_obj); } function New_Image_Load(index) { tmp_str = "Image Preview:"; if (arguments.length > 1) { tmp_str = arguments[1] + tmp_str; } tmp_str += "  "; eval("tmp_str += document.images.image_" + index + ".width + \" x \" + document.images.image_" + index + ".height + \" pixels\";"); tmp_str += "  "; eval("tmp_str += document.images.image_" + index + ".fileSize + \" bytes\";"); $$("img_dims_" + index).innerHTML = tmp_str; } function Existing_Image_Load(index) { //return; tmp_str = "Current "; if (arguments.length > 2) { tmp_str += arguments[2]; } else { tmp_str += "Image"; } tmp_str += ":"; tmp_str += "  "; if (arguments.length > 1) { tmp_str = '' + arguments[1] + ':
' + tmp_str; is_thumb = true; } else { is_thumb = false; } eval("current_image_src = document.images.current_image_" + index + ".src;"); if (current_image_src.indexOf('spacer.gif') != -1) { tmp_str += "This image doesn't exist on the server yet."; } else { eval("tmp_str += document.images.current_image_" + index + ".width + \" x \" + document.images.current_image_" + index + ".height + \" pixels\";"); tmp_str += "  "; eval("tmp_str += document.images.current_image_" + index + ".fileSize + \" bytes\";"); last_slash = current_image_src.lastIndexOf("/"); next_last_slash = current_image_src.lastIndexOf("/", last_slash - 1); if (current_image_src.indexOf("/thumbs/") != -1) { next_next_last_slash = current_image_src.lastIndexOf("/", next_last_slash - 1); current_image_filename = current_image_src.substring(next_next_last_slash + 1); } else { current_image_filename = current_image_src.substring(next_last_slash + 1); } eval("tmp_str += \"     Delete Image.\";"); } $$("current_img_dims_" + index).innerHTML = tmp_str; } function Preview_Image(tmp_index, tmp_path) { if (tmp_path != '') { tmp_path = tmp_path.replace(/\\/g, "/"); eval("document.images." + tmp_index + ".src = '" + tmp_path + "';"); } else { eval("document.images." + tmp_index + ".src = 'http://www.changeisnotenough.com/3rd/common_media/spacer.gif';"); $$("img_dims_" + tmp_index).innerHTML = ""; } } function cancelEvent() { event.returnValue = false; } function AddViaDrop(drop_target) { target_field = $$(drop_target); target_field.value = window.event.dataTransfer.getData('text'); } function InitiateDrag(drop_source) { alert(drop_source); source_field = $$(drop_source); window.event.dataTransfer.setData('text', source_field.value); } function ToggleID(id) { tmpClassName = $$(id).className; if (tmpClassName.indexOf("hide_id") != -1) { tmpClassName = tmpClassName.replace(/hide_id/gi, "show_id"); } else if (tmpClassName.indexOf("show_id") != -1) { tmpClassName = tmpClassName.replace(/show_id/gi, "hide_id"); } else { tmpClassName += " hide_id"; } $$(id).className = tmpClassName; } function ShowID(id) { $$(id).className = "visible"; } function HideID(id) { $$(id).className = "invisible"; } function HiLite(imgDocID, imgStatus) { tmp = eval(imgDocID + "_" + imgStatus + ".src"); document.images[imgDocID].src = tmp; } //fixme needs work function SearchById(id_search) { var id_matches = new Array(); //alert(document.forms[0].name); if (arguments.length == 2) { negative_search = arguments[1]; } else { negative_search = ""; } tag_types = ["div", "span", "img", "tr"]; for (tag_type in tag_types) { var tmp_id_matches = document.getElementsByTagName(tag_type); for (tmp_id_match in tmp_id_matches) { alert(tmp_id_match); if (tmp_id_match != "length" && /[^0-9]/.test(tmp_id_match) && typeof($$(tmp_id_match)) == "string") { if (typeof($$(tmp_id_match).id) != "undefined") { id_match = $$(tmp_id_match).id; if (id_match != "") { if (id_match.indexOf(id_search) != -1 && (negative_search == "" || div_id.indexOf(negative_search) == -1)) { id_matches[id_matches.length] = id_match; } } } } } } alert(id_matches); return id_matches; } function getScrollWidth(){ var w = window.pageXOffset || document.body.scrollLeft || document.documentElement.scrollLeft; return w ? w : 0; } function getScrollHeight(){ var h = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop; return h ? h : 0; } function findPos(obj) { var curleft = curtop = 0; var climb_tree = arguments.length == 1; if (obj.offsetParent) { do { curleft += obj.offsetLeft; curtop += obj.offsetTop; if (!climb_tree) { break; } } while (obj = obj.offsetParent); } return [curleft,curtop]; } function findPosX(obj) { var curleft = 0; if (obj.offsetParent) { do { curleft += obj.offsetLeft; } while (obj = obj.offsetParent); } return curleft; } function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { do { curtop += obj.offsetTop; } while (obj = obj.offsetParent); } return curtop; } function scrollToXY(x_y) { window.scrollTo(x_y[0], x_y[1]); } function scrollToObj(obj_id, box_id) { var obj = $$(obj_id); var obj_pos = findPos(obj, false); window.scrollTo(obj_pos[0], obj_pos[1]); } function $$(){ var elements = new Array(); for (var i = 0, j = arguments.length; i < j; i++){ var element = arguments[i]; if (typeof element == "string") { element = document.getElementById(element); } if (arguments.length == 1) { return element; } elements.push(element); } return elements; } function onKeyPress(keyCode) { var press; if (window.event) { press = window.event.keyCode; } else if (e) { press = e.which; } else { return false; } if (press == keyCode) { return true; } else { return false; } } /* NUMBER FUNCTIONS */ function Random(max_num) { var random_number = Math.floor(Math.random() * max_num); return random_number; } /* FORM FUNCTION */ function AddSelectOptions(id, start, end, prefix, suffix, value) { var tmp_option; var sel_options = $$(id).options; $$(id).name = id; var j = 0; for (var i = start; i <= end; ++i) { sel_options[j] = new Option(prefix + i + suffix, i); if (value == i) { sel_options[j].selected = true; } ++j; } } function GetFormVals(field_search) { form_fields = ""; //alert(document.forms[0].name); if (arguments.length == 2) { negative_search = arguments[1]; } else { negative_search = ""; } if (arguments.length == 3) { return_empty_checkboxes = true; } else { return_empty_checkboxes = false; } //alert(field_search); for (field in document.forms[0]) { if (form_fields.indexOf(field + "|") == -1 && field.indexOf(field_search) != -1 && (negative_search == "" || field.indexOf(negative_search) == -1)) { label = ""; if (document.forms[0][field].type == "text" || document.forms[0][field].type == "hidden") { value = document.forms[0][field].value; form_fields += field + "|" + value + "`"; } else if (typeof document.forms[0][field].name != "undefined" && document.forms[0][field].type.indexOf("select") != -1) { value = document.forms[0][field].value; label = document.forms[0][field].options[document.forms[0][field].selectedIndex].text + "::"; form_fields += field + "|" + ((label == "undefined::") ? ("") : (label)) + value + "`"; } else if (typeof document.forms[0][field].name != "undefined" && document.forms[0][field].type.indexOf("textarea") != -1) { //alert(document.forms[0][field].name + ": " + typeof document.forms[0][field].name); value = document.forms[0][field].value; form_fields += field + "|" + value + "`"; } else if (typeof document.forms[0][field] == "object") { if (typeof document.forms[0][field].name == "undefined" && typeof document.forms[0][field].length != "undefined") { //alert(document.forms[0][field].name + ": " + typeof document.forms[0][field].name); for (i = 0; i < document.forms[0][field].length; ++i) { //alert(document.forms[0][field][i].value); if (document.forms[0][field][i].checked || return_empty_checkboxes) { value = document.forms[0][field][i].value; label = document.forms[0][field][i].label + "::"; form_fields += field + "|" + ((label == "undefined::") ? ("") : (label)) + value + "`"; } } } else if (typeof document.forms[0][field].checked == "boolean") { if (document.forms[0][field].checked || return_empty_checkboxes) { value = document.forms[0][field].value; label = document.forms[0][field].label + "::"; form_fields += field + "|" + ((label == "undefined::") ? ("") : (label)) + value + "`"; } } else { value = document.forms[0][field].value; form_fields += field + "|" + value + "`"; } } else { value = document.forms[0][field].value; form_fields += field + "|" + value + "`"; } } } form_fields = form_fields.substring(0, form_fields.length - 1); //alert(form_fields); return form_fields; } function ClearFormVals(field_search) { form_fields = ""; //alert(document.forms[0].name); for (field in document.forms[0]) { if (field.indexOf(field_search) != -1) { document.forms[0][field].value = ""; } } } function ShowHideOtherInput(input_this) { v = input_this.value; o = input_this.name; o = o.replace("_select", ''); if (arguments.length > 1) { n = arguments[1]; } else { n = o.replace("_other", ''); } df = input_this.form; if (v == 'other') { $$(o).className = 'input_text visible'; $$(o).value = df[o].value; } else { $$(o).className = 'invisible'; eval("df['" + n + "'].value = v;"); } } function textboxSelect (oTextbox, iStart, iEnd) { switch(arguments.length) { case 1: oTextbox.select(); break; case 2: iEnd = oTextbox.value.length; case 3: if (isIE) { var oRange = oTextbox.createTextRange(); oRange.moveStart("character", iStart); oRange.moveEnd("character", -oTextbox.value.length + iEnd); oRange.select(); } else if (isMoz){ oTextbox.setSelectionRange(iStart, iEnd); } } oTextbox.focus(); } function textboxReplaceSelect (oTextbox, sText) { if (isIE) { var oRange = document.selection.createRange(); oRange.text = sText; oRange.collapse(true); oRange.select(); } else if (isMoz) { var iStart = oTextbox.selectionStart; oTextbox.value = oTextbox.value.substring(0, iStart) + sText + oTextbox.value.substring(oTextbox.selectionEnd, oTextbox.value.length); oTextbox.setSelectionRange(iStart + sText.length, iStart + sText.length); } oTextbox.focus(); } function autocompleteMatch(sText, arrValues) { for (var i = 0; i < arrValues.length; i++) { var tmp_val = arrValues[i].toLowerCase(); if (tmp_val.indexOf(sText.toLowerCase()) == 0) { return arrValues[i]; } } return null; } function autocomplete(oTextbox, oEvent, arrValues) { switch (oEvent.keyCode) { case 38: //up arrow case 40: //down arrow case 37: //left arrow case 39: //right arrow case 33: //page up case 34: //page down case 36: //home case 35: //end case 13: //enter case 9: //tab case 27: //esc case 16: //shift case 17: //ctrl case 18: //alt case 20: //caps lock case 8: //backspace case 46: //delete return true; break; default: textboxReplaceSelect(oTextbox, String.fromCharCode(isIE ? oEvent.keyCode : oEvent.charCode)); var iLen = oTextbox.value.length; var sMatch = autocompleteMatch(oTextbox.value, arrValues); if (sMatch != null) { oTextbox.value = sMatch; textboxSelect(oTextbox, iLen, oTextbox.value.length); } return false; } } function PopWin(url) { if (url != "") { var width = 1024; var height = 768; if (arguments.length > 1) { width = (arguments[1] !== "") ? arguments[1] : width; height = (arguments[2] !== "") ? arguments[2] : width; } if (arguments.length > 3) { window_name = arguments[3]; } else { window_name = "popup"; } //alert("width=" + width + ",height=" + height + ",toolbar=1,location=1,directories=0,status=1,menuBar=1,scrollBars=1,resizable=1"); pop_window = window.open(url, window_name, "width=" + width + ",height=" + height + ",toolbar=1,location=1,directories=0,status=1,menuBar=1,scrollBars=1,resizable=1"); pop_window.focus(); //eval("win_" + window_name + " = pop_window;"; } } function UpdateSelectVals(element_form, to_select) { var sel_t = element_form[to_select]; to_vals = ""; for (j = 0; j < sel_t.options.length; ++j) { if (j > 0) { to_vals += ","; } to_vals += sel_t.options[j].value; if (arguments.length > 2 && arguments[2]) { to_vals += "`" + (CountLeadingSpaces(sel_t.options[j].text) / 2); } } element_form[to_select + "_vals"].value = to_vals; //alert(to_vals); } function CheckAll(box_name, box_object) { box_checked = box_object.checked; eval('box_form = document.' + box_object.form.name); num_boxes = box_form[box_name].length; if (num_boxes > 0) { for (i = 0; i < num_boxes; ++i) { box_form[box_name][i].checked = (box_checked) ? (true) : (false); } } } function DeleteConfirmation() { delete_item = arguments.length > 0 ? arguments[0] : 'item'; return confirm('Are you sure you want to delete this ' + delete_item + '?\nIt cannot be undone!'); } function DeleteTripleConfirmation() { delete_ok = false; if (confirm('Are you sure you want to delete this item?\nIt cannot be undone!')) { if (confirm('Are you really sure?\nIt really cannot be undone!')) { if (confirm('Are you really, really sure?\nI\'m not kidding about this not being able to be undone...')) { delete_ok = true; } } } return delete_ok; } function InsertSelectOption(tmp_select, to_pos, text, val) { var option_count = tmp_select.options.length; if (to_pos >= 0) { for (var i = (option_count - 1); i >= to_pos; --i) { tmp_select.options[i + 1] = new Option(tmp_select.options[i].text, tmp_select.options[i].value); } } else { to_pos = option_count; } tmp_select.options[to_pos] = new Option(text, val); } function MoveSelectOption(tmp_select, from_pos, to_pos) { //alert(from_pos + ":" + to_pos); var option_count = tmp_select.options.length; if (from_pos > to_pos) { option_text = tmp_select.options[from_pos].text; option_value = tmp_select.options[from_pos].value; for (var i = from_pos; i > to_pos; --i) { tmp_select.options[i] = new Option(tmp_select.options[i - 1].text, tmp_select.options[i - 1].value); } tmp_select.options[to_pos] = new Option(option_text, option_value); } else { option_text = tmp_select.options[from_pos].text; option_value = tmp_select.options[from_pos].value; for (var i = from_pos; i < to_pos; ++i) { tmp_select.options[i] = new Option(tmp_select.options[i + 1].text, tmp_select.options[i + 1].value); } tmp_select.options[to_pos] = new Option(option_text, option_value); } } function MoveItem(element, from_select_name, to_select_name, move_action) { var from_select = element.form[from_select_name]; var from_options = from_select.options; var from_length = from_options.length; var from_index = from_select.selectedIndex; var to_select = element.form[to_select_name]; var to_options = to_select.options; var to_length = to_options.length; var to_index = to_select.selectedIndex; if (typeof use_indents == "undefined") { use_indents = false; } if (move_action == "addbutton") { for (i = 0; i < from_length; i++) { if (from_options[i].selected) { in_to = false; for (j = 0; j < to_length; ++j) { if (to_options[j].text == from_options[i].text) { in_to = true; } } if (!in_to) { InsertSelectOption(to_select, to_index, from_options[i].text, from_options[i].value); } } } } else if ((move_action == "moveleft" || move_action == "moveright") && (to_index > 0)) { use_indents = true; for (i = 0; i < to_length; i++) { if (to_options[i].selected) { tmpOptionTextPrev = to_options[i - 1].text; tmpOptionValue = to_options[i].value; tmpOptionText = to_options[i].text; var space_count = CountLeadingSpaces(tmpOptionText); var prev_space_count = CountLeadingSpaces(tmpOptionTextPrev); tmpOptionText = tmpOptionText.substring(space_count); if (move_action == "moveleft" && space_count >= 2) { space_count -= 2; } if (move_action == "moveright" && prev_space_count >= space_count) { space_count += 2; } tmpOptionValue = tmpOptionValue.split("`"); tmpOptionValue = tmpOptionValue[0] + "`" + (space_count / 2); tmpOptionText = StringRepeat("_", space_count) + tmpOptionText; to_options[i].value = tmpOptionValue; to_options[i].text = tmpOptionText; to_options[i].selected = true; } } } else if (((move_action == "moveup") && (to_index > 0)) || ((move_action == "movedown") && (to_index < (to_length - 1)))) { s = 0; for (i = (to_length - 1); i >= 0; i--) { if (to_options[i].selected) { ++s; } } if (move_action == "movedown") { from_pos = to_index + s; to_pos = to_index; MoveSelectOption(to_select, from_pos, to_pos); for (i = to_index + 1; i <= to_index + s; i++) { to_options[i].selected = true; } } else { from_pos = to_index - 1; to_pos = to_index + s - 1; MoveSelectOption(to_select, from_pos, to_pos); for (i = to_index - 1; i < to_index + s - 1; i++) { to_options[i].selected = true; } } } else if (move_action == "remove") { j = 0; for (i = (to_length - 1); i >= 0; i--) { if (to_options[i].selected) { to_options[to_index] = null; j = i; } } to_select.selectedIndex = ((to_select.options.length - 1) < j) ? (j - 1) : (j); } UpdateSelectVals(element.form, to_select_name, use_indents); } cursor_pos = -1; function MarkSelection(txtObj) { if (txtObj.createTextRange) { cursor_pos = document.selection.createRange().duplicate(); isSelected = true; } } function InsertText(txtForm, txtName, txtBefore, txtAfter) { var txtObj = eval("document." + txtForm + "[\"" + txtName + "\"]"); if (window.isSelected == null) { txtObj.focus(); MarkSelection(txtObj); } if (isSelected) { if (txtObj.createTextRange && cursor_pos != -1) { if (cursor_pos.text == "" && txtAfter != "" && confirm("You have selected a tag that normally goes around something else.\nDo you want to specify this something else?\n(possibly text if this is a formatting, ie, bold, italic, etc, tag?")) { val = prompt("Enter the text you want to go between the selected tags.", ""); tag_text = val; } else { tag_text = cursor_pos.text; } var caretPos = cursor_pos; caretPos.text = ((txtAfter != "") ? (txtBefore + tag_text + txtAfter) : (txtBefore + tag_text)); if (cursor_pos.text == '') { isSelected = false; txtObj.focus(); } MarkSelection(txtObj); } } else { // placeholder for loss of focus handler } } function AddHiddenField(target_form, field_name, field_value) { if (typeof target_form[field_name] == "undefined") { newHidden = document.createElement("input"); newHidden.setAttribute("id", field_name); newHidden.setAttribute("type", "hidden"); newHidden.setAttribute("name", field_name); newHidden.setAttribute("value", field_value); target_form.appendChild(newHidden); } else { target_form[field_name].value = field_value; } } checkFormTasks = Array(); function CheckForm() { var check_return = true; for (var i = 0; i < checkFormTasks.length; ++i) { eval("tmp_return = function () {" + checkFormTasks[i] + "} "); check_return = tmp_return(); if (check_return === false) { break; } } return check_return; } function SubmitForm() { if (arguments.length == 0 || arguments[0] == "") { var form_name = document.forms[0].name; } else { var form_name = arguments[0]; } var check_form = CheckForm(); if (check_form === true) { var targetForm = document.forms[form_name]; if (arguments.length > 1) { var params = arguments[1].split(","); for (var i = 0, j = params.length; i < j; ++i) { var pair = params[i].split("|"); if (targetForm[pair[0]]) { targetForm[pair[0]].name = "_old_" + pair[0] + "_old_"; } AddHiddenField(targetForm, pair[0], pair[1]); } } targetForm.submit(); return true; } else { return false; } } function AddHiddenField(targetForm, field_name, field_value) { newHidden = document.createElement("input"); newHidden.setAttribute("id", field_name); newHidden.setAttribute("type", "hidden"); newHidden.setAttribute("name", field_name); newHidden.setAttribute("value", field_value); targetForm.appendChild(newHidden); } function ShowSelects() { var button_array = document.body.getElementsByTagName("select"); for (var tag in button_array) { if (tag != "length" && /[^0-9]/.test(tag)) { $$(tag).style.visibility = "visible"; } } } function HideSelects() { var button_array = document.body.getElementsByTagName("select"); for (var tag in button_array) { if (tag != "length" && /[^0-9]/.test(tag) && typeof($$(tag).type) == "string") { $$(tag).style.visibility = "hidden"; } } } function GetDistinctUrl(tmp_location) { var new_location = tmp_location.href.replace(/[&\?]unq_time_xyzzy=[0-9]*/g, "") + (tmp_location.search ? "&" : "?") + "unq_time_xyzzy=" + (new Date()).getTime(); return new_location; } /* IFRAME FUNCTIONS */ function collapseIframe() { grow_start = 0; grow_frame = parent.document.getElementById(window.name); ShrinkFrame(); parent.document.openIframe = ""; } function reResizeIframe() { parent.document.getElementById(window.name).style.height = document.body.scrollHeight + "px"; } parent.document.openIframe = window.name; function resizeIframe() { if (parent && window.name) { if (GetCookie("keep_open") == null && GetCookie("has_error") == null && parent.document.getElementById(window.name + "_updating") && parent.document.getElementById(window.name + "_updating").style.display == "block") { parent.document.location = GetDistinctUrl(parent.document.location); } else { grow_frame = parent.document.getElementById(window.name); parent.document.getElementById(window.name + "_updating").style.display = "none"; parent.document.getElementById(window.name + "_loading").style.display = "none"; parent.document.getElementById(window.name + "_frame").style.display = "none"; parent.document.getElementById(window.name + "_frame").style.display = "block"; grow_frame.style.height = "0px"; if (grow_frame.style.height == "") { grow_frame.style.height = "0px"; } grow_height = (typeof is_error == "undefined") ? document.body.scrollHeight : 500; grow_start = parseInt(grow_frame.style.height); GrowFrame(); //iWidth = document.body.scrollWidth; //i.style.width = iWidth + "px"; } } } function GrowFrame() { if (false && parseInt(grow_frame.style.height) < grow_height) { grow_start += 20; grow_frame.style.height = (parseInt(grow_frame.style.height) + grow_start) + "px"; grow_frame_interval = window.setTimeout("GrowFrame();", 10); } else { grow_frame.style.height = grow_height + "px"; } } function ShrinkFrame() { grow_start += 20; var new_height = (parseInt(grow_frame.style.height) - grow_start) > 0 ? (parseInt(grow_frame.style.height) - grow_start) : 0; if (false && new_height > 0) { grow_frame.style.height = new_height + "px"; shrink_frame_interval = window.setTimeout("ShrinkFrame();", 10); } else { grow_frame.style.height = "0px"; parent.document.getElementById(window.name).src = ""; parent.document.getElementById(window.name.replace(/_iframe/, "")).style.display = "none"; parent.document.getElementById(window.name + "_frame").style.display = "none"; parent.document.getElementById(window.name + "_loading").style.display = "block"; parent.document.getElementById(window.name).style.height = "0px"; } }