var qs=location.search.substring(1);
var nv=qs.split('&');
var url=new Object();
for(i=0;i < nv.length;i++){
	eq=nv[i].indexOf('=');
	url[nv[i].substring(0,eq).toLowerCase()]=unescape(nv[i].substring(eq+1))
}

function togglePic() {
	if (!document.getElementById('photoFrame').style.display || document.getElementById('photoFrame').style.display == "none") {
		document.getElementById('photoFrame').style.display = "block";
	}
	else {
		document.getElementById('photoFrame').style.display = "none";
		document.getElementById('thePhotoInQuestion').src = 'images/whirlygig.gif';
		//document.getElementById('thePhotoInQuestion').border = '0';
	}
}

function showImage(theImg) {
	document.getElementById('thePhotoInQuestion').src = 'images/photos/'+theImg+'.jpg';
	//document.getElementById('thePhotoInQuestion').border = '1';
}
		
function showThePic(thePicToShow) {
	parent.showImage(thePicToShow);
	parent.togglePic('photoFrame');
}

function lyrics(where) {
	var url = 'lyrics/'+where+'.html';
	preview = window.open(
		url,"lyrics","width=360,height=420,toolbar=no,location=no,directories=no,statusbar,menubar=no,copyhistory=no,scrollbars,resizable=yes");

	window.preview.focus();
	return preview;
}

function notes(where) {
	var url = 'notes/'+where+'.html';
	preview = window.open(
		url,"notes","width=400,height=520,toolbar=no,location=no,directories=no,statusbar,menubar=no,copyhistory=no,scrollbars,resizable=yes");

	window.preview.focus();
	return preview;
}

function ClosePreviewWindow () {
	if(window.preview) {
		window.preview.close();
	}
}
