function deselect_seccer()
{
    var idx;
    for (idx=0; idx < document.frminfo.medical.length; idx++) {
        document.frminfo.medical[idx].checked = false;
    }
    document.frminfo.other_medical_desc.value = '';
    return true;    
}

function isblank(expr)
{
	return (expr == "");
}

/*
function isblankradio(objRadio)
{
    for (i = 0; i < objRadio.length; i++) {
        if (objRadio[i].checked) {
            return false;
        }
    }
    
    return true;
}
*/

function validate(frm) {
	if (isblank(frm.subject.value)) {
		alert('You need to fill-in a subject');
		frm.subject.focus();
		return false;
	}
	/*if (isblank(frm.company.value)) {
		alert('You need to fill-in a Company');
		frm.company.focus();
		return false;
	} else {
	    if (frm.sector[1].checked && isblank(frm.other_non_medical_desc.value)) {
	        alert('You need to select a sector');
	        frm.other_non_medical_desc.focus();
	        return false;
	    } else {
	        if (frm.sector[0].checked && frm.medical[2].checked && isblank(frm.other_medical_desc.value)) {
	            alert('You need to select a sector');
	            frm.other_medical_desc.focus();
	            return false;
	        }
	    }
	}*/
	
	if (isblank(frm.realname.value)) {
		alert('You need to fill-in a contact');
		frm.realname.focus();
		return false;
	}
	/*if (isblank(frm.city.value)) {
		alert('You need to fill-in a city');
		frm.city.focus();
		return false;
	}
	if (isblank(frm.country.value)) {
		alert('You need to fill-in a country');
		frm.country.focus();
		return false;
	}*/
	if (isblank(frm.phone.value)) {
		alert('You need to fill-in a phone');
		frm.phone.focus();
		return false;
	}
	if (isblank(frm.email.value)) {
		alert('You need to fill-in an E-mail');
		frm.email.focus();
		return false;
	}
	/*if (isblank(frm.comments.value)) {
		alert('You need to fill-in a comment');
		frm.comments.focus();
		return false;
	}*/

	frm.submit();
}
