<!-- 
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//home page - on click change article in culver city highlights
function show(object,numDivs) { 
	var i=1
	for (i=1;i<=numDivs;i++)
	{
		document.getElementById('divCont'+i).style.visibility = "hidden"; 
	}
	document.getElementById(object).style.visibility = "visible"; 
} 

//home page - on select change change goes to page selected
function goThere() {
	selInd = document.searchForm.destination.selectedIndex; 
	goURL = document.searchForm.destination.options[selInd].value;
	if (goURL != "") {
		top.location.href = goURL; 
	}
}

//home page - auto forward article in culver city highlights
var boardNum = 1;
var boardSpeed = 10000;

function changeBoard(theBoard,numDivs) {
		if (boardNum <= numDivs)
			boardNum++;
		else
			boardNum = 1;
			//theBoard = "divCont"+boardNum
			var i=2
			for (i=2;i<=numDivs;i++)
			{
				document.getElementById('divCont'+i).style.visibility = "hidden"; 
			}
			document.getElementById(theBoard).style.visibility = "visible"; 
			setTimeout("changeBoard('+numDivs+')",boardSpeed);
}

function changeBoard2(numDivs) {
//		document.getElementById('divCont'+boardNum).style.visibility = "hidden"; 
		var i=2
		for (i=2;i<=numDivs;i++)
		{
			document.getElementById('divCont'+i).style.visibility = "hidden"; 
		}

		if (boardNum < numDivs) {
			boardNum++;
		} else {
			boardNum = 2;
		}
		//alert(boardNum);
		document.getElementById('divCont'+boardNum).style.visibility = "visible"; 
		setTimeout("changeBoard2('"+numDivs+"')",boardSpeed);
}

function startUp(numDivs) {
		numDivs = numDivs
		setTimeout("changeBoard2('"+numDivs+"')",boardSpeed);
}


function changeBoard3(numDivs) {
//		document.getElementById('divCont'+boardNum).style.visibility = "hidden"; 
		var i=2
		for (i=2;i<=numDivs;i++)
		{
			document.getElementById('divCont'+i).style.visibility = "hidden"; 
		}

		if (boardNum < numDivs) {
			boardNum++;
		} else {
			boardNum = 2;
		}
		//alert(boardNum);
		document.getElementById('divCont'+boardNum).style.visibility = "visible"; 
		setTimeout("changeBoard3('"+numDivs+"')",boardSpeed);
}

function startUp2(numDivs) {
		numDivs = numDivs
		setTimeout("changeBoard3('"+numDivs+"')",boardSpeed);
}

//nav bar toggle functionality
function toggleMenu(currMenu){
 if (document.getElementById) {
  thisMenu = document.getElementById(currMenu).style
 if (thisMenu.display == "block") {
  thisMenu.display = "none" 
  } else {
   thisMenu.display = "block" }
   return false }
 else {
  return true } 
} 

function toggleMenu(currMenu){
 if (document.getElementById) {
  thisMenu = document.getElementById(currMenu).style
 if (thisMenu.display == "block") {
  thisMenu.display = "none" 
  } else {
   thisMenu.display = "block" }
   return false }
 else {
  return true } 
 } 
  
//used to popup bios of council members & exec management
function openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
  }

//used to open council commendation images  
function openCommendationPhoto(theURL,winName) { 
	window.open(theURL,winName,'toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable=yes,width=520,height=400');
  }
  
//form check for http://user.govoutreach.com/culvercity/? page  
function checkEmailUsForm() {
	if (document.theForm.firstName.value == "") {
		alert("You must enter your first name.");
		return false;
	} 
	if (document.theForm.lastName.value == "") {
		alert("You must enter your last name.");
		return false;
	} 
	if (document.theForm.email.value == "") {
		alert("You must enter your email address.");
    	document.theForm.email.focus();
		return false;
	} 
	if (echeck(document.theForm.email.value)==false){
		alert("You must enter a valid email address.");
    	document.theForm.email.focus();
		return false;
	}
	if (document.theForm.subject.value == "") {
		alert("You must enter the email subject.");
		return false;
	} 
	if (document.theForm.description.value == "") {
		alert("You must enter the text for your email.");
		return false;
	} 
	return true;
}

//checks if an email address is valid
function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   //alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   //alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    //alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    //alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}
  
 //validates form on employment/notify.asp page 
 function validEmpNotifyForm(userInfo) {
      if (userInfo.name.value == "") {
         alert("You must enter a name.")
         userInfo.name.focus()
         return false
      }
      if (userInfo.email.value == "") {
         alert("You must enter an email address.")
         userInfo.email.focus()
         return false
      }	  	  	  
 	if (echeck(userInfo.sender_email.value)==false){
		alert("You must enter a valid email address.");
    	userInfo.sender_email.focus();
		return false;
	}
       return true
   }
 
//used for it/intact_maps.asp
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// for it/mapcatalog.asp
function openURL()
{ 
// grab index number of the selected option
selInd = document.FrontPage_Form1.selectList.selectedIndex; 

// get value of the selected option
goURL = document.FrontPage_Form1.selectList.options[selInd].value;

// redirect browser to the grabbed value
top.location.href = goURL; 
}

// for it/mapcatalog.asp
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.selectList.selectedIndex == 0)
  {
    alert("The first \"selectList\" option is not a valid selection.  Please choose one of the other options.");
    theForm.selectList.focus();
    return (false);
  }
  return (true);
}
 
// for pw/tree_species.asp 
function getStreetNums() {
	theStreet = document.findTrees.street.options[document.findTrees.street.selectedIndex].value;
	if (theStreet != "") {
		document.findTrees.submit();
	} 
}
 
//for public_posting.asp 
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//for public_posting.asp 
function validForm(userInfo) {
      if (userInfo.title.value == "") {
         alert("You must enter an event title.")
         userInfo.title.focus()
         return false
      }
      if (userInfo.address1.value == "") {
         alert("You must enter an address.")
         userInfo.address1.focus()
         return false
      }

      if (userInfo.city.value == "") {
         alert("You must enter a city.")
         userInfo.city.focus()
         return false
      }
      if (userInfo.zip.value == "") {
         alert("You must enter a zip code.")
         userInfo.zip.focus()
         return false
      }
      if (userInfo.name.value == "") {
         alert("You must enter a contact name.")
         userInfo.name.focus()
         return false
      }
      if (userInfo.phone.value == "") {
         alert("You must enter a contact phone.")
         userInfo.phone.focus()
         return false
      }	  	  
      if (userInfo.email.value == "") {
         alert("You must enter an email address.")
         userInfo.phone.focus()
         return false
      }	  	  
      if (userInfo.description.value == "") {
         alert("You must enter an event description.")
         userInfo.description.focus()
         return false
      }	  	  	  
		myOption = -1;
		for (i=userInfo.category.length-1; i > -1; i--) {
		if (userInfo.category[i].checked) {
		myOption = i; i = -1;
		}
		}
		if (myOption == -1) {
		alert("You must an event category.");
		return false;
		}
      if (userInfo.mission.value == "") {
         alert("You must enter the mission or purpose of your organization.")
         userInfo.mission.focus()
         return false
      }	  	  	  
        return true
   }
 
//for info/add_volunteer_opp.asp   
function validVolunteerForm(userInfo) {
      if (userInfo.title.value == "") {
         alert("You must enter a title.")
         userInfo.title.focus()
         return false
      }
      if (userInfo.name.value == "") {
         alert("You must enter a contact name.")
         userInfo.name.focus()
         return false
      }
      if (userInfo.area_code.value == "") {
         alert("You must enter an area code.")
         userInfo.area_code.focus()
         return false
      }
  if(userInfo.area_code.value.search(mikExp2) == -1) {
  } else {
	alert("Sorry only numbers are allowed for the phone area code.");
   userInfo.area_code.focus();
   return (false);
 }
  if(userInfo.area_code.value.length < 3) {
	alert("Your phone area code is incorrect, please fix.");
   userInfo.area_code.focus();
   return (false);
 }
      if (userInfo.phone3.value == "") {
         alert("You must enter a phone number.")
         userInfo.phone3.focus()
         return false
      }
  if(userInfo.phone3.value.search(mikExp2) == -1) {
  } else {
	alert("Sorry only numbers are allowed for the phone prefix.");
   userInfo.phone3.focus();
   return (false);
 }
  if(userInfo.phone3.value.length < 3) {
	alert("Your phone prefix is incorrect, please fix.");
   userInfo.phone3.focus();
   return (false);
 }
      if (userInfo.phone4.value == "") {
         alert("You must enter a phone number prefix.")
         userInfo.phone4.focus()
         return false
      }
  if(userInfo.phone4.value.search(mikExp2) == -1) {
  } else {
	alert("Sorry only numbers are allowed for the phone suffix.");
   userInfo.phone4.focus();
   return (false);
 }
  if(userInfo.phone4.value.length < 4) {
	alert("Your phone suffix is incorrect, please fix.");
   userInfo.phone4.focus();
   return (false);
 }
      if (userInfo.description.value == "") {
         alert("You must enter a description.")
         userInfo.description.focus()
         return false
      }	  	  	  
        return true
   }

// for it/address_inquiry.asp 
function checkAddressForm(){
	addType = document.addForm.address_type.options[document.addForm.address_type.selectedIndex].value;
	if (addType == "0") {
		alert("You must select an address type.");
		return false;
	}
	if (document.addForm.street_number.value == "") {
		alert("You must enter the street number.");
		return false;
	}
	liveWork = document.addForm.live_work.options[document.addForm.live_work.selectedIndex].value;
	if (liveWork == "0") {
		alert("You must answer if you live or work at this address.");
		return false;
	}
	if (document.addForm.name.value == "") {
		alert("You must enter your name.");
		return false;
	}
	if (document.addForm.phone.value == "") {
		alert("You must enter your phone number.");
		return false;
	}
	for (counter = 0; counter < document.addForm.inquiry_reason.length; counter++)	{
		if (document.addForm.inquiry_reason[counter].checked) { 
			var radio_choice = document.addForm.inquiry_reason[counter].value; 
		}	
	}	
	if (!radio_choice) {
		alert("Please indicate the reason for initiating this inquiry.")
		return false;
	}
	if (radio_choice == "Other") {
		if (document.addForm.other.value == "") {
			alert("Please list the reason for initiating this inquiry in the text field next to the Other checkbox.");
			return false;
		}	
		if (document.addForm.other.value == "") {
			alert("Please list the reason for initiating this inquiry in the text field next to the Other checkbox.");
			return false;
		}	
	}
return (true);
}
 
//for redev/outreach_comments.asp
function checkOutreachForm() {
	var theEmail = document.bidinfo.email.value;
	var thePhone = document.bidinfo.phone.value;
	var theAddr = document.bidinfo.address.value;
	var theName = document.bidinfo.name.value;
	var theDate = document.bidinfo.meetingdate.value;
	if (theName=="") {
	alert("You need to enter your name.");
	return false;
	}
	if (thePhone=="") {
	alert("You need to enter your phone number.");
	return false;
	}
	if (theAddr=="") {
	alert("You need to enter your address.");
	return false;
	}
	if (theEmail=="") {
	alert("You need to enter your email address.");
	return false;
	}
	if (echeck(theEmail)==false){
		alert("The email address you entered is invalid.");
    	document.bidinfo.email.focus();
		return false
	}
	if (theDate=="") {
	alert("You need to enter the date of the Outreach Meeting.");
	return false;
	}
return true;	
} 

//for environment/livinggreen_form.asp
function checkLiveGreen() {
	var theEmail = document.liveGreen.environmentaltips_email.value;
	var theName = document.liveGreen.environmentaltips_name.value;
	var theTip = document.liveGreen.environmentaltips_info.value;
	if (theName=="") {
	alert("You need to enter your name.");
	return false;
	}
	if (theEmail=="") {
	alert("You need to enter your email address.");
	return false;
	}
	if (echeck(theEmail)==false){
		alert("The email address you entered is invalid.");
    	document.liveGreen.environmentaltips_email.focus();
		return false
	}
	if (theTip=="") {
	alert("You need to enter your how to live green tip.");
	return false;
	}
}

//for fire/tours2.asp
function checkTourForm() {
	if (document.firetour.requested_by.value == "") {
		alert('Please enter a requested by contact name.');
		return false;
	}
	if (document.firetour.group_name.value == "") {
		alert('Please enter a requested the organization name of your group.');
		return false;
	}
	if (document.firetour.phone.value == "") {
		alert('Please enter your contact phone number.');
		return false;
	}
return true;
}

//for redev/proj_sepulveda.asp - email the committee form
function checkSCACForm() {
	if (document.theForm.sender_name.value == "") {
		alert("You must enter your name.");
		return false;
	} 
	if (document.theForm.sender_email.value == "") {
		alert("You must enter your email address.");
		return false;
	} 
	if (echeck(document.theForm.sender_email.value)==false){
		alert("You must enter a valid email address.");
    	document.theForm.sender_email.focus();
		return false;
	}
	if (document.theForm.subject.value == "") {
		alert("You must enter the email subject.");
		return false;
	} 
	if (document.theForm.email.value == "") {
		alert("You must enter the text for your email.");
		return false;
	} 
	return true;
}


  
//form check for RFP Download page  budget/bid_login.asp
function checkRFPForm() {
	if (document.bidinfo.name.value == "") {
		alert("You must enter your name.");
		return false;
	} 
	if (document.bidinfo.name.value.length < 7) {
		alert("You must enter a valid name.");
		return false;
	} 
	if (document.bidinfo.email.value == "") {
		alert("You must enter your email address.");
    	document.bidinfo.email.focus();
		return false;
	} 
	if (echeck(document.bidinfo.email.value)==false){
		alert("You must enter a valid email address.");
    	document.bidinfo.email.focus();
		return false;
	}
	if (document.bidinfo.email.value.length < 6) {
		alert("You must enter a valid email address.");
    	document.bidinfo.email.focus();
		return false;
	} 
	if (document.bidinfo.phone.value == "") {
		alert("You must enter your phone number.");
		return false;
	} 
	if (document.bidinfo.phone.value.length < 10) {
		alert("You must enter a valid phone number.");
		return false;
	} 
	return true;
}

//value check for only numeric values
var mikExp2 = /[abcdefghijklmnopqrstuvwxyz\\,\\$\\?\\<\\>\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\`\~\=\.\|]/;
function dodacheck2(val) {
var strPass = val.value;
var strLength = strPass.length;
var lchar = val.value.charAt((strLength) - 1);
if(lchar.search(mikExp2) != -1) {
var tst = val.value.substring(0, (strLength) - 1);
val.value = tst;
   }
}


// End hiding script from older browsers -->

