function openContent_item(name, popupwidth, popupheight, id)
{
	var leftstart = (screen.width/2) - (popupwidth/2);
	var topstart = (screen.height/2) - (popupheight/2);
	var properties = "width="+popupwidth+", height="+popupheight+", left="+leftstart+", top="+topstart+", toolbar=no, titlebar=no, title=0, location=no,scrollbars=yes,status=no,resizable=no";
	var id = id;
	var photo = "popup.php?i="+name+"&id="+id;
	window.open(photo,'photo',properties);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function paginalink(theURL,winName) { //v2.0
  window.open(theURL,winName);
}
// tekst box disablen bij een checkbox
function SetState(obj_checkbox, obj_textarea)
    {  if(obj_checkbox.checked)
       { 
	   obj_textarea.disabled = true;
       }
       else
       { 
	   obj_textarea.disabled = false;
       }
    }

function Disab (val)
{
	if(val=="1") 
	{
		post.homepage[0].disabled=false;
		post.homepage[0].checked=false;
		post.homepage[1].disabled=false;
		post.homepage[1].checked=true;
	}
	if(val=="2") 
	{
		post.homepage[0].disabled=true;
		post.homepage[0].checked=false;		
		post.homepage[1].disabled=true;
		post.homepage[1].checked=true;
	}
}
	
function t_to_t_pw(cont,elm)
{
	tVal=elm.value;
	initvalue = document.forms['post'].ww_initvalue.value;
	initvalue_style = document.forms['post'].stye_initvalue.value;
	if (tVal == initvalue)
	{
		tVal_display = '';
	}
	else
	{
		tVal_display = tVal;
	}
	document.getElementById(cont).innerHTML='<input type="password" id="wachtwoord" name="wachtwoord" class="formelement_login_tekst_single" value="'+tVal_display+'" '+initvalue_style+' onblur="t_to_t_txt(\'wwcontainer\',this)" style="width: 181px;">';
	field = document.getElementById('wachtwoord');
	field.focus();
	field.focus();
}
function t_to_t_txt(cont,elm)
{
	tVal=elm.value;
	initvalue = document.forms['post'].ww_initvalue.value;
	initvalue_style = document.forms['post'].stye_initvalue.value;
	if (tVal == '')
	{
		tVal_display = initvalue;
		input_type = 'text'
	}
	else
	{
		tVal_display = tVal;
		input_type = 'password'
	}
	document.getElementById(cont).innerHTML='<input type="'+input_type+'" id="wachtwoord" name="wachtwoord" class="formelement_login_tekst_single" value="'+tVal_display+'" '+initvalue_style+' onfocus="t_to_t_pw(\'wwcontainer\',this)" style="width: 181px;">';
}
