// HTTP Object
var httpObject;
// Timer
var timerId;
var timerIdStatus;
var timeoutSecondDefault = 30000;		// Timeout (ms)
var timeoutSecond = timeoutSecondDefault;		// Timeout (ms)
var timeInterval = 50;	// ms
// URL
var urlXmlList = "./moduleData/List.php";
var urlXmlDetail = "./moduleData/Detail.php";
// レイアウトの変更
var heightMargin = 150;
var heightMarginList = 100;
var windowSize = cheltenhamWindow_getSizeDisplay();
// 選択カテゴリー
var categorySelected = cheltenhamForm_getValueRadioByName( document.FormSearch.elements[ 'CategorySmall' ] );

// タイトル文字
setTimeout( functionRefference = function(){ timerIdStatus = cheltenhamText_displayTextGradually( 'LabelStatus', '検索条件を入力してください。', 200, 20 ); }, 3000 );


resizeCanvas();
cheltenhamEvent_addListener( window, 'resize', resizeCanvas, false );

function resizeCanvas()
{
	windowSize = cheltenhamWindow_getSizeDisplay();
	document.getElementById( 'PanelCanvas' ).style.height = ( windowSize.height - heightMargin ) + 'px';
	if( document.getElementById( 'List' ) )
	{
		document.getElementById( 'List' ).style.height = ( windowSize.height - heightMargin - heightMarginList ) + 'px';
	}
}

// 店舗オブジェクト
function Shop()
{
	// Property
	this.number = null;
	this.id = null;
	this.nameTitle = null;
	this.nameMain = null;
	this.nameBranch = null;
	this.nameTotal = null;
	this.locationZip1 = null;
	this.locationZip2 = null;
	this.locationPrefecture = null;
	this.locationCity = null;
	this.locationBlock = null;
	this.telephoneHome = null;
	this.telephoneMobile = null;
	this.telephoneFax = null;
	this.webPc = null;
	this.webMobile = null;
	this.parking = null;
	this.marker = null;

	// Method
	this.setNameTotal = function()
	{
		this.nameTotal = this.nameMain;
		if( this.nameTitle != null )
		{
			this.nameTotal = this.nameTitle + ' ' + this.nameTotal;
		}
		if( this.nameBranch != null )
		{
			this.nameTotal = this.nameTotal + ' ' + this.nameBranch;
		}
	}
}

function ShopImage()
{
	this.caption = null;
	this.smallUrl = null;
	this.smallWidth = null;
	this.smallHeight = null;
	this.largeUrl = null;
	this.largeWidth = null;
	this.largeHeight = null;
}

// ノードの値があれば
function getNodeValueIfFirstChildExist( objectTarget )
{
	if( objectTarget.childNodes.length > 0 )
	{
		return( objectTarget.firstChild.nodeValue );
	}
	else
	{
		return( '' );
	}
}

