var Class=function(_1){var _2=function(){if(this.initialize&&arguments[0]!="noinit"){return this.initialize.apply(this,arguments);}else{return this;}};for(var _3 in this){_2[_3]=this[_3];}_2.prototype=_1;return _2;};Class.empty=function(){};Class.prototype={extend:function(_4){var _5=new this("noinit");var _6=function(_7,_8){if(!_7.apply||!_8.apply){return false;}return function(){this.parent=_7;return _8.apply(this,arguments);};};for(var _9 in _4){var _a=_5[_9];var _b=_4[_9];if(_a&&_a!=_b){_b=_6(_a,_b)||_b;}_5[_9]=_b;}return new Class(_5);},implement:function(_c){for(var _d in _c){this.prototype[_d]=_c[_d];}}};Object.extend=function(){var _e=arguments;_e=(_e[1])?[_e[0],_e[1]]:[this,_e[0]];for(var _f in _e[1]){_e[0][_f]=_e[1][_f];}return _e[0];};Object.Native=function(){for(var i=0;i<arguments.length;i++){arguments[i].extend=Class.prototype.implement;}};new Object.Native(Function,Array,String,Number,Class);if(typeof HTMLElement=="undefined"){var HTMLElement=Class.empty;HTMLElement.prototype={};}else{HTMLElement.prototype.htmlElement=true;}window.extend=document.extend=Object.extend;var Window=window;function $type(obj){if(obj===null||obj===undefined){return false;}var _12=typeof obj;if(_12=="object"){if(obj.htmlElement){return "element";}if(obj.push){return "array";}if(obj.nodeName){switch(obj.nodeType){case 1:return "element";case 3:return obj.nodeValue.test(/\S/)?"textnode":"whitespace";}}}return _12;}function $chk(obj){return !!(obj||obj===0);}function $pick(obj,_15){return ($type(obj))?obj:_15;}function $random(min,max){return Math.floor(Math.random()*(max-min+1)+min);}function $clear(_18){clearTimeout(_18);clearInterval(_18);return null;}if(window.ActiveXObject){window.ie=window[window.XMLHttpRequest?"ie7":"ie6"]=true;}else{if(document.childNodes&&!document.all&&!navigator.taintEnabled){window.khtml=true;}else{if(document.getBoxObjectFor!=null){window.gecko=true;}}}if(window.ie6){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}Array.prototype.forEach=Array.prototype.forEach||function(fn,_1a){for(var i=0;i<this.length;i++){fn.call(_1a,this[i],i,this);}};Array.prototype.filter=Array.prototype.filter||function(fn,_1d){var _1e=[];for(var i=0;i<this.length;i++){if(fn.call(_1d,this[i],i,this)){_1e.push(this[i]);}}return _1e;};Array.prototype.map=Array.prototype.map||function(fn,_21){var _22=[];for(var i=0;i<this.length;i++){_22[i]=fn.call(_21,this[i],i,this);}return _22;};Array.prototype.every=Array.prototype.every||function(fn,_25){for(var i=0;i<this.length;i++){if(!fn.call(_25,this[i],i,this)){return false;}}return true;};Array.prototype.some=Array.prototype.some||function(fn,_28){for(var i=0;i<this.length;i++){if(fn.call(_28,this[i],i,this)){return true;}}return false;};Array.prototype.indexOf=Array.prototype.indexOf||function(_2a,_2b){_2b=_2b||0;if(_2b<0){_2b=Math.max(0,this.length+_2b);}while(_2b<this.length){if(this[_2b]===_2a){return _2b;}_2b++;}return -1;};Array.extend({each:Array.prototype.forEach,copy:function(_2c,_2d){_2c=_2c||0;if(_2c<0){_2c=this.length+_2c;}_2d=_2d||(this.length-_2c);var _2e=[];for(var i=0;i<_2d;i++){_2e[i]=this[_2c++];}return _2e;},remove:function(_30){var i=0;while(i<this.length){if(this[i]===_30){this.splice(i,1);}else{i++;}}return this;},test:function(_32,_33){return this.indexOf(_32,_33)!=-1;},extend:function(_34){for(var i=0;i<_34.length;i++){this.push(_34[i]);}return this;},associate:function(_36){var obj={},length=Math.min(this.length,_36.length);for(var i=0;i<length;i++){obj[_36[i]]=this[i];}return obj;}});function $A(_39,_3a,_3b){return Array.prototype.copy.call(_39,_3a,_3b);}function $each(_3c,fn,_3e){return Array.prototype.forEach.call(_3c,fn,_3e);}String.extend({test:function(_3f,_40){return ((typeof _3f=="string")?new RegExp(_3f,_40):_3f).test(this);},toInt:function(){return parseInt(this);},toFloat:function(){return parseFloat(this);},camelCase:function(){return this.replace(/-\D/g,function(_41){return _41.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/\w[A-Z]/g,function(_42){return (_42.charAt(0)+"-"+_42.charAt(1).toLowerCase());
});},capitalize:function(){return this.toLowerCase().replace(/\b[a-z]/g,function(_43){return _43.toUpperCase();});},trim:function(){return this.replace(/^\s+|\s+$/g,"");},clean:function(){return this.replace(/\s{2,}/g," ").trim();},rgbToHex:function(_44){var rgb=this.match(/\d{1,3}/g);return (rgb)?rgb.rgbToHex(_44):false;},hexToRgb:function(_46){var hex=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return (hex)?hex.slice(1).hexToRgb(_46):false;}});Array.extend({rgbToHex:function(_48){if(this.length<3){return false;}if(this[3]&&(this[3]==0)&&!_48){return "transparent";}var hex=[];for(var i=0;i<3;i++){var bit=(this[i]-0).toString(16);hex.push((bit.length==1)?"0"+bit:bit);}return _48?hex:"#"+hex.join("");},hexToRgb:function(_4c){if(this.length!=3){return false;}var rgb=[];for(var i=0;i<3;i++){rgb.push(parseInt((this[i].length==1)?this[i]+this[i]:this[i],16));}return _4c?rgb:"rgb("+rgb.join(",")+")";}});Number.extend({toInt:function(){return parseInt(this);},toFloat:function(){return parseFloat(this);}});Function.extend({create:function(_4f){var fn=this;_4f=Object.extend({"bind":fn,"event":false,"arguments":null,"delay":false,"periodical":false,"attempt":false},_4f||{});if($chk(_4f.arguments)&&$type(_4f.arguments)!="array"){_4f.arguments=[_4f.arguments];}return function(_51){var _52;if(_4f.event){_51=_51||window.event;_52=[(_4f.event===true)?_51:new _4f.event(_51)];if(_4f.arguments){_52=_52.concat(_4f.arguments);}}else{_52=_4f.arguments||arguments;}var _53=function(){return fn.apply(_4f.bind,_52);};if(_4f.delay){return setTimeout(_53,_4f.delay);}if(_4f.periodical){return setInterval(_53,_4f.periodical);}if(_4f.attempt){try{return _53();}catch(err){return err;}}return _53();};},pass:function(_54,_55){return this.create({"arguments":_54,"bind":_55});},attempt:function(_56,_57){return this.create({"arguments":_56,"bind":_57,"attempt":true})();},bind:function(_58,_59){return this.create({"bind":_58,"arguments":_59});},bindAsEventListener:function(_5a,_5b){return this.create({"bind":_5a,"event":true,"arguments":_5b});},delay:function(ms,_5d,_5e){return this.create({"delay":ms,"bind":_5d,"arguments":_5e})();},periodical:function(ms,_60,_61){return this.create({"periodical":ms,"bind":_60,"arguments":_61})();}});var Element=new Class({initialize:function(el){if($type(el)=="string"){el=document.createElement(el);}return $(el);}});function $(el){if(!el){return false;}if(el._element_extended_||[window,document].test(el)){return el;}if($type(el)=="string"){el=document.getElementById(el);}if($type(el)!="element"){return false;}if(["object","embed"].test(el.tagName.toLowerCase())||el.extend){return el;}el._element_extended_=true;Garbage.collect(el);el.extend=Object.extend;if(!(el.htmlElement)){el.extend(Element.prototype);}return el;}var Elements=new Class({});new Object.Native(Elements);document.getElementsBySelector=document.getElementsByTagName;function $$(){if(!arguments){return false;}if(arguments.length==1){if(!arguments[0]){return false;}if(arguments[0]._elements_extended_){return arguments[0];}}var _64=[];$each(arguments,function(_65){switch($type(_65)){case "element":_64.push($(_65));break;case "string":_65=document.getElementsBySelector(_65);default:if(_65.length){$each(_65,function(el){if($(el)){_64.push(el);}});}}});_64._elements_extended_=true;return Object.extend(_64,new Elements);}Elements.Multi=function(_67){return function(){var _68=arguments;var _69=[];var _6a=true;$each(this,function(el){var _6c=el[_67].apply(el,_68);if($type(_6c)!="element"){_6a=false;}_69.push(_6c);});if(_6a){_69=$$(_69);}return _69;};};Element.extend=function(_6d){for(var _6e in _6d){HTMLElement.prototype[_6e]=_6d[_6e];Element.prototype[_6e]=_6d[_6e];Elements.prototype[_6e]=Elements.Multi(_6e);}};Element.extend({inject:function(el,_70){el=$(el)||new Element(el);switch(_70){case "before":$(el.parentNode).insertBefore(this,el);break;case "after":if(!el.getNext()){$(el.parentNode).appendChild(this);}else{$(el.parentNode).insertBefore(this,el.getNext());}break;case "inside":el.appendChild(this);}return this;},injectBefore:function(el){return this.inject(
el,"before");},injectAfter:function(el){return this.inject(el,"after");},injectInside:function(el){return this.inject(el,"inside");},adopt:function(el){this.appendChild($(el)||new Element(el));return this;},remove:function(){this.parentNode.removeChild(this);return this;},clone:function(_75){var el=this.cloneNode(_75!==false);return $(el);},replaceWith:function(el){el=$(el)||new Element(el);this.parentNode.replaceChild(el,this);return el;},appendText:function(_78){if(window.ie){switch(this.getTag()){case "style":this.styleSheet.cssText=_78;return this;case "script":this.setProperty("text",_78);return this;}}this.appendChild(document.createTextNode(_78));return this;},hasClass:function(_79){return this.className.test("(?:^|\\s)"+_79+"(?:\\s|$)");},addClass:function(_7a){if(!this.hasClass(_7a)){this.className=(this.className+" "+_7a).clean();}return this;},removeClass:function(_7b){this.className=this.className.replace(new RegExp("(^|\\s)"+_7b+"(?:\\s|$)"),"$1").clean();return this;},toggleClass:function(_7c){return this.hasClass(_7c)?this.removeClass(_7c):this.addClass(_7c);},setStyle:function(_7d,_7e){if(_7d=="opacity"){this.setOpacity(parseFloat(_7e));}else{this.style[_7d.camelCase()]=(_7e.push)?"rgb("+_7e.join(",")+")":_7e;}return this;},setStyles:function(_7f){switch($type(_7f)){case "object":for(var _80 in _7f){this.setStyle(_80,_7f[_80]);}break;case "string":this.style.cssText=_7f;}return this;},setOpacity:function(_81){if(_81==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden";}}else{if(this.style.visibility!="visible"){this.style.visibility="visible";}}if(!this.currentStyle||!this.currentStyle.hasLayout){this.style.zoom=1;}if(window.ie){this.style.filter="alpha(opacity="+_81*100+")";}this.style.opacity=this.opacity=_81;return this;},getStyle:function(_82){_82=_82.camelCase();var _83=this.style[_82]||false;if(!$chk(_83)){if(_82=="opacity"){return $chk(this.opacity)?this.opacity:1;}if(["margin","padding"].test(_82)){return [this.getStyle(_82+"-top")||0,this.getStyle(_82+"-right")||0,this.getStyle(_82+"-bottom")||0,this.getStyle(_82+"-left")||0].join(" ");}if(document.defaultView){_83=document.defaultView.getComputedStyle(this,null).getPropertyValue(_82.hyphenate());}else{if(this.currentStyle){_83=this.currentStyle[_82];}}}if(_83=="auto"&&["height","width"].test(_82)){return this["offset"+_82.capitalize()]+"px";}return (_83&&_82.test(/color/i)&&_83.test(/rgb/))?_83.rgbToHex():_83;},addEvent:function(_84,fn){this.events=this.events||{};this.events[_84]=this.events[_84]||{"keys":[],"values":[]};if(!this.events[_84].keys.test(fn)){this.events[_84].keys.push(fn);if(this.addEventListener){this.addEventListener((_84=="mousewheel"&&window.gecko)?"DOMMouseScroll":_84,fn,false);}else{fn=fn.bind(this);this.attachEvent("on"+_84,fn);this.events[_84].values.push(fn);}}return this;},addEvents:function(_86){if(_86){for(var _87 in _86){this.addEvent(_87,_86[_87]);}}return this;},removeEvent:function(_88,fn){if(this.events&&this.events[_88]){var pos=this.events[_88].keys.indexOf(fn);if(pos==-1){return this;}var key=this.events[_88].keys.splice(pos,1)[0];if(this.removeEventListener){this.removeEventListener((_88=="mousewheel"&&window.gecko)?"DOMMouseScroll":_88,key,false);}else{this.detachEvent("on"+_88,this.events[_88].values.splice(pos,1)[0]);}}return this;},removeEvents:function(_8c){if(this.events){if(_8c){if(this.events[_8c]){this.events[_8c].keys.each(function(fn){this.removeEvent(_8c,fn);},this);this.events[_8c]=null;}}else{for(var _8e in this.events){this.removeEvents(_8e);}this.events=null;}}return this;},fireEvent:function(_8f,_90){if(this.events&&this.events[_8f]){this.events[_8f].keys.each(function(fn){fn.bind(this,_90)();},this);}},getBrother:function(_92){var el=this[_92+"Sibling"];while($type(el)=="whitespace"){el=el[_92+"Sibling"];}return $(el);},getPrevious:function(){return this.getBrother("previous");},getNext:function(){return this.getBrother("next");},getFirst:function(){var el=this.firstChild;while($type(el)=="whitespace"){el=el.nextSibling;}return $(el);},getLast:function(){var el=this.lastChi
ld;while($type(el)=="whitespace"){el=el.previousSibling;}return $(el);},getParent:function(){return $(this.parentNode);},getChildren:function(){return $$(this.childNodes);},setProperty:function(_96,_97){switch(_96){case "class":this.className=_97;break;case "style":this.setStyles(_97);break;case "name":if(window.ie6){var el=$(document.createElement("<"+this.getTag()+" name=\""+_97+"\" />"));$each(this.attributes,function(_99){if(_99.name!="name"){el.setProperty(_99.name,_99.value);}});if(this.parentNode){this.replaceWith(el);}return el;}default:this.setAttribute(_96,_97);}return this;},setProperties:function(_9a){for(var _9b in _9a){this.setProperty(_9b,_9a[_9b]);}return this;},setHTML:function(){this.innerHTML=$A(arguments).join("");return this;},getProperty:function(_9c){return (_9c=="class")?this.className:this.getAttribute(_9c);},getTag:function(){return this.tagName.toLowerCase();},scrollTo:function(x,y){this.scrollLeft=x;this.scrollTop=y;},getValue:function(){switch(this.getTag()){case "select":if(this.selectedIndex!=-1){var opt=this.options[this.selectedIndex];return opt.value||opt.text;}break;case "input":if(!(this.checked&&["checkbox","radio"].test(this.type))&&!["hidden","text","password"].test(this.type)){break;}case "textarea":return this.value;}return false;},getSize:function(){return {"scroll":{"x":this.scrollLeft,"y":this.scrollTop},"size":{"x":this.offsetWidth,"y":this.offsetHeight},"scrollSize":{"x":this.scrollWidth,"y":this.scrollHeight}};},getPosition:function(_a0){_a0=_a0||[];var el=this,left=0,top=0;do{top+=el.offsetTop||0;left+=((el.offsetLeft>0)?el.offsetLeft:0);el=el.offsetParent;}while(el);_a0.each(function(_a2){left-=_a2.scrollLeft||0;top-=_a2.scrollTop||0;});return {"x":left,"y":top};},getTop:function(){return this.getPosition().y;},getLeft:function(){return this.getPosition().x;},getCoordinates:function(_a3){var _a4=this.getPosition(_a3);var obj={"width":this.offsetWidth,"height":this.offsetHeight,"left":_a4.x,"top":_a4.y};obj.right=obj.left+obj.width;obj.bottom=obj.top+obj.height;return obj;}});window.addEvent=document.addEvent=Element.prototype.addEvent;window.removeEvent=document.removeEvent=Element.prototype.removeEvent;window.removeEvents=document.removeEvents=Element.prototype.removeEvents;var Garbage={elements:[],collect:function(_a6){Garbage.elements.push(_a6);},trash:function(){Garbage.collect(window);Garbage.collect(document);Garbage.elements.each(function(el){el.removeEvents();for(var p in Element.prototype){el[p]=null;}el.extend=null;});}};window.addEvent("unload",Garbage.trash);var Event=new Class({initialize:function(_a9){this.event=_a9||window.event;this.type=this.event.type;this.target=this.event.target||this.event.srcElement;if(this.target.nodeType==3){this.target=this.target.parentNode;}this.shift=this.event.shiftKey;this.control=this.event.ctrlKey;this.alt=this.event.altKey;this.meta=this.event.metaKey;if(["DOMMouseScroll","mousewheel"].test(this.type)){this.wheel=this.event.wheelDelta?(this.event.wheelDelta/(window.opera?-120:120)):-(this.event.detail||0)/3;}else{if(this.type.test(/key/)){this.code=this.event.which||this.event.keyCode;for(var _aa in Event.keys){if(Event.keys[_aa]==this.code){this.key=_aa;break;}}this.key=this.key||String.fromCharCode(this.code).toLowerCase();}else{if(this.type.test(/mouse/)||(this.type=="click")){this.page={"x":this.event.pageX||this.event.clientX+document.documentElement.scrollLeft,"y":this.event.pageY||this.event.clientY+document.documentElement.scrollTop};this.client={"x":this.event.pageX?this.event.pageX-window.pageXOffset:this.event.clientX,"y":this.event.pageY?this.event.pageY-window.pageYOffset:this.event.clientY};this.rightClick=(this.event.which==3)||(this.event.button==2);switch(this.type){case "mouseover":this.relatedTarget=this.event.relatedTarget||this.event.fromElement;break;case "mouseout":this.relatedTarget=this.event.relatedTarget||this.event.toElement;}}}}},stop:function(){this.stopPropagation();this.preventDefault();return this;},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation();}else{
this.event.cancelBubble=true;}return this;},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault();}else{this.event.returnValue=false;}return this;}});Event.keys={"enter":13,"up":38,"down":40,"left":37,"right":39,"esc":27,"space":32,"backspace":8,"delete":46};Function.extend({bindWithEvent:function(_ab,_ac){return this.create({"bind":_ab,"arguments":_ac,"event":Event});}});var Chain=new Class({chain:function(fn){this.chains=this.chains||[];this.chains.push(fn);return this;},callChain:function(){if(this.chains&&this.chains.length){this.chains.shift().delay(10,this);}},clearChain:function(){this.chains=[];}});var Events=new Class({addEvent:function(_ae,fn){if(fn!=Class.empty){this.events=this.events||{};this.events[_ae]=this.events[_ae]||[];if(!this.events[_ae].test(fn)){this.events[_ae].push(fn);}}return this;},fireEvent:function(_b0,_b1,_b2){if(this.events&&this.events[_b0]){this.events[_b0].each(function(fn){fn.create({"bind":this,"delay":_b2,"arguments":_b1})();},this);}return this;},removeEvent:function(_b4,fn){if(this.events&&this.events[_b4]){this.events[_b4].remove(fn);}return this;}});var Options=new Class({setOptions:function(_b6,_b7){this.options=Object.extend(_b6,_b7);if(this.addEvent){for(var _b8 in this.options){if(($type(this.options[_b8])=="function")&&_b8.test(/^on[A-Z]/)){this.addEvent(_b8,this.options[_b8]);}}}return this;}});var Group=new Class({initialize:function(){this.instances=$A(arguments);this.events={};this.checker={};},addEvent:function(_b9,fn){this.checker[_b9]=this.checker[_b9]||{};this.events[_b9]=this.events[_b9]||[];if(this.events[_b9].test(fn)){return false;}else{this.events[_b9].push(fn);}this.instances.each(function(_bb,i){_bb.addEvent(_b9,this.check.bind(this,[_b9,_bb,i]));},this);return this;},check:function(_bd,_be,i){this.checker[_bd][i]=true;var _c0=this.instances.every(function(_c1,j){return this.checker[_bd][j]||false;},this);if(!_c0){return;}this.instances.each(function(_c3,j){this.checker[_bd][j]=false;},this);this.events[_bd].each(function(_c5){_c5.call(this,this.instances,_be);},this);}});function $E(_c6,_c7){return ($(_c7)||document).getElement(_c6);}function $ES(_c8,_c9){return ($(_c9)||document).getElementsBySelector(_c8);}Element.extend({getElements:function(_ca){var _cb=[];_ca.clean().split(" ").each(function(sel,i){var _ce=sel.match(/^(\w*|\*)(?:#([\w-]+)|\.([\w-]+))?(?:\[(\w+)(?:([*^$]?=)["']?([^"'\]]*)["']?)?])?$/);if(!_ce){return;}Filters.selector=_ce;_ce[1]=_ce[1]||"*";if(i==0){if(_ce[2]){var el=this.getElementById(_ce[2]);if(!el||((_ce[1]!="*")&&(Element.prototype.getTag.call(el)!=_ce[1]))){return;}_cb=[el];}else{_cb=$A(this.getElementsByTagName(_ce[1]));}}else{_cb=Elements.prototype.getElementsByTagName.call(_cb,_ce[1],true);if(_ce[2]){_cb=_cb.filter(Filters.id);}}if(_ce[3]){_cb=_cb.filter(Filters.className);}if(_ce[4]){_cb=_cb.filter(Filters.attribute);}},this);return $$(_cb);},getElementById:function(id){var el=document.getElementById(id);if(!el){return false;}for(var _d2=el.parentNode;_d2!=this;_d2=_d2.parentNode){if(!_d2){return false;}}return el;},getElement:function(_d3){return this.getElementsBySelector(_d3)[0];},getElementsBySelector:function(_d4){var els=[];_d4.split(",").each(function(sel){els.extend(this.getElements(sel));},this);return $$(els);}});document.extend({getElementsByClassName:function(_d7){return document.getElements("."+_d7);},getElement:Element.prototype.getElement,getElements:Element.prototype.getElements,getElementsBySelector:Element.prototype.getElementsBySelector});var Filters={selector:[],id:function(el){return (el.id==Filters.selector[2]);},className:function(el){return (Element.prototype.hasClass.call(el,Filters.selector[3]));},attribute:function(el){var _db=el.getAttribute(Filters.selector[4]);if(!_db){return false;}var _dc=Filters.selector[5];if(!_dc){return true;}var _dd=Filters.selector[6];switch(_dc){case "*=":return (_db.test(_dd));case "=":return (_db==_dd);case "^=":return (_db.test("^"+_dd));case "$=":return (_db.test(_dd+"$"));}return false;}};Elements.extend({getElementsByTagName:function(_de)
{var _df=[];this.each(function(el){_df.extend(el.getElementsByTagName(_de));});return _df;}});function ieMenuLoader(_e1,_e2){if(window.ie6){var _e3="#"+_e1+" "+_e2;var _e4=0;$$(_e3).each(function(_e5,_e6){var _e7=_e5.getCoordinates();_e4=Math.max(_e4,Math.abs(_e5.offsetLeft));var ul=_e5.getElement("ul");if(ul!==undefined||_e5.id=="list-Drums--Percussion"){_e5.addEvent("mouseover",function(){_e5.addClass("over");var _e9=ul.getCoordinates();shim.setStyles({display:"block",visibility:"visible",width:_e9.width,height:_e9.height+10,top:_e9.top-1,left:_e9.left+_e4-Math.abs(_e5.offsetLeft)});});_e5.addEvent("mouseout",function(){_e5.removeClass("over");shim.setStyles({display:"none",visibility:"hidden"});});}});shim=new Element("iframe");shim.setProperty("src","javascript:false;");shim.setStyles({position:"absolute",display:"none",visibility:"hidden",border:"0px",zIndex:1,filter:"progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"});shim.injectInside($E("body"));}}var shim;

function open_win(urlpath,heightwidth) { window.open(urlpath,null,heightwidth); }

function Why_NoShip() { window.open("/NoShipping.rsp",null,"height=400,width=500,status=yes,toolbar=no,menubar=no,location=no"); }
function Free_Ship() { window.open("/FreeShipping.rsp",null,"height=150,width=580,status=yes,toolbar=no,menubar=no,location=no"); }
function Over_Ship() { window.open("/OverShipping.rsp",null,"height=150,width=580,status=yes,toolbar=no,menubar=no,location=no"); }
function Back_Order() { window.open("/BackOrder.rsp",null,"height=400,width=550,status=yes,toolbar=no,menubar=no,location=no"); }
function FreeShip_SC() { window.open("/FreeShipSC.rsp",null,"height=150,width=500,status=yes,toolbar=no,menubar=no,location=no"); }
function Truck_Ship() { window.open("/TruckShip.html",null,"height=170,width=550,status=yes,toolbar=no,menubar=no,location=no"); }
function Intl_Ship() { window.open("/IntlShipping.html",null,"height=400,width=500,status=yes,toolbar=no,menubar=no,location=no"); }
function Used_Gear() { window.open("/c/AltProdPopUp.html",null,"height=470,width=600,status=yes,toolbar=no,menubar=no,location=no,scrollbars=1"); }


function Financing_Av() { window.open("/financing.html",null,"height=890,width=855,status=yes,toolbar=no,menubar=no,location=no"); }

function emailprice(skuid, skucode, skuname, ptype) { document.EmailPricePopUp.action.value="EmailForPrice"; document.EmailPricePopUp.SkuID.value=skuid; document.EmailPricePopUp.SkuCode.value=skucode; document.EmailPricePopUp.SkuName.value=skuname; document.EmailPricePopUp.PricingType.value=ptype; $("EmailforPrice").style.display="block";scroll(0,0); }
function closeEmailWindow() { document.EmailPricePopUp.SkuID.value=""; document.EmailPricePopUp.SkuCode.value=""; document.EmailPricePopUp.SkuName.value=""; document.EmailPricePopUp.PricingType.value=""; $("EmailforPrice").style.display="none"; }

function displayProvinceDropDown(country_list,province_list,list) { 
	var country=""; var pre_selected = list.value; country=country_list.value; var provinces=null;
	for ( var i = 0; i < province_list.length; i++ ) { if ( province_list[i].name==country ) { provinces = province_list[i].provinces; break; } }
	list.innerHTML=""; 
	if (provinces==null || provinces.length == 0 ) { list.style.visibility="hidden"; $("state_label").style.visibility="hidden"; } else { list.style.visibility="visible"; $("state_label").style.visibility="visible"; }
	var o = document.createElement("option"); o.innerHTML="Please Select A State/Province"; list.appendChild(o);
	
	for ( var i = 0; i < provinces.length; i++ ) { var province = provinces[i]; var o = document.createElement("option"); o.setAttribute("value", province.id); o.innerHTML=province.name; if ( province.id==pre_selected ) o.setAttribute("selected", "selected"); list.appendChild(o); } 
}

function prodTabCtrl(sTabID) {
	var tabCol = document.getElementsByName("tabLink");
	var tabSelID = "tabLink"+sTabID;
	var tabID = "";
	var tabBody="";
	var tabLI="";
	for(i=0; i<tabCol.length; i++){
		tabID = tabCol[i].id;
		tabLI = document.getElementById("LI"+tabID);
		tabBody = document.getElementById("Body"+tabID);
		if(tabCol[i].id==tabSelID){
			tabBody.style.display = "block";
			tabLI.className="active";
		} else {
			tabBody.style.display = "none";
			tabLI.className="";
		}	
	}
}

function prodTabBoxCtrl(sTabID) {
	var tabCol = document.getElementsByName("tabBoxLink");
	var tabSelID = "tabBoxLink"+sTabID;
	var tabID = "";
	var tabBody="";
	var tabLI="";
	for(i=0; i<tabCol.length; i++){
		tabID = tabCol[i].id;
		tabLI = document.getElementById("LI"+tabID);
		tabBody = document.getElementById("Body"+tabID);
		if(tabCol[i].id==tabSelID){
			tabBody.style.display = "block";
			tabLI.className="active";
		} else {
			tabBody.style.display = "none";
			tabLI.className="";
		}	
	}
}


/************* On Product Page, Opens up Large Image **********/
	function ProductPopUp() {
		$("product-detail-popup").style.display="block";
		$("black").style.height=$("wrapper").scrollHeight + "px";
		$("black").style.display="block";
		IE6_IframeCtrl('OVER', $("product-detail-popup"))		
		//var tmpVar = (($("doc2").scrollHeight)-750)/2;
		//$("product-detail-popup").style.top=tmpVar + "px";
	}
	function closePopUpWindow() {
		$("product-detail-popup").style.display="none";
		$("black").style.display="none";
		IE6_IframeCtrl('OUT', $("product-detail-popup"))
	}
/*************************************************************/

/***********************  Swap Image *************************/
	function swapImage(DivID,img,src,lgimg,newMargin){
		DivIDgen = DivID.substring(0,DivID.length-1);
		var el=$(img);el.src=src;
		if(lgimg)el.setAttribute('largeImg',lgimg);
		el.style.margin=newMargin;
		for(i=0; i<totalProdThumbs; i++) {
			var blab=(DivIDgen+i);
			if($(blab)!=null){
				$(blab).style.border="1px solid #8F8580";
			}
		}
		$(DivID).style.border="1px solid #c92127";
		
		}

		
/************************************************************/

function IE6_IframeCtrl(sDir, oPopUp) {
	var oIfrmElm = document.getElementById("ifrmIE6Fix");
	//var oBGCopy = window.frames.ifrmIE6Fix.window.document.getElementById("IE6FixerImg");
	var oChild=null;
	if(oPopUp.id!='product-detail-popup'){
		if(oPopUp.childNodes!=null){
			for(i=0;i<oPopUp.childNodes.length;i++){
				if(oPopUp.childNodes[i].className=='sub-menu-box'){
					oChild = oPopUp.childNodes[i];
					break;
				}
			}
		}
	} else {
		oChild = oPopUp;
	}
	if(sDir == 'OVER') {
		//Show
		if(oChild!=null){
			oIfrmElm.style.left = oPopUp.offsetLeft + 'px';
			oIfrmElm.style.top = (oPopUp.offsetTop + oChild.offsetTop) + 'px';
			oIfrmElm.style.width = oChild.offsetWidth + 'px';
			//oBGCopy.style.width = oChild.offsetWidth + 'px';
			oIfrmElm.style.height = oChild.offsetHeight + 'px';
			//oBGCopy.style.height = oChild.offsetHeight + 'px';
			oIfrmElm.style.display = 'block';
		}
	} else {
		//Hide
		oIfrmElm.style.display = 'none';
	}
}

function preload_HiddenImgs() {
	var arrObj = arrImgPreLoad.split(',');
	var execString =""
	for(i=1;i<arrObj.length;i++){
		var img = new Image(); img.src=arrObj[i];
	}
}
	
/****************** Payment Type Selector *******************/

function swap_PayMethods(selValue) {
	hide_PayMethods();
	document.getElementById("type"+selValue).style.display="block";
	document.getElementById("chkBMLNoInterest").checked=false;
}

function hide_PayMethods(){
	if(document.getElementById("typePMTCCD"))document.getElementById("typePMTCCD").style.display="none";
	if(document.getElementById("typePMTPOR"))document.getElementById("typePMTPOR").style.display="none";
	if(document.getElementById("typePMTWUN"))document.getElementById("typePMTWUN").style.display="none";
	if(document.getElementById("typePMTBML"))document.getElementById("typePMTBML").style.display="none";
	if(document.getElementById("typePMTPPL"))document.getElementById("typePMTPPL").style.display="none";
	if(document.getElementById("typePMTGVX"))document.getElementById("typePMTGVX").style.display="none";
	if(document.getElementById("typePMTMCR"))document.getElementById("typePMTMCR").style.display="none";
	if(document.getElementById("typePMTSGC"))document.getElementById("typePMTSGC").style.display="none";
	if(document.getElementById("typePMTCOD"))document.getElementById("typePMTCOD").style.display="none";
	if(document.getElementById("typePMTMOR"))document.getElementById("typePMTMOR").style.display="none";
	if(document.getElementById("typePMTEGC"))document.getElementById("typePMTEGC").style.display="none";
}		

function selectBillMeLater() {
	
	if(document.getElementById("chkBMLNoInterest").checked) {
		hide_PayMethods();
		document.getElementById("typePMTBML").style.display="block";
		if(!document.getElementById("rdoPMTBML").checked)
			document.getElementById("rdoPMTBML").checked=true;
	}
	document.getElementById("BML_Financing").value=document.getElementById("chkBMLNoInterest").checked;
}

function getBMLValue() {
	document.getElementById("chkBMLNoInterest").checked=document.getElementById("BML_Financing").value;
}

/************************************************************/