currentTabZindex = 303;

function choosePage(id_to_choose) {
	currentTabZindex++;
	document.getElementById(id_to_choose+"_table").style.visibility = "visible";
	document.getElementById(id_to_choose).style.zIndex = currentTabZindex;
}

function roll(img_id, img_src) {
	document.getElementById(img_id).src = img_src;
}

function clickToChat() {
	var browserName=navigator.appName;
	url = "clickToChat.jsp"
	if (browserName=="Microsoft Internet Explorer"){
		mywindow = window.showModelessDialog(url,'mywindow','scroll:no;location:no;status:no;dialogHeight:361px;dialogWidth:513px;dialogTop:230px;dialogLeft:200px;');
	}else{
		window.open(url,'','scrollbars=no,scrolling=no,resizable=no,status=no,toolbar=no,location=no,dialog,height=361px,width=513px,left=20,top=257');
	}
}

function shutDown() {
	document.getElementById("ChatWindow_div").style.visibility = "hidden";
	window.onbeforeunload = null;
}

function chatEngaged() {
	window.onbeforeunload = function () {window.onbeforeunload = null;return "\n\nIf you continue to navigate your chat will end.\n\nAre you sure you want to exit?\n\n"}
}


