
function $(id){
	return document.getElementById(id);
}

function check_enquiry(){
	if( $('subject').value == '' ){
		alert("Please input the inquery subject!");
		$('subject').focus();
		return false;
	}
	if( $('intro').value == '' ){
		alert("Please input the inquery intro!");
		$('intro').focus();
		return false;
	}
	if( $('contact').value == '' ){
		alert("Please input your name!");
		$('contact').focus();
		return false;
	}
	if( $('company').value == '' ){
		alert("Please input your company name!");
		$('company').focus();
		return false;
	}
	if( $('tel').value == '' ){
		alert("Please input your phone number!");
		$('tel').focus();
		return false;
	}
//	if( $('vcode').value == '' ){
//		alert("Please input the validate code!");
//		$('vcode').focus();
//		return false;
//	}
	var emailReg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
	var flag = emailReg.test($('email').value);
	if( $('email').value == '' || !flag ){
		alert("Please input the right email!");
		$('email').focus();
		return false;
	}
	return true;
}

function check_login(){
	if( $('uname').value == '' ){
		alert("Please input your loginname!");
		$('uname').focus();
		return false;
	}
	if( $('pword').value == '' ){
		alert("Please input your password!");
		$('pword').focus();
		return false;
	}
	return true;
}

function check_expo(){
	           
	if( $('title').value == '' ){
		alert("Please input the title!");
		$('title').focus();
		return false;
	}
	if( $('begin_time').value == '' ){
		alert("Please input the Expo Date!");
		$('begin_time').focus();
		return false;
	}
	if( $('address').value == '' ){
		alert("Please input the Venue!");
		$('address').focus();
		return false;
	}
	if( $('country').value == '' ){
		alert("Please input the country!");
		$('country').focus();
		return false;
	}
	if( $('organizer').value == '' ){
		alert("Please input the organizer!");
		$('organizer').focus();
		return false;
	}
	if( $('maintext').value == '' ){
		alert("Please input the Introduction!");
		$('maintext').focus();
		return false;
	}
	if( $('company_http').value == '' ){
		alert("Please input the URL!");
		$('company_http').focus();
		return false;
	}
	if( $('tel').value == '' ){
		alert("Please input the Tel!");
		$('tel').focus();
		return false;
	}
	return true;
}	
