currentcat = ""; currentimg = ""; currentcat_obj = 0; clk = 0; cat_selected_clk = 0; isonmenu = 0; function p_findObj(n) { var lay; if((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) < 5 )) { lay = eval("document." + n); } else { lay = document.getElementById(n); } return lay; } function p_findObjstyle(o) { obj = p_findObj(o); if(obj.style) { obj = obj.style; } return obj; } function showHideLayers(o, v) { obj = p_findObjstyle(o); obj.visibility = v; } fading_out = false; fade_cntd = 0; function StopFade() { if(fading_out) { fade_cntd = 0; fading_out = false; if(currentcat_obj != null) { currentcat_obj.visibility = 'hidden'; SetTrans(currentcat_obj, 100); imgOut(currentimg); currentimg = null; } currentcat_obj = null; } } function pdShow(l, img) { if(currentcat != "" && currentcat != l && l != "") { imgOut(currentimg); showHideLayers(currentcat, 'hidden'); } StopFade(); currentcat = l; if(l != "") { StopFade(); isonmenu = false; showHideLayers(l, 'visible'); imgOver(img); currentimg = img; isonmenu++; currentcat_obj = p_findObjstyle(l); cat_selected_clk = clk; } else { //currentcat_obj = null; isonmenu = 0; cat_selected_clk -= 100; // make sure we're going to fade out } } function pdHide(l) { isonmenu--; // window.status="cnt = " + isonmenu; } function EnterSubmenu() { cat_selected_clk = clk; isonmenu++; } function LeaveSubmenu() { isonmenu--; } function SetTrans(obj, tr) { //obj = p_findObj(l); obj.filter = "Alpha(opacity="+tr+", finishopacity="+tr+", style=2)"; } var n_mv = 6; var mv_width = 120; var mvpos = 0; // = new Array(n_mv); var mvref = new Array(n_mv); function pdTimer() { clk++; delta = 2; maxvis = 4; if(clk%2 == 0) { ofs_i = Math.floor(-(mvpos-1)/120); for(i=ofs_i; i<=ofs_i+maxvis; i++) { var i2 = (i+n_mv) % n_mv; pos = mvpos + i*120; mvref[i2].left = 240 + pos; if(pos == -120+delta) { mvref[i2].visibility = 'visible'; } else if(pos == maxvis*120-delta) { mvref[i2].visibility = 'hidden'; //window.status = i2+1; } } mvpos += delta; if(mvpos >= 120*n_mv) { mvpos = 0; } } if(!fading_out && isonmenu == 0 && currentcat_obj != "" && (clk-cat_selected_clk) > 20) { //pdShow(""); fading_out = true; fade_cntd = 100; } if(fading_out) { fade_cntd -= 10; if(fade_cntd < 0) { StopFade(); } if(currentcat_obj != null) SetTrans(currentcat_obj, fade_cntd); } setTimeout('pdTimer()', 40); } function pdOnLoad() { for(i=0; i