function changeImage(){
	i=document.charts.pair.selectedIndex;
	j=document.charts.term.selectedIndex;
	curr =document.charts.pair.options[i].value;
	type =document.charts.term.options[j].value;
	filename = 'charts/' + type + curr + '.gif';
	if(navigator.appVersion.charAt(0)>=3){
	img=new Array();
	img[1] = new Image();
	img[1].src= filename;

		if(type=="mthly_") window.open(filename,"","width=810,height=410,resizable=yes");
		else {
			document.images['img0'].src=img[1].src;
		}
	}
}

function hourlychart(n){

//最新ファイル番号//
latestfile=335

if(n==1){
		i=document.hourlycharts.hourly.selectedIndex;
		term=document.hourlycharts.hourly.options[i].value;
		filename = 'hrlychrt/hrly' + term + '.gif';

			if(navigator.appVersion.charAt(0)>=3){
			img=new Array();
			img[1] = new Image();
			img[1].src= filename;
			document.images['img0'].src=img[1].src;
			}
		}

else if(n==2){
		i=document.hourlycharts.hourly.selectedIndex;

		term= document.hourlycharts.hourly.options[i].value;
		if( parseInt( term,10 ) <= 1 ){
			alert("これより前のチャートはありません。");
			quit;
		}
		filenbr =parseInt( term,10 )-1+10000 +"";
		filenbr =filenbr.slice(-4);
		filename ="hrlychrt/hrly" + filenbr + ".gif";

		img=new Array();
		img[1] = new Image();
		img[1].src= filename;
		document.images['img0'].src=img[1].src;

		document.hourlycharts.hourly.options[i+1].selected =true;
		}

else if(n==3){
		i=document.hourlycharts.hourly.selectedIndex;

		term= document.hourlycharts.hourly.options[i].value;
		if( parseInt( term,10 ) >= latestfile ){
			alert("これより先のチャートはありません。");
			quit;
		}

		filenbr =parseInt( term,10 )+1+10000 +"";
		filenbr =filenbr.slice(-4);
		filename ="hrlychrt/hrly" + filenbr + ".gif";

		img=new Array();
		img[1] = new Image();
		img[1].src= filename;
		document.images['img0'].src=img[1].src;

		document.hourlycharts.hourly.options[i-1].selected =true;
		}

}

function dlridx(n){
	filename = 'minor_charts/dlridx' + n + '.gif';
	if(navigator.appVersion.charAt(0)>=3){
	img=new Array();
	img[1] = new Image();
	img[1].src= filename;
	document.images['img0'].src=img[1].src;
	}
}


function minor_curr(m){
	k=document.minor_charts.curr.selectedIndex;
	currency =document.minor_charts.curr.options[k].value;
	filename = "minor_charts/" + currency + m + ".gif";
	img=new Array();
	img[1] = new Image();
	img[1].src= filename;
	document.images['img0'].src=img[1].src;
}
