function add_alert() { if (confirm("追加してよろしいですか？")){ return true; }else{ return false; } }
function chg_alert() { if (confirm("更新してよろしいですか？")){ return true; }else{ return false; } }
function del_alert(){ if (confirm("削除してよろしいですか？")){ return true; }else{ return false; } }
function msg_alert(msg){ if (confirm(msg)){ return true; }else{ return false; } }
function cache_rand(){ now = new Date(); cache_time = new Date(now.getYear(),now.getMonth(),now.getDay()); return cache_time.getTime(); }
function menu_chg(id, pic){  document.getElementById(id).src = pic+'?'+cache_rand(); }
try{ if( navigator.appVersion.indexOf("MSIE 6",0) != -1) document.execCommand('BackgroundImageCache', false, true); } catch(e) {} 
function iphoneSwitch(){
	if(GetCookie("iphoneSwitch")){ DeleteCookie("iphoneSwitch"); }else{ SetCookie("iphoneSwitch", "1"); }
	window.location.reload();
}
function dtvSwitch(){
	if(GetCookie("dtvSwitch")){ DeleteCookie("dtvSwitch"); }else{ SetCookie("dtvSwitch", "1"); }
	window.location.reload();
}
//ADDBGN 2008/1/8 NSS和山
function createXMLHttpRequest(cbFunc)
{
	var XMLhttpObject = null;
	try {
		// Firefox/Safari/Opera互換の通信オブジェクト生成
		XMLhttpObject = new XMLHttpRequest();
	} catch(e) {
		try {
			// IE6用の通信オブジェクト生成
			XMLhttpObject = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				// IE5用の通信オブジェクト生成
				XMLhttpObject = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				return null;
			}
		}
	}
	if (XMLhttpObject) {
		XMLhttpObject.onreadystatechange = cbFunc;
	}
	return XMLhttpObject;
}

