//function convertSpecialChars(str) {
//   pat = /%\^/g;
//   rep = "&";
//   pat2 = /%\*/g;
//   rep2 = "#";
//   pat3 = /%\)/g;
//   rep3 = "\"";
//   pat4 = /<br \/>/g;
//   rep4 = "%0D";
//   return str.replace(pat,rep).replace(pat2,rep2).replace(pat3,rep3).replace(pat4,rep4);
//}
function startdisplay() {
   divdisplay();
}
//function bookmark() {
//   if(window.external && window.external.AddFavorite)
//      window.external.AddFavorite(window.location.href,window.document.title);
//}
function redirectToViewResults() {
   submitTheInfo();
}

function setLocQueryString(givenId) {
//Meant to be called when the governingJuris is changed, it changes the ?loc= region
//for the View Results links to be the newly selected region. As previous PHP code did, it
//rewrites the query string.  So more sophisticated regular expression processing might be
//necessary if it important to retain those other parts of the query string.
//E.g.: printJurisdictionInput('governingLaw','setLocQueryString("governingLaw");','','governingLaw');
//The "governingJuris" at the end is necessary to give the element an id (it used to only assign a class).
//The id allows the code to work. RED 20110606
//
/**
 * It may seem backward, but the sensible option of setting this in
 * submitTheInfo() turns out to be tough because submitTheInfo is a
 * contract-specific function. - MJO 2011.08.23
 */
   if (givenId==null) givenId='governingLaw';
   var govJuri = document.getElementById(givenId);
   var govJuriValue = govJuri.options[govJuri.selectedIndex].value;
   if(govJuriValue) {
      var newURL = "/contracts/"+contractIdentifier+"/preview.php?loc="+dbcountry+govJuriValue;
      document.hiddenform.action = newURL;
   }
}

