function delete_q(URL) 
{ 
if(confirm("Är du säker på att du vill radera posten?")) 
     { 
     window.location = URL 
     } 
} 

function validate(form) {

	var reason = "";
			
	reason += validateEmpty(form.name);
	      
	if (reason != "") {
		alert("Some fields need correction:\n" + reason);
		return false;
	}
		
  return true;
  
}

function validateEmpty(fld) {
	    
    var error = "";
  
    if (fld.value.length == 0) {
        fld.style.background = 'Yellow';         
        error = "The required field has not been filled in.\n"
    } else {
        fld.style.background = 'White';
    }
    return error;   
}
