/* <!--End of framework header file-->*/

//REALLY STUPID COMMENT SO THAT I CAN INSERT A LINE BREAK AND THEREFORE NOT BREAK THIS PAGE


function getRoomName(fullroomname) {
	return unescape(fullroomname.substring(7));
}

function getRoomNumber(fullroomname) {
	return (fullroomname.substring(5,7) - 0 + 1);
}

function getCategorySection(fullroomname) {
	return fullroomname.substring(1,5);
}
function OpenChatWindow(roomname,nextroom) {
	chatwindowurl = 'http://chat.excite.com/noncached/frameset.html';
	chatwindowurl += '?room=' + roomname;
	if (nextroom != '') {
		chatwindowurl += '&next=' + nextroom;
	}
	width = 773;
	height = 543;
	features = "screenX=0,screenY=0,left=0,top=0,resizable,status,width=" + width + ",height=" + height;
	chatwindow = window.open(chatwindowurl,"ExciteChatWindow",features);
	chatwindow.focus();
}

function OpenAlphaChatWindow(roomname) {
	chatwindowurl = 'http://chat.excite.com/noncached/frameset.html';
	chatwindowurl += '?room=' + roomname + '&alpha=browser';
	width = 773;
	height = 543;
	features = "screenX=0,screenY=0,left=0,top=0,resizable,status,width=" + width + ",height=" + height;
	chatwindow = window.open(chatwindowurl,"ExciteChatWindow",features);
	chatwindow.focus();
}

function joinPrivateRoom(roomname, roompass) {
	roomname = '5000000' + escape(roomname);
	chatwindowurl = 'http://chat.excite.com/noncached/frameset.html?room=' + roomname;
	if (roompass != '') {
		chatwindowurl += '&pass=' + roompass;
	}
	chatwindow = window.open(chatwindowurl,"ExciteChatWindow","screenX=0,screenY=0,left=0,top=0,resizable,width=773,height=543");
	chatwindow.focus();
}

function joinAlphaPrivateRoom(roomname, roompass) {
	roomname = '5000000' + escape(roomname);
	chatwindowurl = 'http://chat.excite.com/noncached/frameset.html?room=' + roomname;
	if (roompass != '') {
		chatwindowurl += '&pass=' + roompass;
	}
	chatwindowurl +=  '&alpha=browser';
	chatwindow = window.open(chatwindowurl,"ExciteChatWindow","screenX=0,screenY=0,left=0,top=0,resizable,width=773,height=543");
	chatwindow.focus();
}


function chat_GenerateVersion(arrayName)
{
	var theVer = arrayName[0] + ",";
	theVer += arrayName[1] + ",";
	theVer += arrayName[2] + ",";
	theVer += arrayName[3];
	return theVer;
}
function GetAbsoluteUrl(url)
{
	if (url.substring(0,4).toLowerCase() != "http" && self.location.protocol != "file:")
		return self.location.protocol + "//" + self.location.host + url;
	else
		return url;
} 

function NavigateTo(url)
{
	self.location = GetAbsoluteUrl(url);
}