 var updown_border = new Array(); var updown_background = new Array(); var updown_color = new Array(); var he = "0123456789abcdef"; var c = he.split(''); var colour = new Array(); var upanddown = new Array(); var over = new Array(); var out = new Array(); function calccol(navId,begColor,endColor,stps){ colour[navId] = new Array(); var c1 = begColor.toLowerCase().split(''); var c2 = endColor.toLowerCase().split(''); var steps = stps-1; colour[navId][0] = begColor.toUpperCase(); for (n=1; n<steps;n++){ var red = ((he.indexOf(c1[0])*16)+he.indexOf(c1[1]))+(n*(((he.indexOf(c2[0])*16)+he.indexOf(c2[1]))-((he.indexOf(c1[0])*16)+he.indexOf(c1[1])))/steps); var green = ((he.indexOf(c1[2])*16)+he.indexOf(c1[3]))+(n*(((he.indexOf(c2[2])*16)+he.indexOf(c2[3]))-((he.indexOf(c1[2])*16)+he.indexOf(c1[3])))/steps); var blue = ((he.indexOf(c1[4])*16)+he.indexOf(c1[5]))+(n*(((he.indexOf(c2[4])*16)+he.indexOf(c2[5]))-((he.indexOf(c1[4])*16)+he.indexOf(c1[5])))/steps); colour[navId][n] = String(c[parseInt(red/16)]+c[parseInt(red-(parseInt(red/16)*16))]+c[parseInt(green/16)]+c[parseInt(green-(parseInt(green/16)*16))]+c[parseInt(blue/16)]+c[parseInt(blue-(parseInt(blue/16)*16))]).toUpperCase(); } colour[navId][colour[navId].length] = endColor.toUpperCase(); } function upd_border(navId,mvmt,begColor,endColor,stps){ if (colour[navId] == undefined) { calccol(navId,begColor,endColor,stps); updown_border[navId] = 0; } document.getElementById("navi_" + navId + "_text").style.borderColor = '#'+colour[navId][updown_border[navId]]; if (mvmt == 'over' && updown_border[navId] < colour[navId].length-1) { clearTimeout(out[navId]); updown_border[navId]++; over[navId] = setTimeout("upd_border('" + navId + "','" + mvmt + "')",64); } else if (mvmt == 'out' && updown_border[navId] > 0) { clearTimeout(over[navId]); updown_border[navId]--; out[navId] = setTimeout("upd_border('" + navId + "','" + mvmt + "')",64); } } function upd_background(navId,mvmt,begColor,endColor,stps){ if (colour['background'] == undefined) calccol('background',begColor,endColor,stps); var an_bg = navId + "bg"; if (updown_background[navId] == undefined) updown_background[navId] = 0; document.getElementById("navi_" + navId + "_text").style.backgroundColor = '#'+colour['background'][updown_background[navId]]; if (mvmt == 'over' && updown_background[navId] < colour['background'].length-1) { clearTimeout(out[an_bg]); updown_background[navId]++; over[an_bg] = setTimeout("upd_background('" + navId + "','" + mvmt + "')",64); } else if (mvmt == 'out' && updown_background[navId] > 0) { clearTimeout(over[an_bg]); updown_background[navId]--; out[an_bg] = setTimeout("upd_background('" + navId + "','" + mvmt + "')",64); } } function upd_color(navId,mvmt,begColor,endColor,stps){ if (colour['color'] == undefined) calccol('color',begColor,endColor,stps); var an_col = navId + "bg"; if (updown_color[navId] == undefined) updown_color[navId] = 0; document.getElementById("navi_" + navId + "_text").style.color = '#'+colour['color'][updown_color[navId]]; if (mvmt == 'over' && updown_color[navId] < colour['color'].length-1) { clearTimeout(out[an_col]); updown_color[navId]++; over[an_col] = setTimeout("upd_color('" + navId + "','" + mvmt + "')",64); } else if (mvmt == 'out' && updown_color[navId] > 0) { clearTimeout(over[an_col]); updown_color[navId]--; out[an_col] = setTimeout("upd_color('" + navId + "','" + mvmt + "')",64); } } var beginPx = 3; var endPx = 14; var tOver = new Array(); var tOut = new Array(); var ai = new Array(); function moveLine(navId,dir,clr) { if (ai[navId] == undefined) ai[navId] = beginPx; document.getElementById("navi_" + navId + "_line").style.visibility = "visible"; if (dir == 'down') moveDown(navId); if (dir == 'up') moveUp(navId); if (dir == 'toRight') moveRight(navId); if (dir == 'toLeft') moveLeft(navId); if (!document.getElementById("navi_" + navId + "_text_active")) { if (dir == 'down' || dir == 'toRight') { upd_border(navId,'over','e9e9e9',clr,10); upd_background(navId,'over','e9e9e9','fcfefd',10); upd_color(navId,'over','656665','5a5a5a',10); } else if (dir == 'up' || dir == 'toLeft') { upd_border(navId,'out',clr,'e9e9e9',10); upd_background(navId,'out','fcfefd','e9e9e9',10); upd_color(navId,'out','5a5a5a','656665',10); } } } function moveDown(navId) { if (ai[navId] <= endPx) { window.clearTimeout(tOut[navId]); document.getElementById("navi_" + navId + "_line").style.top = ai[navId] + "px"; ai[navId]++; tOver[navId] = window.setTimeout("moveDown('" + navId + "')",52); } else { document.getElementById("navi_" + navId + "_line").style.visibility = "hidden"; } } function moveUp(navId) { if (ai[navId] >= beginPx) { window.clearTimeout(tOver[navId]); document.getElementById("navi_" + navId + "_line").style.top = ai[navId] + "px"; ai[navId]--; tOut[navId] = window.setTimeout("moveUp('" + navId + "')",52); } else { document.getElementById("navi_" + navId + "_line").style.visibility = "hidden"; } } function moveRight(navId) { if (ai[navId] <= endPx) { window.clearTimeout(tOut[navId]); document.getElementById("navi_" + navId + "_line").style.left = ai[navId] + "px"; ai[navId]++; tOver[navId] = window.setTimeout("moveRight('" + navId + "')",52); } else { document.getElementById("navi_" + navId + "_line").style.visibility = "hidden"; } } function moveLeft(navId) { if (ai[navId] >= beginPx) { window.clearTimeout(tOver[navId]); document.getElementById("navi_" + navId + "_line").style.left = ai[navId] + "px"; ai[navId]--; tOut[navId] = window.setTimeout("moveLeft('" + navId + "')",52); } else { document.getElementById("navi_" + navId + "_line").style.visibility = "hidden"; } } function mll(navId,dir) { if (ai[navId] == undefined) ai[navId] = 2; if(navId == 'll_footer_imp' || navId == 'll_footer_agb') maxPx = 8; else maxPx = 10; document.getElementById(navId).style.visibility = "visible"; if (dir == 'tr') mlltr(navId); if (dir == 'tl') mlltl(navId); } function mlltr(navId) { if (ai[navId] <= maxPx) { window.clearTimeout(tOut[navId]); document.getElementById(navId).style.left = ai[navId] + "px"; ai[navId]++; tOver[navId] = window.setTimeout("mlltr('" + navId + "')",52); } else { document.getElementById(navId).style.visibility = "hidden"; } } function mlltl(navId) { if (ai[navId] >= 2) { window.clearTimeout(tOver[navId]); document.getElementById(navId).style.left = ai[navId] + "px"; ai[navId]--; tOut[navId] = window.setTimeout("mlltl('" + navId + "')",52); } else { document.getElementById(navId).style.visibility = "hidden"; } }
