// <script>

// Copyright (C) 2005 Ilya S. Lyubinskiy. All rights reserved.
// Technical support: http://www.php-development.ru/
//
// YOU MAY NOT
// (1) Remove or modify this copyright notice.
// (2) Distribute this code, any part or any modified version of it.
//     Instead, you can link to the homepage of this code:
//     http://www.php-development.ru/javascripts/smart-forms.php.
//
// YOU MAY
// (1) Use this code on your website.
// (2) Use this code as a part of another product provided that
//     its main use is not creating javascript menus.
//
// NO WARRANTY
// This code is provided "as is" without warranty of any kind, either
// expressed or implied, including, but not limited to, the implied warranties
// of merchantability and fitness for a particular purpose. You expressly
// acknowledge and agree that use of this code is at your own risk.

// If you find my script useful, you can support my site in the following ways:
// 1. Vote for the script at HotScripts.com (you can do it on my site)
// 2. Link to the homepage of this script or to the homepage of my site:
//    http://www.php-development.ru/javascripts/smart-forms.php
//    http://www.php-development.ru/
//    You will get 50% commission on all orders made by your referrals.
//    More information can be found here:
//    http://www.php-development.ru/affiliates.php


// ----- Popup Control ---------------------------------------------------------

function log(){

if (validateInfo(document.Form1.username ))
{



		if (validateInfo(document.Form1.password ))
		{

		Form1.submit();
		}
		
}
}

function validateInfo(document) 

{
//document==document.Form1.username;
var Invald=false;
	var InvaldLettr="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
	var Txxt=document.value;
	var Lnn=Txxt.length;
	
     var j;
	var LettrPs;

	for(j=0;j<Lnn;j++) {
		LettrPs=InvaldLettr.indexOf(Txxt.charAt(j),0);
		
		if(LettrPs<0)
			Invald=true;
}
if (Lnn==0)
{
return false;
}
else
{
if (Invald) {
alert("Please enter a valid Username or Password");
	document.focus();
	document.select();
	
return false;





}
else
{

return  true;


}

}
}

