///// for StaticPage /////

//ご意見＆ご質問オープン
function cntWin() {
	newwin =window.open('https://www.hikkoshihikaku.com/step/hikkoshi/contact.htm','cnt','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=500,height=440,left=0,top=0');
	newwin.focus();
}

function cntWinHoujin() {
	newwin =window.open('https://www.hikkoshihikaku.com/step/hks-houjin/contact.htm','cnt','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=500,height=440,left=0,top=0');
	newwin.focus();
}

function cntWinKaigai() {
	newwin =window.open('https://www.hikkoshihikaku.com/step/hks-kaigai/contact.htm','cnt','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=500,height=440,left=0,top=0');
	newwin.focus();
}

function memberWin() {
   newwin =window.open('http://www.webcrew.co.jp/info/member_pop.html','member',
     'toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=500,heigh=500,left=0,top=0');
   newwin.focus();
}

//ウインドウオープン
function openWin(url,name,property) {
	newwin =window.open(url,name,property);
	newwin.focus();
}

//mapオープン
function mapWin() {
	newwin =window.open('/info/map.html','map','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=450,height=620,left=0,top=0');
	newwin.focus();
}

//ランクオープン
function rankWin(url) {
	newwin =window.open('/rank/rank_pop.html','rank','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=520,height=500,left=0,top=0');
	newwin.focus();
}

//比較オープン
function compWin(url) {
	newwin =window.open(url,'comp','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=430,height=240,left=0,top=0');
	newwin.focus();
}

//達人オープン
function expWin(url) {
	newwin =window.open(url,'exp','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=430,height=400,left=0,top=0');
	newwin.focus();
}

//ブラウザオープン
function brwsWin(url) {
	newwin =window.open(url,'exp','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=550,height=400,left=0,top=0');
	newwin.focus();
}

// クーポンオープン
function couponWin(url) {
	newwin =window.open(url,'coupon','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=740,height=620,left=0,top=0');
	newwin.focus();
}

//topicsオープン
function tpcsWin() {
	newwin =window.open('http://www.webcrew.co.jp/info/topics_mitsumori.html','topics','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=450,height=400,left=0,top=0');
	newwin.focus();
}

//ウインドウクローズ
function winClose(eve){
	window.close();
}

//ブックマーク
function bookmark() {
	if(navigator.userAgent.indexOf("MSIE") > -1){
		window.external.AddFavorite('http://www.hikkoshihikaku.com','引越し比較.com');
	} else if(navigator.userAgent.indexOf("Firefox") > -1){
		window.sidebar.addPanel('引越し比較.com','http://www.hikkoshihikaku.com','');
	}
}

///// for promoページ/////

//コピーライト
function wCopy(){
	document.write("copyright &copy; 2009 Hikkoshihikaku.com Inc. All rights reserved.&nbsp;")
}

//各社オープン
function comsWin(url) {
	newwin =window.open(url,'coms','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=630,height=550,left=0,top=0');
	newwin.focus();
}

//コンテンツオープン
function contentsWin(url) {
	newwin =window.open(url,'contents','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=700,height=600,left=0,top=0');
	newwin.focus();
}

//フォームカラー変更
function onForm(which){
	if (document.all || document.getElementById){
		which.style.backgroundColor="#E6FFEC"
		}
}

function blurForm(which){
	if (document.all || document.getElementById){
		which.style.backgroundColor="#FFFFFF"
		}
}

//TOPアンケート結果
function satisfactionWin(url) {
	newwin =window.open(url,'satisfaction','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=640,height=600,left=0,top=0');
	newwin.focus();
}

//print
function ticketPrint() {
	window.print();
}

///// for StepEngine /////

//ヘルプウインドウオープン
function helpWin(url) {
	newwin =window.open(url,'help','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=500,height=440,left=0,top=0');
	newwin.focus();
}

//各社オープン
function comWin(url) {
	newwin =window.open(url,'com','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=650,height=550,left=0,top=0');
	newwin.focus();
}

//利用規約
function termWin() {
	newwin =window.open('http://www.webcrew.co.jp/info/terms_pop.html','terms','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=520,height=500,left=0,top=0');
	newwin.focus();
}

//プライバシーポリシーオープン
function privacyWin() {
    newwin
=window.open('http://www.webcrew.co.jp/info/privacy_pop.html','privacy','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=500,height=500,left=0,top=0');
    newwin.focus();
}

//life Card
function lifeWin() {
	newwin = window.open('/','life','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=760,height=600,left=0,top=0');
	newwin.focus();
}

//チェックボックス関連

//ディノス
function dinosWin() {
	newwin =window.open('/help/dinos/','dinos','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=480,height=600,left=0,top=0');
	newwin.focus();
}

//近畿設備
function knkWin() {
	newwin =window.open('/help/knk/','knk','toolbar=no,location=no,resizable=no,status=no,scrollbars=no,width=430,height=520,left=0,top=0');
	newwin.focus();
}

//マミープランニング
function mamWin() {
	newwin =window.open('/help/mam/','mam','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=530,height=590,left=0,top=0');
	newwin.focus();
}

//ホームダイレクト
function hdWin() {
	newwin =window.open('/help/hd/','HD','toolbar=no,location=no,resizable=no,status=no,scrollbars=no,width=530,height=590,left=0,top=0');
	newwin.focus();
}

//リカバリジャッジ
function rjWin() {
	newwin =window.open('/help/rj/','RJ','toolbar=no,location=no,resizable=no,status=no,scrollbars=no,width=530,height=620,left=0,top=0');
	newwin.focus();
}

//サントリーフーズ
function styWin() {
	newwin =window.open('/help/suntory/','sun','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=670,height=600,left=0,top=0');
	newwin.focus();
}

//トラブル支援センター
function trcWin() {
	newwin =window.open('/help/tr-center/','trc','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=620,height=550,left=0,top=0');
	newwin.focus();
}

//コムズ
function comzWin() {
	newwin =window.open('/help/comz/','comz','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=570,height=500,left=0,top=0');
	newwin.focus();
}

//アライブ
function alive01Win() {
	newwin =window.open('/help/alive/custom/','alive01','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=540,height=500,left=0,top=0');
	newwin.focus();
}

function alive02Win() {
	newwin =window.open('/help/alive/coating/','alive02','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=540,height=500,left=0,top=0');
	newwin.focus();
}

function alive03Win() {
	newwin =window.open('/help/alive/curtain/','alive03','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=540,height=500,left=0,top=0');
	newwin.focus();
}

function alive04Win() {
	newwin =window.open('/help/alive/prevention/','alive04','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=540,height=500,left=0,top=0');
	newwin.focus();
}

//盗聴バスターズ
function bustersWin() {
	newwin =window.open('/help/busters/','bst','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=600,height=500,left=0,top=0');
	newwin.focus();
}

//リサイクルマスター
function rmjWin() {
	newwin =window.open('/help/rmj/','rmj','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=540,height=500,left=0,top=0');
	newwin.focus();
}

//京葉物流
function keiyoWin() {
	newwin =window.open('/help/keiyo/','rmj','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=800,height=600,left=0,top=0');
	newwin.focus();
}

//ソネット
function sonetWin() {
	newwin =window.open('http://www.so-net.ne.jp/cpn/hikkoshi/','rmj','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=800,height=600,left=0,top=0');
	newwin.focus();
}

function sonet02Win() {
	newwin =window.open('/help/so-net/notes.html','sonet02','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=480,height=220,left=0,top=0');
	newwin.focus();
}


//エムズクリエーション
function msWin() {
	newwin =window.open('/help/msc/','ms','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=480,height=220,left=0,top=0');
	newwin.focus();
}

//アフラック
function aflacWin() {
	newwin =window.open('/help/aflac/','aflac','toolbar=no,location=no,resizable=no,status=no,scrollbars=yes,width=600,height=600,left=0,top=0');
	newwin.focus();
}

//アーリア
function ariaWin() {
	newwin =window.open('/help/aria/','aria','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=560,height=600,left=0,top=0');
	newwin.focus();
}

//ブランディア
function brandearWin() {
	newwin =window.open('/help/brandear/','brandear','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=580,height=600,left=0,top=0');
	newwin.focus();
}

//アルソック
function alsokWin() {
	newwin =window.open('/help/alsok/','alsok','toolbar=no,location=no,resizable=yes,status=no,scrollbars=yes,width=580,height=600,left=0,top=0');
	newwin.focus();
}

//フォーム背景色
/*
function colorChange() {
	this.skip  = ['submit', 'button', 'radio', 'checkbox', 'select-one', 'select-multiple'];
	this.color = { 'blur': '', 'focus': '#DFF5FF' };

	this.set = function() {
		for (var i = 0; i < document.forms.length; i++) {
			for (var f = 0; f < document.forms[i].length; f++) {
				var elm = document.forms[i][f];
				if(!this.checkSkip(elm)) continue;
				this.setColor(elm, 'focus');
				this.setColor(elm, 'blur');
			}      
		}
	}

	this.checkSkip = function(elm) {
		for(var i in this.skip) {
			if(elm.type == this.skip[i]) return false;
		}
		return true;
	}

	this.setColor = function(elm, type) { 
		var color = this.color[type];
		var event = function() { elm.style.backgroundColor = color; };

		if(elm.addEventListener) {
			elm.addEventListener(type, event, false); 
		} else if(elm.attachEvent) {
			elm.attachEvent('on'+type, event); 
		} else {
			elm['on'+type] = event;
		}
	}
}
*/

// onload時にフォーム背景色設定を実行
/*
window.onload = function() {
   var formColor = new colorChange;
   formColor.set();
   getLabel();
}
*/

//thanks バイク保険への誘導フォーム
function getLabel(){
	var lbs = document.getElementsByTagName('label');
	for(var i=0;i<lbs.length;i++){
		var cimgs = lbs[i].getElementsByTagName('img');
		for(var j=0;j<cimgs.length;j++){
			cimgs[j].formCtrlId = lbs[i].htmlFor;
			cimgs[j].onclick = function(){document.getElementById(this.formCtrlId).click()};
		}
	}
}

