<!--
onError=null
// -->

<!-- DROP DOWN MENU -->
<!--
function gotopage() {
  if (document.dpdown.choice.selectedIndex==0) return;
  if (document.dpdown.choice.selectedIndex==1) { location.href="../home/index.html"; }
  if (document.dpdown.choice.selectedIndex==2) { location.href="../home/fitness/index.html"; }
  if (document.dpdown.choice.selectedIndex==3) { location.href="../home/quotes/index.html"; }
  if (document.dpdown.choice.selectedIndex==4) { location.href="../home/album/index.html"; }
  if (document.dpdown.choice.selectedIndex==5) { location.href="../home/files/site_map.html"; }
  if (document.dpdown.choice.selectedIndex==6) { location.href="files/contact.html"; }
}
// -->

<!-- BOOKMARK -->
<!--
function bookmark() {
 if (document.all)
 window.external.AddFavorite("http://sivamdesign.com/scripts/clocks.html","Sandeep\'s JavaScript Page (Clocks & Timers)");
 }
// -->

<!-- CLOCK I -->
<!-- 
function sivamtime() {
  now=new Date();
  hour=now.getHours();
  min=now.getMinutes();
  sec=now.getSeconds();

if (min<=9) { min="0"+min; }
if (sec<=9) { sec="0"+sec; }
if (hour>12) { hour=hour-12; add="pm"; }
else { hour=hour; add="am"; }
if (hour==12) { add="pm"; }
if (hour==00) { hour="12"; }

 document.hours.clock.value = (hour<=9) ? "0"+hour : hour;
 document.minutes.clock.value = min;
 document.seconds.clock.value = sec;
 document.ampm.clock.value= add;
document.timeForm.field.value = ((hour<=9) ? "0"+hour : hour) + ":" + min + ":" + sec + " " + add;

time1 = ((hour<=9) ? "0"+hour : hour) + ":" + min + ":" + sec + " " + add;

if (document.getElementById) { document.getElementById('theTime').innerHTML = time1; }
else if (document.layers) {
 document.layers.theTime.document.write(time1);
 document.layers.theTime.document.close(); }

setTimeout("sivamtime()", 1000);
}
// -->


<!-- STATUS LINE CALENDAR/CLOCK -->
<!-- 
function stat_clock() {
var mth=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var dy=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");

tody = new Date();
dt = tody.getDate();
dy = (dy[tody.getDay()]);
mth = (mth[tody.getMonth()]);
yr = (tody.getFullYear());

 suf = (dt==1 || dt==21 || dt==31) ? "st" : "th" &&
 (dt==2 || dt==22) ? "nd" : "th" && (dt==3 || dt==23) ? "rd" : "th"

statdate="Today is: " + dy + ", " + dt+suf + " " + mth + ", " + yr;

	hr=tody.getHours();
	mn=tody.getMinutes();
	sc=tody.getSeconds();

if (mn<=9) {
	mn="0"+mn;
 }
if (sc<=9) {
	sc="0"+sc;
 }
if (hr>12) {
	hr=hr-12;
	ad="PM";
 }
else {
	hr=hr;
	ad="AM";
 }
if (hr==12) {
	ad="PM";
 }
if (hr==00) {
	hr="12";
 }
time = " - " + ((hr<=9) ? "0"+hr : hr) + ":" + mn + ":" + sc + " " + ad;
window.status=statdate+time;
window.setTimeout('stat_clock()', 1000);
 }
//-->

<!--ALERT BOX CALENDAR/CLOCK-->
<!-- 
var 
mnth= new Array();
mnth[0]="January";	
mnth[1]="February";
mnth[2]="March";
mnth[3]="April";
mnth[4]="May";
mnth[5]="June";
mnth[6]="July";
mnth[7]="August";
mnth[8]="September";
mnth[9]="October";
mnth[10]="November";
mnth[11]="December";

var 
day1= new Array();
day1[0]="Sunday";
day1[1]="Monday";
day1[2]="Tuesday";
day1[3]="Wednesday";
day1[4]="Thursday";
day1[5]="Friday";
day1[6]="Saturday";

today1 = new Date();
date1 = today1.getDate();
day1 = (day1[today1.getDay()]);
mnth = (mnth[today1.getMonth()]);
year1 = today1.getFullYear();

 suff = (date1==1 || date1==21 || date1==31) ? "st" : "th" &&
 (date1==2 || date1==22) ? "nd" : "th" && (date1==3 || date1==23) ? "rd" : "th"

 dteStr=day1 + ", " + date1 + suff + " " + mnth + ", " + year1;

function sivamtime1() {
	now1=new Date();
	hour1=now1.getHours();
	min1=now1.getMinutes();

if (min1<=9) {
	min1="0"+min1;
 }
if (hour1>12) {
	hour1=hour1-12;
	add1=" p.m.";
 }
else {
	hour1=hour1;
	add1=" a.m.";
 }
if (hour1==12) {
	add1=" p.m.";
 }
if (hour1==00) {
	hour1="12";
 }

 tmeStr = ((hour1<=9) ? "0"+hour1 : hour1) + ":" + min1 + add1;

window.alert('The Date is: ' + dteStr + '\n' + 'The Time is: ' + tmeStr); return true;

setTimeout("sivamtime1()", 1000);

}
// -->

<!-- CALENDAR -->
<!--
var month=new Array("January","February","March","April","May","June","July","August","September","October","November","December");

var day=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");

today= new Date();
date=today.getDate();
day=(day[today.getDay()]);
month=(month[today.getMonth()]);
year=(today.getFullYear());

 suffix = (date==1 || date==21 || date==31) ? "st" : "th" &&
 (date==2 || date==22) ? "nd" : "th" && (date==3 || date==23) ? "rd" : "th"

function print_date()
{
	document.write(day + "," + "&nbsp;" + date + "<sup>" + suffix + "</sup>" + "&nbsp;" + 
	month + "," + "&nbsp;" + year);
}
// -->

<!--COUNTDOWN I-->
<!--
function count1() {

itIs = document.month3.count.value + ' ' + document.date3.count.value + ' ' + document.year3.count.value

	now3=new Date();
	setdate=new Date(itIs);

	timer = (setdate - now3) / 1000 / 60 / 60 / 24;
	timer = Math.round(timer);

  document.days3.count.value = timer;

 if (document.days3.count.value == "NaN")
 { alert('You have typed a field incorrectly!'); return false; }
  }
//-->

<!--COUNTDOWN II-->
<!--
function count2() {
itIs1 = document.month2.count1.value + ' ' + document.date2.count1.value + ' ' + document.year2.count1.value
  now4=new Date();
  setdate2=new Date(itIs1);
  timer1 = (setdate2 - now4) / 1000 / 60 / 60 / 24;
  timer1 = Math.round(timer1);
  theHour = (setdate2 - now4) / 1000 / 60 / 60;
  theHour = Math.round(theHour);
  theMinute = (setdate2 - now4) / 1000 / 60;
  theMinute = Math.round(theMinute);
  theSecond = (setdate2 - now4) / 1000;
  theSecond = Math.round(theSecond);

  document.days4.count1.value = timer1;
  document.hours4.count1.value = theHour;
  document.minutes4.count1.value = theMinute;
  document.seconds4.count1.value = theSecond;

 if (document.days4.count1.value == "NaN" || document.hours4.count1.value == "NaN" ||
     document.minutes4.count1.value == "NaN" || document.seconds4.count1.value == "NaN")
 { alert('You have typed a field incorrectly!'); return false; window.clearTimeout(SZ); }

SZ=setTimeout("count2()", 1000);
 }
//-->

<!-- COUNTDOWN TIMER -->
<!--
var secT = 40;   // set the seconds
var minT = 18;   // set the minutes

function countDownTimer() {
   secT--;
  if (secT == -01) {
   secT = 59;
   minT = minT - 1; }
  else {
   minT = minT; }

if (secT<=9) { secT = "0" + secT; }

  timeT = (minT<=9 ? "0" + minT : minT) + " min and " + secT + " sec ";

if (document.getElementById) { document.getElementById('theTimeT').innerHTML = timeT; }

CT=window.setTimeout("countDownTimer();", 1000);
if (minT == '00' && secT == '00') { secT = "00"; window.clearTimeout(CT); }
}
// -->

<!-- STOPWATCH -->
<!--
var secc = 0;
var minn = 0;
var hourr = 0;
function stopwatch(text) {
   secc++;
  if (secc == 60) {
   secc = 0;
   minn = minn + 1; }
  else {
   minn = minn; }
  if (minn == 60) {
   minn = 0; 
   hourr += 1; }

if (secc<=9) { secc = "0" + secc; }
   document.clock1.stwa.value = ((hourr<=9) ? "0"+hourr : hourr) + " : " + ((minn<=9) ? "0" + minn : minn) + " : " + secc;
   document.clock1.theButton.value = (text == "Stop ") ? "Start" : "Stop ";
  if (document.clock1.theButton.value == "Start") {
   window.clearTimeout(SD);
   return true; }
SD=window.setTimeout("stopwatch();", 1000);
}

function resetIt() {
  secc = -1;
  minn = 0;
  hourr = 0;
  if (document.clock1.theButton.value == "Stop ") {
  document.clock1.theButton.value = "Start"; }
  window.clearTimeout(SD);
 }
// -->

<!--ALARM CLOCK-->
<!-- 
function sivamtime2() {
	n=new Date();
	h=n.getHours();
	m=n.getMinutes();
	s=n.getSeconds();

if (m<=9) {
	m="0"+m;
 }
if (s<=9) {
	s="0"+s;
 }
if (h>12) {
	h=h-12;
	a="pm";
 }
else {
	h=h;
	a="am";
 }
if (h==12) {
	a="pm";
 }
if (h==00) {
	h="12";
 }
  document.hours2.clock.value = (h<=9) ? "0"+h : h;
  document.minutes2.clock.value = m;
  document.seconds2.clock.value = s;
  document.ampm2.clock.value= a;
 setTimeout("sivamtime2()", 1000);
}
// -->

<!--
function alarm() {
    note = document.arlm.message.value;
    if (note == '') {note = 'ALARM!';}

    hrs = document.arlm.hr.value;
    min = document.arlm.mts.value;
    apm = document.arlm.am_pm.value;

 if ((document.hours2.clock.value == hrs) &&
    (document.minutes2.clock.value == min) &&
    (document.ampm2.clock.value == apm) &&
    (document.arlm.music.checked == true)) {
   musicwin=window.open("","","width=200,height=50")
  if (navigator.appName=="Microsoft Internet Explorer")
   musicwin.document.write("<bgsound src='dwld/drumroll.wav' loop='infinite'>" + note)
  else
   musicwin.document.write("<embed src='dwld/drumroll.wav' hidden='true' border='0' width='20' height='20' autostart='true' loop='true'>" + note)
   musicwin.document.close()
   return false; }

 if ((document.hours2.clock.value == hrs) &&
    (document.minutes2.clock.value == min) &&
    (document.ampm2.clock.value == apm) &&
    (document.arlm.music.checked == false)) {
 alert(note); return false; }

 if (hrs == '') {alert('The Hour field is empty'); return false}
 if (min == '') {alert('The Minute field is empty'); return false}
 if (apm == '') {alert('The am/pm field is empty'); return false}

 if (hrs.length == 1) {document.arlm.hr.value = '0' + hrs}
 if (min.length == 1) {document.arlm.mts.value = '0' + min}
 if (hrs.length > 2) {alert('The Hour is wrongly typed.'); return false}
 if (min.length > 2) {alert('The Minute is wrongly typed.'); return false}
 if (apm != 'am' && apm != 'pm' ) {alert('The am/pm is wrongly typed.'); return false}

 setTimeout("alarm()", 1000);}
// -->

<!-- GMT AND TIMEOFFSET -->
<!--
 function getGMT() {
  dy1 = new Date();
  gmt = dy1.toGMTString();
  exp = gmt.substring(16,25);
  offTime = dy1.getTimezoneOffset();
 document.form10.gmt.value = exp;
 document.form10.offTime.value = offTime / 60;

 setTimeout("getGMT()", 1000);
 }
//-->

<!--12/24 HOUR FORMAT CLOCK-->
<!-- 
function formatTime() {
    now2=new Date();
    hour2=now2.getHours();
    min2=now2.getMinutes();
    sec2=now2.getSeconds();

 if (document.clocker.sivamtime[0].checked) {
   if (min2<=9) {
        min2="0"+min2; }
   if (sec2<=9) {
        sec2="0"+sec2; }
   if (hour2>12) {
	hour2=hour2-12;
	add2=" p.m."; }
   else {
	hour2=hour2;
	add2=" a.m."; }
   if (hour2==12) {
	add2=" p.m."; }
   if (hour2==00) {
	hour2="12";}

  document.clocker.sivam.value = ((hour2<=9) ? "0" + hour2 : hour2) + ":" + min2 + ":" + sec2 + add2;
 }

  if (document.clocker.sivamtime[1].checked) {
   if (min2<=9) {
	min2 = "0" + min2; }
   if (sec2<=9) {
	sec2 = "0" + sec2; }
   if (hour2<10) {
	hour2= "0" + hour2; }
  document.clocker.sivam.value = hour2 + ':' + min2 + ':' + sec2;
 }
setTimeout("formatTime()", 1000);
}
// -->

<!-- INTERNET TIME -->
<!--
function internetTime() {
  n = new Date();
  h = n.getHours() * 60;
  m = n.getMinutes();
  s = now.getSeconds() / 60;
  bmt = (n.getTimezoneOffset() + 60);
  t = ((h + m + s + bmt) * (1000 / 1440));
  intTime = Math.floor(t);
 if (intTime < 0) { intTime = intTime + 1000; }
 if (intTime < 10) { intTime = "00" + intTime; }
 if (intTime < 100) { intTime = "0" + intTime; }
  document.form11.ti.value = "@" + intTime;
  setTimeout("internetTime()", 1000);
 }
//-->
