﻿/* loda_xml.js
 * xmlで読み込んだデータを取り扱う
*/ 


// ------------------------------------
// 数値を返す。数値でなければ0を返す
// ------------------------------------
function returnNumber(val)
{
	var data = eval(val);
	if(isNaN(data)) data = 0;
	return data;
}

// ------------------------------------
// ボディカラーの価格を設定するクラス
// ------------------------------------
function input_costBc( costTI, costTL, gID )
{
	this.costTI = returnNumber( costTI ); // 
	this.costTL = returnNumber( costTL ); // 
	this.gID = gID;
}
// ------------------------------------
// 
// ------------------------------------
function inputLimit(list,type)
{
	this.list = list;
	this.type = type;
}

// ------------------------------------
// 
// ------------------------------------
function input_costO(costTI,costTL,gID,cID,oID)
{
	this.costTI = returnNumber(costTI);
	this.costTL = returnNumber(costTL);
	this.gID = gID;
	this.cID = cID;
	this.oID = oID;
}

// ------------------------------------
// 
// ------------------------------------
function input_costIc(costTI,costTL,gID,cID)
{
	this.costTI = returnNumber(costTI);
	this.costTL = returnNumber(costTL);
	this.gID = gID;
	this.cID = cID;
}

// ------------------------------------
// 
// ------------------------------------
function input_spPrice(ID1,ID2)
{
	for( var x = 0; x < ID2.length; x++ )
	{
		if( typeof(spPrice[ID2[x]])=="undefined" ) spPrice[ID2[x]] = new Array();
		spPrice[ID2[x]].push(ID1);
	}
}
//----------------------------------------------------------------------

/*
function sortData()
{
	Y_getData();

}


function frameCheck(ID)
{
	if(isFirefox()){
		var iframe = document.getElementById(ID);
		return iframe.contentDocument;
	}
	if(isIE()){
		var iframe = document.getElementById(ID);
		return iframe.contentWindow.document;
	}
	if(isSafari()){
		var iframe = option_window;
		return iframe;
	}
}
*/
