<HTML>
<HEAD>
<TITLE>SurgeMenu Example</TITLE>

<?php		//CUSTOMIZATION CODE FOR SURGEMENU - STYLE DEFINITIONS

$menuitem_height = 20;							//height of each menu item, in pixels
$menuitem_style = array('font' => '12pt times', 'color' => 'black', 'background' => 'white', 'indent' => '7px');
$menuitem_hover = array('font' => '12pt times', 'color' => 'white', 'background' => '#316ac5', 'indent' => '7px');
$menu_opacity = 100;
$menu_offset = array('x' => '0', 'y' => '22');				//default offset of menu from calling object

echo '<script type="text/JavaScript">';

//SURGEMENU CUSTOM FUNCTION menuAction() - DEFINES JAVASCRIPT CODE TO EXECUTE WHEN A MENU ITEM HAS BEEN SELECTED
//
//available parameters:
//
//	divID		- supplied by showMenu; references the element that originally launched the menu
//	selection 	- references the selection clicked on. One of the its most useful properties is innerHTML (the selection text)
?>

function menuAction (selection) {
	selElement = document.getElementById(selection)			//set handler for selected menu element
	document.submitForm.elements[divID].value = selElement.innerHTML	//divID - from showMenu - is the name of the calling
}									//element. Reset its value to the desired selection

</script>

<?php include 'SurgeMenu.php';

//END OF SURGEMENU CUSTOMIZATION CODE ?>

</HEAD>

<BODY>

<form name="submitForm">
<input type="input" value="" style="margin:20px;width:120px" <?php callMenu('Drnk') ?>>
</form>

<?php
createMenu (0, 100, "Drnk", "+juice", "milk", "coffee", "tea");
	createMenu (1, 120, "juice", "apple juice", "orange juice");
?>

</BODY>

This source code displayed in HTML format using the freeware source.php by Paul Postuma and Ars Informatica