function detectImageSize(url, name){
      var image = new Image();
      image.src = url;
		
      newWindow=window.open(url + 'target=originalphoto','', 'toolbar=no, left=200, top=200; width=' + image.width + ',height=' + image.height);
      newWindow.document.write('<html><head><title>'+name+'<\/title><\/head><body background="'+url+'"><\/body><\/html>');
      newWindow.resizeBy(picName.width-newWindow.document.body.clientWidth, image.height-newWindow.document.body.clientHeight);
      newWindow.focus();
}

function preload(url){
	image = new Image();
	image.src = url;
}

