var currpage=1;
var totalpage=6;

function GetPage() {
	list=document.URL.split('/');
	if(list.length) {
		if(parseInt(list[list.length-1]))
			currpage=parseInt(list[list.length-1]);
	}
}

/*function WritePageList(obj) {
	GetPage();
	str='';
	for (i=1; i<=totalpage; i++) {
		str += (str==''?'':' ') + (i==currpage?'<span title="current page"><font color="red" style="font-family:\'Times New Roman\'; font-size:16px; font-weight:bold;">'+i+'</font></span>':'<span title="goto page '+i+'"><a href="'+i+'.html" target="_self" style="font-family:\'Times New Roman\'; font-size:16px; text-decoration:none; color:darkgray;" onmouseover="this.style.color=\'red\';" onmouseout="this.style.color=\'darkgray\';">'+i+'</a></span>');
	}
	//alert(str);
	obj.innerHTML=str;
}
*/
function GotoPage(no) {
	document.location=no+'.html';
}
function WritePageList(obj) {
	GetPage();
	str='';
	for (i=1; i<=totalpage; i++) {
		str += '<option value="'+i+'"'+(i==currpage?' selected="selected"':'')+'>'+i+'</option>';
	}
	//alert(str);
	if(str!='')
		str='Page <select size="1" onchange="GotoPage(this.options[this.selectedIndex].value);">'+str+'</select>';
	obj.innerHTML=str;
}

