<!--
var editWin=null;
function openWindow(url,pgID,seq){
	closeEditWin();
	url=url+"?pgID=" + pgID + "&seq=" + seq;
	editWin=window.open(url,"admin","top=50,left=150,width=650,height=500,scrollbars=1,menubar=0");
	editWin.focus();
	}
	
function editText(component_id){
	closeEditWin();
	url="/admin/editText.asp?component_id=" +component_id;
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
	editWin.focus();
	}
	
function newText(pgID){
	if (confirm("Use the NEW TEXT button if you want to completely replace this text component.  If you want to EDIT the text, use the \"E\" button.")){
		closeEditWin();
		url="/admin/editText.asp?mode=new&pgID=" +pgID;
		editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
		editWin.focus();
		}
	}

function editNews(ed_id,news_type_id){
	closeEditWin();
	url="/admin/editNews.asp?ed_id=" + ed_id + "&news_type_id=" + news_type_id +"&action=edit";
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
	editWin.focus();
	}

function addNewsStory(news_type_id){
	closeEditWin();
	url="/admin/editNews.asp?news_type_id=" + news_type_id + "&action=edit";
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
	editWin.focus();
	}
	
function editEvent(event_id){
	closeEditWin();
	url="/admin/editEvent.asp?event_id=" + event_id + "&action=edit";
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
	editWin.focus();
	}

function addEventStory(){
	closeEditWin();
	url="/admin/editEvent.asp?action=edit";
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
	editWin.focus();
	}

function editAdvancement(event_id){
	closeEditWin();
	url="/admin/editAdvancement.asp?event_id=" + event_id + "&action=edit";
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
	editWin.focus();
	}

function addAdvancement(){
	closeEditWin();
	url="/admin/editAdvancement.asp?action=edit";
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
	editWin.focus();
	}

function editSports(sports_id){
	closeEditWin();
	url="/admin/editSports.asp?sports_id=" + sports_id + "&action=edit";
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
	editWin.focus();
	}

function addSports(){
	closeEditWin();
	url="/admin/editSports.asp?action=edit";
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
	editWin.focus();
	}
	
function editSportsSchedule(schedule_id){
	closeEditWin();
	url="/admin/editSportsSchedule.asp?schedule_id=" + schedule_id + "&action=edit";
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
	editWin.focus();
	}

function addSportsSchedule(team_id){
	closeEditWin();
	url="/admin/editSportsSchedule.asp?team_id=" + team_id + "&schedule_id=&action=edit";
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizeable=1");
	editWin.focus();
	}
	
function deleteNews(ed_id){
	closeEditWin();
	url="/admin/deleteNews.asp?action=show&ed_id=" +ed_id;
	editWin=window.open(url,"editWindow","top=50,left=150,width=350,height=150,menubar=0,scrollbars=0,resizeable=1");
	editWin.focus();
	}

function closeEditWin(){
	if (editWin !=null){
		editWin.close();
		}
	}
	
function checkInquiry(f){
	var fld;
	var fldName;
	var rfields=f.rfields.value.split(",");
	var rfieldNames=f.rfieldNames.value.split(",");
	var proceed=true;
	for (x=0;x<rfields.length;x++){
		fld=f[rfields[x]];
		fldName=rfieldNames[x];
		if (isWhitespace(fld.value)){
			alert("Please complete the " + fldName + " field.");
			fld.focus();
			proceed=false;
			break;
			}
		}
	if (f.email){
		if (!isWhitespace(f.email.value)){
			if (!isEmail(f.email.value)){
				f.email.value="Invalid"
				}
			}
		}
	return proceed;
	}

function checkSearch(f){
	if (isWhitespace(f.keywords.value)){
		alert("Please enter a keyword.")
		f.keywords.focus();
		return false;
		}
	}
	
function printFriendly(ed_id){
	//closeEditWin();
	url="/printFriendly.asp?ed_id=" +ed_id;
	editWin=window.open(url,"editWindow","top=50,left=150,width=600,height=400,menubar=1,scrollbars=1,resizeable=1");
	}
	
function emailToFriend(url,ed_id){
	//alert("test")
	//closeEditWin();
	url="/emailFriend.asp?url=" +escape(url) + "&ed_id=" + ed_id;
	editWin=window.open(url,"editWindow","top=50,left=150,width=600,height=400,menubar=0,scrollbars=1,resizeable=1");
	}

//-->