LowPro={};LowPro.Version="0.5";LowPro.CompatibleWithPrototype="1.6";Prototype.Version.indexOf(LowPro.CompatibleWithPrototype)!=0&&console&&console.warn&&console.warn("This version of Low Pro is tested with Prototype "+LowPro.CompatibleWithPrototype+" it may not work as expected with this version ("+Prototype.Version+")");if(!Element.addMethods)Element.addMethods=function(a){Object.extend(Element.Methods,a)};DOM={};
DOM.Builder={tagFunc:function(a){return function(){var b,c;if(arguments.length>0)if(arguments[0].nodeName||typeof arguments[0]=="string")c=arguments;else{b=arguments[0];c=Array.prototype.slice.call(arguments,1)}return DOM.Builder.create(a,b,c)}},create:function(a,b,c){b=b||{};c=c||[];a=a.toLowerCase();a=new Element(a,b);for(b=0;b<c.length;b++){if(typeof c[b]=="string")c[b]=document.createTextNode(c[b]);a.appendChild(c[b])}return $(a)}};
(function(){for(var a="p|div|span|strong|em|img|table|tr|td|th|thead|tbody|tfoot|pre|code|h1|h2|h3|h4|h5|h6|ul|ol|li|form|input|textarea|legend|fieldset|select|option|blockquote|cite|br|hr|dd|dl|dt|address|a|button|abbr|acronym|script|link|style|bdo|ins|del|object|param|col|colgroup|optgroup|caption|label|dfn|kbd|samp|var".split("|"),b,c=0;b=a[c++];)window["$"+b]=DOM.Builder.tagFunc(b)})();
DOM.Builder.fromHTML=function(a){var b;if(!(b=arguments.callee._root))b=arguments.callee._root=document.createElement("div");b.innerHTML=a;return b.childNodes[0]};Object.extend(Event,{onReady:function(a){document.body?a():document.observe("dom:loaded",a)}});
Event.addBehavior=function(a){var b=this.addBehavior;Object.extend(b.rules,a);if(!b.responderApplied){Ajax.Responders.register({onComplete:function(){Event.addBehavior.reassignAfterAjax&&setTimeout(function(){b.reload()},10)}});b.responderApplied=true}b.autoTrigger&&this.onReady(b.load.bind(b,a))};
Object.extend(Event.addBehavior,{rules:{},cache:[],reassignAfterAjax:false,autoTrigger:true,load:function(a){for(var b in a){var c=a[b],f=b.split(",");f.each(function(d){d=d.split(/:(?=[a-z]+$)/);var g=d[0],h=d[1];$$(g).each(function(e){if(h){c=Event.addBehavior._wrapObserver(c);$(e).observe(h,c);Event.addBehavior.cache.push([e,h,c])}else if(!e.$$assigned||!e.$$assigned.include(c)){c.attach?c.attach(e):c.call($(e));e.$$assigned=e.$$assigned||[];e.$$assigned.push(c)}})})}},unload:function(){this.cache.each(function(a){Event.stopObserving.apply(Event,
a)});this.cache=[]},reload:function(){var a=Event.addBehavior;a.unload();a.load(a.rules)},_wrapObserver:function(a){return function(b){a.call(this,b)===false&&b.stop()}}});Event.observe(window,"unload",Event.addBehavior.unload.bind(Event.addBehavior));$$$=Event.addBehavior.bind(Event);
var Behavior={create:function(){var a=null,b=$A(arguments);if(Object.isFunction(b[0]))a=b.shift();function c(){var d=arguments.callee;if(this.initialize){g=arguments.length==2&&arguments[1]instanceof Array?arguments[1]:Array.prototype.slice.call(arguments,1);this.element=$(arguments[0]);this.initialize.apply(this,g);d._bindEvents(this);d.instances.push(this)}else{var g=$A(arguments);return function(){var h=[this].concat(g);d.attach.apply(d,h)}}}Object.extend(c,Class.Methods);Object.extend(c,Behavior.Methods);
c.superclass=a;c.subclasses=[];c.instances=[];if(a){var f=function(){};f.prototype=a.prototype;c.prototype=new f;a.subclasses.push(c)}for(a=0;a<b.length;a++)c.addMethods(b[a]);if(!c.prototype.initialize)c.prototype.initialize=Prototype.emptyFunction;return c.prototype.constructor=c},Methods:{attach:function(a){return new this(a,Array.prototype.slice.call(arguments,1))},_bindEvents:function(a){for(var b in a)b.match(/^on(.+)/)&&typeof a[b]=="function"&&a.element.observe(RegExp.$1,Event.addBehavior._wrapObserver(a[b].bindAsEventListener(a)))}}};
Remote=Behavior.create({initialize:function(a){if(this.element.nodeName=="FORM")new Remote.Form(this.element,a);else new Remote.Link(this.element,a)}});Remote.Base={initialize:function(a){this.options=Object.extend({evaluateScripts:true},a||{})},_makeRequest:function(a){if(a.update)new Ajax.Updater(a.update,a.url,a);else new Ajax.Request(a.url,a);return false}};Remote.Link=Behavior.create(Remote.Base,{onclick:function(){var a=Object.extend({url:this.element.href,method:"get"},this.options);return this._makeRequest(a)}});
Remote.Form=Behavior.create(Remote.Base,{onclick:function(a){a=a.element();if(["input","button"].include(a.nodeName.toLowerCase())&&a.type=="submit")this._submitButton=a},onsubmit:function(){var a=Object.extend({url:this.element.action,method:this.element.method||"get",parameters:this.element.serialize({submit:this._submitButton.name})},this.options);this._submitButton=null;return this._makeRequest(a)}});
Observed=Behavior.create({initialize:function(a,b){this.callback=a.bind(this);this.options=b||{};this.observer=this.element.nodeName=="FORM"?this._observeForm():this._observeField()},stop:function(){this.observer.stop()},_observeForm:function(){return this.options.frequency?new Form.Observer(this.element,this.options.frequency,this.callback):new Form.EventObserver(this.element,this.callback)},_observeField:function(){return this.options.frequency?new Form.Element.Observer(this.element,this.options.frequency,
this.callback):new Form.Element.EventObserver(this.element,this.callback)}});function windowsLoaderAdd(a){windowsLoader[windowsLoader.length]=a}function windowsLoadFunc(){for(i=0;i<windowsLoader.length;i++)eval(windowsLoader[i])}function loadFunc(){window.onload=windowsLoadFunc}windowsLoader=[];
function popUp(a,b,c,f,d){var g=(screen.width-c)/2,h=(screen.height-f)/2;winProp="width="+c+",height="+f+",left="+g+",top="+h+",scrollbars="+d+",resizable";Win=window.open(a,b,winProp);parseInt(navigator.appVersion)>=4&&Win.window.focus()}function verify_country(a,b){if(b=document.getElementById(b))b.disabled=a.options[a.selectedIndex].text=="United States of America"?false:true}
function findPosX(a){var b=0;if(a.offsetParent)for(;1;){b+=a.offsetLeft;if(!a.offsetParent)break;a=a.offsetParent}else if(a.x)b+=a.x;return b}function findPosY(a){var b=0;if(a.offsetParent)for(;1;){b+=a.offsetTop;if(!a.offsetParent)break;a=a.offsetParent}else if(a.y)b+=a.y;return b}function Delete(a){return window.confirm(a)};