<%@ page language="C#" autoeventwireup="true" inherits="Forms_RoutePlanning, App_Web_2vtml5mv" %>

<%@ Register Src="~/UserControls/New_Footer.ascx" TagPrefix="uc2" TagName="footer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Route Planning with TSP Algorithm</title>
    <style type="text/css">
        v\:* {
            behavior: url(#default#VML);
        }
    </style>
    <link rel="stylesheet" href="../css/stylemap.css" type="text/css" media="screen">
    <link rel="stylesheet" href="../css/print.css" type="text/css" media="print">
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAvygGeDLnH_oMEXYhZUG2jBSRvfnVL9Z7D89GKRL1uQiEuOhTJxTYb5idNXuzfbvu5EJcVlEbesMtmQ"
        type="text/javascript"></script>
    <script type="text/javascript" src="../js/BpTspSolver.js"></script>
    <script type="text/javascript" src="../js/directions-export.js"></script>

    <script type="text/javascript" src="../js/tsp.js"></script>
    <script type="text/javascript">

        function init() {
            loadAtStart(37.4419, -122.1419, 8);
        }

        function toggle(divId) {
            var divObj = document.getElementById(divId);
            if (divObj.innerHTML == "") {
                divObj.innerHTML = document.getElementById(divId + "_hidden").innerHTML;
                document.getElementById(divId + "_hidden").innerHTML = "";
            } else {
                document.getElementById(divId + "_hidden").innerHTML = divObj.innerHTML;
                divObj.innerHTML = "";
            }
        }

    </script>
    <script src="../js/wow.min.js"></script>
</head>
<body onload='init()' onunload='GUnload()'>
    <table class="round">
        <tr class="roundborder">
            <td class="ul"></td>
            <td class="u"></td>
            <td class="ur"></td>
        </tr>

        <tr>
            <td class="l"></td>
            <td class="m">
                <h2>Route Planning</h2>
                <div id="map" class="myMap"></div>
                <br>
                <br>
                <div id="buttonArea">
                    <div align="center">
                        <form name="address" onsubmit="clickedAddAddress(); return false;">
                            Add Location by Address:
                            <input name="addressStr" type="text">

                            <input type="button" value="Add!" onclick="clickedAddAddress()">
                        </form>
                        or <a href="#" onclick="toggle('bulkLoader'); return false;">Bulk add by address or (lat, lng)</a>.
                    </div>
                    <div id="bulkLoader"></div>
                    <form name="travelOpts">
                        <table class="optionsTable">
                            <tr>

                                <td>
                                    <input id="walking" type="checkbox"> Walking</input><br>
                                </td>
                                <td>
                                    <input id="avoidHighways" type="checkbox"> Avoid highways</input><br>
                                </td>
                            </tr>
                        </table>
                    </form>
                    <table class="buttonTable">
                        <tr>

                            <td>
                                <input id="button1" class="calcButton" type="button" value="Calculate Fastest Roundtrip" onclick="directions(0, document.forms['travelOpts'].walking.checked, document.forms['travelOpts'].avoidHighways.checked)"></td>
                            <td>
                                <input id="button2" class="calcButton" type="button" value="Calculate Fastest A-Z Trip" onclick="directions(1, document.forms['travelOpts'].walking.checked, document.forms['travelOpts'].avoidHighways.checked)"></td>
                            <td>
                                <input id='button3' class="calcButton" type='button' value='Start Over Again' onclick='startOver()'></td>
                        </tr>
                    </table>
            </td>
            </div>
    <td class="r"></td>
        </tr>

        <tr class="roundborder">
            <td class="ll"></td>
            <td class="lower"></td>
            <td class="lr"></td>
        </tr>
    </table>
    <p>&nbsp;</p>
    <table class="round">
        <tr class="roundborder">
            <td class="ul"></td>

            <td class="u"></td>
            <td class="ur"></td>
        </tr>
        <tr>
            <td class="l"></td>
            <td class="m">
                <h2>Computed Data:</h2>
                <!--<div id="message"></div>-->

                <div id="path" class="pathdata"></div>
                <div id="exportData"></div>
                <div id="tomtom"></div>
                <div id="durations" class="pathdata"></div>
                <div id="durationsData"></div>
                <div id="my_textual_div"></div>
                <br>
                <!--<a href="http://addto.tomtom.com/api/home/v2/content?action=install&apikey=4db7cb3c-146e-4cd5-ae48-8998a464a4d9&uri=http%3A//www.gebweb.net/optimap/tomtom/gebweb-optimap-dusseldorf.xml&source=http%3A//www.tomtom.com"><img src="http://addto.tomtom.com/api/images/addtotomtom-button.gif" alt="Add-To-TomTom" border="0"/></a>-->
            </td>
            <td class="r"></td>

        </tr>
        <tr class="roundborder">
            <td class="ll"></td>
            <td class="lower"></td>
            <td class="lr"></td>
        </tr>
    </table>
    <p>&nbsp;</p>
    <div id="instructionBox">
        <table class="round">
            <tr class="roundborder">

                <td class="ul"></td>
                <td class="u"></td>
                <td class="ur"></td>
            </tr>

            <tr class="roundborder">

                <td class="ll"></td>
                <td class="lower"></td>
                <td class="lr"></td>
            </tr>
        </table>
        <p>&nbsp;</p>
    </div>
    <div id="moreBox">
        <table class="round">
            <tr class="roundborder">
                <td class="ul"></td>

                <td class="u"></td>
                <td class="ur"></td>
            </tr>

            <tr class="roundborder">
                <td class="ll"></td>
                <td class="lower"></td>
                <td class="lr"></td>
            </tr>
        </table>
        <p>&nbsp;</p>
    </div>

    <br>
    <br>
    <div id="bulkLoader_hidden" style="visibility: hidden;">
        <form name="listOfLocations" onsubmit="clickedAddList(); return false;">

            <textarea name="inputList" rows="10" cols="70" value=""></textarea><br>
            <input type="button" value="Add list of locations" onclick="clickedAddList()">
        </form>
    </div>
    <div id="exportData_hidden" style="visibility: hidden;"></div>
    <div id="durationsData_hidden" style="visibility: hidden;"></div>
    <script type="text/javascript">
        var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
        document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
        var pageTracker = _gat._getTracker("UA-3472506-1");
        pageTracker._initData();
        pageTracker._trackPageview();
    </script>
    <uc2:footer ID="footer" runat="server" />
</body>
</html>
