//クッキーを取得する関数。引数にはクッキーから検索する文字列を指定。function GetCookie(strName){ var strReturn = ""; var nLoop = 0; var nLength = 0; var strNameEx = strName + "="; var strTemp = ""; //ループで引数の値が存在するかどうかをチェック。 while (nLoop < document.cookie.length)   {   nLength = nLoop + strNameEx.length;   //存在すればその値を判断し戻す。   if (document.cookie.substring(nLoop, nLength) == strNameEx)    {     strTemp = document.cookie.indexOf(";", nLength);     if (strTemp == -1)      {       strReturn = document.cookie.substring(nLength,document.cookie.length);      }     else     {      strReturn = document.cookie.substring(nLength, strTemp);     }   break;   }  //存在しなければ次へ、なければ終了  nLoop = document.cookie.indexOf(" ", nLoop) + 1;  if (nLoop == 0)  {   break;  } } return strReturn;}//画像をhtmlに表示function CheckName(){ strName = GetCookie("VisitName");if (strName == "") {  strName ="pmc_image/null.gif";   }}//画像をhtmlに表示function CheckName2(){ mailName = GetCookie("VisitName2");if (mailName == "") { mailName = "hazaken";   }}//画像のクリック処理function go(){location.href = "mailto:"+mailName + "@pharmedico.com";}