

function sub(sb)
{
	sb=2;return sb;
}

function laatzien (rowId) 
{
	if (window.opera)document.getElementById(rowId).style.visibility = 'visible';
	else if (document.all)document.all[rowId].style.display = '';
	else if (document.getElementById)document.getElementById(rowId).style.display = '';
}

function verberg (rowId)
{
	if (window.opera)document.getElementById(rowId).style.visibility = 'hidden';
	else if (document.all)document.all[rowId].style.display = 'none';
	else if (document.getElementById)document.getElementById(rowId).style.display = 'none';
}


function selectverberg (rowId)
{
	if (document.even.frequentie.value == rowId) 
	{
	if (window.opera)document.getElementById(rowId).style.visibility = 'visible';
	else if (document.all)document.all[rowId].style.display = '';
	else if (document.getElementById)document.getElementById(rowId).style.display = '';
	}else{
	if (window.opera)document.getElementById(rowId).style.visibility = 'hidden';
	else if (document.all)document.all[rowId].style.display = 'none';
	else if (document.getElementById)document.getElementById(rowId).style.display = 'none';
	}
}


function venst(a,b,c)
{
	cnf='toolbar=no,location=no,directories=no,status=no,menubar=no,width=' + b + ',height=' + c + ',scrollbars=no,resizable=no,left=50,top=50';
	mywin = window.open(a,'nieuw_venster',cnf);
}

function textCounter(field,cntfield,maxlimit) 
{
	// if too long...trim it!
	if (field.value.length > maxlimit)
	{
	field.value = field.value.substring(0, maxlimit);
	// otherwise, update 'characters left' counter
	}else{
	cntfield.value = 0 + field.value.length;
	}
}


function wissen()
{
	return (window.confirm("Weet u echt zeker dat u deze gegevens wilt verwijderen?"))
}

function blok()
{
	return (window.confirm("Weet u echt zeker dat u deze gebruiker wilt Blokkeren/Activeren?"))
}


function openCentered (url, width, height, windowName, featureString) {
  if (!windowName)
    windowName = '';
  if (!featureString)
    featureString = '';
  else
    featureString = ',' + featureString;
  var x = Math.round((screen.availWidth - width) / 2);
  var y = Math.round((screen.availHeight - height) / 2);
  featureString = 'left=' + x + ',top=' + y + ',width=' + width
+ ',height=' + height + featureString;
  return open (url, windowName, featureString);
}

function lokatie(pt,vv,adr) {
openCentered('/shared/lokatiekaart/loka_logo.php?pc='+ pt + '&vvv=' + escape(vv) + '&adres=' + escape(adr) , 700, 500, 'pop', 'toolbar=no,location=no,directories=no,status=no,menubar=no,width=700,height=500,scrollbars=no,resizable=no');
}

function poprss(){
openCentered('/rss', 800, 550, 'poprss', 'toolbar=no,location=no,directories=no,status=no,menubar=no,width=800,height=550,scrollbars=yes,resizable=yes');
}