function ajaxupdater(url, params, objid){
a = new Ajax.Updater( {success:objid},
url, {
method: "post",
parameters: params,
onFailure:function(httpObj){alert("エラーで読み込めませんでした");}
}
);
a = null;
}
function blindupdwn(id){
	obj = $(id);
	if (obj.style.display == 'none') {
		new Effect.BlindDown(id);
	}
	else {
		new Effect.BlindUp(id);
	}
}
function delitem(url){
	if(window.confirm('削除しますか？')){
		window.location.href = url;
	}
}
/* 文字数確認 */
function strLength(strSrc){
	len = 0;
	strSrc = escape(strSrc);
	for(i = 0; i < strSrc.length; i++, len++){
		if(strSrc.charAt(i) == "%"){
			if(strSrc.charAt(++i) == "u"){
				i += 3;
				len++;
			}
			i++;
		}
	}
	return len;
}
function showLength(obj,maxlen ) {
	if(maxlen==0)	return;
	var strCount = Math.ceil(strLength(obj.value).toString() / 2);
	if(strCount > maxlen){
		//オーバー
		alert('文字数が多すぎます。(制限：'+maxlen+'文字)');
		obj.value = obj.value.substr(0,maxlen);
		
	}else if(strCount == maxlen){
		//同じ
	}else{
		//未満
	}
}
function checklen(id, maxlen){
	var text2Check = document.getElementById(id);
	text2Check.onkeyup = function(){
		showLength(text2Check, maxlen);
	}
}
/* +'<param name="bgcolor" value="#FFFFFF" />' 2010.03.25 省きました ari */
function loadswf(url, width, height){
	var flash = ''
			+'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="rollslide_flashexternal" align="middle" style="cursor:pointer;">'
			+'<param name="allowScriptAccess" value="always" />'
			+'<param name="allowFullScreen" value="false" />'
			+'<param name="movie" value="'+url+'" />'
			+'<param name="quality" value="high" />'
			+'<param name="wmode" value="transparent" />'
			+'<param name="LOOP" value="true" />'
			+'<param name="FlashVars" value="" />'
			+'<embed src="'+url+'" quality="high" wmode="transparent" style="cursor:pointer;" width="'+width+'" height="'+height+'" loop="true" name="rollslide_flashexternal" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars=/>'
			+'</object>';
	document.write(flash);	
	return;	
}

