//  Copyright (c) Listech, Inc
//  All Rights Reserved
//  It is unlawful to copy, reference or appropriate this script

function setCookie(name, value, expire) 
{
	document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}

function getCookie(Name) 
{
	var search = Name + "="
	if (document.cookie.length > 0) 
	{
		offset = document.cookie.indexOf(search)
		if (offset != -1) 
		{
			offset += search.length
			end = document.cookie.indexOf(";", offset)
			if (end == -1)
				end = document.cookie.length
			return unescape(document.cookie.substring(offset, end)) 
		}
	}
}

function setValues()
{
	if(document.form1) 
	{
		Today = new Date(); 
		document.form1.HOST.value = document.location.hostname;
		if (document.referrer == "")
			document.form1.REFERRER.value = "Bookmark, or full url typed in browser";
		else 
			document.form1.REFERRER.value = document.referrer;
		document.form1.DATE.value = Today.toGMTString( );
		document.form1.PAGE.value = document.title;		
		counted++;
		if(counted>1) 
			return false; 
		else  
			return true;
	} 
	else 
	{ 
		return false;
	}
} 
function setVisited()
{ 
	var Value="Visiter";
	setCookie("Visiter",Value,null);
} 
function submitForm()
{ 
	if(navigator.appVersion.indexOf("AOL") == -1)
	{
	var knE=getCookie("Visiter");
	if(knE==null)
	{
		if (confirm("Is it okay if we log your visit to serve you better?\nYou will be added to our mailing list, and\nwill receive more information about real\nestate in Chicago, IL.\nAll information is kept confidential."))
		{
			setVisited();
			document.form1.SEND.click(); 		
		} 
		else
		{
			setVisited();
		}
	}
	}
}

function NukeIt()
{
	setCookie("Visiter",null,null);
}

var counted=0;