/*/// AddToFavorites /// FUNCTION ///*/
function AddToFavorites()   
{   
    var title = document.title; var url = location.href;   
    if (window.sidebar) // Firefox   
        window.sidebar.addPanel(title, url, '');   
    else if(window.opera && window.print) // Opera   
    {   
        var elem = document.createElement('a');   
        elem.setAttribute('href',url);   
        elem.setAttribute('title',title);   
        elem.setAttribute('rel','sidebar'); // required to work in opera 7+   
        elem.click();   
    }    
    else if(document.all) // IE   
        window.external.AddFavorite(url, title);   
}  

/*/// TellFriend /// FUNCTION ///*/
function TellFriend(ref)
{ 
var str="toolbar=no,status=no,menubar=no,location=no,scrollbars=yes,resizable=yes,directories=no,height=490px,width=200px"
	tellaFriend = window.open(ref,"TellObj",str);
    tellaFriend.opener = top;
}

/*/// checkform /// FUNCTION ///*/
function checkform(){ //v2.0
	
	if (document.profiledoc.fromEmail.value=="" || document.profiledoc.fromEmail.value.indexOf("@")==-1 || document.profiledoc.fromEmail.value.indexOf(".")==-1 || document.profiledoc.fromEmail.value.indexOf("/")!=-1 || document.profiledoc.fromEmail.value.indexOf("\\")!=-1 || document.profiledoc.fromEmail.value.indexOf("\\")!=-1 || document.profiledoc.fromEmail.value.indexOf('"')!=-1 || document.profiledoc.fromEmail.value.indexOf("'")!=-1 || document.profiledoc.fromEmail.value.indexOf(" ")!=-1)
		{
		//alert("Detta är ingen korrekt e-post adress");
		alert("<%=er_email%>");
		document.profiledoc.fromEmail.focus();
		return;
		}
	
	if (document.profiledoc.toEmail.value=="" || document.profiledoc.toEmail.value.indexOf("@")==-1 || document.profiledoc.toEmail.value.indexOf(".")==-1 || document.profiledoc.toEmail.value.indexOf("/")!=-1 || document.profiledoc.toEmail.value.indexOf("\\")!=-1 || document.profiledoc.toEmail.value.indexOf("\\")!=-1 || document.profiledoc.toEmail.value.indexOf('"')!=-1 || document.profiledoc.toEmail.value.indexOf("'")!=-1 || document.profiledoc.toEmail.value.indexOf(" ")!=-1)
		{
		//alert("Detta är ingen korrekt e-post adress");
		alert("Your friend's mail?");
		document.profiledoc.toEmail.focus();
		return;
		}

	document.profiledoc.submit();
		
}