﻿function ShowHideDiv (id){

    if (document.getElementById){ 
    
        var obj = document.getElementById(id); 

        if (obj != null){
            if (obj.style.display == "none"){ 
                obj.style.display = ""; 
            } else { 
                obj.style.display = "none"; 
            } 
        }
    } 
    return false;

}

function LoadSiteLanguage_Mod766(langId) {
  // NOT NEEDED anymore ... replace with codebehind Command
  // Documentation 
  // This was copied in so I wouldnt have to add the LanguageSelect 
  // control to the page just to get this JS available
  // Also I merged the two functions into 1

  // BuildQueryString();
  // ===========================
  replaceQueryString = ""
  var search;
  try {search = location.href.split("?");} catch(err) {search='';} 
  if (search.length > 1){ 
      var vals=search[1].split("&");
      var request= new Array(); 
      for (var i in vals) { 
          vals[i] = vals[i].replace(/\+/g, " ").split("="); 
          if (unescape(vals[i][0]).toLowerCase() != "langtype") { //we just ignore langtype.
              if (replaceQueryString == "") { replaceQueryString = unescape(vals[i][0]) + "=" + unescape(vals[i][1]) } 
              else { replaceQueryString += "&" +  unescape(vals[i][0]) + "=" + unescape(vals[i][1])}
          }
          request[unescape(vals[i][0])] =unescape(vals[i][1]); 
      }
  }
  // ===========================

  // LoadSiteLanguage  
  // ===========================
  if (replaceQueryString != "") { replaceQueryString = replaceQueryString + "&" } 
  var path = '';
  try {path = location.pathname} catch(err) {} 
  path = path + "?" + replaceQueryString + "LangType=" + langId;
  path = path.replace("//", "/");
  document.location.href= path;
  // ===========================
}





