function ui_show_search_event_form()
{
    //Create an HTML document using the ECHO statements
    $script = "<script type='text/javascript' src='Javascript/ValidateEvent.js'>  </script>";
    $script1 = "<link rel=\"stylesheet\" href=\"http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css\">";
    $script2 = "<script src=\"http://code.jquery.com/jquery-1.10.2.js\"></script>";
    $script3 = "<script src=\"http://code.jquery.com/ui/1.11.4/jquery-ui.js\"></script>";
    $args = array($script1, $script2, $script3, $script);
    ui_print_header_with_head_elements("UPDATE EVENT", $args);
    echo "<div class='center'>";
    echo "<center>";
    echo "<H3>Search for Event to update</H3>";
    echo "<H4>Enter keywords for event search. Some fields may be left blank.</H4>";
    echo "</center>";
    echo "<BR/>";
    echo "<FORM action='retrieve_events_to_update.php' method='post'>";
    echo "<table>";
    echo '<tr>';
    // Event Code
    echo '<TD><SPAN ALIGN=RIGHT>Event Code:</SPAN></TD>';
    echo '<TD><INPUT NAME="eventCode" ID="eventCode" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    // Event Name
    echo '<TD><SPAN ALIGN=RIGHT>Event Name:</SPAN></TD>';
    echo '<TD><INPUT NAME="eventName" ID="eventName" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    // Start Date
    echo '<TD><SPAN ALIGN=RIGHT>Start Date:</SPAN></TD>';
    echo '<TD><INPUT NAME="startDate"ID="startDate" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    // End Date
    echo '<TD><SPAN ALIGN=RIGHT>End Date:</SPAN></TD>';
    echo '<TD><INPUT NAME="endDate" ID="endDate" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    // Description
    echo '<TD><SPAN ALIGN=RIGHT>Description:</SPAN></TD>';
    echo '<TD><INPUT NAME="description" ID="description" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    // Type
    echo '<TD><SPAN ALIGN=RIGHT>Type:</SPAN></TD>';
    echo '<TD><INPUT NAME="type" ID="type" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    echo '<td align="right"><input type="reset" value="Reset" /></td>';
    echo '<td align="right"><input type="submit" value="Search Events"/></td>';
    echo '</tr>';
    echo "</table>";
    echo "</FORM>";
    echo "</div>";
    ui_print_footer_with_main_menu_button();
}
function ui_show_search_event_form()
{
    $promoCodes_selected = $_POST['promoCodes'];
    //Create an HTML document using the ECHO statements
    ui_print_header("ADD PROMOTIONS TO EVENT");
    echo "<div class='center'>";
    echo "<center><H3>SEARCH FOR EVENT TO ADD PROMOTIONS TO</H3></center>";
    echo "<BR/>";
    echo "<FORM action='retrieve_events_to_add_promotions_to.php' method='post'>";
    foreach ($promoCodes_selected as $promoCode) {
        echo '<input type="hidden" name="promoCodes[]" value="' . $promoCode . '" />';
    }
    echo "<table>";
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Event Code:</SPAN></TD>';
    echo '<TD><INPUT NAME="eventCode" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Name:</SPAN></TD>';
    echo '<TD><INPUT NAME="name" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Start Date:</SPAN></TD>';
    echo '<TD><INPUT NAME="startDate" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>End Date:</SPAN></TD>';
    echo '<TD><INPUT NAME="endDate" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Description:</SPAN></TD>';
    echo '<TD><INPUT NAME="description" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Ad Type:</SPAN></TD>';
    echo '<TD><INPUT NAME="adType" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD align="right"><input type="reset" value="Reset" /></TD>';
    echo '<TD align="right"><input type="submit" value="Search Events" /></TD>';
    echo '</tr>';
    echo "</table>";
    echo "</FORM>";
    echo "</div>";
    ui_print_footer_with_main_menu_button();
}
function ui_show_new_event_form()
{
    //Create an HTML document using the ECHO statements
    $script = "<script type='text/javascript' src='Javascript/ValidateEvent.js'>  </script>";
    $script1 = "<link rel=\"stylesheet\" href=\"http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css\">";
    $script2 = "<script src=\"http://code.jquery.com/jquery-1.10.2.js\"></script>";
    $script3 = "<script src=\"http://code.jquery.com/ui/1.11.4/jquery-ui.js\"></script>";
    $args = array($script1, $script2, $script3, $script);
    ui_print_header_with_head_elements("ADD NEW EVENT", $args);
    echo "<div class='center'>";
    echo "<FORM action='insert_event.php' method='post'>";
    echo "<table>";
    echo '<tr>';
    // Event Code
    echo '<TD><SPAN ALIGN=RIGHT>Event Code:</SPAN></TD>';
    echo '<TD><INPUT NAME="eventCode" ID="eventCode" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    // Event Name
    echo '<TD><SPAN ALIGN=RIGHT>Event Name:</SPAN></TD>';
    echo '<TD><INPUT NAME="eventName" ID="eventName" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    // Start Date
    echo '<TD><SPAN ALIGN=RIGHT>Start Date:</SPAN></TD>';
    echo '<TD><INPUT NAME="startDate"ID="startDate" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    // End Date
    echo '<TD><SPAN ALIGN=RIGHT>End Date:</SPAN></TD>';
    echo '<TD><INPUT NAME="endDate" ID="endDate" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    // Description
    echo '<TD><SPAN ALIGN=RIGHT>Description:</SPAN></TD>';
    echo '<TD><INPUT NAME="description" ID="description" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    // Type
    echo '<TD><SPAN ALIGN=RIGHT>Type:</SPAN></TD>';
    echo '<TD><INPUT NAME="type" ID="type" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    echo '<td align="right"><input type="reset" value="Reset" /></td>';
    echo '<td align="right"><input type="submit" onclick="return validateForm();" value="Submit New Event Data" /></td>';
    echo '</tr>';
    echo "</table>";
    echo "</FORM>";
    echo "</div>";
    ui_print_footer_with_main_menu_button();
}
function ui_show_new_promotion_form()
{
    //Create an HTML document using the ECHO statements
    $script = "<script type='text/javascript' src='Javascript/NewPromotionValidation.js'>  </script>";
    ui_print_header_with_head_elements("ADD NEW PROMOTION", $script);
    echo "<div class='center'>";
    echo "<FORM action='insert_promotion.php' method='post'>";
    echo "<table>";
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Promotion Name:</SPAN></TD>';
    echo '<TD><INPUT ID="promotionName" NAME="promotionName" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Promotion Description:</SPAN></TD>';
    echo '<TD><INPUT ID="promotionDescription" NAME="promotionDescription" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Amount Off:</SPAN></TD>';
    echo '<TD><INPUT ID="amountOff" NAME="amountOff" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Promotion Type:</SPAN></TD>';
    echo '<TD><select ID="promotionType" NAME="promotionType">';
    $dropDownValues = get_promoType_dropdown_values();
    while ($dropDownValue = mysql_fetch_array($dropDownValues)) {
        echo "<option value='{$dropDownValue['0']}'>{$dropDownValue['0']}</option>";
    }
    echo '</select></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD align="right"><input type="reset" value="Reset" /></TD>';
    echo '<TD align="right"><input type="submit" value="Submit New Promotion Data" onclick="return validate()" /></TD>';
    echo '</tr>';
    echo "</table>";
    echo "</FORM>";
    echo "</div>";
    ui_print_footer_with_main_menu_button();
}
function ui_show_search_item_form()
{
    //Create an HTML document using the ECHO statements
    ui_print_header("FIND BIGGEST SAVINGS FOR AN ITEM");
    echo "<div class='center'>";
    echo "<center>";
    echo "<H3>Search for Item to find the biggest savings for.</H3>";
    echo "<H4>Enter keywords for item search. Some fields may be left blank.</H4>";
    echo "</center>";
    echo "<BR/>";
    echo "<FORM action='retrieve_items_to_find_savings.php' method='post'>";
    echo "<table>";
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Item Number:</SPAN></TD>';
    echo '<TD><INPUT NAME="itemNumber" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Item Description:</SPAN></TD>';
    echo '<TD><INPUT NAME="itemDescription" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Category:</SPAN></TD>';
    echo '<TD><INPUT NAME="category" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Department Name:</SPAN></TD>';
    echo '<TD><INPUT NAME="departmentName" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD align="right"><input type="reset" value="Reset" /></TD>';
    echo '<TD align="right"><input type="submit" value="Search Items"/></TD>';
    echo '</tr>';
    echo "</table>";
    echo "</FORM>";
    echo "</div>";
    ui_print_footer_with_main_menu_button();
}
function ui_show_search_promotion_form()
{
    //Create an HTML document using the ECHO statements
    ui_print_header("VIEW PROMOTIONS AND ITEMS");
    echo "<div class='center'>";
    echo "<center>";
    echo "<H3>Search for Promotion's and associated Items</H3>";
    echo "<H4>Enter keywords for Promotion search.  Fields may be left blank.</H4>";
    echo "</center>";
    echo "<BR/>";
    echo "<FORM action='retrieve_promotions_items.php' method='post'>";
    echo "<table>";
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Amount Off:</SPAN></TD>';
    echo '<TD><INPUT ID="promotionValue" NAME="promotionValue" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Promotion Type:</SPAN></TD>';
    echo '<TD><select ID="promotionType" NAME="promotionType">';
    $n = 0;
    $dropDownValues = get_promoType_dropdown_values();
    while ($dropDownValue = mysql_fetch_array($dropDownValues)) {
        echo "<option value='{$dropDownValue[$n]}'>{$dropDownValue[$n]}</option>";
    }
    $x = '';
    $n++;
    echo "<option value='{$dropDownValue[$n]}'>{$x}</option>";
    echo '</select></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD align="right"><input type="reset" value="Reset" /></TD>';
    echo '<TD align="right"><input type="submit" value="Search Promotion" /></TD>';
    echo '</tr>';
    echo "</table>";
    echo "</FORM>";
    echo "</div>";
    ui_print_footer_with_main_menu_button();
}
function ui_show_search_promotion_form()
{
    $itemNumbersSelected = $_POST['itemNumbers'];
    //Create an HTML document using the ECHO statements
    ui_print_header("ADD ITEMS TO PROMOTION");
    echo "<div class='center'>";
    echo "<center><H3>SEARCH FOR PROMOTION TO ADD ITEMS TO</H3></center>";
    echo "<BR/>";
    echo "<FORM action='retrieve_promotions.php' method='post'>";
    foreach ($itemNumbersSelected as $itemNo) {
        echo '<input type="hidden" name="itemNumbers[]" value="' . $itemNo . '" />';
    }
    echo "<table>";
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Promotion Code:</SPAN></TD>';
    echo '<TD><INPUT NAME="promoCode" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Name:</SPAN></TD>';
    echo '<TD><INPUT NAME="name" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Description:</SPAN></TD>';
    echo '<TD><INPUT NAME="description" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD align="right"><input type="reset" value="Reset" /></TD>';
    echo '<TD align="right"><input type="submit" value="Search Promotion" /></TD>';
    echo '</tr>';
    echo "</table>";
    echo "</FORM>";
    echo "</div>";
    ui_print_footer_with_main_menu_button();
}
function ui_show_search_promotion_form()
{
    //Create an HTML document using the ECHO statements
    ui_print_header("ADD PROMOTIONS TO EVENT");
    echo "<div class='center'>";
    echo "<center>";
    echo "<H3>Search for Promotions to Add to Event</H3>";
    echo "<H4>Enter keywords for promotion search. Some fields may be left blank.</H4>";
    echo "</center>";
    echo "<BR/>";
    echo "<FORM action='retrieve_promotions_to_add_to_event.php' method='post'>";
    echo "<table>";
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>PromoCode:</SPAN></TD>';
    echo '<TD><INPUT NAME="promoCode" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Promotion Name:</SPAN></TD>';
    echo '<TD><INPUT NAME="name" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Description:</SPAN></TD>';
    echo '<TD><INPUT NAME="description" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD align="right"><input type="reset" value="Reset" /></TD>';
    echo '<TD align="right"><input type="submit" value="Search Promotions"/></TD>';
    echo '</tr>';
    echo "</table>";
    echo "</FORM>";
    echo "</div>";
    ui_print_footer_with_main_menu_button();
}
function ui_show_search_event_promo_form()
{
    //Create an HTML document using the ECHO statements
    $script = "<script type='text/javascript' src='Javascript/ValidateEvent.js'>  </script>";
    $script1 = "<link rel=\"stylesheet\" href=\"http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css\">";
    $script2 = "<script src=\"http://code.jquery.com/jquery-1.10.2.js\"></script>";
    $script3 = "<script src=\"http://code.jquery.com/ui/1.11.4/jquery-ui.js\"></script>";
    $args = array($script1, $script2, $script3, $script);
    ui_print_header_with_head_elements("VIEW EVENTS AND PROMOTIONS", $args);
    echo "<div class='center'>";
    echo "<center>";
    echo "<H3>Search for Event's and associated Promotions</H3>";
    echo "<H4>Enter a range of dates to search between, any events that take place between these values will be returned with all associated promotions.</H4>";
    echo "</center>";
    echo "<BR/>";
    echo "<FORM action='retrieve_events_promo_listing.php' method='post'>";
    echo "<table>";
    echo '<tr>';
    // Start Date
    echo '<TD><SPAN ALIGN=RIGHT>Start Date:</SPAN></TD>';
    echo "<TD><INPUT NAME='startDate' ID='startDate' TYPE='text' SIZE=50 /></TD>";
    echo '</tr>';
    echo '<tr>';
    // End Date
    echo '<TD><SPAN ALIGN=RIGHT>End Date:</SPAN></TD>';
    echo "<TD><INPUT NAME='endDate' ID='endDate' TYPE='text' SIZE=50 /></TD>";
    echo '</tr>';
    echo '<tr>';
    echo '<td align="right"><input type="reset" value="Reset" /></td>';
    echo '<td align="right"><input type="submit" value="Search Events"/></td>';
    echo '</tr>';
    echo "</table>";
    echo "</FORM>";
    echo "</div>";
    ui_print_footer_with_main_menu_button();
}
function ui_show_new_item_form()
{
    $script = "<script type='text/javascript' src='Javascript/NewItemValidation.js'> </script>";
    ui_print_header_with_head_elements("ADD NEW ITEM", $script);
    echo "<div class='center'>";
    echo "<FORM action='insert_item.php' method='post'>";
    echo "<table>";
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Item Number:</SPAN></TD>';
    echo '<TD><INPUT NAME="itemNumber" ID="itemNumber" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Item Description:</SPAN></TD>';
    echo '<TD><INPUT NAME="itemDescription" ID="itemDescription" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<input type="hidden" id="category" name="category" />';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Category:</SPAN></TD>';
    echo '<TD><select ID="category_ddl" NAME="category_ddl" onchange="CategoryDropdownChanged();">';
    $dropDownValues = get_item_category_dropdown_values();
    while ($dropDownValue = mysql_fetch_array($dropDownValues)) {
        echo "<option value='{$dropDownValue['0']}'>{$dropDownValue['0']}</option>";
    }
    echo "<option value=''>Other..</option>";
    echo '</select><input type="text" id="other_category" name="other_category" value="Enter new category here"
    style="display: none;"
    /></TD>';
    echo '</tr>';
    echo '<input type="hidden" id="departmentName" name="departmentName" />';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Department Name:</SPAN></TD>';
    echo '<TD><select ID="departmentName_ddl" onchange="DepartmentDropdownChanged();">';
    $dropDownValues = get_item_department_name_dropdown_values();
    while ($dropDownValue = mysql_fetch_array($dropDownValues)) {
        echo "<option value='{$dropDownValue['0']}'>{$dropDownValue['0']}</option>";
    }
    echo "<option value=''>Other..</option>";
    echo '</select><input type="text" id="other_department" name="other_department" value="Enter new Department Name here"
    style="display:
none;" />
    </TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Purchase Cost:</SPAN></TD>';
    echo '<TD><INPUT NAME="purchaseCost" ID="purchaseCost" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD><SPAN ALIGN=RIGHT>Full Retail Price:</SPAN></TD>';
    echo '<TD><INPUT NAME="retailPrice" ID="retailPrice" TYPE="text" SIZE=50/></TD>';
    echo '</tr>';
    echo '<tr>';
    //
    echo '<TD align="right"><input type="reset" value="Reset" /></TD>';
    echo '<TD align="right"><input type="submit" value="Submit New Item Data" onclick="return setHiddenValues();"
    /></TD>';
    echo '</tr>';
    echo "</table>";
    echo "</FORM>";
    echo "</div>";
    ui_print_footer_with_main_menu_button();
}