/*
sacy javascript cache dump 

This dump has been created from the following files:
    - <root>/jslib/ordertools.js
    - <root>/jslib/jqueryui/ui.core.js
    - <root>/jslib/jqueryui/ui.sortable.js
    - <root>/jslib/jqueryui/ui.tabs.js
    - <root>/jslib/jqueryui/effects.core.js
    - <root>/jslib/jqueryui/effects.pulsate.js
    - <root>/jslib/jqueryui/effects.highlight.js
    - <root>/jslib/jquery.livequery.min.js
    - <root>/jslib/jquery.scrollTo.js
    - <root>/jslib/jquery.getUrlParam.js
    - <root>/jslib/jquery.json.js
    - <root>/jslib/message_tools.js
    - <root>/jslib/popscan.js
    - <root>/jslib/popscan.url.js
    - <root>/jslib/popscan.messagedialog.js
    - <root>/jslib/ui.js
    - <root>/jslib/pstools.js
    - <root>/jslib/thickbox.js
    - <root>/jslib/task_progress.js
*/


/* <root>/jslib/ordertools.js */

var ordersets={};function addSet(prod,totalgroup){var set=Object.clone(prod);set['totalgroup']=totalgroup;set['quant']=set['quantity'];ordersets[prod['key']]=set;}
function updateLineTotal(q,key,totalgroup){console.log("*** Deprecation Warning: updateLineTotal is deprecated! "+"Please use PopScan.LineItemTools.updateLineTotal from "+"line_item_tools.js");return PopScan.LineItemTools.updateLineTotal(q,key,totalgroup);}
function calcTotal(totalgroup){console.log("*** Deprecation Warning: calcTotal is deprecated! "+"Please use PopScan.OrderBusinessLogic.calcTotal from "+"order_business_logic.js");return PopScan.OrderBusinessLogic.calcTotal(totalgroup);}
function updateFooter(gross_value,withoutextart){console.log("*** Deprecation Warning: updateFooter is deprecated! "+"Please use PopScan.OrderBusinessLogic.handleRebates from "+"order_business_logic.js");return PopScan.OrderBusinessLogic.handleRebates(gross_value,withoutextart);}
function validateQuantity(qmax,q,key,allowfraction,vendorid){console.log("*** Deprecation Warning: validateQuantity is deprecated! "+"Please use PopScan.LineItemTools.validateQuantity from "+"line_item_tools.js");return PopScan.LineItemTools.validateQuantity(qmax,q,key,allowfraction,vendorid);}
function validateMinOrd(key,totalgroup){console.log("*** Deprecation Warning: validateMinOrd is deprecated! "+"Please use PopScan.LineItemTools.validateMinOrd from "+"line_item_tools.js");return PopScan.LineItemTools.validateMinOrd(key,totalgroup);}
function updateToServer(quant,art){console.log("*** Deprecation Warning: updateToServer is deprecated! "+"Please use PopScan.LineItemTools.updateToServer from "+"line_item_tools.js");return PopScan.LineItemTools.updateToServer(quant,art);}
function updateQuantityAs(quantity_as,key,totalgroup){console.log("*** Deprecation Warning: updateQuantityAs is deprecated! "+"Please use PopScan.LineItemTools.updateQuantityAs from "+"line_item_tools.js");return PopScan.LineItemTools.updateQuantityAs(quantity_as,key,totalgroup);}
function updateRemark(prodid,remark){console.log("*** Deprecation Warning: updateRemark is deprecated! "+"Please use PopScan.LineItemTools.updateRemark from "+"line_item_tools.js");return PopScan.LineItemTools.updateRemark(prodid,remark);}
function showOrderDates(prodid){console.log("*** Deprecation Warning: showOrderDates is deprecated! "+"Please use PopScan.OrderBusinessLogic.showOrderDates from "+"order_business_logic.js");return PopScan.OrderBusinessLogic.showOrderDates(prodid);}
function addArticle(prodid,quant,quantas,silent){console.log("*** Deprecation Warning: addArticle is deprecated! "+"Please use PopScan.LineItemTools.addArticle from "+"line_item_tools.js");return PopScan.LineItemTools.addArticle(prodid,quant,quantas,silent);}
function addToTemplate(tid,prodid,quant,quantas,callback){console.log("*** Deprecation Warning: addToTemplate is deprecated! "+"Please use PopScan.LineItemTools.addToTemplate from "+"line_item_tools.js");return PopScan.LineItemTools.addToTemplate(tid,prodid,quant,quantas,callback);}
function checkMinOrd(vendor){console.log("*** Deprecation Warning: checkMinOrd is deprecated! "+"Please use PopScan.OrderBusinessLogic.checkMinOrd from "+"order_business_logic.js");return PopScan.OrderBusinessLogic.checkMinOrd(vendor);}
function checkQuantityNotZero(vendor){console.log("*** Deprecation Warning: checkQuantityNotZero is deprecated! "+"Please use PopScan.OrderBusinessLogic.checkQuantityNotZero from "+"order_business_logic.js");return PopScan.OrderBusinessLogic.checkQuantityNotZero(vendor);}
function checkStatus(vendor){console.log("*** Deprecation Warning: checkStatus is deprecated! "+"Please use PopScan.OrderBusinessLogic.checkStatus from "+"order_business_logic.js");return PopScan.OrderBusinessLogic.checkStatus(vendor);}
function checkDeliverySizes(vendor){console.log("*** Deprecation Warning: checkDeliverySizes is deprecated! "+"Please use PopScan.OrderBusinessLogic.checkDeliverySizes from "+"order_business_logic.js");return PopScan.OrderBusinessLogic.checkDeliverySizes(vendor);}
function checkMinTotal(vendor){console.log("*** Deprecation Warning: checkMinTotal is deprecated! "+"Please use PopScan.OrderBusinessLogic.checkMinTotal from "+"order_business_logic.js");return PopScan.OrderBusinessLogic.checkMinTotal(vendor);}
function updateSavings(){console.log("*** Deprecation Warning: updateSavings is deprecated! "+"Please use PopScan.OrderBusinessLogic.updateSavings from "+"order_business_logic.js");return PopScan.OrderBusinessLogic.updateSavings();}
function sendMessageSeen(mids){console.log("*** Deprecation Warning: sendMessageSeen is deprecated! "+"Please use PopScan.MessageTools.sendMessageSeen from "+"message_tools.js");return PopScan.MessageTools.sendMessageSeen(mids);}
function showMessage(){console.log("*** Deprecation Warning: showMessage is deprecated! "+"Please use PopScan.MessageTools.showMessage from "+"message_tools.js");return PopScan.MessageTools.showMessage();}
function changeSortimentState(prodid,state){console.log("*** Deprecation Warning: changeSortimentState is deprecated! "+"Please use PopScan.LineItemTools.changeSortimentState from "+"line_item_tools.js");return PopScan.LineItemTools.changeSortimentState(prodid,state);}
/* <root>/jslib/jqueryui/ui.core.js */
;jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7.2",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]]);}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return;}
for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args);}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b);},hasScroll:function(el,a){if($(el).css('overflow')=='hidden'){return false;}
var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(el[scroll]>0){return true;}
el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has;},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size));},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width);},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=='role'?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)));};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""));}):removeAttr.call(this,name));};}
$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove");});return _remove.apply(this,arguments);},enableSelection:function(){return this.attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui');},disableSelection:function(){return this.attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false;});},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css('position')))||(/absolute/).test(this.css('position'))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,'position',1))&&(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));}).eq(0);}
return(/fixed/).test(this.css('position'))||!scrollParent.length?$(document):scrollParent;}});$.extend($.expr[':'],{data:function(elem,i,match){return!!$.data(elem,match[3]);},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,'tabindex');return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:'a'==nodeName||'area'==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)['area'==nodeName?'parents':'closest'](':hidden').length;},tabbable:function(element){var tabIndex=$.attr(element,'tabindex');return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(':focusable');}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods);}
var methods=getMethods('getter');if(args.length==1&&typeof args[0]=='string'){methods=methods.concat(getMethods('getterSetter'));}
return($.inArray(method,methods)!=-1);}
$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this;}
if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined);}
return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args));});};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind('setData.'+name,function(event,key,value){if(event.target==element){return self._setData(key,value);}}).bind('getData.'+name,function(event,key){if(event.target==element){return self._getData(key);}}).bind('remove',function(){return self.destroy();});};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter='option';};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').removeAttr('aria-disabled');},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key);}
options={};options[key]=value;}
$.each(options,function(key,value){self._setData(key,value);});},_getData:function(key){return this.options[key];},_setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element
[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled'+' '+
this.namespace+'-state-disabled').attr("aria-disabled",value);}},enable:function(){this._setData('disabled',false);},disable:function(){this._setData('disabled',true);},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop];}}
this.element.trigger(event,data);return!($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented());}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(event){return self._mouseDown(event);}).bind('click.'+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false;}});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on');}
this.started=false;},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable));},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return;}
(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true;}
this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true;},this.options.delay);}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true;}}
this._mouseMoveDelegate=function(event){return self._mouseMove(event);};this._mouseUpDelegate=function(event){return self._mouseUp(event);};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true;},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event);}
if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault();}
if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event));}
return!this._mouseStarted;},_mouseUp:function(event){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event);}
return false;},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance);},_mouseDelayMet:function(event){return this.mouseDelayMet;},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true;}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};})(jQuery);
/* <root>/jslib/jqueryui/ui.sortable.js */

(function($){$.widget("ui.sortable",$.extend({},$.ui.mouse,{_init:function(){var o=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css('float')):false;this.offset=this.element.offset();this._mouseInit();},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--)
this.items[i].item.removeData("sortable-item");},_mouseCapture:function(event,overrideHandle){if(this.reverting){return false;}
if(this.options.disabled||this.options.type=='static')return false;this._refreshItems(event);var currentItem=null,self=this,nodes=$(event.target).parents().each(function(){if($.data(this,'sortable-item')==self){currentItem=$(this);return false;}});if($.data(event.target,'sortable-item')==self)currentItem=$(event.target);if(!currentItem)return false;if(this.options.handle&&!overrideHandle){var validHandle=false;$(this.options.handle,currentItem).find("*").andSelf().each(function(){if(this==event.target)validHandle=true;});if(!validHandle)return false;}
this.currentItem=currentItem;this._removeCurrentsFromItems();return true;},_mouseStart:function(event,overrideHandle,noActivation){var o=this.options,self=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt)
this._adjustOffsetFromHelper(o.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide();}
this._createPlaceholder();if(o.containment)
this._setContainment();if(o.cursor){if($('body').css("cursor"))this._storedCursor=$('body').css("cursor");$('body').css("cursor",o.cursor);}
if(o.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",o.opacity);}
if(o.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",o.zIndex);}
if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!='HTML')
this.overflowOffset=this.scrollParent.offset();this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions)
this._cacheHelperProportions();if(!noActivation){for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("activate",event,self._uiHash(this));}}
if($.ui.ddmanager)
$.ui.ddmanager.current=this;if($.ui.ddmanager&&!o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(this,event);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(event);return true;},_mouseDrag:function(event){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs;}
if(this.options.scroll){var o=this.options,scrolled=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!='HTML'){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity)
this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed;else if(event.pageY-this.overflowOffset.top<o.scrollSensitivity)
this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed;if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity)
this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed;else if(event.pageX-this.overflowOffset.left<o.scrollSensitivity)
this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed;}else{if(event.pageY-$(document).scrollTop()<o.scrollSensitivity)
scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed);else if($(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity)
scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed);if(event.pageX-$(document).scrollLeft()<o.scrollSensitivity)
scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed);else if($(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity)
scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed);}
if(scrolled!==false&&$.ui.ddmanager&&!o.dropBehaviour)
$.ui.ddmanager.prepareOffsets(this,event);}
this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+'px';if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+'px';for(var i=this.items.length-1;i>=0;i--){var item=this.items[i],itemElement=item.item[0],intersection=this._intersectsWithPointer(item);if(!intersection)continue;if(itemElement!=this.currentItem[0]&&this.placeholder[intersection==1?"next":"prev"]()[0]!=itemElement&&!$.ui.contains(this.placeholder[0],itemElement)&&(this.options.type=='semi-dynamic'?!$.ui.contains(this.element[0],itemElement):true)){this.direction=intersection==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item);}else{break;}
this._trigger("change",event,this._uiHash());break;}}
this._contactContainers(event);if($.ui.ddmanager)$.ui.ddmanager.drag(this,event);this._trigger('sort',event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false;},_mouseStop:function(event,noPropagation){if(!event)return;if($.ui.ddmanager&&!this.options.dropBehaviour)
$.ui.ddmanager.drop(this,event);if(this.options.revert){var self=this;var cur=self.placeholder.offset();self.reverting=true;$(this.helper).animate({left:cur.left-this.offset.parent.left-self.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:cur.top-this.offset.parent.top-self.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){self._clear(event);});}else{this._clear(event,noPropagation);}
return false;},cancel:function(){var self=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original")
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");else
this.currentItem.show();for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,self._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",null,self._uiHash(this));this.containers[i].containerCache.over=0;}}}
if(this.placeholder[0].parentNode)this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode)this.helper.remove();$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$(this.domPosition.prev).after(this.currentItem);}else{$(this.domPosition.parent).prepend(this.currentItem);}
return true;},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||'id')||'').match(o.expression||(/(.+)[-=_](.+)/));if(res)str.push((o.key||res[1]+'[]')+'='+(o.key&&o.expression?res[1]:res[2]));});return str.join('&');},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute||'id')||'');});return ret;},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var isOverElement=(y1+dyClick)>t&&(y1+dyClick)<b&&(x1+dxClick)>l&&(x1+dxClick)<r;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?'width':'height']>item[this.floating?'width':'height'])){return isOverElement;}else{return(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b);}},_intersectsWithPointer:function(item){var isOverElementHeight=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width),isOverElement=isOverElementHeight&&isOverElementWidth,verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(!isOverElement)
return false;return this.floating?(((horizontalDirection&&horizontalDirection=="right")||verticalDirection=="down")?2:1):(verticalDirection&&(verticalDirection=="down"?2:1));},_intersectsWithSides:function(item){var isOverBottomHalf=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+(item.height/2),item.height),isOverRightHalf=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+(item.width/2),item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return((horizontalDirection=="right"&&isOverRightHalf)||(horizontalDirection=="left"&&!isOverRightHalf));}else{return verticalDirection&&((verticalDirection=="down"&&isOverBottomHalf)||(verticalDirection=="up"&&!isOverBottomHalf));}},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return delta!=0&&(delta>0?"down":"up");},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!=0&&(delta>0?"right":"left");},refresh:function(event){this._refreshItems(event);this.refreshPositions();},_connectWith:function(){var options=this.options;return options.connectWith.constructor==String?[options.connectWith]:options.connectWith;},_getItemsAsjQuery:function(connected){var self=this;var items=[];var queries=[];var connectWith=this._connectWith();if(connectWith&&connected){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],'sortable');if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper"),inst]);}};};}
queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var i=queries.length-1;i>=0;i--){queries[i][0].each(function(){items.push(this);});};return $(items);},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data(sortable-item)");for(var i=0;i<this.items.length;i++){for(var j=0;j<list.length;j++){if(list[j]==this.items[i].item[0])
this.items.splice(i,1);};};},_refreshItems:function(event){this.items=[];this.containers=[this];var items=this.items;var self=this;var queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]];var connectWith=this._connectWith();if(connectWith){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],'sortable');if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst);}};};}
for(var i=queries.length-1;i>=0;i--){var targetData=queries[i][1];var _queries=queries[i][0];for(var j=0,queriesLength=_queries.length;j<queriesLength;j++){var item=$(_queries[j]);item.data('sortable-item',targetData);items.push({item:item,instance:targetData,width:0,height:0,left:0,top:0});};};},refreshPositions:function(fast){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset();}
for(var i=this.items.length-1;i>=0;i--){var item=this.items[i];if(item.instance!=this.currentContainer&&this.currentContainer&&item.item[0]!=this.currentItem[0])
continue;var t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight();}
var p=t.offset();item.left=p.left;item.top=p.top;};if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this);}else{for(var i=this.containers.length-1;i>=0;i--){var p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight();};}},_createPlaceholder:function(that){var self=that||this,o=self.options;if(!o.placeholder||o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){var el=$(document.createElement(self.currentItem[0].nodeName)).addClass(className||self.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!className)
el.style.visibility="hidden";return el;},update:function(container,p){if(className&&!o.forcePlaceholderSize)return;if(!p.height()){p.height(self.currentItem.innerHeight()-parseInt(self.currentItem.css('paddingTop')||0,10)-parseInt(self.currentItem.css('paddingBottom')||0,10));};if(!p.width()){p.width(self.currentItem.innerWidth()-parseInt(self.currentItem.css('paddingLeft')||0,10)-parseInt(self.currentItem.css('paddingRight')||0,10));};}};}
self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem));self.currentItem.after(self.placeholder);o.placeholder.update(self,self.placeholder);},_contactContainers:function(event){for(var i=this.containers.length-1;i>=0;i--){if(this._intersectsWith(this.containers[i].containerCache)){if(!this.containers[i].containerCache.over){if(this.currentContainer!=this.containers[i]){var dist=10000;var itemWithLeastDistance=null;var base=this.positionAbs[this.containers[i].floating?'left':'top'];for(var j=this.items.length-1;j>=0;j--){if(!$.ui.contains(this.containers[i].element[0],this.items[j].item[0]))continue;var cur=this.items[j][this.containers[i].floating?'left':'top'];if(Math.abs(cur-base)<dist){dist=Math.abs(cur-base);itemWithLeastDistance=this.items[j];}}
if(!itemWithLeastDistance&&!this.options.dropOnEmpty)
continue;this.currentContainer=this.containers[i];itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,true):this._rearrange(event,null,this.containers[i].element,true);this._trigger("change",event,this._uiHash());this.containers[i]._trigger("change",event,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);}
this.containers[i]._trigger("over",event,this._uiHash(this));this.containers[i].containerCache.over=1;}}else{if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0;}}};},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):(o.helper=='clone'?this.currentItem.clone():this.currentItem);if(!helper.parents('body').length)
$(o.appendTo!='parent'?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0]);if(helper[0]==this.currentItem[0])
this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(helper[0].style.width==''||o.forceHelperSize)helper.width(this.currentItem.width());if(helper[0].style.height==''||o.forceHelperSize)helper.height(this.currentItem.height());return helper;},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined)this.offset.click.left=obj.left+this.margins.left;if(obj.right!=undefined)this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left;if(obj.top!=undefined)this.offset.click.top=obj.top+this.margins.top;if(obj.bottom!=undefined)this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top;},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=='absolute'&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop();}
if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=='html'&&$.browser.msie))
po={top:0,left:0};return{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()};}else{return{top:0,left:0};}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)};},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};},_setContainment:function(){var o=this.options;if(o.containment=='parent')o.containment=this.helper[0].parentNode;if(o.containment=='document'||o.containment=='window')this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=='document'?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=='document'?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!(/^(document|window|parent)$/).test(o.containment)){var ce=$(o.containment)[0];var co=$(o.containment).offset();var over=($(ce).css("overflow")!='hidden');this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top];}},_convertPositionTo:function(d,pos){if(!pos)pos=this.position;var mod=d=="absolute"?1:-1;var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top
+this.offset.relative.top*mod
+this.offset.parent.top*mod
-($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left
+this.offset.relative.left*mod
+this.offset.parent.left*mod
-($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod))};},_generatePosition:function(event){var o=this.options,scroll=this.cssPosition=='absolute'&&!(this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=='relative'&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset();}
var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0])pageX=this.containment[0]+this.offset.click.left;if(event.pageY-this.offset.click.top<this.containment[1])pageY=this.containment[1]+this.offset.click.top;if(event.pageX-this.offset.click.left>this.containment[2])pageX=this.containment[2]+this.offset.click.left;if(event.pageY-this.offset.click.top>this.containment[3])pageY=this.containment[3]+this.offset.click.top;}
if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left;}}
return{top:(pageY
-this.offset.click.top
-this.offset.relative.top
-this.offset.parent.top
+($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX
-this.offset.click.left
-this.offset.relative.left
-this.offset.parent.left
+($.browser.safari&&this.cssPosition=='fixed'?0:(this.cssPosition=='fixed'?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))};},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=='down'?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var self=this,counter=this.counter;window.setTimeout(function(){if(counter==self.counter)self.refreshPositions(!hardRefresh);},0);},_clear:function(event,noPropagation){this.reverting=false;var delayedTriggers=[],self=this;if(!this._noFinalSort&&this.currentItem[0].parentNode)this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS){if(this._storedCSS[i]=='auto'||this._storedCSS[i]=='static')this._storedCSS[i]='';}
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");}else{this.currentItem.show();}
if(this.fromOutside&&!noPropagation)delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside));});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!noPropagation)delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash());});if(!$.ui.contains(this.element[0],this.currentItem[0])){if(!noPropagation)delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash());});for(var i=this.containers.length-1;i>=0;i--){if($.ui.contains(this.containers[i].element[0],this.currentItem[0])&&!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("receive",event,this._uiHash(this));};}).call(this,this.containers[i]));delayedTriggers.push((function(c){return function(event){c._trigger("update",event,this._uiHash(this));};}).call(this,this.containers[i]));}};};for(var i=this.containers.length-1;i>=0;i--){if(!noPropagation)delayedTriggers.push((function(c){return function(event){c._trigger("deactivate",event,this._uiHash(this));};}).call(this,this.containers[i]));if(this.containers[i].containerCache.over){delayedTriggers.push((function(c){return function(event){c._trigger("out",event,this._uiHash(this));};}).call(this,this.containers[i]));this.containers[i].containerCache.over=0;}}
if(this._storedCursor)$('body').css("cursor",this._storedCursor);if(this._storedOpacity)this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=='auto'?'':this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event);};this._trigger("stop",event,this._uiHash());}
return false;}
if(!noPropagation)this._trigger("beforeStop",event,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0])this.helper.remove();this.helper=null;if(!noPropagation){for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event);};this._trigger("stop",event,this._uiHash());}
this.fromOutside=false;return true;},_trigger:function(){if($.widget.prototype._trigger.apply(this,arguments)===false){this.cancel();}},_uiHash:function(inst){var self=inst||this;return{helper:self.helper,placeholder:self.placeholder||$([]),position:self.position,absolutePosition:self.positionAbs,offset:self.positionAbs,item:self.currentItem,sender:inst?inst.element:null};}}));$.extend($.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:'auto',cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:'> *',opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}});})(jQuery);
/* <root>/jslib/jqueryui/ui.tabs.js */

(function($){$.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable;}
this._tabify(true);},_setData:function(key,value){if(key=='selected'){if(this.options.collapsible&&value==this.options.selected){return;}
this.select(value);}
else{this.options[key]=value;if(key=='deselectable'){this.options.collapsible=value;}
this._tabify();}},_tabId:function(a){return a.title&&a.title.replace(/\s/g,'_').replace(/[^A-Za-z0-9\-_:\.]/g,'')||this.options.idPrefix+$.data(a);},_sanitizeSelector:function(hash){return hash.replace(/:/g,'\\:');},_cookie:function(){var cookie=this.cookie||(this.cookie=this.options.cookie.name||'ui-tabs-'+$.data(this.list[0]));return $.cookie.apply(null,[cookie].concat($.makeArray(arguments)));},_ui:function(tab,panel){return{tab:tab,panel:panel,index:this.anchors.index(tab)};},_cleanup:function(){this.lis.filter('.ui-state-processing').removeClass('ui-state-processing').find('span:data(label.tabs)').each(function(){var el=$(this);el.html(el.data('label.tabs')).removeData('label.tabs');});},_tabify:function(init){this.list=this.element.children('ul:first');this.lis=$('li:has(a[href])',this.list);this.anchors=this.lis.map(function(){return $('a',this)[0];});this.panels=$([]);var self=this,o=this.options;var fragmentId=/^#.+/;this.anchors.each(function(i,a){var href=$(a).attr('href');var hrefBase=href.split('#')[0],baseEl;if(hrefBase&&(hrefBase===location.toString().split('#')[0]||(baseEl=$('base')[0])&&hrefBase===baseEl.href)){href=a.hash;a.href=href;}
if(fragmentId.test(href)){self.panels=self.panels.add(self._sanitizeSelector(href));}
else if(href!='#'){$.data(a,'href.tabs',href);$.data(a,'load.tabs',href.replace(/#.*$/,''));var id=self._tabId(a);a.href='#'+id;var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).addClass('ui-tabs-panel ui-widget-content ui-corner-bottom').insertAfter(self.panels[i-1]||self.list);$panel.data('destroy.tabs',true);}
self.panels=self.panels.add($panel);}
else{o.disabled.push(i);}});if(init){this.element.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all');this.list.addClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');this.lis.addClass('ui-state-default ui-corner-top');this.panels.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom');if(o.selected===undefined){if(location.hash){this.anchors.each(function(i,a){if(a.hash==location.hash){o.selected=i;return false;}});}
if(typeof o.selected!='number'&&o.cookie){o.selected=parseInt(self._cookie(),10);}
if(typeof o.selected!='number'&&this.lis.filter('.ui-tabs-selected').length){o.selected=this.lis.index(this.lis.filter('.ui-tabs-selected'));}
o.selected=o.selected||0;}
else if(o.selected===null){o.selected=-1;}
o.selected=((o.selected>=0&&this.anchors[o.selected])||o.selected<0)?o.selected:0;o.disabled=$.unique(o.disabled.concat($.map(this.lis.filter('.ui-state-disabled'),function(n,i){return self.lis.index(n);}))).sort();if($.inArray(o.selected,o.disabled)!=-1){o.disabled.splice($.inArray(o.selected,o.disabled),1);}
this.panels.addClass('ui-tabs-hide');this.lis.removeClass('ui-tabs-selected ui-state-active');if(o.selected>=0&&this.anchors.length){this.panels.eq(o.selected).removeClass('ui-tabs-hide');this.lis.eq(o.selected).addClass('ui-tabs-selected ui-state-active');self.element.queue("tabs",function(){self._trigger('show',null,self._ui(self.anchors[o.selected],self.panels[o.selected]));});this.load(o.selected);}
$(window).bind('unload',function(){self.lis.add(self.anchors).unbind('.tabs');self.lis=self.anchors=self.panels=null;});}
else{o.selected=this.lis.index(this.lis.filter('.ui-tabs-selected'));}
this.element[o.collapsible?'addClass':'removeClass']('ui-tabs-collapsible');if(o.cookie){this._cookie(o.selected,o.cookie);}
for(var i=0,li;(li=this.lis[i]);i++){$(li)[$.inArray(i,o.disabled)!=-1&&!$(li).hasClass('ui-tabs-selected')?'addClass':'removeClass']('ui-state-disabled');}
if(o.cache===false){this.anchors.removeData('cache.tabs');}
this.lis.add(this.anchors).unbind('.tabs');if(o.event!='mouseover'){var addState=function(state,el){if(el.is(':not(.ui-state-disabled)')){el.addClass('ui-state-'+state);}};var removeState=function(state,el){el.removeClass('ui-state-'+state);};this.lis.bind('mouseover.tabs',function(){addState('hover',$(this));});this.lis.bind('mouseout.tabs',function(){removeState('hover',$(this));});this.anchors.bind('focus.tabs',function(){addState('focus',$(this).closest('li'));});this.anchors.bind('blur.tabs',function(){removeState('focus',$(this).closest('li'));});}
var hideFx,showFx;if(o.fx){if($.isArray(o.fx)){hideFx=o.fx[0];showFx=o.fx[1];}
else{hideFx=showFx=o.fx;}}
function resetStyle($el,fx){$el.css({display:''});if($.browser.msie&&fx.opacity){$el[0].style.removeAttribute('filter');}}
var showTab=showFx?function(clicked,$show){$(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');$show.hide().removeClass('ui-tabs-hide').animate(showFx,showFx.duration||'normal',function(){resetStyle($show,showFx);self._trigger('show',null,self._ui(clicked,$show[0]));});}:function(clicked,$show){$(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');$show.removeClass('ui-tabs-hide');self._trigger('show',null,self._ui(clicked,$show[0]));};var hideTab=hideFx?function(clicked,$hide){$hide.animate(hideFx,hideFx.duration||'normal',function(){self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');$hide.addClass('ui-tabs-hide');resetStyle($hide,hideFx);self.element.dequeue("tabs");});}:function(clicked,$hide,$show){self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');$hide.addClass('ui-tabs-hide');self.element.dequeue("tabs");};this.anchors.bind(o.event+'.tabs',function(){var el=this,$li=$(this).closest('li'),$hide=self.panels.filter(':not(.ui-tabs-hide)'),$show=$(self._sanitizeSelector(this.hash));if(($li.hasClass('ui-tabs-selected')&&!o.collapsible)||$li.hasClass('ui-state-disabled')||$li.hasClass('ui-state-processing')||self._trigger('select',null,self._ui(this,$show[0]))===false){this.blur();return false;}
o.selected=self.anchors.index(this);self.abort();if(o.collapsible){if($li.hasClass('ui-tabs-selected')){o.selected=-1;if(o.cookie){self._cookie(o.selected,o.cookie);}
self.element.queue("tabs",function(){hideTab(el,$hide);}).dequeue("tabs");this.blur();return false;}
else if(!$hide.length){if(o.cookie){self._cookie(o.selected,o.cookie);}
self.element.queue("tabs",function(){showTab(el,$show);});self.load(self.anchors.index(this));this.blur();return false;}}
if(o.cookie){self._cookie(o.selected,o.cookie);}
if($show.length){if($hide.length){self.element.queue("tabs",function(){hideTab(el,$hide);});}
self.element.queue("tabs",function(){showTab(el,$show);});self.load(self.anchors.index(this));}
else{throw'jQuery UI Tabs: Mismatching fragment identifier.';}
if($.browser.msie){this.blur();}});this.anchors.bind('click.tabs',function(){return false;});},destroy:function(){var o=this.options;this.abort();this.element.unbind('.tabs').removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible').removeData('tabs');this.list.removeClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');this.anchors.each(function(){var href=$.data(this,'href.tabs');if(href){this.href=href;}
var $this=$(this).unbind('.tabs');$.each(['href','load','cache'],function(i,prefix){$this.removeData(prefix+'.tabs');});});this.lis.unbind('.tabs').add(this.panels).each(function(){if($.data(this,'destroy.tabs')){$(this).remove();}
else{$(this).removeClass(['ui-state-default','ui-corner-top','ui-tabs-selected','ui-state-active','ui-state-hover','ui-state-focus','ui-state-disabled','ui-tabs-panel','ui-widget-content','ui-corner-bottom','ui-tabs-hide'].join(' '));}});if(o.cookie){this._cookie(null,o.cookie);}},add:function(url,label,index){if(index===undefined){index=this.anchors.length;}
var self=this,o=this.options,$li=$(o.tabTemplate.replace(/#\{href\}/g,url).replace(/#\{label\}/g,label)),id=!url.indexOf('#')?url.replace('#',''):this._tabId($('a',$li)[0]);$li.addClass('ui-state-default ui-corner-top').data('destroy.tabs',true);var $panel=$('#'+id);if(!$panel.length){$panel=$(o.panelTemplate).attr('id',id).data('destroy.tabs',true);}
$panel.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide');if(index>=this.lis.length){$li.appendTo(this.list);$panel.appendTo(this.list[0].parentNode);}
else{$li.insertBefore(this.lis[index]);$panel.insertBefore(this.panels[index]);}
o.disabled=$.map(o.disabled,function(n,i){return n>=index?++n:n;});this._tabify();if(this.anchors.length==1){$li.addClass('ui-tabs-selected ui-state-active');$panel.removeClass('ui-tabs-hide');this.element.queue("tabs",function(){self._trigger('show',null,self._ui(self.anchors[0],self.panels[0]));});this.load(0);}
this._trigger('add',null,this._ui(this.anchors[index],this.panels[index]));},remove:function(index){var o=this.options,$li=this.lis.eq(index).remove(),$panel=this.panels.eq(index).remove();if($li.hasClass('ui-tabs-selected')&&this.anchors.length>1){this.select(index+(index+1<this.anchors.length?1:-1));}
o.disabled=$.map($.grep(o.disabled,function(n,i){return n!=index;}),function(n,i){return n>=index?--n:n;});this._tabify();this._trigger('remove',null,this._ui($li.find('a')[0],$panel[0]));},enable:function(index){var o=this.options;if($.inArray(index,o.disabled)==-1){return;}
this.lis.eq(index).removeClass('ui-state-disabled');o.disabled=$.grep(o.disabled,function(n,i){return n!=index;});this._trigger('enable',null,this._ui(this.anchors[index],this.panels[index]));},disable:function(index){var self=this,o=this.options;if(index!=o.selected){this.lis.eq(index).addClass('ui-state-disabled');o.disabled.push(index);o.disabled.sort();this._trigger('disable',null,this._ui(this.anchors[index],this.panels[index]));}},select:function(index){if(typeof index=='string'){index=this.anchors.index(this.anchors.filter('[href$='+index+']'));}
else if(index===null){index=-1;}
if(index==-1&&this.options.collapsible){index=this.options.selected;}
this.anchors.eq(index).trigger(this.options.event+'.tabs');},load:function(index){var self=this,o=this.options,a=this.anchors.eq(index)[0],url=$.data(a,'load.tabs');this.abort();if(!url||this.element.queue("tabs").length!==0&&$.data(a,'cache.tabs')){this.element.dequeue("tabs");return;}
this.lis.eq(index).addClass('ui-state-processing');if(o.spinner){var span=$('span',a);span.data('label.tabs',span.html()).html(o.spinner);}
this.xhr=$.ajax($.extend({},o.ajaxOptions,{url:url,success:function(r,s){$(self._sanitizeSelector(a.hash)).html(r);self._cleanup();if(o.cache){$.data(a,'cache.tabs',true);}
self._trigger('load',null,self._ui(self.anchors[index],self.panels[index]));try{o.ajaxOptions.success(r,s);}
catch(e){}
self.element.dequeue("tabs");}}));},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr;}
this._cleanup();},url:function(index,url){this.anchors.eq(index).removeData('cache.tabs').data('load.tabs',url);},length:function(){return this.anchors.length;}});$.extend($.ui.tabs,{version:'1.7.2',getter:'length',defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:'click',fx:null,idPrefix:'ui-tabs-',panelTemplate:'<div></div>',spinner:'<em>Loading&#8230;</em>',tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});$.extend($.ui.tabs.prototype,{rotation:null,rotate:function(ms,continuing){var self=this,o=this.options;var rotate=self._rotate||(self._rotate=function(e){clearTimeout(self.rotation);self.rotation=setTimeout(function(){var t=o.selected;self.select(++t<self.anchors.length?t:0);},ms);if(e){e.stopPropagation();}});var stop=self._unrotate||(self._unrotate=!continuing?function(e){if(e.clientX){self.rotate(null);}}:function(e){t=o.selected;rotate();});if(ms){this.element.bind('tabsshow',rotate);this.anchors.bind(o.event+'.tabs',stop);rotate();}
else{clearTimeout(self.rotation);this.element.unbind('tabsshow',rotate);this.anchors.unbind(o.event+'.tabs',stop);delete this._rotate;delete this._unrotate;}}});})(jQuery);
/* <root>/jslib/jqueryui/effects.core.js */
;jQuery.effects||(function($){$.effects={version:"1.7.2",save:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null)element.data("ec.storage."+set[i],element[0].style[set[i]]);}},restore:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null)element.css(set[i],element.data("ec.storage."+set[i]));}},setMode:function(el,mode){if(mode=='toggle')mode=el.is(':hidden')?'show':'hide';return mode;},getBaseline:function(origin,original){var y,x;switch(origin[0]){case'top':y=0;break;case'middle':y=0.5;break;case'bottom':y=1;break;default:y=origin[0]/original.height;};switch(origin[1]){case'left':x=0;break;case'center':x=0.5;break;case'right':x=1;break;default:x=origin[1]/original.width;};return{x:x,y:y};},createWrapper:function(element){if(element.parent().is('.ui-effects-wrapper'))
return element.parent();var props={width:element.outerWidth(true),height:element.outerHeight(true),'float':element.css('float')};element.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var wrapper=element.parent();if(element.css('position')=='static'){wrapper.css({position:'relative'});element.css({position:'relative'});}else{var top=element.css('top');if(isNaN(parseInt(top,10)))top='auto';var left=element.css('left');if(isNaN(parseInt(left,10)))left='auto';wrapper.css({position:element.css('position'),top:top,left:left,zIndex:element.css('z-index')}).show();element.css({position:'relative',top:0,left:0});}
wrapper.css(props);return wrapper;},removeWrapper:function(element){if(element.parent().is('.ui-effects-wrapper'))
return element.parent().replaceWith(element);return element;},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){unit=element.cssUnit(x);if(unit[0]>0)value[x]=unit[0]*factor+unit[1];});return value;},animateClass:function(value,duration,easing,callback){var cb=(typeof easing=="function"?easing:(callback?callback:null));var ea=(typeof easing=="string"?easing:null);return this.each(function(){var offset={};var that=$(this);var oldStyleAttr=that.attr("style")||'';if(typeof oldStyleAttr=='object')oldStyleAttr=oldStyleAttr["cssText"];if(value.toggle){that.hasClass(value.toggle)?value.remove=value.toggle:value.add=value.toggle;}
var oldStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add)that.addClass(value.add);if(value.remove)that.removeClass(value.remove);var newStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add)that.removeClass(value.add);if(value.remove)that.addClass(value.remove);for(var n in newStyle){if(typeof newStyle[n]!="function"&&newStyle[n]&&n.indexOf("Moz")==-1&&n.indexOf("length")==-1&&newStyle[n]!=oldStyle[n]&&(n.match(/color/i)||(!n.match(/color/i)&&!isNaN(parseInt(newStyle[n],10))))&&(oldStyle.position!="static"||(oldStyle.position=="static"&&!n.match(/left|top|bottom|right/))))offset[n]=newStyle[n];}
that.animate(offset,duration,ea,function(){if(typeof $(this).attr("style")=='object'){$(this).attr("style")["cssText"]="";$(this).attr("style")["cssText"]=oldStyleAttr;}else $(this).attr("style",oldStyleAttr);if(value.add)$(this).addClass(value.add);if(value.remove)$(this).removeClass(value.remove);if(cb)cb.apply(this,arguments);});});}};function _normalizeArguments(a,m){var o=a[1]&&a[1].constructor==Object?a[1]:{};if(m)o.mode=m;var speed=a[1]&&a[1].constructor!=Object?a[1]:(o.duration?o.duration:a[2]);speed=$.fx.off?0:typeof speed==="number"?speed:$.fx.speeds[speed]||$.fx.speeds._default;var callback=o.callback||($.isFunction(a[1])&&a[1])||($.isFunction(a[2])&&a[2])||($.isFunction(a[3])&&a[3]);return[a[0],o,speed,callback];}
$.fn.extend({_show:$.fn.show,_hide:$.fn.hide,__toggle:$.fn.toggle,_addClass:$.fn.addClass,_removeClass:$.fn.removeClass,_toggleClass:$.fn.toggleClass,effect:function(fx,options,speed,callback){return $.effects[fx]?$.effects[fx].call(this,{method:fx,options:options||{},duration:speed,callback:callback}):null;},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0])))
return this._show.apply(this,arguments);else{return this.effect.apply(this,_normalizeArguments(arguments,'show'));}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0])))
return this._hide.apply(this,arguments);else{return this.effect.apply(this,_normalizeArguments(arguments,'hide'));}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||($.isFunction(arguments[0])||typeof arguments[0]=='boolean')){return this.__toggle.apply(this,arguments);}else{return this.effect.apply(this,_normalizeArguments(arguments,'toggle'));}},addClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{add:classNames},speed,easing,callback]):this._addClass(classNames);},removeClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{remove:classNames},speed,easing,callback]):this._removeClass(classNames);},toggleClass:function(classNames,speed,easing,callback){return((typeof speed!=="boolean")&&speed)?$.effects.animateClass.apply(this,[{toggle:classNames},speed,easing,callback]):this._toggleClass(classNames,speed);},morph:function(remove,add,speed,easing,callback){return $.effects.animateClass.apply(this,[{add:add,remove:remove},speed,easing,callback]);},switchClass:function(){return this.morph.apply(this,arguments);},cssUnit:function(key){var style=this.css(key),val=[];$.each(['em','px','%','pt'],function(i,unit){if(style.indexOf(unit)>0)
val=[parseFloat(style),unit];});return val;}});$.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){$.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);}
fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2],10),255),0)].join(",")+")";};});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)
return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return[parseInt(result[1],10),parseInt(result[2],10),parseInt(result[3],10)];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];if(result=/rgba\(0, 0, 0, 0\)/.exec(color))
return colors['transparent'];return colors[$.trim(color).toLowerCase()];}
function getColor(elem,attr){var color;do{color=$.curCSS(elem,attr);if(color!=''&&color!='transparent'||$.nodeName(elem,"body"))
break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};$.easing.jswing=$.easing.swing;$.extend($.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return $.easing[$.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-$.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return $.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return $.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});})(jQuery);
/* <root>/jslib/jqueryui/effects.pulsate.js */

(function($){$.effects.pulsate=function(o){return this.queue(function(){var el=$(this);var mode=$.effects.setMode(el,o.options.mode||'show');var times=o.options.times||5;var duration=o.duration?o.duration/2:$.fx.speeds._default/2;if(mode=='hide')times--;if(el.is(':hidden')){el.css('opacity',0);el.show();el.animate({opacity:1},duration,o.options.easing);times=times-2;}
for(var i=0;i<times;i++){el.animate({opacity:0},duration,o.options.easing).animate({opacity:1},duration,o.options.easing);};if(mode=='hide'){el.animate({opacity:0},duration,o.options.easing,function(){el.hide();if(o.callback)o.callback.apply(this,arguments);});}else{el.animate({opacity:0},duration,o.options.easing).animate({opacity:1},duration,o.options.easing,function(){if(o.callback)o.callback.apply(this,arguments);});};el.queue('fx',function(){el.dequeue();});el.dequeue();});};})(jQuery);
/* <root>/jslib/jqueryui/effects.highlight.js */

(function($){$.effects.highlight=function(o){return this.queue(function(){var el=$(this),props=['backgroundImage','backgroundColor','opacity'];var mode=$.effects.setMode(el,o.options.mode||'show');var color=o.options.color||"#ffff99";var oldColor=el.css("backgroundColor");$.effects.save(el,props);el.show();el.css({backgroundImage:'none',backgroundColor:color});var animation={backgroundColor:oldColor};if(mode=="hide")animation['opacity']=0;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide")el.hide();$.effects.restore(el,props);if(mode=="show"&&$.browser.msie)this.style.removeAttribute('filter');if(o.callback)o.callback.apply(this,arguments);el.dequeue();}});});};})(jQuery);
/* <root>/jslib/jquery.livequery.min.js */

(function($){$.extend($.fn,{livequery:function(type,fn,fn2){var self=this,q;if($.isFunction(type))fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&type==query.type&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid))return(q=query)&&false;});q=q||new $.livequery(this.selector,this.context,type,fn,fn2);q.stopped=false;$.livequery.run(q.id);return this;},expire:function(type,fn,fn2){var self=this;if($.isFunction(type))fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&(!type||type==query.type)&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid)&&!this.stopped)$.livequery.stop(query.id);});return this;}});$.livequery=function(selector,context,type,fn,fn2){this.selector=selector;this.context=context||document;this.type=type;this.fn=fn;this.fn2=fn2;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;fn.$lqguid=fn.$lqguid||$.livequery.guid++;if(fn2)fn2.$lqguid=fn2.$lqguid||$.livequery.guid++;return this;};$.livequery.prototype={stop:function(){var query=this;if(this.type)this.elements.unbind(this.type,this.fn);else if(this.fn2)this.elements.each(function(i,el){query.fn2.apply(el);});this.elements=[];this.stopped=true;},run:function(){if(this.stopped)return;var query=this;var oEls=this.elements,els=$(this.selector,this.context),nEls=els.not(oEls);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(oEls.length>0)$.each(oEls,function(i,el){if($.inArray(el,els)<0)$.event.remove(el,query.type,query.fn);});}else{nEls.each(function(){query.fn.apply(this);});if(this.fn2&&oEls.length>0)$.each(oEls,function(i,el){if($.inArray(el,els)<0)query.fn2.apply(el);});}}};$.extend($.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if($.livequery.running&&$.livequery.queue.length){var length=$.livequery.queue.length;while(length--)$.livequery.queries[$.livequery.queue.shift()].run();}},pause:function(){$.livequery.running=false;},play:function(){$.livequery.running=true;$.livequery.run();},registerPlugin:function(){$.each(arguments,function(i,n){if(!$.fn[n])return;var old=$.fn[n];$.fn[n]=function(){var r=old.apply(this,arguments);$.livequery.run();return r;}});},run:function(id){if(id!=undefined){if($.inArray(id,$.livequery.queue)<0)$.livequery.queue.push(id);}else
$.each($.livequery.queries,function(id){if($.inArray(id,$.livequery.queue)<0)$.livequery.queue.push(id);});if($.livequery.timeout)clearTimeout($.livequery.timeout);$.livequery.timeout=setTimeout($.livequery.checkQueue,20);},stop:function(id){if(id!=undefined)$.livequery.queries[id].stop();else
$.each($.livequery.queries,function(id){$.livequery.queries[id].stop();});}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','removeAttr','addClass','removeClass','toggleClass','empty','remove');$(function(){$.livequery.play();});var init=$.prototype.init;$.prototype.init=function(a,c){var r=init.apply(this,arguments);if(a&&a.selector)r.context=a.context,r.selector=a.selector;if(typeof a=='string')r.context=c||document,r.selector=a;return r;};$.prototype.init.prototype=$.prototype;})(jQuery);
/* <root>/jslib/jquery.scrollTo.js */
;(function($){var o=$.scrollTo=function(a,b,c){o.window().scrollTo(a,b,c)};o.defaults={axis:'y',duration:1};o.window=function(){return $($.browser.safari?'body':'html')};$.fn.scrollTo=function(l,m,n){if(typeof m=='object'){n=m;m=0}n=$.extend({},o.defaults,n);m=m||n.speed||n.duration;n.queue=n.queue&&n.axis.length>1;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);
/* <root>/jslib/jquery.getUrlParam.js */

jQuery.fn.extend({getUrlParam:function(strParamName){strParamName=escape(unescape(strParamName));var returnVal=new Array();var qString=null;if($(this).attr("nodeName")=="#document"){if(window.location.search.search(strParamName)>-1){qString=window.location.search.substr(1,window.location.search.length).split("&");}}else if($(this).attr("src")!="undefined"){var strHref=$(this).attr("src")
if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?")+1);qString=strQueryString.split("&");}}else if($(this).attr("href")!="undefined"){var strHref=$(this).attr("href")
if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?")+1);qString=strQueryString.split("&");}}else{return null;}
if(qString==null)return null;for(var i=0;i<qString.length;i++){if(escape(unescape(qString[i].split("=")[0]))==strParamName){returnVal.push(qString[i].split("=")[1]);}}
if(returnVal.length==0)return null;else if(returnVal.length==1)return returnVal[0];else return returnVal;}});
/* <root>/jslib/jquery.json.js */

(function($){function toIntegersAtLease(n)
{return n<10?'0'+n:n;}
Date.prototype.toJSON=function(date)
{return this.getUTCFullYear()+'-'+
toIntegersAtLease(this.getUTCMonth())+'-'+
toIntegersAtLease(this.getUTCDate());};var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'}
$.quoteString=function(string)
{if(escapeable.test(string))
{return'"'+string.replace(escapeable,function(a)
{var c=meta[a];if(typeof c==='string'){return c;}
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"'}
return'"'+string+'"';}
$.toJSON=function(o,compact)
{var type=typeof(o);if(type=="undefined")
return"undefined";else if(type=="number"||type=="boolean")
return o+"";else if(o===null)
return"null";if(type=="string")
{return $.quoteString(o);}
if(type=="object"&&typeof o.toJSON=="function")
return o.toJSON(compact);if(type!="function"&&typeof(o.length)=="number")
{var ret=[];for(var i=0;i<o.length;i++){ret.push($.toJSON(o[i],compact));}
if(compact)
return"["+ret.join(",")+"]";else
return"["+ret.join(", ")+"]";}
if(type=="function"){throw new TypeError("Unable to convert object of type 'function' to json.");}
ret=[];for(var k in o){var name;var type=typeof(k);if(type=="number")
name='"'+k+'"';else if(type=="string")
name=$.quoteString(k);else
continue;val=$.toJSON(o[k],compact);if(typeof(val)!="string"){continue;}
if(compact)
ret.push(name+":"+val);else
ret.push(name+": "+val);}
return"{"+ret.join(", ")+"}";}
$.compactJSON=function(o)
{return $.toJSON(o,true);}
$.evalJSON=function(src)
{return eval("("+src+")");}
$.secureEvalJSON=function(src)
{var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,'@');filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered))
return eval("("+src+")");else
throw new SyntaxError("Error parsing JSON, source is not valid.");}})(jQuery);
/* <root>/jslib/message_tools.js */

(function($){if(typeof(PopScan)==='undefined')
PopScan={};if(typeof(PopScan.MessageTools)==='undefined'){PopScan.MessageTools=function(){return{sendMessageSeen:function(mids){var messageseenurl='/index.php/messages/messageseen?';mids=mids.split('|');for(i=0;i<mids.length;i++){messageseenurl=messageseenurl+"mids["+i+"]="+encodeURI(mids[i]);if(i!=mids.length-1)
messageseenurl=messageseenurl+'&';}
$.post(messageseenurl,{},function(data,text_status){TB_remove();});},showMessage:function(){TB_show('title','/index.php/messages/showmessage?height=330&width=500','')}};}();}
$(function(){if(typeof(has_pending_popup_message)!=='undefined'&&has_pending_popup_message==true){var msg_interface;if(typeof window.showMessage==='function'){msg_interface=showMessage;}else if(PopScan.MessageTools&&typeof PopScan.MessageTools.showMessage==='function'){msg_interface=PopScan.MessageTools.showMessage;}
if(msg_interface)setTimeout(msg_interface,1000);}});})(jQuery);
/* <root>/jslib/popscan.js */

(function($){if(typeof(PopScan)==='undefined')
PopScan={};$.extend(PopScan,function(){return{makeClass:function(){return function(args){if(this instanceof arguments.callee){if(typeof this.init=="function")
this.init.apply(this,args.callee?args:arguments);}else{return new arguments.callee(arguments);}};},getElementContent:function(element){$element=$(element);var s=$element.val();if(s==null){s=$element.html();s=s.replace(/&lt;/g,"<").replace(/&gt;/g,">");}
s=$.trim(s);s=s.replace(/^<\!\[CDATA\[([\s\S]*)\]\]>$/im,'$1');s=s.replace(/^<\!--([\s\S]*)-->$/im,'$1');return s;},map:function(list,callback){var a=[];for(var i=0;i<list.length;i++){a.push(callback(list[i]));}
return a;},isEmpty:function(obj){for(var p in obj){return false;}
return true;},roundFloat:function(val,n_digits){n_digits=typeof n_digits==='number'?parseInt(n_digits):2;val=val*Math.pow(10,n_digits);val=Math.round(val);val=val/Math.pow(10,n_digits);return val;},isInteger:function(s){var i;for(i=0;i<s.length;i++)
{var c=s.charAt(i);if(((c<"0")||(c>"9")))return false;}
return true;},isNumeric:function(sText){var ValidChars="0123456789.";var IsNumber=true;var Char;for(i=0;i<sText.length&&IsNumber==true;i++)
{Char=sText.charAt(i);if(ValidChars.indexOf(Char)==-1)
{IsNumber=false;}}
return IsNumber;},numberFormat:function(a,b,c,d){a=Math.round(a*Math.pow(10,b))/Math.pow(10,b);e=a+'';f=e.split('.');if(!f[0]){f[0]='0';}
if(!f[1]){f[1]='';}
if(f[1].length<b){g=f[1];for(i=f[1].length+1;i<=b;i++){g+='0';}
f[1]=g;}
if(d!=''&&f[0].length>3){h=f[0];f[0]='';for(j=3;j<h.length;j+=3){i=h.slice(h.length-j,h.length-j+3);f[0]=d+i+f[0]+'';}
j=h.substr(0,(h.length%3==0)?3:(h.length%3));f[0]=j+f[0];}
c=(b<=0)?'':c;return f[0]+c+f[1];},formatFloat:function(value){value=Math.round(parseFloat(value)*Math.pow(10,2))/Math.pow(10,2);if(parseInt(value)==value)
value=value+".00";else if(parseInt(value*10)==(value*10))
value=value+"0";return value;},prettyFloat:function($nr,$param){if($param==0&&($nr==(Math.round($nr)))){return parseInt($nr);}
$exp=1;$max=4;$nr=Math.round($nr*Math.pow(10,$max))/Math.pow(10,$max);while($exp<=$max&&($nr*Math.pow(10,$exp))!=(Math.round($nr*Math.pow(10,$exp)))){$exp++;}
$count=Math.max($param,$exp);return PopScan.numberFormat($nr,$count,'.',"'");},ensure:function(path){var parts=path.split('.');var step=PopScan;for(var i=0;i<parts.length;i++){var p=parts[i];if(!p)continue;if(typeof step[p]==='undefined')step[p]={};step=step[p];}
return step;},provide:function(path,obj){var base=PopScan.ensure(path);return $.extend(base,obj);}};}());if(typeof console==='undefined'){console={};console.log=function(){};}
$.fn.activatesButton=function(btn){return this.each(function(){$(this).keydown(function(ev){if(ev.keyCode==13){ev.preventDefault();ev.stopPropagation();var b=$(btn);if(!b.is(':disabled'))b.click();}});});};$.fn.activationChain=function(){var previous=null;return this.each(function(){var current=this;if(previous){$(previous).keydown(function(ev){if(PopScan.UI.isEnter(ev.keyCode)){ev.preventDefault();$(current).focus();}});}
previous=current;});}})(jQuery);
/* <root>/jslib/popscan.url.js */

(function($){if(typeof(PopScan)==='undefined')
PopScan={};if(typeof(PopScan.URL)==='undefined')
PopScan.URL={};$.extend(PopScan.URL,function(){return{makeAbsolute:function(comp,prefix){if(!prefix)
prefix=PopScan.URL.mob_prefix;var p=[PopScan.URL.base,prefix];if({}.toString.call(comp).slice(8,-1)!=='Array'){comp=[comp];}
for(var i=0;i<comp.length;i++){p.push(comp[i]);}
return PopScan.URL.buildPath(p);},buildPath:function(components){var url='';for(var i=0;i<components.length;i++){var piece=''+components[i];if(typeof(piece)==='string'){if(!(piece.substr(0,1)==='/')){piece='/'+piece;}
if(piece.substr(piece.length-1,1)==='/'){piece=piece.substr(0,piece.length-1);}
url+=piece;}}
return url;},split:function(url){var u=''+url;if(u.substr(0,1)==='#'){u=u.substr(1);}
var parts=u.split('/');var out=[];for(var i=0;i<parts.length;i++){if(parts[i]!=='')out.push(parts[i]);}
return out;},parseQuerystring:function(qstr){var s=''+qstr;var qmark=s.indexOf('?');if(qmark>-1){s=s.substr(qmark+1);}
var parts=s.split('&');var out={};for(var i=0;i<parts.length;i++){var kv,k,v;kv=(''+parts[i]).split('=');k=kv[0];v=kv[1];out[k]=unescape(v);}
return out;}};}());})(jQuery);
/* <root>/jslib/popscan.messagedialog.js */

(function($){if(typeof PopScan==='undefined')
PopScan={};if(typeof PopScan.MessageDialog==='undefined')
PopScan.MessageDialog={};if(typeof PopScan.ConfirmationDialog==='undefined')
PopScan.ConfirmationDialog={};$.extend(PopScan.ConfirmationDialog,(function(){function buildButtons($t,btns,callback){if(!btns)return{};var res={};for(var i=0;i<btns.length;i++){(function(b){res[b.text]=function(){if(callback.call($t[0],b.result)!==false){$t.dialog('close');$t.remove();}}}(btns[i]));}
return res;}
return{show:function(title,text,buttons,callback,designHint){var content;title=title||strings_confirm_title;if(PopScan.ConfirmationDialog.ThemeRenderer)
content=PopScan.ConfirmationDialog.ThemeRenderer.renderContent(title,text,designHint);else
content='<h1>'+title+'</h1>'+text;$(content).css('display','block');var $t=$('<div>'+content+'</div>');$t.dialog({modal:true,bgiframe:true,draggable:false,resizable:false,width:"auto"});var btns=buildButtons($t,buttons,callback);$t.dialog('option','buttons',btns);var bfshow=PopScan.ConfirmationDialog.ThemeRenderer.beforeShow;if(typeof bfshow==='function')bfshow($t);$t.dialog('open');$t.parents('.ui-dialog:eq(0)').addClass('cfmdlg');}};}()));$.extend(PopScan.MessageDialog,function(){var opts={legacy_dialog_id:'msgdlg',display_options:{modal:true,close_button:true,width:320}};var isLegacyDialog=function(){return $('#'+opts.legacy_dialog_id).length>0;};var renderLegacy=function(){var $dialog=$('#'+opts.legacy_dialog_id);if(opts.text){$dialog.find('#msgdlg_text').html(opts.text);}
$dialog.show();window.scrollTo(0,0);if(opts.disableObj){$(opts.disableObj).hide();}};var closeLegacy=function(){var $dialog=$('#'+opts.legacy_dialog_id);opts.delay_on_close=opts.delay_on_close?opts.delay_on_close:1;setTimeout(function(){$dialog.hide();if(opts.disableObj){$(opts.disableObj).show();}},opts.delay_on_close);};var getElement=function(){var elem_id='popscan_messagedialog';var $elem=$('#'+elem_id);if($elem.length<1){$elem=$('<div id="popscan_messagedialog"></div>');}
return $elem;};var render=function(){var show=function(content){var $dialog=getElement();var buttons={};$dialog.html(content);var $t=$dialog.find('h1.dialog_title');if($t.length>0){opts.title=$t.text();$t.remove();}
if(opts.display_options.ok_button){buttons.OK=function(){$(this).dialog("close");};}
if(!$dialog.hasClass('ui-dialog-content')){$dialog.dialog({title:opts.title,modal:opts.display_options.modal,bgiframe:true,draggable:false,resizable:false,buttons:buttons,width:opts.display_options.width});}
$dialog.dialog('option',{width:opts.display_options.width});$dialog.dialog('open');if(!opts.display_options.close_button){$dialog.prev().find('.ui-dialog-titlebar-close.ui-corner-all').hide();}};if(opts.url){$.get(opts.url,{},function(res){show(res);},"text");}else{show(opts.text);}};var close=function(){var $dialog=getElement();$dialog.remove();};return{display:function(options){opts=$.extend({},opts,options);isLegacyDialog()?renderLegacy():render();},hide:function(){isLegacyDialog()?closeLegacy():close();}};}());})(jQuery);function waitmsg(disableObj){PopScan.MessageDialog.display({disableObj:disableObj});}
/* <root>/jslib/ui.js */

(function($){if(typeof(PopScan)==='undefined')
PopScan={};if(typeof(PopScan.UI)==='undefined')
PopScan.UI={};$.extend(PopScan.UI,function(){var Self=PopScan.UI;function lookUpExtraAttrs(qfield){var extra_attrs_str=$(qfield).next('input:hidden').val();if(!extra_attrs_str){extra_attrs_str=$("#attrs_"+Self.getKeyFromId(qfield)).val();}
if(!extra_attrs_str){console.log("*** error: hidden attrs field for element "+qfield.id+" not found");return null;}
return eval('('+extra_attrs_str+')');}
$(function(){$("input.quantityTextField").each(function(){this.popscan_product=lookUpExtraAttrs(this);});});return{Events:{LineItemQuantityChanged:"LineItemQuantityChanged",LineItemTotalChanged:"LineItemLineTotalChanged",ProductListTotalChanged:"PListTotalChanged"},getElemByKey:function(key){return $('#quant_'+key).get(0);},getKeyFromId:function(obj){return parseInt(obj.id.split("_")[1],10);},getExtraAttrsByKey:function(key){var elem=$('#quant_'+key).get(0);if(elem){return Self.getExtraAttrsByElement($('#quant_'+key).get(0));}else{return eval('('+$('#attrs_'+key).val()+')');}},getExtraAttrsByElement:function(elem){if(!elem.popscan_product){elem.popscan_product=lookUpExtraAttrs(elem);}
return elem.popscan_product;},setExtraAttrs:function(key,extra_attrs){var $qfield=$('#quant_'+key);if($qfield.length==0){$("#attrs_"+key).val($.toJSON(extra_attrs));}else{$('#quant_'+key).get(0).popscan_product=extra_attrs;}},changesNumber:function(k){if((48<=k&&k<=57)||(96<=k&&k<=105)){return true;}
if(k==8||k==46||k==109||k==189||k==190||k==108||k==110){return true;}
return false;},isArrowKey:function(k){if(37<=k&&k<=40){return true;}
return false;},isTab:function(k){if(k==9){return true;}
return false;},isEnter:function(k){if(k==13){return true;}
return false;},blockEnter:function(event_or_keycode){var keycode=(typeof event_or_keycode==='object')?event_or_keycode.keyCode:event_or_keycode;return Self.isEnter(keycode)?false:true;},updateBasketPreview:function(count,total,silent){if(window.updatePreview)
updatePreview(count,total,silent);}};}());PopScan.provide('UI.Consolidation',function(){var set_expander_state=function(key){var vd_plugin=$.fn.visualDisable&&$.fn.visualEnable;var elem=$('#consolidationexpander_'+key);var quant=$('#quant_'+key).val();if(quant>1){if(vd_plugin)elem.visualEnable();else elem.show();}else{if(vd_plugin)elem.visualDisable({opacity:0.25});else elem.hide();}};return{init:function(selector,url){$(selector).click(function(ev){ev.preventDefault();if(!url)return;var raw_fields=$(this).attr('data-popscan-consolidation-fields');var fields=$.parseJSON(raw_fields);var config={fields:fields};$.post(url,$.toJSON(config),function(){window.location.reload();});});},expander:function(selector){$(document).unbind('.cons_exp').bind(PopScan.UI.Events.LineItemQuantityChanged+'.cons_exp',function(ev,args){set_expander_state(args.key);});$(selector).each(function(){var key=PopScan.UI.getKeyFromId(this);set_expander_state(key);});$(selector).click(function(ev){ev.preventDefault();this.form.action=$(this).attr('data-popscan-action-url');this.form.method='post';if(this.form.action){$('input, select, textarea',this.form).removeAttr('name');this.form.submit();}});}};}());})(jQuery);
/* <root>/jslib/pstools.js */

document.write('<script type="text/javascript" src="/jslib/datepicker.js"></script>');isInteger=PopScan.isInteger;IsNumeric=PopScan.isNumeric;number_format=PopScan.numberFormat;formatFloat=PopScan.formatFloat;prettyfloat=PopScan.prettyFloat;function catchEnter(event){if(event&&event.keyCode==13){try{event.returnValue=false;document.searchform.add_article.onkeypress=catchEnter;document.searchform.add_article.focus();document.searchform.add_article.select();}catch(er){}
return false;}else{try{document.searchform.add_article.onkeypress='';}catch(er){}
return true;}}
function rateInventory(event){if(event.keyCode==13){try{document.invform.submit();}catch(er){}}}
var popupPicIntervalId=0;function showPopupPicture(evt,src){document.getElementById('popupPictureDiv').innerHTML='';if(document.getElementById('popupPictureDiv').style.display=='none'){var x=(document.all)?window.event.x+document.body.scrollLeft:evt.pageX;var y=(document.all)?window.event.y+document.body.scrollTop:evt.pageY;if(document.all){var x=window.event.x+document.documentElement.scrollLeft;var y=window.event.y+document.documentElement.scrollTop;}else{var x=evt.pageX;var y=evt.pageY;}
var size=$('popupPictureDiv').getHeight();var targetX=(x-100);var targetY=(y-20-size);document.getElementById('popupPictureDiv').style.left=targetX+'px';document.getElementById('popupPictureDiv').style.top=targetY+'px';if(src instanceof Array){var width=size*src.length;document.getElementById('popupPictureDiv').style.width=width+'px';}else{document.getElementById('popupPictureDiv').style.width=size+'px';}
if(popupPicIntervalId){clearInterval(popupPicIntervalId);}
popupPicIntervalId=setInterval('removePopupPicture()',3000);if(src){if(src instanceof Array){var innerhtml='';var widht=0;var loaded=new Array();for(var i=0;i<src.length;i++){innerhtml+='<img src="'+src[i]+'" />';var img=new Image();img.className='popupPicture';img.id=src[i];img.onload=img.onerror=function(){loaded[this.id]=true;widht+=img.width;var load=true;for(var j=0;j<src.length;j++){if(!loaded[src[j]]){load=false;}}
if(load){document.getElementById('popupPictureDiv').style.display='inline';}}
img.src=src[i];document.getElementById('popupPictureDiv').appendChild(img);}}else{var img=new Image();img.onload=img.onerror=function(){document.getElementById('popupPictureDiv').style.display='inline';};img.src=src;document.getElementById('popupPictureDiv').appendChild(img);}}}else{document.getElementById('popupPictureDiv').style.display='none';}}
function removePopupPicture(){document.getElementById('popupPictureDiv').innerHTML='';document.getElementById('popupPictureDiv').style.display='none';}
function tooltip(evt,cdiv){cdiv=document.getElementById(cdiv);if(cdiv.style.display=='none'){if(evt.clientX){x=evt.clientX;y=evt.clientY;}else if(evt.pageX){x=evt.pageX;y=evt.pageY;}else{x=10;y=10;}
cdiv.style.display='block';cdiv.style.position='absolute';cdiv.style.left=x+'px';cdiv.style.top=y+'px';}else{cdiv.style.display='none';}}
function tooltip2(evt,text,offsetX,offsetY){toolTip=document.getElementById('toolTipBox');if(!offsetX)
offsetX=-30;if(!offsetY)
offsetY=10;agent=navigator.userAgent.toLowerCase();if(evt&&text){if(document.all){x=(document.documentElement&&document.documentElement.scrollLeft)?document.documentElement.scrollLeft:document.body.scrollLeft;y=(document.documentElement&&document.documentElement.scrollTop)?document.documentElement.scrollTop:document.body.scrollTop;x+=window.event.clientX;y+=window.event.clientY;}else{x=evt.pageX;y=evt.pageY;}
if(agent.indexOf("msie 6.")!=-1){offsetX+=-30;offsetY+=-45;}
toolTip.innerHTML=text;toolTip.style.display='block';toolTip.style.left=(x+offsetX)+'px';toolTip.style.top=(y+offsetY)+'px';}else{toolTip.style.display='none';}}
function toggleElement(elementname){cdiv=document.getElementById(elementname);if(cdiv){cdiv.style.display=(cdiv.style.display=='none')?'inline':'none';}}
function showWaitScreen(){var waitscreen=document.getElementById('wait_screen');if(waitscreen){waitscreen.style.visibility='visible';var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=new Array(w,h);waitscreen.style.top=(arrayPageSize[1]/2)+'px';waitscreen.style.left=(arrayPageSize[0]/2)+'px';}}
function friendly_dump(arr){alert(dump(arr));function dump(arr,level){var dumped_text="";if(!level)level=0;var level_padding="";for(var j=0;j<level+1;j++)level_padding+="    ";if(typeof(arr)=='object'){for(var item in arr){var value=arr[item];if(typeof(value)=='object'){dumped_text+=level_padding+"'"+item+"' ...\n";dumped_text+=dump(value,level+1);}else if(typeof(value)!='function'){dumped_text+=level_padding+"'"+item+"' => \""+value+"\"\n";}}}else if(typeof(value)!='function'){dumped_text="===>"+arr+"<===("+typeof(arr)+")";}
return dumped_text;}}
PopScan.doXHR=function(url,onComplete){var xmlhttp=false;if(typeof XMLHttpRequest!='undefined')
xmlhttp=new XMLHttpRequest();if(!xmlhttp)return false;xmlhttp.open("GET",url,true);xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){onComplete(xmlhttp);}}
xmlhttp.send(null);};(function($){$.fn.picpopupShow=function(){var w=window.parent||window;this.css({'z-index':99,'position':'absolute','top':($(w).height()-this.height())/2+$(w).scrollTop()+'px','left':($(w).width()-this.width())/2+$(w).scrollLeft()+'px','opacity':0,'visibility':'visible'});this.fadeTo(200,1);return this;}
$(function(){$('.pic.hasPopup').css('cursor','pointer').click(function(event){var img_addr=$(this).attr('data-popup-img');if($('#picpopup').length===0){$('<div id="picpopup-spinner-container" style="visibility:hidden; position: absolute; top: 0; left: 0">'
+'  <img id="picpopup-spinner" src="/img/indicator.gif"/>'
+'</div>'
+'<div id="picpopup" style="visibility:hidden; position: absolute; top: 0; left: 0">'
+'  <img id="picpopup-img" />'
+'</div>'
+'<div id="dimLayer" style="visibility:hidden">'
+'</div>').appendTo('body');}
$('#dimLayer').css({'z-index':98,'position':'absolute','top':0,'left':0,'height':$(document).height(),'width':$(document).width(),'background-color':'#000','background-repeat':'repeat','opacity':0,'visibility':'visible'}).fadeTo(200,0.7);$("#picpopup-img").load(function(){$("#picpopup-spinner").fadeTo(50,0,function(){$(this).remove();$("#picpopup").picpopupShow();if($.browser.msie&&$.browser.version.substr(0,1)=='6'){$('select').css('visibility','hidden');}});});$('#picpopup-spinner-container').picpopupShow();$('#picpopup-img').attr('src',img_addr);$('body').click(function(){$("#dimLayer").fadeTo(200,0,function(){$(this).remove();});$('#picpopup').fadeTo(200,0,function(){$(this).remove();if($.browser.msie&&$.browser.version.substr(0,1)=='6'){$('select').css('visibility','visible');}});$('#picpopup-spinner-container').remove();});return false;});});})(jQuery);
/* <root>/jslib/thickbox.js */

function TB_init(){}
function TB_show(caption,url,imageGroup,toppos){if(document.getElementById("TB_HideSelect")==null){jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");}
if(caption==null){caption=""};TB_overlaySize();jQuery("body").append("<div id='TB_load'><img src='/img/loadingAnimation.gif' /></div>");TB_load_position();var urlString=/\.jpg|\.jpeg|\.png|\.gif|\.html|\.htm|\.php|\.cfm|\.asp|\.aspx|\.jsp|\.jst|\.rb|\.txt|\.bmp/g;var urlType=url.toLowerCase().match(urlString);if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(imageGroup){TB_TempArray=jQuery("a[rel="+imageGroup+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML==""));TB_Counter++){var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);if(!(TB_TempArray[TB_Counter].href==url)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length);}}}
imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var pagesize=TB_getPageSize();var x=pagesize[0]-150;var y=pagesize[1]-150;var imageWidth=imgPreloader.width;var imageHeight=imgPreloader.height;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;}}else if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;}}
TB_WIDTH=imageWidth+30;TB_HEIGHT=imageHeight+60;jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>"+"<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'></a></div>");jQuery("#TB_closeWindowButton").click(TB_remove);if(!(TB_PrevHTML=="")){function goPrev(){if(jQuery(document).unclick(goPrev)){jQuery(document).unclick(goPrev)};jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");jQuery(document).unbind('keyup');TB_show(TB_PrevCaption,TB_PrevURL,imageGroup);return false;}
jQuery("#TB_prev").click(goPrev);jQuery(document).keyup(function(e){var key=e.keyCode;if(key==37){goPrev()}});}
if(!(TB_NextHTML=="")){function goNext(){jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");jQuery(document).unbind('keyup');TB_show(TB_NextCaption,TB_NextURL,imageGroup);return false;}
jQuery("#TB_next").click(goNext);jQuery(document).keyup(function(e){var key=e.keyCode;if(key==39){goNext()}});}
TB_position();jQuery("#TB_load").remove();jQuery("#TB_ImageOff").click(TB_remove);jQuery("#TB_window").css({display:"block"});}
imgPreloader.src=url;}
if(urlType=='.htm'||urlType=='.html'||urlType=='.php'||urlType=='.asp'||urlType=='.aspx'||urlType=='.jsp'||urlType=='.jst'||urlType=='.rb'||urlType=='.txt'||urlType=='.cfm'||(url.indexOf('TB_inline')!=-1)||(url.indexOf('TB_iframe')!=-1)){var queryString=url.replace(/^[^\?]+\??/,'');var params=TB_parseQuery(queryString);TB_WIDTH=(params['width']*1)+30;TB_HEIGHT=(params['height']*1)+40;ajaxContentW=TB_WIDTH;ajaxContentH=TB_HEIGHT;if(url.indexOf('TB_iframe')!=-1){urlNoQuery=url.substr(0,TB_strpos(url,"?"));jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a></div></div><iframe src='"+urlNoQuery+"' id='TB_iframeContent' style='width:"+(ajaxContentW)+"px;height:"+(ajaxContentH)+"px;'></iframe>");}else{jQuery("#TB_window").append("<div id='TB_ajaxContent'></div>");}
if(url.indexOf('TB_inline')!=-1){jQuery("#TB_ajaxContent").html($('#'+params['inlineId']).html());TB_position(toppos);jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});}else if(url.indexOf('TB_iframe')!=-1){TB_position(toppos);jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});}else{jQuery("#TB_ajaxContent").load(url,function(){TB_position(toppos);jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"});});}}
jQuery(window).resize(TB_position(toppos));}
function TB_remove(){jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').remove();});jQuery("#TB_load").remove();jQuery(document).unbind('keyup');return false;}
function TB_position(toppos){var pagesize=TB_getPageSize();var arrayPageScroll=TB_getPageScrollTop();jQuery("#TB_window").css({width:TB_WIDTH+"px",left:((pagesize[0]-TB_WIDTH)/2)+"px",top:toppos?toppos:"40px"});TB_overlaySize();}
function TB_overlaySize(){if(window.innerHeight&&window.scrollMaxY){yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){yScroll=document.body.scrollHeight;}else{yScroll=document.body.offsetHeight;}
jQuery("#TB_overlay").css("height",yScroll+"px");jQuery("#TB_HideSelect").css("height",yScroll+"px");}
function TB_load_position(){var pagesize=TB_getPageSize();var arrayPageScroll=TB_getPageScrollTop();jQuery("#TB_load").css({left:((pagesize[0]-208)/2)+"px",top:(arrayPageScroll[1]+((pagesize[1]-13)/2))+"px"}).css({display:"block"});}
function TB_parseQuery(query){var Params=new Object();if(!query)return Params;var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2)continue;var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}
return Params;}
function TB_getPageScrollTop(){var yScrolltop;if(self.pageYOffset){yScrolltop=self.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScrolltop=document.documentElement.scrollTop;}else if(document.body){yScrolltop=document.body.scrollTop;}
arrayPageScroll=new Array('',yScrolltop)
return arrayPageScroll;}
function TB_getPageSize(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=new Array(w,h)
return arrayPageSize;}
function TB_strpos(str,ch){for(var i=0;i<str.length;i++)
if(str.substring(i,i+1)==ch)return i;return-1;}
/* <root>/jslib/task_progress.js */

if(typeof(PopScan)=='undefined')
PopScan={};PopScan.TaskProgress=function(){function createFrame(trans){var frameId='psf_'+trans;var io;if(window.ActiveXObject){io=document.createElement('<iframe id="'+frameId+'" name="'+frameId+'" />');io.src='javascript:false';}else{io=document.createElement('iframe');io.id=frameId;io.name=frameId;}
if(navigator.userAgent&&navigator.userAgent.indexOf('gnegg')>-1){io.style.position='absolute';io.style.top='0px';io.style.left='0px';io.style.width='800px';io.style.height='800px';}else{io.style.position='absolute';io.style.top='-1000px';io.style.left='-1000px';io.style.width='0px';io.style.height='0px';}
document.body.appendChild(io);return io;}
function updateProgressWindow(data){if(data.max&&(parseInt(data.max,10)!=0)){var p=Math.round((data.curr/data.max)*100,10);$('spinner').style.display='block';$('progress_bar').style.display='block';$('progress_bar_progress').style.width=p+'%';$('taskmsg').innerHTML=data.text;$('progress_container').style.display='block';}else{$('spinner').style.display='block';$('progress_bar_progress').style.width='0%';$('progress_bar').style.display='none';}
if(data.text!=null)$('taskmsg').innerHTML=data.text;$('progress_container').style.display='block';}
return{showProgressWindow:function(form){var upload_id=form.elements['APC_UPLOAD_PROGRESS'].value;var t;var f=createFrame(upload_id);Event.observe(f,'load',function(){clearTimeout(t)
if(navigator.userAgent&&navigator.userAgent.indexOf('gnegg')>-1){}else{location.href=f.contentWindow.location.href;}});form.target=f.name;function updateStatus(){PopScan.doXHR('/index.php/status/'+upload_id,function(xhr){data=eval('('+xhr.responseText+')');updateProgressWindow(data);t=setTimeout(updateStatus,700);});}
updateStatus();document.getElementById('msgdlg').style.display='block';}};}();
