//dividedskymusic.com
//by rich banister
//resizing code lifted from CodeLifter.com


function myPopup(imageURL,imageTitle,w,h){
	controlString="scrollbars=no,width="+w+",height="+h+",left=50,top=50";
	imageWindow = window.open('about:blank','',controlString);
	with(imageWindow.document){
		writeln('<html><head><title>loading image...</title><style>body{margin:0px;}</style>');
		writeln('<sc'+'ript>');
		writeln('var isNN,isIE;');
		writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
		writeln('  isNN=(navigator.appName=="Netscape")?1:0;');
		writeln('  isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');

		writeln('function reSizeToImage(){');
		writeln('  if (isIE){');
		writeln('    window.resizeTo(100,100);');
		writeln('    width=100-(document.body.clientWidth-document.images[0].width);');
		writeln('    height=100-(document.body.clientHeight-document.images[0].height);');
		writeln('    window.resizeTo(width,height);}');
		writeln('  if (isNN){');       
		writeln('    window.innerWidth=document.images["Bob"].width;');
		writeln('    window.innerHeight=document.images["Bob"].height;}');
		writeln('}');

		writeln('function doTitle(){document.title="'+imageTitle+'";}');
		writeln('</sc'+'ript>');
		writeln('</head>');

		writeln('<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="reSizeToImage();doTitle();self.focus()">');
		writeln('<div align="left"><img name="Bob" src='+imageURL+' style="display:block" border=0 alt="'+imageTitle+'"></div>');
		writeln('</body></html>');
		close();
	}
	imageWindow.focus();
}