function openwin(url, target)
{
	window.open(url, target, 'scrollbars=yes,resizable=yes,location=yes,toolbar=yes').focus();
}

function opendialog(url, target, w, h)
{
	if (!name) name = "_blank";
	if (!w) w = 850;
	if (!h) h = 850;
	window.open(url, target, 'dependent=yes,width='+w+',height='+h+',scrollbars=yes,location=no,resizable=yes').focus();
}

function mapblog_search(url, s, category, area, m)
{
	if (!s) s = " ";
	else s = encodeURI(s.replace(' |\t',''));

	var search_url = url;
	if (category && search_url.match(/\/news$/)) search_url += "/blog/category/"+category+"/";
	search_url += "?s="+s;
	if (area) search_url += "&area="+area;
	if (m) search_url += "&m="+area;

	document.location.href = search_url;
}
