<!-- Hide from old browsers
// Copyright © 1999 Doug Popeney
// Created by Doug Popeney (easyjava@easyjavascipt.com)
// JavaScript Made Easy!! - http://www.easyjavascript.com

// tracks page reloads...
var wasHere=0;
var domain="floridadivorce.com";
var SITE_CGI_URL="http://www.floridadivorce.com/cgi-bin/";

// resets the top banner
function reloadimg(url) {

	if (!url)	{

		url=SITE_CGI_URL+"bannerserv.cgi?clienttype=Attorney&value="+num;
	  }

     document.img1.src = url;
}

// main function to check for the status of the
// session and decide whether to reload the banner
function entry(wasResized)
{

	// called from the main frame...
  if (wasResized) {	wasHere=0; }
  
  // if the incoming request originated from
  // a hyperlink on an external document, we
  // will see that here...
	lastURL=document.referrer.toString();

  // if it wasn't clicked from within our own site...
  if (lastURL.indexOf(domain) == -1) {
	
				wasHere=0;
		}
	
	// new page load..
  if (!wasHere) {

		// already cookied?
    lastzip=getZipCookie();

		reloadimg(SITE_CGI_URL+"bannerserv.cgi?clienttype=Attorney&value="+num+"&zip="+lastzip);
		
    // we are here now!
    wasHere=1;
	}

}

// ye ole' Back To Frames hack...
function loadPage() 
{ 

if (!page) { page="home"; }

if(parent.frames.length==0) {
     window.location.href="index5.html?"+page;
   }
}

// grab the zip cookie if it exists...
function getZipCookie()
{
// check to see if cookie exists
var allcookies=document.cookie;

var pos =allcookies.indexOf("zipcode=");

// if cookie exists...

		if(pos != -1)  {

		var start= pos+8;
		var end=allcookies.indexOf(":",start);

		var numStart=start+1;
		var numEnd=numStart+2;

		if (end== -1) { end=allcookies.length; }
		if (numEnd== -1) { numEnd=allcookies.length; }

     	  zipSubString=allcookies.substring(start,end);
		  num=allcookies.substring(numStart,numEnd);
		
		  // ...return the selected zip code
      return zipSubString.toString();
	
		}

  // this is the default no-cookie value
  return "00000";
}


// -->
