
function PopUp(url, name, width, height){

	var myImg = new Image();
	myImg.src = url;
	var imgWidth;
	var imgHeight;

	if(width == undefined){

		if(navigator.userAgent.indexOf("Mac") != -1){

			imgWidth = myImg.width;
			imgHeight = myImg.height;
		}else{

			imgWidth = myImg.width+40;
			imgHeight = myImg.height+40;
		}
	}else{

		imgWidth = width;
		imgHeight = height;
	}

	window.open(url, name, "width="+imgWidth+", height="+imgHeight+",status=no,scrollbars=yes,directories=no,menubar=no,resizable=yes,toolbar=no");
}
