<?php
require_once('includes/settings.php');
?>
<!DOCTYPE html> 
<html>
<head>
	<title><?php echo $g_MallName ?> Contest</title>
	<meta charset="utf-8">
	<!--[if IE]>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<![endif]-->
	<!--[if lte IE 9]>
		<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script>
	<![endif]-->
	<link rel="stylesheet" type="text/css" href="assets/styles/layout.css">
	<link rel="stylesheet" type="text/css" href="assets/styles/form.css">
	<link rel="stylesheet" type="text/css" href="assets/styles/table.css">
	<link rel="stylesheet" type="text/css" href="assets/styles/text.css">
	<link rel="stylesheet" type="text/css" href="assets/styles/Main30th.css">
	<link rel="stylesheet" href="assets/styles/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
	
	<!-- <link href='https://fonts.googleapis.com/css?family=Open+Sans:700' rel='stylesheet' type='text/css'> -->
	<link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>

	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.13.1/jquery.validate.min.js"></script>
	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.13.1/additional-methods.min.js"></script>
	<script type="text/javascript" src="assets/scripts/jquery.fancybox.pack.js?v=2.1.5"></script>


	<script type="text/javascript">
		
		var validator = null;
		$(document).ready(function()
		{
			$(".fancybox").fancybox();
			$("#rules").fancybox();

			validator =
			$('#regForm').validate(
			{
				rules:
				{
					first_name:
			        {
			          minlength:2
			        },
			        last_name:
			        {
			          minlength:2
			        },
			        email:
			        {
			          email: true
			        },
			        pcode:
			        {
			        	postalCodeCA: true
			        }
				},
				
				// http://stackoverflow.com/questions/1578007/jquery-validate-hide-display-validation-error-messages-show-custom-errors
				errorPlacement: function(error,element) {
						element.css('background-color', '#ffeeee');
				    return true;
  			}
			});
		});
		
		function IsNumber(ch)
		{
			var a = ch.charCodeAt(0);
			if (a < 48) return false;
			if (a >57) return false;
			return true;
		}
		
		function IsLetter(ch)
		{
			var a = ch.charCodeAt(0);
			if (a < 65) return false;
			if (a >122) return false;
			if (a >= 91 && a <= 96) return false;
			return true;
		}

	</script>
</head>
