function vote()
{
	var i, checked, id;
	
	checked = 0;
	for (i = 0; i < document.frmPoll.poll_option_id.length; i++)
	{
		if (document.frmPoll.poll_option_id[i].checked)
		{
			checked = 1;
			id = document.frmPoll.poll_option_id[i].value;
		}
	}
	
	if (checked == 1)
	{
		poll(id);
	}
	else
	{
		alert('Please select any option');
	}
	
	return false;
}

function validateNewsCommentInsert()
{
	var fullname, email, comment;
	
	fullname = document.frmNewsCommentInsert.fullname.value;
	email    = document.frmNewsCommentInsert.email.value;
	comment  = document.frmNewsCommentInsert.comment.value;
	
	email_regexp     = new RegExp('^[^.][a-zA-Z0-9_-]+([.][a-zA-Z0-9_]+)*[@]([a-zA-Z0-9]+([-]?[a-zA-Z0-9]+))+[.](([a-zA-Z]{2,3}|([a-zA-Z]{2,3}[.][a-zA-Z]{2,2})))$', 'g');
	
	if (fullname == '')
	{
		alert('Please enter fullname');
		document.frmNewsCommentInsert.fullname.focus();
		return false;
	}
	
	if (email == '')
	{
		alert('Please enter email');
		document.frmNewsCommentInsert.email.focus();
		return false;
	}
	else
	{
		if (false == email_regexp.test(email))
		{
			alert('Invalid email');
			document.frmNewsCommentInsert.email.value = '';
			document.frmNewsCommentInsert.email.focus();
			return false;
		}
	}
	
	if (comment == '')
	{
		alert('Please enter your comments');
		document.frmNewsCommentInsert.comment.focus();
		return false;
	}
	
	return true;
}

function validateInterviewCommentInsert()
{
	var fullname, email, comment;
	
	fullname = document.frmInterviewCommentInsert.fullname.value;
	email    = document.frmInterviewCommentInsert.email.value;
	comment  = document.frmInterviewCommentInsert.comment.value;
	
	email_regexp     = new RegExp('^[^.][a-zA-Z0-9_-]+([.][a-zA-Z0-9_]+)*[@]([a-zA-Z0-9]+([-]?[a-zA-Z0-9]+))+[.](([a-zA-Z]{2,3}|([a-zA-Z]{2,3}[.][a-zA-Z]{2,2})))$', 'g');
	
	if (fullname == '')
	{
		alert('Please enter your fullname');
		document.frmInterviewCommentInsert.fullname.focus();
		return false;
	}
	
	if (email == '')
	{
		alert('Please enter email');
		document.frmInterviewCommentInsert.email.focus();
		return false;
	}
	else
	{
		if (false == email_regexp.test(email))
		{
			alert('Please enter email');
			document.frmInterviewCommentInsert.email.value = '';
			document.frmInterviewCommentInsert.email.focus();
			return false;
		}
	}
	
	if (comment == '')
	{
		alert('Please enter your comment');
		document.frmInterviewCommentInsert.comment.focus();
		return false;
	}
	
	return true;
}