// JavaScript Document
/*This is the Clock functions*/
var timerID = null;
var timerRunning = false;
function stopclock (){
        if(timerRunning)
                clearTimeout(timerID);
        timerRunning = false;
}

function startclock () {
        stopclock();
        showtime();
}

function showtime () {
        var now = new Date();
        var hours = now.getHours();
        var minutes = now.getMinutes();
        var seconds = now.getSeconds()
        var timeValue = "" + ((hours >12) ? hours -12 :hours)
        timeValue += ((minutes < 10) ? ":0" : ":") + minutes
        timeValue += ((seconds < 10) ? ":0" : ":") + seconds
        timeValue += (hours >= 12) ? " P.M." : " A.M."
         document.getElementById('date_time').innerHTML = showdate(now) + timeValue;
        timerID = setTimeout("showtime()",1000);
        timerRunning = true;
}

/*End Clock Functions*/

function showdate(today){
	var month = today.getMonth() + 1;
	var day = today.getDate();
	var year = today.getFullYear();
	var s = "/";
    return month + s + day + s + year+ "  |  ";
	
}
function StartFunctions(){
	//just place all of the functions to start at load here
	startclock();	
}

var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-22425917-1']);
  _gaq.push(['_setDomainName', 'mclimans.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
