// JavaScript Document, (c) J.Deaves, 2009
// for pointing out the bleeding obvious, credit to doug grimwade.

function funkatron( track_name, music_file )

// track_name = text string for the track name
// music_file = complete file name, including path & file extension

{
popwindow = window.open( '', 'funkatron', 'top=40,left=30,width=415,height=200,status=0,menubar=0,location=0' );

// popwindow.document.open();

popwindow.focus();	// bring this window into focus

popwindow.document.writeln( "<html>" );
popwindow.document.writeln( "<head>" );

// window title
popwindow.document.writeln( "<title>Funkatron music player</title>" );

// style sheet information
popwindow.document.writeln( "<style type='text/css'>" );
popwindow.document.writeln( "<!-- body { background: #333333; color: #cccccc; font-family: Verdana, Arial, Helvetica, sans-serif; } .large { font-size: 12px; font-weight: bold; } .small { font-size: 10px; } -->" );
popwindow.document.writeln( "</style>" );

popwindow.document.writeln( "</head>" );

popwindow.document.writeln( "<body>" );

// centre align all the contents on the div.
popwindow.document.writeln( "<div align='center'>" );

// bassik banner image
popwindow.document.writeln( "<p><img src='http://www.bassikgrooove.com/images/logo/funkatron-banner.jpg' width='400' height='64' /></p>" );	// place the logo

// pass the track name & credit, raised to bold
popwindow.document.writeln( "<p><span class='large'><b>" + track_name + " - Bassik Grooove</b></span></p>" );
popwindow.document.writeln( "<embed src='swf/mediaplayer.swf'" );
popwindow.document.writeln( "width='398'" );
popwindow.document.writeln( "height='20'" );
popwindow.document.writeln( "allowscriptaccess='always'" );
popwindow.document.writeln( "allowfullscreen='false'" );

// pass the file name c/w short pathname
popwindow.document.writeln( "flashvars='height=20&width=398&file=" + music_file + "&backcolor=0x333333&frontcolor=0xcccccc&autostart=true'/>" );	
popwindow.document.writeln( "</embed>" );

// copyright notice
popwindow.document.writeln( "<p><span class='small'>&copy; Copyright, Bassik Grooove &amp; Jerry*S*Grooove Productions</span></p>" );

// close the centre aligned div.
popwindow.document.writeln( "</div>" );

popwindow.document.writeln( "</body>" );
popwindow.document.writeln( "</html>");

popwindow.document.close();
}