// JavaScript Document
function setTab(num, tot){
	for (i=1;i<=tot;i++){
		document.getElementById("tabLeft"+i).className = "tabLeftOff";
		document.getElementById("tabMiddle"+i).className = "tabLinkOff";
		document.getElementById("tabRight"+i).className = "tabRightOff";
		document.getElementById("contentArea"+i).style.display = "none";
	}
	document.getElementById("contentArea"+num).style.display = "block";
		document.getElementById("tabLeft"+num).className = "tabLeftOn";
		document.getElementById("tabMiddle"+num).className = "tabLink";
		document.getElementById("tabRight"+num).className = "tabRightOn";
}
		
function bsPopWin(loc, win, props){
	window.open(loc, win, props);
}

function getRandomSite(){
	locString = new Array();
	locString[locString.length] = "crap";
	locString[locString.length] = "stub";
	locString[locString.length] = "ploop";
	locString[locString.length] = "wedgie";
	locString[locString.length] = "jive";
	locString[locString.length] = "theendoftheinternet";
	locString[locString.length] = "tuna";
	locString[locString.length] = "melaniegriffith";
	locString[locString.length] = "thehockeypuck";
	locString[locString.length] = "stink";
	locString[locString.length] = "ratemypoo";
	locString[locString.length] = "nerd";
	locString[locString.length] = "shatner";
	locString[locString.length] = "dumb";
	locString[locString.length] = "pants";
	locString[locString.length] = "grumpy";
	locString[locString.length] = "shag";
	locString[locString.length] = "jibjab";
	locString[locString.length] = "domdeluise";
	locString[locString.length] = "noodle";
	
	top.location.href = "http://www."+locString[Math.floor(Math.random()*locString.length)]+".com";
}

function openCommentWindow(entryId){
		commentWin = window.open("blog_comment.aspx?entryId="+entryId, "commentWindow", "width=400,height=280");
		commentWin.focus();
}

function refreshBlogWindow(){
	theform=getForm('Form1');
	theform['scrollToBottom'].value = 'true';
	__doPostBack('','');	
		
}

function openMessageWindow(){
		commentWin = window.open("bulletin_board_message.aspx", "commentWindow", "width=400,height=280");
		commentWin.focus();
}

function refreshMessageWindow(){
	theform=getForm('Form1');
	__doPostBack('','');	
		
}

function getForm(formname){
	if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
			tempForm = document[formname];
	}
		else {
			tempForm = document.forms[formname];
	}
	return tempForm;
}