function navbar()
{
	
	
	var output =  "<br>&nbsp;<a class='text' href='index.html' title=\"To home page\" >Home Page</a>";
	output +=  "<br><br><br>";
	output +=  "&nbsp;<a class='text' href='bio.html' title=\"Lou Di Falco's Biography\" >Biography</a>";
	output +=  "<br><br><br>";
	output +=  "&nbsp;<a class='text' href='demo.html' title=\"Demos\" >Demos</a>";
	output +=  "<br><br><br>";
	output +=  "&nbsp;<a class='text' href='studio.html' title=\"Studio\" >Studio</a>";
	output +=  "<br><br><br>";
	output +=  "&nbsp;<a class='text' href='contact-me.html' title=\"Send a comment\">Contact Me</a><br><br>";
	output += "<a href=\"http://www.ipower.com/green-certified/\" onClick=\"MyWindow=window.open('http://www.ipower.com/green-certified/','greenCertified','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=550,height=700,left=50,top=50'); return false;\"><img src=\"http://www.ipower.com/green-certified/hosting-badge-3.png\" border=\"0\"></a>";
	output +=  "<br><br><br>";
	
	/* (document.cookie.indexOf("login=")>= 0 ||
		document.cookie.indexOf("; login=")>= 0)
	{
		output +=  "&nbsp;<a class='text' href='https://ws09.ipowerweb.com/loudifal/readorders.asp' title=\"Better Late Than Never Orders\" >BLTN Orders</a>";
		output +=  "<br><br><br>";
	}
	else
	{
		output +=  "&nbsp;<a class='text' href='https://ws09.ipowerweb.com/loudifal/login.html' title=\"Authorized Users Only\" >Admin Login</a>";
		output +=  "<br><br><br>";
	}
	*/
	return output;

}

function checkBrowser(tune)
{
	if (navigator.appName=="Microsoft Internet Explorer")
	{
		location=tune;
	}
	else
	{
		alert("Requires Microsoft Internet Explorer");
	}
}

function testfields(frm)
{
	if (isMissing(frm.fname,"First name must be entered."))
			return false;
	if (isSpace(frm.fname,"First name must not start with a space."))
			return false;
	if (isMissing(frm.lname,"Last name must be entered."))
			return false;
	if (isSpace(frm.lname,"Last name must not start with a space."))
			return false;
	if (isMissing(frm.email,"Email address must be entered."))
			return false;
	if (checkemail(frm.email,"Email appears to be invalid."))
			return false;
	if (isMissing(frm.comment,"A comment must be entered."))
			return false;
	if (isSpace(frm.comment,"Your comment must not start with a space."))
			return false;
	if (testlength(frm.comment,"Your comment does not appear to be valid, please enter more text."))
			return false;
	return true;
}

function isSpace(tb,msg)
{
	if (tb.value.substring(0,1)==" ")
	{
		alert(msg);
		tb.focus();
		tb.select();
		return true;
	}
	return false;
}

function testlength(tb,msg)
{
	
	if (tb.value.length < 10)
	{	
		alert(msg);
		tb.focus();
		tb.select();
		return true;
	}
	
	return false;
}

function checkemail(tb,msg)
{
	var str=tb.value;
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if (filter.test(str))
		testresults=false;
	else
	{
		alert(msg);
		tb.focus();
		tb.select();
		testresults=true;
	}
return (testresults)
}


function isMissing(txtbox, msg)
{
	if (txtbox.value=="")
	{
		alert(msg);
		txtbox.focus();
		return true;
	}
	else
		return false;
}
