//*************************************************************************************************************
//** Copyright Notice 01/02/2008   
//** Winny Ltd T/A The Consultancy
//** http://www.theconsultancy.co.uk
//** 
//** Copyright (C) and Intellectual Property 2008 Winny Ltd T/A The Consultancy. All Rights Reserved.
//** 
//** THIS CODE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM 'Winny Ltd T/A The Consultancy'.
//** 
//** All materials copyright © 2008 by Winny Ltd T/A The Consultancy. Unless otherwise indicated this code is the 
//** Copyright and intellectual property of Winny Ltd T/A The Consultancy and is protected by applicable British 
//** and international copyright laws, all rights reserved. 
//** 
//** For more information about this please contact 'Winny Ltd T/A The Consultancy' at the address and website below:-
//** 
//** Winny Ltd T/A The Consultancy, The Innovation Centre, Venture Court, Queens Meadow Business Park, TS25 5TG, 
//** England, (+44)1429 239 689 http://www.theconsultancy.co.uk
//** 
//** Removal or modification of this copyright notice will violate the copyright agreement.
//**************************************************************************************************************
//** 
//*************************** SOFTWARE AND CODE MODIFICATIONS **************************************************
//** 
//** MODIFICATION OF THIS SOFTWARE IS A VIOLATION OF THE COPYRIGHT AGREEMENT AND IS STRICTLY PROHIBITED
//** 
//** No part of this material may be used for any other purpose or hosted on any other server without prior 
//** written permission. Use for any other purpose is expressly prohibited by law, and may result in civil 
//** and criminal penalties. 
//*************************************************************************************************************
function checkIfNum(evt)
{
evt = (evt) ? evt :window.event
var charCode = (evt.which) ? evt.which : evt.keyCode
if ((charCode < 48 || charCode > 57) && charCode != 8 && charCode != 9 && charCode != 13)
	{
	document.varsForm.error.value = "This field accepts numbers only."
	return false
	}
	document.varsForm.error.value = "";
	return true
}

function validateForm(){
	if(document.varsForm.widthl.value=="")
		{document.varsForm.error.value="You must enter a width.";
		document.varsForm.widthl.focus();
		return false;
		}
	if (document.varsForm.widthl.value < 652 || document.varsForm.widthl.value > 1048)
		{
		document.varsForm.error.value="The dimensions required for the overall width must be between 652 and 1048 mm. ";
		document.varsForm.widthl.focus();
		return false;
		}
	if(document.varsForm.heightl.value=="")
		{document.varsForm.error.value="You must enter a height.";
		document.varsForm.heightl.focus();
		return false;
		}	
	
	if (document.varsForm.heightl.value < 1985 || document.varsForm.heightl.value > 3000)
		{document.varsForm.error.value="The dimensions required for the overall height must be between 1985 and 3000 mm.";
		document.varsForm.heightl.focus();
		return false;
		}

}
