var current_image = 1;
function popup(link, title, scrollbars, width, height)
{
	mywindow = window.open('', title,"location=0,toolbar=0,menubar=0,statusbar=0,status=0,scrollbars=" + scrollbars + ",width=" + width + ",height=" + height);
	mywindow.moveTo(((screen.width/2) - (width/2)),((screen.height/2) - (height/2)));
	mywindow.focus();
	mywindow.location = link;
}

function popup_percent(link, title, scrollbars, width, height)
{
	width = screen.width * (width / 100)
	height = screen.height * (height/ 100)
	mywindow = window.open('', title,"location=0,toolbar=0,menubar=0,statusbar=0,status=0,scrollbars=" + scrollbars + ",width=" + width + ",height=" + height);
	mywindow.moveTo(((screen.width/2) - (width/2)),((screen.height/2) - (height/2)));
	mywindow.focus();
	mywindow.location = link;
}

function printpage()
{
	window.print();
	window.close();
}

function jump_menu()
{
	var Item = document.getElementById('jump_dd').options[document.getElementById('jump_dd').selectedIndex].value;
	if (Item != 'default_1' && Item != 'default_2' && Item != 'default_3') {
		location=Item;
	}
	else
	{
		document.getElementById('jump_dd').selectedIndex = document.getElementById('jump_dd').options[0]
	}
}

function jump_menu2()
{
	var Item = document.getElementById('jump_dd2').options[document.getElementById('jump_dd2').selectedIndex].value;
	if (Item != 'default_1' && Item != 'default_2' && Item != 'default_3') {
		location=Item;
	}
	else
	{
		document.getElementById('jump_dd2').selectedIndex = document.getElementById('jump_dd2').options[0]
	}
}

function rotate_banner(image)
{
	var old = current_image;
	if ((image == 0) && (current_image > 1)) {
		current_image--;
	}
	else {
		if ((image == '6')&& (current_image < '5')) {
			current_image++;
		}
		else {
			if (image > 0 && image < 6) {
				current_image = image;
			}
		}
	}
	document.getElementById('main_content_top_right_top').style.backgroundImage = 'url(/images/rotating_banner/banner_'+current_image+'.jpg)';
	changeImages('button_'+old,'main_content_top_right_nav_button.gif');
	changeImages('button_'+current_image,'main_content_top_right_nav_button_hover.gif');
	document.getElementById('rotate_banner_url').href = litRBLinks[current_image];
}

function change_selector(id) {
	if(current_image != id){
		changeImages('button_'+id,'main_content_top_right_nav_button.gif');
	}
	else{
		changeImages('button_'+id,'main_content_top_right_nav_button_hover.gif');
	}
}

function change_init(id) {
	changeImages('button_'+id,'main_content_top_right_nav_button_hover.gif');
}

function changeImages(id,image) {
	document.getElementById(id).src = "/images/" + image;
}

var contShowMenu = false;

function scheduleShowMenu(html_id){
	contShowMenu = true;
	SetTimeout("showMenu(" + html_id + ");", 2000);
}

function cancelShowMenu(html_id){
	contShowMenu = false;
}

function showMenu(html_id){
//	if (contShowMenu)
//	document.getElementById(html_id).className = "hover";
}