<!--

// ----------------------------------------------
// StyleSwitcher functions written by Paul Sowden
// http://www.idontsmoke.co.uk/ss/
// - - - - - - - - - - - - - - - - - - - - - - -
// For the details, visit ALA:
// http://www.alistapart.com/stories/alternate/


// POP-WINDOW
// This function is used to spawn the Disclaimer pop-up.
function openBrWindow(theURL,winName,x,y) { 
	  remote = window.open(theURL, winName, 'height=' + x + ',width=' + y + ',top=0,left=0,scrollbars=auto,menubar=no,toolbar=no');
	  if (remote != null) {
	  remote.focus();
	  }
}


function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

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 null;
}

window.onload = function(e) {
  var cookie = readCookie("style");
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);
}

window.onunload = function(e) {
  var title = getActiveStyleSheet();
  createCookie("style", title, 365);
}

var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);

// Membership

function getCookie(Name) {
var search = Name + "="
if (document.cookie.length > 0) { // if there are any cookies
offset = document.cookie.indexOf(search) 
if (offset != -1) { // if cookie exists 
offset += search.length 
// set index of beginning of value
end = document.cookie.indexOf(";", offset) 
// set index of end of cookie value
if (end == -1) 
end = document.cookie.length
return unescape(document.cookie.substring(offset, end))
} 
}
}





// end oF functions



// Div toggle

function toggle( targetId ){
  if (document.getElementById){
  target = document.getElementById( targetId );
  if (target.style.display == "none"){
  target.style.display = "";
  } else {
  target.style.display = "none";
  }
  }
}


function write_date()
{
var thetime=new Date();

var nday=thetime.getDay();
var nmonth=thetime.getMonth();
var ntoday=thetime.getDate();
var nyear=thetime.getYear();
var AorP=" ";

if (nday==0)
  nday="Sunday";
if (nday==1)
  nday="Monday";
if (nday==2)
  nday="Tuesday";
if (nday==3)
  nday="Wednesday";
if (nday==4)
  nday="Thursday";
if (nday==5)
  nday="Friday";
if (nday==6)
  nday="Saturday";


if (nmonth==0)
  nmonth="January";
if (nmonth==1)
  nmonth="Feburary";
if (nmonth==2)
  nmonth="March";
if (nmonth==3)
  nmonth="April";
if (nmonth==4)
  nmonth="May";
if (nmonth==5)
  nmonth="June";
if (nmonth==6)
  nmonth="July";
if (nmonth==7)
  nmonth="August";
if (nmonth==8)
  nmonth="September";
if (nmonth==9)
  nmonth="October";
if (nmonth==10)
  nmonth="November";
if (nmonth==11)
  nmonth="December";



//nmonth+=1;

if (nyear<=99)
  nyear= "19"+nyear;

if ((nyear>99) && (nyear<2000))
 nyear+=1900;

document.write("&nbsp;"+nday+", "+ntoday+"&nbsp;"+nmonth+"&nbsp;"+nyear);

} 




//-->