
var BookmarkURL = window.location.href;

function Bookmark() {
	if (document.all) window.external.AddFavorite(BookmarkURL,document.title)
}

function jsOpenhWnd (u) {
	hWnd = window.open (u, "Hwnd", "height=660,width=380,toolbar=no,directories=no,status=no,scrollbars=auto,resizable=no,menubar=no");
}

function checkVHost(str){
	if(str.indexOf(".")!=-1){
		return true;
	}else{
		return false;
	}	
}

function Search(){
	if (document.frmSearch.Cat.value == '') {
		alert('<?=$sSearchAlertCat?>');
	}
	else if (document.frmSearch.Key.value == '') {
		alert('<?=$sSearchAlertKey?>');
		document.frmSearch.Key.focus();
	}
	else {
		keyword = document.frmSearch.Key.value;
		window.location = document.frmSearch.Cat.value + '.php?k=' + keyword;
	}
}

function CheckKey() {
	if (window.event.keyCode == 13) {
		Search();
	}
	return false;
}

