// JavaScript Document

function LoginToSFMS()
{

    var ESMS_log_in_ID =  document.getElementById ('ESMS_log_in_ID');
    var ESMS_password  =  document.getElementById ('ESMS_password');
    
    var rn_url = "http://sfms.safetyfirst.co.nz/sfms/index.php";
    
    if (ESMS_password && ESMS_password)
    {
        var rn_window = window.open("","_blank"); 
	    rn_window.document.writeln('<span style="font-size:11px;font-family:Arial">Please wait...</span>');
        rn_window.document.writeln('<form name="rn_form" method="post" ');
	    rn_window.document.writeln(' action="'+rn_url +  '">');
	    rn_window.document.writeln(' <input type="hidden" name="__ESMS_log_in_ID"   value="'+ ESMS_log_in_ID.value +'" />');
	    rn_window.document.writeln(' <input type="hidden" name="__ESMS_password"   value="'+ ESMS_password.value +'" />');
	    rn_window.document.writeln('</form>');
	    rn_window.document.close();
	    rn_window.document.rn_form.submit();
    }
	
} 