function l4_warningMessage(header, text, agree, confirm, yes, no, exitUrl) {
document.write('<div id="warningBackground" style="_position: absolute;_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);filter:alpha(opacity=70);"></div><div id="warningLayout" style="_position: absolute;_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);filter:alpha(opacity=100);"><div id="warningBox"><h1 class="warningHeader">' + header + '</h1><p class="warningText">' + text + '</p><p><input type=checkbox id="warningCheckBox" name="warningCheckBox" \> <a href="#" onclick="document.getElementById(\'warningCheckBox\').checked = !document.getElementById(\'warningCheckBox\').checked; return false;" class="warningAgree">' + agree + '</a></p><p class="warningYesNo"><a href="#" onclick="l4_goInside(\'' + confirm + '\'); return false;" class="warningYes">' + yes + '</a> &nbsp; &nbsp; | &nbsp; &nbsp; <a href="' + exitUrl + '" class="warningNo">' + no + '</a></p></div></div>');
}

function l4_warningMessageIe6(header, text, agree, confirm, yes, no, exitUrl) {
	if(l4_confirm(text + "\n\n" + agree)) {
		l4_setCookie('l4_warningMessage', 1, 1);
		return true;
	} else {
		window.location = exitUrl;
		return;
	}
}

// Really strange - confirm has to return from function to work 0.o
function l4_confirm(text) {
	return confirm(text);
}

function l4_goInside(not_checked) {
	if(document.getElementById('warningCheckBox').checked) {
		l4_setCookie('l4_warningMessage', 1, 1);
		document.getElementById('warningLayout').style.visibility = 'hidden';
		document.getElementById('warningBackground').style.visibility = 'hidden';
	} else alert(not_checked);
}

function l4_setCookie(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=/";

}

function l4_getCookie(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 false;
}
