function checkForInt(evt) 
{
	evt = ( evt ) ? evt : window.event;
	var charCode = ( evt.which ) ? evt.which : evt.keyCode
	return (charCode <= 31 || (charCode >= 48 && charCode <= 57))
}

function buOv(id)
{
	document.getElementById("bu" + id).style.color = '#004B8D';
}

function buOut(id)
{
	document.getElementById("bu" + id).style.color = '#ffffff';
}


function bu2Ov(id)
{
	//alert(document.getElementById('menu' + id).style.display);
	$("#menu" + id).show();
}

function bu2Out(id)
{
	$("#menu" + id).hide();
}

function bu2OutFunc(id)
{
	document.getElementById('menu' + id).style.display = 'none';
}

function clearDefault(id)
{
	if(id.defaultValue == id.value)
	{
		$(id).addClass('inputCustomValue');
		$(id).removeClass('inputDefaultValue');
		id.value = "";
	}
}

function setDefault(id)
{
	if(id.value == "")
	{
		$(id).removeClass('inputCustomValue');
		$(id).addClass('inputDefaultValue');
		id.value = id.defaultValue;
	}
}

function goKleur(imgUrl)
{
	document.getElementById('prodImg').style.backgroundImage = 'url(' + imgUrl +')';
}

function openLightbox()
{
	document.getElementById('light').style.display='table-cell';
	document.getElementById('fade').style.display='block';
}

function closeLightbox()
{
	document.getElementById('light').style.display = 'none';
	document.getElementById('fade').style.display = 'none';
}

function wijzigAantal(form, val)
{
	if(val > 0)
	{
		document.getElementById("form" + form).submit();
	}
	else
	{
		document.getElementById('aantalBox' + form).style.display='table-cell';
		document.getElementById('newNum' + form).focus();
	}
}

function addVal(form, val) 
{
    var select = document.getElementById("aantal" + form);
	select.options[select.options.length] = new Option(val, val);
}

function anderAdres()
{
	if(document.getElementById('canderadres0').checked == true)
	{
		$('#anderadresDiv').slideUp("slide");
	}
	else
	{
		$('#anderadresDiv').slideDown("slide");
	}
}

function vatNumber1()
{
	if(document.getElementById('ccountryId').value == "17")
	{
		$('#vatnumberDiv').slideDown("slide");
	}
	else
	{
		$('#vatnumberDiv').slideUp("slide");
	}
}


/*
$(document).ready(function(){
	$("#formMailinglist").validate({
		highlight: function(element, errorClass) {
		     $(element).addClass('f1Error');
		},
		unhighlight: function(element, errorClass) {
		     $(element).removeClass('f1Error');
		}
});

});
*/

