function changetopic(target, src, no, title, body, image, image_caption, url){
	document.images[target].src = src;
	document.images[target].url = url;
	
	obj = document.getElementById("topic_no") ;
	obj.innerHTML  = "TOPIC"+no;

	obj = document.getElementById("topic_tit") ;
	obj.innerHTML  = title;
	
	obj = document.getElementById("topic_dis") ;
	obj.innerHTML  = body;
	
	obj = document.getElementById("topic_img_caption") ;
	obj.innerHTML  = image_caption;
}

function seacret_success(o){
	if(o.responseText == 1){
		window.open('./seacret/');
	}
	else{
		alert("ログインできませんでした") ;
	}
	document.getElementById("login_btn").disabled = false;
}

function login(){
	document.getElementById("login_btn").disabled = true;
	id = document.forms["seacret"].id.value;
	password = document.forms["seacret"].password.value ;
	
	str = "id=" + id + "&password=" + password ;

	new Ajax.Request('./seacret.php', { method:'post', parameters: str, onComplete: seacret_success});
}

var sche_cache = Array(4);

function change_schedule(time_zone){
  var area = document.getElementById("top1_2");
  if(sche_cache[time_zone] != undefined){
    area.innerHTML = sche_cache[time_zone];
  }
}

function store_schedule(){
 for(var i=1; i<4; i++){
  var elm = document.getElementById("today_schedule_"+i);
  if(elm != undefined){
   sche_cache[i] = elm.innerHTML;
  }
 }
}

function topic_link(url){
	if(url.length > 0){
		window.location = url;
	}
}