﻿var imageURL = new Array("images/United/nav_find_equipment_on.gif", "images/United/nav_find_equipment.gif", "images/United/nav_find_supplies_on.gif", "images/United/nav_find_supplies.gif", "images/United/nav_urdata_on.gif", "images/United/nav_urdata.gif", "images/United/nav_locate_store_on.gif", "images/United/nav_locate_store.gif"); var imageInfo = new Array(); for (i = 0; i < imageURL.length; i++) { imageInfo[i] = new Image(); imageInfo[i].src = imageURL[i] } function rollon(iid, xid) { var element = document.getElementById(iid); element.src = eval("imageInfo[" + xid * 2 + "].src") } function rolloff(iid, xid) { var element = document.getElementById(iid); element.src = eval("imageInfo[" + (xid * 2 + 1) + "].src") } function ListenForJsEvents() { if (window.captureEvents) { window.captureEvents(Event.CLICK); window.onclick = clickHandler; window.captureEvents(Event.ONMOUSEOVER); window.onmouseover = hoverHandler; window.captureEvents(Event.ONMOUSEOUT); window.onmouseout = outHandler } else { document.onclick = clickHandler; document.onmouseover = hoverHandler; document.onmouseout = outHandler } } function clickHandler(h) { var f = getElement(h), d = f.className, g = f.parentNode.className; if (d == "cat") { var k = "category.aspx?cid=" + f.id.substring(f.id.lastIndexOf("_") + 1); if (f.id.indexOf("h_") == 0) { k += "&tabId=1" } window.location = k } else { if (d == "RasSelect" || g == "RasSelect") { if (g == "RasSelect") { f = f.parentNode } if (!f.parentNode.getAttribute("disabled")) { var b = getElementsByClass("RasList", null, "div"), c; for (c in b) { b[c].style.display = "none" } f.style.borderBottomColor = "white"; if (f.nextSibling) { f.nextSibling.style.display = "block" } } } else { if (g == "RasList" && d != "disabled") { f.parentNode.style.display = "none"; __doPostBack(f.parentNode.parentNode.id ? f.parentNode.parentNode.id : f.parentNode.parentNode.name, f.innerHTML) } else { if (d != "disabled") { var b = getElementsByClass("RasList", null, "div"), a = getElementsByClass("RasSelect", null, "div"), c; for (c in b) { b[c].style.display = "none" } for (c in a) { a[c].style.borderBottomColor = "" } } } } } } function hoverHandler(c) { var b = getElement(c), a = document.getElementById("hdnPopId"), d; if (b.tagName == "A" && b.parentNode.className == "RasList") { b.style.cssText = "background-color: #777; color: #fff;" } switch (b.className) { case "hscat": case "scat": d = a.value; if (d != b.id && d != "") { document.getElementById(d).style.display = "inline"; document.getElementById(d).style.display = "none" } document.getElementById(b.id + "_pop").style.display = "block"; a.value = b.id + "_pop"; break; case "pop": case "hpop": case "cat": break; default: if (a != null && a.value != "" && b.parentNode.className != "cat") { document.getElementById(a.value).style.display = "inline"; document.getElementById(a.value).style.display = "none" } } } function outHandler(b) { var a = getElement(b); if (a.tagName == "A" && a.parentNode.className == "RasList") { a.style.cssText = "" } } function getElement(a) { return (typeof event !== "undefined") ? event.srcElement : a.target } function getElementsByClass(g, e, a) { var d = new Array(); if (e == null) { e = document } if (a == null) { a = "*" } var c = e.getElementsByTagName(a); var b = c.length; var f = new RegExp("(^|\\\\s)" + g + "(\\\\s|$)"); for (i = 0, j = 0; i < b; i++) { if (f.test(c[i].className)) { d[j] = c[i]; j++ } } return d } function Checkbox(a) { if (a.value == "Enter Keyword") { a.value = "" } } function CatRedirect(a) { __doPostBack("cat_redrct", a) } function SubCatRedirect(a) { __doPostBack("redrct", a) } function GotoDetail(e, b, c, a, d) { document.getElementById(b).value = c + "," + a + "," + d; document.getElementById(e).click() } function ShowContextHelp(c) { var b = (screen.height - 270) / 2; var a = (screen.width - 350) / 2; helpWindow = window.open("ContextHelp.aspx?id=" + c, "Help", "left=" + a + ",top=" + b + ",width=350,height=270,scrollbars=1,status=1,resize=0"); if (window.focus) { helpWindow.focus() } } function RotateImages(c, b, a) { if (a > 0) { if (document.getElementById(c) != null && document.getElementById(c).value.indexOf(";") > 0) { setInterval('SetImage("' + c + '", "' + b + '");', a * 1000) } } } var current_img_idx = 0; function SetImage(c, a) { if (document.getElementById(c) != null && document.getElementById(a) != null) { if (document.getElementById(c).value != "") { var d = document.getElementById(c).value.split(";"); if (d.length > 1) { do { if (current_img_idx == (d.length - 1)) { current_img_idx = 0 } else { current_img_idx++ } var b = d[current_img_idx] } while (document.getElementById(a).src.indexOf(b) > -1); document.getElementById(a).src = b } } } };
