// ロールオーバー
function onMouse(objName){
	var imgUrl = 'images/' + objName + '_on.gif';
	document.images[objName].src = imgUrl;
}

function offMouse(objName){
	var imgUrl = 'images/' + objName + '.gif';
	document.images[objName].src = imgUrl;
}

function onMouseCmn(objName){
	var imgUrl = '../images_cmn/' + objName + '_on.gif';
	document.images[objName].src = imgUrl;
}

function offMouseCmn(objName){
	var imgUrl = '../images_cmn/' + objName + '.gif';
	document.images[objName].src = imgUrl;
}

// グローバルメニュー設置
function loadMenu(name) {
	//var menuYloc = null;
	var menuYloc = 75;

	$(document).ready(function(){
		//menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
		$(window).scroll(function () {
			offset = menuYloc+$(document).scrollTop()+"px";
			$(name).animate({top:offset},{duration:500,queue:false});
		});
	});
}


//////// トップページ
// リンク元チェック
function linkCheck(){
	var page = document.referrer;
	 if (page.indexOf("fragmentinc.co.jp") != -1 ) {
		if (page.indexOf("pricelist") != -1 ) {
			location.hash = "#pricelist";
		} else if (page.indexOf("works") != -1 ) {
			location.hash = "#works";
		} else if (page.indexOf("service") != -1 ) {
			location.hash = "#service";
		} else if (page.indexOf("flow") != -1 ) {
			location.hash = "#flow";
		} else if (page.indexOf("map") != -1 ) {
			location.hash = "#map";
		}
	}
}



// お問い合わせフォーム入力チェック
function check(){
	if(!document.fraForm.お名前.value) {
		alert('お名前は必ず入力してください');
		return false;
	}
	if(!document.fraForm.EMAIL.value) {
		alert('E-MAILは必ず入力してください');
		return false;
	}
	if(!document.fraForm.お問い合わせ内容.value) {
		alert('お問い合わせ内容は必ず入力してください');
		return false;
	}
}

