

<!--
setInterval("set_time()",1000);

var musdir = "";
var musics = new Array(
"http://media1.praize.com/radio/files/playlist/songs/AC/Mercy Me - Here With Me.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Stephen Curtis Chapman - All Things New.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Newsboys - You Are My King.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Matthew West - More.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Selah - You Raise Me Up.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Mark Schultz - Letters From War.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Jaci Velasquez - Unspoken.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Rachael Lampa - When I Fall.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/FFH - Ready To Fly.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Bebo Norman - Disappear.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Avalon - You Were There.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Nichole C. Mullen - Everyday People.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Caedmon's Call - There's Only One Hope.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Chris Rice - Untitled Hymn.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Darlene Zschech - Pray.wma",
"http://media1.praize.com/radio/files/playlist/songs/AC/Shawn McDonald - Gravity.wma");

var titles = new Array(
"Here With Me",
"All Things New",
"You Are My King",
"More",
"You Raise Me Up",
"Letters From War",
"Unspoken",
"When I Fall",
"Ready To Fly",
"Disappear",
"You Were There",
"Everyday People",
"There's Only One...",
"Untitled Hymn",
"Pray",
"Gravity");



var artists = new Array(
"Mercy Me",
"Stephen Curtis Chapman",
"Newsboys",
"Matthew West",
"Selah",
"Mark Schultz",
"Jaci Velasquez",
"Rachael Lampa",
"FFH",
"Bebo Norman",
"Avalon",
"Nicole C. Mullen",
"Caedmon's Call",
"Chris Rice",
"Darlene Zschech",
"Shawn McDonald");

var albums = new Array(
"Undone",
"All Things New",
"Adoration",
"Happy",
"Hiding Place",
"Stories And Songs",
"Unspoken",
"Rachael Lampa",
"Ready To Fly",
"Try",
"The Creed",
"Everyday People",
"Share The Well",
"Short Term Memories",
"Kiss Of Heaven",
"Simply Nothing");


var url = new Array(
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>",
"<a href=http://praize.spreadtheword.com/store/BrowseCategories/asp/Cat0/689/Cat0Literal/Music/Cat1/796/Cat1Literal/Contemporary%2FPop/Cat2/789/Cat2Literal/Adult%20Contemporary target=0>Buy this Album</a>");

var images = new Array(
"http://media.praize.com/radio/images/covers/mercyme_undone.gif",
"http://media.praize.com/radio/images/covers/stephencurtischapman_allthi.gif",
"http://media.praize.com/radio/images/covers/newsboys_adoration.gif",
"http://media.praize.com/radio/images/covers/matthewwest_happy.gif",
"http://media.praize.com/radio/images/covers/selah_hidingplace.gif",
"http://media.praize.com/radio/images/covers/markschultz_storiesandsongs.gif",
"http://media.praize.com/radio/images/covers/jacivelasquez_unspoken.gif",
"http://media.praize.com/radio/images/covers/rachaellampa_rachaellampa.gif",
"http://media.praize.com/radio/images/covers/ffh_readytofly.gif",
"http://media.praize.com/radio/images/covers/bebonorman_try.gif",
"http://media.praize.com/radio/images/covers/avalon_thecreed.gif",
"http://media.praize.com/radio/images/covers/nicolecmullen_everydaypeopl.gif",
"http://media.praize.com/radio/images/covers/caedmonscall_sharethewell.gif",
"http://media.praize.com/radio/images/covers/chrisrice_shorttermmemories.gif",
"http://media.praize.com/radio/images/covers/darlenezschech_kissofheaven.gif",
"http://media.praize.com/radio/images/covers/shawnmcdonald_simplynothing.gif");
/////////////////////////////////////
var id = 0;
var backid = -1;
var status = 0;
var mode = "wm";
var mute_status = 0;
var stop_status = 0;
var _volume_back = 50;
var maxid = 16;
var toc = 0;

function seturlr(){
	id = Math.floor(Math.random() * maxid);
	seturl(musics[id]);
	chgtext(id);
}

function seturl(url){
	if(mode != 'rm'){
		document.getElementById('wmp').URL = url;
	}
	else{
		document.getElementById('wmp').SRC = url;
	}
	show_volume();
}

function wmp_go(){
	if(status == 0){
		wmp_play();
	}
	else{
		wmp_pause();
	}
}

function wmp_stop(){
	document.getElementById('wmp').CurrentPosition=0;
document.getElementById('wmp').controls.stop();
	stop_status = 1;
	playbtn = "play";
	document.getElementById(playbtn).src="images/player_bt_play.gif";
	status = 0;

	chgtext(-1);

	show_volume();
	set_time();
	//seturlr();
}

function wmp_pause(){
	document.getElementById('wmp').controls.pause();
	stop_status = 1;
	playbtn = "play";
	document.getElementById(playbtn).src="images/player_bt_play.gif";
	status = 0;

	show_volume();
	set_time();
}

function _setup(_id){
	//srand();
	seturlr();
	//seturl(musics[_id]);
	wmp_play();
	//id = _id;
	chgtext(id);
}

function wmp_play(){
	stop_status = 0;
	playbtn = "play";
	document.getElementById(playbtn).src="images/player_bt_temstop.gif";
	status = 1;

//	if(id >= (musics.length)){id = 0;}
	chgtext(id);
//	if(backid != id)
//		document.getElementById('wmp').URL = musics[id];
	backid = id;

	document.getElementById('wmp').controls.play();
	show_volume();
	set_time();
}

function wmp_play2(_id){
	id = _id;
	wmp_play();
}

function wmp_next(){
//	id = ((id > musics.length) ? 0 : id + 1);
	seturlr();
	show_volume();
}

function set_time(){
		t1 = document.getElementById('wmp').controls.currentPositionString;
		if(t1 == ""){
			t1 = "00:00";
		}
		t2 = document.getElementById('wmp').currentMedia.durationString;
		if(t2 == ""){
			t2 = "00:00";
		}
		document.getElementById("curtime").innerHTML = t1;
		document.getElementById("maxtime").innerHTML = t2;
}

function wmp_nextplay(){
//	if(!stop_status){
		wmp_next();
		document.getElementById('wmp').controls.currentPosition = 0;
//	}
//	show_volume();
	focus();
//	blur();
	toc = setTimeout("wmp_click()", 1);
}

function wmp_click(){
//	focus();
//	document.getElementById('play').click();
	wmp_stop();
	wmp_play();
}

function wmp_prev(){
	id = ((id <= 0) ? musics.length - 1 : id - 1);

	show_volume();
}

function wmp_prevplay(){
	wmp_prev();
	wmp_play(id);

	show_volume();
}

function chgtext(_id){
	if(_id == -1){
		document.getElementById("title").innerHTML = "";
		document.getElementById("artist").innerHTML = "";
		document.getElementById("album").innerHTML = "";
		document.getElementById('image').src = "images/gray_bg.gif";
	}
	else{
		document.getElementById("title").innerHTML = titles[_id];
		document.getElementById("artist").innerHTML = artists[_id];
		document.getElementById("album").innerHTML = albums[_id];
                document.getElementById("url").innerHTML = url[_id];
		document.getElementById('image').src = images[_id];
	}

	show_volume();
}

function show_volume(){
	_volume = document.getElementById("wmp").settings.volume;
	document.getElementById("volume").innerHTML = ""+_volume;
}

function wmp_mute_go(){
	if(mute_status){
		mute_status = 0;
		document.getElementById("wmp").settings.volume = _volume_back;
		document.getElementById('mute').src = "images/player_bt_vol.gif";
	}
	else{
		mute_status = 1;
		_volume_back = document.getElementById("wmp").settings.volume;
		document.getElementById("wmp").settings.volume = 0;
		document.getElementById('mute').src = "images/player_bt_vol0.gif";
	}
}

function wmp_volume(v){
	_volume_back = v;
	document.getElementById("wmp").settings.volume = _volume_back;
	show_volume();
}

function volume(id){
	img1 = 'images/1pixel.gif';
	img2 = 'images/media_icon3.gif';

	document.getElementById('volume_icon0').src = (id == 0) ? img2 : img1;
	document.getElementById('volume_icon1').src = (id == 1) ? img2 : img1;
	document.getElementById('volume_icon2').src = (id == 2) ? img2 : img1;
	document.getElementById('volume_icon3').src = (id == 3) ? img2 : img1;

	_volume = 0 - (id * 1500);
	document.getElementById("wmp").volume = _volume;
}

function wmp_volumeup(){
	_volume = document.getElementById("wmp").settings.volume;
	document.getElementById("wmp").settings.volume = _volume + 10;
	_volume = document.getElementById("wmp").settings.volume;
	show_volume();
}

function wmp_volumedown(){
	_volume = document.getElementById("wmp").settings.volume;
	document.getElementById("wmp").settings.volume = _volume - 10;
	_volume = document.getElementById("wmp").settings.volume;
	show_volume();
}

function voldown(){
}

// -->


