// JavaScript Document
// Read Time Zone Cookie and Display Schedule

var cookiename = "time_zone";
var default_tz = "ET";

function getCookieVal (offset) 
{  
  var endstr = document.cookie.indexOf (";", offset);  
  if (endstr == -1)    
  endstr = document.cookie.length;  
  return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) 
{  
  var arg = name + "=";  
  var alen = arg.length;  
  var clen = document.cookie.length;  
  var i = 0;  
  while (i < clen) {    
  var j = i + alen;    
  if (document.cookie.substring(i, j) == arg)      
    return getCookieVal (j);    
    i = document.cookie.indexOf(" ", i) + 1;    
    if (i == 0) break;   
  }  
  return null;
}


function setCookie(name, value) {
var myCookie = name + "=" + escape(value) + "; expires=Fri, 13 Nov 2020 10:35:56 GMT";// + "; path=/" + "; domain=.thepatientchannel.com";
document.cookie = myCookie;
}


// --  This has to be changed....   the href for netscape has to be dtermined, not just manually set to index.html
function rld() {
   if (navigator.appName == "Netscape") {
   self.location.href = "index.html";
   } else {
   location.reload();
   }
}
// -- code for setting time zone  info
var tz = GetCookie(cookiename);
if (tz == null) {
	tz = default_tz;
	}

var tz_text;				
				if (tz == ("MT")) {
					tz_text = "Mountain Time";
				}
					else if (tz == ("ET")) {
						tz_text = "Eastern Time";
					}
						else if (tz == ("CT")) {
							tz_text = "Central Time";
						}
							else if (tz == ("PT")) {
								tz_text = "Pacific Time";
							}
								else {
									tz_text = "Eastern Time";
								}
