function GetMemberRedirectURL(sDesc,sUrl){ var sRedir = "http://slcmls.com/clientsite/memberredirect.asp?orderid=19981&suppid=200721" return(sRedir + "&desc=" + escape(sDesc) + "&url=" + escape(sUrl)); } function MemberRedirect(e){ var oElem, oFrame var sDesc = "" if (!e) var e = window.event oElem = (e.target) ? e.target : e.srcElement while ((oElem != null) && (oElem.tagName != "A")) { if (oElem.tagName == "IMG" && oElem.alt && oElem.alt != "") sDesc = oElem.alt; else if (oElem.title && oElem.title != "") sDesc = oElem.title; if (oElem.parentElement) oElem = oElem.parentElement; // ie else oElem = oElem.parentNode; // ie,ns } if (oElem != null){ if (oElem.onclick) return; if (oElem.href.indexOf("mailto") == 0) return; if (oElem.href.indexOf("javascript:") == 0) return; if (oElem.innerText && oElem.innerText != "") sDesc = MakeDesc(oElem.innerText,sDesc); if (oElem.title && oElem.title != "") sDesc = MakeDesc(sDesc,oElem.title); sUrl = GetMemberRedirectURL(sDesc,oElem.href); if (oElem.target){ window.open(sUrl, oElem.target) } else{ //window.navigate(sUrl); window.document.location = sUrl; } return false; } } function MakeDesc(sPrimary,sSecond){ var sOut if (sPrimary == "") sOut = sSecond else if (sSecond == "") sOut = sPrimary else sOut = sPrimary + " (" + sSecond + ")" return sOut }