/* Highlight Table Cells Script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com */

function changeto(highlightcolor){
	source=event.srcElement
	if (source.tagName=="TR"||source.tagName=="TABLE")
		return
	while(source.tagName!="TD")
		source=source.parentElement
	if (source.style.backgroundColor!=highlightcolor) {
		source.style.backgroundColor=highlightcolor
		source.children.tags('A')[0].style.color = '#000000'; }
}

function changeback(originalcolor){
	if (event.fromElement.contains(event.toElement)||source.contains(event.toElement))
		return
	if (event.toElement!=source) {
		source.style.backgroundColor=originalcolor
		source.children.tags('A')[0].style.color = '#FFFFFF'; }
}

//----------------------------------------------------------------
function link(src){ 
	if(event.srcElement.tagName=='TD')
		src.children.tags('A')[0].click();
}

//-------Date Displayer-------------------------------------------
function MakeArray(n) {
	this.length = n
	return this
}
monthNames = new MakeArray(12)
monthNames[1] = "January"
monthNames[2] = "February"
monthNames[3] = "March"
monthNames[4] = "April"
monthNames[5] = "May"
monthNames[6] = "June"
monthNames[7] = "July"
monthNames[8] = "August"
monthNames[9] = "September"
monthNames[10] = "October"
monthNames[11] = "November"
monthNames[12] = "December"
function customDateString(oneDate) {
	var theMonth = monthNames[oneDate.getMonth() + 1]
	var theYear = oneDate.getFullYear()
	return theMonth + " " + oneDate.getDate() + ", " + theYear
}

//-------------New Window Display---------------------------------
function getwindow(image, iwidth, iheight) {
	var winname = 'imgwin';
	var settings = "'resizable=no,status=no,scrollbars=no,width=" + iwidth + 
		",height=" + iheight +"'";
	window.open(image,winname,settings)
}


//-----------------Check Top-------------------------
function checktop(window) {
	if (window != top) top.location.href = location.href;
}