﻿var posteddate = "";

$('#btnSubmit').click(function(){
	var d = new Date();
	var t_mon = d.getMonth()+1; var t_date = d.getDate(); var t_year = d.getFullYear();
	var t_hour = d.getHours(); var t_min = d.getMinutes(); var t_sec = d.getSeconds(); var t_mil = d.getMilliseconds;
	
	if(t_hour>12){t_hour=t_hour-12;}
	if(t_hour==0){t_hour=12;}
	if(t_min<=9){t_min="0"+t_min;}
	if(t_sec<=9){t_sec="0"+t_sec;}
	if(t_date<=9){t_date="0"+t_date;}
	
	posteddate = "?pd=" + t_mon + "-" + t_date + "-" + t_year;

	updatecmmnt();});

function updatecmmnt(){
	document.myform.action="reqcommnt.php" + posteddate;
	document.myform.submit();
	settimeout(kill('popmodify'), 1000);
}

