﻿function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
var day=today.getDate();
var month=today.getMonth() + 1;
var year=today.getFullYear();
 var suffix = "AM";
  if (h >= 12) {suffix = "PM";}

// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
//var dte = new Date();
//dte.setTime(dte.getTime()- dte.getTimezoneOffset()*60*1000);
//document.getElementById('dt').innerHTML=dte.toLocaleString();
document.getElementById('dt').innerHTML = "Indian DateTime: "+day+"/"+month+"/"+year+" "+ h+":"+m+":"+s+ " "+suffix;
t=setTimeout('startTime()',500);
}
function checkTime(i)
{
if (i<10)
  {
  i="0" + i;
  }
return i;
}

function popupwindow(pagename)
{

var newwindow = '';
//newwindow = window.open("test.pdf");
newwindow = window.open(pagename ,"name","width=900, height=600,location=no, menubar=no, status=no, toolbar=no, scrollbars=Yes, resizable=no");

if (!newwindow.opener) newwindow.opener = self;
if (window.focus) {newwindow.focus()}
}
