function initTransMenu() {
	if (!TransMenu.isSupported()) return;	//Menu not supported, so exit
	
	//==================================================================================================
	// create a set of dropdowns
	//==================================================================================================
	// the first param should always be down, as it is here
	//
	// The second and third param are the top and left offset positions of the menus from their actuators
	// respectively. To make a menu appear a little to the left and bottom of an actuator, you could use
	// something like -5, 5
	//
	// The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner
	// of the actuator from which to measure the offset positions above. Here we are saying we want the 
	// menu to appear directly below the bottom left corner of the actuator
	//==================================================================================================
	var ms = new TransMenuSet(TransMenu.direction.down, 0, 5, TransMenu.reference.bottomLeft);
	
	//==================================================================================================
	// create a dropdown menu
	//==================================================================================================
	// the first parameter should be the HTML element which will act actuator for the menu
	//==================================================================================================
	var menu1 = ms.addMenu(document.getElementById("parents"));
	menu1.addItem("Notices & Calendar", "/blog/notices-and-calendar-of-events/");
	menu1.addItem("Photos", "/blog/gallery/");
	
	//==================================================================================================
	
	var menu2 = ms.addMenu(document.getElementById("overview"));
	menu2.addItem("Infant", "/infants.html");
	menu2.addItem("Toddler", "/toddlers.html");
	menu2.addItem("Primary", "/primary.html");
	menu2.addItem("Lower Elementary", "/lower_elementary.html");
	menu2.addItem("Upper Elementary", "/upper_elementary.html");
	menu2.addItem("News", "/news.html");	
	//==================================================================================================
	
	var menu3 = ms.addMenu(document.getElementById("resources"));
	menu3.addItem("Blog", "/blog/");
	
	
	//==================================================================================================
	// write drop downs into page
	//==================================================================================================
	// this method writes all the HTML for the menus into the page with document.write(). It must be
	// called within the body of the HTML page.
	//==================================================================================================
	TransMenu.renderAll();
	
	TransMenu.initialize();
	
	// hook all the highlight swapping of the main toolbar to menu activation/deactivation
	// instead of simple rollover to get the effect where the button stays hightlit until
	// the menu is closed.
	menu1.onactivate = function() { document.getElementById("parents").className = "hover"; };
	menu1.ondeactivate = function() { document.getElementById("parents").className = ""; };
	
	menu2.onactivate = function() { document.getElementById("overview").className = "hover"; };
	menu2.ondeactivate = function() { document.getElementById("overview").className = ""; };
	
	menu3.onactivate = function() { document.getElementById("resources").className = "hover"; };
	menu3.ondeactivate = function() { document.getElementById("resources").className = ""; };
	
	this.className = "hover";
}

/**
* Form Validation function
*/
function verifyForm(form_id) {
        var myForm = document.getElementById(form_id);
        var errorMessage = '';
        var logMessage = "";
        var inputs = myForm.getElementsByTagName('input');
        var selects = myForm.getElementsByTagName('select');
        var idx = 0;
        logMessage += "Found " + inputs.length + " inputs\n";
        logMessage += "Found " + selects.length + " selects\n";
        for(idx=0; idx<inputs.length ; idx++) {
                if(inputs[idx].getAttribute('required') == 'required') {
                        logMessage += "found a required field: " + idx + " with value = " + inputs[idx].value  + "\n";
                        if(inputs[idx].value.length == 0) {
                                var myName = inputs[idx]['name'];
                                myName = myName.replace(/_/g, ' ');
                                errorMessage += "The field '" + myName + "' must not be empty.\n";
                        }
                }
                if(inputs[idx].getAttribute('required') == 'requiredemail') {
                        logMessage += "found a required field: " + idx + " with value = " + inputs[idx].value  + "\n";
                        if(inputs[idx].value.length == 0 || inputs[idx].value.indexOf('@') == -1) {
                                var myName = inputs[idx]['name'];
                                myName = myName.replace(/_/g, ' ');
                                errorMessage += "The field '" + myName + "' must not be empty or must contain a valid email address.\n";
                        }
                }
        }



        for(idx=0; idx<selects.length ; idx++) {
                if(selects[idx].getAttribute('required') == 'required') {
                        logMessage += "found a required field: " + idx + " with value = " + selects[idx].selectedIndex + "\n";
                        if(selects[idx].selectedIndex == 0) {
                                var myName = selects[idx]['name'];
                                myName = myName.replace(/_/g, ' ');
                                errorMessage += "You must choose an option from the '" + myName + "' drop-down menu.\n";
                        }
                }
        }

        if(errorMessage !='') {
                alert("The following errors were found:\n" + errorMessage);
                return false;
        } else {
                //alert(logMessage + "\n\nErrormessage: " + errorMessage);
                return true;
        }
}
