You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by cl...@apache.org on 2006/06/20 01:06:41 UTC
svn commit: r415473 [4/8] - in /incubator/xap/site: ./ content/ content/xap/
images/ img/
Added: incubator/xap/site/index.php@cid=1075&lang=javascript&source_code=..%2Fdemo%2FxapDemos%2Fdemos%2Fgoogle%2FEventMco.js.html
URL: http://svn.apache.org/viewvc/incubator/xap/site/index.php%40cid%3D1075%26lang%3Djavascript%26source_code%3D..%252Fdemo%252FxapDemos%252Fdemos%252Fgoogle%252FEventMco.js.html?rev=415473&view=auto
==============================================================================
--- incubator/xap/site/index.php@cid=1075&lang=javascript&source_code=..%2Fdemo%2FxapDemos%2Fdemos%2Fgoogle%2FEventMco.js.html (added)
+++ incubator/xap/site/index.php@cid=1075&lang=javascript&source_code=..%2Fdemo%2FxapDemos%2Fdemos%2Fgoogle%2FEventMco.js.html Mon Jun 19 18:06:37 2006
@@ -0,0 +1,451 @@
+<META http-equiv = "Expires" CONTENT="Sun, 31 Dec 1995 09:30:00">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional">
+
+<head><title>XAP: Demos</title>
+<script type="text/javascript">
+<!-- hide from non JavaScript Browsers
+// preload my menu image
+Image1= new Image(20,30);
+Image1.src = "./images/highlight.gif";
+// End Hiding -->
+</script>
+</head>
+
+<html>
+<LINK REL="STYLESHEET" HREF="main.css">
+<body class=body>
+
+
+<!--
+<table width=100% BORDER="0" CELLSPACING="0" CELLPADDING="0">
+<tr>
+<td valign=top align=right width=100% style="border-bottom: 0px; padding-bottom: 0px;
+ background-image: url(../shared/images/banner_logo_repeat.gif); background-repeat: repeat; background-position: top;">
+
+<a href="./"><image src="../shared/images/banner_logo.gif" style="position: static; left: 0px;" hspace=0 vspace=0 border=0 align=left></a>
+<a href="http://www.nexaweb.com" style="vertical-align: bottom; font-size: 8pt; text-decoration: none;">Nexaweb.com Home</a>
+<image src="../shared/images/banner_logo_cap.gif" hspace=0 vspace=0 border=0 align=top></td></tr>
+</table>
+-->
+<div style="width:972px;">
+<table width=100% BORDER="0" CELLSPACING="0" CELLPADDING="0">
+<tr>
+<td valign=bottom align=right width=100% style="vertical-align: bottom; border-bottom: 0px; padding-bottom: 5px;">
+<a href="index.php@cid=1054.html"><image src="./images/header_logo.gif" style="position: static; left: 0px;" hspace=0 vspace=0 border=0 valign=bottom align=left></a>
+<a href="http://incubator.apache.org/index.html"><image src="./images/incubator.png" style="position: static; left: 0px;" hspace=0 vspace=0 border=0 valign=bottom align=right></a>
+</td></tr>
+</table>
+
+
+
+<table width="100%" style="background-color: white; border: 0px; height: 30px; " BORDER="0" CELLSPACING="0" CELLPADDING="0">
+<tr style="background-image: url(./images/background.gif); background-repeat: repeat; background-position: top;">
+<td width=20><!--<img src="../shared/images/left_cap.gif">--> </td>
+<td class="content" nowrap onMouseOver="this.style.backgroundImage='url(./images/highlight.gif)';" onMouseOut="this.style.backgroundImage='url(./images/background.gif)';" onClick="document.location='?cid=1054';" style="text-align: center;background-repeat: repeat; background-position: left top; cursor: pointer; color: black; font-weight: normal; padding: 0px; margin: 0px;"><a href="index.php@cid=1054.html" class="headerTitle" style="color: white; text-decoration: none;">Welcome</a></td><td class="content" style="color: white; cursor: default;"> | </td><td class="content" nowrap onMouseOver="this.style.backgroundImage='url(./images/highlight.gif)';" onMouseOut="this.style.backgroundImage='url(./images/background.gif)';" onClick="document.location='?cid=1064';" style="text-align: center;background-repeat: repeat; background-position: left top; cursor: pointer; color: black; font-weight: normal; padding: 0px; margin: 0px;"><a href="index.php@cid=1064.html"
class="headerTitle" style="color: white; text-decoration: none;">Getting Started</a></td><td width=100%> </td>
+<!--<td width=20><img src="../shared/images/right_cap.gif"></td>-->
+</tr>
+</table>
+<!--<image src="../shared/images/spaced.gif" border=0 height=8><br>-->
+<script type="text/javascript" src="../shared/helpers.js"></script><table height=420 width="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><tr><td colspan=2><image src="./images/spaced.gif" border=0 height=10><br></td></tr><tr><td valign=top class=copyText style="padding-left: 8px; padding-right: 8px;"><div style="width: 720px;"><a href="index.php@cid=1075.html">Close source view</a><br/><br/><div style="width: 100%"><div class="javascript" style="font-family: monospace;width: 900px; color: #000066; border: 1px solid #d0d0d0; background-color: #f8f8f8;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">/*</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Copyright 2006 The Apache Software Foundation.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Licensed under the Apache License, Version 2.0 (the "License");</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * you may not use this file except in compliance with the License.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * You may obtain a copy of the License at</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * http://www.apache.org/licenses/LICENSE-2.0</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Unless required by applicable law or agreed to in writing, software</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * distributed under the License is distributed on an "AS IS" BASIS,</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * See the License for the specific language governing permissions and</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * limitations under the License.</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> */</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">/**</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * EventMco class contains all the business logic for the EMS applications.</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * responsible for handling events in applications.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> */</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> EventMco<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>._clickState = <span style="color: #3366CC;">"pickup"</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>._callArray = <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EventMco.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">onTreeSelect</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">(</span>clientEvent<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> uiDoc = clientEvent.<span style="color: #006600;">session</span>.<span style="color: #006600;">getDocumentRegistry</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">getUiDocument</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> treeItem = uiDoc.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span>clientEvent.<span style="color: #006600;">itemId</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> googleMap = uiDoc.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"googleMap"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//remove the old markers on a deselection event and </span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//add the new markers on the selection event.</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>clientEvent.<span style="color: #006600;">selected</span> == <span style="color: #003366; font-weight: bold;">false</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//remove the old markers</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">removeOldMarkers</span><span style="color: #66cc66;">(</span>clientEvent.<span style="color: #006600;">session</span>, uiDoc<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> googleMap.<span style="color: #006600;">setAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"zoom"</span>, <span style="color: #3366CC;">"12"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> googleMap.<span style="color: #006600;">setAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"center"</span>, <span style="color: #3366CC;">"42.37889, -71.030794"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> googleMapMarkers = uiDoc.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"googleMapMarkers"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//if the item is a tree branch then remove the old nodes and add the new ones</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>treeItem.<span style="color: #006600;">childNodes</span>.<span style="color: #006600;">length</span>!=<span style="color: #CC0000;">0</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//add all the remove markers to the DOM</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">addNewMarkers</span><span style="color: #66cc66;">(</span>googleMapMarkers, uiDoc, treeItem<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #66cc66;">{</span> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">createAddMarker</span><span style="color: #66cc66;">(</span>uiDoc, googleMapMarkers, treeItem.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"latitude"</span><span style="color: #66cc66;">)</span>, </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> treeItem.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"longitude"</span><span style="color: #66cc66;">)</span>,</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">getInfoText</span><span style="color: #66cc66;">(</span>treeItem<span style="color: #66cc66;">)</span>, treeItem.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"icon"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>; </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//if the item is a tree leaf then center and zoom in on it. </span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//center and zoom the map to the cordinates of the point</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> center = treeItem.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"latitude"</span><span style="color: #66cc66;">)</span> + <span style="color: #3366CC;">","</span> + </div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> treeItem.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"longitude"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> googleMap.<span style="color: #006600;">setAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"center"</span>, center<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> googleMap.<span style="color: #006600;">setAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"zoom"</span>, <span style="color: #3366CC;">"15"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">fillInfoBox</span><span style="color: #66cc66;">(</span>treeItem<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">/**</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Called by used trying to add markers to the map based on a tree item.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * If using the text attribute add some formatting.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> */</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EventMco.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">getInfoText</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">(</span>treeItem<span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> infoText = treeItem.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"infoText"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>infoText == <span style="color: #003366; font-weight: bold;">null</span> || infoText == <span style="color: #3366CC;">""</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> infoText = <span style="color: #3366CC;">"<div class=<span style="color: #000099; font-weight: bold;">\"</span>infoText<span style="color: #000099; font-weight: bold;">\"</span>>"</span> + treeItem.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"text"</span><span style="color: #66cc66;">)</span> + <span style="color: #3366CC;">"</div>"</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">return</span> infoText; </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">}</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">/**</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Remove the old markers from the maps. This is done by calling the execute</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * method on the removeMarkers macro. The bridging</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * classes will handle the actual removal of the </span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Parameter uiDoc - left in to allow developers to try doing it by hand.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> */</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EventMco.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">removeOldMarkers</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">(</span>clientSession, uiDoc<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//get the removeMarkers macro and call execute.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//clientSession.getMacroContainer().get("removeMarkers").execute();</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">/**</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * If you were to this in code you would need to do the following.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> */</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//get the marker container.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> googleMapMarkers = uiDoc.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"googleMapMarkers"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//remove all the markers from the </span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #66cc66;">(</span>index = <span style="color: #CC0000;">0</span>; index < googleMapMarkers.<span style="color: #006600;">getChildCount</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;<span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> element = googleMapMarkers.<span style="color: #006600;">getChildAt</span><span style="color: #66cc66;">(</span>index<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> googleMapMarkers.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">(</span>element<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">/**</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Add the new markers from the maps.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> */</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EventMco.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">addNewMarkers</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">(</span>googleMapMarkers, uiDoc, treeItem<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//go through the tree items and add the items as markers to the googles map.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #66cc66;">(</span>index <span style="color: #000066; font-weight: bold;">in</span> treeItem.<span style="color: #006600;">childNodes</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> childTreeItem = treeItem.<span style="color: #006600;">childNodes</span><span style="color: #66cc66;">[</span>index<span style="color: #66cc66;">]</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> latitude = childTreeItem.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"latitude"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>latitude != <span style="color: #003366; font-weight: bold;">null</span> && latitude != <span style="color: #3366CC;">""</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">createAddMarker</span><span style="color: #66cc66;">(</span>uiDoc, googleMapMarkers, latitude, </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> childTreeItem.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"longitude"</span><span style="color: #66cc66;">)</span>,</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">getInfoText</span><span style="color: #66cc66;">(</span>childTreeItem<span style="color: #66cc66;">)</span>, childTreeItem.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"icon"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>; </div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">addNewMarkers</span><span style="color: #66cc66;">(</span>googleMapMarkers, uiDoc, childTreeItem<span style="color: #66cc66;">)</span>; </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">/**</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Create the marker element and add it to the <markers> parent object</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> */</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EventMco.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">createAddMarker</span> = <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #66cc66;">(</span>uiDoc, googleMapMarkers, latitude, longitude, infoText, icon<span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> markerElement = uiDoc.<span style="color: #006600;">createElement</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"marker"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> markerElement.<span style="color: #006600;">setAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"latitude"</span>, latitude<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> markerElement.<span style="color: #006600;">setAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"longitude"</span>, longitude<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> markerElement.<span style="color: #006600;">setAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"infoText"</span>, infoText<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> markerElement.<span style="color: #006600;">setAttribute</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"icon"</span>, icon<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> googleMapMarkers.<span style="color: #006600;">appendChild</span><span style="color: #66cc66;">(</span>markerElement<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">/**</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Called when the user clicks on the map. Defined in the index.xal page.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * <gMap onClick="mco://myMco.onMapClick()"/></span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> */</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EventMco.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">onMapClick</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">(</span>clientEvent<span style="color: #66cc66;">)</span> <span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span><span style="color: #000066; font-weight: bold;">this</span>._clickState == <span style="color: #3366CC;">"pickup"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"pickup"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span> = clientEvent.<span style="color: #006600;">point</span>.<span style="color: #006600;">lat</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span> + <span style="color: #3366CC;">","</span> + clientEvent.<span style="color: #006600;">point</span>.<span style="color: #006600;">lng</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//make the user click the button every time to set.</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>._clickState = <span style="color: #3366CC;">"destination"</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"destination"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span> == <span style="color: #3366CC;">""</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"destination"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span> = <span style="color: #3366CC;">"Click map to fill in destination point"</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span><span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span><span style="color: #000066; font-weight: bold;">this</span>._clickState == <span style="color: #3366CC;">"destination"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"destination"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span> = clientEvent.<span style="color: #006600;">point</span>.<span style="color: #006600;">lat</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span> + <span style="color: #3366CC;">","</span> + clientEvent.<span style="color: #006600;">point</span>.<span style="color: #006600;">lng</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//make the user click the button every time to set.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>._clickState = <span style="color: #3366CC;">"none"</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">/**</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Event is routed through the Standard js handler on a HTML button. Use</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * the clientSession object to get the MCO call this event.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Method will add the information from the form into the table.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> */</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EventMco.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">createCall</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">(</span>clientSession<span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> emsCall = <span style="color: #003366; font-weight: bold;">new</span> EmsCall<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> emsCall.<span style="color: #006600;">createCall</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>emsCall._patient==<span style="color: #3366CC;">""</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066;">alert</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"Please fill in caller name field"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">return</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span><span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>emsCall._pickup==<span style="color: #3366CC;">""</span> || emsCall._pickup.<span style="color: #006600;">indexOf</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"Click"</span><span style="color: #66cc66;">)</span> >= <span style="color: #CC0000;">0</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066;">alert</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"Please fill in pickup field"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">return</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span><span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>emsCall._destination==<span style="color: #3366CC;">""</span> || emsCall._destination.<span style="color: #006600;">indexOf</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"Click"</span><span style="color: #66cc66;">)</span> >= <span style="color: #CC0000;">0</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066;">alert</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"Please fill in destination field"</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">return</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>._callArray.<span style="color: #006600;">push</span><span style="color: #66cc66;">(</span>emsCall<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span><span style="color: #000066; font-weight: bold;">this</span>._callArray.<span style="color: #006600;">length</span> > <span style="color: #CC0000;">5</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//push the oldest one of the list.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>._callArray.<span style="color: #006600;">shift</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//loop through the call logs and add them to the table.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #003366; font-weight: bold;">var</span> tableContents = <span style="color: #3366CC;">""</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #66cc66;">(</span>emsArrayCall <span style="color: #000066; font-weight: bold;">in</span> <span style="color: #000066; font-weight: bold;">this</span>._callArray<span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> tableContents += <span style="color: #000066; font-weight: bold;">this</span>._callArray<span style="color: #66cc66;">[</span>emsArrayCall<span style="color: #66cc66;">]</span>.<span style="color: #006600;">getTableRow</span><span style="color: #66cc66;">(</span>emsArrayCall<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//add all the call logs into the "callLog" table.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"callLog"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">innerHTML</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"callLog"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">innerHTML</span> = <span style="color: #3366CC;">"<table width=<span style="color: #000099; font-weight: bold;">\"</span>100%<span style="color: #000099; font-weight: bold;">\"</span>><tbody>"</span> + tableContents + <span style="color: #3366CC;">"</tbody></table>"</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//show the route that was entered.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> showRoute<span style="color: #66cc66;">(</span><span style="color: #000066; font-weight: bold;">this</span>._callArray.<span style="color: #006600;">length</span> - <span style="color: #CC0000;">1</span>, clientSession<span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">clearForm</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">/**</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Event is routed throug the Standard js handler on the clear form button.</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> */</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EventMco.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">clearForm</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #009900; font-style: italic;">//clear the call form</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"patient"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span> = <span style="color: #3366CC;">""</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"pickup"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span> = <span style="color: #3366CC;">"Click map to fill in pickup point"</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"destination"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span> = <span style="color: #3366CC;">""</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>._clickState = <span style="color: #3366CC;">"pickup"</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">/**</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * Event is routed through the Standard js handler on a HTML image object. Use</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> * the clientSession object to get the MCO call this event.</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> *</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;"> */</span></div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">EventMco.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">setClickState</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">(</span>clickState<span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">this</span>._clickState = clickState;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span><span style="color: #000066; font-weight: bold;">this</span>._clickState==<span style="color: #3366CC;">"pickup"</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"pickup"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span> == <span style="color: #3366CC;">""</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"pickup"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span> = <span style="color: #3366CC;">"Click map to fill in pickup point"</span>;</div></li>
+<li style="font-weight: bold;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">(</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"destination"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span> == <span style="color: #3366CC;">""</span> || document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"destination"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span>.<span style="color: #006600;">indexOf</span><span style="color: #66cc66;">(</span><span style="color: #3366
CC;">"Click"</span><span style="color: #66cc66;">)</span>>=<span style="color: #CC0000;">0</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">{</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">(</span><span style="color: #3366CC;">"destination"</span><span style="color: #66cc66;">)</span>.<span style="color: #006600;">value</span> = <span style="color: #3366CC;">""</span>;</div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span></div></li>
+<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #66cc66;">}</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #66cc66;">{</span></div></li>
[... 171 lines stripped ...]
Propchange: incubator/xap/site/index.php@cid=1075&lang=javascript&source_code=..%2Fdemo%2FxapDemos%2Fdemos%2Fgoogle%2FEventMco.js.html
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/xap/site/index.php@cid=1075&lang=javascript&source_code=..%2Fdemo%2FxapDemos%2Fdemos%2Fgoogle%2FEventMco.js.html
------------------------------------------------------------------------------
svn:executable = *