function Focus (input, _default, _focus) { input.onfocus = function () { input.value == _default ? input.value = "" : void(0); } input.onblur = function () { input.value == "" ? input.value = _default : void(0); } } OnLoad.push(function() { var input = document.getElementsByTagName('input'); for (i in input) try { if (input[i].value == "Username") { Focus(input[i], "Username", true); } else if (input[i].value == "Password") { Focus(input[i], "Password", true); } } catch (e) {} Focus(document.quicksearchform.query, "Type Here", true); }); function opacity(id, opacStart, opacEnd, millisec) { var speed = Math.round(millisec / 100); var timer = 0; if(opacStart > opacEnd) { for(i = opacStart; i >= opacEnd; i--) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++; } } else if(opacStart < opacEnd) { for(i = opacStart; i <= opacEnd; i++) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++; } } } function changeOpac(opacity, id) { var object = document.getElementById(id).style; object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")"; } function toggleOpacity(id, finalOpac, millisec) { if(document.getElementById(id).style.opacity == 0) { opacity(id, 0, finalOpac, millisec); } else { opacity(id, finalOpac, 0, millisec); } } function fixedbox(d, s) { if (!s) s=''; f = document.getElementById("fixedbox"+s); d?f.style.display ="block":setTimeout("f.style.display='none'", 300); toggleOpacity("fixedbox"+s, 100, 300); toggleOpacity("fixedbox"+s+"-bg", 40, 300); if (bg = document.getElementById("fixedbox"+s+"-bg")) d?bg.style.display = "block":setTimeout("bg.style.display='none'",300); return f; }