Hi i am doing a form validation using javascript (not jquery) just plain javascript and i can not get this to work i shall paste my html and javascript code below if anyone can get this working for me it would be great

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Form Validation</title>
<link href="formlayout.css" rel="stylesheet" type="text/css"></link>

<script type="text/javascript" src="formjs.js"></script>

<div id="stylized" class="myform">
<form id="form" name="form" method="post" action="file:///C|/Users/ian/Desktop/index.html">
<h1>Sign-up form</h1>
<p>Please Complete All Fields</p>

<span class="small">Add your name</span>
<input type="text" name="name" id="name" />

<span class="small">Enter Address</span>
<input type="text" name="add1" id="add1" />

<span class="small">Add your City</span>
<input type="text" name="city" id="city" />

<span class="small">Add your Postcode</span>
<input type="text" name="pcode" id="pcode" />

<label>Phone Number
<span class="small">Add your Phone Number</span>
<input type="text" name="pnum" id="pnum" />

<span class="small">Add A Valid Email</span>
<input type="text" name="email" id="email" />

<label>Confirm Email
<span class="small">Retype Email</span>
<input type="text" name="conemail" id="conemail" />

<span class="small">Min. size 6 chars</span>
<input type="text" name="password" id="password" />

<label>Confirm Password
<span class="small">Min. size 6 chars</span>
<input type="text" name="conpassword" id="conpassword" />

<input type="button" value="Submit Details" onclick="Confirm()"/>
<div class="spacer"></div>



// JavaScript Document

function validate() {
var name = document.getElementById('name').value;
var address = document.getElementById('add1').value;
var city = document.getElementById('city').value;
var postcode = document.getElementById('pcode').value;
var phonenum = document.getElementById('pnum').value;
var email = document.getElementById('email').value;
var conemail = document.getElementById('conemail').value;
var pword = document.getElementById('password').value;
var conpword = document.getElementById('conpassword').value;

if (name==""){
document.getElementById("name").style.backgroundColor = "red";
document.getElementById("name").innerHTML = "You havent entered a Name"
errorCount = errorCount + 1;

if (add1==""){
document.getElementById("add1").style.backgroundColor = "red";
document.getElementById("add1").innerHTML = "You havent entered a Address"
errorCount = errorCount + 1;

if (city==""){
document.getElementById("city").style.backgroundColor = "red";
document.getElementById("city").innerHTML = "You havent entered a City"
errorCount = errorCount + 1;

if (pcode<6){
document.getElementById("pcode").style.backgroundColor = "red";
document.getElementById("pcode").innerHTML = "You havent entered a vaild Postcode"
errorCount = errorCount + 1;

if (pnum<11){
document.getElementById("pnum").style.backgroundColor = "red";
document.getElementById("pnum").innerHTML = "You havent entered a vaild Phone Number"
errorCount = errorCount + 1;

if (email.indexOf("@")==-1){
document.getElementById("Email").innerHTML = "You havent entered a vaild email"
errorCount = errorCount + 1;

if (pword==""){
document.getElementById("pword").style.backgroundColor = "red";
document.getElementById("pword").innerHTML = "You havent entered a Password"
errorCount = errorCount + 1;


function checkemail() {
if(email.value == conemail.value){
document.getElementById("conemail").innerHTML = "emails dont match"

function checkpass(){
if(pword.value == conpword.value){
document.getElementById("conemail").innerHTML = "passwords dont match"