<!DOCTYPE html>
<html>
<head>
<META HTTP-EQUIV="refresh" CONTENT="300"/>
<link rel="stylesheet" type="text/css" href="cto4.css" />

<title>Centretown Observatory: Weather: Webcam Lookup</title>
<script type="text/javascript">
var xhr = new XMLHttpRequest();

function onload()
{
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1;
var yyyy = today.getFullYear();
var h = today.getHours();
var m = today.getMinutes();
if (dd<10) {dd='0'+dd}
if (mm<10) {mm='0'+mm}
if (h<10) {h='0'+h}
if (m<10) {m='0'+m}
today = yyyy+"-"+mm+"-"+dd;
// document.getElementById("stub").innerHTML = today;
document.getElementById("stDate").value = today;
var now = h+":"+m;
document.getElementById("stTime").value = now;
}
function check(t,t2,t3,t4,t5)
{
var paramStr = "";
if (document.getElementById(t).value != "")
{
if (t5 == "") {
paramStr = paramStr+"<"+t4+">" }
if (document.getElementById(t2).checked){
paramStr = paramStr+"+"; }
else {
paramStr = paramStr+"-"; }
paramStr = paramStr+document.getElementById(t).value+t3;
}
return paramStr;
}
function submit()
{
var theURL = "";
//window.alert("This could take some seconds.");
var paramStr = "<stDate>"+document.getElementById("stDate").value+"</stDate>";
var eStr = ""
eStr = check("YPT","YPP","Y","dArgs",eStr);
eStr = eStr+check("MPT","MPP","M","dArgs",eStr);
eStr = eStr+check("DPT","DPP","D","dArgs",eStr);
if (eStr != "") { paramStr = paramStr+eStr+"</dArgs>"; }
eStr = "";
paramStr = paramStr+"<stTime>"+document.getElementById("stTime").value+"</stTime>";
eStr = eStr+check("HHPT","HHPP","h","tArgs",eStr);
eStr = eStr+check("MMPT","MMPP","m","tArgs",eStr);
if (eStr != "") { paramStr = paramStr+eStr+"</tArgs>"; }
paramStr=paramStr+"<buf>1</buf><stringNo>1</stringNo>";
var pStr = paramStr.replace(/</g,"[");
pStr = pStr.replace(/>/g,"]");
document.getElementById("stub").innerHTML = pStr;
var url = document.URL;
// window.alert(url);
if (url.indexOf("64180") > 0) {
theUrl = "http://mizar64.dyndns-home.com:64180/cgi-bin/wxqueries";
} else {
theUrl = "http://gypsy/cgi-bin/wxqueries";
}
xhr.open("POST",theUrl,true);
xhr.onreadystatechange = handlerFunction;
xhr.send(paramStr);
}
function handlerFunction()
{
if (xhr.readyState == 4) {
document.getElementById("stub").innerHTML = "Response: "+xhr.responseText;
document.getElementById("wxImage").src = xhr.responseText;
}
}
</script>
</head>
<body background="Graphics/CTO/clouds.jpg" bgproperties="fixed" onload="onload()">
<font face="Arial">

<table width="1080px" align="center" valign="top" border="1" frame="border" bordercolor="black" bgcolor="white" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" valign="top">
<table valign="top" width="100%" rules="none" border="0" bgcolor="white" cellspacing="0" cellpadding="5">
<tr>

<!-- TITLE -->

<td width="50%" bgcolor="white" valign="top">
<table width="100%" bgcolor="white" valign="top">
<tr>
<td width="120px" valign="top">
<img width="120" height="160" src="Graphics/CTO/cto_logo_120x160.jpg"/>
</td>
<td valign="top">
<center>
<h1>Centretown Observatory:</h1>
<h2>WebCam Lookup</h2>
<b><font color="Teal" size="-1">Times in <@OTZF> (<@OTZS> = GMT<@OTZO>)</b><br><br/>
(To see this page's template code, please <a href="w-querycam-src.html">Click Here</a>.)
</center>
</td>
</tr>
</table>
</td>


<!-- TOP MENU -->
<td width="50%" valign="top">
<table border="0" width="100%" align="left" valign="top" bordercolor="cornflowerblue" bgcolor="white" cellspacing="0" cellpadding="0">
<tr>
<td><table class="mcell"><tr><td><a class="mtxt" href="weather.html"><#Spc2>Current Weather<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="index.html"><#Spc2>CTO Home<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-about.html"><#Spc2>About<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-news.html"><#Spc2>News<#Spc2></a></td></tr></table></td>
</tr>
<tr>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-forecasts.html"><#Spc2>Forecasts<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-warnings.html"><#Spc2>Warnings<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-records.html"><#Spc2>Records<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-normals.html"><#Spc2>Normals<#Spc2></a></td></tr></table></td>
</tr>
<tr>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-temp.html"><#Spc2>Temps<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-press.html"><#Spc2>Baro+RH<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-winds.html"><#Spc2>Winds<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-rain.html"><#Spc2>Precip<#Spc2></a></td></tr></table></td>
</tr>
<tr>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-today.html"><#Spc2>Today<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-yesterday.html"><#Spc2><@YDW:TF><#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-tomorrow.html"><#Spc2><@WDW:TF><#Spc2></a></td></tr></table></td>
<td><table class="ccell"><tr><td><mctxt><b><#Spc2>Query<#Spc2></td></tr></table></td>
</tr>
<tr>
</td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-thismonth.html"><#Spc2>This Month<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-lastmonth.html"><#Spc2><@LDM:TF><#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-nextmonth.html"><#Spc2><@NDM:TF><#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="diags.html"><#Spc2>Diags<#Spc2></a></td></tr></table></td>
</tr>
<tr>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-thisyear.html"><#Spc2>This Year<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-lastyear.html"><#Spc2><@PDY><#Spc2></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-nextyear.html"><#Spc2><@XDY><#Spc2></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-notices.html"><#Spc2><i>NOTICES</i><#Spc2></a></td></tr></table></td>
</tr>
<tr>
<td><table class="mlcell"><tr><td><mltxt><#Spc2>CTO<#Spc2></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="YOW/weather.html"><#Spc2>Airport<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><a class="mtxt" href="w-regional.html"><#Spc2>Regional<#Spc2></a></td></tr></table></td>
<td><table class="mcell"><tr><td><mtxt><#Spc2>National<#Spc2></td></tr></table></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>


<!-- ******************************************************************************************************
QUERY BUILDER
****************************************************************************************************** -->

<tr class="groupheading"><td colspan="2"><p class="groupheading"><#Spc3><i>Webcam Lookup v1.01:</td></tr>
<tr bgcolor="#FFEFEF"><td colspan="2">
<table border="0" rules="none" bgcolor="#FFEFEF" bordercolor="#000000" width="100%" cellspacing="0" cellpadding="5">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
<img id="wxImage" src=""/>
<br/>
<i>Use this form to look up a webcam image from any time in the past. All you really need is a date and a time; the adjustments below each are for adding or
subtracting units of time.</i> <b>Note:</b>Calculated times are always Standard Time.<br/>
<br/>
</td>
</tr>
<tr>
<td width="50%">
<b>Date:</b> <input type="date" name="stDate" id="stDate"/><br/>
<input type="radio" name="YP" id="YPP" value="+" checked>+
<input type="radio" name="YP" id="YPM" value="-">-
<input type="text" name="YPT" id="YPT" size="3" maxlength="3">Y
   
<input type="radio" name="MP" id="MPP" value="+" checked>+
<input type="radio" name="MP" id="MPM" value="-">-
<input type="text" name="MPT" id="MPT" size="3" maxlength="3">M
   
<input type="radio" name="DP" id="DPP" value="+" checked>+
<input type="radio" name="DP" id="DPM" value="-">-
<input type="text" name="DPT" id="DPT" size="3" maxlength="3">D
<br/>
</td>
<td width="50%">
<b>Time:</b> <input type="time" name="stTime" id="stTime"/><br/>
<input type="radio" name="HHP" id="HHPP" value="+" checked>+
<input type="radio" name="HHP" id="HHPM" value="-">-
<input type="text" name="HHPT" id="HHPT" size="3" maxlength="3">H
   
<input type="radio" name="MMP" id="MMPP" value="+" checked>+
<input type="radio" name="MMP" id="MMPM" value="-">-
<input type="text" name="MMPT" id="MMPT" size="3" maxlength="3">M
<br/>
</td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td colspan="2">
<input type="submit" value="Submit" onClick="submit()"/>
</td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td colspan="2">
<table>
<tr>
<td>
<b>Current:<br/>
<img width="320" height="240" src="Weather3.jpg"/>
</td>
<td>
<b>One Month Ago:<br>
<img width="320" height="240" src="<@UNow-1M@11X>">
</td>
<td>
<b>Six Months Ago:<br>
<img width="320" height="240" src="<@UNow-6M@11X>">
</td>
</tr>
<tr>
<td>
<b>One Year Ago:<br>
<img width="320" height="240" src="<@UNow-1Y@11X>">
</td>
<td>
<b>Two Years Ago:<br>
<img width="320" height="240" src="<@UNow-2Y@11X>">
</td>
<td>
<b>Three Years Ago:<br/>
<img width="320" height="240" src="<@UNow-3Y@11X>">
</td>
</tr>
<tr>
<td>
<b>Four Years Ago:<br>
<img width="320" height="240" src="<@UNow-4Y@11X>">
</td>
<td>
<b>Five Years Ago:<br>
<img width="320" height="240" src="<@UNow-5Y@11X>">
</td>
<td>
<b> <br/>
<!-- <img width="320" height="240" src="<@UNow-3Y@11X>"> -->
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<a name="stub" id="stub"/> 
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<br>


</center>
</font>
</body>
</html>