// JavaScript Document

// writes on the fly a document with photo and caption
function showPhoto(whichPhoto, myWidth, myHeight){
	myCaption = whichPhoto.title;
	myWindow = window.open("", "_blank", "width=" + myWidth + ",height=" + (parseInt(myHeight)+34) + ",toolbar=0,resizable=0,location=0,menubar=0,status=0,scrollbars=0");
	myContent="<html><head><title>" + myCaption + "</title><link rel='stylesheet' type='text/css' href='sheets/champagne2.css' media='screen'></head>"
	myContent += "<body onBlur='self.close()' onClick='self.close()'><img src=" + whichPhoto + " />"
	myContent += "<p class='popcaption'>"+myCaption+"</p></body></html>"

	myWindow.document.write(myContent)
	myWindow.document.close() 
}

//plays the mp3s
// Pop-Up Embedder Script by David Battino, www.batmosphere.com; Object tag implementation by Mark Levitt, http://digitalmedia.oreilly.com
var UniqueID = 50; // Make each link open in a new window.
var newWinOffset = 0; // Position of first pop-up

function playMe(mp3name,mp3url) {
PlayWin = window.open('',UniqueID,'width=400,height=120,top=' + newWinOffset +',scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
PlayWin.focus(); 
var winContent = "<HTML><HEAD><TITLE>" + mp3name + "</TITLE><LINK HREF='sheets/cc_music.css' REL='stylesheet' TYPE='text/css'></HEAD>";
winContent += "<BODY CLASS='cctrack'>";
winContent += "<P><OBJECT width='300' height='42'>";
winContent += "<param name='SRC' value='" +  mp3url + "'>";
winContent += "<param name='AUTOPLAY' VALUE='true'>";
winContent += "<param name='CONTROLLER' VALUE='true'>";
winContent += "<param name='BGCOLOR' VALUE='#000000'>";
winContent += "<EMBED SRC='" + mp3url + "' AUTOSTART='TRUE' LOOP='FALSE' WIDTH='300' HEIGHT='42' CONTROLLER='TRUE' BGCOLOR='#000000'></EMBED>";
winContent += "</OBJECT><BR>" + mp3name + "</P>";
winContent += "</BODY></HTML>";

PlayWin.document.write(winContent);
PlayWin.document.close(); // "Finalizes" new window
UniqueID = UniqueID + 1;
newWinOffset = newWinOffset + 20; // subsequent pop-ups will be this many pixels lower.
}
