﻿//显示弹出的层
function smallnav(v){	   
	 for(var i=0;i<7;i++){
		  if(i==v){	document.getElementById("snav"+i).style.display="block";}//显示当前
		  else{	document.getElementById("snav"+i).style.display="none";}//隐藏其他
	 } 
}
//设置当前状态
function PreNav(v){
	for(var i=1;i<8;i++){
	  if(i==v){document.getElementById("nav"+i).className="navline2";}
	  else{ document.getElementById("nav"+i).className="navline";}
	}
}

//隐藏弹出的层
function hnav(ts){	
	 ts.getElementsByTagName("ul")[0].style.display="none";//通过DOm的子 ul 标签控制隐藏
}

//var flag = false;
//function DrawImage(ImgD) {
//    var image = new Image();
//    image.src = ImgD.src;
//    if (image.width > 0 && image.height > 0) {
//        flag = true;
//        if (image.width / image.height >= 360 / 270) {
//            if (image.width > 360) {
//                ImgD.width = 360;
//                ImgD.height = (image.height * 360) / image.width;
//            } else {
//                ImgD.width = image.width;
//                ImgD.height = image.height;
//            }
//            ImgD.alt = image.width + "x" + image.height;
//        } else {
//            if (image.height > 270) {
//                ImgD.height = 270;
//                ImgD.width = (image.width * 270) / image.height;
//            } else {
//                ImgD.width = image.width;
//                ImgD.height = image.height;
//            }
//            ImgD.alt = image.width + "x" + image.height;
//        }
//    }
//}

function SetImgUrl(src) {
    //alert(src);
    if (document.getElementById("Max_Img").src != src) {
        document.getElementById("Max_Img").src = src;
    }
    //document.getElementById("Max_Img").src = document.getElementById(obj.toString()).src;
}
