//variables
var timerID = null;
var timerOn = false;
var timecount = 200;
var divName = 'newLocInfo';
var offX = 8;
var offY = 8;

function getCurrentMonth() {
    var dt = new Date;
    var month = new Array(12);
    month[0] = "January";
    month[1] = "February";
    month[2] = "March";
    month[3] = "April";
    month[4] = "May";
    month[5] = "June";
    month[6] = "July";
    month[7] = "August";
    month[8] = "September";
    month[9] = "October";
    month[10] = "November";
    month[11] = "December";
    document.getElementById('cMonth').innerHTML = month[dt.getMonth()] + " Calendar";
}

function placeMenus() {
    if (navigator.appName == "Microsoft Internet Explorer" && document.body.clientWidth >= 700) {
          document.getElementById('menu_aboutus').style.left = (((parseInt(document.body.clientWidth) - 700) / 2) + 75) + 'px';
          document.getElementById('menu_classes').style.left = (((parseInt(document.body.clientWidth) - 700) / 2) + 172) + 'px';
          document.getElementById('menu_calendar').style.left = (((parseInt(document.body.clientWidth) - 700) / 2) + 251) + 'px';
          document.getElementById('menu_forms').style.left = (((parseInt(document.body.clientWidth) - 700) / 2) + 345) + 'px';
          document.getElementById('menu_contact').style.left = (((parseInt(document.body.clientWidth) - 700) / 2) + 585) + 'px';
          //document.getElementById('menuSplosion_right').style.marginLeft = '12px';
          //document.getElementById('menuSplosion_left').style.marginLeft = '-702px';
          //document.getElementById('floral_right').style.marginLeft = '-45px';
          //document.getElementById('floral_left').style.marginLeft = '-831px';
	}
	else if (navigator.appName!="Microsoft Internet Explorer" && window.outerWidth >= 700) {
	        document.getElementById('menu_aboutus').style.left = (((parseInt(window.outerWidth) - 700) / 2) + 58) + 'px';
	        document.getElementById('menu_classes').style.left = (((parseInt(window.outerWidth) - 700) / 2) + 158) + 'px';
	        document.getElementById('menu_calendar').style.left = (((parseInt(window.outerWidth) - 700) / 2) + 237) + 'px';
	        document.getElementById('menu_forms').style.left = (((parseInt(document.body.clientWidth) - 700) / 2) + 345) + 'px';
	        document.getElementById('menu_contact').style.left = (((parseInt(document.body.clientWidth) - 700) / 2) + 585) + 'px';
	}
}

function viewMenu(Menu) {
//var imgId = Menu + '_img'
document.getElementById(Menu).style.visibility='visible'; 
//document[imgId].src='images/'+Menu+'_over.png'
} 

function hideMenu(Menu) {
//var imgId = Menu + '_img'
document.getElementById(Menu).style.visibility='hidden';
//document[imgId].src='images/'+Menu+'_def.png'
} 

function hideAll(){
    hideMenu('menu_aboutus');
    hideMenu('menu_classes');
    hideMenu('menu_calendar');
    hideMenu('menu_forms');
    hideMenu('menu_contact');
    } 

function startTime(x,y) {
    if (timerOn == false) {
    timerID=setTimeout( "hideAll()" , timecount);
    timerOn = true;
    }
    } 

function stopTime() {
    if (timerOn) {
    clearTimeout(timerID);
    timerID = null;
    timerOn = false;
    }
}

function follow(event) {
    var mouseX = Math.round(event.clientX);
    var mouseY = Math.round(event.clientY);
    var flyingObj = document.getElementById(divName);
    flyingObj.style.visibility = 'visible';
    flyingObj.style.left = (mouseX + offX) + "px";
    flyingObj.style.top = (mouseY + offY) + "px";
}

function hidePopup() {
    document.getElementById(divName).style.visibility = 'hidden';
}



