// JavaScript Document
    
	//choose css by resolution 
	if (screen.width == 1024)
		 document.getElementsByTagName("link")[0].href = "css/global1024.css";
	 
	function FirmwareListShow(){
		document.getElementById("FirmwareList").style.display = "inline";
	}
	function FirmwareListShow02(){
		document.getElementById("FirmwareList02").style.display = "inline";
	}

//用來紀錄作用中頁籤的ID 預設是第一個頁籤
	var currentLayer = "cell1";
	//用來紀錄作用中頁籤的頁面ID 預設是第一個頁面
	var currentDiv = "d1";
	//showLayer()函式，參數為觸發該函式的元素及所屬頁面ID
	function showLayer(obj,div){
		//若目前的currentLayer不等於obj.id 表示要換頁面
		if(currentLayer!=obj.id) {
			//先改變上一個頁籤及頁面的樣式
			showIt(currentLayer,currentDiv,false);
			//重設currentLayer及currentDiv的值
			currentLayer = obj.id;
			currentDiv = div;
			//最後再改變目前頁籤及頁面的樣式
			showIt(currentLayer,currentDiv,true);
		}
	}
	//showIt()函式，參數為currentLayer、currentDiv及模式
	//mode為true時 則表示目前作用中 所以要顯示
	//mode為false時 則表示目前非作用中 所以要隱藏
	function showIt(o,d,mode){
		var obj = document.getElementById(o);
		var div = document.getElementById(d);
		//改變className則表示改變該元素所用的class
		obj.className = mode?"active":"inactive";
		div.style.display = mode?"block":"none";
	}

	//Product Tour Video
	function showEnglishVideo(){
		window.open('ProductVideo_Product_EN.html','ProductVideo','width=445,height=445,toolbar=no,menubar=no,scrollbars=no,resizable=no,screenX=500,screenY=500');
	}
	function showChineseVideo(){
		window.open('ProductVideo_Product_CH.html','ProductVideo','width=445,height=445,toolbar=no,menubar=no,scrollbars=no,resizable=no,screenX=100,screenY=100');
	}
	function showNASEnglishVideo(){
		window.open('ProductVideo_NAS_EN.html','ProductVideo','width=445,height=445,toolbar=no,menubar=no,scrollbars=no,resizable=no,screenX=100,screenY=100');
	}
	function showNASChineseVideo(){
		window.open('ProductVideo_NAS_CH.html','ProductVideo','width=445,height=445,toolbar=no,menubar=no,scrollbars=no,resizable=no,screenX=100,screenY=100');
	}
	
	
	//Product Tour Video02(test loadding speed)
	function showEnglishVideo02(){
		window.open('ProductVideo_Product_EN02.html','ProductVideo','width=320,height=325,toolbar=no,menubar=no,scrollbars=no,resizable=no,screenX=500,screenY=500');
	}
	function showChineseVideo02(){
		window.open('ProductVideo_Product_CH02.html','ProductVideo','width=320,height=325,toolbar=no,menubar=no,scrollbars=no,resizable=no,screenX=100,screenY=100');
	}
	function showNASEnglishVideo02(){
		window.open('ProductVideo_NAS_EN02.html','ProductVideo','width=320,height=325,toolbar=no,menubar=no,scrollbars=no,resizable=no,screenX=100,screenY=100');
	}
	function showNASChineseVideo02(){
		window.open('ProductVideo_NAS_CH02.html','ProductVideo','width=320,height=325,toolbar=no,menubar=no,scrollbars=no,resizable=no,screenX=100,screenY=100');
	}
	
	//main navigation onfocus status
	function mainnavOnfocus(){
		filename = document.getElementByID("function").value; 
		switch(filename){
			case "1":
			document.all["nav01"].src="image/nav01focus.gif";break;
			case "2":
			document.all["nav02"].src="image/nav02focus.gif";break;
			 
		}
	}
	function ImgSrc01(VALUE){
		if(document.getElementById){
		   document.getElementById("nav01").setAttribute("src",VALUE);
		}
		else{
			if(document.all){
			document.all("nav01").setAttribute("src",VALUE);
		}
	}
		
	}
	function ImgSrc02(VALUE){
		if(document.getElementById){
		   document.getElementById("nav02").setAttribute("src",VALUE);
		}
		else{
			if(document.all){
			document.all("nav02").setAttribute("src",VALUE);
		}
	}
		
	}
	function ImgSrc03(VALUE){
		if(document.getElementById){
		   document.getElementById("nav03").setAttribute("src",VALUE);
		}
		else{
			if(document.all){
			document.all("nav03").setAttribute("src",VALUE);
		}
	}
		
	}
	function ImgSrc04(VALUE){
		if(document.getElementById){
		   document.getElementById("nav04").setAttribute("src",VALUE);
		}
		else{
			if(document.all){
			document.all("nav04").setAttribute("src",VALUE);
		}
	}
		
	}
	function ImgSrc05(VALUE){
		if(document.getElementById){
		   document.getElementById("nav05").setAttribute("src",VALUE);
		}
		else{
			if(document.all){
			document.all("nav05").setAttribute("src",VALUE);
		}
	}
		
	}
	function ImgSrc06(VALUE){
		if(document.getElementById){
		   document.getElementById("nav06").setAttribute("src",VALUE);
		}
		else{
			if(document.all){
			document.all("nav06").setAttribute("src",VALUE);
		}
	}
		
	}