/*function viewSection(vID){
	var tabObj,sctObj,i,imgSrc,tmpObj;
	for (i=1;i<=12;i++){
		//sctObj = "sctCont"+i;
		tabObj = "sctTab"+i;
		if (document.getElementById(tabObj)){
			tmpObj = document.getElementById(tabObj);
			imgSrc = tmpObj.src;									
			if (vID==i){
				tmpObj.src = imgSrc.replace("Off.jpg","On.jpg")
				//showPageObj(sctObj);
			}
			else
			{
				tmpObj.src = imgSrc.replace("On.jpg","Off.jpg")
				//hidePageObj(sctObj);
			}
		}
	}		
}*/
//ajax 读取产品的详细信息 函数 /////////////////////////////////////////////////////////
    var http_request = false;
	var currentPos = null;
	
	function send_request(url) {//初始化、指定处理函数、发送请求的函数
		http_request = false;
		//开始初始化XMLHttpRequest对象
		if(window.XMLHttpRequest) { //Mozilla 浏览器
			http_request = new XMLHttpRequest();
			if (http_request.overrideMimeType) {//设置MiME类别
				http_request.overrideMimeType('text/xml');
			}
		}
		else if (window.ActiveXObject) { // IE浏览器
			try {
				http_request = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					http_request = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {}
			}
		}
		if (!http_request) { // 异常，创建对象实例失败
			window.alert("不能创建XMLHttpRequest对象实例.");
			return false;
		}
		http_request.onreadystatechange = processRequest;
		// 确定发送请求的方式和URL以及是否同步执行下段代码
		http_request.open("GET", url, true);
		http_request.send(null);
	}
	// 处理返回信息的函数
    function processRequest() {
        if (http_request.readyState == 4) { // 判断对象状态
            if (http_request.status == 200) { // 信息已经成功返回，开始处理信息
                //alert(http_request.responseText);
				//alert(http_request.responseText);
				document.getElementById(currentPos).innerHTML = http_request.responseText;
            } else { //页面不正常
                alert("您所请求的页面有异常。");
            }
        }
    }
	//显示xiang
function showDetail(vID,pid) {
	document.getElementById("detal_show").parentNode.style.display = "";
	document.getElementById("detal_show").innerHTML = "正在读取数据..."
	currentPos = "detal_show";
	send_request("sendpage.php?pid="+pid+"&Did="+vID);
	var tabObj,sctObj,i,imgSrc,tmpObj;
	//alert("fdsafdsa");
	for (i=1;i<=6;i++){
		//sctObj = "sctCont"+i;
		tabObj = "sctTab"+i;
		//alert(document.getElementById(tabObj));
		if (document.getElementById(tabObj)){
			tmpObj = document.getElementById(tabObj);
			//imgSrc = tmpObj.src;	
			//tmpObj.style.backgroundcolor ="#000000";
			if (vID==i){
				tmpObj.className ="detailon";
				tmpObj.disabled = "true";
				//tmpObj.readOnly ="true";
				//tmpObj = NULL;
				
				//showPageObj(sctObj);
			}
			else
			{
				tmpObj.className ="detail";
				tmpObj.disabled = false;
				
				//hidePageObj(sctObj);
			}
		}
	}		
}

// End Ajax 读取产品的详细信息//////////////////////////////////////////////////////////
function showPageObj(item)
{
	obj = document.getElementById(item);
	obj.style.display = 'block';	
}

function hidePageObj(item)
{
	obj = document.getElementById(item);
	obj.style.display = 'none';	
}

function extend(obj) {
	if (document.getElementById(obj).style.display == "none") {
		document.getElementById(obj).style.display = "block";
	} else {
		document.getElementById(obj).style.display = "none";
	}
}



// nTabs   //////////////////////////////////////////////////////////
function nTabs(thisObj,Num){
if(thisObj.className == "active")return;
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++)
{
  if (i == Num)
  {
   thisObj.className = "active"; 
      document.getElementById(tabObj+"_Content"+i).style.display = "block";
  }else{
	if (tabList[i].className !="normal_end")
	{
		//document.getElementById(tabObj+"_Content"+i).style.display = "block";
	
   tabList[i].className = "normal"; 
   document.getElementById(tabObj+"_Content"+i).style.display = "none";
	}
  }
} 
}



var baseopacity=0

function showtext(thetext){
if (!document.getElementById)
return
textcontainerobj=document.getElementById("tabledescription")
browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
document.getElementById("tabledescription").innerHTML=thetext
highlighting=setInterval("gradualfade(textcontainerobj)",50)
}

function hidetext(){
cleartimer()
instantset(baseopacity)
}

function instantset(degree){
if (browserdetect=="mozilla")
textcontainerobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
textcontainerobj.filters.alpha.opacity=degree
else if (document.getElementById && baseopacity==0)
document.getElementById("tabledescription").innerHTML=""
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.2, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=20
else if (window.highlighting)
clearInterval(highlighting)
}
