function LinkToContent(p_intFeatureId, p_intRecordId) { switch(p_intFeatureId){ case 14 : this.location='../FormManager/Default.aspx?Id=' + p_intFeatureId + '&rId=' + p_intRecordId; break; case 10 : this.location='../ImageManager/ImageSelector.aspx??Id=' + p_intFeatureId + '&rId=' + p_intRecordId; break; case 11 : this.location='../ImageManager/ImageSelector.aspx??Id=' + p_intFeatureId + '&rId=' + p_intRecordId; break; case 10758 : this.location='../LinkManager/Default.aspx?Id=' + p_intFeatureId + '&rId=' + p_intRecordId; break; case 15 : this.location='../MailingManager/Default.aspx?Id=' + p_intFeatureId + '&rId=' + p_intRecordId; break; case 10763 : this.location='../MediaManager/Index.aspx?Id=' + p_intFeatureId + '&rId=' + p_intRecordId; break; case 10762 : this.location='../Menumanager/FeatureSort.aspx?Id=' + p_intFeatureId + '&rId=' + p_intRecordId; break; case 13 : this.location='../UserManager/Default.aspx?Id=' + p_intFeatureId + '&rId=' + p_intRecordId; break; case 12 : this.location='../VideoManager/Default.aspx?Id=' + p_intFeatureId + '&rId=' + p_intRecordId; break; case 8357 : this.location='forms/reparatieverzoek.aspx?Id=' + p_intFeatureId + '&rId=' + p_intRecordId; break; case 9068 : window.open('documenten.aspx?Id=' + p_intFeatureId + '&rId=' + p_intRecordId,'',''); break; default : this.location='/default.aspx?Id=' + p_intFeatureId + '&rId=' + p_intRecordId; } } function Search() { var l_strKeyword = document.getElementById("SearchString").value; if(l_strKeyword.length>0) { //var l_strFeatureId = GetParameterValue("FeatureId",null); this.location = 'default.aspx?&Id=5842&SearchString=' + l_strKeyword; } } function CheckSearchStringInput(e) { var key; var keychar; var reg; if(window.event) { // for IE, e.keyCode or window.event.keyCode can be used key = e.keyCode; } else if(e.which) { // netscape key = e.which; } else { // no event, so pass through return true; } if (key==13) { Search() } return (key!=13) } function GetParameterValue(p_strName, p_strUrl) { if (p_strUrl==null) p_strUrl = window.location; var l_objRegExp = new RegExp("(\\?|\\&)" + p_strName + "=(.*?)(\\&|$)"); if (l_objRegExp.test(p_strUrl)) return URLDecode(RegExp.$2); return null; } function URLEncode(p_strIn) { var SAFECHARS = "0123456789-_.!~*'()"; if (p_strIn==null) return p_strIn; var plaintext = p_strIn + ''; var encoded = ""; for (var i = 0; i < plaintext.length; i++ ) { var ch = plaintext.charAt(i); if (ch == " ") { encoded += "+"; // x-www-urlencoded, rather than %20 } else if (SAFECHARS.indexOf(ch) != -1) { encoded += ch; } else { var charCode = ch.charCodeAt(0); if (charCode > 255) { alert( "Unicode Character '" + ch + "' cannot be encoded using standard URL encoding.\n" + "(URL encoding only supports 8-bit characters.)\n" + "A space (+) will be substituted." ); encoded += "+"; } else { encoded += "%"; encoded += HEX.charAt((charCode >> 4) & 0xF); encoded += HEX.charAt(charCode & 0xF); } } } // for p_strIn = encoded; return p_strIn; }; function URLDecode(p_strIn) { // Replace + with ' ' // Replace %xx with equivalent character // Put [ERROR] in output if %xx is invalid. var HEXCHARS = "0123456789ABCDEFabcdef"; var encoded = p_strIn; var plaintext = ""; var i = 0; while (i < encoded.length) { var ch = encoded.charAt(i); if (ch == "+") { plaintext += " "; i++; } else if (ch == "%") { if (i < (encoded.length-2) && HEXCHARS.indexOf(encoded.charAt(i+1)) != -1 && HEXCHARS.indexOf(encoded.charAt(i+2)) != -1 ) { plaintext += unescape(encoded.substr(i,3) ); i += 3; } else { alert( 'Bad escape combination near ...' + encoded.substr(i) ); plaintext += "%[ERROR]"; i++; } } else { plaintext += ch; i++; } } // while p_strIn = plaintext; return p_strIn; }