/*
 * Libraries of the global client functions.
 */

/* 
 * Function to set cookie
 */
function Set_Cookie(name,value,expires,path,domain,secure) {
	document.cookie = name + "=" +escape(value) +
		( (expires) ? ";expires=" + expires.toGMTString() : "") +
		( (path) ? ";path=" + path : "") + 
		( (domain) ? ";domain=" + domain : "") +
		( (secure) ? ";secure" : "");
}

/* 
 * Function to read cookie
 */
function Get_Cookie(name) {
	var start = document.cookie.indexOf(name+"=");
	var len = start+name.length+1;
	if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
	if (start == -1) return null;    var end = document.cookie.indexOf(";",len);
	if (end == -1) end = document.cookie.length;
	return unescape(document.cookie.substring(len,end));
}

Set_Cookie('MasterCookie','MasterCookie');

// Check cookies
if (!Get_Cookie('MasterCookie'))
{
	alert("Dear User! Cookies must be activated in your browser.");
}

var alertdisplay = true;
var isError = false;

function clickSignup (email) {
	var url = "signup.aspx";
	if (email != null)
		url += "?emailadd=" + escape(email);
	self.location = url;
}


