﻿//************************************************************************************* 
// File     :   clock.js
// Version  :   1.0
// Requires :   mf_domLibrary_0.1.js, prototype.js
// Author   :   Marcus Steinbeck (ms)
// Origin   :   mindfly.com
// Created  :   December 3, 2007 (ms)
// Modified :   December 3, 2007 (ms)
// Purpose  :   Controls the clock.      
//*************************************************************************************

// Version History (only for changes of at least 0.0.1 in version number)
// ===============
// Version 1.0   (12/03/2007) - Basic functionality. 


//=============================================================================================
// runClock()
//=============================================================================================
// Runs the clock.
function runClock() 
{
    if($('brandingClock'))
    {
        var so = new SWFObject("/flash/clock/nkidClock.swf", "headerClock", "111", "111", "8", "#00FF00");
        so.addParam("wmode", "transparent");
        so.addVariable("timeXMLPath", "/flash/clock/BellinghamTime.ashx" + "?jsArtifact=" + new Date().getTime()); // "?jsArtifact=" + new Date().getTime() -> Prevent IE from caching the XML file upon refresh of page (resulting in the wrong time being displayed for 15 seconds until flash client syncs)
        so.write("brandingClock");
    }
}; // end of function runClock()

addLoadEvent(runClock);