// live comment preview  - comment body
function ReloadTextDiv()
{
    var NewText = document.getElementById("comment").value;
    splitText = NewText.split(/n/);
    var DivElement = document.getElementById("textdisplay");
    var i = 0;
   DivElement.innerHTML = NewText;
}

// random image  - header
function swapPic()
 {
 if(document.getElementById)
   {
   var thePicture=document.getElementById("header");
   var picPath="/images/header-"+rnd(28)+".jpg";
   thePicture.style.background="url("+picPath+")";
   }
 }
function rnd(n)
 {
 return Math.floor(Math.random() * n) + 1;
 } 
 // popup  - header
 var newwindow;
function panicmusic(url)
{
	newwindow=window.open(url,'name','height=400,width=400');
	if (window.focus) {newwindow.focus()}
}
// AutoBlink
// Puts Google's Autolink on the Blink :)
// (c) 2005 Chris Ridings   http://www.searchguild.com
// Redistribute at will but leave this message intact

var linkcount;
function checklinks() {
	if (!(linkcount==document.links.length)) {
		// Something changed the links!
		// Iterate for an id of _goog
		for (i=0; i < document.links.length; i++) {
			if (document.links[i].id.substring(0,5)=="_goog") {
				// If we find an id of _goog then remove the link!
				var tr = document.links[i].parentTextEdit.createTextRange();
				tr.moveToElementText(document.links[i]);
				tr.execCommand("Unlink",false);
				tr.execCommand("Unselect",false);
			}
		}
	}
		setTimeout("checklinks()",500);
}
if (document.getElementById && document.createElement) {
	linkcount=document.links.length;
	setTimeout("checklinks()",500);
}

//loading...

		// This script is intended for use with a minimum of Netscape 4 or IE 4.
		// First we detect the browser type
		if(document.getElementById) { // IE 5 and up, NS 6 and up
			var upLevel = true;
			}
		else if(document.layers) { // Netscape 4
			var ns4 = true;
			}
		else if(document.all) { // IE 4
			var ie4 = true;
			}

		function showObject(obj) {
			if (ns4) {
				obj.visibility = "show";
				}
			else if (ie4 || upLevel) {
				obj.style.visibility = "visible";
				}
			}
		function hideObject(obj) {
			if (ns4) {
				obj.visibility = "hide";
				}
			if (ie4 || upLevel) {
				obj.style.visibility = "hidden";
				}
			}