﻿function tech(type)
{
var td=document.getElementById("tech"+type);
td.style.background="white";
td.style.fontWeight="bold";
var td1=document.getElementById("tech1");
var td2=document.getElementById("tech2");
var td3=document.getElementById("tech3");
var td4=document.getElementById("tech4");
var td5=document.getElementById("tech5");
if(type=="1")
{
td2.style.background="url(Images/beijing2.gif)";
td2.style.fontWeight="";
td3.style.background="url(Images/beijing2.gif)";
td3.style.fontWeight="";
td4.style.background="url(Images/beijing2.gif)";
td4.style.fontWeight="";
td5.style.background="url(Images/beijing2.gif)";
td5.style.fontWeight="";
}
else if(type=="2")
{
td1.style.background="url(Images/beijing2.gif)";
td1.style.fontWeight="";
td3.style.background="url(Images/beijing2.gif)";
td3.style.fontWeight="";
td4.style.background="url(Images/beijing2.gif)";
td4.style.fontWeight="";
td5.style.background="url(Images/beijing2.gif)";
td5.style.fontWeight="";
}
else if(type=="3")
{
td2.style.background="url(Images/beijing2.gif)";
td2.style.fontWeight="";
td1.style.background="url(Images/beijing2.gif)";
td1.style.fontWeight="";
td4.style.background="url(Images/beijing2.gif)";
td4.style.fontWeight="";
td5.style.background="url(Images/beijing2.gif)";
td5.style.fontWeight="";
}
else if(type=="4")
{
td2.style.background="url(Images/beijing2.gif)";
td2.style.fontWeight="";
td3.style.background="url(Images/beijing2.gif)";
td3.style.fontWeight="";
td1.style.background="url(Images/beijing2.gif)";
td1.style.fontWeight="";
td5.style.background="url(Images/beijing2.gif)";
td5.style.fontWeight="";
}
else
{
td2.style.background="url(Images/beijing2.gif)";
td2.style.fontWeight="";
td3.style.background="url(Images/beijing2.gif)";
td3.style.fontWeight="";
td4.style.background="url(Images/beijing2.gif)";
td4.style.fontWeight="";
td1.style.background="url(Images/beijing2.gif)";
td1.style.fontWeight="";

}
PageMethods.initTech(type,initTech);


}



function initTech(result)
{
for(var j=0;j<10;j++)
{
document.getElementById("t"+j).innerHTML="";

}
if(result!="")
{

var res= eval('(' + result + ')');
var count;
if(res.length>10)
count=10
else
 count=res.length;
for(var i=0;i<count;i++)
{
document.getElementById("t"+i).innerHTML="<a href=TechnologyDetail.aspx?id="+res[i].id+" style='cursor:hand' target='_blank'>"+ res[i].title+"</a>";

}
}
}



function initDefaultTech(result)
{
for(var j=0;j<10;j++)
{
document.getElementById("t"+j).innerHTML="";

}
if(result!="")
{

var res= eval(result);
for(var i=0;i<res.length;i++)
{

document.getElementById("t"+i).innerHTML="<a href=TechnologyDetail.aspx?id="+res[i].id+" style='cursor:hand' target='_blank' >"+ res[i].title+"</a>";


}

}
}



function news(type)
{
 
 var n1=document.getElementById("n1");
 var n2=document.getElementById("n2");
 var news1=document.getElementById("news1");
 var news2=document.getElementById("news2");
 if(type=="1")
 {
 n1.style.display="";
 n2.style.display="none";
 news1.style.background="white";
 news1.style.fontWeight="bold";
 news2.style.background="url(Images/beijing2.gif)";
 news2.style.fontWeight="";
 
 }
else
{
 n1.style.display="none";
 n2.style.display="";
 news2.style.background="white";
 news2.style.fontWeight="bold";
 news1.style.background="url(Images/beijing2.gif)";
 news1.style.fontWeight="";
}

}


function setImage(s)
{
var json1= eval(s);
for(var i=0;i<json1.length;i++)
{
document.getElementById("img"+json1[i].id).src=json1[i].pic;
document.getElementById("imga"+json1[i].id).href=json1[i].link;
}

}

 
 
function society(type)
{

var td=document.getElementById("society"+type);
td.style.background="white";
td.style.fontWeight="bold";
var td1=document.getElementById("society1");
var td2=document.getElementById("society2");
var td3=document.getElementById("society3");
var td4=document.getElementById("society4");
var td5=document.getElementById("society5");
var t1=document.getElementById("s1");
var t2=document.getElementById("s2");
var t3=document.getElementById("s3");
var t4=document.getElementById("s4");
var t5=document.getElementById("s5");
if(type=="1")
{
td2.style.background="url(Images/beijing5.gif)";
td2.style.fontWeight="";
td3.style.background="url(Images/beijing5.gif)";
td3.style.fontWeight="";
td4.style.background="url(Images/beijing5.gif)";
td4.style.fontWeight="";
td5.style.background="url(Images/beijing5.gif)";
td5.style.fontWeight="";
t1.style.display="";
t2.style.display="none";
t3.style.display="none";
t4.style.display="none";
t5.style.display="none";

}
else if(type=="2")
{
td1.style.background="url(Images/beijing5.gif)";
td1.style.fontWeight="";
td3.style.background="url(Images/beijing5.gif)";
td3.style.fontWeight="";
td4.style.background="url(Images/beijing5.gif)";
td4.style.fontWeight="";
td5.style.background="url(Images/beijing5.gif)";
td5.style.fontWeight="";
t1.style.display="none";
t2.style.display="";
t3.style.display="none";
t4.style.display="none";
t5.style.display="none";
}
else if(type=="3")
{
td2.style.background="url(Images/beijing5.gif)";
td2.style.fontWeight="";
td1.style.background="url(Images/beijing5.gif)";
td1.style.fontWeight="";
td4.style.background="url(Images/beijing5.gif)";
td4.style.fontWeight="";
td5.style.background="url(Images/beijing5.gif)";
td5.style.fontWeight="";
t1.style.display="none";
t2.style.display="none";
t3.style.display="";
t4.style.display="none";
t5.style.display="none";
}
else if(type=="4")
{
td2.style.background="url(Images/beijing5.gif)";
td2.style.fontWeight="";
td3.style.background="url(Images/beijing5.gif)";
td3.style.fontWeight="";
td1.style.background="url(Images/beijing5.gif)";
td1.style.fontWeight="";
td5.style.background="url(Images/beijing5.gif)";
td5.style.fontWeight="";
t1.style.display="none";
t2.style.display="none";
t3.style.display="none";
t4.style.display="";
t5.style.display="none";

}
else
{
td2.style.background="url(Images/beijing5.gif)";
td2.style.fontWeight="";
td3.style.background="url(Images/beijing5.gif)";
td3.style.fontWeight="";
td4.style.background="url(Images/beijing5.gif)";
td4.style.fontWeight="";
td1.style.background="url(Images/beijing5.gif)";
td1.style.fontWeight="";
t1.style.display="none";
t2.style.display="none";
t3.style.display="none";
t4.style.display="none";
t5.style.display="";
}
}

function techGo(type)
{
window.location='TechnologyList.aspx?type='+type;

}



