var bIsIE   = (document.all) ? true : false;
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))+",top="+((screen.height-Height))).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 fixWhiteBackground(type)
{
	Height=document.getElementById('container').offsetHeight;
	if(Height<864)
	{
		document.getElementById('container_border').style.height=890+'px';
		document.getElementById('container').style.height=864+'px';
	}
	else
	{
		//if(bIsIE==false)	document.getElementById('container_border').style.height=Height*1+2+'px';
		//else 
		document.getElementById('container_border').style.height=Height*1+4+'px';
	}	
}
