/**
This script is written by Cyrus-Charles Weaver (ccwaver at mit dot edu).
Its purpose is to make window popups on our website (specific for playing media) modular so that we can
change the look and feel of them later perhaps
*/


function window_open_mp3(file_path)
{
	var attributes = 'width=400,height=200';
	var reference_name = 'music_window';

	window.open(file_path, reference_name, attributes);
	
	/* Errors getting this code working */
	
	/*
	newwindow=window.open('',reference_name,'width=400,height=200')
	newwindow.document.writeln('<head><title>' + 'Song View' + '<\/title><\/head><body>');
	newwindow.document.writeln('<embed src="' + file_path + '" width="180" height="50" autostart="true"> ');
	newwindow.document.writeln('<\/body><\/html>');
	newwindow.document.close();
	*/	
	
	return false;
	
}

function window_open_video(file_path, input_attributes)
{
	var attributes = 'width=500,height=500';
	if (input_attributes != null)
	{
		attributes = input_attributes;
	}
	
	var reference_name = 'video_window';

	window.open(file_path, reference_name, attributes);
	
	/* Errors getting this code working */
	
	/*
	newwindow=window.open('',reference_name,'width=400,height=200')
	newwindow.document.writeln('<head><title>' + 'Song View' + '<\/title><\/head><body>');
	newwindow.document.writeln('<embed src="' + file_path + '" width="180" height="50" autostart="true"> ');
	newwindow.document.writeln('<\/body><\/html>');
	newwindow.document.close();
	*/	
	
	return false;
	
}