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>= 100/100){ 
if(image.width>100){ 
ImgD.width=100; 
ImgD.height=(image.height*100)/image.width; 
}else{ 
ImgD.width=image.width; 
ImgD.height=image.height; 
} 
} 
else{ 
if(image.height>100){ 
ImgD.height=100; 
ImgD.width=(image.width*100)/image.height; 
}else{ 
ImgD.width=image.width; 
ImgD.height=image.height; 
} 
} 
} 
} 
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
var flag=false; 
function ZDZ(ImgD){ 
var image=new Image(); 
image.src=ImgD.src; 
if(image.width>0 && image.height>0){ 
flag=true; 
if(image.width/image.height>= 600/480){ 
if(image.width>164){ 
ImgD.width=600; 
ImgD.height=(image.height*600)/image.width;} 
else 
{ImgD.width=image.width; 
ImgD.height=image.height;} 
ImgD.alt=image.width+"x"+image.height;} 
else{ 
if(image.height>480){ 
ImgD.height=480; 
ImgD.width=(image.width*480)/image.height;} 
else 
{ImgD.width=image.width; 
ImgD.height=image.height;} 
ImgD.alt=image.width+"x"+image.height;}}} 
//--> 
window.onload = function() { 
    //遍历文档中的图片 
    for (var index = 0; index < document.images.length; index++) { 
        //定义要限制的图片宽高 
        var widthRestriction = 600; 
        var heightRestriction = 480; 
        //开始调整尺寸 
        if (document.images[index].width > widthRestriction) { 
            document.images[index].width = widthRestriction; 
            //注册事件，点击在新窗口打开原图 
            document.images[index].onclick = function() {window.open(this.src)}; 
            document.images[index].title = document.images[index].title + ' 点击在新窗口中查看原图'; 
        } 
        else if (document.images[index].height > heightRestriction) { 
            document.images[index].height = heightRestriction; 
        } 
    } 
} 
