// new store functionsfunction popOpen(url,name,attributes) {window.open(url,name,attributes);}function popit(where,wintitle){var mytitle=String(wintitle);window.open(where,mytitle,'scrollbars=yes,location=no,menubar=yes,resizable=yes,height=510,width=610,screenX=100,screenY=145,top=145,left=100');}function replace(string,text,by) {    var strLength = string.length, txtLength = text.length;    if ((strLength == 0) || (txtLength == 0)) return string;    var i = string.indexOf(text);    if ((!i) && (text != string.substring(0,txtLength))) return string;    if (i == -1) return string;    var newstr = string.substring(0,i) + by;    if (i+txtLength < strLength)            newstr += replace(string.substring(i+txtLength,strLength),text,by);    return newstr;}function setval(what){var howmany=document.getElementsByName("price").lengthvar therate=parseFloat(replace(what.value,',','.'))Index = what.selectedIndexdocument.forms[0].ValName.value = what.options[Index].text.substring(0,3)document.forms[0].w_Currency_rate.value = what.options[Index].valuefor (i=0;i< howmany;i++){//alert(document.getElementsByName("usdprice")[i].value)thepricsestring=replace(document.getElementsByName("usdprice")[i].value,',','.')var thepriceval=parseFloat(thepricsestring)var thenewprice=thepriceval*therate;//var thenewprice=parseFloat(thepricsestring)*parseFloat(replace(what.value,',','.'));//alert(what.value)//alert(thenewprice)thenewres=round(thenewprice,2)thenewres=thenewres+''thedecpoint=thenewres.indexOf('.')thenewres=thenewres.substring(0,thedecpoint+3)document.getElementsByName("price")[i].value=what.options[Index].text.substring(0,3) + " " + thenewres;//document.getElementsByName("usdprice")[i].value=round(parseFloat(replace(''+document.getElementsByName("usdprice")[i].value,',','.')),2);}}