function Trim( str ) {
	var strRet, strFinal;
	strRet = LTrim( str );
	return RTrim( strRet );
}
function RTrim( strTemp ) {
	strTemp += '';
	strTemp = strTemp.replace( / *$/g, '' ) ;
	return strTemp.replace( /　*$/g, '' ) ;
}
function LTrim( strTemp ) {
	strTemp += '';
	strTemp = strTemp.replace( /^ */g, '' ) ;
	return strTemp.replace( /^　*/g, '' ) ;
}
function IsEmptyStr( strValue ){
	if (strValue == null) {
		return true
	} else if ( Trim(strValue) == '' ) {
		return true;
	} else {
		return false;
	}
}
function getToolId() {
	var toolId = '';
	try {
		//宅配便ツール呼び出し
		toolId = OtodokeKun.GetClientID();
	} catch(e) {
		//宅配便ツール未インストール
		return '';
	}
	if(IsEmptyStr(toolId)) {
		//未初期化
		return '';
	} else {
		//インストール済み
		return toolId;
	}
}
function initToolId() {
	var toolId = getToolId();
	document.loginForm.toolId.value = toolId;
}
