
var textList = new Array();

textList[0] = '﻿2010.03.04  カッコーツアー　「春号」チラシページアップしました！受付開始は3月の5日から　新聞折込は3月7日です';
textList[1] = '2010.02.26  マイカープラン　長野県エリア 日帰り2プラン　追加';
textList[2] = '2010.02.15  マイカープラン　愛知県エリア 日帰り1プラン　追加';
textList[3] = '2010.02.13  マイカープラン　静岡県エリア 日帰り1プラン　追加';
textList[4] = '2010.02.05  マイカープラン　その他エリア（大阪府） 宿泊1プラン　追加';
textList[5] = '2010.02.04  カッコーツアー　「日本の世界遺産をめぐる旅」「巡礼・お遍路」チラシページアップしました！';
textList[6] = '2010.02.01  マイカープラン　岐阜県エリア 日帰り1プラン　追加';
textList[7] = '';

function $(id) {
	return document.getElementById(id);
}
function update() {
	getUpdate();
	function getUpdate() {
		var upBox = $('update_text');
		var upTxt = upBox.getElementsByTagName('span')[0];
		var thisNum = 0;
		var num = 350;
		upTxt.style.left = '350px';

		upTxt.innerHTML = textList[thisNum];
		var lLine = -upTxt.offsetWidth-50;
		var upInt = setInterval( function() {
			num -= 1.5;
			upTxt.style.left = num+'px';
			if( lLine > num ) {
				num = 350;
				upTxt.style.left = num+'px';
				thisNum ++;
				if(thisNum >= textList.length) thisNum = 0;
				upTxt.innerHTML = textList[thisNum];
				lLine = -upTxt.offsetWidth-50;
			}
		}, 30 );
	}
}

function createXMLHttpRequest(cbFunc) {
	var XMLhttpObject = null;
	try {
		XMLhttpObject = new XMLHttpRequest();
	} catch(e) {
		try {
			XMLhttpObject = new ActionXObject("MsXML2.XMLHTTP");
		} catch(e) {
			try {
				XMLhttpObject = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				return null;
			}
		}
	}
	if (XMLhttpObject) XMLhttpObject.onreadystatechange = cbFunc;
	return XMLhttpObject;
}

window.onload = function() {
	update();
}

