// JavaScript Document
//Chk the White space in the Text Fields.
function isWhitespace(s)
{
   var i;
   for (i = 0; i < s.length; i++)
   {
		// Check that current character isn't whitespace.
		var c = s.charAt(i);
		if(c!=" ")
		return false;
   }
   // All characters are whitespace.
   return true;
}
//-----------------------------------------------------------------------------------------------
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,''+features+',left=0px,top=0px');
}
//-----------------------------------------------------------------------------------------------
function LoginValidation(myform){

	if((myform.LoginID.value == "") || (myform.LoginID.value == "Login ID")){
		alert("Please enter 'Login ID'.");
		myform.LoginID.focus();		
		return false;}
	else{
		if(isWhitespace(myform.LoginID.value)){
			alert("'Login ID' cannot contain only spaces.");
			myform.LoginID.focus();
			return false;}
		}	

	var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";
	for (var i = 0; i < myform.LoginID.value.length; i++) {
  		if (iChars.indexOf(myform.LoginID.value.charAt(i)) != -1) {
  		alert ("'Login ID' has special characters. \nThese are not allowed.\n Please remove them and try again.");
		myform.LoginID.focus();
  		return false;
  		}
 	 } 
	
	if((myform.Pass.value == "") || (myform.Pass.value == "Password") ){
		alert("Please enter 'Password'.");
		myform.Pass.focus();		
		return false;}
	else{
		if(isWhitespace(myform.Pass.value)){
			alert("'Password' cannot contain only spaces.");
			myform.Pass.focus();
			return false;}
		}	
	
	
	return true;
}
//-----------------------------------------------------------------------------------------------
function ForgotPassword(){
	window.open('ForgotPassword.asp','ForgotPassword','width=550,height=325,top=20px,left=20px');
}
//-----------------------------------------------------------------------------------------------
function PopularChoices(ImgName){
	window.open('Popular-Choices.asp?ImgName='+ImgName+'','','scrollbars=yes,width=650,height=600,top=0px,left=0px');
}
//-----------------------------------------------------------------------------------------------
function DesignTemplateHelp2(AnchorTag){
	window.open('Design-Template-Help-2.asp#'+AnchorTag+'','','scrollbars=yes,width=800,height=350,left=0px,top=0px');
}
