<? include($template[company][file_path] . "shared/start_HTML.shared"); ?>

<? include($template[company][file_path] . "shared/HEADER.shared"); ?>

<? include($template[company][file_path] . "shared/start_TABLE_I_i.shared"); ?>
<? include($template[company][file_path] . "shared/start_TABLE_I_ii.shared"); ?>

<!-- NOTE:  cellpadding and cellspacing and TABLE II. must be done -->
<!-- this way in order to enable a ratio/"secured network" at the bottom -->

<? include($template[company][file_path] . "shared/start_TABLE_II.shared"); ?>


<? $logo_status = "off";
include($template[company][file_path] . "shared/start_TABLE_III_logo.shared"); ?>



<?

if(!$gateway[member][emailaddress]) {
  $page_message = "If you are a new user, <a href='quick_register_1.gate'>'Click Here'</a> to register a personal account. <font color=888888 size=1></b>(Account registration takes abut 45 seconds.)</font<b><br>
<br>
Otherwise, please login to your account below...";

} else {
	$message_width = "650px";
  $page_message = "Welcome back to {$template[company][name]} -- A trusted payment processor for <css style='color:#008800; font-weight:bold;'>{$gateway[business][accountname]}</css>.<br>
<br>
Please login to your {$template[company][name]} account... <br>
<table width='100%' border=0><tr><td align=right>New Users <a href='" . $http . $template[company][host_gateway] . "/quick_register_1.gate' style='color:#0000CC;'>Register Here</a>.</td></tr></table>";
}
  
include($template[company][file_path] . "shared/start_TABLE_IV_sysmsg.shared"); ?>


<? $form_action = "login_2.gate";
include($template[company][file_path] . "shared/start_TABLE_V_form.shared"); ?>
<!-- --------------------INSERT FORM CONTENT BELOW <!TD!>: ------------------------ -->



<? include($template[company][file_path] . "shared/start_TABLE_VI_mast_tab.shared"); ?>
<? include($template[company][file_path] . "shared/start_TABLE_VII_i.shared"); ?>
<? include($template[company][file_path] . "shared/start_TABLE_VII_ii.shared"); ?>

<!-- NOTE: the gap between VII_ii and VII_iii allows for a tight 'reqired fields' footer -->

<? include($template[company][file_path] . "shared/start_TABLE_VII_iii.shared"); ?>


<? include($template[company][file_path] . "shared/start_TABLE_VIII_menu.shared"); ?>
<!-- -------------------- INSERT "MAIN MENU" CONTENT BELOW <TR>: ------------------------ -->
<!-- -------------------- INSERT "MAIN MENU" CONTENT BELOW <TR>: ------------------------ -->


<? $TABLE_VIII_colspan = "4";
include($template[company][file_path] . "shared/TABLE_VIII_colspan.shared"); ?>
<!-- SINCE THE REQUIRED COLSPAN IS SET ABOVE, NOW START ROW CONTENT BELOW: <TR>: -->




    

<?
$title_left = "Account Login:";
$title_right = "<font color='#888888'>Remember Me:</font><input type=checkbox name=rememberme value=yes> <span class='openSUPPORT'>(<a href='javascript:openSUPPORT(42)'>?</a>)</span>";

if(isset($cookie_emailaddress)) {
	$title_right = "<font color='#888888'>Remember Me:</font><input type=checkbox name=rememberme value=yes checked> <span class='openSUPPORT'>(<a href='javascript:openSUPPORT(42)'>?</a>)</span>";
} else {
	$title_right = "<font color='#888888'>Remember Me:</font><input type=checkbox name=rememberme value=yes> <span class='openSUPPORT'>(<a href='javascript:openSUPPORT(42)'>?</a>)</span>";
}
include($template[company][file_path] . "shared/TABLE_VIII_ROW_title.shared"); ?>




<? 
$field_name = "emailaddress";
$row_title = "Personal&nbsp;Email&nbsp;Address:";
$row_input  = "<input onFocus=\"checkField(this, 'onFocus', 'email')\" onBlur=\"checkField(this, 'onBlur','email')\" onChange=\"checkField(this, 'onChange', 'email')\" onKeyUp=\"checkField(this, '', 'email')\" ";
$row_input .= " type=text size=35 maxlength=255 name=emailaddress value='{$gateway[member][emailaddress]}'>";
$row_example = "(Example: michelle001@aol.com)";
$row_required = "yes";
$row_variable = $session[login][emailaddress];
include($template[company][file_path] . "shared/TABLE_VIII_ROW_I_input.shared"); ?>




<? $field_name = "password";
$row_title = "Account&nbsp;Password:";
$row_input = "<input id=\"mypassword\" onFocus=\"checkField(this, 'onFocus')\" onBlur=\"checkField(this, 'onBlur')\" ";
$row_input .= "		onChange=\"checkField(this, 'onChange')\" onKeyUp=\"checkField(this, '')\" ";
$row_input .= "		type=password size=25 maxlength=255 name=password value=''>";
$row_example = "";
$row_required = "padlock";
$row_variable = $blank;
include($template[company][file_path] . "shared/TABLE_VIII_ROW_I_input.shared"); ?>





<? include($template[company][file_path] . "shared/TABLE_VIII_ROW_endline.shared"); ?>



<!-- --------------------INSERT "MAIN MENU" CONTENT ABOVE <TR>: ------------------------ -->
<!-- --------------------INSERT "MAIN MENU" CONTENT ABOVE <TR>: ------------------------ -->
<? include($template[company][file_path] . "shared/end_TABLE_VIII_mainmenu.shared"); ?>



<? include($template[company][file_path] . "shared/end_TABLE_VII_iii.shared"); ?>

<? 
$leftfooter_name = "Cancel";
$leftfooter_link = "cancel.gate?source=$PHP_SELF";
$rightfooter_name = "Forgot Your Password?";
$rightfooter_link = "forgotpassword.gate";
include($template[company][file_path] . "shared/TABLE_VII_ii_tightfooter.shared"); ?>

<? include($template[company][file_path] . "shared/end_TABLE_VII_ii.shared"); ?>
<? include($template[company][file_path] . "shared/end_TABLE_VII_i.shared"); ?>


<? include($template[company][file_path] . "shared/spacer_TABLE_V_form.shared"); ?>




<!-- !SUBMIT: INSERT TABLE V. LESS-TRAVELD SUBMIT BELOW <TR>:  -->
<?

$left_submit = "";
$center_submit = "<input type='hidden' name='step' value='Next'><input type='button' onclick='validateLogin()' name='login' value='Login Now...'>";
$right_submit = "";
include($template[company][file_path] . "shared/TABLE_XI_submit.shared");

?>
<!-- !SUBMIT: INSERT TABLE V. LESS-TRAVELD SUBMIT ABOVE <TR>:  -->

    
    
    
<!-- -------------------- INSERT FORM CONTENT ABOVE <TR>: ------------------------ -->
<? include($template[company][file_path] . "shared/end_TABLE_V_form.shared"); ?>



<? include($template[company][file_path] . "shared/end_TABLE_II.shared"); ?>

<!-- NOTE:  insert footers like "ratio"/"Secured Network" falls beween II and I -->
<? include($template[company][file_path] . "shared/TABLE_I_ii_tightfooter.shared"); ?>


<? include($template[company][file_path] . "shared/end_TABLE_I_ii.shared"); ?>
<? include($template[company][file_path] . "shared/end_TABLE_I_i.shared"); ?> 

<? include($template[company][file_path] . "shared/js_generic_validation.shared"); ?> 

<script type="text/javascript">
function validateLogin() {

	var d = document;
	
	if (!globalValidation())
		return;
	
	if ( f['mypassword'].value.trim().length < 4 ) {
		showEmptyImg(f['mypassword']);
		alert("'Account Password' has to be minumum 4 characters.");
		f['mypassword'].select();
		f['mypassword'].focus();
		return;
	}
	
	document.forms[0].submit();
	
}

// Run the validation when session brings default/saved email address
function validateOnLoad() {
	var emailAddressFromSession = '<? echo $gateway[member][emailaddress]; ?>';
	if (emailAddressFromSession != null && emailAddressFromSession.trim() != '')
		checkField(document.forms[0].emailaddress, 'onChange', 'email');
}

window.onload = validateOnLoad;

</script>

<? include($template[company][file_path] . "shared/end_HTML.shared"); ?> 
