function showlayer(myName, myAction) { var obj, value; if ((obj = document.getElementById(myName)) != null) { if (obj.style) { value = (myAction == "show") ? "visible" : "hidden"; obj.style.visibility = value; } } } function gotosite(url, formSelectId) { var obj; obj = document.getElementById(formSelectId); if (obj != null) { var str = obj.options[obj.selectedIndex].value; str = str.replace(" ", "+"); window.location.href = url + str; } } function swap(id, picUrl) { var pic; if ((pic = document.getElementById(id)) != null) { pic.src = picUrl; } } function clearBox(obj) { if (obj.value == 'search...') { obj.value = ""; } } var pdTip = null; function initTip(tags) { var els, txt, el, newDiv, mouseOver, mouseOut; var tagList = tags.split(","); newDiv = document.createElement("div"); newDiv.id = "pdTip"; document.body.appendChild(newDiv); pdTip = newDiv; document.onmousemove = function (evt) {moveTip (evt)}; for (var n = 0; n < tagList.length; n++) { els = document.getElementsByTagName(tagList[n]); if (els) { for (var m = 0; m < els.length; m++) { el = els[m]; var aClassName = el.className; if (aClassName) { var ttId = aClassName.substr(0,4); if (ttId == "pTip") { txt = el.getAttribute("title"); if (txt) { el.setAttribute("tipText", txt); el.removeAttribute("title"); el.removeAttribute("alt"); if (el.addEventListener) { el.addEventListener('mouseover', function() {showTip(this)}, false); el.addEventListener('mouseout', function() {hideTip()}, false); } else { el.attachEvent('onmouseover', function(e) {showTipIE(e)}); el.attachEvent('onmouseout', hideTip); } } } } } } } } function showTipIE(e) { var el = e.srcElement; showTip(el); } function showTip(el) { var text; text = el.getAttribute("tipText"); pdTip.innerHTML = text; pdTip.style.display = "block"; } function hideTip() { pdTip.innerHTML = ""; pdTip.style.display = "none"; } function moveTip(evt) { var x=0, y=0; if (document.all) {//IE x = (document.documentElement && document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft; y = (document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop; x += window.event.clientX; y += window.event.clientY; } else {//others x = evt.pageX; y = evt.pageY; } pdTip.style.left = (x + 2) + "px"; pdTip.style.top = (y + 18) + "px"; } //preload images