
function change(el){var elements=el.form.elements;for(var i=0;i<elements.length;i++){if(elements[i].name=="UpdateProductInformation"){elements[i].value="Update *";}}}
function changeCurrency(form){form.submit();}
function forgottenPassword(){document.forms["login"].ForgottenPassword.value=1;document.forms["login"].submit();}
function Number_isOdd()
{return(this%2==0)?false:true;}
function Number_isEven()
{return(this%2==0)?true:false;}
if(!Number.prototype.toLocaleString)
Number.prototype.toLocaleString=Number.prototype.toString;function Number_toFixed(fractionDigits)
{var f,x,a,b,m,n,i,s,k,count,digit;f=parseInt(fractionDigits);x=Number(this);s=z=i=m="";n=1;if(isNaN(f))
f=0;if(f<0||f>20)
{if(window.Error)
{var err=new Error("The number of fractional digits is out of range.");err.name="RangeError";throw err;}
else return 1/0;}
if(isNaN(x))
return"NaN";if(x<0)
s="-",x*=-1;if(x>=Math.pow(10,21))
return s+x.toString();n=Math.floor(x*Math.pow(10,f));n+=Math.round(Math.abs(x*Math.pow(10,f)-n));k=Math.floor(Math.log(n)/Math.LN10);while(k>-1)
{digit=Math.floor(n/Math.pow(10,k));m+=digit;n-=digit*Math.pow(10,k);k--;}
if(f==0)
return s+m;k=m.length;if(k<=f)
{count=f+1-k;while(count>0)
count--,z+="0";m=z+m;k=f+1}
return s+m.substring(0,k-f)+"."+m.substring(k-f);}
function Number_toExponential(fractionDigits)
{var f,x,m,k,s,err;f=parseInt(fractionDigits);x=Number(this);s="";if(isNaN(x))
return"NaN";if(x<0)
s="-",x*=-1;if(x==Infinity)return s+"Infinity";var removeTrailingZeros=isNaN(f);if(removeTrailingZeros)
f=15;if(f<0||f>20)
{if(window.Error)
{var err=new Error("The number of fractional digits is out of range.");err.name="RangeError";throw err;}
else
return 1/0;}
k=Math.floor(Math.log(x)/Math.LN10);m=(x/Math.pow(10,k)).toFixed(f);if(removeTrailingZeros)
while(m.charAt(m.length-1)=="0")
m=m.substring(0,m.length-1);if(k>=0)
k="+"+k;return s+m+"e"+k;}
function Number_toPrecision(precision)
{var f,x,m,k,s,err;x=Number(this);p=parseInt(precision);if(isNaN(p))
return this.toString();if(isNaN(x))
return"NaN";s="";if(x<0)
s="-",x*=-1;if(x==Infinity)
return s+"Infinity";if(x==0)
return'0.00';if(p<1||p>21)
{if(window.Error)
{var err=new Error("The number of precision digits is out of range.");err.name="RangeError";throw err;}
else
return 1/0;}
k=Math.floor(Math.log(x)/Math.LN10);if(k<-6||k>=p)
return this.toExponential(p-1);return this.toFixed(p-k-1);}
function getHTTPObject(){var xmlhttp;if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}
return xmlhttp;}
function getElementTextNS(prefix,local,parentElem,index){try{var result="";if(prefix&&navigator.appVersion.indexOf('MSIE')>0){result=parentElem.getElementsByTagName(prefix+":"+local)[index];}else{result=parentElem.getElementsByTagName(local)[index];}
if(result){if(result.childNodes.length>1){return result.childNodes[1].nodeValue.replace(/^\s*|\s*$/g,"");}else{if(result.firstChild==null)return"";return result.firstChild.nodeValue.replace(/^\s*|\s*$/g,"");}}else{return"";}}catch(e){}}
var mainEl;function movePreview2(){if(parseInt(navigator.appVersion)>3){if(navigator.appName.indexOf("Microsoft")!=-1){winW=document.body.offsetWidth;winH=document.body.offsetHeight;scrPageY=document.body.scrollTop;}else{winW=window.innerWidth;winH=window.innerHeight;scrPageY=window.pageYOffset;}}
if(findPosY(mainEl)>(winH+scrPageY-600)){document.getElementById('preview').style.top=(winH+scrPageY-500)+"px";}
else{document.getElementById('preview').style.top=(findPosY(mainEl))+"px";}
document.getElementById('preview').style.left=(findPosX(mainEl)+75)+"px";}
function showPreview2(main,title){document.onmousemove=movePreview;mainEl=main;document.getElementById('preview').style.display='none';document.getElementById('preview').style.position='absolute';document.getElementById('preview').style.zIndex='1000';document.getElementById('preview').style.border='2px solid black';document.getElementById('preview').style.width='640px';document.getElementById('preview').style.height='480px';document.getElementById('preview').style.padding='0px';document.getElementById('preview').style.color='#000';document.getElementById('preview').innerHTML='<table cellpadding="10" cellspacing="0" width="100%" height="100%"><tr><td valign="top"><h2 style="font-size: 1.4em">'+title+'</h2><br><br/><center><img  src="/images/full/'+main.id+'.jpg" height="400"></center></td></tr></table>';movePreview2();document.getElementById('preview').style.display='block';}
function hidePreview2(main){document.getElementById('preview').style.display='none';document.onmousemove="";}
function findPosX2(obj){var curleft=0;if(obj.offsetParent){while(1){curleft+=obj.offsetLeft;if(!obj.offsetParent){break;}
obj=obj.offsetParent;}}else if(obj.x){curleft+=obj.x;}
return curleft;}
function findPosY2(obj){var curtop=0;if(obj.offsetParent){while(1){curtop+=obj.offsetTop;if(!obj.offsetParent){break;}
obj=obj.offsetParent;}}else if(obj.y){curtop+=obj.y;}
return curtop;}
function brandSubmit2(brand_id,value){var form=document.createElement("form");form.setAttribute("action","/products/topic/"+brand_id+"/");form.setAttribute("method","post");form.setAttribute("enctype","multipart/form-data");form.setAttribute("id","other");var input=document.createElement("input");form.appendChild(input);input.setAttribute("name","feature[m]");input.setAttribute("value",value);form.submit();}
function addOption2(id,value){setPageNoSubmit(0);var input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("name","feature["+id+"]");input.setAttribute("value",value);document.getElementById("main2").appendChild(input);document.getElementById("main2").submit();}
function setBrand2(id){setPageNoSubmit(0);if(document.getElementById("brand")==null){var input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("name","brand");input.setAttribute("id","brandname");document.getElementById("main2").appendChild(input);}
else{input=document.getElementById("brandname");}
input.setAttribute("value",id);document.getElementById("main2").submit();}
function setOption2(id,value){setPageNoSubmit(0);var input=document.getElementById("feature["+id+"]");input.setAttribute("value",value);document.getElementById("main2").appendChild(input);document.getElementById("main2").submit();}
function setPage2(num){if(document.getElementById("p")==null){p=document.createElement("input");p.setAttribute("type","hidden");p.setAttribute("name","p");p.setAttribute("id","p");document.getElementById("main2").appendChild(p);}
p=document.getElementById("p");document.getElementById("main2").appendChild(p);p.setAttribute("value",num);document.getElementById("main2").submit();}
function setPageNoSubmit2(num){if(document.getElementById("p")==null){p=document.createElement("input");p.setAttribute("type","hidden");p.setAttribute("name","p");p.setAttribute("id","p");document.getElementById("main2").appendChild(p);}
p=document.getElementById("p");document.getElementById("main2").appendChild(p);p.setAttribute("value",num);}
function changeAction(page,topic){if(document.getElementById('mode').options[document.getElementById('mode').selectedIndex].value!="-1"){document.srchform.action='/search';return true;}else{document.srchform.action=page+"/topic/"+topic;return true;}}
function redirectJs(){var x=window.open('','Popup_Window','width=550px; height=400px');formName=document.getElementById("tracking");formName.target='Popup_Window';formName.submit();return true;}
function brandSubmit(brand_id,value){var form=document.createElement("form");form.setAttribute("action","/products/topic/"+brand_id+"/");form.setAttribute("method","post");form.setAttribute("enctype","multipart/form-data");form.setAttribute("id","other");var input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("name","feature[m]");input.setAttribute("value",value);form.appendChild(input);body=document.getElementsByTagName('body');body[0].parentNode.insertBefore(form,body[0]);form.submit();}
function addOption(id,value){setPageNoSubmit(0);var input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("name","feature["+id+"]");input.setAttribute("value",value);document.getElementById("main").appendChild(input);document.getElementById("main").submit();}
function setBrand(id){setPageNoSubmit(0);if(document.getElementById("brand")==null){var input=document.createElement("input");input.setAttribute("type","hidden");input.setAttribute("name","brand");input.setAttribute("id","brandname");document.getElementById("main").appendChild(input);}
else{input=document.getElementById("brandname");}
input.setAttribute("value",id);document.getElementById("main").submit();}
function setOption(id,value){setPageNoSubmit(0);var input=document.getElementById("feature["+id+"]");input.setAttribute("value",value);document.getElementById("main").appendChild(input);document.getElementById("main").submit();}
function setPage(num,block_id){if(document.getElementById("p")==null){p=document.createElement("input");p.setAttribute("type","hidden");p.setAttribute("name","p");p.setAttribute("id","p");}
p=document.getElementById("p");p.setAttribute("value",num);document.getElementById("main").submit();return false;}
function setPageNoSubmit(num){if(document.getElementById("p")==null){p=document.createElement("input");p.setAttribute("type","hidden");p.setAttribute("name","p");p.setAttribute("id","p");}
p=document.getElementById("p");p.setAttribute("value",num);}