// JavaScript Document
function setMenuClicked(i){
	var options = { path: '/', expires: 1 };
	$.cookie('menu_a_clicked', i, options);
}
function getMenuClicked(){
	return $.cookie('menu_a_clicked');
}
function deletetMenuClicked(){
	var options = { path: '/', expires: 1 };
	$.cookie('menu_a_clicked', null, options);
}
function setMenuActive(){
	var i;
	i = getMenuClicked();
	if (i==0 || i==null) i = 1;
	$("#menu_a_" + i).addClass("active");
}

function submitsearch(){
	var f = document.getElementById('sForm');
	var keyword1 = f.keyword.value;	
	if (keyword1=='Nhập từ khoá') return false;
	window.location.href = nvcms_url + "/?mod=news&keyword="+keyword1;
	return false;
}
function submitFormWithEnter(myfield,e)
{
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	else return true;	
	if (keycode == 13)
	{
		var f = document.getElementById('sForm');
		var keyword1 = f.keyword.value;
		window.location.href = nvcms_url + "/?mod=news&keyword="+keyword1;
		return false;
	}
	else
	return true;
}

