document.observe("dom:loaded",init);var initFunctions=new Array();initFunctions.push(setUpExternalLinks);initFunctions.push(setUpPrint);function init(){for(var i=0;i<initFunctions.length;i++)
initFunctions[i].call(this);if($("close-window"))
Event.observe("close-window","click",closeWindow);}
function getURLParam(strParamName){var strReturn="";var strHref=window.location.href;if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?")).toLowerCase();strParamName=strParamName.toLowerCase();var aQueryString=strQueryString.split("&");for(var iParam=0;iParam<aQueryString.length;iParam++){if(aQueryString[iParam].indexOf(strParamName+"=")>-1){var aParam=aQueryString[iParam].split("=");strReturn=aParam[1];break;}}}
return strReturn;}
function trimString(str){return str.replace(/^\s+|\s+$/g,"");}
function isDefined(v){return(typeof(window[v])=="undefined")?false:true;}
function IsNumeric(sText,decimalOK,spacesOK,hyphensOK,plusesOK){var ValidChars="0123456789";if(decimalOK)ValidChars=ValidChars+".";if(spacesOK)ValidChars=ValidChars+" ";if(hyphensOK)ValidChars=ValidChars+"-";if(plusesOK)ValidChars=ValidChars+"+";var IsNumber=true;var Char;if(sText.length==0)
return false;for(var i=0;i<sText.length&&IsNumber==true;i++){Char=sText.charAt(i);if(ValidChars.indexOf(Char)==-1)
IsNumber=false;}
return IsNumber;}
function toggleCheck(chkBox){chkBoxObj=$(chkBox);if(chkBoxObj.checked)
chkBoxObj.checked=false;else
chkBoxObj.checked=true;}
function activateRadio(radio){radioObj=$(radio);radioObj.checked=true;}
function roundValue(price){return Math.round(price*100)/100;}
function formatCurrency(price){var result="";var tmpPrice=price;price=Math.abs(price);var decimals=(Math.round((price-Math.floor(price))*100)).toString();if(decimals>=100){decimals="00";price=price+1;}
if(decimals.length==1)decimals="0"+decimals;var thousands=Math.floor(price/1000);if(thousands>0){price-=thousands*1000;result=thousands.toString()+",";units=Math.floor(price);if(units<10)result=result+"00"+units.toString();else if(units<100)result=result+"0"+units.toString();else result=result+units.toString();}else result=Math.floor(price).toString();result=result+"."+decimals;if(tmpPrice<0)result="-"+result;return result;}
function setUpExternalLinks(){if(!document.getElementsByTagName)return;var anchors=document.getElementsByTagName("a");for(var i=0;i<anchors.length;i++){var anchor=anchors[i];if(anchor.getAttribute("href")&&/\bexternal\b/.test(anchor.getAttribute("rel"))){anchor.target="_blank";if(anchor.getAttribute("title")){if(anchor.title.indexOf("(opens in a new window)")<0)anchor.title=anchor.title+' (opens in a new window)';}}}}
function setUpPrint(){var arPrints=$$("a.print-page");for(var i=0;i<arPrints.length;i++)
Event.observe(arPrints[i],"click",function(){window.print();return false;});}
function createUUID(){var s=[],itoh='0123456789ABCDEF';for(var i=0;i<36;i++)
s[i]=Math.floor(Math.random()*0x10);s[14]=4;s[19]=(s[19]&0x3)|0x8;for(var i=0;i<36;i++)
s[i]=itoh[s[i]];s[8]=s[13]=s[18]=s[23]='-';return s.join('');}
function getXmlNodeValue(xmlNode){if(typeof(xmlNode.textContent)=='string')
return xmlNode.textContent;else
return xmlNode.firstChild.nodeValue;}
function listFind(list,itemToFind){var aList=list.split(',');for(var i=0;i<aList.length;++i){if(aList[i]==itemToFind)
return i;}
return-1;}
try
{if(!window.console||typeof(window.console)!='object')
{var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;++i)
window.console[names[i]]=function(){}}
if(typeof CONSOLELOGGING!="undefined"&&!CONSOLELOGGING)
window.console.log=function(s){};}
catch(e){}
document.observe("dom:loaded",initStore);var ajaxURL="ajax/?uuid="+createUUID()+"&event=ajax.";function initStore(){if($("quicksearchstring"))
setUpQuickSearch();if($("subcatsList"))
setUpSubCatLinks();if($("aodOptions"))
setUpAOD();if($('adminMenu')){Event.observe("adminMenu","mouseover",function(){showAdminMenu(1)});Event.observe("adminMenu","mouseout",function(){showAdminMenu(0)});}}
function updateUnit(){$("unit-form").submit();}
function closeWindow(){window.close();}
function showAdminMenu(bShow){var menu=$('adminMenu').getElementsByTagName('ul')[0];if(bShow)
Element.show(menu);else
Element.hide(menu);}
initFunctions.push(setUpUnitSelectors);function setUpUnitSelectors(){var i,uOptions;var uSelectors=document.getElementsByClassName("unitSelector");for(i=0;i<uSelectors.length;i++){uOptions=uSelectors[i].getElementsByTagName("div");if(uOptions.length==1){uSelectors[i].onmouseover=function(){unitsOver(this);};uSelectors[i].onmouseout=function(){unitsOut(this);};}}}
function unitsOver(listItem){var ulElements=listItem.getElementsByTagName("ul");Element.show(ulElements[0]);}
function unitsOut(listItem){var ulElements=listItem.getElementsByTagName("ul");Element.hide(ulElements[0]);}
function pickcolor(cssclass,csselement,csscookie,cssform,link,adjX,adjY){var adjustment=new Array();if(adjX)
adjustment['x']=adjX;else
adjustment['x']=0;if(adjY)
adjustment['y']=adjY;else
adjustment['y']=0;var rgb=new Array();var hsv=new Array();var hex=new Array();var offset=new Array();offset['x']=0;offset['y']=0;var H,S,V,sliderX,sliderY,dotX,dotY;var isdrag=false;var ie=document.all;var nn6=document.getElementById&&!document.all;var colorselector="default";var scrollLeftOffset='0';var scrollTopOffset='0';var detect=navigator.userAgent.toLowerCase();var OS,browser,total,thestring;var version=0;$('ColourMod').style.display="block";if($("ColourMod").style.left==0&&$("ColourMod").style.top==0){cmOffsetLeft=$('ColourMod').offsetLeft;cmOffsetTop=$('ColourMod').offsetTop;}
if(link.offsetParent){for(var posX=0,posY=0;link.offsetParent;link=link.offsetParent){offset['x']+=link.offsetLeft;offset['y']+=link.offsetTop;}}else{offset['x']=link.x;offset['y']=link.y;}
if(self.innerWidth){frameWidth=self.innerWidth;frameHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientWidth){frameWidth=document.documentElement.clientWidth;frameHeight=document.documentElement.clientHeight;}else if(document.body){frameWidth=document.body.clientWidth;frameHeight=document.body.clientHeight;}else{return;}
scrollOffset=getScrollXY();if(offset['x']+282+adjustment['x']>frameWidth+scrollOffset['x']){offset['x']=frameWidth+scrollOffset['x']-282;}else if(offset['x']+adjustment['x']<scrollOffset['x']){offset['x']=scrollOffset['x'];}else{offset['x']=offset['x']+adjustment['x'];}
if(offset['y']+220+adjustment['y']>frameHeight+scrollOffset['y']){offset['y']=frameHeight+scrollOffset['y']-220;}else if(offset['y']+adjustment['y']<scrollOffset['y']){offset['y']=scrollOffset['y'];}else{offset['y']=offset['y']+adjustment['y'];}
$('ColourMod').style.left=offset['x']+"px";$('ColourMod').style.top=offset['y']+"px";if(nn6)
$('cmHex').type="search";$('cmCloseButton').href="javascript:;";$('cmCloseButton').onmouseup=closeColourMod;$('cmHex').onkeyup=hexUpdate;function closeColourMod(){$('ColourMod').style.display="none";}
if(cssform){$('cmHex').value=$(cssform).value;hexUpdate();}
$('ColourMod').onmousedown=selectmouse;document.onmouseup=unselectmouse;function checkIt(string){place=detect.indexOf(string)+1;thestring=string;return place;}
function getScrollXY(){var scrollOffset=new Array();if(document.documentElement&&document.documentElement.scrollTop)
{scrollOffset['x']=document.documentElement.scrollLeft;scrollOffset['y']=document.documentElement.scrollTop;}
else if(document.body)
{scrollOffset['x']=document.body.scrollLeft;scrollOffset['y']=document.body.scrollTop;}
return scrollOffset;}
function selectmouse(e){document.body.style.cursor='pointer';mouseX=nn6?e.clientX:event.clientX;mouseY=nn6?e.clientY:event.clientY;scrollOffset=getScrollXY();if(!scrollOffset['y'])
scrollOffset['y']=0;if(!scrollOffset['x'])
scrollOffset['x']=0;if(checkIt('safari')){dotX=mouseX-24-$('ColourMod').offsetLeft;dotY=mouseY-53-$('ColourMod').offsetTop;sliderX=mouseX-185-$('ColourMod').offsetLeft;sliderY=mouseY-52-$('ColourMod').offsetTop;}else{dotX=mouseX-24-$('ColourMod').offsetLeft+scrollOffset['x'];dotY=mouseY-53-$('ColourMod').offsetTop+scrollOffset['y'];sliderX=mouseX-185-$('ColourMod').offsetLeft+scrollOffset['x'];sliderY=mouseY-52-$('ColourMod').offsetTop+scrollOffset['y'];}
if(0<=dotX&&dotX<=150&&0<=dotY&&dotY<=150){isdrag=true;$("cmBlueDot").style.left=dotX+"px";$("cmBlueDot").style.top=dotY+"px";arrowY=replaceString($("cmBlueArrow").style.top,'px','');H=Math.round(YToH(arrowY));S=XToS(dotX);V=YToV(dotY);$("cmHue").value=H;rgb=HSVToRGB(H,S,V);hex=RGBToHex(rgb['red'],rgb['green'],rgb['blue']);$("cmHex").value=hex;$("cmColorContainer").style.backgroundColor="#"+hex;changecss(cssclass,csselement,hex,"hex",csscookie,cssform);document.onmousemove=dragSV;}else if(0<=sliderX&&sliderX<=35&&0<=sliderY&&sliderY<=150){isdrag=true;$("cmBlueArrow").style.top=dotY+"px";sliderY=replaceString($("cmBlueArrow").style.top,'px','');dotX=replaceString($('cmBlueDot').style.left,'px','');dotY=replaceString($('cmBlueDot').style.top,'px','');H=YToH(sliderY);S=XToS(dotX);V=YToV(dotY);rgb=HSVToRGB(H,'100','100');hex=RGBToHex(rgb['red'],rgb['green'],rgb['blue']);$("cmSatValBg").style.backgroundColor="#"+hex;$("cmHue").value=H;rgb=HSVToRGB(H,S,V);hex=RGBToHex(rgb['red'],rgb['green'],rgb['blue']);$("cmHex").value=hex;$("cmColorContainer").style.backgroundColor="#"+hex;changecss(cssclass,csselement,hex,"hex",csscookie,cssform);document.onmousemove=dragH;}else if(0<=dotX&&dotX<=150&&dotY<0){isdrag=true;dotX=mouseX-$('ColourMod').offsetLeft+scrollOffset['x'];dotY=mouseY-$('ColourMod').offsetTop+scrollOffset['y'];document.onmousemove=dragCM;}}
function unselectmouse(e){isdrag=false;document.body.style.cursor='auto';}
function hexUpdate(){hex=$('cmHex').value;if(hex.length==6){changecss(cssclass,csselement,hex,'hex',csscookie,cssform);rgb=HexToRGB(hex);hsv=RGBToHSV(rgb['red'],rgb['green'],rgb['blue']);$('cmHue').value=hsv['hue'];sliderY=HToY(hsv['hue']);dotX=SToX(hsv['sat']);dotY=VToY(hsv['val']);$("cmBlueArrow").style.top=sliderY+"px";$("cmBlueDot").style.left=dotX+"px";$("cmBlueDot").style.top=dotY+"px";$("cmColorContainer").style.backgroundColor="#"+hex;rgb=HSVToRGB(hsv['hue'],'100','100');hex=RGBToHex(rgb['red'],rgb['green'],rgb['blue']);$("cmSatValBg").style.backgroundColor="#"+hex;}}
function dragSV(e){if(isdrag){mouseX=nn6?e.clientX:event.clientX;mouseY=nn6?e.clientY:event.clientY;scrollOffset=getScrollXY();if(!scrollOffset['y'])
scrollOffset['y']=0;if(!scrollOffset['x'])
scrollOffset['x']=0;if(checkIt('safari')){xlimit=mouseX-24-$('ColourMod').offsetLeft;ylimit=mouseY-53-$('ColourMod').offsetTop;}else{xlimit=mouseX-24-$('ColourMod').offsetLeft+scrollOffset['x'];ylimit=mouseY-53-$('ColourMod').offsetTop+scrollOffset['y'];}
if(xlimit<=0)
xlimit=0;else if(xlimit>=150)
xlimit=150;if(ylimit<=0)
ylimit=0;else if(ylimit>=150)
ylimit=150;$("cmBlueDot").style.left=xlimit+"px";$("cmBlueDot").style.top=ylimit+"px";H=$('cmHue').value;S=XToS(xlimit);V=YToV(ylimit);rgb=HSVToRGB(H,S,V);hex=RGBToHex(rgb['red'],rgb['green'],rgb['blue']);$("cmHex").value=hex;$("cmColorContainer").style.backgroundColor="#"+hex;changecss(cssclass,csselement,hex,"hex",csscookie,cssform);}}
function dragH(e){if(isdrag){mouseY=nn6?e.clientY:event.clientY;scrollOffset=getScrollXY();if(!scrollOffset['y'])
scrollOffset['y']=0;if(!scrollOffset['x'])
scrollOffset['x']=0;if(checkIt('safari')){sliderY=mouseY-52-$('ColourMod').offsetTop;}else{sliderY=mouseY-52-$('ColourMod').offsetTop+scrollOffset['y'];}
if(sliderY<0)
sliderY=0;if(sliderY>150)
sliderY=150;$("cmBlueArrow").style.top=sliderY+"px";H=YToH(sliderY);rgb=HSVToRGB(H,'100','100');hex=RGBToHex(rgb['red'],rgb['green'],rgb['blue']);$("cmSatValBg").style.backgroundColor="#"+hex;dotX=replaceString($('cmBlueDot').style.left,'px','');dotY=replaceString($('cmBlueDot').style.top,'px','');S=XToS(dotX);V=YToV(dotY);rgb=HSVToRGB(H,S,V);hex=RGBToHex(rgb['red'],rgb['green'],rgb['blue']);$("cmHex").value=hex;$("cmColorContainer").style.backgroundColor="#"+hex;changecss(cssclass,csselement,hex,"hex",csscookie,cssform);}}
function dragCM(e){if(isdrag){mouseX=nn6?e.clientX:event.clientX;mouseY=nn6?e.clientY:event.clientY;scrollOffset=getScrollXY();if(!scrollOffset['y'])
scrollOffset['y']=0;if(!scrollOffset['x'])
scrollOffset['x']=0;xlimit=mouseX-dotX-cmOffsetLeft+scrollOffset['x'];ylimit=mouseY-dotY-cmOffsetTop+scrollOffset['y'];$("ColourMod").style.left=xlimit+"px";$("ColourMod").style.top=ylimit+"px";}}
function replaceString(string,find,replace){return string.replace(find,replace);}
function XToS(dotX){return(dotX/1.5);}
function YToV(dotY){return(100-(dotY/1.5));}
function SToX(S){return S*1.5;}
function VToY(V){return(-V+100)*1.5;}
function HToY(H){return(H/360)*150;}
function YToH(sliderY){return(sliderY/150)*360;}
function HSVToRGB(H,S,V){H=H/360;S=S/100;V=V/100;if(S<=0){V=Math.round(V*255);rgb['red']=V;rgb['green']=V;rgb['blue']=V;return rgb;}else{if(H>=1.0){H=0;}
H=6*H;F=H-Math.floor(H);P=Math.round(255*V*(1.0-S));Q=Math.round(255*V*(1.0-(S*F)));T=Math.round(255*V*(1.0-(S*(1.0-F))));V=Math.round(255*V);switch(Math.floor(H)){case 0:R=V;G=T;B=P;break;case 1:R=Q;G=V;B=P;break;case 2:R=P;G=V;B=T;break;case 3:R=P;G=Q;B=V;break;case 4:R=T;G=P;B=V;break;case 5:R=V;G=P;B=Q;break;}
rgb['red']=R;rgb['green']=G;rgb['blue']=B;return rgb;}}
function RGBToHex(R,G,B){return(toHex(R)+toHex(G)+toHex(B));}
function toHex(N){if(N==null)
return"00";N=parseInt(N);if(N==0||isNaN(N))
return"00";N=Math.max(0,N);N=Math.min(N,255);N=Math.round(N);return"0123456789ABCDEF".charAt((N-N%16)/16)+"0123456789ABCDEF".charAt(N%16);}
function HexToRGB(H){hexR=H.substr(0,2);rgb['red']=parseInt((hexR).substring(0,2),16);hexG=H.substr(2,2);rgb['green']=parseInt((hexG).substring(0,2),16);hexB=H.substr(4,2);rgb['blue']=parseInt((hexB).substring(0,2),16);return rgb;}
function RGBToHSV(R,G,B){var max=Math.max(R,G,B);var min=Math.min(R,G,B);var delta=max-min;V=Math.round((max/255)*100);if(max!=0){S=Math.round(delta/max*100);}else{S=0;}
if(S==0){H=0;}else{if(R==max){H=(G-B)/delta;}else if(G==max){H=2+(B-R)/delta;}else if(B==max){H=4+(R-G)/delta;}
H=Math.round(H*60);if(H>360){H=360;}
if(H<0){H+=360;}}
hsv['hue']=H;hsv['sat']=S;hsv['val']=V;return hsv;}}
function checkBrowser(){var theRules=new Array();if(document.styleSheets[0].cssRules){return"cssRules";}else if(document.styleSheets[0].rules||document.all){return"rules";}else{return;}}
function setcsscookie(myclass,element,value,fieldvalue){var date=new Date();date.setTime(date.getTime()+(365*24*60*60*1000));var expires="; expires="+date.toGMTString();var path="; path=/";if(getCookie(myclass)){var newvalues="";var updated=false;var cvalues=getCookie(myclass);firstsplit=cvalues.split(",");for(var i=0;i<firstsplit.length;i++){secondsplit=firstsplit[i].split("|");if(secondsplit[0]==element){newvalues+=element+"|"+value+"|"+fieldvalue+",";var updated=true;}else if(secondsplit[0]!=""){newvalues+=firstsplit[i]+",";}}
if(updated==false)
newvalues+=element+"|"+value+"|"+fieldvalue+",";document.cookie=myclass+"="+newvalues+expires+path;}else{document.cookie=myclass+"="+element+"|"+value+"|"+fieldvalue+expires+path;}}
function getCookie(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}else{begin+=2;}
var end=document.cookie.indexOf(";",begin);if(end==-1){end=dc.length;}
return unescape(dc.substring(begin+prefix.length,end));}
function deleteCookies(){var date=new Date();date.setTime(date.getTime());var expires="; expires="+date.toGMTString();var path="; path=/";var theRules=checkBrowser();for(var j=0;j<document.styleSheets.length;j++){for(var i=0;i<document.styleSheets[j].theRules.length;i++){var myclass=theRules[i].selectorText.toLowerCase();newclass=myclass.replace(/\*\[id\"([^\"]*)\"\]/g,"\#$1");if(getCookie(newclass)){document.cookie=newclass+"="+""+" "+expires+path;}}}}
function cookiecss(){var theRules=checkBrowser();for(var k=0;k<document.styleSheets.length;k++){for(var i=0;i<document.styleSheets[j].theRules.length;i++){var myclass=theRules[i].selectorText.toLowerCase();newclass=myclass.replace(/\*\[id\"([^\"]*)\"\]/g,"\#$1");if(getCookie(newclass)){var cvalue=getCookie(newclass);firstsplit=cvalue.split(",");for(var j=0;j<firstsplit.length;j++){secondsplit=firstsplit[j].split("|");if(secondsplit[0]!=""){theRules[i].style[secondsplit[0]]=secondsplit[1];if(document.getElementById(secondsplit[2])){hex=secondsplit[1].replace(/\#/,'');document.getElementById(secondsplit[2]).value=hex;}}}}}}}
function changecss(classes,elements,values,modifiers,cookie,fields){var element,value,modifier,classvalue,fieldvalue;var elementsplit=elements.split(";");var classsplit=classes.split(";");var valuesplit=values.split(";");var modifiersplit=modifiers.split(";");var fieldsplit=fields.split(";");var lastelement="0";var lastclass="0";var lastvalue="0";var lastmodifier="0";var lastfield="0";var value;var splitlength=Math.max(elementsplit.length,classsplit.length,valuesplit.length,modifiersplit.length,fieldsplit.length)
for(var i=0;i<splitlength;i++){if(elementsplit[i]){element=elementsplit[i];lastelement=i;}else{element=elementsplit[0];}
if(valuesplit[i]){value=valuesplit[i];lastvalue=i;}else{value=valuesplit[lastvalue];}
if(modifiersplit[i]){modifier=modifiersplit[i];lastmodifier=i;}else{modifier=modifiersplit[lastmodifier];}
if(classsplit[i]){classvalue=classsplit[i];lastclass=i;}else{classvalue=classsplit[lastclass];}
if(fieldsplit[i]){fieldvalue=fieldsplit[i];lastfield=i;}else{fieldvalue=fieldsplit[lastfield];}
if(modifier=="hex"){if(value.length==3){value=value+value;}else if(value.length==2){value=value+value+value;}else if(value.length!=6){value="";}}
changecsssplit(classvalue,element,value,modifier,cookie,fieldvalue);}}
function changecsssplit(myclass,element,value,modifier,cookie,fieldvalue){if(fieldvalue)
document.getElementById(fieldvalue).value=value;if(modifier!="hex"){value=value+modifier;}else{if(value!="")
value="#"+value;}
myclass=myclass.toLowerCase();var safariclass=myclass.replace(/\#([\w\-]+)/g,"*[id\"$1\"]");for(var j=0;j<document.styleSheets.length;j++){var theRules=checkBrowser();theRules=document.styleSheets[j][theRules];for(var i=0;i<theRules.length;i++){if(theRules[i].selectorText.toLowerCase()==myclass||theRules[i].selectorText.toLowerCase()==safariclass){theRules[i].style[element]=value;if(cookie)
setcsscookie(myclass,element,value,fieldvalue);}}}}
function updatecss(myclass,element,value){myclass=myclass.toLowerCase();var safariclass=myclass.replace(/\#([\w\-]+)/g,"*[id\"$1\"]");var theRules=checkBrowser();for(var j=0;j<document.styleSheets.length;j++){for(var i=0;i<document.styleSheets[j].theRules.length;i++){if(theRules[i].selectorText.toLowerCase()==myclass||theRules[i].selectorText.toLowerCase()==safariclass){var currentValue=theRules[i].style[element];var m=currentValue.match(/^(.*?)([\d]+)(.*)$/);if(m){switch(value){case"smaller":m[2]--;break;case"bigger":m[2]++;break;}
var newValue=m[1]+m[2]+m[3];theRules[i].style[element]=newValue;setcsscookie(myclass,element,newValue);}else{alert('failed');}}}}}
initFunctions.push(initOrderBy);function initOrderBy(){if($("orderBy"))
Event.observe("orderBy","change",doOrderBy);}
function doOrderBy(){var ob=$('orderBy');if(ob.options[ob.selectedIndex].value.length>0)
$('form-orderby').submit();}
initFunctions.push(setUpPopUps);function setUpPopUps(){setUpBalBrowse();setUpBalCurrencies();}
function setUpBalBrowse(){browsePanel=$('balBrowsePanel');Event.observe('balBrowse','click',toggleBalBrowse);Event.observe('close_balBrowse','click',toggleBalBrowse);}
function toggleBalBrowse(e){if(Element.visible(browsePanel))
browsePanel.hide();else
browsePanel.show();Event.stop(e);}
function setUpBalCurrencies(){currentCurrency=$('currCurrency');currencyPanel=$('balCurrencyPanel');Event.observe(currentCurrency,'click',toggleBalCurrencies);Event.observe('close_balCurrencies','click',toggleBalCurrencies);}
function toggleBalCurrencies(e){if(Element.visible(currencyPanel)){currencyPanel.hide();currentCurrency.removeClassName('selected');}
else{currencyPanel.show();currentCurrency.addClassName('selected');}
Event.stop(e);}
