function preloadImages(){
	if(document.images){
		if(!document.imageArray) document.imageArray = new Array();
		var i,j = document.imageArray.length, args = preloadImages.arguments;
		for(i=0; i<args.length; i++){
			if (args[i].indexOf("#")!=0){
				document.imageArray[j] = new Image;
				document.imageArray[j++].src = args[i];
			}
		}
	}
}
function switchImage(imgName, imgSrc){
	if (document.images){
		if (imgSrc != "none"){
			imgName.src = imgSrc;
		}
	}
}
function DrawImage(ImgD,xx,yy){
	varflag=false;
	var image=new Image();
	image.src=ImgD.src;
	if(image.width>0&&image.height>0){
		flag=true;
		if(image.width/image.height>=xx/yy){
			if(image.width>xx){
				ImgD.width=xx;
				ImgD.height=(image.height*xx)/image.width;
			}else{
				ImgD.width=image.width;
				ImgD.height=image.height;
			}
			ImgD.alt="Click for big picture...";
		}
		else{
			if(image.height>yy){
				ImgD.height=yy;
				ImgD.width=(image.width*yy)/image.height;
			}else{
				ImgD.width=image.width;
				ImgD.height=image.height;
			}
			ImgD.alt="Click for big picture...";
			ImgD.Border="1";
		}
	}
}