/*************************************************************************
  This code is from Dynamic Web Coding at dyn-web.com
  Copyright 2001-5 by Sharon Paine 
  See Terms of Use at www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

// preload images
imageHandler.path = "images/site/home/";
imageHandler.preload("DialogScout.jpg", "DialogElite.jpg", "ScoutPLC.jpg", "Elite200.jpg", "ElitePLC.jpg", "Beacon.jpg", "ScoutRT.jpg", "TM.jpg", "ScoutPC.jpg", "ElitePC.jpg", "SCAP.jpg");

function initBanner() {
    if ( !document.getElementById ) return;
    // arguments: id, delay (amount of time in milliseconds you linger on each item)
    var ban1 = new dw_Banner('txtBanner', 10000);
    // add as many items as you like
    ban1.addItem('<a href="http://www.aquavx.com" target="_blank" class="home-rotator-text"><span class=\'home-tooltip-header\'>Aquavx SCOUT</span><br>The Aquavx Scout solution combines the proven reliability and power of the Scout and the widely-used web-application from M2M Datacorp, providing unsurpassed capabilites for remote montioring, reporting, alarm notification, charting and control.  Get the power and performace of SCADA at a fraction of the cost. Upgrades from existing Scout and Elite installations are available.</a>');
    ban1.addItem('<a href="Products/Messenger/index.htm" class="home-rotator-text"><span class=\'home-tooltip-header\'>Messenger</span><br>The Messenger provides comprehensive monitoring and reporting of engine, driver and operational information from J1939, J1708 and OBD-CAN devices.  The key to the Messenger is the extensive computations that are performed locally on the unit and then transferred to a web-based application for presentation and reporting. Complete bi-directional communication, GPS reporting, PPP connection, Modbus support all add up to very powerful, robust system. </a>');
	ban1.addItem('<a href="Products/Scout/index.htm" class="home-rotator-text"><span class=\'home-tooltip-header\'>DIALOG SCOUT</span><br>Small, easy-to-use and low cost, this industrial alarm notification and remote monitoring system provides monitoring from 2, 4 or 8 digital inputs, 2 or 4 analog inputs and can have a relay for control of blowers, fans, pumps or horns. Features include local and remote programming, remote relay control, monitoring of digital and analog inputs, user programmable voice messages and internal battery backup.</a>');
    ban1.addItem('<a href="Products/Elite/index.htm" class="home-rotator-text"><span class=\'home-tooltip-header\'>DIALOG ELITE</span><br>The industry&rsquo;s first Web-based and completely field-upgradeable alarm dialer with complete voice notification device that address all your monitoring and control requirements, now and in the future. Customizable with any combination of digital and analog inputs and relay outputs, it&rsquo;s configured to work on or off the Web. Easily installed in the field or downloaded over the phone line, simply receive an upgrade to your system over the phone.</a>');
    ban1.addItem('<a href="Products/ScoutPLC/index.htm" class="home-rotator-text"><span class=\'home-tooltip-header\'>SCOUT PLC</span><br>Life is easier with this simple alarm notification and remote monitoring system able to read input values from a PLC (or any Modbus RTU device) and write analog and relay control values to a PLC. The connection to the PLC uses the serial connector on the Scout enabling it to communicate with 12 or 24 registers in the PLC or Modbus device, and the I/O in the PLC can be any combination of analog (holding registers) or digital points (coils, inputs, status).</a>');
    ban1.addItem('<a href="Products/Elite200/index.htm" class="home-rotator-text"><span class=\'home-tooltip-header\'>ELITE 200</span><br>This hardware-based alarm notification, acknowledgement and status solution for integrating to SCADA and/or PLC-based systems has up to 200 conditions that can be monitored (analog values like level, flow rates, pressure, temperature, RPM, voltage, Hz) as well as digital on/off conditions (high/low level alarms, motor failures, intrusion, generator failure or start) as well as automatic calculation of motor run times, total starts and totalized flow.</a>');
    ban1.addItem('<a href="Products/ElitePLC/index.htm" class="home-rotator-text"><span class=\'home-tooltip-header\'>ELITE PLC</span><br>The EPLC provides reading input values from a PLC and writing relay control values to a PLC, supporting up to 72 I/O channels in any combination of analog or digital points. This alarm system was designed to be reliable and it is unsurpassed in this area. Web-based functionality allows remote programming and management of as many sites as you want, as well as checking on event log reporting and storage, and scheduled or on-demand status reports.</a>');
    ban1.addItem('<a href="Products/Beacon/index.htm" class="home-rotator-text"><span class=\'home-tooltip-header\'>BEACON</span><br>The extremely low-cost Beacon is the world&rsquo;s first landline-based remote monitoring system providing Web-based alarm notification with interactive mapping for viewing and reviewing remote sites. When any of the monitored conditions change, the Antx Remote Tracking system is called. It then performs any user-specified alarm notifications via e-mail, text-messaging and/or voice calls and also records all the information for future reporting.</a>');
    ban1.addItem('<a href="Products/RT/index.htm" class="home-rotator-text"><span class=\'home-tooltip-header\'>SCOUT-RT</span><br>The RT-Series products provide a complete wireless solution for monitoring, alarming and reporting on your remote sites &mdash; in cities, rural areas or off the beaten path &mdash; whether your input is an on/off condition, a pulse counter or an analog input. Each RT unit immediately reports all monitored points as they go into or out of alarm conditions. Each unit provides scheduled updates giving the status of all monitored points, as frequently as every 5 minutes.</a>');
    ban1.addItem('<a href="Products/TM/index.htm" class="home-rotator-text"><span class=\'home-tooltip-header\'>TEMPERATURE MONITOR</span><br>A low-cost, reliable temperature monitoring and alarm notification system you need, whether the application is refrigeration, cooling/storage, buildings, vacation homes, food storage, data centers, vaccine or blood storage. If the temperature falls outside your desired range, you&rsquo;ll be notified by phone, pager, text messaging or e-mail. It even has a relay that can be automatically or remotely activated to turn on heaters, fans, compressors, and more.</a>');
    ban1.addItem('<a href="Products/ElitePC/index.htm" class="home-rotator-text"><span class=\'home-tooltip-header\'>ELITE PUMP CONTROLLER</span><br>Reliable and easy to install, this pump controller offers advanced functions for pumping and lift stations, and remote monitoring and alarm notification in a single, integrated controller. Users easily configure a complete control panel, quickly see run times, cycles, alternations, and level and set-points on the front panel, and can program from the front pad or remotely via phone, in just minutes, by answering a set of questions.</a>');
    ban1.addItem('<a href="Products/SCAP/index.htm" class="home-rotator-text"><span class=\'home-tooltip-header\'>SCOUT CENTRAL ALARM PANEL (SCAP)</span><br>Dedicated to providing local and remote alarm notification for the HVAC and building operation markets, the SCAP monitors 8 on/off conditions and up to 3 analogs (typically temperature or humidity sensors). With simple programming, listening-in capabilities, pre-programmed or user-spoken messages, remote dial-in operations, and historical event logs, call-outs and alarms, this system is what you want need for your operations.</a>');
    
    var ban2 = new dw_Banner('imgBanner', 10000);
    // put your items here
    ban2.addItem('<a href="http://www.aquavx.com" target="_blank"><img src="images/site/home/Aquavx.jpg" width="120" height="109" alt="AquavxScout" border="0"></a>');
    ban2.addItem('<a href="Products/Messenger/index.htm"><img src="images/site/home/Messenger.jpg" width="120" height="109" alt="Messenger" border="0"></a>');
	ban2.addItem('<a href="Products/Scout/index.htm"><img src="images/site/home/DialogScout.jpg" width="120" height="109" alt="DialogScout" border="0"></a>');
    ban2.addItem('<a href="Products/Elite/index.htm"><img src="images/site/home/DialogElite.jpg" width="120" height="109" alt="DialogElite" border="0"></a>');
    ban2.addItem('<a href="Products/ScoutPLC/index.htm"><img src="images/site/home/ScoutPLC.jpg" width="120" height="109" alt="ScoutPLC" border="0"></a>');
    ban2.addItem('<a href="Products/Elite200/index.htm"><img src="images/site/home/Elite200.jpg" width="120" height="109" alt="Elite200" border="0"></a>');
    ban2.addItem('<a href="Products/ElitePLC/index.htm"><img src="images/site/home/ElitePLC.jpg" width="120" height="109" alt="ElitePLC" border="0"></a>');
    ban2.addItem('<a href="Products/Beacon/index.htm"><img src="images/site/home/Beacon.jpg" width="120" height="109" alt="Beacon" border="0"></a>');
    ban2.addItem('<a href="Products/RT/index.htm"><img src="images/site/home/ScoutRT.jpg" width="120" height="109" alt="ScoutRT" border="0"></a>');
    ban2.addItem('<a href="Products/TM/index.htm"><img src="images/site/home/TM.jpg" width="120" height="109" alt="TM" border="0"></a>');
    ban2.addItem('<a href="Products/ElitePC/index.htm"><img src="images/site/home/ElitePC.jpg" width="120" height="109" alt="ElitePC" border="0"></a>');
    ban2.addItem('<a href="Products/SCAP/index.htm"><img src="images/site/home/SCAP.jpg" width="120" height="109" alt="SCAP" border="0"></a>');
    
    dw_Banner.setPartners(ban1, ban2);
    ban1.rotate();  
    ban2.rotate(); 
}

dw_Banner.setPartners = function(p1, p2) {
    p1.el = document.getElementById(p1.id);
    p2.el = document.getElementById(p2.id);
    if (p1.el && p2.el) {
        p1.el.onmouseover = dw_Banner.tandemHalt;
        p2.el.onmouseover = dw_Banner.tandemHalt;
        p1.el.onmouseout = dw_Banner.tandemResume;
        p2.el.onmouseout = dw_Banner.tandemResume;
        p1.partner = p2; p2.partner = p1;
    }
}

dw_Banner.tandemHalt = function() {
    var curObj = dw_Banners[this.id];
    if ( curObj && curObj.partner ) {
        clearTimeout(curObj.timer); curObj.timer = null;
        clearTimeout(curObj.partner.timer); curObj.partner.timer = null; 
    }
}

dw_Banner.tandemResume = function(e) {
    e = e? e: window.event;
    var toEl = e.relatedTarget? e.relatedTarget: e.toElement;
    if ( this != toEl && !dw_contained(toEl, this) ) { 
        var curObj = dw_Banners[this.id];
        if ( curObj && curObj.partner ) {
            curObj.timer = setTimeout(curObj.animString + ".rotate()", dw_Banner.restartDelay);
            curObj.partner.timer = setTimeout(curObj.partner.animString + ".rotate()", dw_Banner.restartDelay);        
        }
    }     
}
