Tuesday, July 24, 2012

Digital World Clock

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 2</title>
<script language="JavaScript">
<!--
function worldClock(zone,MinI, region){
var dst = 0
var time = new Date()
var gmtMS = time.getTime() + (time.getTimezoneOffset() * 60000)
var gmtTime = new Date(gmtMS)
var day = gmtTime.getDate()
var month = gmtTime.getMonth()
var year = gmtTime.getYear()
if(year < 1000){
year += 1900
}
var monthArray = new Array("January", "February", "March", "April", "May", "June", "July", "August",
    "September", "October", "November", "December")
var monthDays = new Array("31", "28", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31")
if (year%4 == 0){
monthDays = new Array("31", "29", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31")
}
if(year%100 == 0 && year%400 != 0){
monthDays = new Array("31", "28", "31", "30", "31", "30", "31", "31", "30", "31", "30", "31")
}
var hr = gmtTime.getHours() + zone
var min = gmtTime.getMinutes()+ MinI
var sec = gmtTime.getSeconds()

if(min>59)
 {
 var min = gmtTime.getMinutes()-"30"
 var hr = hr+1
 }
if (hr >= 24){
hr = hr-24
day -= -1
}
if (hr < 0){
hr -= -24
day -= 1
}
if (hr < 10){
hr = " " + hr
}
if (min < 10){
 min = "0" + min}
if (sec < 10)
{
sec = "0" + sec
}
if (day <= 0){
if (month == 0){
 month = 11
 year -= 1
 }
 else{
 month = month -1
 }
day = monthDays[month]
}
if(day > monthDays[month]){
 day = 1
 if(month == 11){
 month = 0
 year -= -1
 }
 else{
 month -= -1
 }
}
if (region == "NAmerica"){
 var startDST = new Date()
 var endDST = new Date()
 startDST.setMonth(3)
 startDST.setHours(2)
 startDST.setDate(1)
 var dayDST = startDST.getDay()
 if (dayDST != 0){
  startDST.setDate(8-dayDST)
  }
  else{
  startDST.setDate(1)
  }
 endDST.setMonth(9)
 endDST.setHours(1)
 endDST.setDate(31)
 dayDST = endDST.getDay()
 endDST.setDate(31-dayDST)
 var currentTime = new Date()
 currentTime.setMonth(month)
 currentTime.setYear(year)
 currentTime.setDate(day)
 currentTime.setHours(hr)
 if(currentTime >= startDST && currentTime < endDST){
  dst = 1
  }
}
if (region == "Europe"){
 var startDST = new Date()
 var endDST = new Date()
 startDST.setMonth(2)
 startDST.setHours(1)
 startDST.setDate(31)
 var dayDST = startDST.getDay()
 startDST.setDate(31-dayDST)
 endDST.setMonth(9)
 endDST.setHours(0)
 endDST.setDate(31)
 dayDST = endDST.getDay()
 endDST.setDate(31-dayDST)
 var currentTime = new Date()
 currentTime.setMonth(month)
 currentTime.setYear(year)
 currentTime.setDate(day)
 currentTime.setHours(hr)
 if(currentTime >= startDST && currentTime < endDST){
  dst = 1
  }
}
if (region == "SAmerica"){
 var startDST = new Date()
 var endDST = new Date()
 startDST.setMonth(9)
 startDST.setHours(0)
 startDST.setDate(1)
 var dayDST = startDST.getDay()
 if (dayDST != 0){
  startDST.setDate(22-dayDST)
  }
  else{
  startDST.setDate(15)
  }
 endDST.setMonth(1)
 endDST.setHours(11)
 endDST.setDate(1)
 dayDST = endDST.getDay()
 if (dayDST != 0){
  endDST.setDate(21-dayDST)
  }
  else{
  endDST.setDate(14)
  }
 var currentTime = new Date()
 currentTime.setMonth(month)
 currentTime.setYear(year)
 currentTime.setDate(day)
 currentTime.setHours(hr)
 if(currentTime >= startDST || currentTime < endDST){
  dst = 1
  }
}
if (region == "Cairo"){
 var startDST = new Date()
 var endDST = new Date()
 startDST.setMonth(3)
 startDST.setHours(0)
 startDST.setDate(30)
 var dayDST = startDST.getDay()
 if (dayDST < 5){
  startDST.setDate(28-dayDST)
  }
  else {
  startDST.setDate(35-dayDST)
  }
 endDST.setMonth(8)
 endDST.setHours(11)
 endDST.setDate(30)
 dayDST = endDST.getDay()
 if (dayDST < 4){
  endDST.setDate(27-dayDST)
  }
  else{
  endDST.setDate(34-dayDST)
  }
 var currentTime = new Date()
 currentTime.setMonth(month)
 currentTime.setYear(year)
 currentTime.setDate(day)
 currentTime.setHours(hr)
 if(currentTime >= startDST && currentTime < endDST){
  dst = 1
  }
}
if (region == "India")
{
 var startDST = new Date()
 var endDST = new Date()
 startDST.setMonth(3)
 startDST.setHours(2)
 startDST.setDate(1)
 endDST.setMonth(8)
 endDST.setHours(2)
 endDST.setDate(25)
 dayDST = endDST.getDay()
 if (dayDST != 0){
 endDST.setDate(32-dayDST)
 }
 else{
 endDST.setDate(1)
 endDST.setMonth(9)
 }
 var currentTime = new Date()
 currentTime.setMonth(month)
 currentTime.setYear(year)
 currentTime.setDate(day)
 currentTime.setHours(hr)
 if(currentTime >= startDST && currentTime < endDST){
  dst = 1
  }

}
if (region == "Beirut"){
 var startDST = new Date()
 var endDST = new Date()
 startDST.setMonth(2)
 startDST.setHours(0)
 startDST.setDate(31)
 var dayDST = startDST.getDay()
 startDST.setDate(31-dayDST)
 endDST.setMonth(9)
 endDST.setHours(11)
 endDST.setDate(31)
 dayDST = endDST.getDay()
 endDST.setDate(30-dayDST)
 var currentTime = new Date()
 currentTime.setMonth(month)
 currentTime.setYear(year)
 currentTime.setDate(day)
 currentTime.setHours(hr)
 if(currentTime >= startDST && currentTime < endDST){
  dst = 1
  }
}
if (region == "Baghdad"){
 var startDST = new Date()
 var endDST = new Date()
 startDST.setMonth(3)
 startDST.setHours(3)
 startDST.setDate(1)
 endDST.setMonth(9)
 endDST.setHours(3)
 endDST.setDate(1)
 dayDST = endDST.getDay()
  var currentTime = new Date()
 currentTime.setMonth(month)
 currentTime.setYear(year)
 currentTime.setDate(day)
 currentTime.setHours(hr)
 if(currentTime >= startDST && currentTime < endDST){
  dst = 1
  }
}
if (region == "Australia"){
 var startDST = new Date()
 var endDST = new Date()
 startDST.setMonth(9)
 startDST.setHours(2)
 startDST.setDate(31)
 var dayDST = startDST.getDay()
 startDST.setDate(31-dayDST)
 endDST.setMonth(2)
 endDST.setHours(2)
 endDST.setDate(31)
 dayDST = endDST.getDay()
 endDST.setDate(31-dayDST)
 var currentTime = new Date()
 currentTime.setMonth(month)
 currentTime.setYear(year)
 currentTime.setDate(day)
 currentTime.setHours(hr)
 if(currentTime >= startDST || currentTime < endDST){
  dst = 1
  }
}

if (dst == 1){
 hr -= -1
 if (hr >= 24){
 hr = hr-24
 day -= -1
 }
 if (hr < 10){
 hr = " " + hr
 }
 if(day > monthDays[month]){
 day = 1
 if(month == 11){
 month = 0
 year -= -1
 }
 else{
 month -= -1
 }
 }
return monthArray[month] + " " + day + ", " + year + "<br>" + hr + ":" + min + ":" + sec + " DST"
}
else{
return monthArray[month] + " " + day + ", " + year + "<br>" + hr + ":" + min + ":" + sec
}
}
function worldClockZone(){
document.getElementById("GMT").innerHTML = worldClock(0,0, "Greenwich")
document.getElementById("Melbourne").innerHTML = worldClock(10,0, "Australia")
document.getElementById("Bangalore").innerHTML = worldClock(4,30, "India")
document.getElementById("Manila").innerHTML = worldClock(8,0, "Singapore")
document.getElementById("NewYork").innerHTML = worldClock(-5,0, "NAmerica")
document.getElementById("NZ").innerHTML = worldClock(12,0, "Australia")
document.getElementById("Singapore").innerHTML = worldClock(8,0, "Singapore")
setTimeout("worldClockZone()", 1000)
}
window.onload=worldClockZone;
//-->
</script>
<style type="text/css">
.body {
color: #000;
}
.hrow {
font-weight:bold;
color: #000;
}
.hrow td{
padding-top: 20px;
width: 140px;
}
</style>
</head>
<body>
<table cellspacing="5px" align="center">
<tr class="hrow">
<td>GMT</td>
<td>Melbourne</td>
<td>Bangalore</td>
<td>Manila</td>
<td>New York</td>
<td>Auckland</td>
<td>Singapore</td>
</tr>
<tr>
<td><font color="#004165"> <span id="GMT"></span></font></td>
<td><font color="#004165"> <span id="Melbourne"></span></font></td>
<td><font color="#004165"> <span id="Bangalore"></span></font></td>
<td><font color="#004165"> <span id="Manila"></span></font></td>
<td><font color="#004165"> <span id="NewYork"></span></font></td>
<td><font color="#004165"> <span id="NZ"></span></font></td>
<td><font color="#004165"> <span id="Singapore"></span></font></td>
</tr>

</table>

</body>
</html>

Color Gantt Chart

<script type="text/javascript" src="/teams/IOBE/Canttouch%20this/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
// Set PicturesPath to the URL of the library that hosts the bar images:
var PicturesPath = "/teams/IOBE/Canttouch%20this/Images";

// Collect the priority level for each task
var barColours = new Array();
var regex = /\(\d\)\s(Amar\sNaidu|Baz\sSelwyn|Carol\sFrancis|Renjiv\sRaman|Ayesha\sSultana)/;
// Find the tasks summary list
var TasksList = $(".ms-ganttOuterTable").siblings("table").find(".ms-summarystandardbody>tbody>tr:not(.ms-viewheadertr)");
if (TasksList.length == 0) TasksList = $(".ms-ganttOuterTable").siblings("table").find(".ms-listviewtable>tbody>tr:not(.ms-viewheadertr)");

TasksList.each(function(i){
try {
barColours[i] = regex.exec($(this).text())[0].substr(1,1);
}
catch(err) {barColours[i] ="";}
});
// Modify the bar color according to priority
$(".ms-ganttTaskRow").each(function(i){
$(this).find("img").each(function(){
       var source=this.src;
       source = source.replace(/.gif/, barColours[i]+".gif");
       source = source.replace(/\/_layouts\/images/,PicturesPath);
       this.src=source;
});
});
//Optional: hide the list under the Gantt view
$(".ms-summarystandardbody").hide();
$(".ms-listviewtable").hide();
</script>

Followers

No Locks without Key

🌿 Bible Verse 1 Corinthians 10:13 "No temptation has overtaken you except what is common to mankind. And God is faithful; ...

Who Am I?

My photo
What is mankind that you are mindful of them, human beings that you care for them? Psalms 8:4 But he made us a little lower than Angels and Crowned with Glory and Honor. How majestic is your name in all the Earth Oh Lord our God!