Lang = new Array();
Lang[0] = new Array("English", "French", "German", "Italian", "Spanish", "Russian", "Japanese", "china");
Lang[1] = new Array("English", "French", "German", "Italian", "Spanish", "Russian", "Japanese", "china");
Lang[2] = new Array("English", "French", "German", "Italian", "Spanish", "Russian", "Japanese", "china");
Lang[3] = new Array("English", "French", "German", "Italian", "Spanish", "Russian", "Japanese", "china");
Lang[4] = new Array("English", "French", "German", "Italian", "Spanish", "Russian", "Japanese", "china");
Lang[5] = new Array("English", "French", "German", "Italian", "Spanish", "Russian", "Japanese", "china");
Lang[6] = new Array("English", "French", "German", "Italian", "Spanish", "Russian", "Japanese", "china");
Lang[7] = new Array("英文", "法文", "德文", "意大利文", "西班牙文", "俄罗斯文", "日文", "中文");

contentText = new Array();
contentText[0] = new Array("Please select your product type first, then family, then model, and click submit.", "Submit", "Please Select a platform", "Please Select a product", "Please Select a product type");
contentText[1] = new Array("Please select your product type first, then family, then model, and click submit.", "Submit", "Please Select a platform", "Please Select a product", "Please Select a product type");
contentText[2] = new Array("Please select your product type first, then family, then model, and click submit.", "Submit", "Please Select a platform", "Please Select a product", "Please Select a product type");
contentText[3] = new Array("Please select your product type first, then family, then model, and click submit.", "Submit", "Please Select a platform", "Please Select a product", "Please Select a product type");
contentText[4] = new Array("Please select your product type first, then family, then model, and click submit.", "Submit", "Please Select a platform", "Please Select a product", "Please Select a product type");
contentText[5] = new Array("Please select your product type first, then family, then model, and click submit.", "Submit", "Please Select a platform", "Please Select a product", "Please Select a product type");
contentText[6] = new Array("Please select your product type first, then family, then model, and click submit.", "Submit", "Please Select a platform", "Please Select a product", "Please Select a product type");
contentText[7] = new Array("请首先选择产品类型，然后是系列和具体型号，最后点击提交。", "提 交", "请选择系列", "请选择产品", "请选择产品类别");

PC_Category = new Array();
PC_CategoryVal = new Array("Enclosures", "Media Components", "Power Supplies", "Cooling", "Accessories", "Discontinued");
PC_Category[0] = new Array("Enclosure", "Media Components", "Power Supplies", "Cooling", "Accessories", "Discontinued");
PC_Category[1] = new Array("Enclosure", "Media Components", "Power Supplies", "Cooling", "Accessories", "Discontinued");
PC_Category[2] = new Array("Enclosure", "Media Components", "Power Supplies", "Cooling", "Accessories", "Discontinued");
PC_Category[3] = new Array("Enclosure", "Media Components", "Power Supplies", "Cooling", "Accessories", "Discontinued");
PC_Category[4] = new Array("Enclosure", "Media Components", "Power Supplies", "Cooling", "Accessories", "Discontinued");
PC_Category[5] = new Array("Enclosure", "Media Components", "Power Supplies", "Cooling", "Accessories", "Discontinued");
PC_Category[6] = new Array("Enclosure", "Media Components", "Power Supplies", "Cooling", "Accessories", "Discontinued");
PC_Category[7] = new Array("机箱", "多媒体电脑", "电源供应器", "风扇系列", "附件", "停产产品");

function getLung(lanValue)
{

	//var contentnum = contentText[0].length;
	var lanText = "";
	var lannum = Lang[lanValue].length;
	var Family = document.getElementById("Family");
	var product = document.getElementById("product");
	
	for(j=0;j<lannum;j++){
		

		if(lanText==""){
			lanText += "<span onclick='getLung("+j+")' class='hand'>"+Lang[lanValue][j]+"</span>";
			}else{
				lanText += " | <span onclick='getLung("+j+")' class='hand'>"+Lang[lanValue][j]+"</span>";
			}
		
	}
		document.getElementById("Text1").innerHTML=lanText;
		document.getElementById("Text2").innerHTML=contentText[lanValue][0];
		document.getElementById("Text3").value=contentText[lanValue][1];
		document.getElementById("SetLung").value=lanValue
		showCategory(lanValue);
		Family.options.length=0;
		product.options.length=0;
		 manual.innerHTML = "";
	
}






var name;
name = document.getElementById("SetLung");
//lanValue = name.options[name.selectedIndex].value;
lanValue = name.value;
//alert(Lang[lanValue].length);
//var countshu = Lang[lanValue].length;
getLung(lanValue);
showCategory(lanValue);
function showCategory(lanValue)
{
	Category = document.getElementById("Text8");
	var Categoryshu = PC_Category[lanValue].length;
	for(n=0; n<Categoryshu; n++)
	{
		Category.options[n]= new Option(PC_Category[lanValue][n], PC_CategoryVal[n]);
	}
}


function getpromanual(){
 var LungShow = document.getElementById("SetLung").value;	 
 var proname = document.getElementById("product").value;
	 if(selectproduct(LungShow))
	 {
			 document.getElementById("manual").innerHTML = '<iframe frameborder="0" scrolling="no" style="margin-left:14px; margin-top:31px; clear:both; width:765px; height:100px;" src="manual.php?pro='+proname+'&lug='+LungShow+'"></iframe>';
 
	}

}
function selectproduct(lungvalue){

		 if (document.getElementById("Family").options.length < 1) {
			document.getElementById("Family").options.length = 0;
			alert(contentText[lungvalue][2]);
			return false;
		}
		/* Check for product type is Selected - if not, alert and return */
		if (document.getElementById("Family").options.selectedIndex < 0) {
			alert(contentText[lungvalue][4]);
			return false;
		}
		if (document.getElementById("product").options.selectedIndex == -1) {
			alert(contentText[lungvalue][3]);
			return false;
		}
		

return true;
	}
