function relTags() 
{
	if (document.getElementsByTagName) 
	{
		var anchors = document.getElementsByTagName( "a" );
		for (var loop = 0; loop < anchors.length; loop++) 
		{
			var anchor = anchors[loop];
			if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") 
			{
				anchor.target = "_blank";
			}
		}
	}
}	

window.onload = function() 
{
	relTags();
}

function check_mail(email)
{	
	var re3 = /^\s*([a-zA-Z0-9\._\-]{1,100})@([a-zA-Z0-9\.\-_]){1,100}\.([a-zA-Z]{2,4})\s*$/gi;
     
    if (email.value.length >0 && !email.value.match(re3)) 
	{
		alert("Please enter a valid email address");
		return false;
	}
	
	return true;
}

function add_favorites()
{
	var detect = navigator.userAgent.toLowerCase();
	//alert(detect);
	
	if(detect.indexOf('opera') + 1) alert("After you close this dialog please press CTRL+T to add SEOarticles4U to Favorites");
	else if(detect.indexOf('msie') + 1) window.external.AddFavorite("http://www.SEOarticles4U.com","~SEOarticles4U.com");
	else if(detect.indexOf('firefox') + 1) alert("After you close this dialog please press CTRL+D to add SEOarticles4U to Favorites");
	else if(detect.indexOf('netscape') + 1) alert("After you close this dialog please press CTRL+D to add SEOarticles4U to Favorites");
	else alert("Please use your browser's menu to add SEOarticles4U to Favorites");
}