function bookMark(title, url) {
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if ( window.external ) { // IE Favorite
		window.external.AddFavorite(url, title); 
	}
}

function inputClick(id, defval) {
	val = document.getElementById(id).value;
	if (val == defval) {
		document.getElementById(id).value = '';
	}
}

function inputBlur(id, defval) {
	val = document.getElementById(id).value;
	if (val == '') {
		document.getElementById(id).value = defval;
	}
}

function changeCountry(c,target) {
	var url = "/inc/ajax/region.php?c=" + c;
	new Ajax(url, {method: 'get', update: $(target)}).request();
}

function addPort(p,type) {
	var url = "/inc/ajax/addport.php?p=" + p + "&t=" + type;
	if (type == "list") {
		upd = 'addto'+p;
	} else {
		upd = 'addto';
	}
	new Ajax(url, {method: 'get', update: $(upd)}).request();
}

