
function trim(str) {  
    return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');  
}  

function sendSearch(sw,ew){
	var obj=document.sFrm;
	sw = (typeof(sw) != 'undefined') ? sw : "";
	ew = (typeof(ew) != 'undefined') ? ew : "";
	obj.sword.value=sw;
	obj.eword.value=ew;
	obj.submit();
}
function sendPage(page){
	var fObj=document.listFrm;
	fObj.page.value=page;
	fObj.submit();
}

function doSearch(obj){
	if(trim(obj.word.value)==""){
		alert("検索したい漫画家の名前を入力してください。");
		obj.word.focus();
	}
	else{
		obj.submit();
	}
}

//textarea maxlength　チェック
function ismaxlength(obj){
	var mlength=1024;
	if (obj.getAttribute && obj.value.length>mlength) {
		alert("文字数は512まで制限しています。");
		obj.value=obj.value.substring(0,mlength);
	}
}

