<!--

function openLogin() 
{
	window.open('/news_popup.php?act=login','login','scrollbars=no,width=240,height=80,resizable=no,status=no,location=no,toolbar=no');
}

function openCom(id) {
	window.open('/news_popup.php?act=com&id=' + id,'comments','scrollbars=yes,width=400,height=540,resizable=no,status=no,location=no,toolbar=no');
}

function bMod(id,date)
{
	document.location.href='/news.php?b=' + date + '&act=mod&id=' + id;
}

function bDel(id,date)
{
	document.location.href='/news.php?b=' + date + '&act=del&id=' + id;
}


function reloadMe()
{
	if (window.name == "login")
	{
		window.opener.location.href='/news.php'; 
		window.close();
	}
}


function textCounter( field, countfield, maxlimit )
{
	if ( field.value.length > maxlimit )
	{
		field.value = field.value.substring( 0, maxlimit );
		alert( 'Textarea value can only be 255 characters in length.' );
		return false;
	  }
	  else
	  {
		  countfield.value = maxlimit - field.value.length;
	}
}

// -->
