1 <? include("includes.php");
2 include("xml2array.php");
7 <script type="text/javascript" src="/include/java/prototype.js"></script>
8 <script type="text/javascript" src="/include/java/scriptaculous.js?load=effects"></script>
9 <script type="text/javascript" src="/include/java/lightbox.js"></script>
11 <link rel="stylesheet" href="/include/css/lightbox.css" type="text/css" media="screen" />
13 <script type="text/javascript">
15 /***********************************************
16 * Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
17 * This notice MUST stay intact for legal use
18 * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
19 ***********************************************/
21 var bustcachevar=0 //bust potential caching of external pages after initial request? (1=yes, 0=no)
23 var rootdomain="http://"+window.location.hostname
24 var bustcacheparameter=""
26 function ajaxpage(url, containerid){
27 //alert("updating page");
28 var page_request = false
29 if (window.XMLHttpRequest) // if Mozilla, Safari etc
30 page_request = new XMLHttpRequest()
31 else if (window.ActiveXObject){ // if IE
33 page_request = new ActiveXObject("Msxml2.XMLHTTP")
37 page_request = new ActiveXObject("Microsoft.XMLHTTP")
44 page_request.onreadystatechange=function(){
45 loadpage(page_request, containerid)
47 if (bustcachevar) //if bust caching of external page
48 bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
49 page_request.open('GET', url+bustcacheparameter, true)
50 page_request.send(null)
53 function resize(which, max) {
54 var elem = document.getElementById(which);
55 if (elem == undefined || elem == null) return false;
56 if (max == undefined) max = 100;
57 if (elem.width > elem.height) {
58 if (elem.width > max) elem.width = max;
60 if (elem.height > max) elem.height = max;
65 function getPixelsFromTop(obj){
66 objFromTop = obj.offsetTop;
67 while(obj.offsetParent!=null) {
68 objParent = obj.offsetParent;
69 objFromTop += objParent.offsetTop;
76 function resizeheight(height,width) {
77 screen_title=parseInt(title.offsetHeight);
79 full_height=parseInt(fullheight.offsetHeight);
80 screen_height=screen_title+screen_menubar+parseInt(height);
81 if (screen_height>full_height) {
82 //newheight=(full_height-(screen_title+screen_menubar));
83 contentTopDiv = document.getElementById("contenttop")
84 contentBotDiv = document.getElementById("contentbottom")
85 contentTop = getPixelsFromTop(contentTopDiv);
86 contentBottom = getPixelsFromTop(contentBotDiv);
87 contentHeight = contentBottom - contentTop;
89 //alert("The cell height is " + contentHeight);
91 newheight=contentHeight;
93 percentage=newheight/height;
94 newwidth=parseInt(width*percentage);
95 var security = document.getElementById('security');
96 security.style.width=newheight+"px";
97 security.style.height=newwidth+"px";
98 //security.style.width=newheight;
99 //security.style.height=newwidth;
100 //alert(newwidth+" "+newheight);
102 //alert("not resizing height");
108 function insteon(url) {
109 var page_request = false
110 if (window.XMLHttpRequest) // if Mozilla, Safari etc
111 page_request = new XMLHttpRequest()
112 else if (window.ActiveXObject){ // if IE
114 page_request = new ActiveXObject("Msxml2.XMLHTTP")
118 page_request = new ActiveXObject("Microsoft.XMLHTTP")
125 if (bustcachevar) //if bust caching of external page
126 bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
127 page_request.open('GET', url+bustcacheparameter, true)
128 page_request.send(null)
132 function sillytimeout() {
133 ajaxpage('check_isy99i_status.php', 'contentarea');
136 function update_isy99() {
137 var t=setTimeout("sillytimeout()", 10000);
140 function loadpage(page_request, containerid){
141 if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
142 document.getElementById(containerid).innerHTML=page_request.responseText;
146 if (!document.getElementById)
148 for (i=0; i<arguments.length; i++){
149 var file=arguments[i]
151 if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
152 if (file.indexOf(".js")!=-1){ //If object is a js file
153 fileref=document.createElement('script')
154 fileref.setAttribute("type","text/javascript");
155 fileref.setAttribute("src", file);
157 else if (file.indexOf(".css")!=-1){ //If object is a css file
158 fileref=document.createElement("link")
159 fileref.setAttribute("rel", "stylesheet");
160 fileref.setAttribute("type", "text/css");
161 fileref.setAttribute("href", file);
165 document.getElementsByTagName("head").item(0).appendChild(fileref)
166 loadedobjects+=file+" " //Remember this object as being already added to page
171 function chkObject(theVal) {
172 if (document.getElementById(theVal) != null) {
179 function title_status() {
180 ajaxpage("title_status.php","title_status");
181 setTimeout("title_status()", 60000);
184 function alert_status() {
185 ajaxpage("alert_status.php","alert_status");
186 setTimeout("alert_status()", 1000);
189 function securityStatus() {
190 ajaxpage('check_isy99i_occupancy_status.php','contentarea');
191 t=setTimeout('securityStatus()', 10000);
194 function lightingStatus() {
195 ajaxpage('check_isy99i_status.php', 'contentarea');
196 t=setTimeout('lightingStatus()', 10000);
199 var weatherpages=new Array();
200 weatherpages[0]="weather1.php";
201 weatherpages[1]="weather2.php";
202 weatherpages[2]="weather3.php";
203 weatherpages[3]="weather4.php";
204 weatherpages[4]="weather5.php";
205 weatherpages[5]="weather6.php";
210 function weatherpageChange() {
211 ajaxpage(weatherpages[i],'contentarea');
213 if (i==weatherpages.length) {
216 t=setTimeout("weatherpageChange()",10000);
219 function imageHeaderChange(imgUrl) {
220 var div1 = document.getElementById('imgHeader');
221 div1.innerHTML='<img src=" '+imgUrl + ' ">'
224 function stopchanges(t) {
229 function changeIcon(icon) {
230 var icons=new Array();
240 icons[9]="groceries";
243 for ( var i=icons.length-1; i>=0; --i ){
244 if (icons[i] == icon) {
245 document.getElementById(icon).src = "images/"+icon+"-on.png";
247 document.getElementById(icons[i]).src = "images/"+icons[i]+"-off.png";
252 var securitypages=new Array();
253 securitypages[0]="security1.html";
254 securitypages[1]="security2.html";
255 securitypages[2]="security3.html";
256 securitypages[3]="security4.html";
257 securitypages[4]="security5.html";
258 securitypages[5]="security6.html";
260 function securitypageChange() {
261 ajaxpage(securitypages[i],'contentarea');
263 if (i==securitypages.length) {
266 t=setTimeout("securitypageChange()",10000);
269 function mediacenterSelect(ip) {
270 ajaxpage("jukebox.php?ip="+ip, 'contentarea');
273 function thermostatMode(modeId) {
277 function thermostatFan(fanId) {
284 body {overflow-y:hidden;
286 background-color: #000000;
287 background-image: url('images/bg.jpg');
288 background-repeat:repeat-x;
291 #menubar {font-family:arial, helvetica; font-size:12px; font-weight:bold;}
293 #fullheight{height: 100%;}
302 vertical-align:text-top;
308 <table border="0" width=100% id="fullheight">
311 <table border=0 align=center cellspacing=0 cellpadding=0 width=100%>
312 <tr style="background-image: url('images/header-repeater.png'); background-repeat: repeat-x;">
314 <canvas id="canvas3" height="62" width="420"> </canvas>
315 <script language="JavaScript">
316 function testDrawText3(canvas)
318 var context=canvas.getContext('2d');
320 context.strokeStyle="#3c3c3c";
321 context.shadowOffsetX=2;
322 context.shadowOffsetY=-2;
323 context.shadowColor="#3c3c3c";
325 context.font="22pt ariel";
326 context.fillStyle="#aaaaaa";
327 context.shadowOffsetX=5;
328 context.shadowOffsetY=5;
329 context.shadowBlur=10;
330 context.fillText("HANDORF HOUSE", 10, 35);
331 context.strokeText("HANDORF HOUSE", 10, 35);
333 testDrawText3(document.getElementById('canvas3'));
335 <!-- <img align="left" src="images/header.png"> -->
336 </td><td><div id="alert_status" style="font-family: Arial;position: relative; top: -6px;">
337 <script language="javascript">
339 </script></td><td align="right">
340 <div id="title_status" style="font-family: Arial;position: relative; top: -6px;">
341 <script language="javascript">
345 <td width=20% align="right" valign="middle">
346 <div id="js_clock" style="font-size:x-large;font-family: Arial;position: relative; top: -6px;">
347 <script language="javascript">function js_clock(){var clock_time = new Date();var clock_hours = clock_time.getHours();var clock_minutes = clock_time.getMinutes();var clock_seconds = clock_time.getSeconds();var clock_suffix = "AM ";if (clock_hours > 11){clock_suffix = "PM ";clock_hours = clock_hours - 12;}if (clock_hours == 0){clock_hours = 12;}if (clock_hours < 10){clock_hours = "0" + clock_hours;}if (clock_minutes < 10){clock_minutes = "0" + clock_minutes;}if (clock_seconds < 10){clock_seconds = "0" + clock_seconds;}var clock_div = document.getElementById('js_clock');clock_div.innerHTML = clock_hours + ":" + clock_minutes + ":" + clock_seconds + " " + clock_suffix;setTimeout("js_clock()", 1000);}js_clock();</script>
356 <tr height="100%" valign="top"><td>
357 <div id="contenttop"></div>
360 <div id="imgHeader" align="center"></div>
363 <div id="contentarea" align="center">
370 <div id="contentbottom"></div>
375 <table border=0 ALIGN=center cellpadding=0 cellspacing =0 width=100%>
376 <tr style="background-image: url('images/bottom-controls-repeatablebar.jpg'); background-repeat: repeat-x;">
378 <table border=0 align=center cellpadding=0 cellspacing=0>
379 <tr style="background-image: url('images/bottom-controls-repeatablebar.jpg'); background-repeat: repeat-x;">
381 <a href="javascript:stopchanges(t);weatherpageChange();imageHeaderChange('images/header-weather.png');changeIcon('weather');"><img src="./images/weather-off.png" onMouseover="" border=0 id="weather"></a>
384 <a href="javascript:stopchanges(t);lightingStatus();imageHeaderChange('images/header-lighting.png');changeIcon('lighting');"><img src="./images/lighting-off.png" onMouseover="" border=0 id="lighting"></a>
387 <a href="javascript:stopchanges(t);ajaxpage('jukebox.php', 'contentarea');imageHeaderChange('images/header-thejukebox.png');changeIcon('music');"><img src="./images/music-off.png" onMouseover="" border=0 id="music"></a>
390 <a href="javascript:stopchanges(t);securitypageChange();imageHeaderChange('images/header-camera.png');changeIcon('cameras');"><img src="./images/cameras-off.png" onMouseover="" border=0 id="cameras"></a>
393 <a href="javascript:stopchanges(t);securityStatus();imageHeaderChange('images/header-security.png');changeIcon('security');"><img src="./images/security-off.png" onMouseover="" border=0 id="security"></a>
396 <a href="javascript:stopchanges(t);ajaxpage('check_climate_status.php', 'contentarea');imageHeaderChange('images/header-climate.png');changeIcon('climate');"><img src="./images/climate-off.png" onMouseover="" border=0 id="climate"></a>
399 <a href="javascript:stopchanges(t);ajaxpage('news.php', 'contentarea');imageHeaderChange('images/header-news.png');changeIcon('news');"><img src="./images/news-off.png" onMouseover="" border=0 id="news"></a>
402 <a href="javascript:stopchanges(t);weatherpageChange();imageHeaderChange('images/header-recipes.png');changeIcon('receipes');"><img src="./images/receipes-off.png" onMouseover="" border=0 id="receipes"></a>
405 <a href="javascript:stopchanges(t);ajaxpage('groceries.html', 'contentarea');imageHeaderChange('images/header-groceries.png');changeIcon('groceries');"><img src="./images/groceries-off.png" onMouseover="" border=0 id="groceries"></a>
408 <a href="javascript:stopchanges(t);;ajaxpage('traffic.html', 'contentarea');imageHeaderChange('images/header-traffic.png');changeIcon('traffic');"><img src="./images/traffic-off.png" onMouseover="" border=0 id="traffic"></a>
411 <a href="javascript:stopchanges(t);ajaxpage('check_power_status.php', 'contentarea');imageHeaderChange('images/header-power.png');changeIcon('power');"><img src="./images/power-off.png" onMouseover="" border=0 id="power"></a>