// JavaScript Document
imgformats = new Array('jpeg', 'jpg', 'gif', 'png');
function trim(str) 
{ 
	return str.replace(/^\s+|\s+$/g, ''); 
}
function validateEmail(str)
{
	var emailRegEx = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	return (str.match(emailRegEx));
}	
function checkExt(filename)
{
	if(filename == "")
		return true;
	picname = filename.toLowerCase();
	ext = picname.substr(picname.lastIndexOf(".")+1, picname.length);
	for(i=0; i<imgformats.length;i++)
		if(imgformats[i] == ext)
			return true;
	return false;		
}
function checkFlash(filename)
{
	if(filename == "")
		return true;
	picname = filename.toLowerCase();
	ext = picname.substr(picname.lastIndexOf(".")+1, picname.length);
	if(ext == 'swf')
		return true;
	else	
		return false;		
}
function Blink(layerName){
	blink_speed = 1000;
	s=document.getElementById(layerName);	
	s.style.visibility=(s.style.visibility=='visible')?'hidden':'visible';	
	setTimeout("Blink('"+layerName+"', '"+blink_speed+"')",blink_speed);
}
function MM_openBrWindow(theURL,winName,features) { 
	window.open(theURL,winName,features);
}