// validates that the field value string has one or more characters in it
function isNotEmpty(elem) {
	var str = elem.value;
    var re = /.+/;
    if(!str.match(re)) {
        alert("Please fill in your " + elem.name);
        setTimeout("focusElement('" + elem.form.name + "', '" + elem.name + "')", 0);
        return false;
    } else {
        return true;
    }
}

// validate that the user made a selection other than default
function isChosen(select) {
    if (select.selectedIndex == 0) {
        alert("Please make a choice from the list.");
				setTimeout("focusElement('" + select.form.name + "', '" + select.name + "')", 0);
        return false;
    } else {
        return true;
    }
}

function focusElement(formName, elemName) {
    var elem = document.forms[0].elements[elemName];
    elem.focus();
    elem.select();
}

function validateAskNazy(form){
     if(isNotEmpty(form.question)){
      if(isNotEmpty(form.name)){
		   if(isNotEmpty(form.email)){
			  if(isChosen(form.countryDropDown)){
	       return true;
				}
			 }
			}
		 }
		
	 return false;
}
