var delay=1500;var delayon=100;function setclass(n){for(var i=1;i<=n;i++){set_subclass(i);}
function set_subclass(i){document.getElementById("sub"+i).onmouseover=subon;document.getElementById("sub"+i).onmouseout=suboff;function subon(){document.getElementById("sub"+i).className="nav_subline1";document.getElementById("navlink"+i).className="nav_on";}
function suboff(){document.getElementById("sub"+i).className="nav_subline";document.getElementById("navlink"+i).className="nav";}}
document.getElementById("sub"+n).className="nav_subline";document.getElementById("navlink"+n).className="nav";document.getElementById("nav9").className="navline";document.getElementById("navbar9").className="nav";for(var l=1;l<=9;l++){mouse(l);}
function mouse(l){document.getElementById("nav"+l).onmouseover=hover;if((l!=5)&&(l!=8)&&(l!=9)){document.getElementById("tiera"+l).onmouseover=hover;}
document.getElementById("nav_layer").onmouseout=unhover;function hover(){line=l;var t=setTimeout(setclass1,delayon);clearTimeout(t-1);}
function unhover(){line=0;var t=setTimeout(setclass1,delay);clearTimeout(t-1);}}}
function setclass1(){for(var m=1;m<=9;m++){oth_off(m);}
function oth_off(m){if(m!=line){if((m!=5)&&(m!=8)&&(m!=9)){document.getElementById("tiera"+m).className="nav_tieraoff";}
else{document.getElementById("navbar"+m).className="nav";}
document.getElementById("nav"+m).className="navline";}}
if(line!=0){document.getElementById("nav"+line).className="navline1";if((line!=5)&&(line!=8)&&(line!=9)){document.getElementById("tiera"+line).className="nav_tiera"+line+"on";}
else{document.getElementById("navbar"+line).className="nav_on";}}}
function boxlight(k){for(var n=1;n<=k;n++){box(n)}
function box(n){document.getElementById("workarea"+n).onmouseover=ilarge;document.getElementById("workarea"+n).onmouseout=ismall;function ilarge(){document.getElementById("workarea"+n).className="workarea1";}
function ismall(){document.getElementById("workarea"+n).className="workarea";}}}
function medboxlight(n){document.getElementById(n).onmouseover=ilargem;document.getElementById(n).onmouseout=ismallm;function ilargem(){document.getElementById(n).className="mediumwidthborder1";}
function ismallm(){document.getElementById(n).className="mediumwidthborder";}}
function prodboxlight(k){for(var n=1;n<=k;n++){prodbox(n)}
function prodbox(n){document.getElementById("product"+n).onmouseover=lighton;document.getElementById("product"+n).onmouseout=lightoff;function lighton(){document.getElementById("product"+n).className="prod_box_outon";}
function lightoff(){document.getElementById("product"+n).className="prod_box_outer";}}}
function jsen(k){for (var n=1; n<=k; n++){jsen_ch(n)}
function jsen_ch(n){document.getElementById("jsen"+n).value='on';}}
function searhere(){document.getElementById("search1").value='Keyword or Price';document.getElementById("search1").onclick=searempty;function searempty(){document.getElementById("search1").value='';}}
function switcher(){document.get
document.getElementById('button').onmouseover=sw_on;document.getElementById('button').onmouseout=sw_off;function sw_off(){document.getElementById('button').className='button';}
function sw_on(){document.getElementById('button').className='but_press';}}
function ilarge(n){for (d=1; d<=5; d++){if (document.getElementById("large" + d)) {if (d==n){document.getElementById("large"+n).className=("gallery_large");}else {document.getElementById("large"+d).className=("gallery_off");}}}}
function col_block(a){for (n=0; n<a; n++){var idt=id[n];var col=colour[n];setter(idt,col)}function setter(id,col) {document.getElementById(id).onmouseover=colourset;function colourset(r){{for (b=1; b<=5; b++)if (document.getElementById("large" + b)) {document.getElementById("large"+b).style.backgroundColor=col;}		}}}}
