function flashWrite( swf , width , height )
{
	var acfl = ""
	acfl+="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'"
	acfl+="        codebase='http://download.macromedia.com/pub/shockwave/"
	acfl+="cabs/flash/swflash.cab'"
	acfl+="        width   = " + width
	acfl+="        height  = " + height + ">"
	acfl+="<param name = movie value=" + swf + ">"
	acfl+="<param name = quality value=high>"
	acfl+="<param name=wmode value=transparent>"
	acfl+="<embed  src     = " + swf + " "
	acfl+="        quality = high  "
	acfl+="        wmode = transparent  "
	acfl+="        width   = "+ width
	acfl+="        height  = " + height
	acfl+="        type    = 'application/x-shockwave-flash' "
	acfl+="        pluginspage='http://www.macromedia.com/go/getflashplayer'>"
	acfl+="</embed>"
	acfl+="</object>"

	document.write(acfl)
}

function link(url) {
	window.location.href = url;
}
function ccur(obj) {
	if(document.all) obj.style.cursor = 'hand';
	else obj.style.cursor = 'pointer';
}

function setsidebar(elmid, type, id) {
	// 非同期通信を行うためのXMLHttpRequestオブジェクトを生成
	var xmlReq;
	try {
		xmlReq = new ActiveXObject("Microsoft.XMLHTTP");
	} catch(e) {
		xmlReq = new XMLHttpRequest();
	}
	// サーバーからの応答時の処理を定義（結果のページへの反映）
	xmlReq.onreadystatechange = function() {
		var msg = document.getElementById(elmid);
		if (xmlReq.readyState == 4) {
			if (xmlReq.status == 200) {
				msg.innerHTML = xmlReq.responseText;
			} else {
				msg.innerHTML = "";
			}
		} else {
			msg.innerHTML = "<div class=\"banner\"><img src=\"/img/loader.gif\" alt=\"読み込み中...\" /></div>";
		}
	}
	
	// サーバーとの通信を開始
	var option = "";
	if( id > 0 )
		option = "&id=" + id;
	xmlReq.open("GET", "/shared/php/sidebar.php?type=" + type + option, true);
	xmlReq.send(null);
}

function timerredirect(url, time){
	var timemsec = time * 1000;
	setTimeout(function() { location.href = url; }, timemsec);
}

function cText(obj, deftext) {
	if( obj.value == deftext ) {
		obj.value = "";
	}
	return true;
}

function sText(obj, deftext) {
	if( obj.value == "" ) {
		obj.value = deftext;
	}
	return true;
}

function SetDefText(objname, deftext) {
	if( document.getElementById(objname) ) {
		var obj = document.getElementById(objname);
		if( obj.value == "" ) {
			obj.value = deftext;
		}
		return true;
	}
	return false;
}

window.onload = function() {
	SetDefText('userid', 'メールアドレス');
	SetDefText('userpw', 'パスワード');
};

// コンフリクト対策
jQuery.noConflict();

jQuery(document).ready(function() {
  jQuery('div.show_login:eq(0)> div').hide();
  jQuery('div.show_login:eq(0)> h3').click(function() {
    jQuery(this).next().slideToggle('fast');
  });
});

jQuery(function() {
    jQuery("#tabs a[href=#taball]").click(function(event){jQuery("#tabs div[id^=tab]").show(); event.preventDefault();})
    jQuery("#tabs a[href=#tab1]").click(function(event){jQuery("#tabs div[id^=tab]").hide(); jQuery("#tab1").fadeIn(); event.preventDefault();})
    jQuery("#tabs a[href=#tab2]").click(function(event){jQuery("#tabs div[id^=tab]").hide(); jQuery("#tab2").fadeIn(); event.preventDefault();})
    jQuery("#tabs a[href=#tab3]").click(function(event){jQuery("#tabs div[id^=tab]").hide(); jQuery("#tab3").fadeIn(); event.preventDefault();})
    jQuery("#tabs a[href=#tab4]").click(function(event){jQuery("#tabs div[id^=tab]").hide(); jQuery("#tab4").fadeIn(); event.preventDefault();})
});

