function noaChange(){
	setTimeout('noaChange()',30000);
	//Element.hide('noaNpArea');
	var a = new Ajax.Request(
		'/php_function/noachange.php',
		{
			'method': 'post',
			onSuccess: function(request) {
				var html = '';
				var str = request.responseText;
				var Ary = str.split("----");
				
				html = '<div id="noaNpMain" class="clearfix">';
				
				////[Jacket]////
				html = html + '<p id="noaNpJacket">';
				if (Ary[6].length > 0){
					html = html + '<img src="/sysimg/jacket/'+Ary[6]+'" width="60" height="60" oncontextmenu="return false;" />';
				}else{
					html = html + '<img src="/parts/index/images/_dummy_cdjacket.png" width="60" height="60" />';
				}
				html = html + '</p>';
				html = html + '<div id="noaNpBox" class="clearfix">';
				html = html + '<div id="noaNpTxt" class="clearfix">';
				html = html + '<h3 id="noaNpTitle" title="NOW PLAYING">NOW PLAYING</h3>';
				
				////[SongInfo]////
				if (Ary[1].length > 0){
					html = html + '<p id="noaNpSongTime"><span class="npTime">TIME:</span>' + decodeURIComponent(Ary[3]) + '</p>';
					html = html + '</div>';
					html = html + '<p id="noaNpSongTitle"><span class="npTitle">TITLE:</span>' + decodeURIComponent(Ary[1]) + '</p>';
					html = html + '<p id="noaNpSongArtist"><span class="npArtist">ARTIST:</span>' + decodeURIComponent(Ary[2]) + '</p>';
					html = html + '</div>';
					html = html + '</div>';
				}else{
					html = html + '<p id="noaNpSongTime"><span class="npTime">TIME:</span>-</p>';
					html = html + '</div>';
					html = html + '<p id="noaNpSongTitle"><span class="npTitle">TITLE:</span>TALKING..</p>';
					html = html + '<p id="noaNpSongArtist"><span class="npArtist">ARTIST:</span>-</p>';
					html = html + '</div>';
					html = html + '</div>';
				}
				
				////[BuyLink]////
				html = html + '<ul id="noaNpList">';
				if (Ary[0].length > 0){
					html = html + '<li id="noab-buy"><a href="' + Ary[0] + '" target="_blank" oncontextmenu="return false;">BUY CD</a></li>';
				}else{
					html = html + '<li id="noab-buy">BUY CD</li>';
				}
				html = html + '<li id="noab-song"><a href="/noa_data/today_oa.html" target="_blank">TODAYLIST</a></li>';
				html = html + '</ul>';
				
				$('noaNpArea').innerHTML = html;
			},
			onComplete: function(request) {
				//Element.show('noaNpArea');
			}
		}
	);
}

noacnt = 0;
nxtcnt = 0;
function djChg() {
	
	//-----initialize
	var noadj = new Array();
	var nxtdj = new Array();
	
	if (dj1 != "")              noadj[0] = dj1;
	if (dj2 != "" && dj1 != "") noadj[1] = dj2;
	if (dj3 != "" && dj2 != "") noadj[2] = dj3;
	if (nx1 != "")              nxtdj[0] = nx1;
	if (nx2 != "" && nx1 != "") nxtdj[1] = nx2;
	if (nx3 != "" && nx2 != "") nxtdj[2] = nx3;
	
	if (noadj.length == 0){
		noadj.push('/sysimg/dj/top/dj_top_0999.gif');
	}
	
	if (nxtdj.length == 0){
		nxtdj.push('/sysimg/dj/next/dj_top_0999.gif');
	}
	
	//-----change image
	$('djphoto').src = noadj[noacnt];
	$('djphoto-s').src = nxtdj[nxtcnt];
	
	//-----rotation
	noacnt++;
	nxtcnt++;
	if (noacnt == noadj.length){
		noacnt = 0;
	}
	if (nxtcnt == nxtdj.length){
		nxtcnt = 0;
	}
	
	setTimeout("djChg()", 10000);
}


