function ShowOrHide(d1, d2)
{
	if (d1 != '') DoDiv(d1);
	if (d2 != '') DoDiv(d2);
}

function DoDiv(id)
{
	var item = null;
	if (document.getElementById) item = document.getElementById(id);
	else if (document.all) item = document.all[id];
	else if (document.layers) item = document.layers[id];
	if (!item) {}
	else if (item.style)
	{
		if (item.style.display == "none"){ item.style.display = ""; }
		else {item.style.display = "none"; }
	}
	else{ item.visibility = "show"; }
}

function insertext(text)
{
	document.textarea.sendmessage.focus(); document.textarea.sendmessage.value=document.textarea.sendmessage.value +" "+ text; document.textarea.sendmessage.focus()
}

function show_emo(path)
{
        var emo_url = './' + path + '/' + document.add_emoticon.pic.options[document.add_emoticon.pic.selectedIndex].value;
        document.images.emoticon_preview.src = emo_url;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function centerWindow(mypage, myname, w, h, scroll, resize, status){
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resize+',stat us='+status;
win = window.open(mypage, myname, winprops);
if(parseInt(navigator.appVersion) >= 4){
win.window.focus();
}
}
