﻿function pop(path, width, height, title){

height1 = (height*1)+22;
var myWindow = window.open('', '_blank', 'resizable=no,height='+height1+',width='+width);
myWindow.document.write('<link href="' + this.url_location + 'css/format.css" rel="stylesheet" type="text/css">');
myWindow.document.write("<body style='margin: 0 0 0 0'>");
myWindow.document.write("<img height='"+height+"' width='"+width+"' border='0' src='"+this.url_location+'images/common/'+path+"' />");
myWindow.document.write("<table border=0 width='100%' cellpadding=0 cellspacing=0>");
myWindow.document.write("<tr>");
myWindow.document.write("<td align='left' ><b>&nbsp;&nbsp;"+title+"</b></td><td align='right'><a href='javascript: self.close();'>Close</a>&nbsp;&nbsp;</td>");
myWindow.document.write("</tr>");
myWindow.document.write("</table>");
myWindow.document.write("</body>");
myWindow.focus();
}

function getImage(position, format, lang, type, css, num){

document.write('<img class="'+css+'" border="0" src="'+this.url_location+'images/'+lang+'/'+type+'_'+this.getSectionByPosition(position).name.toLowerCase().replace(/\s|\/|\\|\:|\*|\?|\"|\<|\>|\|/g,"").toString()+num+'.'+format+'">');

}

function getBannerImage(position, format){

this.getImage(position, format, "common", "prodshot", "", "");

}

function getHeaderImage(position, format){

this.getImage(position, format, this.lang, "hd", "", "");

}

function getHeaderImage2(position, format){

this.getImage(position, format, this.lang, "subhd", "", "");

}

function getSubImage(position, format, css){

this.getImage(position, format, "common", "prodpix", css, "");

}

function getSubImage2(position, format, css){

this.getImage(position, format, "common", "prodpix", css, 2);

}

function getHeaderSubject(position){

document.write(this.getSectionByPosition(position).subject);

}

function str_lang(en, tc){

if(this.lang == "tc")
	return tc;
else
	return en;

}

function getLv1Menu(){

	var sectionLevel = html.sectionArr;
	
	for(var i in sectionLevel){
		document.write('<a href="' +sectionLevel[i].link+ '"><img id="section' +i+ '" class="btn_over" src="' +sectionLevel[i].src+ '" border="0"></a>');
	}
			
}

function getMenu(position, type){

	var sectionLevel = this.getSectionByPosition(position).children;

	//var sectionLevel = html.sectionArr[sectionId].children;
	switch(type){

		case "layer":
		document.write('<div id="layer'+sectionId+'" style="display:none"><table border="0" cellspacing="0" cellpadding="0" class="subnavlayer" id="subnavlayer" >');
		var sectionLevel = html.sectionArr[sectionId].children;
		for(var i in sectionLevel){
			document.write('<tr>');
			document.write('<td><a id="layerlink' +sectionId+i+ '" href="'+sectionLevel[i].link+'">'+sectionLevel[i].subject+'</a></td>');
			document.write('</tr>');
		}
		document.write('</table></div>');
		break;
		case "rightmenu":
		var j = 0;
		for(var i in sectionLevel){
			if(j == 6){
				document.write('<li><a id="rightmenu' +i+ '" class="btn_over" href="'+sectionLevel[i].link+'">'+sectionLevel[i].subject+'</a></li>');
				document.write('</td>');
				document.write('<td class="subnavmid">&nbsp;</td>');
				document.write('<td class="subnav">');
			}else if(j < 14){
				document.write('<li><a id="rightmenu' +i+ '" class="btn_over" href="'+sectionLevel[i].link+'">'+sectionLevel[i].subject+'</a></li>');
			}else{
				break;
			}
			j++;
		}
		break;
		case "bulletpoint":
		document.write('<ul class="ulcontent text">');
		for(var i in sectionLevel){
			document.write('<li class="firstlist"><a id="bulletlink'+i+'" href="'+sectionLevel[i].link+'">'+sectionLevel[i].subject+'</a></li>');
		}
		document.write('</ul>');	
		break;
	}

}

function getLv2Menu(sectionId){
	if(sectionId == -1)
		return false;
	document.write('<div id="layer'+sectionId+'" style="display:none;"><table border="0" cellspacing="0" cellpadding="0" class="subnavlayer" id="subnavlayer" >');
	var sectionLevel = html.sectionArr[sectionId].children;
	for(var i in sectionLevel){

		document.write('<tr>');
		document.write('<td><a id="layerlink' +sectionId+i+ '" href="'+sectionLevel[i].link+'">'+sectionLevel[i].subject+'</a></td>');
		document.write('</tr>');

	}
	document.write('</table></div>');
			
}

function getLv3Menu(sectionId, sectionId2){
	if(sectionId == -1 || sectionId2 == -1)
		return false;
	var j = 0;
	var sectionLevel = html.sectionArr[sectionId].children[sectionId2].children;
	for(var i in sectionLevel){
		if(j == 6){
			document.write('<li><a id="rightmenu' +i+ '" class="btn_over" href="'+sectionLevel[i].link+'">'+sectionLevel[i].subject+'</a></li>');
			document.write('</td>');
			document.write('<td class="subnavmid">&nbsp;</td>');
			document.write('<td class="subnav">');
		}else if(j < 14){
			document.write('<li><a id="rightmenu' +i+ '" class="btn_over" href="'+sectionLevel[i].link+'">'+sectionLevel[i].subject+'</a></li>');
		}else{
			break;
		}
		j++;
	}

}

function getLv4Menu(sectionId, sectionId2, sectionId3){
	if(sectionId == -1 || sectionId2 == -1 || sectionId3 == -1)
		return false;
	var sectionLevel = html.sectionArr[sectionId].children[sectionId2].children[sectionId3].children;
	document.write('<ul class="ulcontent text">');
	for(var i in sectionLevel){
		document.write('<li class="firstlist"><a id="bulletlink'+i+'" href="'+sectionLevel[i].link+'">'+sectionLevel[i].subject+'</a></li>');
	}
	document.write('</ul>');	
}


function Website_Header(){
	this.echo('<html xmlns="http://www.w3.org/1999/xhtml">');
	this.echo('<head>');
	this.echo('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />');
	this.echo('<title>German Physiks Asia - Index</title>');
	this.echo('<link href="' + this.url_location + 'css/format.css" rel="stylesheet" type="text/css">');
	this.echo('</head>');
	this.echo('<script src="' + this.url_location + 'js/scroll.js"></script>');
	this.echo('<body class="body">');
	this.echo('<div>');
	this.echo('<' + 'script>');
	this.echo('<' + '!--');
	this.echo('function MM_swapImgRestore() { //v3.0');
	this.echo('  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;');
	this.echo('}');
	this.echo('');
	this.echo('function MM_preloadImages() { //v3.0');
	this.echo('  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();');
	this.echo('    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)');
	this.echo('    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}');
	this.echo('}');
	this.echo('');
	this.echo('function MM_findObj(n, d) { //v4.01');
	this.echo('  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {');
	this.echo('    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}');
	this.echo('  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];');
	this.echo('  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);');
	this.echo('  if(!x && d.getElementById) x=d.getElementById(n); return x;');
	this.echo('}');
	this.echo('');
	this.echo('function MM_swapImage() { //v3.0');
	this.echo('  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)');
	this.echo('   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}');
	this.echo('}');
	this.echo('/' + '/--' + '>');
	this.echo('</' + 'script>');
	this.echo('<table border="0" cellpadding="0" cellspacing="0" class="mainframe" align="center">');
	this.echo('  <tr>');
	this.echo('    <td class="loopbg" align="center">');
	this.echo('');
	this.top_menu();
}

function Website_Top_Menu(){
	this.echo('	<table border="0" cellspacing="0" cellpadding="0" class="topframe">');
	this.echo('      <tr>');
	this.echo('        <td><table border="0" cellspacing="0" cellpadding="0" class="navframe">');
	this.echo('          <tr>');
	this.echo('            <td><a href="'+this.url_location + this.lang+'/"><img border="0" src="' + this.url_location + 'images/' + this.lang + '/name.gif" alt="German Physiks Asia"></a></td>');
	this.echo('            <td>&nbsp;</td>');
	this.echo('          </tr>');
	this.echo('          <tr>');
	this.echo('            <td>');
	this.getLv1Menu();
	this.echo('				</td>');
	this.echo('            <td class="aliright"><table border="0" cellspacing="0" cellpadding="4" class="language">');
	this.echo('              <tr>');
	this.echo('                <td><a href="'+this.url_location + this.lang+'/"><img src="' + this.url_location + 'images/common/btn_home.gif" class="btn_over" border="0" /></a></td>');
	this.echo('                <td nowrap><a id="switchToEn" href="javascript:html.SwitchLang(\'en\');">ENG</a></td>');
	this.echo('                <td nowrap><a id="switchToTc" href="javascript:html.SwitchLang(\'tc\');">中文</a></td>');
	this.echo('              </tr>');
	this.echo('            </table>');
	this.echo('               </td>');
	this.echo('          </tr>');
	this.echo('        </table></td>');
	this.echo('        <td><img src="' + this.url_location + 'images/common/logo.jpg"></td>');
	this.echo('      </tr>');
	this.echo('    </table>');
}

function Website_Footer(){
	//this.echo('<table border="0" cellspacing="0" cellpadding="0" class="bottomshad">');
	//this.echo('        <tr>');
	//this.echo('          <td><a target="_blank" href="http://www.german-physiks.com" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image15\',\'\',\'' + this.url_location + 'images/' + this.lang + '/btn_globalhome_over.jpg\',1)"><img src="' + this.url_location + 'images/' + this.lang + '/btn_globalhome.jpg" name="Image15" border="0"></a></td>');

	//this.echo('        </tr>');
	//this.echo('      </table>');
	this.echo('</td>');
	this.echo('  </tr>');
	this.echo('  <tr>');
	this.echo('    <td align="center">');
	this.bottom_menu();
	this.echo('</td>');
	this.echo('  </tr>');
	this.echo('</table>');
	this.echo('</div>');
	this.echo('</body>');
	this.echo('</html>');
}

function Website_Bottom_Menu(){
	this.echo('		<table border="0" cellspacing="0" cellpadding="0" class="footerframe">');
	this.echo('      <tr>');
	this.echo('        <td class="footertext"><a href="'+this.url_location + this.lang +'/terms_of_use.htm">Terms of Use</a>   |   <a href="'+this.url_location + this.lang +'/legal_notice.htm">Legal Notice</a>    |   Copyright &copy; 2009 German Physiks Asia. All Rights Reserved. </td>');
	this.echo('        <td class="aliright"><a href="http://www.westcomzivo.com" target="_blank"><img src="' + this.url_location + 'images/' + this.lang + '/bywzl.gif" border="0"></a></td>');
	this.echo('      </tr>');
	this.echo('    </table>');
}

function echo(str){
	document.writeln(str);
}

function SwitchLang(lang){
	if(this.lang==lang){
		return;
	}
	
	if(this.lang=="en"){
		location.href=document.URL.replace("/en/", "/tc/");
	}else{
		location.href=document.URL.replace("/tc/", "/en/");
	}
}

function sectionObject(parent, position, subject, link, target, src, name){
	this.name = name;
	this.parent = parent;
	this.position = position;
	this.link = link;
	this.subject = subject;
	this.target = target;
	this.src = src;
	this.children = new Array();
	this.createChild = function(subject, link, target, src, name){
	this.children[this.children.length] = new sectionObject(this, this.position+"|"+this.children.length, subject, link, target, src, name);
	};
	this.getPosition = function(key){
		if(this.link == key){
			return this.position;
		}else{
			for(var i=0; i<this.children.length; i++){

				if(this.children[i].getPosition(key) != -1){
					return this.children[i].getPosition(key);
				}
			}
		}
		return -1;
	}

}

function getSectionIdArr(position){

	var id = new Array(-1, -1, -1, -1);
	if(position.toString().search(/\|/) != -1){
		position = position.split("|");
		for(var i=0; i<position.length; i++)
			id[i] = position[i];
	}else{
		id[0] = position;
	}
	return id;

}

function getSectionByPosition(position){

	var id = getSectionIdArr(position);
	var getChild = function(i, id, section){
		if(id[++i] != null && id[i] != -1){
			return getChild(i, id, section.children[id[i-1]]);
		}else{
			return section.children[id[i-1]];
		}
	}
	if(id[0] != -1){
		return getChild(0, id, this.allSection);
	}else{
		return false
	}
}

function addLv1(subject, link, target, src, name){

	this.sectionArr[this.sectionArr.length] = new sectionObject(this, this.sectionArr.length, subject, link, target, src, name);
	
}
function addLv2(subject, link, target, src, name){

	this.sectionArr[this.sectionArr.length-1].createChild(subject, link, target, src, name);

}
function addLv3(subject, link, target, src, name){

	this.sectionArr[this.sectionArr.length-1].children[this.sectionArr[this.sectionArr.length-1].children.length-1].createChild(subject, link, target, src, name);
	
}
function addLv4(subject, link, target, src, name){

	this.sectionArr[this.sectionArr.length-1].children[this.sectionArr[this.sectionArr.length-1].children.length-1].children[this.sectionArr[this.sectionArr.length-1].children[this.sectionArr[this.sectionArr.length-1].children.length-1].children.length-1].createChild(subject, link, target, src, name);

}
/*
function addLv(level, subject, link, target, src){

	var add = function(level, obj, subject, link, target, src){
		//alert(obj.createChild);]
		if(--level == 0)
			obj.createChild(subject, link, target, src);
		else{
			add(level, obj.children[obj.children.length], subject, link, target, src)
}
	}
	//alert(this.allSection);
	add(level, this.all, subject, link, target, src);
	
}
*/
function HTML(){

	this.sectionArr = new Array();
	this.addLv1 = addLv1;
	this.addLv2 = addLv2;
	this.addLv3 = addLv3;
	this.addLv4 = addLv4;
	this.echo=echo;
	this.header=Website_Header;
	this.top_menu=Website_Top_Menu;
	this.bottom_menu=Website_Bottom_Menu;
	this.footer=Website_Footer;
	this.getLv1Menu=getLv1Menu;
	this.getLv2Menu=getLv2Menu;
	this.getLv3Menu=getLv3Menu;
	this.getLv4Menu=getLv4Menu;
	this.getMenu=getMenu;
	this.str_lang=str_lang;
	this.getSectionByPosition=getSectionByPosition;
	this.getSectionIdArr=getSectionIdArr;
	this.currentPosition="0";
	this.getHeaderImage=getHeaderImage;
	this.getHeaderSubject=getHeaderSubject;
	this.getBannerImage=getBannerImage;
	this.getImage=getImage;
	this.pop=pop;
	this.getSubImage=getSubImage;
	this.getHeaderImage2=getHeaderImage2;
	this.getSubImage2=getSubImage2;
	// define lang
	if(window.location.toString().indexOf("/en/")!==-1){
		this.lang="en";
	}else{
		this.lang="tc";
	}
	
	// private variable
	var path_array=window.location.toString().replace(/\?.*|#.*/, "").toString().split("/");
	var i;
	var start_path=false;
	var temp_path="";
	
	for(i=0;i<path_array.length;i++){
		if(start_path==true){
			temp_path+="../";
		}
		
		if(path_array[i]==this.lang){
			start_path=true;
		}
	}
	this.url_location=temp_path;
	this.SwitchLang=SwitchLang;
	this.path_buff = this.url_location + this.lang;
	this.allSection = new sectionObject("", 0, "", "", "", "");
	//addLv(0, this.str_lang("Home","主頁"),this.path_buff + "/","_self", this.url_location + 'images/' + this.lang + '/nav_01.gif');
	this.addLv1(this.str_lang("About Us","關於我們"),"#","_self", this.url_location + 'images/' + this.lang + '/nav_01.gif',"about");
		this.addLv2("German Physiks Asia Ltd.",this.path_buff + "/aboutus/about_german_physiks_asia.htm","_self","","aboutus_germanphysiks");
	this.addLv1(this.str_lang("About Us","關於我們"),"#","_self", this.url_location + 'images/' + this.lang + '/nav_02.gif',"manufacturers");
	//this.addLv1(this.str_lang("About Us","關於我們"),"#", this.url_location + 'images/' + this.lang + '/nav_02.gif',"about");
		this.addLv2("Acoustic Solid",this.path_buff + "/aboutus/acoustic_solid.htm","_self","","aboutus_acousticsolid");
		this.addLv2("bergmann",this.path_buff + "/aboutus/bergmann.htm","_self","","aboutus_bergmann");
		this.addLv2("brinkmann",this.path_buff + "/aboutus/brinkmann.htm","_self","","aboutus_brinkmann");
		this.addLv2(this.str_lang("German Physiks","German Physiks"),this.path_buff + "/aboutus/german_physiks.htm","_self","","germanphysiks");
		//this.addLv2("Lansche Audio",this.path_buff + "/aboutus/lanscheaudio.htm","_self","","aboutus_lanscheaudio");
		this.addLv2("Lindemann",this.path_buff + "/aboutus/lindemann.htm","_self","","aboutus_lindemann");
		this.addLv2("Simon Yorke ",this.path_buff + "/aboutus/simon_yorke.htm","_self","","Simon Yorke");
		this.addLv2("Solid Tech",this.path_buff + "/aboutus/solid_tech.htm","_self","","Solid Tech");
		this.addLv2("Vitus Audio",this.path_buff + "/aboutus/vitus_audio.htm","_self","","aboutus_vitusaudio");
		this.addLv2("WLM",this.path_buff + "/aboutus/wlm.htm","_self","","aboutus_wlm");
		

	this.addLv1(this.str_lang("Turntables","黑膠唱盤"),"#","_self", this.url_location + 'images/' + this.lang + '/nav_03.gif',"Turntables");
		this.addLv2("Acoustic Solid",this.path_buff + "/turntables/acoustic_solid.htm","_self","","acousticsolid");
			this.addLv3("Royal",this.path_buff + "/turntables/royal.htm","_self","","royal");
			this.addLv3("One to One",this.path_buff + "/turntables/one_to_one.htm","_self","","onetoone");
			this.addLv3("One",this.path_buff + "/turntables/one.htm","_self","","one");
			this.addLv3("Edition",this.path_buff + "/turntables/edition.htm","_self","","edition");
			this.addLv3("Machine",this.path_buff + "/turntables/machine.htm","_self","","machine");
			this.addLv3("Machine Small",this.path_buff + "/turntables/machine_small.htm","_self","","machinesmall");
			this.addLv3("Round ",this.path_buff + "/turntables/round.htm","_self","","round");
			this.addLv3("Classic Wood",this.path_buff + "/turntables/classic_wood.htm","_self","","classicwood");
			this.addLv3("Wood",this.path_buff + "/turntables/wood.htm","_self","","wood");
			this.addLv3("Wood MPX",this.path_buff + "/turntables/wood_mpx.htm","_self","","woodmpx");
			this.addLv3("Wood Black",this.path_buff + "/turntables/wood_black.htm","_self","","woodblack");
			this.addLv3("Transparent",this.path_buff + "/turntables/transpartent.htm","_self","","transpartent");
		this.addLv2("bergmann",this.path_buff + "/turntables/sindre.htm","_self","","Sindre");
		this.addLv2("brinkmann",this.path_buff + "/turntables/brinkmann.htm","_self","","brinkmann");
			this.addLv3("Balance",this.path_buff + "/turntables/balance.htm","_self","","balance");
			this.addLv3("La Grange",this.path_buff + "/turntables/lagrange.htm","_self","","lagrange");
			this.addLv3("R&ouml;nt",this.path_buff + "/turntables/ront.htm","_self","","ront");
			this.addLv3("Tonearm 10.5",this.path_buff + "/turntables/tonearm_105.htm","_self","","105");
			this.addLv3("Tonearm 12.1",this.path_buff + "/turntables/tonearm_121.htm","_self","","121");
			this.addLv3("EMT-ti",this.path_buff + "/turntables/emtti.htm","_self","","emtti");
		this.addLv2("Simon Yorke",this.path_buff + "/turntables/simon_yorke.htm","_self","","simonyorke");
			this.addLv3("S-10",this.path_buff + "/turntables/s-10.htm","_self","","s10");
			this.addLv3("S-9",this.path_buff + "/turntables/s-9.htm","_self","","s9");
			this.addLv3(this.str_lang("Stand","唱盤機架"),this.path_buff + "/turntables/stand.htm","_self","","stand");
		

	this.addLv1(this.str_lang("Electronics","電子產品"),"#","_self", this.url_location + 'images/' + this.lang + '/nav_04.gif',"Electronics");
		this.addLv2("brinkmann",this.path_buff + "/electronics/brinkmann.htm","_self","","brinkmann");
			this.addLv3("Marconi",this.path_buff + "/electronics/marconi.htm","_self","","marconi");
			this.addLv3("Calvin",this.path_buff + "/electronics/calvin.htm","_self","","calvin");
			this.addLv3("Mono",this.path_buff + "/electronics/mono.htm","_self","","mono");
			this.addLv3("Stereo",this.path_buff + "/electronics/stereo.htm","_self","","stereo");
			this.addLv3("Integrated Amplifier (Vollverst&auml;rker)",this.path_buff + "/electronics/integrated.htm","_self","","integrated");
			this.addLv3("Edison",this.path_buff + "/electronics/edison.htm","_self","","edison");
			this.addLv3("Fein",this.path_buff + "/electronics/fein.htm","_self","","fein");
		this.addLv2("Lindemann",this.path_buff + "/electronics/800_series.htm","_self","","lindemann");
		this.addLv2(this.str_lang("Vitus Audio","電子部份 (Vitus Audio)"),this.path_buff + "/electronics/vitus_audio.htm","_self","","vitusaudio");
			this.addLv3("SP-101",this.path_buff + "/electronics/sp_101.htm","_self","","sp100");
			this.addLv3("SL-101",this.path_buff + "/electronics/sl_101.htm","_self","","sl101");
			this.addLv3("SM-101",this.path_buff + "/electronics/sm_101.htm","_self","","sm101");
			this.addLv3("SS-010",this.path_buff + "/electronics/ss010.htm","_self","","SS010");
			this.addLv3("SS-101",this.path_buff + "/electronics/ss101.htm","_self","","SS101");
			this.addLv3("SCD-010",this.path_buff + "/electronics/scd010.htm","_self","","SCD010");
		

	this.addLv1(this.str_lang("Speakers","揚聲器"),"#","_self", this.url_location + 'images/' + this.lang + '/nav_05.gif',"Speakers");
		this.addLv2(this.str_lang("German Physiks","蜚聲國際"),this.path_buff + "/speakers/german_physiks.htm","_self","","germanphysiks");
			this.addLv3("Gaudi MK II",this.path_buff + "/speakers/gaudi_mk_ii.htm","_self","","Gaudi MK II");
			this.addLv3("The Emperor",this.path_buff + "/speakers/theemperor.htm","_self","","theemperor");
			this.addLv3("Loreley MK III",this.path_buff + "/speakers/loreley_mk_iii.htm","_self","","Loreley MK III");
			this.addLv3("PQS Series",this.path_buff + "/speakers/pqs_402.htm","_self","","PQS 402");
				this.addLv4("PQS-402",this.path_buff + "/speakers/pqs_402.htm","_self","","PQS 402");
				this.addLv4("PQS-302",this.path_buff + "/speakers/pqs_302.htm","_self","","PQS 302");
				this.addLv4("PQS-202 MK II",this.path_buff + "/speakers/pqs_202_mk_ii.htm","_self","","PQS 202");
				this.addLv4("PQS-201 MK II",this.path_buff + "/speakers/pqs_201_mk_ii.htm","_self","","PQS 201");
			this.addLv3("Carbon MK IV",this.path_buff + "/speakers/carbon_mk_iv.htm","_self","","Carbon MK IV");
			this.addLv3("Borderland MK IV",this.path_buff + "/speakers/borderland_mk_iv.htm","_self","","Borderland MK IV");
			this.addLv3("Unicorn MK II",this.path_buff + "/speakers/unicorn_mk_ii.htm","_self","","Unicorn MK II");
			this.addLv3("HRS-120",this.path_buff + "/speakers/hrs_120.htm","_self","","HRS 120");
			this.addLv3("Troubadour Series",this.path_buff + "/speakers/troubadour_80.htm","_self","","Troubadour 80");
				this.addLv4("Troubadour 80",this.path_buff + "/speakers/troubadour_80.htm","_self","","Troubadour 80");
				this.addLv4("Troubadour 40",this.path_buff + "/speakers/troubadour_40.htm","_self","","Troubadour 40");
			this.addLv3("DDD - Driver",this.path_buff + "/speakers/ddd_driver.htm","_self","","ddddriver");
			this.addLv3("Finishes",this.path_buff + "/speakers/finishes.htm","_self","","Finishes");
//			this.addLv3("Legacy Products","#","_self","","Legacy Products");
		//this.addLv2("Lansche Audio",this.path_buff + "/speakers/lanscheaudio.htm","_self","","Lansche Audio");
		//	this.addLv3("No. 8",this.path_buff + "/speakers/no_8.htm","_self","","No8");
		//	this.addLv3("No. 4.1",this.path_buff + "/speakers/no_4_1.htm","_self","","No4");
		this.addLv2("WLM",this.path_buff + "/speakers/wlm.htm","_self","","WLM");
			this.addLv3("La Scala",this.path_buff + "/speakers/la_scala.htm","_self","","La Scala");
			this.addLv3("Diva",this.path_buff + "/speakers/diva.htm","_self","","Diva");
			//this.addLv3("Tube Line","#","_self","","Tube Line");
			
	this.addLv1(this.str_lang("Cables","高級導線"),"#","_self", this.url_location + 'images/' + this.lang + '/nav_06.gif',"Cables");
		this.addLv2(this.str_lang("VA - Andromeda series","Vitus Audio  (Andromeda系列)"),this.path_buff + "/cables/vas.htm","_self","","vaandromeda");
		
	this.addLv1(this.str_lang("Racks","音響專用架"),"#","_self", this.url_location + 'images/' + this.lang + '/nav_07.gif',"Racks");
		
		this.addLv2("Solid Tech",this.path_buff + "/racks/solid_tech.htm","_self","","Solid Tech");
			//this.addLv3("Radius",this.path_buff + "/racks/radius.htm","_self","","Radius");	
			this.addLv3("ROS 1",this.path_buff + "/racks/ros_1.htm","_self","","ros1");
			this.addLv3("ROS 3",this.path_buff + "/racks/ros_3.htm","_self","","ros3");
			this.addLv3("ROS 4",this.path_buff + "/racks/ros_4.htm","_self","","ros4");
			this.addLv3(this.str_lang("Isolators","諧震隔離器ISOLATOR"),this.path_buff + "/racks/isolators.htm","_self","","Isolators");	
		
	this.addLv1(this.str_lang("Accessories","輔件"),"#","_self", this.url_location + 'images/' + this.lang + '/nav_08.gif',"Accessories");
		this.addLv2(this.str_lang("German Physiks","蜚聲國際"),this.path_buff + "/accessories/pion.htm","_self","","German Physiks");	
			//this.addLv3("Pion",this.path_buff + "/accessories/pion.htm","_self","","Pion");
			this.addLv3(this.str_lang("Pion C 250 D Power Cleaner","Pion C 250D 電源濾波器"),this.path_buff + "/accessories/pion_c250d.htm","_self","","pionc250d");
			this.addLv3(this.str_lang("Pion C 1200 Power Cleaner","Pion C 1200 電源濾波器"),this.path_buff + "/accessories/pion_c1200.htm","_self","","pionc1200");
			this.addLv3(this.str_lang("Pion N 3 ZF Power Cable","PION N3 ZF 電源線"),this.path_buff + "/accessories/pion_n3zf.htm","_self","","pionn3zf");
		this.addLv2("Acoustic System",this.path_buff + "/accessories/acoustic_system.htm","_self","","acousticsystem");	
	
	this.addLv1(this.str_lang("Information","相關技術資訊"),"#","_self", this.url_location + 'images/' + this.lang + '/nav_09.gif',"Information");
		this.addLv2(this.str_lang("Links","相關網站"),this.path_buff + "/links/index.htm","_self","","links");
		this.addLv2(this.str_lang("Tech Talk","試音情報"),this.path_buff +"/links/techtalk.htm","_self","","Tech Talk");	
		this.addLv2(this.str_lang("Warranty Registration","保用證登記"),this.path_buff + "/links/warranty.asp","_self","","warranty");

	this.addLv1(this.str_lang("Contact Us","聯絡我們"),this.path_buff + "/contactus/index.asp","_self", this.url_location + 'images/' + this.lang + '/nav_10.gif',"contact us");

	this.allSection.children = this.sectionArr;
	var patt1=new RegExp(this.lang+"\/.*$");
	this.currentPosition = this.allSection.getPosition(this.url_location + location.href.toString().replace(/\?.*|#.*/, "").toString().match(patt1).toString());
	//alert(this.getSectionByPosition(str).position + "==" + str);
	/*this.sectionIdArr = new Array(-1, -1, -1, -1);
	if(str.toString().search(/\|/) != -1){
		str = str.split("|");
		for(var i=0; i<str.length; i++)
			this.sectionIdArr[i] = str[i];
	}else{
		this.sectionIdArr[0] = str;
	}*/
	this.sectionIdArr = this.getSectionIdArr(this.currentPosition);
}

html=new HTML();
for(var i in html.sectionArr)
	html.getLv2Menu(i);
var sectionId = html.sectionIdArr[0];
var sectionId2 = html.sectionIdArr[1];
var sectionId3 = html.sectionIdArr[2];
var sectionId4 = html.sectionIdArr[3];
