function sbID(s) {
	return document.getElementById(s);
}

function banner(msg,ctrlwidth) {
	msg = " --- " + msg
	newmsg = msg
	while (newmsg.length < ctrlwidth) {newmsg += msg}
	document.write ('<form name="Banner">')
	document.write ('<center><input name="bannertr" value= "'+newmsg+'" size= '+ctrlwidth+' class="scroll_01"></center>')
	document.write ('</form>')
	rollmsg()
}

function rollmsg() {
	NowMsg=document.Banner.bannertr.value
	NowMsg=NowMsg.substring(1,NowMsg.length)+NowMsg.substring(0,1)
	document.Banner.bannertr.value = NowMsg
	bannerid=setTimeout("rollmsg()",100)
}

function go(url) {
	sbID("player").href = url;
	flowplayer("player", "flow/flowplayer-3.2.7.swf");
}

function ar_online_disp(msg) {
//	sbID("ar_online").innerHTML = msg;	
}

function switch_video(mode) {
	if(mode == 0) {
		sbID("video_sheet_0").className = "raised16";
		sbID("video_sheet_1").className = "raised17";
		sbID("video_win_0").style.display = "none";
		sbID("c33316").style.display = "inline";
		sbID("video_shadow_0").style.visibility = "visible";
		sbID("video_shadow_1").style.visibility = "hidden";
	}
	if(mode == 1) {
		sbID("video_sheet_0").className = "raised17";
		sbID("video_sheet_1").className = "raised16";
		sbID("video_shadow_1").style.visibility = "visible";
		sbID("video_shadow_0").style.visibility = "hidden";
		sbID("c33316").style.display = "none";
		sbID("video_win_0").style.display = "inline";
	}

}

function sleep(milliseconds) {
	var start = new Date().getTime();
	while ((new Date().getTime() - start) < milliseconds){
	}
}

function disp_selection(mode) {
	if(mode == 0) {
//		sbID("arch_selector").style.display = "none";
	}
	if(mode == 1) {
//		sbID("arch_selector").style.display = "inline";
	}
}

function disp_dj_info_on(num, info) {
	for(i=0; i<6; i++)
		if(i != num) sbID("dj_inf_"+ i).className = "shadow_02";
	sbID("djguestinfo").innerHTML = info;
}

function disp_dj_info_off(num) {
	for(i=0; i<6; i++)
		sbID("dj_inf_"+ i).className = "";
	sbID("djguestinfo").innerHTML = "ÇÀÕÎÄÈ È ÎÁÙÀÉÑß!";
}

function list_air(num) {
	for(i=0; i<5; i++)
		sbID("air_l" + i).className = "air_line_" + (4 + i - num);
}

function off_v_announce() {
	sbID("v_announce").style.display = "none";
	sbID("in_v_announce").style.display = "none";
}

function on_v_announce() {
	var w = 0;
	var h = 0;
	var ww = 300;
	var hh = 300;
	w = document.body.clientWidth;	
	h = document.body.clientHeight;	
	var pl = (w/2 - ww)*100/w;
	var pt = (h/2 - hh)*100/h;
	sbID("in_v_announce").style.left = pl + "%";
	sbID("in_v_announce").style.top  = pt + "%";
	sbID("v_announce").style.display = "inline";
	sbID("in_v_announce").style.display = "inline";
}

	var pro		= 0;
	var proid	= 0;
	var pro_shadow	= 9;
	var shadproid	= 0;
	function rotated_pro() {
		for(i=0; i<max_pro; i++) {
			sbID("pro_inf_" + i).style.display = "none";
			sbID("pro_inf_btn_" + i).src = "img/buttons/sml_crl_on.gif";
		}
		sbID("pro_inf_" + pro).style.display = "inline";
		sbID("pro_inf_btn_" + pro).src = "img/buttons/sml_crl_off.gif";
		pro = pro + 1;
		if(pro >= max_pro) pro = 0; 
		proid=setTimeout("rotated_pro()",20000);
	}

	function change_pro(num) {
		pro = num;
		clearTimeout(proid);
		rotated_pro();
	}

	function shadow_pro(num) {
		sbID("pro_inf_" + num).className = "shadow_0" + pro_shadow;
		pro_shadow = pro_shadow - 1;
		if(pro_shadow <= 0) { 
			pro_shadow = 9; 
			clearTimeout(shadproid);
			proid=setTimeout("rotated_pro()",20000);
		}
		shadproid=setTimeout("shadow_pro()",300);
	}


