// JavaScript Document
// ? 2004 China Smart Sourcing
// JPEG Interactive Presents

_hilight_style='text-strong-red';

function toggle_services(){
	menuservices.style.display=(menuservices.style.display=="none")?"":"none";
}

function reset_form(){
	if(confirm('All the infomation will be purged.\nAre you sure to reset the form?'))
		window.location.reload(false);
	else return false;
}

function check_field(name){
	if(eval('inquiry.'+name).value==''){
		_empty++;
		eval('span_'+name).className=_hilight_style;
	}
	else
		eval('span_'+name).className='';
}

function check_radio(name){
	var n,_selected='';
	for(n=0;n!=eval('inquiry.'+name).length;n++)
		if(eval('inquiry.'+name)[n].checked)
			_selected=eval('inquiry.'+name)[n].value;
	eval('span_'+name).className=_selected==''?_hilight_style:'';
}

function check_form(){
	_empty=0;
	check_field('name');
	check_field('phone');
	check_field('email');
	check_field('location');
	check_field('interests');
	check_field('quantity_initial');
	check_field('quantity_annual');
	check_radio('handle');
	if(_empty!=0)
		alert('The field(s) marked red must not be empty.');
	return (_empty==0);
}








































































