<!--
function setCookie3(name, value,expires,path) //, expires, path, domain, secure)
{
	var pt='/';
      document.cookie = name + "=" + escape(value)+  // ";";   +
        ((expires) ? "; expires=" + expires : "")+
		((path) ? "; path=" + pt : "");
      //  ((domain) ? "; domain=" + domain : "") +
       // ((secure) ? "; secure" : "");
}

function openWin2() 
 {
	//alert(document.URL);
  // only show survey if cookie is not present
 // alert("in open win");
 var ref = null;

  if (getCookie3("foo2") != null) {
    return true;
  }
  else
  {
	  ret = setCookie3("chk",'newa',"Mon, 04-Jan-2011 00:00:00 GMT","/");
    //ret = setCookie3("foo2","bar","Mon, 04-Jan-2011 00:00:00 GMT");
    //  n = //open('../aboutdrf/legal_pop.htm','_blank','toolbar=0,directories=0,status=yes,width=660,height=560,menubar=no,scrollbars=yes,resizable=no');
    //window.location.href="http://www.doctorfungus.org/aboutdrf/legal_pop.htm";
    //window.location.href="http://www.doctorfungus.org/aboutdrf/legal_pop.htm";
   //alert(ret);
    if (ret !=0)
    {
	  window.location.href="/aboutdrf/legal_pop.htm";
	  return true;
         //ref=document.referrer;
		  ref=self.location.toString();
		  ref=ref.substring(0,27);
          //alert(ref);
		  if(ref=='http://www.doctorfungus.org')
 		  {
				window.location.href="http://www.doctorfungus.org/aboutdrf/legal_pop.htm";
		  }
		  else if(ref=='http://www.doctorfungus.com')
		  {
				window.location.href="http://www.doctorfungus.com/aboutdrf/legal_pop.htm";
		  }
		  else if(ref=='http://www.doctorfungus.net')
		  {
				window.location.href="http://www.doctorfungus.net/aboutdrf/legal_pop.htm";
		  }
		  else if(ref=='http://www.webillustrated.c')
		  {
				window.location.href="http://www.webillustrated.com/site_pre_endnote/aboutdrf/legal_pop.htm";
		  }
		  else
		  {   
				window.location.href="http://www.doctorfungus.org/aboutdrf/legal_pop.htm";
		  }
     }
    else
    {
		// alert("if ret == 0");
		//  alert("Your browser is not accepting cookies");
	 
	     window.location.href="/aboutdrf/cookies_explanation.htm";
         return false;

    }


}  //  end of else

function getCookie3(name) {
	var cookie = " " + document.cookie;
	var search = " " + name + "=";
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(";", offset)
			if (end == -1) {
				end = cookie.length;
			}
			setStr = unescape(cookie.substring(offset, end));
		}
	}
	return(setStr);
}

// -->