    function formCheck(formobj){
        // name of mandatory fields
        var fieldRequired = Array("name", "email", "comments");
        // field description to appear in the dialog box
        var fieldDescription = Array("Name", "Email", "Comment");
        // dialog message
        var alertMsg = "Please complete the following fields:\n";
    	
        var l_Msg = alertMsg.length;
    	
        for (var i = 0; i < fieldRequired.length; i++){
            var obj = formobj.elements[fieldRequired[i]];
            if (obj){
                if (obj.type == null){
                    var blnchecked = false;
                    for (var j = 0; j < obj.length; j++){
                        if (obj[j].checked){
	                        blnchecked = true;
                        }
                    }
                    if (!blnchecked){
                        alertMsg += " - " + fieldDescription[i] + "\n";
                    }
                    continue;
                }

                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 (alertMsg.length == l_Msg){
            return true;
        }else{
            alert(alertMsg);
            return false;
        }
    }
    
//Checking that all fields are filled in on the form..
function formCheck2(formobj){
    // name of mandatory fields
    var fieldRequired = Array("firstname", "surname", "address", "postcode", "email");
    // field description to appear in the dialog box
    var fieldDescription = Array("First Name", "Surname", "Address", "Post Code", "Email Address");
    // dialog message
    var alertMsg = "Please complete the following fields:\n";
	
    var l_Msg = alertMsg.length;
	
    for (var i = 0; i < fieldRequired.length; i++){
        var obj = formobj.elements[fieldRequired[i]];
        if (obj){
            if (obj.type == null){
                var blnchecked = false;
                for (var j = 0; j < obj.length; j++){
                    if (obj[j].checked){
						blnchecked = true;
                    }
                }
                if (!blnchecked){
                    alertMsg += " - " + fieldDescription[i] + "\n";
                }
                continue;
            }

            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 (alertMsg.length == l_Msg){
        return true;
    }else{
        alert(alertMsg);
        return false;
    }
}
	
	//Hide the span..
    function hideDiv(divName){
	    tempDiv = document.getElementById(divName);
	    if (!tempDiv) {
	        return;
	    }
	    if (tempDiv.style.display=="block"){
	        tempDiv.style.display="none";
	    }
    }

	function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(50.6273, -2.4608), 14);
		//Zoom in control
		map.addControl(new GLargeMapControl());
		//Setting the markers information
		var point = new GLatLng(50.6273, -2.4608);
		var marker = new GMarker(point);
		map.addOverlay(marker);
		marker.openInfoWindowHtml("<div><strong>South Coast Catering Ltd</strong><br />Archard House<br />Waverley Road<br />Weymouth<br />Dorset<br />DT3 5HL")
      }
    }

sfHover = function() {
	    var sfEls = document.getElementById("nav").getElementsByTagName("li");
	    for (var i=0; i<sfEls.length; i++) {
		    sfEls[i].onmouseover=function() {
			    this.className+=" sfhover";
		    }
		    sfEls[i].onmouseout=function() {
			    this.className=this.className.replace(new RegExp(" sfhover"), "");
		    }
	    }
    }
if (window.attachEvent) window.attachEvent("onload", sfHover);

function clearTextBox(e) {
    if (e.defaultValue==e.value) e.value = ""
}