var browser='';
var oldIE = false;
if (navigator.appName.toUpperCase().match(/MICROSOFT INTERNET EXPLORER/) != null)
{
	browser = 'IE';
	if(navigator.appVersion.indexOf('MSIE 5.0') > -1)
	{
		oldIE = true;
	}
}

function openImageWin(url,w,h)
{
	var top  = ((screen.availHeight-h)/2)-80;
	var left = ((screen.availWidth-w)/2);
	parem='status=0,menubar=0,resizable=0,scrollbars=0,width='+w+',height='+h+',top='+top+',left='+left+'';
	var ywin = window.open(url, "zxy", parem);
	ywin.focus();
}
function openWin(url,w,h)
{
	var top  = ((screen.availHeight-h)/2)-80;
	var left = ((screen.availWidth-w)/2);
	parem='status=0,menubar=1,resizable=1,scrollbars=yes,width='+w+',height='+h+',top='+top+',left='+left+'';
	var ywin = window.open(url, "c556zxy", parem);
	ywin.focus();
}

function make_title(str)
{
	window.document.title=window.document.title + ' - ' + str;
}

function strtrim()
{
    return this.replace(/^\s+/,'').replace(/\s+$/,'');
}
String.prototype.trim = strtrim;

function is_valid_email(str)
{
	return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
	/*
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if (!filter.test(str))
	{
		return false;
	} else {
		return true;
	}*/
}

function mouseover(t,col)
{

	/*t.style.backgroundColor = col;*/
}
function mouseoff(t,col)
{
	/* t.style.backgroundColor = col; */
}
function chat() {
	openImageWin('/lace/index.php',700,400);
}
