function init() {
     if ( top.frames[0].thisUsername == "" ) {
          top.location.href = "login.php?message=You have been logged out of the site";
     } else {
          document.all.spanUserName.innerHTML = top.frames[0].thisUserFullName;
     }
}

function rollOver( imgName , pixWidth ) {
     eval("document.all." + imgName  + ".style.color = '#000000'");
     eval("document.all." + imgName  + ".style.background = 'url(" + rootRef + "images/tabs/yellowTab_" + pixWidth + ".jpg) no-repeat'");
     eval("document.all." + imgName  + ".style.cursor = 'hand'");
}

function rollOut( imgName , pixWidth ) {
     eval("document.all." + imgName  + ".style.color = '#FFFFFF'");
     eval("document.all." + imgName  + ".style.background = 'url(" + rootRef + "images/tabs/blueTab_" + pixWidth + ".jpg) no-repeat'");
}

function clickTab( pageUrl ) {
     location.href = pageUrl;
}

var ns6=document.getElementById&&!document.all 
var ie=document.all 

function changeto(e,highlightcolor){ 
	source=ie? event.srcElement : e.target 
	if (source.tagName=="TABLE") 
	return 
	while(source.tagName!="TR"&&source.tagName!="HTML") 
	source=ns6? source.parentNode : source.parentElement 
	if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore") 
	source.style.backgroundColor=highlightcolor 
} 

function contains_ns6(master, slave) {
	while (slave.parentNode) 
	if ((slave = slave.parentNode) == master) 
	return true; 
	return false; 
} 

function changeback(e,originalcolor){ 
	if (ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")) 
	return 
	else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore")) 
	return 
	if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source) 
	source.style.backgroundColor=originalcolor 
} 

function getModalDatePage(pDate,rootReference) {
	var Attr = "dialogHeight:225px;dialogWidth:200px;dialogTop:" + (event.offsetY + 250) + ";dialogLeft:" + (event.offsetX + 320) + ";center:no;resizable:no;status:no;help:no;";
    var retDate = window.showModalDialog(rootReference + "include/calendar.htm",pDate, Attr);
    return retDate
}
