var strMainFormTarget = "";

function SetPersistSecNav(parm){
  var strVal = readCookie('SecNav');
  var idx = parm + 1;
  var blnRemoved = false;
  if (strVal == idx){
    strVal = '';
    blnRemoved = true;
  }
  if (strVal.indexOf(idx + ',') >= 0){
    strVal = strVal.replace(idx + ',','');
    blnRemoved = true;
  }
  if (strVal.indexOf(',' + idx) >= 0){
    strVal = strVal.replace(',' + idx,'');
    blnRemoved = true;
  }
  if (blnRemoved == false){
    if (strVal.length == 0){
      document.cookie = 'SecNav=' + idx + '; path=/'; 
    }
    else{
      document.cookie = 'SecNav=' + strVal + ',' + idx + '; path=/';
    }
  }
  else{
    document.cookie = 'SecNav=' + strVal + '; path=/';
  }
}
function PersistCustomTable(){ 
  if (readCookie('CustBtn') == 'Hide'){ 
    hideCustomTable(); 
  } 
} 
function readCookie(name) 
{ 
  var nameEQ = name + '='; 
  var ca = document.cookie.split(';'); 
  for(var i=0;i < ca.length;i++) 
  { 
    var c = ca[i]; 
    while (c.charAt(0)==' ') c = c.substring(1,c.length); 
      if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 
  } 
  return ''; 
} 
function hideCustomTable(){ 
  document.getElementById('customTable').style.display = 'none'; 
  document.getElementById('HideShowCell').style.width = '21px'; 
  document.getElementById('CustomCell').style.width = '25px'; 
  document.getElementById('CustomCell').style.paddingLeft = '23px'; 
  //document.getElementById('CustomCell').style.paddingTop = '0px'; 
  //document.getElementById('CustomCell').style.paddingRight = '0px'; 
  //document.getElementById('CustomCell').style.paddingBottom = '0px'; 
  document.getElementById('HideBtn').style.display = 'none'; 
  document.getElementById('HideDate').style.display = 'none';
  document.getElementById('ShowBtn').style.display = ''; 
  document.cookie = 'CustBtn=Hide; path=/'; 
} 
function showCustomTable(){ 
  document.getElementById('customTable').style.display = ''; 
  document.getElementById('HideShowCell').style.width = '170px'; 
  document.getElementById('CustomCell').style.paddingLeft = '2px'; 
  document.getElementById('CustomCell').style.paddingTop = '0px'; 
  document.getElementById('CustomCell').style.paddingRight = '0px'; 
  document.getElementById('CustomCell').style.paddingBottom = '2px'; 
  document.getElementById('CustomCell').style.width = '174px'; 
  document.getElementById('HideBtn').style.display = ''; 
  document.getElementById('HideDate').style.display = '';
  document.getElementById('ShowBtn').style.display = 'none'; 
  document.cookie = 'CustBtn=Show; path=/'; 
}
function SiteSearchSubmitCapture(e)
  {
    if (e.keyCode == 13) // Enter Key
      { 
      //alert('hi');
       window.location = '/search.aspx?searchcriteria=' + document.MainForm.searchcriteria.value; return false;
      }              // end if
  }                  // end function

