function openNewWindow(url,name,windowWidth,windowHeight){
	myleft=(screen.width)?(screen.width-windowWidth)/2:100;
	mytop=(screen.height)?(screen.height-windowHeight)/2:100;
	properties = "width="+windowWidth+",height="+windowHeight+",noresize,scrollbars=no,top="+mytop+",left="+myleft;
	focusWindow = window.open(url,name,properties);
	focusWindow.focus();
}

function validateSearchFieldsPage(form)
{
	/*var form = window.document.search_form;*/
	if (form.keyword.value.length < 3) {
		alert('Please enter at least 3 characters!');
		return false;
	}
	
	if (form.keyword.value == 'cauta in site') {
		alert('Please enter at least 3 characters!');
		return false;
	}
	
	return true;
}

function getURL(mode, page, params)
{
	host='http://www.animepile.net';
	if (page == "")
		return host + (!mode ? '/index.php' : '/') + (params && params != '' ? (params.substr(0, 1) != '#' ? '&' : '') + params : '');
	
	return host + (!mode ? '/index.php?page=' : '') + (mode ? '/' : '') + page + (mode ? '.html' : '') + (params && params != '' ? (params.substr(0, 1) != '#' ? '&' : '') + params : '');
}
