 		// document.writeln("<br>Script Begins");

  		 	 

		 var locate = window.location;

		 document.url2text.text.value = locate;

		 var texturl = document.url2text.text.value;

		

		// document.writeln("<br>texturl= "+texturl);

		

		 

		 var name = GetName(texturl);

		 name = name.toLowerCase();

		 

		 locate = window.location;

		 document.url2text.text.value = locate;

		 texturl = document.url2text.text.value;

		// document.writeln("<br>texturl= "+texturl);



		 

		 

		 var pass = GetPass(texturl);

		 pass = pass.toLowerCase();

		 if (name == "") {name="0";}

		 if (pass == texturl) {pass="0";}

		// document.writeln("<br>name ="+name+"; pass ="+pass);

		

		 var login=0;

		 

		 login = LogIn(name, pass);

		

		// document.writeln("<br>login="+login);

		 //document.writeln("First Name is " +delineate(text));

		 //document.write("Last Name is " +delineate2(text));

		 

		 //Default Login

		 if (login == 0)

		 {

		 document.writeln("<font color='black'> <center><h1>Please Login</h1> </font><p> To access these tools, please obtain a username and password from Jasco Pacific, Inc. <a href='mailto:jimsadler@jascopacific.com?subject=Username/Password Request&body=Please send me a username and password for access to tools and downloads.   Name:   Company: '>Request by Email.</a></p> <p> Click Login to Enter. Thank You.</p> <center> ");

		 document.writeln("<form method='link' action='downloads.html' name='log'> Username: <input type='text' name='username'><br> Password: <input type='password' name='pass'><br><input type='submit' value='Login'></form> </center>");

		 }

		 

		 //Correct Login 

		 else if (login == 1)

		 {

		  if(confirm('Do you accept the disclaimer and conditions of use?\n\nDisclaimer: Any calculations derived by this spreadsheet are implemented at the risk of the user. A licensed structural engineer is needed to certify any calculations for real building situations.'))

		  {

		  document.writeln("<font color='black'> <h2>Welcome "+name+"! >> Tools & Downloads</h2>");

		 //Circle Calc

		 document.writeln("<p><a href='http://www.jascopacific.com/scripts/excels/arch-spreadsheet.xls'> Circular Arch Calculator </a> :: Use this excel spreadsheet to compute the dimensions of a circular arch, including segment lengths. </p>");
		 document.writeln("<p><a href='http://www.jascopacific.com/scripts/excels/Mullion_Splice_Design.xls'> Mullion Splice Design </a> :: Use this excel spreadsheet as a reference for designing Mullion Splices and their spacings, given Temperature increase and Live Load Deflection. </p>");
		 document.writeln("<p><a href='http://www.jascopacific.com/scripts/excels/Windload_Design_IBC2006_Components_and_Cladding.xls.xls'> Components and Cladding Windload Design under IBC2006 </a> :: Use this excel spreadsheet to calculate design windload pressures for its given specifications - follows IBC 2006 Windload Design Guidelines</p>");
		 
		  }

		  else

		  {

		  window.location="nouse.html";

		  }

		 }

		 

		 //Incorrect Login

		 else

		 {

 		 alert("Invalid login!");

		 document.writeln("<font color='red'> <center><h1>Login Failed</h1> </font> <font><p> You have entered an incorrect username/password. Please retry your login, or contact Jasco Pacific, Inc. to obtain entry permissions. Thank You.</p><center></center>");

 		 document.writeln("<form method='link' action='downloads.html' name='log'> Username: <input type='text' name='username'><br>Password: <input type='password' name='pass'><br><input type='submit' value='Retry Login'></form> </center>");

		 }

 		// document.writeln("<br>Reached the end");
