var bnrObj1 = [
	//set1 -------------------------------------------------
	{
		'src' : '/images/index_bn01.jpg',
		'param' : '',
		'type': 'image',
		'alt' : 'エネゴリくんの星',
		'height' : '90',
		'URL' : '/enegori/',
		'icon': '',  //なし or nomalLink01 or blankLink
		'target' : '_blank',
		'cap' : ''
	},
	//set2 -------------------------------------------------
	{
		'src' : '/images/index_bn02.jpg',
		'param' : '',
		'type': 'image',
		'alt' : 'ENEOS TV',
		'height' : '90',
		'URL' : 'http://www.eneos-tv.jp/',
		'icon': 'blankLink', //なし or nomalLink01 or blankLink
		'target' : '_blank',
		'cap' : ''
	}

//新しい「ENEOS」誕生までのあゆみ ここから
//	{
//		'src' : '/images/index_bn14.gif',
//		'param' : '',
//		'type': 'image',
//		'alt' : '新しい「ENEOS」誕生までのあゆみ',
//		'height' : '50',
//		'URL' : '/ayumi/',
//		'icon': 'blankLink', //なし or nomalLink01 or blankLink
//		'target' : '_blank',
//		'cap' : '新しい「ENEOS」が誕生するまでのあゆみを、当時の時代背景とともに振り返ります'
//	}
//新しい「ENEOS」誕生までのあゆみ ここまで

	//最後の “}”の後には “,（カンマ）” を付けない
];


function rndBanner(topbannerObj){
	
	bnSource= new Array();
	var classIC = "";
	for(i=0;i<topbannerObj.length;i++){
		classIC = ' class="'+topbannerObj[i].icon+'"';
		if(topbannerObj[i].type == 'image'){
			if(!topbannerObj[i].param){
				topbannerObj[i].param = "";
			}
			bnSource[i] = '<a href="'+topbannerObj[i].URL+''+topbannerObj[i].param+'" target="'+topbannerObj[i].target+'"><img src="'+topbannerObj[i].src+'" alt="'+topbannerObj[i].alt+'" width="208" height="'+topbannerObj[i].height+'" /></a>';
			if(topbannerObj[i].cap !=''){
				bnSource[i] = '<dl><dt>' + bnSource[i] + '</dt><dd'+classIC+'><a href="'+topbannerObj[i].URL+''+topbannerObj[i].param+'" target="'+topbannerObj[i].target+'">' + topbannerObj[i].cap+'</a></dd></dl>';
			}
		}else if(topbannerObj[i].type == 'flash'){
			bnSource[i] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="208" height="'+topbannerObj[i].height+'"><param name="movie" value="'+topbannerObj[i].src+'"><param name="quality" value="high"><embed src="'+topbannerObj[i].src+'"  quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="208" height="'+topbannerObj[i].height+'"></embed></object>'
			if(topbannerObj[i].cap !=''){
				bnSource[i] = '<dl><dt>' + bnSource[i] + '</dt><dd'+classIC+'><a href="'+topbannerObj[i].URL+''+topbannerObj[i].param+'" target="'+topbannerObj[i].target+'">' + topbannerObj[i].cap+'</a></dd></dl>';
			}
		}
	}
	
	n = Math.floor(Math.random()*bnSource.length);
	document.write(bnSource[n]);
}
