//--------------------------------------------------------------------
// simple-opac 共通 JavaScript ： s-opac.js

// reset
function soc_reset() {
	if (!document.all) return;

	var obj;
	for (var i = 0; i < document.all.length; ++i) {
		obj = document.all[i];
		if (obj.type == "text") obj.value="";
		else if (obj.type == "checkbox") obj.checked = false;
		else if (obj.type == "radio" && obj.id.substring(obj.id.length - 4, obj.id.length) == "_and") obj.checked = true;
		else if (obj.type == "select-one") obj.selectedIndex = 0;
	}
}

function addFavorite(name, url)
{
	if (window.sidebar) {
		window.sidebar.addPanel(name, url, '');
	}
	else if (document.all) {
		window.external.AddFavorite(url, name);
	}
	else {
		alert('本ブラウザでは対応していません。');
	}
}
