function GoBack()
{
	javascript:window.history.back();
}

function openWin(url) {
  myWin= open(url, "displayWindow", 
    "width=500,height=400,status=no,toolbar=no,menubar=no,location=no,screenX=500,screenY=250");
}

function frmSearch_onsubmit() {
	if (window.document.frmSearch.q1.value == '')
	{
		alert('Please enter a search keyword.');
		return false;
	}
	return true;
}

function ChangeCat(group, dept){
	location = "rankstaffmem.asp?ID=" + dept + "&Group=" + (group.selectedIndex + 1)
	
	
}


function LoadHDImages () {
	MM_preloadImages(
		'../images/hd-eh.gif',
		'../images/hd-phn.gif',
		'../images/hd-cd.gif',
		'../images/hd-ip.gif',
		'../images/hd-wic.gif'
		);
}

function LoadHSDImages () {
	MM_preloadImages(
		'../images/hsd-psi.gif',
		'../images/hsd-yfs.gif',
		'../images/hsd-cfs.gif',
		'../images/hsd-fr.gif',
		'../images/hsd-lts.gif',
		'../images/hsd-dd.gif',
		'../images/hsd-cs.gif',
		'../images/hsd-idp.gif',
		'../images/hsd-omh.gif',
		'../images/hsd-bo.gif',
		'../images/hsd-jl.gif',
		'../images/hsd-ss.gif',
		'../images/hsd-a.gif'
		);
}

function LoadISImages () {
	MM_preloadImages(
		'../images/is-gis.gif'
		);
}

function LoadPWImages () {
	MM_preloadImages(
		'../images/pw-rc.gif'
		);
}

/////////////////////////////////////////////////////////////////////////
// Random Images ////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////

function MLS_randimage() {  
  var imagenumber = 4;   //modify this!!!
  var randomnumber = Math.random();
  var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1;
  
  images = new Array;
  images[1] = "images/adv/schroeders.gif";
  images[2] = "images/adv/algoma.gif";
  images[3] = "images/adv/baycare.gif";
  images[4] = "images/adv/adv_holder.gif";

  links = new Array;
  links[1] = "http://www.schroederflowers.com";
  links[2] = "http://www.algoma.org";
  links[3] = "http://www.baycare.net";
  links[4] = "mailto:sales@itol.com";

  alts = new Array;
  alts[1] = "Schroeder's Flowerland";
  alts[2] = "Algoma Chamber of Commerce";
  alts[3] = "BayCare Medical Center";
  alts[4] = "Advertise at www.ITOL.com";
  
  var output="<A HREF=" + links[rand1] + " target=\"_blank\"><IMG src=" + images[rand1] + " alt=\"" + alts[rand1] + "\" border=0></A>";
  document.write(output);
}


/////////////////////////////////////////////////////////////////////////
// Date Functions ///////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////

function MLS_getdate() {
  today = new Date();
  var day = today.getDate(); 
  var month = today.getMonth();
  var weekday = today.getDay();
  var year = today.getFullYear();

  days = new Array;
  days[0] = "Sunday";
  days[1] = "Monday";
  days[2] = "Tuesday";
  days[3] = "Wednesday";
  days[4] = "Thursday";
  days[5] = "Friday";
  days[6] = "Saturday";

  months = new Array;
  months[0] = "January";
  months[1] = "February";
  months[2] = "March";
  months[3] = "April";
  months[4] = "May";
  months[5] = "June";
  months[6] = "July";
  months[7] = "August";
  months[8] = "September";
  months[9] = "October";
  months[10] = "November";
  months[11] = "December"; 

  var output = days[weekday] + " " + months[month] + " " + day + ", " + year;
  document.write(output);
}


/////////////////////////////////////////////////////////////////////////
// Image Swap Functions /////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////

function MLSon(pic1, pic2) {
  document[pic1].src = basedir + pic1 + '_on.gif';
  if (pic2) document[pic2].src = basedir + pic1 + '_' + pic2 + '.gif';
}

function MLSoff(pic1, pic2) {
  document[pic1].src = basedir + pic1 + '_off.gif';
  if (pic2) document[pic2].src = basedir + 'home_disp.gif';
}

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];}}
}


/////////////////////////////////////////////////////////////////////////
// Preload Images ///////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////

function LoadImages () {
	MM_preloadImages(
		
		'../images/information-services.gif',
		'../images/back-mo.gif',
		'../images/aging-resource.gif',
		'../images/child.gif',
		'../images/clerk-of-courts.gif',
		'../images/human-services.gif',
		'../images/comptroller.gif',
		'../images/coroner.gif',
		'../images/clerks.gif',
		'../images/emergency.gif',
		'../images/health-care.gif',
		'../images/highway.gif',
		'../images/park.gif',
		'../images/public.gif',
		'../images/deeds.gif',
		'../images/soil.gif',
		'../images/university.gif',
		'../images/corporation.gif',
		'../images/attorney.gif',
		'../images/family.gif',
		'../images/health.gif',
		'../images/personnel.gif',
		'../images/safety.gif',
		'../images/probate.gif',
		'../images/sheriff.gif',
		'../images/treasurer.gif',
		'../images/veterans.gif',
		'../images/pw-rc.gif'
		);
}

function LoadCommitteeImages () {
	MM_preloadImages(
		'../images/board-finance.gif',
		'../images/board-personnel.gif',
		'../images/board-health.gif',
		'../images/board-safety.gif',
		'../images/board-highway.gif',
		'../images/board-natural.gif',
		'../images/board-executives.gif',
		'../images/board-public.gif',
		'../images/board-grievance.gif'
		);
}


/////////////////////////////////////////////////////////////////////////
// Check Required Fields ////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
<!-- Begin
function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)=="required") {
if ((tempobj.type=="text")&& (tempobj.value=='')) {
pass=false;
break;
         }
      }
   }
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Please make sure "+shortFieldName+" was properly completed.");
return false;
}
else
return true;
}

function isEmail(str) {   
  // are regular expressions supported? 
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}



//  End -->

