﻿// JScript 文件
//重设图片高宽,调用方式onload="DrawImage(this,300,400)"
function DrawImage(ImgD,maxWidth, maxHeight)
{
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0)
{
   if(image.width>=maxWidth)
     { 
         ImgD.width=maxWidth;
         image.height=(image.height*maxWidth)/image.width;
      }
      else
      {
          ImgD.width=image.width;
         if(image.height>maxHeight)
           {
             alert(image.height)
             alert("ddd");
              ImgD.height=(maxHeight*image.width)/maxWidth;
           }
        }
  }
   delete image;   
}

var step =30;
var tempint=150;
var tempint2=0;
function rollnext(){
	if(document.getElementById("proccc").scrollLeft<920){
		tempint2=150;
		while(tempint2>0){
		document.getElementById("proccc").scrollLeft = document.getElementById("proccc").scrollLeft+5;
		tempint2=tempint2-5;
	}
}
}
function rollprev(){
	
	if(document.getElementById("proccc").scrollLeft>0){
		tempint=150;
		while(tempint>0){
		document.getElementById("proccc").scrollLeft = document.getElementById("proccc").scrollLeft-5;
		tempint=tempint-5;
	}	
	}
}