function OpenMenu(MenuID) { MenuID.style.visibility='visible'; };

function CloseMenu(MenuID) { MenuID.style.visibility = 'hidden';};

function LData(cmb) {
	www = cmb.name;
	adress = window.location.href;
	adress = adress+'&';
	re = RegExp(www+"=(.*)&");
	adress = adress.replace(re, '');
	adress = adress+"&";
	adress = adress.replace("?&", '?');
	adress = adress.replace("&&", "&");
	adress = adress+www+"="+cmb.value;
	window.location = adress;
}

var CheckValue=0;
var RadioValue=0;

function pr_che(N,id) {
	iid=document.getElementById(id);
	CheckValue = CheckValue & (~ N);
	if (iid.checked) CheckValue = CheckValue | N;
	ddi=document.getElementById('opt'); 
	ddi.value = CheckValue;
}

function pr_rad(N,id) {
	iid=document.getElementById(id);
	RadioValue = RadioValue & (~ N);
	if (iid.checked) RadioValue = RadioValue | N;
	ddi=document.getElementById('rad');
	ddi.value = RadioValue;
}

function setCookie(cookieName, cookieContent, cookieExpireTime){
    if(cookieExpireTime>0){
        var expDate=new Date();
        expDate.setTime(expDate.getTime()+cookieExpireTime*1000);
        var expires=expDate.toGMTString();
        document.cookie=cookieName+"="+escape(cookieContent)+"; path="+escape('/')+"; expires="+expires;
    }else{
        document.cookie=cookieName+"="+escape(cookieContent)+"; path="+escape('/')+"";
    }
}



function getCookie(name) {
	var cookie = " " + document.cookie;
	var search = " " + name + "=";
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(";", offset)
			if (end == -1) {
				end = cookie.length;
			}
			setStr = unescape(cookie.substring(offset, end));
		}
	}
	return(setStr);
}
