// JavaScript Document
var  selected = 'home';
function check(email, telefoonnummer, welke)
{
	var mail = false;
	
	if(welke == 1)
	{
		mail = /^(\w+\.)*([\w-]+)@([\w-]+\.)+([a-zA-Z]{2,4})$/.test(email);
	}else
	if(welke == 2)
	{
		pattern = new RegExp ('^[0-9]{0,8}\-[0-9]{0,8}$','');
		match = pattern.test (telefoonnummer);
		if (match)
			mail = true;
	}
	
	return mail;
}

function checkChangeDevelopment(form)
{
	var fouten = "The following error(s) were found:\n\n";
	var fout = false;
	var fckDescription = FCKeditorAPI.GetInstance('FCKdescription');
   /* 
    if(form.Name.value == "")
    {
        fout = true;
        fouten = fouten + "The name is missing\n";
    }
    
    if (form.Id.value == "-1")
    {
        if(form.Image.value == "")
        {
            fout = true;
            fouten = fouten + "The image is missing\n";
        }
    }
    	
	if (fckDescription.GetHTML() == "<br type=\"_moz\" />")
	{
        fout = true;
        fouten = fouten + "The description is missing\n";	   
    }
    
    if(form.Location.value == "")
    {
        fout = true;
        fouten = fouten + "The location is missing\n";
    }
    
    if(form.Contact_Id.value == "-1")
    {
        fout = true;
        fouten = fouten + "Please select a Contact\n";
    }
    */
	if (fout)
		alert(fouten);
	else
		form.submit();
}

