
var scrj = 1;
function softScrollBack() {
   if(navigator.appName == "Microsoft Internet Explorer" && document.compatMode == "CSS1Compat")
      var scdist = document.body.parentNode.scrollTop;
   else
      var scdist = document.body.scrollTop;
   if(scrj<50 && scdist) {
      scdist = (scdist>2) ? Math.ceil(scdist*.2) : 1;
      scrj++;
      scrollBy(0,-scdist);
      setTimeout("softScrollBack()",20);
   } else {
      scrollTo(0,0);
      scrj = 1;
   }
}

function OpenWindow (url) {
	window.open(url,'SubWindow','width=480,height=480,scrollbars=yes,status=yes');
}


function openImage(url){
	window.open(url, 'imageViewer', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,width=100,height=100');
}

function openMovie(url){
	window.open(url, 'movieViewer', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,width=480,height=300');
}

	
	function nowDateSet() {
		d_Now = new Date();
		d_Year = d_Now.getYear();
		d_Year = (d_Year < 2000) ? d_Year+1900 : d_Year; 
		d_Month = d_Now.getMonth() + 1;
		d_Day = d_Now.getDate();
		
		if(d_Month < 10){
			d_Month = "0"+d_Month;
		}
		if(d_Day < 10){
			d_Day = "0"+d_Day;
		}
		document.form1.newsDate.value = d_Year + "-" + d_Month +"-"+ d_Day;
	}
	function nowTimeSet() {
		d_Now = new Date();
		d_Hour = d_Now.getHours();
		d_Min = d_Now.getMinutes();
		d_Sec = d_Now.getSeconds();
		
		if(d_Hour < 10){
			d_Hour = "0"+d_Hour;
		}
		if(d_Min < 10){
			d_Min = "0"+d_Min;
		}
		if(d_Sec < 10){
			d_Sec = "0"+d_Sec;
		}
		document.form1.newsTime.value = d_Hour + ":" + d_Min +":"+ d_Sec;
	}
	function groupSet($groupName) {
		document.form1.groupName.value = $groupName;
	}

function comDel(ID,comID){ 

	passwd = window.prompt("書き込み時に登録したパスワードを入力してください", ""); 
	
	if(passwd != "" && passwd != null){ 
		location.href = "comment.php?action=del&ID=" + ID + "&comID=" + comID + "&pass=" + passwd + "&display=news";
	} 

}