﻿// JScript File
// Core Insights Script
// REM: Keep it small and simple as every page loads this
//function SendToLogin( var url ) {
//    window.navigate(url);
//    return true;
//}

function changeActionOnFormAndSubmit(newAction, newMethod) {
    var theForm = document.forms[0];
    if (!theForm) {
        theForm = document.Form1;
    }
    theForm.action = newAction;
    theForm.method = newMethod;
    theForm.submit();
}


function quickSearch() {
    var locid = "lom_hol";
    var keyword = window.document.getElementById("keyword");
    var keyLen = window.document.getElementById("keyword").value.length;
    var url = "http://find.galegroup.com.references.herrickdl.org:2048/ips/infomark.do?prodId=IPS&subjectParam=Locale(en,US,):FQE=(SU," + keyLen + ")"
  + keyword.value + "$&type=search&tabID=T003&subjectAction=DISPLAY_SUBJECTS&prodId=IPS&userGroupName=" + locid + "&version=1.0&sgHitCountType=None&searchType=BasicSearchForm&queryId=Locale(en,US,):FQE=(KE,"
  + keyLen + ")" + keyword.value + ":And:LQE=(AC,None,8)fulltext$&source=library";
    // alert(url);
    window.open(url);
}

function updateTarget(source, target) {
    var s = document.getElementById(source);
    var t = document.getElementById(target);
    if (s && t) { t.value = s.value; }
}

