function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function opendl(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, "window", winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//--> Chat functions
var check_n = 0;
var old_data = "--";

function refresh_cb(new_data) {	
	if (new_data != old_data) {
		document.getElementById("wall").innerHTML = new_data;
		setTimeout("refresh()", 1000);
		old_data = new_data;
	} else {
		setTimeout("refresh()", 2500);
	}
}

function refresh() {
	x_refresh(refresh_cb);
}

function add_cb() {
	// we don't care..
}

function add() {
	var line;
	var handle;
	var col;
	handle = document.getElementById("handle").value;
	line = document.getElementById("line").value;
	for(var i=0;i<6;i++) {
		if(document.f.color[i].checked == true) {col = document.f.color[i].value}
	}
	if (line == "") 
		return;
	sajax_request_type = "POST";
	x_add_line("<span style=#1#color:" + col + "#1#>[" + handle + "]</span> " + line, add_cb);
	document.getElementById("line").value = "";
}
//<-- Chat
