function getZone() {
	// Get local timezone and set cookie
	var d = new Date();
	var offset = (d.getTimezoneOffset());
	SetCookie('timezone', offset, 30);
}
var ie4 = false;

if(document.all) {
	ie4 = true;
}
getZone();



////////////////////////////////////////////
// time function by Zach Nakaska
function SetCookie(cookieName, cookieValue, nDays) {
	var today = new Date();
	var expire = new Date();
	if (nDays == null || nDays == 0)
		nDays = 1;
	expire.setTime(today.getTime() + 3600000*24*nDays);
	document.cookie = cookieName + "=" + escape(cookieValue) + ";expires=" + expire.toGMTString();
}

function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var start = 0;
	while (start < clen) {
		var len = start + alen;
		if (document.cookie.substring(start, len) == arg) {
			var endstr = document.cookie.indexOf (";", len);
			if (endstr == -1)
				endstr = clen;
			return unescape(document.cookie.substring(len, endstr));
		}
		start = document.cookie.indexOf(" ", start) + 1;
		if (start == 0)
			break;
	}
	return null;
}


function getObject(id) {
	if (ie4) {
		return document.all[id];
	} else {
		return document.getElementById(id);
	}
}

function ToggleBlock(divId) {
var d = getObject(divId);

	if (d != null) 	{
    if (d.style.display != 'none')	
			
																	{
																		Effect.BlindUp(d, {duration:0.3});
																		SetCookie(divId,'none',365);
																	}
		else
																	{	
																		Effect.BlindDown(d, {duration:0.3});
																		SetCookie(divId,'block',365);
		
																	//Effect.BlindUp(d.parentNode[1].ChildNodes[1].nextSibling, {duration:0.4});
																	//	alert(d.parentNode.parentNode.getElementsByTagName('ul'));
																	
																	
																	
																	}
		
	
	}
	

}


function ToggleClass(divId, classA, classB) {
 var c = getObject(divId);
 if (c != null) {
 if (c.className != classA)
 c.className = classA;
 else
 c.className = classB;
 }
 SetCookie(divId,c.className,365);
}
