function link(link) {
	document.location.href = link;
}

function winopen (popupURL,width,height) {
	var popup = window.open(popupURL,"popup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=' + width + ',height=' + height + ',left=300' );
	popup.focus();
	if( navigator.appName.substring(0,8) == "Netscape" ) {
		popup.location = popupURL;
	}
}

function showBlock(blk){
	var agt = navigator.userAgent.toLowerCase();
	var is_bsd   = (agt.indexOf("bsd") != -1);
	var is_x11   = (agt.indexOf("x11") != -1);
	var is_linux = (agt.indexOf("linux") != -1);
	var is_mac   = (agt.indexOf("mac") != -1);
	obj = document.getElementById(blk).style;
	if ( is_bsd || is_x11 || is_linux || is_mac ) {
		obj.top = '20px';
	}
	obj.display = (obj.display != 'block' ? 'block' : 'none');
}

//todo не используется
function ShowHide(elem, icon_elem){
	var s = elem.style;
	s.display = (s.display != 'none') ? 'none': '';
	if(icon_elem) { icon_elem.innerHTML = (s.display != 'none') ? '[+]': '[&ndash;]'; }
}

function rc(A,B){
	var C=A.href;A.href=B;
	setTimeout(function(){A.href=C},500)
}

function setCookie(name, value){
	var expires = new Date();
	expires.setTime(expires.getTime() + (1000*86400));
	document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() +  "; path=/";
}
