<!-- Google Website Optimizer Control Script ZWEI -->
function utmx_section(){}function utmx(){}
(function(){var k='0592933932',d=document,l=d.location,c=d.cookie;function f(n){
if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return c.substring(i+n.
length+1,j<0?c.length:j)}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
d.write('<sc'+'ript src="'+
'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
+'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='
+new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
'" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
<!-- End of Google Website Optimizer Control Script -->

<!--
function insValPref(obj){
	document.getElementById("prefecture3").value = obj.value;
}

function insValSchool(obj){
	document.getElementById("school3").value = obj.value;
}

function insValHeight(obj){
	document.getElementById("height3").value = obj.value;
}

function insValCLName(obj){
	document.demandform.clname.value = obj.value;
}

function insValCFName(obj){
	document.demandform.cfname.value = obj.value;
}

function insValCLKana(obj){
	document.demandform.clkana.value = obj.value;
}

function insValCFKana(obj){
	document.demandform.cfkana.value = obj.value;
}

function fncChange() {
	if (document.demandform.option21.checked) {
		for (var no=0; no<document.getElementsByName('child1').length; no++) {
			document.getElementsByName('child1')[no].style.display = '';
		}
		for (var no=0; no<document.getElementsByName('child2').length; no++) {
			document.getElementsByName('child2')[no].style.display = 'none';
		}
		document.getElementById('title1').innerHTML = '<div class="spaser01"><p class="fleft w136 oya01">お子様の性別</p><div class="fright w33"><img width="33" height="16" alt="必須" src="./images/form/icon01.gif"></div></div>';
		document.getElementById('title2').innerHTML = '<div class="spaser01"><p class="fleft w136 oya01">お子様の生年月日</p><div class="fright w33"><img width="33" height="16" alt="必須" src="./images/form/icon01.gif"></div></div>';
		document.getElementById('title3').innerHTML = '<div class="spaser01"><p class="fleft w136 oya01">お子様の職業</p><div class="fright w33"><img width="33" height="16" alt="必須" src="./images/form/icon01.gif"></div></div>';
		document.getElementById('title4').innerHTML = '<div class="spaser01"><p class="fleft w136 oya01">お子様のお住まい</p><div class="fright w33"><img width="33" height="16" alt="必須" src="./images/form/icon01.gif"></div></div>';
		document.getElementById('title5').innerHTML = '<div class="spaser01"><p class="fleft w136 oya01">お子様の最終学歴</p><div class="fright w33"><img width="33" height="16" alt="必須" src="./images/form/icon01.gif"></div></div>';
		document.getElementById('title6').innerHTML = '<div class="spaser01"><p class="fleft w136">お子様の身長</p></div>';
	} else {
		for (var no=0; no<document.getElementsByName('child1').length; no++) {
			document.getElementsByName('child1')[no].style.display = 'none';
		}
		for (var no=0; no<document.getElementsByName('child2').length; no++) {
			document.getElementsByName('child2')[no].style.display = '';
		}
		document.getElementById('title1').innerHTML = '<div class="spaser01"><p class="fleft w136">性別</p><div class="fright w33"><img width="33" height="16" alt="必須" src="./images/form/icon01.gif"></div></div>';
		document.getElementById('title2').innerHTML = '<div class="spaser01"><p class="fleft w136">生年月日</p><div class="fright w33"><img width="33" height="16" alt="必須" src="./images/form/icon01.gif"></div></div>';
		document.getElementById('title3').innerHTML = '<div class="spaser01"><p class="fleft w136">職業</p><div class="fright w33"><img width="33" height="16" alt="必須" src="./images/form/icon01.gif"></div></div>';
		document.getElementById('title4').innerHTML = '<div class="spaser01"><p class="fleft w136">お住まい</p><div class="fright w33"><img width="33" height="16" alt="必須" src="./images/form/icon01.gif"></div></div>';
		document.getElementById('title5').innerHTML = '<div class="spaser01"><p class="fleft w136">最終学歴</p><div class="fright w33"><img width="33" height="16" alt="必須" src="./images/form/icon01.gif"></div></div>';
		document.getElementById('title6').innerHTML = '<div class="spaser01"><p class="fleft w136">身長</p></div>';
	}
	resetStyle();
}

function resetStyle() {
	var reset = "&nbsp;"
	
	// スタイルとかリセット
	document.getElementById('prefecture_error').innerHTML = reset;
	document.getElementById('prefecture').style.backgroundColor = "#FFFFFF";
	document.getElementById('prefecture_error').style.display = 'none';
	document.getElementById('birth_error').innerHTML = reset;
	document.getElementById('birthyear').style.backgroundColor = "#FFFFFF";
	document.getElementById('birthmonth').style.backgroundColor = "#FFFFFF";
	document.getElementById('birthday').style.backgroundColor = "#FFFFFF";
	document.getElementById('occupation_error').innerHTML = reset;
	document.getElementById('occupation').style.backgroundColor = "#FFFFFF";
	document.getElementById('birth_error').style.display = 'none';
	document.getElementById('occupation_error').style.display = 'none';
	document.getElementById('school2_error').innerHTML = reset;
	document.getElementById('school2_').style.backgroundColor = "#FFFFFF";
	document.getElementById('school2_error').style.display = 'none';
	document.getElementById('option2_error').innerHTML = reset;
	document.getElementById('option2_').style.backgroundColor = "#FFFFFF";
	document.getElementById('option2_error').style.display = 'none';

	if (document.demandform.option21.checked) {
		document.getElementById('cname_error').innerHTML = reset;
		document.getElementById('clname').style.backgroundColor = "#FFFFFF";
		document.getElementById('cfname').style.backgroundColor = "#FFFFFF";
		document.getElementById('ckana_error').innerHTML = reset;
		document.getElementById('clkana').style.backgroundColor = "#FFFFFF";
		document.getElementById('cfkana').style.backgroundColor = "#FFFFFF";
		document.getElementById('height2_error').innerHTML = reset;
		document.getElementById('height2_').style.backgroundColor = "#FFFFFF";
		document.getElementById('cname_error').style.display = 'none';
		document.getElementById('ckana_error').style.display = 'none';
		document.getElementById('height2_error').style.display = 'none';
	}
}

function fncSubmit(tgt) {
	var error = false;
	var novalue = "※入力してください。"
	var noselect = "※選択してください。"
	var nonumber = "※数字をご入力ください。"
	var katakana = "※カタカナでご入力ください。"
	
	resetStyle();
	
	if (tgt == "self") {
		document.demandform.option20.checked = true;
	}
	
	// 全角数字を半角に置換
	if (document.demandform.option21.checked) {
		document.demandform.clkana.value = gf_ConvertToStrFnt(document.demandform.clkana.value);
		document.demandform.cfkana.value = gf_ConvertToStrFnt(document.demandform.cfkana.value);
		document.demandform.height2.value = gf_ConvertToNumFnt(document.demandform.height2.value);
	}
	
	if (document.demandform.option21.checked && isSpace(document.demandform.clname.value)) {
		document.getElementById('cname_error').style.display = '';
		document.getElementById('cname_error').innerHTML = novalue;
		document.getElementById('clname').style.backgroundColor = "#FFCCFF";
		error = true;
	}
	if (document.demandform.option21.checked && isSpace(document.demandform.cfname.value)) {
		document.getElementById('cname_error').style.display = '';
		document.getElementById('cname_error').innerHTML = novalue;
		document.getElementById('cfname').style.backgroundColor = "#FFCCFF";
		error = true;
	}
	if (document.demandform.option21.checked && isSpace(document.demandform.clkana.value)) {
		document.getElementById('ckana_error').style.display = '';
		document.getElementById('ckana_error').innerHTML = novalue;
		document.getElementById('clkana').style.backgroundColor = "#FFCCFF";
		error = true;
	}
	if (document.demandform.option21.checked && isSpace(document.demandform.cfkana.value)) {
		document.getElementById('ckana_error').style.display = '';
		document.getElementById('ckana_error').innerHTML = novalue;
		document.getElementById('cfkana').style.backgroundColor = "#FFCCFF";
		error = true;
	}
	if (document.demandform.option21.checked && document.demandform.clkana.value.match( /[^ァ-ン]+/ )) {
		document.getElementById('ckana_error').style.display = '';
		document.getElementById('ckana_error').innerHTML = katakana;
		document.getElementById('clkana').style.backgroundColor = "#FFCCFF";
		error = true;
	}
	if (document.demandform.option21.checked && document.demandform.cfkana.value.match( /[^ァ-ン]+/ )) {
		document.getElementById('ckana_error').style.display = '';
		document.getElementById('ckana_error').innerHTML = katakana;
		document.getElementById('cfkana').style.backgroundColor = "#FFCCFF";
		error = true;
	}

	if (document.demandform.prefecture.value == '') {
		document.getElementById('prefecture_error').style.display = '';
		document.getElementById('prefecture_error').innerHTML = noselect;
		document.getElementById('prefecture').style.backgroundColor = "#FFCCFF";
		error = true;
	}
	if (document.demandform.birthyear.value == '') {
		document.getElementById('birth_error').style.display = '';
		document.getElementById('birth_error').innerHTML = noselect;
		document.getElementById('birthyear').style.backgroundColor = "#FFCCFF";
		error = true;
	}
	if (document.demandform.birthmonth.value == '') {
		document.getElementById('birth_error').style.display = '';
		document.getElementById('birth_error').innerHTML = noselect;
		document.getElementById('birthmonth').style.backgroundColor = "#FFCCFF";
		error = true;
	}
	if (document.demandform.birthday.value == '') {
		document.getElementById('birth_error').style.display = '';
		document.getElementById('birth_error').innerHTML = noselect;
		document.getElementById('birthday').style.backgroundColor = "#FFCCFF";
		error = true;
	}
	if (document.demandform.occupation.value == '') {
		document.getElementById('occupation_error').style.display = '';
		document.getElementById('occupation_error').innerHTML = noselect;
		document.getElementById('occupation').style.backgroundColor = "#FFCCFF";
		error = true;
	}
	if (document.demandform.school2.value == '') {
		document.getElementById('school2_error').style.display = '';
		document.getElementById('school2_error').innerHTML = noselect;
		document.getElementById('school2_').style.backgroundColor = "#FFCCFF";
		error = true;
	}
	if (document.demandform.option21.checked && document.demandform.height2.value != '' && document.demandform.height2.value.match(/[^0-9]/g)) {
		document.getElementById('height2_error').style.display = '';
		document.getElementById('height2_error').innerHTML = nonumber;
		document.getElementById('height2_').style.backgroundColor = "#FFCCFF";
		error = true;
	}

	if (!(document.demandform.option20.checked || document.demandform.option21.checked)) {
		document.getElementById('option2_error').style.display = '';
		document.getElementById('option2_error').innerHTML = noselect;
		document.getElementById('option2_').style.backgroundColor = "#FFCCFF";
		error = true;
	}

	if (!error) {
		return true;
	}

	return false;
}

/* 全角から半角に変換するファンクション */
var Zenkaku = new Array("０","１","２","３","４","５","６","７","８","９");
var Hankaku = new Array("0","1","2","3","4","5","6","7","8","9");

function gf_ConvertToNumFnt(aVal){
	var str = aVal;

	if (str != "") {
		while(str.match(/[０-９]/)){
			for(var i = 0; i < Zenkaku.length; i++){
				str = str.replace(Zenkaku[i], Hankaku[i]);
			}
		}
	}
	
	return str;
}

/* 半角から全角に変換するファンクション */
var Kana1 = new Array("ｶﾞ","ｷﾞ","ｸﾞ","ｹﾞ","ｺﾞ","ｻﾞ","ｼﾞ","ｽﾞ","ｾﾞ","ｿﾞ","ﾀﾞ","ﾁﾞ",
	"ﾂﾞ","ﾃﾞ","ﾄﾞ","ﾊﾞ","ﾋﾞ","ﾌﾞ","ﾍﾞ","ﾎﾞ","ﾊﾟ","ﾋﾟ","ﾌﾟ","ﾍﾟ","ﾎﾟ","ｦ","ｧ",
	"ｨ","ｩ","ｪ","ｫ","ｬ","ｭ","ｮ","ｯ","ｰ","ｱ","ｲ","ｳ","ｴ","ｵ","ｶ","ｷ","ｸ","ｹ",
	"ｺ","ｻ","ｼ","ｽ","ｾ","ｿ","ﾀ","ﾁ","ﾂ","ﾃ","ﾄ","ﾅ","ﾆ","ﾇ","ﾈ","ﾉ","ﾊ","ﾋ",
	"ﾌ","ﾍ","ﾎ","ﾏ","ﾐ","ﾑ","ﾒ","ﾓ","ﾔ","ﾕ","ﾖ","ﾗ","ﾘ","ﾙ","ﾚ","ﾛ","ﾜ","ﾝ");
var Kana2 = new Array("ガ","ギ","グ","ゲ","ゴ","ザ","ジ","ズ","ゼ","ゾ","ダ","ヂ",
	"ヅ","デ","ド","バ","ビ","ブ","ベ","ボ","パ","ピ","プ","ペ","ポ","ヲ","ァ",
	"ィ","ゥ","ェ","ォ","ャ","ュ","ョ","ッ","ー","ア","イ","ウ","エ","オ","カ",
	"キ","ク","ケ","コ","サ","シ","ス","セ","ソ","タ","チ","ツ","テ","ト","ナ",
	"ニ","ヌ","ネ","ノ","ハ","ヒ","フ","ヘ","ホ","マ","ミ","ム","メ","モ","ヤ",
	"ユ","ヨ","ラ","リ","ル","レ","ロ","ワ","ン");

function gf_ConvertToStrFnt(aVal){
	var str = aVal;
	
	if (str != "") {
		while(str.match(/[ｦ-ﾝ]/)){
			for(var i = 0; i < Kana1.length; i++){
				str = str.replace(Kana1[i], Kana2[i]);
			}
		}
	}
	
	return str;
}
//-->

