// Used in headline_results.xsl - should be removed and headline_result.xsl use CData function LessThan(a, b) { return a < b; } function GetMyPOU() { var pouValue; if (parent != null && parent.actionbar_top != null && parent.actionbar_top.document != null && parent.actionbar_top.document.forms[0] != null) { if (parent.actionbar_top.document.forms[0].POU != null ) pouValue = parent.actionbar_top.document.forms[0].POU[parent.actionbar_top.document.forms[0].POU.selectedIndex].value; else { alert('Purchase denied - please contact customer support'); return null; } } else if (parent.actionBarBottom.document.forms[0].POU != null) { pouValue = parent.actionBarBottom.document.forms[0].POU[parent.actionBarBottom.document.forms[0].POU.selectedIndex].value; } else { alert('Purchase denied - please contact customer support'); return null; } var arrayValue arrayValue = pouValue.split("|"); return arrayValue[0]; } function getCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } // Saves cookie to user machine. function setCookie(name, value, expires) { document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString()); } // Deletes a cookie by aggressively outdating it. function delCookie(name) { document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/"; } function BuyPicNow(oSession, oEAN) { if(oSession == ""){ oSession = getCookie("Session"); } oPOU = GetMyPOU(); if (oPOU != null) { window.open(RPAPath + "downloadNow.asp?MfcISAPICommand=BuyPictureNow&sid=" + oSession + "&ean=" + oEAN + "&pou=" + oPOU, "winv" ,"Height=290,width=450,toolbar=no,resizeable=no,scrollbars=yes,location=no"); // document.location.href = '/rpa/bin/eRPPISA.dll?MfcISAPICommand=BuyPictureNow&sid=' + oSession + '&ean=' + oEAN + '&pou=' + oPOU; } return; } function GetImageSelectionString() { var eanText = ""; eanArray = getEanArray(); if (eanArray.length > 0) { for (var j=0; j < eanArray.length; j++) { if(eanArray[j] != "") { if (eanText != "") { eanText = eanText + "|" + eanArray[j]; } else { eanText = eanArray[j]; } } } } return eanText; } function GetSelectedHeadlines() { var result = ""; idArray = getIdArray(); if (idArray.length > 1) { for (var j=0; j < idArray.length; j++) { if(idArray[j] != "") { if (result != "") { result = result + "|" + idArray[j]; } else { result = idArray[j]; } } } } return result; } function GetIDSelectionString() { var idText = ""; idArray = getIdArray(); if (idArray.length > 0) { for (var j=0; j < idArray.length; j++) { if(idArray[j] != "") { if (idText != "") { idText = idText + "|" + idArray[j]; } else { idText = idArray[j]; } } } } return idText; } var clickmessage="WARNING_RIGHT_CLICK_DISABLED" function disableclick(e) { if (document.all) { if (event.button==2||event.button==3) { if (event.srcElement.tagName=="IMG") { alert(clickmessage); return false; } } } else if (document.layers) { if (e.which == 3) { alert(clickmessage); return false; } } else if (document.getElementById) { if (e.which==3&&e.target.tagName=="IMG") { alert(clickmessage) return false } } } function associateimages() { for(i=0;i