function formCheck(formobj){

	// start modify the following

    // Enter name of mandatory/required fields

    // These are the actual names of the form fields (<input type="text" name="firstname">)

    // Pls. keep in mind that how many fields you want to be required must be the same number

    // of entries in fieldRequired and fieldDescription.

    var fieldRequired = Array (

    					"clinic",
						"location",
    					"address",
						"email",
						"telno",
						"website",
		  				"message"	
    						  );

    

    // Enter field description to appear in the dialog box

    var fieldDescription = Array (

						"Name of Dental Clinic is required",
						"Location is required",
						"Address is required",
						"Email is required",
						"Contact number is required",
						"Website is required",
						"Comments/Suggestions is required"
						

    							 );

    // dialog message

    var alertMsg = "Please complete the following fields:\n";

   // end modify the following

    

    // DO NOT edit below this line

    var l_Msg = alertMsg.length;

    

    for (var i = 0; i < fieldRequired.length; i++){

        var obj = formobj.elements[fieldRequired[i]];

        if (obj){

            switch(obj.type){

            case "select-one":

                if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){

                    alertMsg += " - " + fieldDescription[i] + "\n";

                }

                break;

            case "select-multiple":

                if (obj.selectedIndex == -1){

                    alertMsg += " - " + fieldDescription[i] + "\n";

                }

                break;

            case "text":

            case "textarea":

                if (obj.value == "" || obj.value == null){

                    alertMsg += " - " + fieldDescription[i] + "\n";

                }

                break;

            default:

            }

            if (obj.type == undefined){

                var blnchecked = false;

                for (var j = 0; j < obj.length; j++){

                    if (obj[j].checked){

                        blnchecked = true;

                    }

                }

                if (!blnchecked){

                    alertMsg += " - " + fieldDescription[i] + "\n";

                }

            }

        }

    }



    if (alertMsg.length == l_Msg){

        return true;

    }else{

        alert(alertMsg);

        return false;

    }

}