<!--
function openAdminWindow(url){
	var editWin=window.open(url,"cmsadmin","top=50,left=150,width=650,height=560,scrollbars=1,menubar=0,resizable=yes");
	editWin.focus();
} 

function openEditWin(url){
	var editWin=window.open(url,"cmsEditWindow","top=50,left=150,width=650,height=520,menubar=0,scrollbars=1,resizable=yes");
	editWin.focus();
}

function editText(pgID, componentID, admin_nav_id, seq, e, cssOverride){
	var elem;
	var newwin;
	//This allows the admin to bypass links when clicking on editable elements
	//default behavior is for links to work, even in edit mode.  Depending on site layout,
	//it may be hard for the admin to click the "hot" area to open the editor.
	//With this, using the control key modifier opens the edit window even it the target is a link.
	var evtobj=window.event? event : e;
	evtobj.srcElement?elem=e.srcElement:elem=e.target
	var currnode=elem.nodeName;
	var parentnode=elem.parentNode.nodeName;
	var ismac=navigator.userAgent.indexOf("Mac") > 0 ? true:false;
	if (!ismac && evtobj.ctrlKey)
	{
		openEditWin("/cms/admin/editText.aspx?pgID=" + pgID + "&componentID=" + componentID + "&admin_nav_id=" + admin_nav_id + "&seq=" + seq + "&cssOverride=" + cssOverride);
		evtobj.cancelBubble = true;
		evtobj.returnValue = false;
		return false;
	}
	else
	{
		if (e.metaKey)
		{
			openEditWin("/cms/admin/editText.aspx?pgID=" + pgID + "&componentID=" + componentID + "&admin_nav_id=" + admin_nav_id + "&seq=" + seq + "&cssOverride=" + cssOverride);
			e.cancelBubble = true;
			e.returnValue = false;
			return false;
		}
	}
	if(currnode=="A")
	{
		if (elem.target=="" || elem.target=="_self")
		{
			return window.location=elem.href;	
		}
		else
		{
			newwin=window.open(elem.href,"newwin");
			return newwin;	
		}
	}
	if (parentnode=="A")
	{
		if (elem.parentNode.target=="" || elem.parentNode.target=="_self")
		{
			return window.location=elem.parentNode.href;
		}
		else
		{
			newwin=window.open(elem.parentNode.href,"newwin");
			return newwin;	
		}
	}
    openEditWin("/cms/admin/editText.aspx?pgID=" + pgID + "&componentID=" + componentID + "&admin_nav_id=" + admin_nav_id + "&seq=" + seq + "&cssOverride=" + cssOverride);
}

function editNewsSettings(pgID, componentID){
    openEditWin("/cms/admin/editNewsSettings.aspx?pgID=" + pgID + "&componentID=" + componentID);
}

function editContactUsSettings(pgID, componentID){
    openEditWin("/cms/admin/contactUsSettings.aspx?pgID=" + pgID + "&componentID=" + componentID);
}

function addNewsStory(pgID, componentID, admin_nav_id, seq){
    openEditWin("/cms/admin/editNews.aspx?pgID=" + pgID + "&componentID=" + componentID + "&newNewsItem=1" + "&admin_nav_id=" + admin_nav_id + "&seq=" + seq);
}

function editNews(pgID, componentID, newsID, admin_nav_id, seq){
    openEditWin("/cms/admin/editNews.aspx?pgID=" + pgID + "&componentID=" + componentID + "&newsID=" + newsID + "&admin_nav_id=" + admin_nav_id + "&seq=" + seq);
}

function editSportsScheduleSettings(pgID, componentID){
    openEditWin("/cms/admin/editSportsScheduleSettings.aspx?pgID=" + pgID + "&componentID=" + componentID);
}

function addSportsScheduleItem(pgID, componentID, academicYearID, admin_nav_id, seq){
    openEditWin("/cms/admin/editSportsSchedule.aspx?pgID=" + pgID + "&componentID=" + componentID + "&academicYearID=" + academicYearID + "&newSchItem=1" + "&admin_nav_id=" + admin_nav_id + "&seq=" + seq);
}
	
function editSportsScheduleItem(pgID, componentID, scheduleID, admin_nav_id, seq){
    openEditWin("/cms/admin/editSportsSchedule.aspx?pgID=" + pgID + "&componentID=" + componentID + "&scheduleID=" + scheduleID + "&admin_nav_id=" + admin_nav_id + "&seq=" + seq);
}

function editCalendarSettings(pgID, componentID){
    openEditWin("/cms/admin/editCalendarSettings.aspx?pgID=" + pgID + "&componentID=" + componentID);
}

function addCalendarItem(pgID, componentID, academicYearID, admin_nav_id, seq){
    openEditWin("/cms/admin/editCalendarItem.aspx?pgID=" + pgID + "&componentID=" + componentID + "&academicYearID=" + academicYearID + "&newCalItem=1" + "&admin_nav_id=" + admin_nav_id + "&seq=" + seq);
}
	
function editCalendarItem(pgID, componentID, calendarID, admin_nav_id, seq){
    openEditWin("/cms/admin/editCalendarItem.aspx?pgID=" + pgID + "&componentID=" + componentID + "&calendarID=" + calendarID + "&admin_nav_id=" + admin_nav_id + "&seq=" + seq);
}

function openDirectionsWin(scheduleID){
	var locWin=window.open("/cms/components/scheduleDirections.aspx?scheduleID="+scheduleID,"Directions","top=50,left=150,width=300,height=200,menubar=0,scrollbars=1,resizable=yes");
	locWin.focus();
}

function openCalDirectionsWin(calendarID){
	var locWin=window.open("/cms/components/scheduleDirections.aspx?calendarID="+calendarID,"Directions","top=50,left=150,width=300,height=200,menubar=0,scrollbars=1,resizable=yes");
	locWin.focus();
}

function openSummaryWin(scheduleID){
	var locWin=window.open("/cms/components/scheduleSummary.aspx?scheduleID="+scheduleID,"Summary","top=50,left=150,width=300,height=200,menubar=0,scrollbars=1,resizable=yes");
	locWin.focus();
}

function setCursor(){
    var f=document.forms[0];
    if (f){
        for (x=0;x<f.length;x++){
            if (f[x].type=="text"){
                f[x].focus();
                break;
            }
        }
    }
}

function getElement(f, clientID, name){
    return f.elements[clientID + ":" + name];
}

function addSlideShow(pgID, component_id, admin_nav_id){
	var url="/cms/admin/newSlideShow.aspx?pgID=" + pgID + "&componentID=" + component_id + "&admin_nav_id=" + admin_nav_id + "&seq=1";
	var editWin=window.open(url,"slideshow","top=50,left=150,width=650,height=520,scrollbars=1,menubar=0,resizable=yes");
	editWin.focus();
}

function editSlideShow(pgID,component_id, ss_type_id,admin_nav_id){
	var url="/cms/admin/editSlideShow.aspx?pgID=" + pgID + "&componentID=" + component_id + "&ss_type_id=" + ss_type_id + "&admin_nav_id=" + admin_nav_id + "&seq=2";
	var editWin=window.open(url,"slideshow","top=50,left=150,width=650,height=555,scrollbars=1,menubar=0,resizable=yes");
	editWin.focus();
}

function CheckSlideShowSelect(l,f){
	var selected=l.options[l.selectedIndex].value;
	var currentSlideShowType="Contenttemplatecontrol2:ComponentRepeater:_ctl2:_ctl0:currentSlideShowType";
	f[currentSlideShowType].value=selected;
	alert(f[currentSlideShowType].value);
	f.submit();
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

/******************************************
* Contractible Headers Script- © Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
******************************************/

var ns6=document.getElementById&&!document.all?1:0

var head="display:''"
var folder=''

function expandit(curobj){
folder=ns6?curobj.nextSibling.nextSibling.style:document.all[curobj.sourceIndex+1].style
if (folder.display=="none")
folder.display=""
else
folder.display="none"
}

/******************************************
* style controls for TemplateTextControl
******************************************/
function hilite(e,bgcolor,bordercolor)
{
	e.style.padding="0";
	e.style.borderWidth="1px";
	e.style.borderStyle="solid";
	e.style.borderColor=(bordercolor==""?defaultbordercolor:bordercolor);
	e.style.backgroundColor=(bgcolor==""?defaultbgcolor:bgcolor);
}

function unhilite(e)
{
	e.style.padding="1px";
	e.style.borderWidth="0";
	e.style.borderColor="";
	e.style.backgroundColor="";
	e.style.borderStyle="none";
}
//-->    