var bIsIE   = (document.all) ? true : false;
var iBrVrn  = (navigator.appVersion.indexOf("MSIE 5")!=-1) ? 5 : 4;
var iBrVrn  = (navigator.appVersion.indexOf("MSIE 6")!=-1) ? 6 : iBrVrn;

String.prototype.trim = function() 
{
	a = this.replace(/^\s+/, '');
	return a.replace(/\s+$/, '');
};

function popupWindow( Page, Width, Height )
{
	popWindow = window.open( Page,"popWindow","width="+(Width*1+18)+",height="+(Height*1+18)+",scrollbars=0,left="+((screen.width-Width/2))+",top="+((screen.height-Height/2))).focus();
}

function checkMail(form_name,email_field)
{
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test( eval("document."+form_name+"."+email_field+".value" )))
		return true;
	else 
		return false;
}

function FixRightSideBg(center,side)
{
	Right=document.getElementById(side).offsetHeight;
	Center=document.getElementById(center).offsetHeight;
	Left=document.getElementById("left").offsetHeight;
	if(Left>Center) Center=Left;

	if(Center<300) 
	{
		Center=300;
		document.getElementById(center).style.height="300px";		
	}
	if(Right>Center) document.getElementById(center).style.height=Right+"px";
	else document.getElementById(side).style.height=(Center*1-30*1)+"px";	
}

function group(gid)
{
	x=document.faq;
	x.gr.value=gid;
	x.submit();
}

function questions(gid,qid)
{
	x=document.faq;
	x.gr.value=gid;
	x.qu.value=qid;
	x.submit();
}
