// JavaScript Document

function checkMail(str)
{
			
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(str)) 
			return true;
		else 
			return false ; 
}


function morpher(obj,img)
{

	document.getElementById(obj).src = img;
}

function changeBackground(div,img)
{
	//alert(img);
	document.getElementById(div).style.backgroundImage = "url('"+img+"');";
}

 function CreateBookmarkLink() 
 {

 title = "The LOL Family"; 
  // Blogger - Replace with <$BlogItemTitle$> 
  // MovableType - Replace with <$MTEntryTitle$>

 url = "http://www.thelolfamily.com";
  // Blogger - Replace with <$BlogItemPermalinkURL$> 
  // MovableType - Replace with <$MTEntryPermalink$>
  // WordPress - <?php bloginfo('url'); ?>

	if (window.sidebar) 
	{ // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} 
	else if( window.external ) 
	{ // IE Favorite
		window.external.AddFavorite( url, title); 
	}
	else if(window.opera && window.print) 
	{ // Opera Hotlist
		return true; 
	}
 }
 
 function highlightBorder(selected,highlight)
{
	
	if(highlight == true)
	{
		document.getElementById(selected).style.border = '2px solid #FFEF00';
	}
	else if (highlight == false)
	{
		document.getElementById(selected).style.border = '2px solid #FFFFFF';
	}
}


function runJS(JSCode)
{
	eval(JSCode);
}


