<!--
function camup(url) {
	popupcam=window.open(url, 'pop', 'resizable=yes, scrollbars=no, width=530, height=410');
	popupcam.focus();
}

function setCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*1000));
		var expires = '; expires='+date.toGMTString(); }
		else {
		var expires = ''; }
	document.cookie = name+'='+value+expires+'; path=/';
}

function getCookie(name) {
	var nameEQ = name + '=',
	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 delCookie(name) {
	setCookie(name,'',-1);
}

function countElement(strAttr,strTag,strExp) {
	c=0;
	for(var i=0; i<document.getElementsByTagName(strTag.toUpperCase()).length; ++i) {
		if(String(eval('document.getElementsByTagName(strTag)[i].'+strAttr)).match(new RegExp(strExp))) {
			c++; }
	}
	return c;
}

	window.onload=fornews;

function show(id) {
	d=document;
	o=d.getElementById('cat'+id);
	if (o.style.display == 'inline') {
		d.getElementById('cat'+id).style.display="none";
		delCookie('cat'+id);
	} else {
		d.getElementById('cat'+id).style.display="inline";
		setCookie('cat'+id,'1',5);
	}
}

function fornews() {
	for(n=0;n<countElement('id','div',/^cat\d+\b/);n++) {
		Cookie = getCookie('cat'+n);
		if (Cookie == null) {
			document.getElementById('cat'+n).style.display="none";
		} else {
			show(n); }
	}
}
//-->