function OpenFormattingInstructionsWindow() {
	Uri = "http://brickhouse.cc/pages/AutoFormatInstructions.html";
	ChatWindowObjectReference = window.open(Uri, 'FormatInstructions',
	'height=575,width=500,top=100,right=100,menubar=no,location=no,resizable=yes,status=no');
}

function OpenListPhotosWindow() {
	Uri = "http://brickhouse.cc/pages/ListPhotos.html";
	ChatWindowObjectReference = window.open(Uri, 'PhotoList',
	'height=575,width=500,top=100,right=100,menubar=no,location=no,resizable=yes,status=no');
}

function ShowElementByIdAndHideThis(ShowId,HideObj) {
	document.getElementById(ShowId).style.display='block';
	HideObj.style.display='none';
	return false;
}
function LeaveGroup() {
	if (!confirm("Are you sure you want to leave this group?")) return;
	SubmitForm('LeaveGroup');
	return false;
}
function SubmitForm(FormName) {
	eval("document." + FormName + ".submit()");
	return false;
}
var WindowObjectReference;
/* Declaring a global variable which will store
 a reference to the new window to be created */

function openWxbhPlayer()
{
WxbhPlayerWindowObjectReference = window.open("http://louisvillecommunityradio.org/pages/stream.m3u",
"WxbhPlayer",
 "height=150,width=200,menubar=no,location=no,resizable=yes,scrollbars=no,status=yes");
}

function OpenChat(ChatName) {
Uri = 'http://brickhouse.cc/chat/' + ChatName;
ChatWindowObjectReference = window.open(Uri, ChatName + 'Chat',
'height=800,width=900,menubar=no,location=no,resizable=yes,scrollbars=no,status=yes');
}

function EditLine(FormName, Key) {
document.forms[FormName].RequestedKey.value = Key
document.forms[FormName].submit()
}

function CountGroupDescr(TextAreaObj) {
document.forms['GroupSettings'].GroupDescrCharsLeft.value = 255 - TextAreaObj.value.length;
}

function CountChars(FieldId, CountFieldId) {
document.getElementById(CountFieldId).value = 255 - document.getElementById(FieldId).value.length;
}

function StartLogoutWarningTimer() {
	timerID=setTimeout('DisplayLogoutWarning()',90 * 60 * 1000);
}

function DisplayLogoutWarning() {
	timerID=setTimeout('DisplayLogoutNotification()',30 * 60 * 1000);
	alert("Are you still there? Your session has been inactive for a while. "
		+ "You will be automatically logged out in 30 minutes if your session continues to be inactive. ");
}
function DisplayLogoutNotification() {
	alert("Your login session has expired. Please log in again.");
}
