function fillPostCard() {
	document.getElementById("postcard_name_from").innerHTML = document.getElementById("name_from").value;
	document.getElementById("postcard_comm").innerHTML = document.getElementById("comm").value;
	document.getElementById("postcard_email_from").innerHTML = document.getElementById("email_from").value;
	document.getElementById("postcard_email_from").href = "mailto:" + document.getElementById("email_from").value;
	if (document.getElementById("recipient_name") != null) {
		if (document.getElementById("recipient_id") != null) {
			document.getElementById("recipient_name").innerHTML = document.getElementById("recipient_id").options[document.getElementById("recipient_id").selectedIndex].text;
		}
		else {
				document.getElementById("recipient_name").innerHTML = document.getElementById("recipient_by_id").innerHTML;
		}
	}
	var img_postcard = document.getElementById("postcard_image");
	var radio = document.getElementsByName("postcard_id");
	for (var i = 0; i < radio.length; i++) {
		if (radio[i].checked) {
			//ShowMessage(radio[i].value);
			img_postcard.src = "/files/images/blago.ru_postcard_" + radio[i].value + "_small.gif";
		}
	}
} 
function getRadioCheckedValue(radio_name) {
	var oRadio = document.getElementsByName(radio_name);
	for(var i = 0; i < oRadio.length; i++) { 
		if(oRadio[i].checked) {
			return oRadio[i].value;
		}
	}
	return "";
}
function chGiftForYouDonate(form) {
	if (form.postcard_code.value == "") {
		form.postcard_code.focus();
		ShowMessage("Введите код открытки");
		return false;
	}
	if (getRadioCheckedValue("recipient_id") == "") {
		ShowMessage("Выберите благополучателя");
		return false;
	}
	return true;
}
function chRequestForm() {
	var form = document.getElementById("request_form");
	var els = form.elements;
	for (i = 0; i < els.length; i++) {
		if (els[i].value == "") {
			els[i].focus();
			ShowMessage("Заполните, пожалуйста, все поля формы");
			return false;
		}
	}
	return true;
}
function chGiftForYou(form) {
	if (!chPostcard(form, true)) {
		return false;
	}
	if (form.recipient_id.value == 0) {
		form.recipient_id.focus();
		ShowMessage("Выберите благополучателя");
		return false;
	}
	if (!ProcessDonate(true)) {
		return false;
	}
	return true;
}
function CheckTextBoxIsNotEmail(el, msg) {
	var re = new RegExp("^[A-Za-z0-9\.-_]+\@[A-Za-z0-9\._-]+\.[A-Za-z]{2,4}$");
	if (!re.test(el.value)) {
		el.focus();
		ShowMessage(msg);
		return true;
	}
	return false;
}
function CheckTextBoxIsEmpty(el, msg) {
	if (el.value == "") {
		el.focus();
		ShowMessage(msg);
		return true;
	}
	return false;
}
function chPostcard(form, flDontCheckRecipient) {
	if (CheckTextBoxIsEmpty(form.name_from, "Введите Ваше имя")) { return false; }
	if (CheckTextBoxIsEmpty(form.email_from, "Введите Ваш E-mail")) { return false; }
	if (CheckTextBoxIsNotEmail(form.email_from, "Введите Ваш E-mail в формате: email@domain.ru")) { return false; }
	if (flDontCheckRecipient != true) {
		if (form.recipient_id.value == 0) {
			form.recipient_id.focus();
			ShowMessage("Выберите благополучателя");
			return false;
		}
	}
	var recipient_names = document.getElementsByName("name_to");
	var recipient_emails = document.getElementsByName("email_to");
	
	if (CheckTextBoxIsEmpty(recipient_names[0], "Введите имя получателя")) { return false; }
	if (CheckTextBoxIsEmpty(recipient_emails[0], "Введите E-mail получателя")) { return false; }
	if (CheckTextBoxIsNotEmail(recipient_emails[0], "Введите Ваш E-mail в формате: email@domain.ru")) { return false; }

	for (var i = 1; i < recipient_names.length; i++) {
		if (recipient_names[i].value != "" || recipient_emails[i].value != "") {
			if (CheckTextBoxIsEmpty(recipient_names[i], "Введите имя получателя")) { return false; }
			if (CheckTextBoxIsEmpty(recipient_emails[i], "Введите E-mail получателя")) { return false; }
			if (CheckTextBoxIsNotEmail(recipient_emails[i], "Введите Ваш E-mail в формате: email@domain.ru")) { return false; }
		}
	}
	if (CheckTextBoxIsEmpty(form.comm, "Введите сообщение получателю")) { return false; }
	return true;
}
function chFB(form) {
	if (form.comm.value == '') {
		form.comm.focus();
		ShowMessage("Оставьте комментарий");
		return false;
	}
	return true;
}
function chReceipt(form) {
	if (form.lname.value == '') {
		form.lname.focus();
		ShowMessage("Введите фамилию");
		return false;
	}
	if (form.fname.value == '') {
		form.fname.focus();
		ShowMessage("Введите имя");
		return false;
	}
	if (form.mname.value == '') {
		form.mname.focus();
		ShowMessage("Введите отчество");
		return false;
	}
	if (form.address.value == '') {
		form.address.focus();
		ShowMessage("Введите адрес");
		return false;
	}
	if (form.recipient_id.value == '') {
		form.recipient_id.focus();
		ShowMessage("Выберите благополучателя");
		return false;
	}
	if (form.sum.value == '' || form.sum.value == '0') {
		form.sum.focus();
		ShowMessage("Укажите сумму пожертвования");
		return false;
	}
	if (!isSum(form.sum.value)) {
		form.sum.focus();
		ShowMessage("Укажете сумму пожертвования в формате: ####.##");
		return false;
	}
	return true;
}

function isSum (sum) {
	var flag;
	var a = "0|1|2|3|4|5|6|7|8|9|.";
	a = a.split("|");
	for (var i = 0; i < sum.length; i++) {
		flag = false;
		for (var j = 0; j < a.length; j++) {
			if (a[j] == sum.substr(i, 1)) { 
				flag = true; 
				if (a[j] == ".") {
					a[j] = "";
					if (i + 3 != sum.length) { return false; }
				}
			}
			
		}
		if (!flag) { return false; }
	}
	return true;	
}

function moveDn() {
	if (document.all.moving.style.pixelTop + document.all.moving.style.pixelHeight > document.all.main.style.pixelHeight) {
			document.all.moving.style.pixelTop = document.all.main.style.pixelHeight - document.all.moving.style.pixelHeight;
			return true;
	} else {
			document.all.moving.style.pixelTop += 1;	
			bottom_tm=setTimeout("moveDn()",10);
	}
}
	function moveUp() {
	if (document.all.moving.style.pixelTop < 0) {
			document.all.moving.style.pixelTop = 0;
			return true;
	} else {
			document.all.moving.style.pixelTop -= 1;	
			bottom_tm=setTimeout("moveUp()", 10);
	}		
}
	function stop(){
			clearTimeout(bottom_tm);
	}
	
	function stop2(){
			clearTimeout(bottom2_tm);
	}
	
	function moveDnText() {
	if (document.all.test.style.pixelTop < document.all.main.style.pixelHeight) {
			document.all.moving2.style.pixelTop = 0;
			bottom2_tm=clearTimeout;
	} else {
			if (document.all.moving2.style.pixelTop < document.all.test.style.pixelTop*(-1) + document.all.main.style.pixelHeight) {
					document.all.moving2.style.pixelTop = document.all.test.style.pixelTop*(-1) + document.all.main.style.pixelHeight;
					return true;
			} else {
					document.all.moving2.style.pixelTop += (document.all.test.style.pixelTop / document.all.main.style.pixelHeight)*(-1);
					bottom2_tm=setTimeout("moveDnText()",10);
	}
	}
}

	function moveUpText() {
	if (document.all.moving2.style.pixelTop > document.all.test.style.pixelTop / document.all.test.style.pixelTop - 1) {
			document.all.moving2.style.pixelTop = 0;
			return true;
	} else {
			document.all.moving2.style.pixelTop -= (document.all.test.style.pixelTop / (document.all.main.style.pixelHeight + 50))*(-1);
			bottom2_tm=setTimeout("moveUpText()",10);
	}
}

function moveDn1() {
	if (document.all.moving3.style.pixelTop + document.all.moving3.style.pixelHeight > document.all.main3.style.pixelHeight) {
			document.all.moving3.style.pixelTop = document.all.main3.style.pixelHeight - document.all.moving3.style.pixelHeight;
			return true;
	} else {
			document.all.moving3.style.pixelTop += 1;	
			bottom_tm3=setTimeout("moveDn1()",10);
	}
}
	function moveUp1() {
	if (document.all.moving3.style.pixelTop < 0) {
			document.all.moving3.style.pixelTop = 0;
			return true;
	} else {
			document.all.moving3.style.pixelTop -= 1;	
			bottom_tm3=setTimeout("moveUp1()", 10);
	}		
}
	function stop3(){
			clearTimeout(bottom_tm3);
	}
	
	function stop4(){
			clearTimeout(bottom_tm4);
	}
	
	function moveDnText1() {
	if (document.all.test2.style.pixelTop < document.all.main3.style.pixelHeight) {
			document.all.moving4.style.pixelTop = 0;
			bottom_tm4=clearTimeout;
	} else {
			if (document.all.moving4.style.pixelTop < document.all.test2.style.pixelTop*(-1) + document.all.main.style.pixelHeight) {
					document.all.moving4.style.pixelTop = document.all.test2.style.pixelTop*(-1) + document.all.main.style.pixelHeight;
					return true;
			} else {
					document.all.moving4.style.pixelTop += (document.all.test2.style.pixelTop / document.all.main.style.pixelHeight)*(-1);
					bottom_tm4=setTimeout("moveDnText1()",10);
	}
	}
}

	function moveUpText1() {
	if (document.all.moving4.style.pixelTop > document.all.test2.style.pixelTop / document.all.test2.style.pixelTop - 1) {
			document.all.moving4.style.pixelTop = 0;
			return true;
	} else {
			document.all.moving4.style.pixelTop -= (document.all.test2.style.pixelTop / (document.all.main.style.pixelHeight + 50))*(-1);
			bottom_tm4=setTimeout("moveUpText1()",10);
	}
}

var timers = new Object();

function setVisible(menuID, visibility)
{
    var menuItem = document.getElementById(menuID);
    if (visibility)
    {
        var currObj = document.getElementById(visibility);
        menuItem.style.top = currObj.offsetTop + 166;
        menuItem.style.visibility = "visible";
        return;
    }
    menuItem.style.visibility = "";
}

function showMenu(menuID, tdid)
{
    setVisible(menuID, tdid);
}

function hideMenu(menuID)
{
    timers[menuID] = setTimeout("setVisible('" + menuID + "', false)", 80);
}

function menuItemOver(obj)
{
    clearTimeout(timers[obj.id]);
}

function menuItemOut(obj)
{
    hideMenu(obj.id);
}

function change(divid, menuid, inputname, val, el){
    a = document.getElementById(divid);
    a.innerHTML = el.value;
    document.getElementById(inputname).value = val;
    hideMenu(menuid);
}

function sbmt()
{
    document.getElementById("searchf").submit();
}
var req;
function processReqChange() {
	if (req.readyState == 4) {
		var div_body = document.getElementById("div_body");
		//ShowMessage(req.responseText);
		div_body.innerHTML = req.responseText;
		if (document.getElementById("headup") != null) {
			document.getElementById("headup").innerHTML = "";
		}
		if (document.getElementById("headdown") != null) {
			document.getElementById("headdown").innerHTML = "";
		}
	}
}
function GetXML(path) {
	try {	
		if (window.XMLHttpRequest) { 
			req = new XMLHttpRequest(); 
			req.onreadystatechange = processReqChange; 
			req.open("GET", path, true); 
			req.send(null); 
			return true;
		} else if (window.ActiveXObject) {
			var oHttp = new ActiveXObject("MSXML2.XMLHTTP"); 
			oHttp.open("GET", path, false);
			oHttp.send();
			var div_body = document.getElementById("div_body");
			div_body.innerHTML = oHttp.responseText;
			if (document.getElementById("headup") != null) {
				document.getElementById("headup").innerHTML = "";
			}
			if (document.getElementById("headdown") != null) {
				document.getElementById("headdown").innerHTML = "";
			}
			return true;
		}
	}
	catch (e) {
		return false;
	}
}
function GetRecipient(item) {
	var res;
	res = GetXML("/cgi-bin/recipients.cgi?item=" + item);
	if (res) {
		var div_title = document.getElementById("sticker_body_text_in");
		div_title.innerHTML = "Хотите помочь?";
	}
	return res;
}
function GetOrg(item) {
	var res;
	res = GetXML("/cgi-bin/donors.cgi?item=" + item);
	if (res) {	
		//var div_title = document.getElementById("sticker_body_text_in");
		//ShowMessage(div_title.innerHTML);
		//div_title.innerHTML = "Организации";
	}	
	return res;
}
function showDescr (index)
{
	var index = document.getElementById("recipient_id").selectedIndex;

	var from = document.getElementById ('descr-' + (index + 1))
	var to = document.getElementById ('descr')
	if (from && to) to.innerHTML = from.innerHTML
}
function DisplayObject (id) {
	var o = document.getElementById(id);
	if (o == null) { return; }
	o.style.display = "block";
	o.style.visibility = "visible";
} 
function HideObject (id) {
	var o = document.getElementById(id);
	if (o == null) { return; }
	o.style.display = "none";
	o.style.visibility = "hidden";
} 
function SwitchEnabledByCheckbox(ch, id) {
	var o = document.getElementById(id);
	if (ch.checked) {
		o.disabled = false;
	}
	else {
		o.disabled = true;
	}
}
function ProcessDonate(flDontChangeLocation) {
	var chAssent = document.getElementById("assent");
	var recipientId = document.getElementById("recipient_id").value;
	var action = 0;
	if (document.getElementById("action") != null) {
		action = document.getElementById("action").value;
	}
	var re = /\s+/g;
	var postcard_code = "";
	if (document.getElementById("postcard_code") != null) {
		postcard_code = document.getElementById("postcard_code").value.replace(re, "");
		if (postcard_code.length == 30) {
			action = 2;
		}
		else {
			postcard_code = "";
		}
	}
	if (document.getElementById("donate_bank").checked == false && document.getElementById("donate_card").checked == false) {
		ShowMessage("Выберите способ совершения пожертвования.");
		return false;
	}
	if (!chAssent.checked) {
		ShowMessage("Для совершения пожертвования необходимо согласие с условиями соглашения.");
		return false;
	}
	if (document.getElementById("donate_bank").checked) {
		var chooseBank = document.getElementById("choose_bank");
		var chooseBankValue = chooseBank.options[chooseBank.selectedIndex].value;
		if (chooseBankValue == "") {
			ShowMessage("Выберите банк.");
			return false;
		}
		if (recipientId != "") {
			chooseBankValue += recipientId + "/";
		}
		if (flDontChangeLocation != true) {
			eraseCookie("postcard");
			location = chooseBankValue + "?postcard_code=" + postcard_code;
		}
		return true;
	}
	var report_email = "";
	if (document.getElementById("report").checked) {
		var re = new RegExp(/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i);
		if (!re.test(document.getElementById("report_email").value)) {
			ShowMessage("Введите E-mail в формате: email@domain.ru");
			document.getElementById("report_email").focus();
			return false;
		}
		else {
			report_email = document.getElementById("report_email").value;
		}
		
	}
	if (document.getElementById("donate_card").checked) {
		if (flDontChangeLocation != true) {
			eraseCookie("postcard");
			location = "https://www.donatenow.ru/chronopay/" + recipientId + "/?report_email=" + report_email.replace("@", "%40") + "&action=" + action + "&postcard_code=" + postcard_code;
		}
		return true;
	}
}
function ProcessDonatePomogimne() {
	var chAssent = document.getElementById("assent");
	var recipientId = document.getElementById("recipient_id").value;
	if (document.getElementById("donate_sms").checked == false && document.getElementById("donate_card").checked == false) {
		ShowMessage("Выберите способ совершения пожертвования.");
		return;
	}
	if (!chAssent.checked) {
		ShowMessage("Для совершения пожертвования необходимо согласие с условиями соглашения.");
		return;
	}
	if (document.getElementById("donate_sms").checked) {
		return;
	}
	var report_email = "";
	if (document.getElementById("report").checked) {
		var re = new RegExp(/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i);
		if (!re.test(document.getElementById("report_email").value)) {
			ShowMessage("Введите E-mail в формате: email@domain.ru");
			document.getElementById("report_email").focus();
			return;
		}
		else {
			report_email = document.getElementById("report_email").value;
		}
		
	}
	if (document.getElementById("donate_card").checked) {
		var chooseSong = document.getElementById("choose_song");
		var chooseSongValue = chooseSong.options[chooseSong.selectedIndex].value;
		if (chooseSongValue == "") {
			ShowMessage("Выберите песню, которую вы хотите получить.");
			return;
		}
		location = "https://www.donatenow.ru/chronopay/" + recipientId + "/?action=1&report_email=" + report_email.replace("@", "%40") + "&song=" + chooseSongValue;
		return;
	}
}
function OpenPrint() {
	window.open("/files/request_form.html", "_blank"); 
}

function chSubscribe(form) {
	if (form.email.value == '') {
		form.email.focus();
		ShowMessage("Введите E-mail");
		return false;
	}
	var re = new RegExp(/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i);
	if (!re.test(form.email.value)) {
		form.email.focus();
		ShowMessage("Введите E-mail в формате: email@domain.ru");
		return false;
	}
	var theme = 0;
	for (var i = 0; i < form.types.length; i++) {
		if (form.types[i].checked) {
			theme = 1;
		}
	}
	if (theme == 0) {
		ShowMessage("Выберите интересующие Вас темы подписки.");
		return false;
	}
	return true;
}
function goTo(element) {
	try {
		var target = element.getElementsByTagName("A")[0].target;
		var link = element.getElementsByTagName("A")[0].href;
		if (target.length > 0) {
			window.open(link, target);
		}
		else {
			window.location.href = link;
		}
	}
	catch(e) {
		ShowMessage("Ссылка не определена");
	}
}
var prev_pageID = "";
var i = 0;
var objectRef = new Object();
function ShowMenu(pageID) {
	var div = document.getElementById("menu_" + pageID);
	if (pageID != prev_pageID && objectRef[prev_pageID] == 0 && prev_pageID != '') {
		CloseDiv(prev_pageID);
	}
	div.style.display = "block";
	div.style.visibility = "visible";
	prev_pageID = pageID;
	SetFlag(pageID);
}
function ClearFlag(menu_id) {
	objectRef[menu_id] = 0;
}
function SetFlag(menu_id) {
	objectRef[menu_id] = 1;
}
function SetTimer(menu_id) {
	i++;
	objectRef[menu_id + "_timer"] = i;
	window.setTimeout("CloseMenuById('" + menu_id + "', '" + i + "')", 1000);
}
function CloseMenuById(menu_id, ii) {
	if (objectRef[menu_id] == 0 && objectRef[menu_id + "_timer"] == ii) {
		CloseDiv(menu_id);
	}
}
function CloseDiv (div_id) {
	var div = document.getElementById("menu_" + div_id);
	div.style.display = "none";
	var divs = div.getElementsByTagName("TABLE");
	for (var i = 0; i < divs.length; i++) {
		divs[i].style.display = "none";
		divs[i].style.visibility = "hidden";
	}
}
function ToggleRow(el, id) {
	var d = document.getElementById(id);
	if (d == null) { return; }
	if (d.style.display == "block" || d.style.display == "table-row") {
		el.innerHTML = "показать";
		d.style.display = "none";
	}
	else {
		el.innerHTML = "скрыть";
		if (navigator.appName == "Microsoft Internet Explorer") {
			d.style.display = "block";
		}
		else {
			d.style.display = "table-row";
		}
	}
}
function filterList() {
	var how = document.getElementById("hows").value;
	var type = document.getElementById("types").value;
	var list = document.getElementById("filter_list").getElementsByTagName("DIV");
	//ShowMessage(how + " " + type + " " + list.length);
	var items = 0;
	for (var i = 0; i < list.length; i++) {
		var fl = 1;
		var s = list[i].id.split("#");
		if (s.length == 3) {
			if (how != "0" && s[1] != ",all," && s[1].indexOf("," + how + ",") == -1) {
				fl = 0;
			}
			if (type != "0" && s[2] != ",all," && s[2].indexOf("," + type + ",") == -1) {
				fl = 0;
			}
			if (fl) {
				list[i].style.display = "block";
				list[i].style.visibility = "visible";
				items++;
			}
			else {
				list[i].style.display = "none";
				list[i].style.visibility = "hidden";
			}
		}
		//ShowMessage (list[i].id);
	}
	if (items) {
		HideObject("filter_error");
	}
	else {
		DisplayObject("filter_error");
	}
}
var wObj = null;
var op = 0;
function ShowDiv (id) {
	var el = document.getElementById(id);
	if (el.style.visibility != "visible" || el.style.display != "block") {
		el.style.visibility = "visible";
		el.style.display = "block";
		wObj = el;
		appear();
	}
}
function HideDiv (id) {
	var el = document.getElementById(id);
	if (el.style.visibility != "hidden" || el.style.display != "none") {
		el.style.visibility="hidden";
		el.style.display="none";
	}
}
function appear() {	
	if (wObj == null) { return; }
	if(op < 1) {
		op += 0.1;
		wObj.style.opacity = op;
		wObj.style.filter='alpha(opacity='+op*100+')';
		t = setTimeout('appear()', 30);
	}
	else {
		op = 0;
		wObj = null;
	}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * *
// message
// * * * * * * * * * * * * * * * * * * * * * * * * * *
function ShowMessage (str, sec) {
	if (isNaN(sec)) 
		sec = 10;
	ShowStatus(str, false);
	setTimeout("HideMessage()", sec*1000);
}
function HideMessage() {
	var d = document.getElementById("div_show_status");
	if (d != null) {
		d.style.display = "none";
	}
	if (showStatusTimeoutID != null) {
		window.clearTimeout(showStatusTimeoutID);
	}
	if (playStatusTimeoutID != null) {
		window.clearTimeout(playStatusTimeoutID);
	}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * *
// status
// * * * * * * * * * * * * * * * * * * * * * * * * * *
var showStatusTimeoutID;
var playStatusTimeoutID;
function ShowStatus (str, play) {
	var d = document.getElementById("div_show_status");
	if (d == null) {
		d = window.document.createElement("DIV");
	}
	d.style.display = "none";
    d.style.top = document.body.scrollTop + document.body.clientHeight / 2 - 100 / 2;
    d.style.left = document.body.scrollLeft + document.body.clientWidth / 2 - 600 / 2;
	d.id = "div_show_status";
	var ihtml = "<div class=message_text>" + str + "</div>";
	d.innerHTML = ihtml;
	d.className = "show_status";
	window.document.body.appendChild(d);
	if (play != false) {
		var valid = true;
		try {
			valid = Page_ClientValidate();
		}
		catch(e) {
		}
		if (valid) {
			showStatusTimeoutID = setTimeout("DisplayDivShowStatus()",1500); // таймаут до показа статуса
			playStatusTimeoutID = setTimeout("playDivShowStatus()",4500);
		}
	}
	else {
		if (d.addEventListener)
			d.addEventListener('click', HideMessage, false);
		else
			d.attachEvent('onclick', HideMessage);
		DisplayDivShowStatus();
		wObj = d;
		appear();
	}
}
function DisplayDivShowStatus() {
	var d = document.getElementById("div_show_status");
	d.style.display = "block";
}
function ShowStatusBackBorder() {
	var d = document.getElementById("div_show_status");
	d.style.borderColor = "#000000";
	d.style.borderWidth = "1px";
}
var playCount = 0;

function playDivShowStatus() {
	var d = document.getElementById("div_show_status");
	
    d.style.top = document.body.scrollTop + document.body.clientHeight / 2 - 100 / 2 + (Math.random() - 0.5) * 5;
    d.style.left = document.body.scrollLeft + document.body.clientWidth / 2 - 200 / 2 + (Math.random() - 0.5) * 5;
    if (playCount < 30) {
		playCount++;
		playStatusTimeoutID = setTimeout("playDivShowStatus()",40);
    } else {
		playCount = 0;
		playStatusTimeoutID = setTimeout("playDivShowStatus()",6000);
    }
}
/* action 2 */
function createCookie(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 readCookie(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 null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}
/* action 2 */
