function sfield_view(id){
 if( document.getElementById(id).style.display != "block" ){
  document.getElementById(id).style.display="block";
 }else{
  document.getElementById(id).style.display="none";
 }
}

function cmnt_view(id){ if( document.getElementById(id).style.display != "block" ){  document.getElementById(id).style.display="block"; }else{  document.getElementById(id).style.display="none"; }}
function more(id){ if( document.getElementById(id).style.display != "block" ){  document.getElementById(id).style.display="block"; }else{  document.getElementById(id).style.display="none"; }}

function showHide_lay() { 
var i,p,v,obj,args=showHide_lay.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
function MM_findObj(n, d) { 
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

// コメント用ここから
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";
 }
}
// コメント用ここまで




