var backColor="";

function change_cursor(id){
var div=document.getElementById(id);
div.style.cursor='hand';
//div.style.background='#ffccff';
}

function change_cursor_default(id){
var div=document.getElementById(id);
div.style.background='#FFCC99';
}

function submitto(){
$initvalue=document.getElementById("month").selectedValue;
if(document.getElementById('year').selectedIndex!=0)
	document.forms["fmonthyear"].submit();
	else{
	alert('Pilih Tahun');
	document.getElementById("month").selectedValue=$initvalue;
	}
}
function chek_year(){
//alert(document.getElementById('year').selectedIndex)
if(document.getElementById('year').selectedIndex==0)
	return true;
}

function change_backgrouund_td(row,j,tgl,tahun,bulan){

var tbl=document.getElementById("tblCallendar");
var rows=tbl.getElementsByTagName("tr");
var mytd=rows[row].childNodes.item(j); 
backColor=mytd.style.background;
mytd.style.background="#ffFF00";
//show_hint(window.event.x,window.event.y,tgl,tahun,bulan);
}

function show_hint(x,y,j,tahun,bulan){
var hint=document.getElementById("spanCallendar");
hint.style.visibility='visible';
hint.style.top=y+10;
hint.style.left=x+15;
hint.innerHTML="Absensi_PLN "+j+"/"+bulan+"/"+tahun;
}

function hide_hint(){
//var hint=document.getElementById("spanCallendar");
//hint.style.visibility='hidden';
}
function default_background_td(row,j){
var tbl=document.getElementById("tblCallendar");
var rows=tbl.getElementsByTagName("tr");
var mytd=rows[row].childNodes.item(j); 
//backColor=mytd.style.background;
mytd.style.background=backColor;
}

function hideJam(self){
var selFrom;
selFrom=document.getElementById("divSelect");
if(self.checked)
	selFrom.style.display="NONE";
else
	selFrom.style.display="";
}
