function checkfields()
{
var pass=true;
var arguments=checkfields.arguments;
if (arguments.length > 0)
 {
 for (i=0; i<arguments.length; i++)
  {
  if (document.getElementById(arguments[i]).value=="" && pass==true)
   {
   pass=false;
   }
  }
 }
if (pass==false)
 {
 alert("U heeft niet alle velden gevuld!");
 return false;
 }
else
 {
 return true;
 }
}

function checkfields_nld()
{
var pass=true;
var arguments=checkfields_nld.arguments;
if (arguments.length > 0)
 {
 for (i=0; i<arguments.length; i++)
  {
  if (document.getElementById(arguments[i]).value=="" && pass==true)
   {
   pass=false;
   }
  }
 }
if (pass==false)
 {
 alert("U heeft niet alle velden gevuld!");
 return false;
 }
else
 {
 return true;
 }
}

function checkfields_eng()
{
var pass=true;
var arguments=checkfields_eng.arguments;
if (arguments.length > 0)
 {
 for (i=0; i<arguments.length; i++)
  {
  if (document.getElementById(arguments[i]).value=="" && pass==true)
   {
   pass=false;
   }
  }
 }
if (pass==false)
 {
 alert("You didn't fill all the required fields!");
 return false;
 }
else
 {
 return true;
 }
}

function display(id,total)
{
    for (i=1; i<=total; i++)
	{
	  nid="tr"+id+"_"+i;
	  iid="img"+id;
	  if (document.getElementById(nid).style.display=='none')
 	  {
        document.getElementById(nid).style.display = 'block';
		MM_swapImage(iid,'','images/inklappen.gif',1);
	  } 
	  else
 	  {
        document.getElementById(nid).style.display = 'none';
		MM_swapImgRestore();
	  } 
    }
}
function check_length(id,length,txt)
{
if (document.getElementById(id).value.length<=length)
 {
 alert(txt)
 return false
 }
else
 {
 return true
 }
}


/*functie voor de nieuwe award.asp pagina*/
function showhide(id,doimage)
{
	var field = document.getElementById(id)
	if (field.style.display == 'none')
	{
		field.style.display = '';
	}
	else
	{
		field.style.display = 'none';
	}
	if (doimage == 'y') 
	{
		var image = document.getElementById('img_' + id)
		if(image.src == 'http://www.ww2awards.com/images/uitklappen.gif')
		{
			image.src = 'http://www.ww2awards.com/images/inklappen.gif';
		}
		else
		{
			image.src = 'http://www.ww2awards.com/images/uitklappen.gif';
		}
	}
}

function advsearchperson(txt)
{
	if (document.getElementById('personname').value.length > 2 || 
		document.getElementById('paunit').value.length > 2 ||
		document.getElementById('parank').value.length > 2 ||
		document.getElementById('personbirthyear').value.length > 2 ||
		document.getElementById('persondeathyear').value.length > 2)
		{
			return true	;
		}
		else
		{
			alert(txt);
			return false;
		}
}