// JavaScript Document
//==============================================================
function ShowEmail(nm,domain,dotcom)
{
return "<a href='mailto:" + nm + "@" + domain + "." + dotcom + "'>" + nm + "@" + domain + "." + dotcom + "</a>"
}
function ExternalLink(sURL)
{
//	alert(GetCookie("ShowPopup"))
var x;
x = true;
if (GetCookie("ShowPopup") != "no")
   {
	 x = confirm("You are about to leave the Psoriasis Headquarters website. Please remember that we are not responsible for the content of web pages or privacy policies on any other website.\n\nThis is true of all external web sites and pages that you may be taken to from this web site, whether this message appears or not.\n\nClick OK to continue or Cancel to remain on this website.")
   }
if (x)
   {
   SetCookie("ShowPopup", "no")
   if (sURL.substring(0,4) == "http")
      window.open(sURL);
   else
      window.open("http://" + sURL );
   }
return false;   
}
//==============================================================
function GetCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

//==============================================================
function SetCookie(sName, sValue){

  //date = new Date("December 31, 2036");
  //document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString() + "; path=/";;
  document.cookie = sName + "=" + escape(sValue);

}
