﻿/*************************************************
* テレマ非契約者用
*************************************************/
/* 初期化 */
getStart = function(path,category) {
	writeHeader(path,category);
	writeFooter(path);
	setSubnavAction(category);
	setButtonAction(category);
	var cookie = readCookie("style");
	var title = cookie ? cookie : getPreferredStyleSheet();
	setActiveStyleSheet(title);
}
getStart1 = function(path,category) {
	writeHeader(path,category);
	writeFooter1(path);
	setSubnavAction(category);
	setButtonAction(category);
	var cookie = readCookie("style");
	var title = cookie ? cookie : getPreferredStyleSheet();
	setActiveStyleSheet(title);
}
getStart2 = function(path,category) {
	writeHeader(path,category);
	writeFooter2(path);
	setSubnavAction(category);
	setButtonAction(category);
	var cookie = readCookie("style");
	var title = cookie ? cookie : getPreferredStyleSheet();
	setActiveStyleSheet(title);
}
getStart3 = function(category) {
	setButtonAction(category);
	var cookie = readCookie("style");
	var title = cookie ? cookie : getPreferredStyleSheet();
	setActiveStyleSheet(title);
}


/* イメージスワップ関連 */
setButtonAction = function(category) {
	for (i=0; i<document.links.length; i++) {
		if (document.links[i].className == "swap") {
			var broot = document.links[i];
			if (broot.firstChild.nodeName == "IMG" && broot.firstChild.id) {
				if (broot.firstChild.id == 'nav_' + category) {
					broot.onmouseover = function() {
						im = this.firstChild;
						var my_subnav = "sub" + im.id;
						showNav(my_subnav, 1);
					}
					broot.onmouseout = function () {
						im = this.firstChild;
						var my_subnav = "sub" + im.id;
						hideNav(my_subnav, 1);
					}
				} else {
					broot.onmouseover = function() {
						im = this.firstChild;
						var my_subnav = "sub" + im.id;
						showNav(my_subnav, 0);
					}
					broot.onmouseout = function () {
						im = this.firstChild;
						var my_subnav = "sub" + im.id;
						hideNav(my_subnav, 0);
					}
				}
			}
			else if (broot.firstChild.nodeName == "IMG") {
				broot.onmouseover = function() {
					im = this.firstChild;
					var offimg = im.src;
					var onimg = offimg.substr(0, offimg.lastIndexOf('_0.gif')) + "_1.gif";
					im.src = onimg;
				}
				broot.onmouseout = function () {
					im = this.firstChild;
					var onimg = im.src;
					var offimg = onimg.substr(0, onimg.lastIndexOf('_1.gif')) + "_0.gif";
					im.src = offimg;
				}
			}
		}
	}
}

/* CSS選択関連 */
setActiveStyleSheet = function(title) {
	var i, a, main;
	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
			a.disabled = true;
			if(a.getAttribute("title") == title) {
				a.disabled = false;
			}
		}
	}
}

getActiveStyleSheet = function() {
	var i, a;
	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) {
			return a.getAttribute("title");
		}
	}
	return null;
}

getPreferredStyleSheet = function() {
	var i, a;
	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("rel").indexOf("alt") == -1 && a.getAttribute("title")) {
			return a.getAttribute("title");
		}
	}
	return null;
}

createCookie = function(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

readCookie = function(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) {
			return c.substring(nameEQ.length,c.length);
		}
	}
	return null;
}

window.onunload = function(e) {
	var title = getActiveStyleSheet();
	createCookie("style", title, 365);
}

/* グローバルナビゲーション関連 */
var timer_id;
var subnav_array = new Array();

showNav = function(subnav, current) {
	clearTimeout(timer_id);
	for (var i=0; i<subnav_array.length; i++) {
		if (subnav != subnav_array[i]) {
			document.getElementById(subnav_array[i]).style.visibility = "hidden";
		}
	}
	if (document.getElementById(subnav)) {
		document.getElementById(subnav).style.visibility = "visible";
		var navimg = subnav.substr(3);
	}
	if (!current && document.getElementById(navimg)) {
		im = document.getElementById(navimg);
		var offimg = im.src;
		var onimg = offimg.substr(0, offimg.lastIndexOf('_0.gif')) + "_1.gif";
		im.src = onimg;
	}
}

hideNav = function (subnav, current) {
	if (document.getElementById(subnav)) {
		timer_id = setTimeout("document.getElementById(\"" + subnav + "\").style.visibility = \"hidden\"", 200);
		var navimg = subnav.substr(3);
	}
	if (!current && document.getElementById(navimg)) {
		im = document.getElementById(navimg);
		var onimg = im.src;
		var offimg = onimg.substr(0, onimg.lastIndexOf('_1.gif')) + "_0.gif";
		im.src = offimg;
	}
}

setSubnavAction = function(category) {
	if (category) {
		navRoot = document.getElementById("subnav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node1 = navRoot.childNodes[i];
			if (node1.nodeName == "DIV") {
				subnav_array.push(node1.id);
				for (j=0; j<node1.childNodes.length; j++) {
					node2 = node1.childNodes[j];
					if (node2.nodeName == "UL") {
						for (k=0; k<node2.childNodes.length; k++) {
							node3 = node2.childNodes[k];
							if (node3.nodeName == "LI") {
								var img_id = node3.parentNode.parentNode.id;
								if (img_id.lastIndexOf(category) == -1) {
									node3.childNodes[0].onmouseover = function() {
										showNav(this.parentNode.parentNode.parentNode.id, 0);
									}
									node3.childNodes[0].onmouseout = function() {
										hideNav(this.parentNode.parentNode.parentNode.id, 0);
									}
								} else {
									node3.childNodes[0].onmouseover = function() {
										showNav(this.parentNode.parentNode.parentNode.id, 1);
									}
									node3.childNodes[0].onmouseout = function() {
										hideNav(this.parentNode.parentNode.parentNode.id, 1);
									}
								}
							}
						}
					}
				}
			}
		}
	}
}

writeHeader = function(path, category) {
	var s_nav_logs = 0;
	var s_nav_profile = 0;
	var s_nav_mydiary = 0;
	var s_nav_dmail = 0;
	var s_nav_glink = 0;
	var s_nav_dealer = 0;
	var s_nav_gbook = 0;
	var s_nav_guide = 0;
	var s_nav_faq = 0;
	var s_nav_accountinfo = 0;
	var swap_logs = ' class="swap"';
	var swap_profile = ' class="swap"';
	var swap_mydiary = ' class="swap"';
	var swap_dmail = ' class="swap"';
	var swap_glink = ' class="swap"';
	var swap_dealer = ' class="swap"';
	var swap_gbook = ' class="swap"';
	var swap_guide = ' class="swap"';
	var swap_faq = ' class="swap"';
	var swap_accountinfo = ' class="swap"';
	eval('s_nav_' + category + ' = 2');
	eval('swap_' + category + ' = ""');

	var sn = '';

	if (category && document.getElementById('header')) {
		sn += '<table width="100%" border="0" cellpadding="0" cellspacing="0" style="height:100px;">';
		sn += '<tr valign="bottom">';
		sn += '<td><a href="http://www.guangzhoutoyota.com.cn/" target="_blank"><img src="' + path + 'CmnFiles/Image_CN/header/gtmc_logo_a.gif" width="90" height="50" border="0" alt="GTMC Logo"></a></td>';
		sn += '<td align="right"><a class="swap" href="http://www.guangzhoutoyota.com.cn/" target="_blank"><img src="' + path + 'CmnFiles/Image_CN/header/btn_gtmc_0.gif" width="41" height="19" border="0" vspace="15" alt="首页"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="9" height="1" alt=""><a class="swap" href="' + path;
		if(readCookie("carmodel")=="highlander"){		
			sn += 'Home/highlander';
		}else if(readCookie("carmodel")=="fjcruiser"){		
			sn += 'Home/fjcruiser';
		}else if(readCookie("carmodel")=="yaris"){		
			sn += 'Home/yaris';
		}else{
			sn += 'Home/owst0120';
		}
		sn += '.asp"><img src="' + path + 'CmnFiles/Image_CN/header/btn_e-toyotaclubtop_0.gif" width="78" height="19" border="0" vspace="15" alt="车主俱乐部"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="14" height="1" alt=""><a class="swap" href="#" onClick="setActiveStyleSheet(\'small\');"><img src="' + path + 'CmnFiles/Image_CN/header/btn_textdown_0.gif" width="19" height="19" border="0" vspace="15" alt="缩小文字"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="3" height="1" alt=""><a class="swap" href="#" onClick="setActiveStyleSheet(\'big\');"><img src="' + path + 'CmnFiles/Image_CN/header/btn_textup_0.gif" width="19" height="19" border="0" vspace="15" alt="放大文字"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="3" height="1" alt=""><a class="swap" href="#" onClick="window.print();"><img src="' + path + 'CmnFiles/Image_CN/header/btn_print_0.gif" width="19" height="19" border="0" vspace="15" alt="打印"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="3" height="1" alt=""><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="11" height="1" alt=""><a class="swap" href="' + path + 'DealerGuide/Member/Login/lout0110.asp"><img src="' + path + 'CmnFiles/Image_CN/header/btn_logout_0.gif" width="83" height="19" border="0" vspace="15" alt="退出"></a></td>';
		sn += '</tr>';
		/*
		sn += '<tr>';
		sn += '<td colspan="2"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="5" alt=""></td>';
		sn += '</tr>';
		*/
		sn += '<tr>';
		sn += '<td colspan="2"><div id="nav">';
		sn += '<a href="http://www.gtmc.com.cn/" target="_blank"><img src="' + path + 'CmnFiles/Image_CN/header/gtmc_logo_b.gif" width="90" height="29" border="0" alt="GTMC Logo"></a>';
		sn += '<img src="' + path + 'CmnFiles/Image_CN/null.gif" width="43" height="1" border="0" alt="">';
		sn += '<a' + swap_logs + ' href="' + path + 'OwnerLogs/Top/owlg0110.asp"><img src="' + path + 'CmnFiles/Image_CN/nav/nav_logs_' + s_nav_logs + '.gif" width="102" height="29" border="0" alt="车主日志"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="1" height="1" border="0" alt="">';
		sn += '<a class="swap" href="' + path + 'OwnerLogs/MyCarProfile/Registration/rgtr0110.asp"><img id="nav_profile" src="' + path + 'CmnFiles/Image_CN/nav/nav_profile_' + s_nav_profile + '.gif" width="102" height="29" border="0" alt="爱车讯息"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="1" height="1" border="0" alt="">';
		sn += '<a class="swap" href="' + path + 'OwnerLogs/MyCarDiary/MainteHist/mths0110.asp"><img id="nav_mydiary" src="' + path + 'CmnFiles/Image_CN/nav/nav_diary_' + s_nav_mydiary + '.gif" width="102" height="29" border="0" alt="每日汽车日记"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="1" height="1" border="0" alt="">';
		sn += '<a class="swap" href="' + path + 'OwnerLogs/RmtMaintenance/rmtm0110.asp"><img id="nav_dmail" src="' + path + 'CmnFiles/Image_CN/nav/nav_d-mail_' + s_nav_dmail + '.gif" width="102" height="29" border="0" alt="D-MAIL"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="1" height="1" border="0" alt="">';
		/*
		sn += '<a' + swap_glink + ' href="#"><img src="' + path + 'CmnFiles/Image_CN/nav/nav_g-link_' + s_nav_glink + '.gif" width="130" height="25" border="0" alt="G-Link"></a>';
		*/
		sn += '<a' + swap_dealer + ' href="' + path + 'DealerGuide/Top/dlgd0110.asp"><img src="' + path + 'CmnFiles/Image_CN/nav/nav_dealer_' + s_nav_dealer + '.gif" width="102" height="29" border="0" alt="专属经销商"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="1" height="1" border="0" alt="">';
		sn += '<a class="swap" href="' + path + 'OwnerLogs/Glink/glnk0110.asp"><img id="nav_gbook" src="' + path + 'CmnFiles/Image_CN/nav/nav_g-book_' + s_nav_gbook + '.gif" width="132" height="29" border="0" alt="G-Book智能副驾"></a>';
		/*
		sn += '<a' + swap_glink + ' href="#"><img src="' + path + 'CmnFiles/Image_CN/nav/nav_g-link_' + s_nav_glink + '.gif" width="102" height="29" border="0" alt=""></a>';
		*/
		sn += '</div></td>';
		sn += '</tr>';
		sn += '<tr>';
		sn += '<td colspan="2" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="1" alt=""></td>';
		sn += '</tr>';
		sn += '<tr>';
		sn += '<td colspan="2">';
		sn += '<div id="subnav">';
		sn += '<div id="subnav_profile"><ul>';
		sn += '<li id="subnav_owerinfo"><a href="' + path + 'OwnerLogs/MyCarProfile/Registration/rgtr0110.asp"><span class="alt">Registered Information</span></a></li>';
		/*
		sn += '<li id="subnav_insurance"><a href="' + path + 'owner/profile/o-12-2.html"><span class="alt">保険情報</span></a></li>';
		*/
		sn += '<li id="subnav_maintenance"><a href="' + path + 'OwnerLogs/MyCarProfile/ServiceIn/svin0110.asp"><span class="alt">Maintenance Record</span></a></li>';
		/*
		sn += '<li id="subnav_financial"><a href="' + path + 'owner/profile/o-12-14.html"><span class="alt">ファイナンシャル</span></a></li>';
		*/
		sn += '</ul></div>';
		sn += '<div id="subnav_mydiary"><ul>';
		sn += '<li id="subnav_diary"><a href="' + path + 'OwnerLogs/MyCarDiary/MainteHist/mths0110.asp"><span class="alt">Diary</span></a></li>';
		sn += '<li id="subnav_myreminder"><a href="' + path + 'OwnerLogs/MyCarDiary/MainteAlarm/mtar0110.asp"><span class="alt">My Reminder</span></a></li>';
		sn += '<li id="subnav_feemanage"><a href="' + path +'OwnerLogs/MyCarDiary/ReFuel/fuel0110.asp"><span class="alt">Fee manager</span></a></li>';
		sn += '</ul></div>';
		sn += '<div id="subnav_dmail"><ul>';
		/*
		sn += '<li id="subnav_inbox"><a href="' + path + 'owner/d-mail/o-13_1-1.html"><span class="alt">受信箱</span></a></li>';
		sn += '<li id="subnav_outbox"><a href="' + path + 'owner/d-mail/o-13_1-8.html"><span class="alt">送信箱</span></a></li>';
		sn += '<li id="subnav_newmail"><a href="' + path + 'owner/d-mail/o-13_1-14.html"><span class="alt">新規メール作成</span></a></li>';
		*/
		sn += '</ul></div>';
		sn += '<div id="subnav_gbook"><ul>';
		/*
		sn += '<li id="subnav_gbook01"><a href="' + path + 'owner/mydealer/d-2-1.html"><span class="alt">G-Book智能副驾</span></a></li>';
		sn += '<li id="subnav_gbook02"><a href="' + path + 'owner/mydealer/d-2-1.html"><span class="alt">虚拟之旅</span></a></li>';
		*/
		sn += '<li id="subnav_gbook01"><a href="' + path + 'OwnerLogs/Glink/glnk0110.asp"><span class="alt">关于G-Book智能副驾</span></a></li>';
		sn += '</ul></div>';
		sn += '</div>';
		sn += '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
		sn += '<tr>';
		sn += '<td width="1" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="30" border="0" alt=""></td>';
		sn += '<td style="background: #000000;"><font color="#FFFFFF"><div id="message_area"></div></font></td>';
		sn += '<td align="right" style="background: #000000;">';
		sn += '<a' + swap_guide + ' href="' + path + 'OwnerLogs/Guide/gide0110.asp"><img src="' + path + 'CmnFiles/Image_CN/header/btn_guide_' + s_nav_guide + '.gif" width="79" height="19" border="0" alt="车主日志指南"></a>';
		sn += '<img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="8" height="1" border="0" alt="">';
		sn += '<a' + swap_faq + ' href="' + path + 'OwnerLogs/Guide/gide0130.asp"><img src="' + path + 'CmnFiles/Image_CN/header/btn_faq_' + s_nav_faq + '.gif" width="57" height="19" border="0" alt="常见问题"></a>';
		sn += '<img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="8" height="1" border="0" alt="">';
		sn += '<a' + swap_accountinfo + ' href="' + path + 'Member/Account/acnt0110.asp"><img src="' + path + 'CmnFiles/Image_CN/header/btn_accountinfo_' + s_nav_accountinfo + '.gif" width="60" height="19" border="0" alt="用户信息"></a>';
		sn += '<img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="11" height="1" border="0" alt="">';
		sn += '</td>';
		sn += '<td width="1" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="1" border="0" alt=""></td>';
		sn += '</tr>';
		sn += '</table></td>';
		sn += '</tr>';
		sn += '</table>';
		document.getElementById('header').innerHTML = sn;
	} else if (document.getElementById('header')) {
		sn += '<table width="100%" border="0" cellpadding="0" cellspacing="0" style="height:75px;">';
		sn += '<tr>';
		sn += '<td><a href="http://www.gtmc.com.cn/" target="_blank"><img src="' + path + 'CmnFiles/Image_CN/header/gtmc_logo_ab.gif" width="90" height="65" border="0" hspace="11" vspace="13" alt="GTMC Logo"></a></td>';
		sn += '<td align="right"><a class="swap" href="http://www.gtmc.com.cn/" target="_blank"><img src="' + path + 'CmnFiles/Image_CN/header/btn_gtmc_0.gif" width="41" height="19" border="0" vspace="15" alt="首页"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="14" height="1" alt=""><a class="swap" href="#" onClick="setActiveStyleSheet(\'small\');"><img src="' + path + 'CmnFiles/Image_CN/header/btn_textdown_0.gif" width="19" height="19" border="0" vspace="15" alt="缩小文字"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="3" height="1" alt=""><a class="swap" href="#" onClick="setActiveStyleSheet(\'big\');"><img src="' + path + 'CmnFiles/Image_CN/header/btn_textup_0.gif" width="19" height="19" border="0" vspace="15" alt="放大文字"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="3" height="1" alt=""><a class="swap" href="#" onClick="window.print();"><img src="' + path + 'CmnFiles/Image_CN/header/btn_print_0.gif" width="19" height="19" border="0" vspace="15" alt="打印"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="3" height="1" alt=""><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="11" height="1" alt=""></td>';
		sn += '</tr>';
		sn += '<tr>';
		sn += '<td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0">';
		sn += '<tr>';
		sn += '<td width="1"><img src="' + path + 'CmnFiles/Image_CN/nav/nav_line.gif" width="1" height="25"></td>';
		sn += '<td style="background-image: url(' + path + 'CmnFiles/Image_CN/nav/nav_bg_1.gif);"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="1"></td>';
		sn += '<td width="1"><img src="' + path + 'CmnFiles/Image_CN/nav/nav_line.gif" width="1" height="25"></td>';
		sn += '</tr>';
		sn += '</table></td>';
		sn += '</tr>';
		sn += '<tr>';
		sn += '<td colspan="2" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="1" alt=""></td>';
		sn += '</tr>';
		sn += '</table>';
		document.getElementById('header').innerHTML = sn;
	} else if (document.getElementById('header1')) {
		sn += '<table width="100%" border="0" cellpadding="0" cellspacing="0" style="height:75px;">';
		sn += '<tr>';
		sn += '<td><a href="http://www.gtmc.com.cn/" target="_blank"><img src="' + path + 'CmnFiles/Image_CN/header/gtmc_logo_ab.gif" width="90" height="65" border="0" hspace="11" vspace="13" alt="GTMC Logo"></a></td>';
/*
		sn += '<td align="right"><a class="swap" href="http://www.gtmc.com.cn/" target="_blank"><img src="' + path + 'CmnFiles/Image_CN/header/btn_gtmc_0.gif" width="41" height="19" border="0" vspace="15" alt="首页"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="14" height="1" alt=""><a class="swap" href="#" onClick="setActiveStyleSheet(\'small\');"><img src="' + path + 'CmnFiles/Image_CN/header/btn_textdown_0.gif" width="19" height="19" border="0" vspace="15" alt="缩小文字"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="3" height="1" alt=""><a class="swap" href="#" onClick="setActiveStyleSheet(\'big\');"><img src="' + path + 'CmnFiles/Image_CN/header/btn_textup_0.gif" width="19" height="19" border="0" vspace="15" alt="放大文字"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="3" height="1" alt=""><a class="swap" href="#" onClick="window.print();"><img src="' + path + 'CmnFiles/Image_CN/header/btn_print_0.gif" width="19" height="19" border="0" vspace="15" alt="打印"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="3" height="1" alt=""><img src="' + path + 'CmnFiles/Image_CN/null.gif" width="11" height="1" alt=""></td>';
		sn += '</tr>';
*/
		sn += '<tr>';
		sn += '<td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0">';
		sn += '<tr>';
		sn += '<td width="1"><img src="' + path + 'CmnFiles/Image_CN/nav/nav_line.gif" width="1" height="25"></td>';
		sn += '<td style="background-image: url(' + path + 'CmnFiles/Image_CN/nav/nav_bg_1.gif);"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="1"></td>';
		sn += '<td width="1"><img src="' + path + 'CmnFiles/Image_CN/nav/nav_line.gif" width="1" height="25"></td>';
		sn += '</tr>';
		sn += '</table></td>';
		sn += '</tr>';
		sn += '<tr>';
		sn += '<td colspan="2" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="1" alt=""></td>';
		sn += '</tr>';
		sn += '</table>';
		document.getElementById('header1').innerHTML = sn;
	}

}

writeFooter = function(path) {
	if (document.getElementById('footer')) {
		var ft = '';
		ft += '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
		ft += '</tr>';
		ft += '<tr>';
		ft += '<td width="1" style="background: #cccccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="30" border="0" alt=""></td>';
		ft += '<td colspan="2"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="10" border="0" alt=""></td>';
		ft += '<td width="1" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="30" border="0" alt=""></td>';
		ft += '</tr>';
		ft += '<tr>';
		ft += '<td width="1" style="background: #cccccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="30" border="0" alt=""></td>';
		ft += '<td background="' + path + 'CmnFiles/Image_CN/footer/footer_bg.jpg"><img src="' + path + 'CmnFiles/Image_CN/footer/footer_bg_l.jpg" width="4" height="33" border="0" alt=""><a class="swap" href="' + path + 'Home/owst0130.asp"><img src="' + path + 'CmnFiles/Image_CN/footer/btn_aboutuse_0.gif" width="64" height="33" border="0" alt="网站政策"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="20" height="1" border="0" alt=""><a class="swap" href="' + path + 'OwnerLogs/Guide/gide0120.asp"><img src="' + path + 'CmnFiles/Image_CN/footer/btn_sitemap_0.gif" width="64" height="33" border="0" alt="网站地图"></a></td>';
		ft += '<td align="right" background="' + path + 'CmnFiles/Image_CN/footer/footer_bg.jpg"><img src="' + path + 'CmnFiles/Image_CN/footer/copyright.jpg" width="245" height="33" alt="&copy; 2008 广汽丰田汽车有限公司  版权所有  &copy; 2006 丰田汽车有限公司  版权所有"></td>';
		ft += '<td width="1" style="background: #cccccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="1" border="0" alt=""></td>';
		ft += '</tr>';
		ft += '<tr>';
		ft += '<td height="30" colspan="4" align="right"><img src="' + path + 'CmnFiles/Image_CN/footer/footerlogo.jpg"></td>';
		ft += '</tr>';
		ft += '</table>';
		document.getElementById('footer').innerHTML = ft;
	}
}



writeFooter1 = function(path) {
	if (document.getElementById('footer1')) {
		var ft = '';
		ft += '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
		ft += '</tr>';
		ft += '<tr>';
		ft += '<td width="1" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="30" border="0" alt=""></td>';
		ft += '<td colspan="2"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="10" border="0" alt=""></td>';
		ft += '<td width="1" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="30" border="0" alt=""></td>';
		ft += '</tr>';
		ft += '<tr>';
		ft += '<td width="1" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="30" border="0" alt=""></td>';
		ft += '<td background="' + path + 'CmnFiles/Image_CN/footer/footer_bg.jpg"><img src="' + path + 'CmnFiles/Image_CN/footer/footer_bg_l.jpg" width="4" height="33" border="0" alt=""><a class="swap" href="' + path + 'Home/owst0130.asp"><img src="'+ path + 'CmnFiles/Image_CN/footer/btn_aboutuse_0.gif" width="64" height="33" border="0" alt="网站政策"></a><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="20" height="1" border="0" alt=""></td>';
		ft += '<td align="right" background="' + path + 'CmnFiles/Image_CN/footer/footer_bg.jpg"><img src="' + path + 'CmnFiles/Image_CN/footer/copyright.jpg" width="245" height="33" alt="&copy; 2008 广汽丰田汽车有限公司  版权所有  &copy; 2006 丰田汽车有限公司  版权所有"></td>';
		ft += '</tr>';
		ft += '<tr>';
		ft += '<td colspan="4" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="1" border="0" alt=""></td>';
		ft += '</tr>';
		ft += '<tr>';
		ft += '<td height="30" colspan="4" align="right"><img src="' + path + 'CmnFiles/Image_CN/footer/footerlogo.jpg"></td>';
		ft += '</tr>';
		ft += '</table>';
		document.getElementById('footer1').innerHTML = ft;
	}
}

writeFooter2 = function(path) {
	if (document.getElementById('footer2')) {
		var ft = '';
		ft += '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
		ft += '</tr>';
		ft += '<tr>';
		ft += '<td width="1" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="30" border="0" alt=""></td>';
		ft += '<td colspan="2"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="10" border="0" alt=""></td>';
		ft += '<td width="1" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="30" border="0" alt=""></td>';
		ft += '</tr>';
		ft += '<tr>';
		ft += '<td width="1" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="30" border="0" alt=""></td>';
		ft += '<td background="' + path + 'CmnFiles/Image_CN/footer/footer_bg.jpg"><img src="' + path + 'CmnFiles/Image_CN/footer/footer_bg_l.jpg" width="4" height="33" border="0" alt=""><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="20" height="1" border="0" alt=""></td>';
		ft += '<td align="right" background="' + path + 'CmnFiles/Image_CN/footer/footer_bg.jpg"><img src="' + path + 'CmnFiles/Image_CN/footer/copyright.jpg" width="245" height="33" alt="&copy; 2008 广汽丰田汽车有限公司  版权所有  &copy; 2006 丰田汽车有限公司  版权所有"></td>';
		ft += '</tr>';
		ft += '<tr>';
		ft += '<td colspan="4" style="background: #ccc;"><img src="' + path + 'CmnFiles/Image_CN/null.gif" alt="" width="1" height="1" border="0" alt=""></td>';
		ft += '</tr>';
		ft += '<tr>';
		ft += '<td height="30" colspan="4" align="right"><img src="' + path + 'CmnFiles/Image_CN/footer/footerlogo.jpg"></td>';
		ft += '</tr>';
		ft += '</table>';
		document.getElementById('footer2').innerHTML = ft;
	}
}


/* Site Policy_Button 関連 */
function onClick_sp()
{
 if (document.sp.sp.checked == true) 
 {
  document.all.divnext2.style.display="none";
  document.all.divnext1.style.display="block";
 }
 else
 {
  document.all.divnext1.style.display="none";
  document.all.divnext2.style.display="block";
 }
}
