function getCellValue (cellOrId) {
  var cell = typeof cellOrId == 'string' ? (document.all ? document.all[cellOrId] : document.getElementById(cellOrId)) : cellOrId;
  var isMozilla = !(document.all);
  if(isMozilla)
  {
//  alert("test");
	HTMLElement.prototype.__defineGetter__("innerText", function () {
	   var r = this.ownerDocument.createRange();
	   r.selectNodeContents(this);
	   return r.toString();
	});
  }
//  if (document.all)

  if (document.all || isMozilla)
    return cell.innerText;
  else {
    cell.normalize();
    if (cell.firstChild.nodeType == 3)
      return cell.firstChild.nodeValue;
    else 
      return '';
  }
}
//alert("The site is under maintenance, testing going on...")
//alert("t1a")

var tble = document.all ? document.all['taguserlinks'] : document.getElementById('taguserlinks');
var cellval = getCellValue(tble.rows[0].cells[0]);

var loc1 = cellval.indexOf("Logged in");
var loc2 = cellval.indexOf(" ( Log ");
var uname = cellval.substr(loc1+14,loc2 - loc1 - 14);

//alert("l1="+loc1);
//alert("l2="+loc2);
//alert("uname="+uname);
//if (uname == "Guest" || uname == "visitor") {

if (cellval.match(/Welcome Guest/i)) {
//alert("match");
	if(location.href.match(/showtopic=\d+/i)) {
		location.href = "index.php?act=Login";
	}
}
// else {
//alert("no match");
//}


