function fntop()
{
var str="";
str+="<tr><td class='top' valign='top' colspan='2'>";
str+="<map name='topMap'><area shape='rectangle' coords='0, 0, 180, 129' title='Steelman Triathlon' href='../index.htm'></map>";
str+="<table cellpadding='0' cellspacing='0' border='0' width='100%'>";
str+="<tr>";
str+="<td><img src='images/top.jpg' border='0' title='Steelman Triathlon' style='padding:0px;' usemap='#topMap'></td>";
str+="</tr>";
str+="</table>";
str+="</td></tr>";
str+="<tr><td height='1'></td></tr>";
document.write(str);
}

function fnleftmenu()
{
var str="";
str+="<tr><td class='menuBg' valign='top'>";
str+="<a href='reg_policies.php' class='menulnk'>Registration</a>";
str+="<div style='padding:2px 0px 0px 0px;'><a href='scheduleInfo.php' class='menulnk'>Schedule & info</a></div>";
str+="<div style='padding:5px 0px 0px 0px;'><a href='course.php' class='menulnk'>Course</a></div>";
str+="<div style='padding:2px 0px 0px 0px;'><a href='lodging.php' class='menulnk'>Lodging</a></div>";
str+="<div style='padding:5px 0px 0px 0px;'><a href='directions.php' class='menulnk'>Directions</a></div>";
str+="<div style='padding:4px 0px 0px 0px;'><a href='results.php' class='menulnk'>Results</a></div>";
str+="<div style='padding:4px 0px 0px 0px;'><a href='make_wish.php' class='menulnk'>Make A Wish</a></div>";
str+="<div style='padding:4px 0px 0px 0px;'><a href='pics.php' class='menulnk'>Pictures</a></div>";
str+="<div style='padding:4px 0px 0px 0px;'><a href='media.php' class='menulnk'>Press Releases</a></div>";
str+="<div style='padding:4px 0px 0px 0px;'><a href='volunteer.php' class='menulnk'>Volunteer</a></div>";
str+="<div style='padding:4px 0px 0px 0px;'><a href='contact.php' class='menulnk'>Contact</a></div>";
str+="<div style='padding:4px 0px 0px 0px;'><a href='faq.php' class='menulnk'>FAQ</a></div>";
str+="<div style='padding:4px 0px 0px 0px;'><a href='sponsors.php' class='menulnk'>Sponsors</a></div>";
str+="<div style='padding:4px 0px 0px 0px;'><a href='https://www.lin-mark.us/page.asp?prmName=viewentrants&prmEventID=300' class='menulnk'><b>Entrants List</b></a></div>";
str+="<div style='padding:4px 0px 0px 0px;'></div>";
str+="</td></tr>";
document.write(str);
}

function regleftmenu()
{
var str="";
str+="<tr><td><a href='reg_policies.php'><img src='images/buttonRegisterNow.jpg' width='206' height='38' border='0' title='' /></a></td></tr>";
str+="<tr><td><img src='images/imgSignUp.jpg' width='206' height='40' border='0' title=''  /></td></tr>";
str+="<tr><td style=' background-image:url(images/bgSingUp.gif); background-repeat:repeat-y;'>";
str+="<form name='SubscriberForm' onSubmit='return fnSubscriber();' method='post'>";
str+="<div style='width:188px; padding:8px 0px 8px 8px;'><input name='UserName' type='text' class='txtbox' value='Name' onfocus='return fnFocus1();' onblur='return fnBlur1()' maxlength='50' /></div>";
str+="<div style='width:188px; padding:0px 0px 8px 8px;'><input name='Email' type='text' class='txtbox' value='Email Address' onfocus='return fnFocus2();' onblur='return fnBlur2()' maxlength='100' /></div>";
str+="<input type='image' src='images/buttonSignUp.jpg' width='49' height='19' border='0' title='' align='right' style='padding:0px 8px 8px 8px;' onclick='return fnSubscriber()' />";
str+="</form>";
str+="</td></tr>";
document.write(str);
}

function fnbottom()
{
var str="";
str+="<tr><td colspan='2' class='footer'><b>Site by : </b><a href='http://www.dayvision.com' target='_blank' class='dayvision'>DAY Vision Marketing</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href='index.php' class='foterLink'>Home</a>  |  <a href='reg_policies.php' class='foterLink'>Registration</a>  |  <a href='scheduleInfo.php' class='foterLink'>Schedule & Info</a>  |   <a href='course.php' class='foterLink'>Course</a>  |  <a href='lodging.php' class='foterLink'>Lodging</a>  |  <a href='directions.php' class='foterLink'>Directions</a>  |   <a href='results.php' class='foterLink'>Results</a>  |  <a href='make_wish.php' class='foterLink'>Make a Wish</a>  |   <a href='media.php' class='foterLink'>Media</a>  | <a href='volunteer.php' class='foterLink'>Volunteer</a>  |   <a href='contact.php' class='foterLink'>Contact</a><br /><div style='padding-left:150px;'>© 2008 Steelman, All rights reserved.</div></td></tr>";
document.write(str);
}

function fnSubscriber()
{
	if((document.SubscriberForm.UserName.value=="Name")||(document.SubscriberForm.UserName.value==""))
	{
		alert("Please enter your name");
		document.SubscriberForm.UserName.focus();
		return false;
	}
	if((document.SubscriberForm.Email.value=="Email Address")||(document.SubscriberForm.Email.value==""))
	{
		alert("Please enter your email address");
		document.SubscriberForm.Email.focus();
		return false;
	}
	if(notEmail(document.SubscriberForm.Email,"your email address")){ return false; }
	document.SubscriberForm.action="subscriber_add.php?mode=save";
	//document.SubscriberForm.submit();
}

function fnFocus1()
{
	if(document.SubscriberForm.UserName.value=="Name")
	{
		document.SubscriberForm.UserName.value="";
	}
}

function fnFocus2()
{
	if(document.SubscriberForm.Email.value=="Email Address")
	{
		document.SubscriberForm.Email.value="";
	}
}

function fnBlur1()
{
	if(document.SubscriberForm.UserName.value=="")
	{
		document.SubscriberForm.UserName.value="Name";
	}
}

function fnBlur2()
{
	if(document.SubscriberForm.Email.value=="")
	{
		document.SubscriberForm.Email.value="Email Address";
	}
}

function notEmail(obj,msg){
var exp=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
if (!exp.test(obj.value)){
	alert("Please enter valid "+msg);
	obj.focus();
	return true;
}else
	return false;
}