function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}

function displayDate()
{
today = new Date();
strWeekday = today.getDay();
strToday = today.getDate();
strMonth = today.getMonth();
strYear = today.getYear();

// Correct Year for year 2000+
if (strYear < 1000)
strYear += 1900;

// Get Month
switch(strMonth)
{
case 0:
strMonth = "January"
break;
case 1:
strMonth = "February"
break;
case 2:
strMonth = "March"
break;
case 3:
strMonth = "April"
break;
case 4:
strMonth = "May"
break;
case 5:
strMonth = "June"
break;
case 6:
strMonth = "July"
break;
case 7:
strMonth = "August"
break;
case 8:
strMonth = "September"
break;
case 9:
strMonth = "October"
break;
case 10:
strMonth = "November"
break;
case 11:
strMonth = "December"
break;
}


document.write (strMonth + " " + strToday + ", " + strYear);
}
function displayTime()
{
var	Stamp = new Date();
var Hours;
var Mins;
var Time;
Hours = Stamp.getHours();
if (Hours >= 12) {
Time = " PM";
}
else {
Time = " AM";
}

if (Hours > 12) {
Hours -= 12;
}

if (Hours == 0) {
Hours = 12;
}

Mins = Stamp.getMinutes();

if (Mins < 10) {
Mins = "0" + Mins;
}

document.write(Hours + ":" + Mins + Time + '');
}


  
function leave(){

alert ("You are now leaving the Chesapeake Public Schools website.");

}

	function dropdownover(x,y){
		//x is this, y is the div
		document.getElementById(y).style.left = x.offsetLeft;
		document.getElementById(y).style.top = x.offsetTop + 28;
		document.getElementById(y).style.visibility = 'visible'; 
		x.style.background = 'white';
		x.style.border = '1px solid #7F7F7F';
	
	}
	
	function dropdownout(x,y){
		document.getElementById(y).style.visibility = 'hidden';
		x.style.background = '';
		x.style.border = '1px solid #F4F4F4';
	}
	
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


