var	days = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
var	months = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

function changeText(flag){
  if(flag==1){
	  document.getElementById('weboffice').innerHTML=':: LOGIN ::';
	  //document.getElementById('weboffice').style.color='#FFE777';
	  }else{
	  document.getElementById('weboffice').innerHTML='WEB OFFICE';
	  //document.getElementById('weboffice').style.color='#FADC4E';
	}
}

function highlightBtn(action, id, button){
  id='btn'+id;
  if(action==1){
    button='images/'+button+'_over.gif';
    }else{
    button='images/'+button+'.gif';
  }
  document.getElementById(id).src=button;
  document.getElementById(id).style.cursor='pointer';
}

function renderDate(option){ 
  var mydate = new Date();
  var year = mydate.getFullYear();
	var day = mydate.getUTCDay(); 
	var month = mydate.getUTCMonth();
	var daym = mydate.getUTCDate(); 
	var hours = mydate.getUTCHours();
	if (month > 3 && month <10) {
	  hours =  (hours + 1)%24;
		if (hours == 0) {
			daym++;
		}
    }else if (month == 3 && day > 0 && daym-day>24) {
			hours =  (hours + 1)%24;
			if (hours == 0) {
				daym++;
			}
		}else 
		if (month == 10 && day > 0 && daym-day>24){
			hours =  (hours + 1)%24;
			if (hours == 0) {
				daym++;
			}
		}
		if (daym < 10) daym = "0" + daym;
		var minutes = mydate.getUTCMinutes();
		var seconds = mydate.getUTCSeconds();
		var dn = "AM"; 
//		if (hours >= 12) {dn = "PM";  hours = hours - 12; } 
//		if (hours == 0)  hours = 12; 
		if (minutes <= 9)  minutes = "0" + minutes;
		if (seconds <= 9)  seconds = "0" + seconds;
		if (option == "day") {
			year2 = year.toString();
			document.getElementById("days").innerHTML = days[day]+ " " + daym +"  " + months[month] + " " +year2.substring(2,4);
		} else {
			document.getElementById("hour").innerHTML = "GMT:&nbsp;" + hours + ":" + minutes + ":" + seconds;// + " " + dn;
		}
	}

function setCursor(object){ 
   object.style.cursor="pointer";
}
