function checkdata()
{
  var msg = "";
	var count = 0;
	
  
    if ( document.frm.name.value=='' ) 
    {
	    msg+='\n* Name';
	    count++;
    }

    if ( document.frm.company.value=='' ) 
    {
	    msg+='\n* Company';
	    count++;
    }

    if ( document.frm.address.value=='' ) 
    {
	    msg+='\n* Address';
	    count++;
    }

    if ( document.frm.town.value=='' ) 
    {
	    msg+='\n* Town';
	    count++;
    }

    if ( document.frm.country.value=='' ) 
    {
	    msg+='\n* Country';
	    count++;
    }

    if ( document.frm.postcode.value=='' ) 
    {
	    msg+='\n* Post Code';
	    count++;
    }

    if ( document.frm.telephone.value=='' ) 
    {
	    msg+='\n* Telephone';
	    count++;
    }

    if ( document.frm.email.value=='' ) 
    {
	    msg+='\n* Email';
	    count++;
    }

		if ( getCheckedValue(document.frm.catalogue) == '' ) 
		{
			msg+='\n* Catalogue';
			count++;
		}

    
	if (msg!="")
	{
		alert ("Please fill in the following " + count + " compulsory fields:\n" + msg);
		return false;
	}
    document.frm.submit();
	return true;
}


	function getCheckedValue(radioObj) {
		if(!radioObj)
			return "";
		var radioLength = radioObj.length;
		if(radioLength == undefined)
			if(radioObj.checked)
				return radioObj.value;
			else
				return "";
		for(var i = 0; i < radioLength; i++) {
			if(radioObj[i].checked) {
				return radioObj[i].value;
			}
		}
		return "";
	}	
