﻿function Select_True(oForm){
	for(var i=0;i<oForm.url.length;i++){
		oForm.url[i].checked=true;
	}
}

function Select_False(oForm){
	for(var i=0;i<oForm.url.length;i++){
		oForm.url[i].checked=!oForm.url[i].checked;
	}
}

function PlaySelected(oForm){
	var arrPlayList = [];
	var intPlayNum = 0;
	var strSongFolder = "dj";
	var PlayVolume;

	if(oForm.url.length){
	for(var i=0;i<oForm.url.length;i++){
		if(oForm.url[i].checked==true){
			arrPlayList[arrPlayList.length] = oForm.url[i].value
		}
	}
	}
	else{
		if(oForm.url.checked==true)arrPlayList[0] = oForm.url.value
	}
	if (arrPlayList.length>0){
		CleanPlayList('PlayList');
		//var objWindow = window.open('','play')
		for (var j=0;j<arrPlayList.length ;j++ )
		{
			intPlayNum = intPlayNum + setCookies('PlayList',arrPlayList[j]+"$$");
		}

		var setTime = 1000;
		if (setTime)
		{
			var date = new Date();
			date.setTime(date.getTime()+(setTime*60*60*24));
			var expires = "; expires="+date.toGMTString();
		}
		else 
			var expires = "";
		document.cookie = "[playAuto]=1" +expires+";path=/";
		document.cookie = "[playOrder]=2"+expires+";path=/";
		document.cookie = "[playNumber]="+intPlayNum+";path=/";
		var aSong = arrPlayList[0].split("||")
		//objWindow.location = "/"+strSongFolder+"/"+aSong[3]+".htm";
		window.open('/'+strSongFolder+'/'+aSong[3]+'.htm','play');
	}
	else{
		alert("请先选择DJ！");
	}
}

function check_login(){

	if (document.login.username.value.length == 0){alert("请输入用户名");return false;}
	if (document.login.password.value.length == 0){alert("请输入密码");return false;}

	//document.login.submit();
	//document.login.reset();
}
