function validatefield(){
	form = document.getElementsByTagName('form')[0];
	n = form.elements.length;
	for(i=0;i<n;i++){			
		obj = form.elements[i];
		if(obj.tagName != 'FIELDSET'){
			if((obj.type =='text' && obj.name != 'fax' || obj.name == "enquires") && isEmpty(obj)){
				return error(obj,'','All fields with star (*) are required');
			}		
			if(obj.name=='req_email'){			
				if(!checkMail(obj))
					return false;
			}
			if(obj.name=='req_country'){
				if(!checkSelect(obj))
					return error(obj,'','Please select an option from the list');
			}
		}else continue;
	}
/*	
	list = document.getElementById('country');
	if(list.options[list.selectedIndex].value == 'select'){
			return error(obj);
	}
*/
}

function initForm(){
	document.getElementById('submit').onclick = validatefield;
}

window.onload=function(){
						initForm();
						}