

/*

var pricetable = new Array(

693000,1071000,1195000,1420000,1730000,1980000,

430500,658500,732500,920000,1105000,1230000,

693000,1071000,1195000,1420000,1730000,1980000,

430500,658500,732500,920000,1105000,1230000,

693000,1071000,1195000,1420000,1730000,1980000,

430500,658500,732500,920000,1105000,1230000

);*/

var pricetable = new Array( "\\693,000","\\1,071,000","\\1,195,000","\\1,420,000","\\1,730,000","\\1,980,000",

"\\430,500","\\658,500","\\732,500","\\920,000","\\1,105,000","\\1,230,000",

"\\693,000","\\1,071,000","\\1,195,000","\\1,420,000","\\1,730,000","\\1,980,000",

"\\430,500","\\658,500","\\732,500","\\920,000","\\1,105,000","\\1,230,000",

"\\693,000","\\1,071,000","\\1,195,000","\\1,420,000","\\1,730,000","\\1,980,000",

"\\430,500","\\658,500","\\732,500","\\920,000","\\1,105,000","\\1,230,000" );





//alert(document.all.tags("IFRAME").item(0).src);



var specification = -1;



var ifrOK = (document.all||navigator.userAgent.match(/Gecko/i)!=null)



//SPECWINDOW.scrolling = "no";

//document.all.tags("IFRAME").item(0).scrolling="no";



function navToAreaPage()

{

	var v = document.forms[0].area.options[document.forms[0].area.selectedIndex].value;

	if( v != null && v != "" ){

		//window.location.href = v;

		window.open( v );//location.href = v;

	} else {

		alert("都道府県を選択してください。");

	}

}



function getPrice( keitai, tate, madori, no )

{

	var i = madori + tate * 12 + keitai * 3 + no * 6

	return pricetable[i];

}



function refreshPrice()

{

	var style = document.forms[0].elements["sstyle"].selectedIndex ;

	var floor = document.forms[0].elements["floor"].selectedIndex ;

	var madori = document.forms[0].elements["madori"].selectedIndex ;

	//

	for( i=0; i < document.forms[0].madori.options.length; i++ ){

		var v = document.forms[0].madori.options[i].text;

		if( v.match("DK") != null ){

			if( style == 2 ){

				v = v.replace( /LDK/, "DK" );

			} else {

				if( v.match( /LDK/ ) == null ){

					v =  v.replace( /DK/, "LDK" );

				}

			}

			document.forms[0].madori.options[i].text = v;

		}

	}

	//

	var iframesrc;

	if( style==0 || floor==0 || madori==0 ){

		result = "";

		result2 = "";

		src = "about:blank";

	} else {

		src = madori+1

		src += ( style==1 ? "l" : "" );

		src += "dk.html";

		result = getPrice( style-1, floor-1, madori-1,0  );

		result2 = getPrice( style-1, floor-1, madori-1,1  );

	}

	document.forms[0].total.value = result2;

	document.forms[0].total2.value = result;

	if( ifrOK ){

		//var el=eval('frames["SPECWINDOW"].document.'+(document.getElementById?"getElementById":"all")+'("SPECWINDOW")')

		{

			var org = frames["SPECWINDOW"].window.location.href;

			if( org != src ){

				frames["SPECWINDOW"].window.location.href = src;

			}

		}

	} else {

		if ( src != null && src != "" && src != "about:blank" ){

			window.open( src, "SPECWINDOW" , "width=400,height=250,resizable=1,location=no,scrollbars=1,toolbar=no,");

		}

		//document.layers["SPECWINDOW"].src = src;

	}

}




