function setTitle(label) {document.title = label;}


function addFlash() {

rndm = Math.random();

 document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" WIDTH="100%" HEIGHT="100%" id="album" ALIGN=""><PARAM NAME=movie VALUE="index.swf?rndm='+ rndm +'"> <PARAM NAME=loop VALUE=false> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#F8DF43> <PARAM NAME="flashvars" VALUE="confirm='+confirm+'&v='+version+'"><EMBED src="index.swf?rndm='+ rndm +'" loop=false menu=false quality=high bgcolor=#F8DF43 WIDTH="100%" HEIGHT="100%" flashvars="confirm='+confirm+'&v='+version+'" NAME="album" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>');

}

function donateWin() {
	w = 790;
	h = 640;
	download = download+1;
	x = (screen.width-w)/2;
	y = (screen.height-h)/2;	window._w = window.open("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=rudin@thegreatesthits.net&item_name=BananAlbum","BananAlbum"+download,"status=yes,toolbar=no,resizable=yes,scrollbars=yes,location=yes,menubar=no,left="+x+",top=10,width="+w+",height="+h+"");
}

function licenseWin(amount) {
	w = 790;
	h = 640;
	download = download+1;
	x = (screen.width-w)/2;
	y = (screen.height-h)/2;	window._w = window.open("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=rudin@thegreatesthits.net&item_name=BananAlbum License_&amount="+amount,"License","status=yes,toolbar=no,resizable=yes,scrollbars=yes,location=yes,menubar=no,left="+x+",top=10,width="+w+",height="+h+"");
}

function getLicense() {
	w = 790;
	h = 640;
	download = download+1;
	x = (screen.width-w)/2;
	y = (screen.height-h)/2;	window._w = window.open("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=rudin%40thegreatesthits%2enet&item_name=BananAlbum%20License__&amount=20%2e00&no_shipping=2&no_note=1&currency_code=USD&lc=US&bn=PP%2dBuyNowBF&charset=UTF%2d8","License","status=yes,toolbar=no,resizable=yes,scrollbars=yes,location=yes,menubar=no,width="+w+",height="+h+"");
}

function getUpdate() {
	w = 790;
	h = 640;
	download = download+1;
	x = (screen.width-w)/2;
	y = (screen.height-h)/2;	window._w = window.open("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=rudin%40thegreatesthits%2enet&item_name=BananAlbum%20License%20Update&amount=10%2e00&no_shipping=2&no_note=1&currency_code=USD&lc=US&bn=PP%2dBuyNowBF&charset=UTF%2d8","License","status=yes,toolbar=no,resizable=yes,scrollbars=yes,location=yes,menubar=no,width="+w+",height="+h+"");
}

function sample(number) {
	w = screen.width-100;
	h = screen.height-140;
	download = download+1;
	x = (screen.width-w)/2;
	y = (screen.height-h)/2;	window._w = window.open("samples/"+number+"/index.html","Sample","status=yes,toolbar=no,resizable=yes,scrollbars=no,location=no,menubar=no,left="+x+",top="+y+",width="+w+",height="+h+"");
}

download = 0;
function downloadWin(theURL,winName,features) {
	image = theURL;
	w = 240;
	h = 180;
	download = download+1;
	border = 36;
	x = (screen.width-w)/2;
	y = (screen.height-h)/2;	window._w = window.open("res/download.html?image="+theURL,"BananAlbum"+download,"status=no,toolbar=no,resizable=no,scrollbars=no,location=no,menubar=no,left="+x+",top="+y+",width="+w+",height="+h+"");
	window._w.image = theURL;
}
function resizeWin(image) {
		var detect = navigator.userAgent.toLowerCase();
		correctW = 8;
		correctH = screen.height-screen.availHeight;
		if (image.width<screen.availWidth && image.height<screen.availHeight) {
			newWidth = image.width;
			newHeight = image.height;
		} else {
			screenWH = screen.availWidth/(screen.availHeight-correctH);
			imageWH = image.width/image.height;
			if (screenWH>imageWH) {
				// use height...
				newHeight = screen.availHeight-border-correctH;
				newWidth = newHeight*imageWH;
			} else {
				// use width...
				newWidth = screen.availWidth-border;
				newHeight = newWidth/imageWH;
			}
		}
	if (document.all) {								// IE
		if (navigator.appVersion.indexOf("Mac")>-1){
			window._w.moveTo((screen.width-newWidth)/2,(screen.height-newHeight)/2-correctH);
			window._w.resizeTo(newWidth,newHeight-1);
		} else {
			window._w.moveTo((screen.width-newWidth)/2,(screen.height-newHeight-correctH)/2);
			window._w.resizeTo(newWidth+correctW,newHeight+correctH);
		}
	} else {										// Mozilla
		if (navigator.appVersion.indexOf("Mac")>-1){
			if (detect.indexOf("safari")>-1) {
				window._w.moveTo((screen.width-newWidth)/2,(screen.height-newHeight)/2);
				window._w.resizeTo(newWidth,newHeight+correctH);
			} else {
				window._w.moveTo((screen.width-newWidth)/2,(screen.height-newHeight)/2-correctH);
				window._w.resizeTo(newWidth+correctW,newHeight);
				// one more time for FireFox!
				window._w.moveTo((screen.width-newWidth)/2,(screen.height-newHeight)/2-correctH);
			}
		} else {
			window._w.moveTo((screen.width-newWidth)/2,(screen.height-newHeight+correctH)/2-correctH);
			window._w.resizeTo(newWidth+correctW,newHeight+correctH);
		}
	}
}
function showDiv() {
	document.getElementById('imgShow').style.visibility="visible";
}
