// JavaScript Document
//函数名称：setNavigation
//功能：设置导航条路经
function setNavigation(sSitepath){
	var oNavigation = document.getElementsByName("navigation");
	
	if(oNavigation[0]!=null){
	oNavigation[0].innerHTML = sSitepath;
	}
}

function openWin(sUrl){
	var sfeather = "height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no"
	window.open(sUrl,"chgVer",sfeather);
}

function chgSiteVer(sLang){
	var sbtUrl;
	sbtUrl = "/Admin/SysManage/ChgLang.asp?toLang=" + sLang;
	showModalDialog(sbtUrl,window,"dialogWidth:1px;dialogHeight:1px;help:no;scroll:no;status:no");
}

//虚拟缩略图处理函数
//按比例缩小
//参数：ImgD--img对象；toWidth--需要缩小到的宽度
function DrawImage(ImgD,toWidth){
	var image=new Image();
	//定义图片宽度常量
	var cntWidth = toWidth;
	
	image.src=ImgD.src;
	iCurWidth = ImgD.width;
	iCurHeight = ImgD.height;
	perScale = iCurWidth/iCurHeight;
	if(image.width>0 && image.height>0){
		if(image.width >= cntWidth){
			 ImgD.width=cntWidth;
			 ImgD.height=cntWidth / perScale;
		 }else{
			 ImgD.width=image.width;  
			 ImgD.height=image.height;
		 }
	}
} 
