
// コメント用ここから
var u=new String(document.location);
if( u.indexOf("cgi#cp") < 0){
 document.write('<style type="text/css">.cmnt_msg_view{display:none;}</style>');
}
function action_uri(id, val){
 document.getElementById(id).action="./nicky.cgi?DT="+val+"#"+val;
}
function cmnt_name(id){
 if( id.value=="" )
   id.value=read_cookie('CommentName');
}
function cmnt_uri(id){
 if( id.value=="" )
   id.value=read_cookie('CommentURI');
}
function write_cookie2(nmid,ulid){
 var expire = new Date(); 
 var tmg=new Date(0);
 var gs=tmg.getTime();
 var nm=escape(document.getElementById(nmid).value);
 var ul=escape(document.getElementById(ulid).value);
 if( gs > 0 ) expire.setTime(expire.getTime() - gs);

 expire.setTime(expire.getTime() + 180*24*3600*1000);
 document.cookie="CommentName=" + nm + "; expires=" + expire.toGMTString() + ";";
 document.cookie="CommentURI=" + ul + "; expires=" + expire.toGMTString() + ";"; 
}
function read_cookie(name){
 var target = name + '=';
 var c = document.cookie;
 var cookieStartIndex = c.indexOf(target);
 if (cookieStartIndex == -1)
   return '';
 var cookieEndIndex = c.indexOf(";", cookieStartIndex + target.length);
 if (cookieEndIndex == -1)   cookieEndIndex = c.length;
 return unescape(c.substring(cookieStartIndex + target.length, cookieEndIndex));
}
function getcookie(name, uri){
 var n=document.getElementById(name);
 if( !n.value )
   n.value=read_cookie('CommentName');
 n=document.getElementById(uri);
 if( !n.value )
   n.value=read_cookie('CommentURI');
}

function cmnt_view(id){
 if( document.getElementById(id).style.display != "block" ){
  document.getElementById(id).style.display="block";
 }else{
  document.getElementById(id).style.display="none";
 }
}
// コメント用ここまで

