<!--
var editWin=null;
var stfWin=null;
var pfWin=null;

function openWindow(url,pgID,seq,admin_nav_name){
	if (admin_nav_name=='Change Log'){
		return openChangeLogWindow(url,pgID,seq,admin_nav_name);
		}
	closeEditWin();
	url=url+"?pgID=" + pgID + "&seq=" + seq +"&admin_nav_name=" +escape(admin_nav_name);
	editWin=window.open(url,"admin","top=50,left=150,width=650,height=510,scrollbars=1,menubar=0,resizable=1");
	editWin.focus();
	}

function openChangeLogWindow(url,pgID,seq,admin_nav_name){
	closeEditWin();
	url=url+"?pgID=" + pgID + "&seq=" + seq +"&admin_nav_name=" +escape(admin_nav_name);
	editWin=window.open(url,"admin","top=50,left=150,width=800,height=600,scrollbars=1,menubar=1,resizable=1");
	editWin.focus();
	}
	
function editText(component_id,text_id,pgID){
	closeEditWin();
	url="/admin/editText.asp?mode=edit&component_id=" + component_id + "&text_id=" +text_id +"&pgID=" + pgID;
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizable=1");
	editWin.focus();
	}

function editLocation(location_id){
	closeEditWin();
	url="/admin/editLocation.asp?mode=edit&location_id=" + location_id;
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizable=1");
	editWin.focus();
	}

function newLocation(){
	closeEditWin();
	url="/admin/editLocation.asp?mode=newLocation";
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizable=1");
	editWin.focus();
	}
	
function addNewsStory(){
	closeEditWin();
	url="/admin/editNews.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 editNews(news_id){
	closeEditWin();
	url="/admin/editNews.asp?news_id=" + news_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 editFooter(){
	closeEditWin();
	url="/admin/editFooter.asp"
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizable=1");
	editWin.focus();
	}

function closeEditWin(){
	if (editWin !=null){
		editWin.close();
		}
	}

function closestfWin(){
	if (stfWin !=null){
		stfWin.close();
		}
	}

function closepfWin(){
	if (pfWin !=null){
		pfWin.close();
		}
	}

function printerFriendly(lnk){
	closepfWin();
	url=lnk;
	pfWin=window.open(url,"pf","top=50,left=150,width=550,height=510,scrollbars=1,menubar=1,resizable=1");
	pfWin.focus();
	//pfWin.opener.location.reload();
	}
	
function checkForm(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 (!isEmail(f.email.value)){
		alert("Please enter a valid email address.");
		f.email.focus();
		proceed=false;
		}
		return proceed;
	}
	
function setLocation(f){
	var location_id=f.options[f.selectedIndex].value;
	if (location_id !=""){
		window.location="setLocation.asp?location_id=" + location_id;
		}
	}
	
function editGeneralInfo(location_id){
	closeEditWin();
	url="/admin/editLocation.asp?mode=edit&location_id=" + location_id;
	editWin=window.open(url,"editWindow","top=50,left=150,width=650,height=500,menubar=0,scrollbars=1,resizable=1");
	editWin.focus();
	}

function printpage() {
window.print();  
}

function checkMailingList(f){
	if (isWhitespace(f.first_name.value)){
		alert("Please enter your first name.");
		f.first_name.focus();
		return false;
		}
	if (isWhitespace(f.last_name.value)){
		alert("Please enter your last name.");
		f.last_name.focus();
		return false;
		}
	if (!isEmail(f.email.value)){
		alert("Please enter a valid email address.");
		f.email.focus();
		return false;
		}
	if(!isWhitespace(f.birthdate.value)){
		return checkStringDate(f.birthdate,"Birth Date");
		}
	}
//-->
