var msgstr='           Join our Mailing List.\n Monthly Newsletter \'Golfng with GCDU\' \nRules Quiz, Golf Tips, Product up-dates,\n    the Lighter side of Golf and more ...';
var today = new Date();
var cookieName = "Subscriber_Cookie";
var expdate = null;

function ShowButton()
{
	document.write("<FORM name='Subscriber' method='POST' action='mailto:subscribe@golfclubsdownunder.com.au?subject=' enctype='text/plain'>");
	document.write("<INPUT type='submit' name='subbtn' value='Yes Please!!' onMouseOver=\"this.style.backgroundColor='#FFFF00'\" onMouseOut=\"this.style.backgroundColor='#008000'\" style='backgroundColor: #008000'>");
	document.write("</FORM>");
	document.Subscriber.subbtn.style.backgroundColor = '#008000';
}

function Show_Confirm()
{
	if (confirm(msgstr))
	{
		document.Subscriber.subbtn.click();
	}
}

function Timer_Function()
{
	self.setTimeout('Show_Confirm()',  9000);
}
function Timer_Cookie_Function()
{
	self.setTimeout('Cookie_Function()',  9000);
}

function Place_Cookie(Name, value, expire)
{
	document.cookie=name+"="+escape(value)+((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}

function Get_Cookie(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 Set_To_Visited()
{
	Place_Cookie(cookieName,"hasVisited",expdate);}

function Cookie_Function()
{
	if (navigator.appVersion.indexOf("AOL") == -1)
	{
		var GetIt=Get_Cookie(cookieName);
		if(GetIt==null)
		{
			Show_Confirm();
			Set_To_Visited();
		}
	}
}
