var focustrack=new Array()

function focus_text(t) {
	if (focustrack[t.id]) {
		if (t.value == '') {
			t.style.color = "#999999";
			t.value = focustrack[t.id];
			focustrack[t.id] = false;
		}
	}
	else {
		focustrack[t.id] = t.value;
		t.style.color = "#000000";
		t.value = '';
		
	}
}

function LoadStats() {
	document.getElementById('tinyfb.stats').innerHTML = '<p>Loading..<blink>.</blink></p>';
	var req = document.createElement('SCRIPT');
	req.type = 'text/javascript';
	req.src = "/s/index";
	document.body.appendChild(req);
}

function CheckForum(t) {
	var reg = /^[\w\.]+$/

	if ((t.pname) && (reg.test(t.pname.value)))  {
		return true;
	}
	else if ((t.nname) && (reg.test(t.nname.value))) {
		return true;
	}
	else {
		alert('Sorry,\nYour only allowed to use a-z A-Z 0-9 . _ for shortnames');
		return false;
	}
}
