﻿function printPage() 
{
    var i, a, main;
    for(i=0; (a = document.getElementsByTagName("link")[i]); i++) 
    {
        if(a.getAttribute("rel").indexOf("stylesheet") != -1) 
            if(i>1)
                a.disabled = true;
            
        if(i==1)
            a.setAttribute("href", '/Include/Print.css');
   }
	this.focus();
	this.print();
}

function InlogFormCheck()
{
	if(document.form.username.value=='' || document.form.password.value=='')
	{
		alert('Vul beide velden in!');
		return false;
	}
}
		
function showHideReacties(p_strId)
{
    var reactieBlok = document.getElementById('Reacties'+p_strId);
    var reactieLink = document.getElementById('ShowHideReacties'+p_strId);
    
    if (reactieBlok.style.display == 'block')
    {
        reactieBlok.style.display = 'none';
        reactieLink.innerText = 'Reacties kijken/plaatsen';
    }
    else
    {
        reactieBlok.style.display = 'block';
        reactieLink.innerText = 'Reacties verbergen';
    }
}

function checkReactie(p_strId)
{
    if (document.getElementById('naam_'+p_strId).value == ''){
        window.alert('naam is verplicht');
        document.getElementById('naam_'+p_strId).focus;
    }else{
        eval('document.PageTool'+p_strId+'.submit()');
    }
}
