
function areaShow(truthVal) {
	var date = 30 ;
	var cookieName = 'homeHideContent'; 
	if (truthVal) {  eraseIt(cookieName);	
	} else {  Cookies.create(cookieName, true, date);
 	}
	
	
	upDateThePage() ;
}

function clickCheck() {
alert('click');

}

function upDateThePage() {
	if (Cookies['homeHideContent']) {
		var infoDisplay = 'none';
		var theString = '<a href="javascript:areaShow(true)">show introduction</a>' ;
		
	} else {
		var infoDisplay = 'block';
		var theString = '<a href="javascript:areaShow(false)">hide introduction</a>' ;
	}
	contentbodymaterial.style.display = infoDisplay ;
	theInfoReveal.innerHTML = theString ;		
}



function dateTodayAsStr() {
	var MONTH_NAMES=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
	var today = new Date();
	var month = MONTH_NAMES[today.getMonth()];
	var day = today.getDate();
	var year = today.getFullYear();
	var s = "  ";
	var dateStr = day + s + month + s + year;
	return dateStr;
}

/*
function saveIt(cname) {
	var inputname = cname ;
	var inputbox = document.forms['cookieform'].inputname;
	alert(inputbox);
	var x = inputbox.value;
	if (!x)
		alert('Please fill in a value in the input box.');
	else {
		Cookies.create(cname,x,7);
		alert('Cookie created');
	}
}
*/

function readIt(name) {
	alert('The value of the cookie is ' + Cookies[name]);
}

function eraseIt(name) {
	Cookies.erase(name);
	/* alert('Cookie erased'); */
}

var Cookies = {
	init: function () {
		var allCookies = document.cookie.split('; ');
		for (var i=0;i<allCookies.length;i++) {
			var cookiePair = allCookies[i].split('=');
			this[cookiePair[0]] = cookiePair[1];
		}
	},
	create: function (name,value,days) {
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
		this[name] = value;
	},
	erase: function (name) {
		this.create(name,'',-1);
		this[name] = undefined;
	}
};

Cookies.init();




