
var textList = new Array();

textList[0] = '﻿2010.07.31　マイカープラン　長野エリア 　日帰り1プラン　追加　';
textList[1] = '2010.07.30  カッコーツアー「秋号」受付開始！';
textList[2] = '2010.07.29　マイカープラン　その他エリア（山梨県）　宿泊1プラン追加　';
textList[3] = '2010.07.26　カッコーツアー　メーテレUP!内でツアー紹介！　';
textList[4] = '2010.07.21  マイカープラン　長野エリア 　日帰り1プラン　追加　';
textList[5] = '2010.07.17  マイカープラン　岐阜エリア 　日帰り1プラン　追加　';
textList[6] = '2010.07.08  マイカープラン　岐阜エリア 　日帰り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();
}

