// JavaScript Document

//Make a pop-up window function
function play(song) {

	width = 310;
	height = 210;
	
	if(window.popup_window && !window.popup_window.closed) {
		window.popup_window.resizeTo(width, height);
	}
	
	var window_specs = "location=no, scrollbars=no, menubars=no, toolbars=no, resizeable=yes, left=150, top=75, width=" + width + ", height=" + height;
	
	var url = "play_song.php?song=" + song;
	
	popup_window = window.open(url, "PlaySongs", window_specs);
	popup_window.focus();
}

addLoadEvent(play);

//Make a pop-up window function
function playArtistOfMonth(song) {

	width = 310;
	height = 210;
	
	if(window.popup_window && !window.popup_window.closed) {
		window.popup_window.resizeTo(width, height);
	}
	
	var window_specs = "location=no, scrollbars=no, menubars=no, toolbars=no, resizeable=yes, left=150, top=75, width=" + width + ", height=" + height;
	
	var url = "play_artist_of_month_song.php?song=" + song;
	
	popup_window = window.open(url, "PlaySongs", window_specs);
	popup_window.focus();
}

addLoadEvent(playArtistOfMonth);

//Make a pop-up window function
function play_all(id) {

	width = 310;
	height = 210;
	
	if(window.popup_window && !window.popup_window.closed) {
		window.popup_window.resizeTo(width, height);
	}
	
	var window_specs = "location=no, scrollbars=no, menubars=no, toolbars=no, resizeable=yes, left=150, top=75, width=" + width + ", height=" + height;
	
	var url = "play_all_songs.php?id=" + id;
	
	popup_window = window.open(url, "PlaySongs", window_specs);
	popup_window.focus();
}
addLoadEvent(play_all);


//Make a pop-up window function
function play_list(list) {

	width = 310;
	height = 210;
	
	if(window.popup_window && !window.popup_window.closed) {
		window.popup_window.resizeTo(width, height);
	}
	
	var window_specs = "location=no, scrollbars=no, menubars=no, toolbars=no, resizeable=yes, left=150, top=75, width=" + width + ", height=" + height;
	
	var url = "play_list.php?list=" + list;
	
	popup_window = window.open(url, "PlaySongs", window_specs);
	popup_window.focus();
}

addLoadEvent(play_list);