/**********************************************************************
WWCITY  : [ common.js ]

06.12.14
***********************************************************************

***********************************************************************
a variable

　[ 共通 ]
	- cmxxx

　[ ヘッダー ]
	- gItemLength : 全アイテム点数データ
	- gShopLength : 全店舗数データ

　[ 店舗ページ ]
	- gCtArys     : 店舗ページ用カテゴリ配列データ

　[ グローバルナビ ]
	- gAreaCodeArys   : エリアコード番号の配列
	- gShopGnSplit_Anhelo : グローバルナビの改行位置(Anhelo)
	- gShopGnSplit_Mignon : グローバルナビの改行位置(Mignon)
	- gShopGnSplit_Edge : グローバルナビの改行位置(Edge)
	- gShopGnSplit_Bonito : グローバルナビの改行位置(Bonito)
	- gShopGnSplit_Special : グローバルナビの改行位置(Special)
	- gShopGnArys_Anhelo  : グローバルナビのデータ(Anhelo)
	- gShopGnArys_Mignon  : グローバルナビのデータ(Mignon)
	- gShopGnArys_Edge  : グローバルナビのデータ(Edge)
	- gShopGnArys_Bonito  : グローバルナビのデータ(Bonito)
	- gShopGnArys_Special  : グローバルナビのデータ(Special)

**********************************************************************/


/*---------------------------------------------
 Path
---------------------------------------------*/
var cmServerFlag = 'REAL';     // 'REAL' or 'TEST'

var cmDocProtcol = 'NORMAL';
if( location.protocol == 'https:' ){ cmDocProtcol = 'SSL'; }

var cmRootPath     = '';
var cmLinkPath     = '';
var cmLinkPath_ssl = '';

// REAL : 本サーバー
if( cmServerFlag == 'REAL' ){
	if( cmDocProtcol == 'NORMAL' ){ cmRootPath = 'http://www.wwcity.co.jp'; }
	if( cmDocProtcol == 'SSL' )   { cmRootPath = 'https://secure1.wwcity.co.jp'; }
	cmLinkPath     = 'http://www.wwcity.co.jp';
	cmLinkPath_ssl = 'https://secure1.wwcity.co.jp';
}

// TEST : テストサーバ
if( cmServerFlag == 'TEST' ){
	if( cmDocProtcol == 'NORMAL' ){ cmRootPath = 'http://test.wwcity.co.jp'; }
	if( cmDocProtcol == 'SSL' )   { cmRootPath = 'https://securetest.wwcity.co.jp'; }

	// ポート接続の場合
	if( location.port ){ cmRootPath = 'http://' + document.domain + ':' + location.port; }

	cmLinkPath     = 'http://test.wwcity.co.jp';
	cmLinkPath_ssl = 'https://securetest.wwcity.co.jp';
}


var cmImagePath      = cmRootPath + '/common/img';
var cmImagePath_http = cmLinkPath + '/common/img';  // ログアウトボタンのパスは常に[http]パス
var cmJscriptPath    = cmRootPath + '/common/js';
var cmStaticPath     = cmRootPath + '/common/static';
var cmSystemPath     = cmRootPath + '/common/system';
var cmMessengerPath  = cmLinkPath + '/messenger';


/*---------------------------------------------
 Javascript file
---------------------------------------------*/
with(document) {

	// 自動更新ファイル
	write('<script type="text/javascript" src="' + cmSystemPath + '/itemlength.js"></script>');
	write('<script type="text/javascript" src="' + cmSystemPath + '/shoplength.js"></script>');

	// 手動更新ファイル
	write('<script type="text/javascript" src="' + cmStaticPath + '/global_shoplist.js"></script>');

	// メッセンジャー関連ファイル
/*	write('<script type="text/javascript" src="' + cmMessengerPath + '/js/JavaScriptFlashGateway_j.js"></script>');
	write('<script type="text/javascript" src="' + cmJscriptPath + '/common_messenger.js"></script>');*/

	// その他処理関数
	write('<script type="text/javascript" src="' + cmJscriptPath + '/common_head.js"></script>');
	write('<script type="text/javascript" src="' + cmJscriptPath + '/common_foot.js"></script>');
	write('<script type="text/javascript" src="' + cmJscriptPath + '/common_other.js"></script>');
	write('<script type="text/javascript" src="' + cmJscriptPath + '/common_shop_3dbrowser.js"></script>');
	write('<script type="text/javascript" src="' + cmJscriptPath + '/common_shop_category.js"></script>');
	write('<script type="text/javascript" src="' + cmJscriptPath + '/common_shop_id.js"></script>');
}

/*********************************************************************/
