//スポンサーのフェード処理
$(document).ready( function(){ 
		$('#bottom_sponsor').innerfade({
			animationtype: 'slide',
			speed: 750,
			timeout: 6000,
			type: 'sequence',
			containerheight: '70px'});

		$('#bottom_sponsor2').innerfade({
			animationtype: 'slide',
			speed: 750,
			timeout: 6000,
			type: 'sequence',
			containerheight: '40px'});
}); 


//ムービーバナーからのポップアップ
function pop_movie(){
  var target_pass = 'http://';
  if(location.hostname == 'test.ideacd.co.jp'){
  	target_pass += location.hostname +'/RM/rera/go_rerakamuy/go_rera01.html';
  } else {
	target_pass += location.hostname +'/go_rerakamuy/go_rera01.html';
  }
  window.open(target_pass,'null','width=640,height=500,status=0,scrollbars=0,menubar=0,location=0,toolbar=0,resizable=0');
  return false;
}


//チケットページ　会場マップの切り替え
function ticket_change(field,liNum){
		//切り替えボタンのエレメント取得
		liElmList = document.getElementById('btn_seattable').getElementsByTagName('li');
		//とりあえず個数分回して一旦off
		for(i=0;i < liElmList.length; i++){
			liElmList[i].className = '';
		}
		//イベント対象ボタンを　on
		liElmList[liNum].className = 'on';
		//とりあえずマップ全部display:none
		tb_list = $('table.seattable');
		jQuery.each(tb_list,function(i,obj){
			obj.style.display = 'none';
		});
		
		//対象のテーブルを display: block;
		document.getElementById(field).style.display = 'block';
}

//ゲームスケジュール　テーブル　マウスオーバー時背景変化
function chgTableBgc(){
	var item = document.getElementById("game_tb").getElementsByTagName('tr');
	for(i=0;i < item.length; i++){
			//item[i].setAttribute('onmouseover',"this.style.background = '#CCDDFF'");
			item[i].onmouseout  = function(){this.style.background = '#FFFFFF'}
			item[i].onmouseover = function(){this.style.background = '#CCDDFF'}
	}
}



//レラブログRSSリーダー
function blog_rss(read_num){
	var url = 'http://www.rerakamuy.jp/rna/rss/recent_entry.rdf';
	
	var xml = new JKL.ParseXML( url );  // JKL.ParseXMLオブジェクトを生成
	var func = function ( data )        // 呼び出し先関数を定義する
	{  
	  onloaded1( data,read_num );                //コールバック
	}
	xml.async( func );                  // 呼び出し先関数を指定する
	xml.parse();                        // ダウンロード～解析～関数呼び出しする
}

//RSSを受信時に起動するコールバック関数
function onloaded1(xml,num)
{
	var data = ""
  
	//rdf:RDF要素以下のitem要素を順番に処理
	var cnt = 0;
	for(i in xml["rdf:RDF"].item)
	{
		if(cnt >= num) break;
		
		//時間表記の整理
		var b_time = xml["rdf:RDF"].item[i]['dc:date'].split('-');
		time = b_time[0] +'/' + b_time[1] + '/' + b_time[2].substr(0,2);
		
		//記事タイトルの制限
		var title = xml["rdf:RDF"].item[i].title;
		if(title.length > 14) title = title.substr(0,14) +'..'; 
		
		//出力用HTMLを作る
		data += '<li>';
		data += time;
		data += '　<a target="_blank" href="'+xml["rdf:RDF"].item[i].link+'">';
		data += title;
		data += '</a></li>';
		
		cnt++;
	}

	//出力
	document.getElementById('blog_rss').innerHTML = data;
}

//-->

