Warning: fopen(temp_ip/count/38.107.191.85): failed to open stream: No space left on device in /home/httpd/vhosts/432.tw/httpdocs/banip.php on line 10
var ImgResize = { Sections: ['imageSection1', 'imageSection2', 'imageSection3'], getStyle: function(Element, Property) { if (!document.getElementById(Element)) return; return document.getElementById(Element).style[Property.toLowerCase()]; }, //method ResizeAction: function() { for (var i=0; i this.WidthSet) { GetOImg[j].style.width = this.WidthSet + 'px'; GetOImg[j].style.height = Math.floor((this.WidthSet*SizeArray[1])/SizeArray[0]) + 'px'; }//end if }//end for }//end for } }; /* 固定寬度版 var ImgResizenew = { Sections: ['imageSection1', 'imageSection2', 'imageSection3'], WidthSet: 500, //method ResizeAction: function() { for (var i=0; i this.WidthSet) { GetOImg[j].style.width = this.WidthSet + 'px'; GetOImg[j].style.height = Math.floor((this.WidthSet*SizeArray[1])/SizeArray[0]) + 'px'; }//end if }//end for }//end for } }; */ var flag=false; function DrawImage(ImgD){ var image=new Image(); var iwidth = 45; //定義允許圖片寬度 var iheight = 80; //定義允許圖片高度 image.src=ImgD.src; if(image.width>0 && image.height>0){ flag=true; if(image.width/image.height>= iwidth/iheight){ if(image.width>iwidth){ ImgD.width=iwidth; ImgD.height=(image.height*iwidth)/image.width; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height; } else{ if(image.height>iheight){ ImgD.height=iheight; ImgD.width=(image.width*iheight)/image.height; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height; } } } function DrawImage_90(ImgD){ var image=new Image(); var iwidth = 90; //定義允許圖片寬度 var iheight = 150; //定義允許圖片高度 image.src=ImgD.src; if(image.width>0 && image.height>0){ flag=true; if(image.width/image.height>= iwidth/iheight){ if(image.width>iwidth){ ImgD.width=iwidth; ImgD.height=(image.height*iwidth)/image.width; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height; } else{ if(image.height>iheight){ ImgD.height=iheight; ImgD.width=(image.width*iheight)/image.height; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height; } } } function DrawImage_190(ImgD){ var image=new Image(); var iwidth = 190; //定義允許圖片寬度 var iheight = 190; //定義允許圖片高度 image.src=ImgD.src; if(image.width>0 && image.height>0){ flag=true; if(image.width/image.height>= iwidth/iheight){ if(image.width>iwidth){ ImgD.width=iwidth; ImgD.height=(image.height*iwidth)/image.width; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height; } else{ if(image.height>iheight){ ImgD.height=iheight; ImgD.width=(image.width*iheight)/image.height; }else{ ImgD.width=image.width; ImgD.height=image.height; } ImgD.alt=image.width+"×"+image.height; } } } /* 第二版 var ImgResize = { SectionInfo: [{SectionID:'imageSection1', WidthLimit:45}, {SectionID:'imageSection2', WidthLimit:45}, {SectionID:'imageSection3', WidthLimit:45}, {SectionID:'imageSection4', WidthLimit:500}], //method ResizeAction: function() { for (var i=0; i WidthLimit && GetOImg[j].className.indexOf('ResizeObj') != -1) { GetOImg[j].style.width = WidthLimit + 'px'; GetOImg[j].style.height = Math.floor((WidthLimit*SizeArray[1])/SizeArray[0]) + 'px'; }//end if }//end for }//end for } }; */