/** 社長へのメッセージ内容に問題がないか確認
*/
function checkMessageToPresident(){
	
	// メールアドレス[必須]
	var email = $('#message_email').val();
	if( !email ){
		alert("メールアドレスが入力されていません");
		return false;
	}
	
	// 名前[必須]
	var name = $("#message_name").val();
	if( !name ){
		alert("お名前が入力されていません");
		return false;
	}
	
	// 本文[必須]
	var body = $("#mail_body").val();
	if( !body ){
		alert("本文が入力されていません");
		return false;
	}
	
	// 最終確認
	if( confirm("送信しても宜しいですか？") == false ){
		return false;
	}
	
	// ボタンを非表示に
	changeDisabled("message_send", false);
	$("#message_send").css("display", "none");
	
	return true;
}



/** disabled状態を変更する
* @param id 変更するID名
* @param status 表示ならtrue, 非表示ならfalse
*/
function changeDisabled(id, status){
	if( status ){
		$("#" + id).attr("disabled", "");
	}else{
		$("#" + id).attr("disabled", "disabled");
	}
}



function iFrameHeight() {  
    var h = 0;  
    var Opera = window.opera ? true : false;  
    if (Opera) {  
        h = document.getElementById('blockrandom').contentDocument.getElementById('mp-main').offsetHeight + 40;  
        document.getElementById('blockrandom').setAttribute("height",h);  
    } else if ( !document.all ) {  
        h = document.getElementById('blockrandom').contentDocument.height;  
        document.getElementById('blockrandom').style.height = h + 40 + 'px';  
    } else if( document.all ) {  
        h = document.frames('blockrandom').document.body.scrollHeight;  
        document.all.blockrandom.style.height = h + 40 + 'px';  
    }  
}  