function buildKey(temp){
if(validations(temp)){
var temp2 = temp;
var query = "";
temp = parseOR(temp);
query = "(SUBTRACT "+ temp +" ( IN \"Form\" (OR \"Business Units\" \"frmSiteLib\" \"frmAudit\" \"Product Listing\" \"frmDBProfile\" \"frmCUBI\")))";
}
removeCookie("query");
setCookieSimple("query",temp2);
return query;
}
function setCookieSimple(name, value) {
document.cookie = name + "=" + escape(value) + "; path=/";
}
function parseOR(value) {
value = value.split(" ");
if(value.length == 1) {
return"(TOKEN:EXACT \"" + value.join("\" \"") + "\")";
}
return "(AND \"" + value.join("\" \"") + "\")";
}function removeCookie (name) {
var expireNow = new Date();
document.cookie = name + "=" +"; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/";
}
function validations(value) {
if ("" == value) {
alert("Please provide a search keyword");
return false;
}
if ("\"" == value.substring(0,1)) {
alert("Quotations are not allowed, please adjust your search.");
return false;
}
if ("\'" == value.substring(0,1)) {
alert("Quotations are not allowed, please adjust your search.");
return false;
}
return true;
}
function doSearch(f){
var key = f.txtsearch.value;
if(!( null == key || key.length == 0 || key == '')) {
key = buildKey(key);
location.href='/search/JKMSearchController?AppID=Internet&DESBoolean=AND&doNotUpdateCriteria=Yes&desClientLocale=enUS&DESGetPage=1&DESTotalMaxHits=100&DESMaxHits=100&DESNumConstraints=0&DESPageSize=10&DESQueryId=none&DESResultsFmt=HTML&DESReturnResults=Sorted&DESSortField=DocRank&DESSortOrder=Descending&DESCategoryNames=Internet-All&desJSPFile=mwvSearchResults.jsp&esJSPError=mwvSearch.jsp&esJSPSearchPage=mwvSearchPage.jsp&Type=AND&DESQueryString=' + key
}
return false;
}
document.write("
/spacer.gif/$FILE/spacer.gif) |
|
");
document.write("