//<script>


function openWindow(url, n, w, h){
	if (url.indexOf('?') == -1) {url=url+'?$sid='+sid}
	else {url=url+'&$sid='+sid}
	window.open(url, n, 'width='+w+',height='+h+',resizable=yes,scrollbars=yes')
}

function nPages(n,p){
	if (n < 2) { return false; }
	for (var i=0; i<n; i++) {
	document.frmPages.page.options[document.frmPages.page.options.length] = new Option(i+1,i+1);
	}  
	for (var x=0; x < document.frmPages.page.options.length; x++) {
		if (document.frmPages.page.options[x].value == p) { 
			document.frmPages.page.options[x].selected = true; 
			break;
		}
	}
}

function changePage(id){
	var p = document.frmPages.page.options[document.frmPages.page.options.selectedIndex].value;
	document.location.href = "forum.asp?id="+id+"&page="+p;
}

function numDaysChange(d){
	for (var i=0; i<document.frmdays.ndays.length; i++){
		if (document.frmdays.ndays.options[i].value == d) {
			document.frmdays.ndays.options[i].selected = true ;
			break;
		}
	}
}

function changePageR(id){
	var p = document.frmPages.page.options[document.frmPages.page.options.selectedIndex].value;
	document.location.href = "topic.asp?id="+id+"&page="+p;
}




//</script>