
function xlaALSprecheck(){
	if ((document.body && typeof(document.body.innerHTML)) != 'undefined'){
		xlaALSrequest();
	} else {
		alert('Browser not support for Online Chat');
	}
}
function xlaALSrequest(){
	var w = 640, h = 480;
	if (document.all || document.layers) {
	   w = screen.availWidth;
	   h = screen.availHeight;
	}
	var leftPos = (w-560)/2, topPos = (h-375)/2;
	xlaALSwindow=window.open("http://www.visitdetroit.com/als/UserPreChat.asp?ref=","ALSRoom","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=560,height=375,top=" + topPos + ",left=" + leftPos);
	xlaALSwindow.focus();
}

function xlaALScheckstatus(){
	var nt=String(Math.random()).substr(2,10);
	document.getElementById("xlaALSstatusimg").src='http://www.visitdetroit.com/als/als.asp?getstatus=1&nt=' + nt;
	setTimeout("xlaALScheckstatus();", 10000);
}

document.write("<a href='javascript:;' onclick='javascript:xlaALSprecheck()'><img src='http:\/\/www.visitdetroit.com\/als\/files\/offline.gif' border=0 id=xlaALSstatusimg \/><\/a>");
document.write("<br><a href='/visitorcenter/visitorpacket/'><img src='http://www.visitdetroit.com/als/files/visitors_packet_bottom.jpg' border='0' id='btnVisitorBottom' onmouseover=\"MM_swapImage('btnVisitorBottom','','/als/files/visitors_packet_bottom_on.jpg',1)\" onmouseout='MM_swapImgRestore()'  /></a>");
xlaALScheckstatus();
