if (top.location !== self.location) {
top.location=self.location;
}

var flag=false; 

//将图片按宽度进行缩放
function DrawImage(ImgD,intWidth){ 
	var image=new Image(); 
	image.src=ImgD.src; 
	if(image.width>intWidth){
		ImgD.width=intWidth; 
		ImgD.height=(image.height*intWidth)/image.width; 
	}else{ 
		ImgD.width=image.width;
		ImgD.height=image.height; 
	} 
} 

//将图片处理为正方形
function DrawImageSquare(ImgD,intWidth){ 
	var image=new Image(); 
	image.src=ImgD.src; 
	ImgD.width=intWidth;
	ImgD.height=intWidth;
} 

//预先载入图片，调用格式<body onLoad=MM_preloadImages('图片名','图片名','图片名') >
function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}