// Bookmark Script

function bookmark()
{
	var i = navigator.userAgent.indexOf("Netscape");
	if(i >= 0)
	{
		alert("Press Ctrl + D to Bookmark this Page");
	}
	else if (window.sidebar) // firefox
	{
		alert("Press Ctrl + D to bookmark");
	}
	else if(window.opera && window.print)
	{ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',"http://www.SleekHair.com/");
		elem.setAttribute('title',document.title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} 
	else if(document.all)// ie
	{
		//window.external.AddFavorite(window.location, document.title);
		window.external.AddFavorite("http://www.SleekHair.com/", "SleekHair.com - Discount Salon Hair Products");
	}
	else
	{
		alert("Press Ctrl + D to Bookmark this page");
	}
}

// Email Validation Function

function validateEmail(email)
{
    var splitted = email.match("^(.+)@(.+)$");
    if(splitted == null) return false;
    if(splitted[1] != null )
    {
      var regexp_user=/^\"?[\w-_\.]*\"?$/;
      if(splitted[1].match(regexp_user) == null) return false;
    }
    if(splitted[2] != null)
    {
      var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
      if(splitted[2].match(regexp_domain) == null) 
      {
	    var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
	    if(splitted[2].match(regexp_ip) == null) return false;
      }// if
      return true;
    }
return false;
}