// MustLive's JavaScript functions
function Redirect(value) {
	var option = ReadOptions();
	if (option == 1 && document.location != "http://websecurity.com.ua/" && document.location != "http://www.websecurity.com.ua/" && String(document.location).indexOf("google.com/translate?") == -1) {
		document.location = value;
	}
}
function Options() {
	var option = ReadOptions();
	if (option == 1) {
		document.getElementById('redirect').checked = true;
	}
}
function ReadOptions() {
	var prefix = "redirect=";
	var StartIndex = document.cookie.indexOf(prefix);
	var EndIndex = document.cookie.indexOf(";",StartIndex+prefix.length);
	if (EndIndex == -1) {
		EndIndex = document.cookie.length;
	}
	return unescape(document.cookie.substring(StartIndex+prefix.length,EndIndex));
}
function SetOptions(value) {
	var date = new Date();
	date.setDate(date.getDate()+3650);
	document.cookie = "redirect="+(value?1:0)+";path=/;expires="+date.toUTCString();
}
function ViewBlock(id) {
	if (document.getElementById(id).style.display) {
		Show(id);
	}
	else {
		Hide(id);
	}
}
function Show(id) {
	document.getElementById(id).style.display = "";
}
function Hide(id) {
	document.getElementById(id).style.display = "none";
}
function Archive() {
	ViewBlock('archive');
	ViewBlock('archive2');
	ViewBlock('archive3');
	ViewBlock('archive4');
}

