function autoStyle() {
	$d = document.getElementsByTagName("td");
	for ( $ic in $d ) {
		if ( $d[$ic] == null ) continue;
		if ( $d[$ic].className == null ) continue;
		if ( $d[$ic].className == "" ) continue;
		if ( $d[$ic].className.substr(0, 5) != "eddy_" ) continue;
		setClass($d[$ic], $d[$ic].className.substr(5));
	}
	if ( document.all ) {
		$d = document.getElementsByTagName("td");
		for ( $ic in $d ) {
			if ( $d[$ic] == null ) continue;
			if ( $d[$ic].className == null ) continue;
			if ( $d[$ic].className == "" ) continue;
			if ( $d[$ic].className.substr(0, 5) != "eddy_" ) continue;
			$d[$ic].innerHTML = $d[$ic].memHTML;
			$d[$ic].memHTML = null;
			$d[$ic].className = "";
		}
	} else {
		for ( $i = 0; $i < 10; $i ++ ) {
			$d = document.getElementsByTagName("td");
			for ( $ic in $d ) {
				if ( $d[$ic] == null ) continue;
				if ( $d[$ic].className == null ) continue;
				if ( $d[$ic].className == "" ) continue;
				if ( $d[$ic].className.substr(0, 5) != "eddy_" ) continue;
				$d[$ic].innerHTML = $d[$ic].memHTML;
				$d[$ic].className = "";
			}
		}
	}
	$d = document.getElementsByTagName("td");
	for ( $ic in $d ) {
		if ( $d[$ic] == null ) continue;
		if ( $d[$ic].className == null ) continue;
		if ( $d[$ic].id.indexOf("moveCell") > -1 ) setMoveCell($d[$ic]);
		if ( $d[$ic].id.indexOf("shadowCell") > -1 ) setShadow($d[$ic]);
		if ( $d[$ic].className.indexOf("scroll") > -1 ) {
			$m = $d[$ic].innerHTML;
			if ( document.all ) {
				$d[$ic].innerHTML = "<div id='memIn' style='scrollbar-face-color: #cccccc; position: relative; height: 100%; width: 100%; overflow-y: auto'></div>";
			} else {
				$d[$ic].innerHTML = "<div id='memIn' style='background-color: transparent; position: relative; height: 100%; width: 100%; overflow: auto'></div>";
			}
			document.getElementById("memIn").innerHTML = $m;
			document.getElementById("memIn").id = "";
		}
		if ( $d[$ic].className.substr(0,8) != "memClass" ) continue;
		$d[$ic].className = $d[$ic].className.replace("memClass", "eddy_");
	}
	lookId();
}
function setMoveCell($obj) {
	if ( supervisor > 0 ) return;
	$html = "<div class='transset8' style='z-index: 1; left: 325; top: 100; position: absolute' onmouseup='endDrag()'>";
	$html += "<table cellpadding='0' cellspacing='0' border='0'><tr><td style='text-align: right' onmousedown='onoff(this, event)' style='font-size: 11; width: 100%; background-image: url(/z-img/back/bluebar.gif)' noWrap>";
	$html += window.location.host + "&nbsp;&nbsp;<img align: left; src='z-img/icoons/closepop.gif' onclick='closePp(this)' title='move to the left to get it back'></td></tr><tr><td class='" + $obj.className + "' style='" + $obj.style.cssText + "'>";
	$html += $obj.innerHTML;
	$obj.innerHTML = "&nbsp;";
	$obj.className = "";
	$obj.style.cssText = "";
	$html += "</td></tr></table></div>";
	document.getElementById("contentDiv").innerHTML += $html;
	//document.getElementById("contentDiv").style.width = "100%";
	//document.getElementById("contentDiv").style.height = "100%";
}
function setShadow($obj) {
	if ( !document.all ) return;
	if ( supervisor > 0 ) return;
	$html = "<div class='transset4' style='width: 100%; height: 100%; position: relative; left: -4; top: -4'>"
	$html += "<div style='width: 100%; height: 100%; color: #000000' class='" + $obj.className + "'>";
	$html += $obj.innerHTML;
	$html += "</div></div>";
	$obj.innerHTML = "<div style='width: 100%; height: 100%; position: absolute'>" + $obj.innerHTML + "</div>" + $html;
}
function setClass($obj, $class) {
	$c = $class.split("_");
	$url =  "z-img/class/" + $c[0];
	$html = "<table cellpadding='0' cellspacing='0' border='0' style='width: 100%; height: 100%'>";
	$html += "<tr>";
	$html += "<td style='font-size: 1'><img src='" + $url + "_1.gif' border='0' alt=''></td>";
	$html += "<td style='background-image: url(" + $url + "_2.gif); background-repeat: repeat-x; font-size: 1'>&nbsp;</td>";
	$html += "<td style='font-size: 1'><img src='" + $url + "_3.gif' border='0' alt=''></td>";
	$html += "</tr>";
	$html += "<tr>";
	$html += "<td style='background-image: url(" + $url + "_4.gif); background-repeat: repeat-y; font-size: 1'>&nbsp;</td>";
	if ( $class.indexOf("tab") > -1 || $class.indexOf("menu") > -1 || $obj.noWrap ) $nowrap = " noWrap"; else $nowrap = "";
	$inset = "";
	if ( $obj.align != "" ) $inset += " align='" + $obj.align + "' ";
	if ( $obj.vAlign != "" ) $inset += " vAlign='" + $obj.vAlign + "' ";
	$html += "<td" + $inset + $nowrap + " class='memClass" + $class + "' style='width: 100%; height: 100%'>" + $obj.innerHTML + "</td>";
	$html += "<td style='background-image: url(" + $url + "_6.gif); background-repeat: repeat-y; font-size: 1'>&nbsp;</td>";
	$html += "</tr>";
	if ( $obj.className.substr(0, 12) != "eddy_tabmenu" ) {
		$html += "<tr>";
		$html += "<td style='font-size: 1'><img src='" + $url + "_7.gif' border='0' alt=''></td>";
		$html += "<td style='background-image: url(" + $url + "_8.gif); background-repeat: repeat-x; font-size: 1'>&nbsp;</td>";
		$html += "<td style='font-size: 1'><img src='" + $url + "_9.gif' border='0' alt=''></td>";
		$html += "</tr>";
	}
	$html += "</table>";
	$d[$ic].memHTML = $html;
}
$dnr = new Array();
function lookId() {
	if ( document.getElementById("s_time") != null ) setClock();
}
function setClock() {
	showClock();
	$dnr["eddy_clock"] = window.setInterval("showClock()", 1000);
}
function showClock() {
	$d = new Date();
	$time = twee($d.getHours()) + ":" + twee($d.getMinutes()) + ":" + twee($d.getSeconds());
	document.getElementById("s_time").innerHTML = $time;
}
