var Menu=Class.create();Menu.prototype={initialize:function(idOrElement,name,customConfigFunction){this.name=name;this.type="menu";this.closeDelayTimer=null;this.closingMenuItem=null;this.config();if(typeof customConfigFunction=="function"){this.customConfig=customConfigFunction;this.customConfig();}
this.rootContainer=new MenuContainer(idOrElement,this);},config:function(){this.collapseBorders=true;this.quickCollapse=true;this.closeDelayTime=1000;}}
var MenuContainer=Class.create();MenuContainer.prototype={initialize:function(idOrElement,parent){this.type="menuContainer";this.menuItems=[];this.init(idOrElement,parent);},init:function(idOrElement,parent){this.element=$(idOrElement);this.parent=parent;this.parentMenu=(this.type=="menuContainer")?((parent)?parent.parent:null):parent;this.root=parent instanceof Menu?parent:parent.root;this.id=this.element.id;if(this.type=="menuContainer"){if(this.element.hasClassName("dropdown"))this.menuType="dropdown";else if(this.element.hasClassName("flyout"))this.menuType="flyout";else if(this.element.hasClassName("horizontal"))this.menuType="horizontal";else this.menuType="standard";if(this.menuType=="flyout"||this.menuType=="dropdown"){this.isOpen=false;Element.setStyle(this.element,{position:"absolute",top:"0px",left:"0px",visibility:"hidden"});}else{this.isOpen=true;}}else{this.isOpen=this.parentMenu.isOpen;}
var childNodes=this.element.childNodes;if(childNodes==null)return;for(var i=0;i<childNodes.length;i++){var node=childNodes[i];if(node.nodeType==1){if(this.type=="menuContainer"){if(node.tagName.toLowerCase()=="li"){this.menuItems.push(new MenuItem(node,this));}}else{if(node.tagName.toLowerCase()=="ul"){this.subMenu=new MenuContainer(node,this);}}}}},getBorders:function(element){var ltrb=["Left","Top","Right","Bottom"];var result={};for(var i=0;i<ltrb.length;++i){if(this.element.currentStyle)
var value=parseInt(this.element.currentStyle["border"+ltrb[i]+"Width"]);else if(window.getComputedStyle)
var value=parseInt(window.getComputedStyle(this.element,"").getPropertyValue("border-"+ltrb[i].toLowerCase()+"-width"));else
var value=parseInt(this.element.style["border"+ltrb[i]]);result[ltrb[i].toLowerCase()]=isNaN(value)?0:value;}
return result;},open:function(){if(this.root.closeDelayTimer)window.clearTimeout(this.root.closeDelayTimer);this.parentMenu.closeAll(this);this.isOpen=true;if(this.menuType=="dropdown"){Element.setStyle(this.element,{left:(Position.positionedOffset(this.parent.element)[0])+"px",top:(Position.positionedOffset(this.parent.element)[1]+Element.getHeight(this.parent.element))+"px"});}else if(this.menuType=="flyout"){var parentMenuBorders=this.parentMenu?this.parentMenu.getBorders():new Object();var thisBorders=this.getBorders();if((Position.positionedOffset(this.parentMenu.element)[0]+this.parentMenu.element.offsetWidth+this.element.offsetWidth+20)>(window.innerWidth?window.innerWidth:document.body.offsetWidth)){Element.setStyle(this.element,{left:(-this.element.offsetWidth-(this.root.collapseBorders?0:parentMenuBorders["left"]))+"px"});}else{Element.setStyle(this.element,{left:(this.parentMenu.element.offsetWidth-parentMenuBorders["left"]-(this.root.collapseBorders?Math.min(parentMenuBorders["right"],thisBorders["left"]):0))+"px"});}
Element.setStyle(this.element,{top:(this.parent.element.offsetTop-parentMenuBorders["top"]-this.menuItems[0].element.offsetTop)+"px"});}
Element.setStyle(this.element,{visibility:"visible"});},close:function(){Element.setStyle(this.element,{visibility:"hidden"});this.isOpen=false;this.closeAll();},closeAll:function(trigger){for(var i=0;i<this.menuItems.length;++i){this.menuItems[i].closeItem(trigger);}}}
var MenuItem=Class.create();Object.extend(Object.extend(MenuItem.prototype,MenuContainer.prototype),{initialize:function(idOrElement,parent){var menuItem=this;this.type="menuItem";this.subMenu;this.init(idOrElement,parent);if(this.subMenu){this.element.onmouseover=function(){menuItem.subMenu.open();}}else{if(this.root.quickCollapse){this.element.onmouseover=function(){menuItem.parentMenu.closeAll();}}}
var linkTag=this.element.getElementsByTagName("A")[0];if(linkTag){linkTag.onfocus=this.element.onmouseover;this.link=linkTag;this.text=linkTag.text;}
if(this.subMenu){this.element.onmouseout=function(){if(menuItem.root.openDelayTimer)window.clearTimeout(menuItem.root.openDelayTimer);if(menuItem.root.closeDelayTimer)window.clearTimeout(menuItem.root.closeDelayTimer);eval(menuItem.root.name+".closingMenuItem = menuItem");menuItem.root.closeDelayTimer=window.setTimeout(menuItem.root.name+".closingMenuItem.subMenu.close()",menuItem.root.closeDelayTime);}}},openItem:function(){this.isOpen=true;if(this.subMenu){this.subMenu.open();}},closeItem:function(trigger){this.isOpen=false;if(this.subMenu){if(this.subMenu!=trigger)this.subMenu.close();}}});var menu;function configMenu(){this.closeDelayTime=1000;}
function initMenu(){menu=new Menu('root','menu',configMenu);}
Event.observe(window,'load',initMenu,false);;$_=function(){var F=$_._(arguments[0])?arguments[0]:null;var B=F;var C=arguments.length;var A=[];if(!C){return document}if(C>1){for(var E=0;E<C;E++){A.push($_(arguments[E]))}}else{if(B&&(B instanceof Array||(typeof B!="string"&&!(B instanceof String))&&(!(B instanceof Function))&&((typeof B.length)+"")!="undefined"&&!B.tagName)){var C=B.length;for(var E=0;E<C;E++){A.push($_(B[E]))}}else{if(C){if(B&&!B.$__OK){if(typeof B=="string"||B instanceof String){B=$_.$_STR.$__init(B)}else{if(typeof B=="number"||B instanceof Number){B=$_.$_NUMBER.$__init(B)}else{switch(typeof B){case"function":$_.$_FUNC.$__init(B);break;default:if(B.nodeType){$_.$_DOM.$__init(B)}else{$_.$_OBJ.$__init(B)}}}}try{if(B){B.$__OK=true;B.empty=B.empty||function(){return!this};B.first=B.first||function(){return this};B.last=B.last||function(){return this}}}catch(G){}}A.push(B)}}}if(A.length!=1){var H=$_.$__flat(A);if(H[0]&&H[0].$__EXT&&H[0].$__TYPE){var J=H[0].$__EXT;var I=H[0].$__TYPE;for(var E=J.length-1;E>=0;E--){for(var D=H.length-1;D>=0;D--){if(H[D].$__TYPE===I){if($_[I].$_$_&&$_[I].$_$_[J[E]]){if(!$_[I].$_$_[J[E]].accepts||$_[I].$_$_[J[E]].accepts(H[D])){$_[I].$_$_[J[E]].init(H)}break}}}}}return H}else{return A[0]}};$_.ie=$_.IE=0/*@cc_on+@_jscript_version*10@*/;$_.ie-=50;$_.ie=($_.ie<0)?false:$_.ie;$_.ie6=$_.IE6=$_.ie==6;$_.ie7=$_.IE7=$_.ie==7;$_.ie8=$_.IE8=$_.ie==8;$_.opera=!!window.opera;$_.gecko=!!((window.netscape&&!window.opera));$_.safari=!!(navigator.userAgent.toLowerCase().indexOf("safari")!=-1);$_.__={};$_.raise=function(B,C){var D=["Error::",B||"",(B&&C)?"::":"",(B&&C)?C:(B?"":"Unknown error")];var A=D.join("");if(console.log){console.log(A)}else{alert(A)}};$_.$_STR={$_:{},$_$_:{},$__init:function(C){var B=C instanceof String?C:new String(C);if(B){B.$__EXT=[]}B.$__TYPE="$_STR";for(var A in $_.$_STR.$_){if(!$_.$_STR.$_[A].accepts||$_.$_STR.$_[A].accepts(B)){B=$_.$_STR.$_[A].init(B);if(!B||!B.$__TYPE||B.$__TYPE!=="$_STR"){break}B.$__EXT[B.$__EXT.length]=A}}return B}};$_.$_DOM={$_:{},$_$_:{},$__init:function(B){B.$__UID=Math.random();B.$__EXT=[];B.$__TYPE="$_DOM";for(var A in $_.$_DOM.$_){if(!$_.$_DOM.$_[A].accepts||$_.$_DOM.$_[A].accepts(B)){$_.$_DOM.$_[A].init(B);B.$__EXT[B.$__EXT.length]=A}}}};$_.$_OBJ={$_:{},$_$_:{},$__init:function(B){B.$__EXT=[];B.$__TYPE="$_OBJ";for(var A in $_.$_OBJ.$_){if(!$_.$_OBJ.$_[A].accepts||$_.$_OBJ.$_[A].accepts(B)){$_.$_OBJ.$_[A].init(B);B.$__EXT[B.$__EXT.length]=A}}}};$_.$_NUMBER={$_:{},$_$_:{},$__init:function(B){var C=B instanceof Number?B:new Number(B);C.$__EXT=[];C.$__TYPE="$_NUMBER";for(var A in $_.$_NUMBER.$_){if(!$_.$_NUMBER.$_[A].accepts||$_.$_NUMBER.$_[A].accepts(C)){$_.$_NUMBER.$_[A].init(C);C.$__EXT[C.$__EXT.length]=A}}return C}};$_.$_FUNC={$_:{},$__exec:[],$__init:function(A){return A}};$_.copy=$_.$__copy=function(C){var B=[];var A=C.length;for(var D=0;D<A;D++){B.push(C[D])}return B};$_.flat=$_.$__flat=function(A,E){var C=E||[];var B=A.length;for(var D=0;D<B;D++){if(A[D]&&A[D].length&&(typeof A[D]!="string"&&!(A[D]instanceof String))&&!A[D].nodeType){$_.flat(A[D],C)}else{if(!(A[D]instanceof Array)){C.push(A[D])}}}return C};Array.prototype.contains=function(C){var A=this.length;for(var B=0;B<A;B++){if(this[B]===C){return true}}return null};Array.prototype.search=function(C){var A=this.length;if(typeof C=="function"){for(var B=0;B<A;B++){if(C(this[B])){return B}}}else{for(var B=0;B<A;B++){if(this[B]==C){return B}}}return null};Array.prototype.intersects=function(){var D=[];var B=this.length;var F=arguments.length;for(var E=0;E<B;E++){var A=false;for(var C=0;C<F;C++){if(arguments[C]===null||arguments[C]===false){var A=true}else{if(arguments[C].contains&&typeof arguments[C].length!="undefined"){if(!arguments[C].contains(this[E])){var A=true;break}}else{if(arguments[C]!=this[E]){var A=true;break}}}}if(!A){D.push(this[E])}}if(D){if(D.length){return D}else{return[]}}else{return[]}};Array.prototype.apply=function(B){for(var A=0;A<this.length;A++){B(this[A])}};Array.prototype.empty=function(){return!this.join("").length};Array.prototype.first=function(){return $_._(this[0])?this[0]:null};Array.prototype.last=function(){return $_._(this[this.length-1])?this[this.length-1]:null};$_._=function(A,B){var D=typeof A;D=D.charAt(0);var C=typeof A=="undefined";return B?(D==B):(C?false:D)};$_.extend=function(C,A){for(var B in A){C[B]=A[B]}return C};$_.__.XMLHttp=function(A,B){this.URL=A||window.location.protocol+"//"+window.location.host+window.location.pathname;this.requestMethod=B?"POST":"GET";this.data=B?B:false;this.is_async=false;this.callBack=false;this.request=window.XMLHttpRequest?(new XMLHttpRequest()):(new ActiveXObject("Microsoft.XMLHTTP"))};$_.__.XMLHttp.prototype.async=function(A){this.callBack=(typeof A=="function")?A:false;return this};$_.__.XMLHttp.prototype.parse=function(){var B=this;if(typeof this.data!="string"){var A=0;var D="";for(var C in this.data){D=D+(A?"&":"")+encodeURIComponent(C)+"="+encodeURIComponent(this.data[C]);A++}this.data=D}if(this.requestMethod=="GET"&&this.data.length){var E=(this.URL.lastIndexOf("?")==-1)?"?":"";this.URL=this.URL+E+this.data;this.data=null}this.request.open(this.requestMethod,this.URL,(!!this.callBack));if(!!this.callBack){this.request.onreadystatechange=function(F){return function(){F.onStateChange()}}(this)}if($_._(this.request.setRequestHeader)){this.request.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}this.request.send((this.data&&this.data.length)?this.data:null);if(!this.callBack){return this.doParse()}return true};$_.__.XMLHttp.prototype.onStateChange=function(){if(this.request.readyState==4){if(!parseInt(this.request.status)||this.request.status==200){this.doParse()}else{if($_._(this.onError[this.request.status],"f")){this.callBack(this.onError[this.request.status](this.URL))}return this.callBack(false)}}};$_.__.XMLHttp.prototype.doParse=function(){var parsed=null;if(this.request.status&&this.request.status!=200){if($_._(this.onError[this.request.status],"f")){return this.onError[this.request.status](this.URL)}else{return false}}else{var ct=this.request.getResponseHeader("Content-type");switch(ct){case"application/x-javascript":case"text/javascript":case"application/ecmascript":case"text/ecmascript":try{var detectChar=this.request.responseText.match(/\s*(.{1})/);var parsed=/[0-9{(['"]/.test(detectChar)?eval("("+this.request.responseText+")"):this.request.responseText}catch(e){if(e.name=="SyntaxError"){$_.raise("Transfer","Got syntax error in "+this.URL)}else{$_.raise("Transfer","Unknown error while parsing remote JS "+this.URL)}}break;default:parsed=this.request.responseText}this.parsed=parsed?parsed:null;if($_._(this.callBack,"f")){this.callBack(this.parsed);this.callBack=null;return true}else{return this.parsed}}};$_.__.XMLHttp.prototype.onError={1403:function(A){$_.raise("Transfer","Acess denied while accessing "+A)},1404:function(A){$_.raise("Transfer","Not found while accessing "+A);return false}};$_.$_STR.$_.XMLHttp={accepts:function(A){return true},init:function(A){A.GET=function(B){return new $_.__.XMLHttp(A).async(B||null).parse()};A.POST=function(C,B){return new $_.__.XMLHttp(A,C||null).async(B||null).parse()};return A}};$_.$_DOM.$_.XMLHttpA={asccepts:function(A){return A.tagName.toLowerCase()!="form"},init:function(A){A.GET=function(B,C){$_(B).GET(function(D){if(!C){A.innerHTML=D}else{var E=document.createElement("div");E.innerHTML=D;if(C.tagName){A.insertBefore(E.firstChild,C)}else{if(C>0){A.appendChild(E.firstChild)}else{if(C<0){A.insertBefore(E.firstChild,A.firstChild)}}}}});return A};return A}};$_.$_DOM.$_.XMLHttp={accepts:function(A){return A.tagName&&A.tagName.toLowerCase()=="form"},init:function(A){A.getData=function(){var E=A.elements;var C=[];var F={};for(var D=E.length-1;D>=0;D--){var B=$_(E[D]);if(B.name&&B.type!="file"&&B.type!="radio"&&B.type!="button"){var H=B.VAL();if(H!==false){if(H instanceof Array){for(var G=0;G<H.length;G++){C[C.length]=encodeURIComponent(B.name)+"="+encodeURIComponent(H[G])}}else{C[C.length]=encodeURIComponent(B.name)+"="+encodeURIComponent(H)}}}else{if(B.type=="radio"){if(!F[B.name]){if(B.checked){F[B.name]=1;C[C.length]=encodeURIComponent(B.name)+"="+encodeURIComponent(B.VAL())}}}}}return C.join("&")};A.GET=function(C){var B=new $_.__.XMLHttp(A.action,A.getData());B.requestMethod="GET";if(C){B.async(C)}return B.parse()},A.POST=function(C){var B=new $_.__.XMLHttp(A.action,A.getData());if(C){B.async(C)}return B.parse()},A.SEND=function(B){return A[(A.method.toLowerCase()=="post")?"POST":"GET"](B)}}};$_.$_DOM.$_.valueSetGet={accepts:function(A){return(["INPUT","SELECT","TEXTAREA"]).contains(A.tagName.toUpperCase())},init:function(A){A.VAL=function(C,F){if(!C){switch(A.tagName.toUpperCase()){case"SELECT":if(A.selectedIndex==-1){return false}if(A.multiple){var D=[];for(var E=0;E<A.options.length;E++){if(A.options[E].selected){D.push(A.options[E].value)}}return D}return A.options[A.selectedIndex].value;break;case"INPUT":if(A.type.toLowerCase()=="checkbox"&&!A.checked){return false}if(A.type.toLowerCase()==="radio"&&A.form&&A.name){var B=A.form[A.name].length?A.form[A.name]:[A.form[A.name]];for(var E=0;E<B.length;E++){if(B[E].checked){return B[E].value}}return false}default:return A.value}}else{switch(A.tagName.toUpperCase()){case"SELECT":for(var E=A.options.length-1;E>=0;E--){if(A.options[E].value==C){A.options[E].selected=true;break}}break;default:return A.value=C}}if(F){if(!$_.ie){var G=document.createEvent("HTMLEvents");G.initEvent("change",false,false);A.dispatchEvent(G)}else{A.fireEvent("onchange")}}};A.encode2URI=function(B){var C=A.VAL();return((A.name||B)&&(C!==false))?encodeURIComponent(A.name)+"="+encodeURIComponent(C):false};A.CRC32=function(){var B=A.encode2URI(1);return(B!==false)?$_(B).CRC32():false}}};$_.$_DOM.$_$_.valueSetGet={init:function(A){A.VAL=function(B){var C=A.length;if(!B){var E=[];var G={};for(var F=0;F<C;F++){if(A[F].type.toLowerCase()!=="radio"){var D=A[F].VAL();if(D!==false){E[E.length]=D}}else{if(!G[A.name]){G[A.name]=true;E[E.length]=A[F].VAL()}}}return $_(E)}else{for(var F=0;F<C;F++){if(A[F].type.toLowerCase()!=="radio"){}else{if(A[F].value==B){A[F].checked=true}}}}};A.encode2URI=function(){var B=A.length;var C=[];var F={};for(var D=0;D<B;D++){var E=false;if(A[D].type.toLowerCase()!=="radio"){E=A[D].encode2URI()}else{if(!F[A.name]){F[A.name]=true;E=A[D].encode2URI()}}if(E!==false){C[C.length]=A[D].encode2URI()}}return C.join("&")};A.CRC32=function(){var B=A.encode2URI();return(B!==false)?$_(B).CRC32():false}}};$_.$_DOM.$_.All={init:function(A){A.setLoading=function(){};A.$_T=function(C){var B=[];for(var D=0;D<arguments.length;D++){B.push($_.copy(A.getElementsByTagName(arguments[D])))}return B[1]?B:B[0]}}};if(!$_.ie){$_.$_DOM.$_.CSS={init:function(A){A.CSS=function(C){if(typeof C!="string"){for(var B in C){A.style[B]=C[B]}return A}else{return A.style[C]}};A.CSSSave=function(C){A.$_style={};for(var B in C){A.$_style[B]=C[B]}return A};A.CSSLoad=function(){for(var B in A.$_style){A.style[B]=A.$_style[B]}return A}}}}else{$_.$_DOM.$_.CSS={init:function(A){A.CSS=function(E){if(typeof E!="string"){for(var D in E){if("opacity"==D){var C=A.filters["DXImageTransform.Microsoft.alpha"]||A.filters.alpha;A.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+E[D]*100+")";A.style.zoom=A.style.zoom||1}else{A.style[D]=E[D]}}return A}else{if(E!="opacity"){return A.style[E]}var B=A.style.filter.match(/opacity=([0-9]+)/);if(B){return B[1]/100}}};A.CSSSave=function(C){A.$_style={};for(var B in C){A.$_style[B]=C[B]}return A};A.CSSLoad=function(){for(var B in A.$_style){A.style[B]=A.$_style[B]}return A}}}}$_.$_DOM.$_$_.CSS={init:function(A){A.CSS=function(C){for(var B=A.length-1;B>=0;B--){A[B].CSS(C)}return A}}};function RGBColor(A){this.ok=false;if(A.charAt(0)=="#"){A=A.substr(1,6)}A=A.replace(/ /g,"");A=A.toLowerCase();var B={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var G in B){if(A==G){A=B[G]}}var F=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(J){return[parseInt(J[1]),parseInt(J[2]),parseInt(J[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(J){return[parseInt(J[1],16),parseInt(J[2],16),parseInt(J[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(J){return[parseInt(J[1]+J[1],16),parseInt(J[2]+J[2],16),parseInt(J[3]+J[3],16)]}}];for(var C=0;C<F.length;C++){var I=F[C].re;var E=F[C].process;var H=I.exec(A);if(H){var D=E(H);this.r=D[0];this.g=D[1];this.b=D[2];this.ok=true}}this.r=(this.r<0||isNaN(this.r))?0:((this.r>255)?255:this.r);this.g=(this.g<0||isNaN(this.g))?0:((this.g>255)?255:this.g);this.b=(this.b<0||isNaN(this.b))?0:((this.b>255)?255:this.b);this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var L=this.r.toString(16);var K=this.g.toString(16);var J=this.b.toString(16);if(L.length==1){L="0"+L}if(K.length==1){K="0"+K}if(J.length==1){J="0"+J}return"#"+L+K+J}}$_.__.Mutation=function(A){this.element=A;this.FPS=30;this.duration=0;this.framesCount=0;this.movies=[];this.sequence=[]};$_.__.Mutation.prototype.set=function(F,E,C){var B=[];for(var A in F){var D=new $_.__.Mutagen();if(F[A]=="auto"){if(A=="height"){F[A]=this.element.offsetHeight+"px"}}if(D["__"+A]){if(typeof E[A]!=="undefined"){D["__"+A](F[A],E[A],C);B.push(D.movie)}}else{if(typeof E[A]!=="undefined"){D.__Number.apply(D,[A,F[A],E[A],C]);B.push(D.movie)}}}this.duration+=C*1000/this.FPS;this.sequence.push(B)};$_.__.Mutation.prototype.clear=function(){this.movies=[];this.sequence=[];this.duration=0};$_.__.Mutation.prototype.play=function(){if(this.paused||this.element.mutating){return}this.element.mutating=1;var I=[];for(var H=0;this.movies=this.sequence[H];H++){var G=this.movies[0].length;for(var E=0;E<G;E++){var C=this.movies.length;var F={};for(var B=0;B<C;B++){$_.extend(F,this.movies[B][E])}I[I.length]=F}}var A=I.length/this.FPS;var D=Math.ceil(A*1000/I.length);this.currentIndex=0;this.intId=setInterval(function(J,K){return function(){if(!J[K.currentIndex]){K.element.mutating=0;clearInterval(K.intId);K.currentIndex=0;if(K.isCyclic){K.play()}if(K.onPlay){K.onPlay()}return}K.element.CSS(J[K.currentIndex]);K.currentIndex+=1}}(I,this),D)};$_.__.Mutation.prototype._play=function(){if(this.paused||this.element.mutating){return}this.element.mutating=1;this.funcs=[];var E=0;var K=this;if(this.onPlay){setTimeout(function(){K.onPlay()},Math.ceil(this.duration))}setTimeout(function(){K.element.mutating=0},Math.ceil(this.duration));var J=null;var B=Math.ceil(1000/this.FPS);for(var I=0;this.movies=this.sequence[I];I++){var H=this.movies[0].length;for(var G=0;G<H;G++){var F=this.movies.length;for(var D=0;D<F;D++){var A=this.movies[D][G];if(J!=A){var C=function(M,L){return function(){M.CSS(L)}}(this.element,A);this.funcs.push(C);setTimeout(C,E+B*G)}var J=A}}E+=B*G}if(this.isCyclic){setTimeout(function(){K.play()},E)}};$_.__.Mutation.prototype.rewind=function(){if(this.paused||this.element.mutating){return}this.element.mutating=1;var E=0;var C=this;if(this.onRewind){setTimeout(function(){C.onRewind()},Math.ceil(this.duration))}setTimeout(function(){C.element.mutating=0},Math.ceil(this.duration));var B=Math.ceil(this.duration/this.funcs.length);var A=this.funcs.length;for(var D=0;this.funcs[D];D++){setTimeout(this.funcs[D],B*(A-D))}};$_.__.Mutation.prototype.pause=function(){this.paused=true};$_.__.Mutation.prototype.stop=function(){clearInterval(this.intId);this.element.mutating=0};$_.__.Mutation.prototype.unpause=function(){this.paused=false};$_.__.Mutagen=function(){this.movie=[]};$_.__.Mutagen.prototype.__backgroundColor=function(C,B,A){this.__Color.apply(this,["backgroundColor",C,B,A])};$_.__.Mutagen.prototype.__borderColor=function(C,B,A){this.__Color.apply(this,["borderColor",C,B,A])};$_.__.Mutagen.prototype.__color=function(C,B,A){this.__Color.apply(this,["color",C,B,A])};$_.__.Mutagen.prototype.__Color=function(D,O,N,C){var I=new RGBColor(O);var P=new RGBColor(N);var K=new RGBColor("red");var B=(P.r-I.r)/C;var J=(P.g-I.g)/C;var E=(P.b-I.b)/C;var A=I.r;var H=I.g;var M=I.b;var L="";for(var G=0;G<C;G++){A+=B;H+=J;M+=E;K.r=Math.round(A);K.g=Math.round(H);K.b=Math.round(M);var F={};F[D]=K.toHex();this.movie.push(F)}};$_.__.Mutagen.prototype.__eNumber=function(B,G,F,A){var I=G.toString().replace(/[\-0-9]+/,"");F=parseFloat(F);G=parseFloat(G);var H=(F-G)/A;var E=G;for(var D=0;D<A;D++){E+=H;var C={};C[B]=Math.round(E)+I;this.movie.push(C)}};$_.__.Mutagen.prototype.__Number=function(B,G,F,A){var I=G.toString().replace(/[\-0-9]+/,"");F=parseFloat(F);G=parseFloat(G);var H=(F-G)/A;var E=G;var J=I=="px"?1:100;for(var D=0;D<A;D++){E+=H;var C={};C[B]=Math.round(E*J)/J+I;this.movie.push(C)}};$_.$_DOM.$_.Mutation={init:function(A){A.mutate=function(){A.mutation=new $_.__.Mutation(A);var B=arguments.length-1;if(typeof arguments[B]=="function"){A.mutation.onPlay=function(G){return function(){G()}}(arguments[B]);B--}var F=Math.round(arguments[B]/(B-1));for(var D=0;D<B-1;D++){var E=arguments[D];var C=arguments[D+1];A.mutation.set(E,C,F)}A.mutation.play()};A.demutate=function(B){if(typeof B=="function"){A.mutation.onRewind=function(){B()}}A.mutation.rewind()}}};$_.$_DOM.$_$_.Mutation={init:function(A){A.mutate=function(){var C=A.length;var G=[];var D=arguments.length-1;if(typeof arguments[D]=="function"){var I=function(K){return function(){K()}}(arguments[D]);D--}var B=Math.round(arguments[D]/(D-1));for(var E=0;E<C;E++){A[E].mutation=new $_.__.Mutation(A[E]);for(var F=0;F<D-1;F++){var H=arguments[F];var J=arguments[F+1];A[E].mutation.set(H,J,B)}if(E==(C-1)){A[E].mutation.onPlay=I}G[E]=A[E].mutation}for(var F=0;F<C;F++){G[F].play()}};A.demutate=function(D){var B=A.length;for(var C=0;C<B;C++){if(typeof D=="function"&&(C==B-1)){A[C].mutation.onRewind=function(){D()}}A[C].mutation.rewind()}}}};$_.$_DOM.$_.Collection=$_.$_STR.$_.Collection=$_.$_OBJ.$_.Collection=$_.$_NUMBER.$_.Collection={init:function(A){A.apply=function(B){B(A)};return A}};Array.prototype.$_=function(){return this};Array.prototype.apply=function(C){var A=this.length;for(var B=0;B<A;B++){C(this[B])}return this};$_.$_STR.$_.DOMAccess={accepts:function(A){var B=A.charAt(0);return(B=="#"||B=="."||B=="~"||B=="@"||B==">")},init:function(H){var E=H.match(/[#.~@][a-z0-9_\-*]+/ig);if(E.length>=2){var I=[];for(var F=0;F<E.length;F++){I[I.length]=$_(E[F])}return $_(I[0].intersects.apply(I[0],I.slice(1)))}switch(H.charAt(0)){case"#":var B=!$_.__[H]?$_(document.getElementById(H.substr(1))):$_.__[H];break;case"@":var B=$_(document.getElementsByName(H.substr(1)));break;case"~":var K=H.substr(1).toLowerCase();switch(K){case"checkbox":case"radio":case"password":case"image":case"text":var D=$_("~input");var B=[];for(var C=0;C<D.length;C++){if(D[C].type&&D[C].type==K){B[B.length]=D[C]}}B=$_(B);break;default:var B=$_(document.getElementsByTagName(K))}break;case".":var J=new Array();var D=document.getElementsByTagName("*");var G=D.length;var A=new RegExp("(^|\\s)"+H.substr(1)+"(\\s|$)");for(F=0,C=0;F<G;F++){if(A.test(D[F].className)){J[C]=D[F];C++}}var B=$_(J);break}return B}};$_.$_STR.$_$_.DOMAccess={init:function(A){var B=[];for(var C=0;C<A.length;C++){B[B.length]=$_.$_STR.$_.DOMAccess.init(A[C])}return B}};$_.$_DOM.$_.DOMAccess={init:function(A){A.$_=function(G){if(arguments.length>1){var I=[];for(var F=0;F<arguments.length;F++){I.push(A.$_(arguments[F]))}return $_(I)}var E=G.match(/[#.~@>][a-z0-9_\-\*]+/ig);if(E.length>=2){var H=[];for(var F=0;F<E.length;F++){H[H.length]=$_(E[F])}return $_(H[0].intersects.apply(H[0],H.slice(1)))}switch(G.charAt(0)){case"~":var J=G.substr(1).toLowerCase();switch(J){case"checkbox":case"radio":case"password":case"image":case"text":var D=A.$_("~input");var B=[];for(var C=0;C<D.length;C++){if(D[C].type&&D[C].type==J){B[B.length]=D[C]}}B=$_(B);break;default:var B=$_(A.getElementsByTagName(J))}break;case">":var B=[];var D=A.childNodes;for(var F=D.length-1;F>=0;F--){if(D[F].tagName){B.push(D[F])}}B.reverse();break;case"@":var B=(function(Q,P,L){var M=new Array();if(P==null){P=document}if(L==null){L="*"}var N=P.getElementsByTagName(L);var O=N.length;var K=new RegExp("(^|\\s)"+Q+"(\\s|$)");for(F=0,C=0;F<O;F++){if(K.test(N[F].name)){M[C]=N[F];C++}}return M})(G.substr(1),A,null);break;case".":var B=(function(M,Q,L){var P=new Array();if(Q==null){Q=document}if(L==null){L="*"}var N=Q.getElementsByTagName(L);var O=N.length;var K=new RegExp("(^|\\s)"+M+"(\\s|$)");for(F=0,C=0;F<O;F++){if(K.test(N[F].className)){P[C]=N[F];C++}}return P})(G.substr(1),A,null);break}return $_(B)};A.intersects=function(B){for(var C=0;C<B.length;C++){if(A==B[C]){return A}}return null}}};$_.$_DOM.$_$_.DOMAccess={init:function(A){A.$_=function(D){var B=[];for(var C=0;C<A.length;C++){B[B.length]=A[C].$_.apply(A[C],arguments)}return $_(B)};A.intersects=Array.prototype.intersects}};;var ie=0/*@cc_on+@_jscript_version*10@*/;$_.ie6=$_.IE6=ie==56;window.ACPTop=200;window.intPrevious=setInterval(function(){if(typeof AW_ACP!='undefined'&&document.body){if(typeof aw_cartDivClass=='undefined'){aw_cartDivClass=AW_ACP.theme=='blank'?'.block block-cart':'.box base-mini mini-cart';if(!$_(aw_cartDivClass).tagName){aw_cartDivClass='.block block-cart'}}
if(typeof aw_topLinkCartClass=='undefined'){aw_topLinkCartClass='.top-link-cart';}
if(typeof aw_addToCartButtonClass=='undefined'){aw_addToCartButtonClass='.form-button';}
if(typeof aw_bigCartClass=='undefined'){aw_bigCartClass=AW_ACP.theme=='modern'?'.layout-1column':'.col-main';}
if(window.location.toString().search('/product_compare/')!=-1){win=window.opener;}
else{win=window;}
clearInterval(intPrevious)}},500);function setLocation(url){if(window.location.href.match('https://')&&!url.match('https://')){url=url.replace('http://','https://')}
if(AW_ACP.isCartPage&&((url.search('/add')!=-1)||(url.search('/remove')!=-1))){ajaxcartsend(url+'awacp/1/is_checkout/1','url','','');}else if(url.search('checkout/cart/add')!=-1){ajaxcartsend(url+'awacp/1','url','','');}else{window.location.href=url;}}
if(!$_.ie6){var cnt1=20;__intId=setInterval(function(){cnt1--;if(typeof productAddToCartForm!='undefined'){try{$_('#product_addtocart_form').$_(aw_addToCartButtonClass).setAttribute('type','button');}catch(err){}
productAddToCartForm.submit=function(url){if(this.validator&&this.validator.validate()){ajaxcartsend('?awacp=1','form',this,'');}
return false;}
clearInterval(__intId);}
if(!cnt1)clearInterval(__intId);},500);var cnt2=20;__intId2=setInterval(function(){cnt2--;if(typeof aw_cartDivClass!='undefined'&&!$_(aw_cartDivClass).empty()||((typeof AW_ACP!=='undefined')&&AW_ACP.isCartPage)){updateDeleteLinks();clearInterval(__intId2);}
if(!cnt2)clearInterval(__intId);},500);}
function setPLocation(url,setFocus){if(url.search('checkout/cart/add')!=-1){window.opener.focus();ajaxcartsend(url+'/awacp/1','url','');}
else{if(setFocus){window.opener.focus();}
window.opener.location.href=url;}}
function ajaxcartsend(url,type,obj){url=getCommonUrl(url)
showProgressAnimation();if(type=='form'){$_('#product_addtocart_form').action+=url;$_('#product_addtocart_form').POST(function(resp){if(typeof(resp)=='string'){try{eval('resp = '+resp);}catch(e){return obj.form.submit();}}
hideProgressAnimation();if(resp.r!='success'){obj.form.submit();}
else{if(AW_ACP.useConfirmation){showConfirmDialog();}
updateCartView(resp);}});}
if(type=='url'){$_(url).GET(function(resp){try{if(typeof(resp)=='string')eval('resp = '+resp);}catch(e){win.location.href=url;hideProgressAnimation();return;}
hideProgressAnimation();if(resp.r!='success'){win.location.href=url;}
else{if(AW_ACP.useConfirmation){showConfirmDialog();}
updateCartView(resp);}});}}
function updateDeleteLinks(){var tmpLinks=document.links;for(i=0;i<tmpLinks.length;i++){if(tmpLinks[i].href.search('checkout/cart/delete')!=-1){url=tmpLinks[i].href.replace(/\/uenc\/.+,/g,"");var del=url.match(/delete\/id\/\d+\//g);var id=del[0].match(/\d+/g);if(win.location.protocol=='https:'){aw_base_url=aw_base_url.replace("http:","https:");}
if(!AW_ACP.isCartPage){tmpLinks[i].href='javascript:ajaxcartprodelete("'+aw_base_url+'ajaxcartpro/cart/remove/id/'+id+'")';}else{tmpLinks[i].href='javascript:ajaxcartprodelete("'+aw_base_url+'ajaxcartpro/cart/remove/id/'+id+'/is_checkout/1")';}}}}
function updateTopLinks(resp){win.$_(aw_topLinkCartClass).title=win.$_(aw_topLinkCartClass).innerHTML=resp.links;}
function updateCartView(resp){if(AW_ACP.isCartPage)return updateBigCartView(resp);var __cartObj=win.$_(aw_cartDivClass);if(!__cartObj)return false;if(typeof(__cartObj.length)=='number')__cartObj=__cartObj[0];var oldHeight=__cartObj.offsetHeight;var tmpDiv=win.document.createElement('div');tmpDiv.innerHTML=resp.cart;var tmpParent=__cartObj.parentNode;tmpParent.replaceChild(tmpDiv.firstChild,__cartObj);var __cartObj=win.$_(aw_cartDivClass);if(typeof(__cartObj.length)=='number')__cartObj=__cartObj[0];var newHeight=__cartObj.offsetHeight;if(aw_ajaxcartpro_cartanim=='opacity'){$_(__cartObj).mutate({opacity:0},{opacity:1},30);}
if(aw_ajaxcartpro_cartanim=='grow'){$_(__cartObj).style.overflow='hidden';$_(__cartObj).mutate({opacity:0,height:oldHeight+'px'},{opacity:1,height:newHeight+'px'},30);}
if(aw_ajaxcartpro_cartanim=='blink'){$_(__cartObj).mutate({opacity:0},{opacity:1},10);}
updateDeleteLinks();updateTopLinks(resp);}
window.updateBigCartView=function(resp){$_(aw_bigCartClass).innerHTML=resp.cart
if($_('#shopping-cart-table')){decorateTable('shopping-cart-table')}
updateDeleteLinks();updateTopLinks(resp);updateAddLinks();var scripts=resp.cart.match(/<script[^>]*>([^<]+)<\/script>/gim);for(var i=0;i<scripts.length;i++){var code=scripts[i].match(/<script[^>]*>([^<]+)<\/script>/im)[1].replace(/var\s+/g,'');try{eval(code)}catch(e){}}}
function ajaxcartprodelete(url){showProgressAnimation();url=getCommonUrl(url)
$_(url).GET(function(resp){if(typeof(resp)=='string')eval('resp = '+resp);hideProgressAnimation();updateCartView(resp,'');});}
function showProgressAnimation(){var pW=260;var pH=50;p=win.$_('.ajaxcartpro_progress');if(typeof p.length=='number'){p=p[0]}
p.style.width=pW+'px';p.style.height=pH+'px';if($_.ie&&!navigator.appVersion.match("8")){p.style.position='absolute';window.ACPTop=200;}
if(aw_ajaxcartpro_proganim=='center'){if(!($_.ie&&!navigator.appVersion.match("8"))){p.style.top=(screen.height/3)-(pH)+'px';}else{window.ACPTop=200;}}
if(aw_ajaxcartpro_proganim=='top'){if(!($_.ie&&!navigator.appVersion.match("8"))){p.style.top='0px';}else{window.ACPTop=0;}}
if(aw_ajaxcartpro_proganim=='bottom'){p.style.bottom='0px';}
if(aw_ajaxcartpro_proganim!='none'){p.style.display='block';}}
function showConfirmDialog(){var pW=400;var pH=120;p=$_('.ajaxcartpro_confirm');p.style.width=pW+'px';p.style.height=pH+'px';if($_.ie&&!navigator.appVersion.match("8")){p.style.position='absolute';p.style.top=(screen.height/3)-(pH)+'px';}else{p.style.position='fixed';if(aw_ajaxcartpro_proganim=='center'){p.style.top=(screen.height/3)-(pH)+'px';}
if(aw_ajaxcartpro_proganim=='top'){p.style.top='0px';}
if(aw_ajaxcartpro_proganim=='bottom'){p.style.bottom='0px';}}
if(aw_ajaxcartpro_proganim!='none'){p.style.display='block';}}
function hideProgressAnimation(){$_('.ajaxcartpro_progress').style.display='none';}
if(!$_.ie6){window.onload=function(){updateAddLinks()
if((typeof aw_cartDivClass!='undefined')&&(!$_(aw_cartDivClass).empty()||((typeof AW_ACP!=='undefined')&&AW_ACP.isCartPage))){updateDeleteLinks();}}}
function updateAddLinks(){var ats=document.links;for(i=ats.length-1;i>=0;i--){if(ats[i].href.search('checkout/cart/add')!=-1){ats[i].onclick=function(link){return function(){setLocation(link)}}(ats[i].href);ats[i].href="javascript:void(0)";}}}
function getCommonUrl(url){if(window.location.href.match('www.')&&url.match('http://')&&!url.match('www.')){url=url.replace('http://','http://www.');}else if(!window.location.href.match('www.')&&url.match('http://')&&url.match('www.')){url=url.replace('www.','');}
return url;}
