//<!-[CDATA[

function submission()			{
	namecheck(); 

        var loginame = document.getElementById("loginame"); 
        var thisname = loginame.value;

        var loginurl = document.getElementById("loginurl");
        var thispage = loginurl.value;

        var loginpass = document.getElementById("loginpass");
        var thispass = loginpass.value;
	var thispasscase = thispass.toUpperCase();
	var worktodo = "okay";

//	if (thispage == "bre2009")	{
//		if (thispasscase != "PASSWORD")	{
//				worktodo = "PW";
//						}
//					}


	if (thispage == "testarea")	{
		if (thispasscase != "TEST")	{
				worktodo = "PW";
						}
					}







//	load page __
	if (worktodo == "PW")	{
			thispage = "nopassword"; 
					} // end worktodo


	if (thisname.length < 1) {
			worktodo = "abort"; 	
					} // end thisname  

	var passthename = "?pass=" + thisname;

	if (worktodo != "abort")	{
		loadthispage = thispage + ".html" + passthename;

		if (thispage == "template")		{
			loadthispage = "gallery.pdf"; 
			alert("Loading PDF: " + loadthispage + ", " + thisname);
							}

		window.location.replace(loadthispage); 
					} else {
					reloadpage(); 
					} // end worktodo 

					} // end submission




function namecheck()			{ 

        var loginame = document.getElementById("loginame");
        var thisname = loginame.value;

	if (thisname.length < 1) {
			alert("Please Enter Your Name ?"); 
			reloadpage(); 
					} // end thisname  

	casethisname = thisname.toUpperCase();
		if (casethisname.match("ALICIA"))   {
			alert("HEY! It's the BOSS! Howdy BossLady"); 
						    }
		if (casethisname.match("BRE"))   {
			alert("HEYAS, BRE! WHAZZUP ??"); 
						    }
					} // end namecheck 					





function reloadpage()			{
  window.location.replace("./ttflogin.html"); 
					} // end reload

function pulldata()			{
	var query = location.search.substring(1);
	var checkquery = query.length; 
	var firstletter = query.substr(5,1);
	var restofname  = query.substr(6,checkquery); 
	displayname = firstletter.toUpperCase() + restofname.toLowerCase();
	return displayname; 
					} // end pulldata 



//	]]>


