function expandAll(){tree1.expandAll();tree1.draw(1);}
function collapseAll(){tree1.collapseAll();tree1.draw(1);}
function staticBack(val){if(val)tree1.resize_back(tree1.format.width,tree1.format.height);else tree1.resize_back(0,0);tree1.format.dont_resize_back=val;tree1.draw(1);}
function turnAnimation(val){tree1.format.animation=val;tree1.draw(!val);}
function turnOneBranch(val){tree1.format.one_branch=val;if(val)
collapseAll();else
expandAll();}
function expandIndex(tree,sub,div){Toggle(tree,sub,div);}
function change_menu_pic(layer){if(document.all(layer).style.display=="none"){document.all(layer).style.display="";createCookie('menu_pic_setstate','expanded',0);}
else{document.all(layer).style.display="none";createCookie('menu_pic_setstate','collapsed',0);}}
function menu_top1()
{if(document.layers)
{document.layers('div_menu_top1a_active').visibility="show";document.layers('div_menu_top2a_active').visibility="hide";document.layers('div_menu_top3a_active').visibility="hide";document.layers('div_menu_top4a_active').visibility="hide";document.layers('div_menu_top1b').visibility="show";document.layers('div_menu_top2b').visibility="hide";document.layers('div_menu_top3b').visibility="hide";document.layers('div_menu_top4b').visibility="hide";createCookie('menu_top','menu_top1',0);}
else if(document.getElementById)
{document.getElementById('div_menu_top1a_active').style.visibility="visible";document.getElementById('div_menu_top2a_active').style.visibility="hidden";document.getElementById('div_menu_top3a_active').style.visibility="hidden";document.getElementById('div_menu_top4a_active').style.visibility="hidden";document.getElementById('div_menu_top1b').style.visibility="visible";document.getElementById('div_menu_top2b').style.visibility="hidden";document.getElementById('div_menu_top3b').style.visibility="hidden";document.getElementById('div_menu_top4b').style.visibility="hidden";createCookie('menu_top','menu_top1',0);}
else if(document.all)
{document.all('div_menu_top1a_active').style.visibility="visible";document.all('div_menu_top2a_active').style.visibility="hidden";document.all('div_menu_top3a_active').style.visibility="hidden";document.all('div_menu_top4a_active').style.visibility="hidden";document.all('div_menu_top1b').style.visibility="visible";document.all('div_menu_top2b').style.visibility="hidden";document.all('div_menu_top3b').style.visibility="hidden";document.all('div_menu_top4b').style.visibility="hidden";createCookie('menu_top','menu_top1',0);}}
function menu_top2()
{if(document.layers)
{document.layers('div_menu_top1a_active').visibility="hide";document.layers('div_menu_top2a_active').visibility="show";document.layers('div_menu_top3a_active').visibility="hide";document.layers('div_menu_top4a_active').visibility="hide";document.layers('div_menu_top1b').visibility="hide";document.layers('div_menu_top2b').visibility="show";document.layers('div_menu_top3b').visibility="hide";document.layers('div_menu_top4b').visibility="hide";createCookie('menu_top','menu_top2',0);}
else if(document.getElementById)
{document.getElementById('div_menu_top1a_active').style.visibility="hidden";document.getElementById('div_menu_top2a_active').style.visibility="visible";document.getElementById('div_menu_top3a_active').style.visibility="hidden";document.getElementById('div_menu_top4a_active').style.visibility="hidden";document.getElementById('div_menu_top1b').style.visibility="hidden";document.getElementById('div_menu_top2b').style.visibility="visible";document.getElementById('div_menu_top3b').style.visibility="hidden";document.getElementById('div_menu_top4b').style.visibility="hidden";createCookie('menu_top','menu_top2',0);}
else if(document.all)
{document.all('div_menu_top1a_active').style.visibility="hidden";document.all('div_menu_top2a_active').style.visibility="visible";document.all('div_menu_top3a_active').style.visibility="hidden";document.all('div_menu_top4a_active').style.visibility="hidden";document.all('div_menu_top1b').style.visibility="hidden";document.all('div_menu_top2b').style.visibility="visible";document.all('div_menu_top3b').style.visibility="hidden";document.all('div_menu_top4b').style.visibility="hidden";createCookie('menu_top','menu_top2',0);}}
function menu_top3()
{if(document.layers)
{document.layers('div_menu_top1a_active').visibility="hide";document.layers('div_menu_top2a_active').visibility="hide";document.layers('div_menu_top3a_active').visibility="show";document.layers('div_menu_top4a_active').visibility="hide";document.layers('div_menu_top1b').visibility="hide";document.layers('div_menu_top2b').visibility="hide";document.layers('div_menu_top3b').visibility="show";document.layers('div_menu_top4b').visibility="hide";createCookie('menu_top','menu_top3',0);}
else if(document.getElementById)
{document.getElementById('div_menu_top1a_active').style.visibility="hidden";document.getElementById('div_menu_top2a_active').style.visibility="hidden";document.getElementById('div_menu_top3a_active').style.visibility="visible";document.getElementById('div_menu_top4a_active').style.visibility="hidden";document.getElementById('div_menu_top1b').style.visibility="hidden";document.getElementById('div_menu_top2b').style.visibility="hidden";document.getElementById('div_menu_top3b').style.visibility="visible";document.getElementById('div_menu_top4b').style.visibility="hidden";createCookie('menu_top','menu_top3',0);}
else if(document.all)
{document.all('div_menu_top1a_active').style.visibility="hidden";document.all('div_menu_top2a_active').style.visibility="hidden";document.all('div_menu_top3a_active').style.visibility="visible";document.all('div_menu_top4a_active').style.visibility="hidden";document.all('div_menu_top1b').style.visibility="hidden";document.all('div_menu_top2b').style.visibility="hidden";document.all('div_menu_top3b').style.visibility="visible";document.all('div_menu_top4b').style.visibility="hidden";createCookie('menu_top','menu_top3',0);}}
function menu_top4()
{if(document.layers)
{document.layers('div_menu_top1a_active').visibility="hide";document.layers('div_menu_top2a_active').visibility="hide";document.layers('div_menu_top3a_active').visibility="hide";document.layers('div_menu_top4a_active').visibility="show";document.layers('div_menu_top1b').visibility="hide";document.layers('div_menu_top2b').visibility="hide";document.layers('div_menu_top3b').visibility="hide";document.layers('div_menu_top4b').visibility="show";createCookie('menu_top','menu_top4',0);}
else if(document.getElementById)
{document.getElementById('div_menu_top1a_active').style.visibility="hidden";document.getElementById('div_menu_top2a_active').style.visibility="hidden";document.getElementById('div_menu_top3a_active').style.visibility="hidden";document.getElementById('div_menu_top4a_active').style.visibility="visible";document.getElementById('div_menu_top1b').style.visibility="hidden";document.getElementById('div_menu_top2b').style.visibility="hidden";document.getElementById('div_menu_top3b').style.visibility="hidden";document.getElementById('div_menu_top4b').style.visibility="visible";createCookie('menu_top','menu_top4',0);}
else if(document.all)
{document.all('div_menu_top1a_active').style.visibility="hidden";document.all('div_menu_top2a_active').style.visibility="hidden";document.all('div_menu_top3a_active').style.visibility="hidden";document.all('div_menu_top4a_active').style.visibility="visible";document.all('div_menu_top1b').style.visibility="hidden";document.all('div_menu_top2b').style.visibility="hidden";document.all('div_menu_top3b').style.visibility="hidden";document.all('div_menu_top4b').style.visibility="visible";createCookie('menu_top','menu_top4',0);}}
function createCookie(name,value,days)
{if(days)
{var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function readCookie(name)
{var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++)
{var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function eraseCookie(name)
{createCookie(name,"",-1);}
function init(){if(!document.getElementById)return
var imgOriginSrc;var imgTemp=new Array();var imgarr=document.getElementsByTagName('img');for(var i=0;i<imgarr.length;i++){if(imgarr[i].getAttribute('hsrc')){imgTemp[i]=new Image();imgTemp[i].src=imgarr[i].getAttribute('hsrc');imgarr[i].onmouseover=function(){imgOriginSrc=this.getAttribute('src');this.setAttribute('src',this.getAttribute('hsrc'))}
imgarr[i].onmouseout=function(){this.setAttribute('src',imgOriginSrc)}}}}
onload=init;function trimspace(inputnavn){while(''+document.all[inputnavn].value.charAt(0)==' ')document.all[inputnavn].value=document.all[inputnavn].value.substring(1,document.all[inputnavn].value.length);while(''+document.all[inputnavn].value.charAt(document.all[inputnavn].value.length-1)==' ')document.all[inputnavn].value=document.all[inputnavn].value.substring(0,document.all[inputnavn].value.length-1);}
function trimspacenull(inputnavn){while((''+document.all[inputnavn].value.charAt(0)==' ')||(''+document.all[inputnavn].value.charAt(0)=='0'))document.all[inputnavn].value=document.all[inputnavn].value.substring(1,document.all[inputnavn].value.length);while(''+document.all[inputnavn].value.charAt(document.all[inputnavn].value.length-1)==' ')document.all[inputnavn].value=document.all[inputnavn].value.substring(0,document.all[inputnavn].value.length-1);}
function openwindow(url,name){window.open(url,name,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=580, height=380")}
function openwindow_img(url,name){window.open(url,name,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width=660, height=640")}
function openwindow_print(url,name){window.open(url,name,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=680, height=480")}
function openwindow_post(url,name){window.open(url,name,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=1040, height=680")}
function openwindow_tnm(url,name){window.open(url,name,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width=710, height=480")}
function openwindow_dnv(url,name){window.open(url,name,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width=780, height=480")}
function openwindow_na(url,name){var winObj=window.open(url,name,"toolbar=yes, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width=450, height=660");if(!winObj){alert('Du bruker antagelig en såkalt \'popup blocker\'\nog dette forhindrer deg fra at siden åpnes korrekt.\n\nFor å komme Best-Buy sin betalingsløsning Netaxept, må du\ntrykke på linken \'Til Netaxept\'.');}
else{winObj.focus();}}
function openwindow_GE(url,name){var winObj=window.open(url,name,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=yes, width=250, height=200");if(!winObj){alert('Du bruker antagelig en såkalt \'popup blocker\'\nog dette forhindrer deg fra at siden åpnes korrekt.\n\nFor å komme Best-Buy sin betalingsløsning Netaxept, må du\ntrykke på linken \'Til Netaxept\'.');}
else{winObj.focus();}}
function mOver(a,changeTo)
{a.style.backgroundColor=changeTo;}
function shopper_logout(){history.go(-history.length);document.location='shopper_logout.asp';}
function showMenu(f){if(f){visi="visible";}
else{visi="hidden";}
if(document.layers){document.menu.visibility=visi;}
if(document.all){document.all.menu.style.visibility=visi;}
if(document.getElementById){document.getElementById("menu").style.visibility=visi;}}