var isIE6=(window.navigator.userAgent.indexOf("MSIE 6.0")!=-1);
var isIE7=(window.navigator.userAgent.indexOf("MSIE 7.0")!=-1);

if(isIE6 || isIE7)
{
	window.location.href="ie6/index.php";
}

var vert_menu = new Array;
vert_menu[0] = new Array(7);
vert_menu[0][1] = "0|index.html|HOME|index.html";
vert_menu[0][2] = "0|about.html|ABOUT US|aboutus.html";
vert_menu[0][3] = "0|collections.html|COLLECTIONS|collections.html";
vert_menu[0][4] = "0|stores.html|STORES|stores.html";
vert_menu[0][5] = "0|news.html|NEWS AND EVENTS|news.html";
vert_menu[0][6] = "0|vipchinaclub.html|TESTANTIN VIP CHINA CLUB|vipchinaclub.html";
vert_menu[0][7] = "0|contact.html|CONTACT US|contact.html";
vert_menu[1] = new Array(7);
vert_menu[1][1] = "0|index_tc.html|主頁|index_tc.html";
vert_menu[1][2] = "0|about_tc.html|關於我們|aboutus_tc.html";
vert_menu[1][3] = "0|collections_tc.html|時裝系列|collections_tc.html";
vert_menu[1][4] = "0|stores_tc.html|商店|stores_tc.html";
vert_menu[1][5] = "0|news_tc.html|最新消息|news_tc.html";
vert_menu[1][6] = "0|vipchinaclub_tc.html|鐵獅丹頓 VIP 中國會|vipchinaclub_tc.html";
vert_menu[1][7] = "0|contact_tc.html|聯絡我們|contact_tc.html";
vert_menu[2] = new Array(7);
vert_menu[2][1] = "0|index_sc.html|主页|index_sc.html";
vert_menu[2][2] = "0|about_sc.html|关于我们|aboutus_sc.html";
vert_menu[2][3] = "0|collections_sc.html|时装系列|collections_sc.html";
vert_menu[2][4] = "0|stores_sc.html|商店|stores_sc.html";
vert_menu[2][5] = "0|news_sc.html|最新消息|news_sc.html";
vert_menu[2][6] = "0|vipchinaclub_sc.html|铁狮丹顿 VIP 中国会|vipchinaclub_sc.html";
vert_menu[2][7] = "0|contact_sc.html|联络我们|contact_sc.html";
var footer_msg = new Array;
footer_msg[0] = new Array(2);
footer_msg[0][1] = "Copyright &copy; 2011 TESTANTIN. All Rights Reserved.";
footer_msg[0][2] = "Best viewed with Internet Explorer 8.0 or above with 1024 x 768 resolution.";
footer_msg[1] = new Array(2);
footer_msg[1][1] = "版權 &copy; 2011 鐵獅丹頓 本公司保留一切版權。";
footer_msg[1][2] = "使用Internet Explorer 8.0或以上版本以及1024 x 768解像度瀏覽可得更佳效果。";
footer_msg[2] = new Array(2);
footer_msg[2][1] = "版权 &copy; 2011 铁狮丹顿 本公司保留一切版权。";
footer_msg[2][2] = "使用Internet Explorer 8.0或以上版本以及1024 x 768解像度浏览可得更佳效果。";

var curr_lang=0;
tmp_filename=window.location.pathname.toLowerCase();
current_filename=tmp_filename.substring(tmp_filename.lastIndexOf("\/")+1);
if (tmp_filename.lastIndexOf("\/")+1==tmp_filename.length) {
	current_filename="index.html";
}
if (current_filename.indexOf("_tc") != -1) curr_lang=1;
if (current_filename.indexOf("_sc") != -1) curr_lang=2;

function ilangbar() {
	var tmplangbar="";
	var tmpcurr_filename=current_filename.substring(0,current_filename.lastIndexOf("."));
	if (tmpcurr_filename.indexOf("_tc") != -1) tmpcurr_filename=tmpcurr_filename.substring(0,tmpcurr_filename.length-3);
	if (tmpcurr_filename.indexOf("_sc") != -1) tmpcurr_filename=tmpcurr_filename.substring(0,tmpcurr_filename.length-3);
	tmplangbar+="<ul class='footer_right'>";
	tmplangbar+="<li><p class='small_white'>";
	tmplangbar+="<a class='small_white' href='"+tmpcurr_filename+".html'>ENG</a>&nbsp&nbsp|&nbsp&nbsp";
	tmplangbar+="<a class='small_white' href='"+tmpcurr_filename+"_tc.html'>繁</a>&nbsp&nbsp|&nbsp&nbsp";
	tmplangbar+="<a class='small_white' href='"+tmpcurr_filename+"_sc.html'>简</a>";
	tmplangbar+="</p></li>";
	tmplangbar+="</ul>";
	document.getElementById('langbar').innerHTML=tmplangbar;
}

function imenu() {
	var menu_tmp="";
	menu_tmp+="<div class='navigation_wrapper'>" + "<ul>";
	var begin_sub=0;
	for (i=1;i<vert_menu[curr_lang].length;i++) {
		vert_menu_item = vert_menu[curr_lang][i].split("|");
		if (vert_menu_item[0] == "0") {
			menu_tmp+="<li ";
			if (vert_menu_item[1].indexOf(current_filename) != -1 ) menu_tmp+= "class='active'";
 			menu_tmp+="><h1 class='nav'><a href='"+vert_menu_item[1] + "'>"+vert_menu_item[2]+"</a></h1></li>";
		}
	}
	menu_tmp+="</ul>" + "</div>";
	document.getElementById('navigation_wrapper').innerHTML=menu_tmp;
}
function ifooter() {
	var tmpfooter="";
	tmpfooter+="<ul class='footer_left'>";
	tmpfooter+="	<li><p class='small_white'>"+footer_msg[curr_lang][1]+"</p></li>";
	tmpfooter+="</ul>";
	tmpfooter+="<ul class='footer_right'>";
	tmpfooter+="	<li><p class='small_white'>"+footer_msg[curr_lang][2]+"</p></li>";
	tmpfooter+="</ul>";
	document.getElementById('footer_wrapper').innerHTML=tmpfooter;
}

function setcollect(item) {
	var tmpbg="";
	if (loc=="sc") {
		switch(item) {
			case 1:
				document.getElementById('col_1').className="subnav_link";
				document.getElementById('col_2').className="subnav_link_w";
				document.getElementById('col_3').className="subnav_link_w";
				document.getElementById('col_4').className="subnav_link_w";
				document.getElementById('collect1').className="collect_on";
				document.getElementById('collect2').className="collect_off";
				document.getElementById('collect3').className="collect_off";
				document.getElementById('collect4').className="collect_off";
				tmpbg+="<div id='images'>";
				tmpbg+="	<div id='shadow'></div>";
				tmpbg+="	<img src='images/home_04a.jpg' alt='Sfeer foto 1' class='active' />";
				tmpbg+="	<img src='images/home_04b.jpg' alt='Sfeer foto 2' />";
				tmpbg+="	<img src='images/home_04c.jpg' alt='Sfeer foto 4' />";
				tmpbg+="</div>";
				document.getElementById('background').innerHTML=tmpbg;
				break;
			case 2:
				document.getElementById('col_1').className="subnav_link_w";
				document.getElementById('col_2').className="subnav_link";
				document.getElementById('col_3').className="subnav_link_w";
				document.getElementById('col_4').className="subnav_link_w";
				document.getElementById('collect1').className="collect_off";
				document.getElementById('collect2').className="collect_on";
				document.getElementById('collect3').className="collect_off";
				document.getElementById('collect4').className="collect_off";
				tmpbg+="<div id='images'>";
				tmpbg+="	<div id='shadow'></div>";
				tmpbg+="	<img src='images/home_04a.jpg' alt='Sfeer foto 1' class='active' />";
				tmpbg+="	<img src='images/home_04b.jpg' alt='Sfeer foto 2' />";
				tmpbg+="	<img src='images/home_04c.jpg' alt='Sfeer foto 4' />";
				tmpbg+="</div>";
				document.getElementById('background').innerHTML=tmpbg;
				break;
				break;
			case 3:
				document.getElementById('col_1').className="subnav_link_w";
				document.getElementById('col_2').className="subnav_link_w";
				document.getElementById('col_3').className="subnav_link";
				document.getElementById('col_4').className="subnav_link_w";
				document.getElementById('collect1').className="collect_off";
				document.getElementById('collect2').className="collect_off";
				document.getElementById('collect3').className="collect_on";
				document.getElementById('collect4').className="collect_off";
				tmpbg+="<div id='images'>";
				tmpbg+="	<div id='shadow'></div>";
				tmpbg+="	<img src='images/home_04a.jpg' alt='Sfeer foto 1' class='active' />";
				tmpbg+="	<img src='images/home_04b.jpg' alt='Sfeer foto 2' />";
				tmpbg+="	<img src='images/home_04c.jpg' alt='Sfeer foto 4' />";
				tmpbg+="</div>";
				document.getElementById('background').innerHTML=tmpbg;
				break;
			case 4:
				document.getElementById('col_1').className="subnav_link_w";
				document.getElementById('col_2').className="subnav_link_w";
				document.getElementById('col_3').className="subnav_link_w";
				document.getElementById('col_4').className="subnav_link";
				document.getElementById('collect1').className="collect_off";
				document.getElementById('collect2').className="collect_off";
				document.getElementById('collect3').className="collect_off";
				document.getElementById('collect4').className="collect_on";
				tmpbg+="<div id='images'>";
				tmpbg+="	<div id='shadow'></div>";
				tmpbg+="	<img src='images/home_04a.jpg' alt='Sfeer foto 1' class='active' />";
				tmpbg+="	<img src='images/home_04b.jpg' alt='Sfeer foto 2' />";
				tmpbg+="	<img src='images/home_04c.jpg' alt='Sfeer foto 4' />";
				tmpbg+="</div>";
				document.getElementById('background').innerHTML=tmpbg;
				break;
			default:
				document.getElementById('col_1').className="subnav_link";
				document.getElementById('col_2').className="subnav_link_w";
				document.getElementById('col_3').className="subnav_link_w";
				document.getElementById('collect1').className="collect_on";
				document.getElementById('collect2').className="collect_off";
				document.getElementById('collect3').className="collect_off";
				tmpbg+="<div id='images'>";
				tmpbg+="	<div id='shadow'></div>";
				tmpbg+="	<img src='images/TS网页2011秋冬首页1a.jpg' alt='Sfeer foto 1' class='active' />";
				tmpbg+="	<img src='images/home_04b.jpg' alt='Sfeer foto 2' />";
				tmpbg+="	<img src='images/home_04c.jpg' alt='Sfeer foto 4' />";
				tmpbg+="</div>";
				document.getElementById('background').innerHTML=tmpbg;
		}
	}
}

