// ホスト名及びパスを取得
var str_hostname = location.hostname;
var str_pathname = location.pathname;





document.write('<script type="text/javascript" language="javascript">');

document.write('function siteJudge(link_num) {');

// 引数を数値で取ってこないとエラーになった為、ここでどのリンクから呼ばれたかを文字列に変換
// Analyticsで表示するページ名
document.write('switch(link_num) {');
document.write(' case 0 :');
document.write('  link_name = "club";');
document.write('  break;');
document.write(' case 1 :');
document.write('  link_name = "campaign";');
document.write('  break;');
document.write(' case 10 :');
document.write('  link_name = "all";');
document.write('  break;');
document.write(' case 11 :');
document.write('  link_name = "tokyo";');
document.write('  break;');
document.write(' case 12 :');
document.write('  link_name = "kanagawa";');
document.write('  break;');
document.write(' case 13 :');
document.write('  link_name = "saitama";');
document.write('  break;');
document.write(' case 14 :');
document.write('  link_name = "chiba";');
document.write('  break;');
document.write(' case 15 :');
document.write('  link_name = "ibaraki";');
document.write('  break;');
document.write(' case 1 :');
document.write('  link_name = "top";');
document.write('  break;');
document.write(' default :');
document.write('  link_name = "none";');
document.write('  break;');
document.write('}');

//デバッグ用
//document.write('alert("location.hostname="+location.hostname);');
//document.write('alert("location.pathname="+location.pathname);');

// ホスト名及びパスを取得
document.write('var str_hostname = location.hostname;');
document.write('var str_pathname = location.pathname;');

// ドメイン名が「toyota-town.jp」である場合
document.write('if (str_hostname.match(/toyota-town.jp/)) {');

document.write('url_array = str_pathname.split("/");');
document.write('result_str = url_array[1];');
//document.write('urchinTracker("/フッタークリック/" + result_str + "/" + link_name);');
document.write('_gaq.push(["_trackPageview","/フッタークリック/" + result_str + "/" + link_name]);');
//デバッグ用
//document.write('alert("/フッタークリック/" + result_str + "/" + link_name);');
// 独自ドメインまたはテスト環境（IPアドレスそのまま）の場合
document.write('} else { ');
// GoogleAnalytics用変数
//document.write('_uacct = "UA-5421728-1";_udn="none";_ulink="1";urchinTracker();');

// テスト環境の場合
document.write('if (str_pathname.match(/toyota-tokusetsu-test/)) {');
document.write('url_array = str_pathname.split("/");');
document.write('result_str = url_array[2];');
//独自ドメインの場合
document.write('} else {');
document.write('_gaq.push(["_trackPageview","/フッタークリック/" + str_hostname + "/" + link_name]);');
//デバッグ用
//document.write('alert("/フッタークリック/" + str_hostname + "/" + link_name);');
document.write('} ');
document.write('}');

document.write('}');
document.write('</script>');






// フッター表示部分　↓開始***************************************************************************************************************
document.write('<div class="footerlink-wrapper">');
document.write('<div class="footerlink-section clearfix" >');
document.write('<p class="footerlink-left">');


// ドメイン名が「toyota-town.jp」である場合
if (str_hostname.match(/toyota-town.jp/)) {

    document.write('<a href="http://www.toyota-town.jp/others/club" title="トヨタホームCLUB会員募集中！詳しくは詳細ページへ" onclick="siteJudge(0);"><img src="http://www.toyota-town.jp/images/common/bnr-reccomend-club.gif" border="0" alt="トヨタホームCLUB会員募集中"></a>');
    document.write('<!--<a href="http://www.toyota-town.jp/campaign/" title="トヨタホーム東京キャンペーン実施中！詳しくは詳細ページへ" onclick="siteJudge(1);"><img src="http://www.toyota-town.jp/images/campaign/1002/bnr-camp-footerlink.jpg" border="0" alt="トヨタホーム東京キャンペーン実施中！"></a>-->');

    document.write('</p><!--footerlink-left-->');
    document.write('<div class="footerlink-right">');
    document.write('<p class="footerlink-area"><img src="http://www.toyota-town.jp/images/common/icon-search.gif" border="0" alt="トヨタホームの物件を探す">その他の分譲地情報を探す ： <a href="http://www.toyota-town.jp/exhibition/all" title="トヨタホーム首都圏エリアの分譲住宅情報" onclick="siteJudge(10);">全物件一覧</a>');
    document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/1" title="トヨタホーム東京エリアの分譲住宅情報" onclick="siteJudge(11);">東京</a>');
    document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/2" title="トヨタホーム神奈川エリアの分譲住宅情報" onclick="siteJudge(12);">神奈川</a>');
    document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/4" title="トヨタホーム千葉エリアの分譲住宅情報" onclick="siteJudge(14);">千葉</a>');
    document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/3" title="トヨタホーム埼玉エリアの分譲住宅情報" onclick="siteJudge(13);">埼玉</a>');
    document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/5" title="トヨタホーム茨城エリアの分譲住宅情報" onclick="siteJudge(15);">茨城</a></p>');
    document.write('<p class="footerlink-home"><img src="http://www.toyota-town.jp/images/common/icon-townguide.gif" border="0" alt="トヨタホーム首都圏エリアの分譲住宅ポータル「トヨタホームタウンガイド」">トヨタホーム東京が運営する分譲住宅ポータル「<a href="http://www.toyota-town.jp/" title="トヨタホーム首都圏エリアの分譲住宅ポータル「トヨタホームタウンガイド」" onclick="siteJudge(1);">トヨタホームタウンガイド</a>」</p>');


// 独自ドメインまたはテスト環境（IPアドレスそのまま）の場合
} else {
    // テスト環境の場合
    if (str_pathname.match(/toyota-tokusetsu-test/)) {

        document.write('<a href="http://www.toyota-town.jp/others/club" title="トヨタホームCLUB会員募集中！詳しくは詳細ページへ" onclick="siteJudge(0);"><img src="http://www.toyota-town.jp/images/common/bnr-reccomend-club.gif" border="0" alt="トヨタホームCLUB会員募集中"></a>');
        document.write('<!--<a href="http://www.toyota-town.jp/campaign/" title="トヨタホーム東京キャンペーン実施中！詳しくは詳細ページへ" onclick="siteJudge(1);"><img src="http://www.toyota-town.jp/images/campaign/1002/bnr-camp-footerlink.jpg" border="0" alt="トヨタホーム東京キャンペーン実施中！"></a>-->');

        document.write('</p><!--footerlink-left-->');
        document.write('<div class="footerlink-right">');
        document.write('<p class="footerlink-area"><img src="http://www.toyota-town.jp/images/common/icon-search.gif" border="0" alt="トヨタホームの物件を探す">その他の分譲地情報を探す ： <a href="http://www.toyota-town.jp/exhibition/all" title="トヨタホーム首都圏エリアの分譲住宅情報" onclick="siteJudge(10);">全物件一覧</a>');
        document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/1" title="トヨタホーム東京エリアの分譲住宅情報" onclick="siteJudge(11);">東京</a>');
        document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/2" title="トヨタホーム神奈川エリアの分譲住宅情報" onclick="siteJudge(12);">神奈川</a>');
        document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/4" title="トヨタホーム千葉エリアの分譲住宅情報" onclick="siteJudge(14);">千葉</a>');
        document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/3" title="トヨタホーム埼玉エリアの分譲住宅情報" onclick="siteJudge(13);">埼玉</a>');
        document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/5" title="トヨタホーム茨城エリアの分譲住宅情報" onclick="siteJudge(15);">茨城</a></p>');
        document.write('<p class="footerlink-home"><img src="http://www.toyota-town.jp/images/common/icon-townguide.gif" border="0" alt="トヨタホーム首都圏エリアの分譲住宅ポータル「トヨタホームタウンガイド」">トヨタホーム東京が運営する分譲住宅ポータル「<a href="http://www.toyota-town.jp/" title="トヨタホーム首都圏エリアの分譲住宅ポータル「トヨタホームタウンガイド」" onclick="siteJudge(1);">トヨタホームタウンガイド</a>」</p>');

    //独自ドメインの場合
    } else {

        document.write('<a href="http://www.toyota-town.jp/others/club" title="トヨタホームCLUB会員募集中！詳しくは詳細ページへ" onclick="siteJudge(0); javascript:__utmLinker(this.href); return false;"><img src="http://www.toyota-town.jp/images/common/bnr-reccomend-club.gif" border="0" alt="トヨタホームCLUB会員募集中"></a>');
        document.write('<!--<a href="http://www.toyota-town.jp/campaign/" title="トヨタホーム東京キャンペーン実施中！詳しくは詳細ページへ" onclick="siteJudge(1); javascript:__utmLinker(this.href); return false;"><img src="http://www.toyota-town.jp/images/campaign/1002/bnr-camp-footerlink.jpg" border="0" alt="トヨタホーム東京キャンペーン実施中！"></a>-->');

        document.write('</p><!--footerlink-left-->');
        document.write('<div class="footerlink-right">');
        document.write('<p class="footerlink-area"><img src="http://www.toyota-town.jp/images/common/icon-search.gif" border="0" alt="トヨタホームの物件を探す">その他の分譲地情報を探す ： <a href="http://www.toyota-town.jp/exhibition/all" title="トヨタホーム首都圏エリアの分譲住宅情報" onclick="siteJudge(10);">全物件一覧</a>');
        document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/1" title="トヨタホーム東京エリアの分譲住宅情報" onclick="siteJudge(11); javascript:__utmLinker(this.href); return false;">東京</a>');
        document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/2" title="トヨタホーム神奈川エリアの分譲住宅情報" onclick="siteJudge(12); javascript:__utmLinker(this.href); return false;">神奈川</a>');
        document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/4" title="トヨタホーム千葉エリアの分譲住宅情報" onclick="siteJudge(14); javascript:__utmLinker(this.href); return false;">千葉</a>');
        document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/3" title="トヨタホーム埼玉エリアの分譲住宅情報" onclick="siteJudge(13); javascript:__utmLinker(this.href); return false;">埼玉</a>');
        document.write('｜<a href="http://www.toyota-town.jp/exhibition/area/5" title="トヨタホーム茨城エリアの分譲住宅情報" onclick="siteJudge(15); javascript:__utmLinker(this.href); return false;">茨城</a></p>');
        document.write('<p class="footerlink-home"><img src="http://www.toyota-town.jp/images/common/icon-townguide.gif" border="0" alt="トヨタホーム首都圏エリアの分譲住宅ポータル「トヨタホームタウンガイド」">トヨタホーム東京が運営する分譲住宅ポータル「<a href="http://www.toyota-town.jp/" title="トヨタホーム首都圏エリアの分譲住宅ポータル「トヨタホームタウンガイド」" onclick="siteJudge(1); javascript:__utmLinker(this.href); return false;">トヨタホームタウンガイド</a>」</p>');

    }
}


document.write('</div><!--footerlink-right-->');
document.write('</div><!--footerlink-section clearfix-->');
document.write('</div><!--footerlink-wrapper-->');
// フッター表示部分　↑終了***************************************************************************************************************

