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"}
}


function shadowText(theText) {
    document.write('<div style="position:relative;">');
    document.write('<div style="position:absolute;top:0px;left:0px;z-index:103">');
    document.write('<span class="heavyFont"><p style="letter-spacing:-1px;font-size:2em;padding:0;margin:0;border:0;"><font color="#000000">'+theText+'</font></p></span>');
    document.write('</div>');
    document.write('<div style="position:absolute;top:1px;left:1px;z-index:103">');
    document.write('    <span class="heavyFont"><p style="letter-spacing:-1px;font-size:2em;padding:0;margin:0;border:0;">'+theText+'</p></span>');
    document.write('</div>');
    document.write('</div>');
}
