// JavaScript Document


//导航栏
function showNav(n)
{
	for(var i=1;i<=10;i++)
	{	
		if(document.getElementById("nb"+i).className!="sel")
		{
			document.getElementById("nb"+i).className="unsel"
		}
		document.getElementById("ns"+i).style.display="none";
	}
	if(document.getElementById("nb"+n).className!="sel")
	{
		document.getElementById("nb"+n).className="onsel"
	}
	document.getElementById("ns"+n).style.display="";
}

function showNav2(n)
{
	for(var i=1;i<=10;i++)
	{
		document.getElementById("nb"+i).className="unsel"
		document.getElementById("ns"+i).style.display="none";
	}
	document.getElementById("nb"+n).className="sel"
	document.getElementById("ns"+n).style.display="";
}

//导航栏

function showNav3(n)
{
	for(var i=1;i<=7;i++)
	{
		document.getElementById("ss"+i).className="nc1"
	}
	document.getElementById("ss"+n).className="nc2"
}

function Tab(Xname,Cname,Lenght,j) 
//参数1(不含123的按钮ID),参数2(不含123的框架ID),数组总个数+1(因为循环时用了小于号),当前数组元素
{
	for(i=1;i<Lenght;i++)  //变换CSS
		{
			document.getElementById(Xname+i).className="n2"
		}
	document.getElementById(Xname+j).className="n1"
	for(i=1;i<Lenght;i++)  //隐现框架
		{
			document.getElementById(Cname+i).style.display="none"
		}
		document.getElementById(Cname+j).style.display="block"
}

function Tab2(Xname,Cname,Lenght,j) 
//参数1(不含123的按钮ID),参数2(不含123的框架ID),数组总个数+1(因为循环时用了小于号),当前数组元素
{
	for(i=1;i<Lenght;i++)  //隐现框架
		{
			document.getElementById(Cname+i).style.display="none"
		}
		document.getElementById(Cname+j).style.display="block"
}



//图片缩放
function DrawImage(ImgD,FitWidth,FitHeight){ 
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
if(image.width/image.height>= FitWidth/FitHeight){
if(image.width>FitWidth){
ImgD.width=FitWidth;
ImgD.height=(image.height*FitWidth)/image.width;
}
else{
ImgD.width=image.width;
ImgD.height=image.height;
} 
} 
else{
if(image.height>FitHeight){
ImgD.height=FitHeight;
ImgD.width=(image.width*FitHeight)/image.height;
}
else{
ImgD.width=image.width;
ImgD.height=image.height;
} 
} 
}
} 




//注册VIP
function getVIP(){
alert('您目前还不是VIP会员，请申请成为VIP会员后再使用此功能！');
location.href='VIP.asp';
}
function getConstruction(){
alert('抱歉，此项目正在建设中，暂时未能使用！');
return false; 
}

