//our code   net date modify : sep 20, 2k10

// dec 17. 2k9
function menuchangebgcolor(inno){
	  
    if (inno=='1') {
	document.getElementById('tdbx1').bgColor = '#E0E7F1';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
    if (inno==2) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#E0E7F1';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
    document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
    if (inno==3) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#E0E7F1';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
    if (inno==4) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#E0E7F1';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';    
	}
    if (inno==5) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#E0E7F1';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';   
	}
	if (inno==6) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#E0E7F1';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA'; 
	}
    if (inno==7) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#E0E7F1';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
    document.getElementById('tdbx21').bgColor = '#ADBFDA';
	} 
    if (inno==8) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#E0E7F1';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
    document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
    if (inno==9) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#E0E7F1';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
    document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
    if (inno==10) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#E0E7F1';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
    document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
    if (inno==11) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#E0E7F1';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
    document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
    if (inno==12) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#E0E7F1';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
    if (inno==13) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#E0E7F1';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
	if (inno==14) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#E0E7F1';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
	if (inno==15) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#E0E7F1';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
	if (inno==16) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#E0E7F1';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
	if (inno==17) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#E0E7F1';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
	if (inno==18) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#E0E7F1';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
	if (inno==19) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#E0E7F1';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
	if (inno==20) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#E0E7F1';
	document.getElementById('tdbx21').bgColor = '#ADBFDA';
	}
	if (inno==21) { 
    document.getElementById('tdbx1').bgColor = '#ADBFDA';document.getElementById('tdbx2').bgColor = '#ADBFDA';
    document.getElementById('tdbx3').bgColor = '#ADBFDA';document.getElementById('tdbx4').bgColor = '#ADBFDA';
    document.getElementById('tdbx5').bgColor = '#ADBFDA';document.getElementById('tdbx6').bgColor = '#ADBFDA';
    document.getElementById('tdbx7').bgColor = '#ADBFDA';document.getElementById('tdbx8').bgColor = '#ADBFDA';
	document.getElementById('tdbx9').bgColor = '#ADBFDA';document.getElementById('tdbx10').bgColor = '#ADBFDA';
	document.getElementById('tdbx11').bgColor = '#ADBFDA';document.getElementById('tdbx12').bgColor = '#ADBFDA';
	document.getElementById('tdbx13').bgColor = '#ADBFDA';document.getElementById('tdbx14').bgColor = '#ADBFDA';
	document.getElementById('tdbx15').bgColor = '#ADBFDA';document.getElementById('tdbx16').bgColor = '#ADBFDA';
	document.getElementById('tdbx17').bgColor = '#ADBFDA';document.getElementById('tdbx18').bgColor = '#ADBFDA';
	document.getElementById('tdbx19').bgColor = '#ADBFDA';document.getElementById('tdbx20').bgColor = '#ADBFDA';
	document.getElementById('tdbx21').bgColor = '#E0E7F1'; 
	}
	
}
// end dec 17, 2k9

// dec 2, 2k9

function mustdelhealthrecfade(){
	var cxkezx = "";

    if(document.getElementById("checkallphefade").checked==true){
		cxkezx = true; 
		
	}else{
		cxkezx = false;
	
	}
	var btnperph = document.forms[2].checkdelhealthrecfade
	var cntperph = -1;
	for (var ixph=btnperph.length-1; ixph > -1; ixph--) {
	btnperph[ixph].checked = cxkezx; 
		
	
	}
	
}


function inboxfarec(sect,newmoon){
   
	if (sect!='9') {
		document.getElementById("fainsidebgtop").style.display = "none";
		document.getElementById("fainsidebg").style.display = "none";
		document.getElementById("facontentleftheader2").style.display = "none";
		document.getElementById("fainsidebgbottom").style.display = "none";
	} else {
		if (newmoon!='') {
	 	  document.getElementById("fainsidebgtop").style.display = "block";
		   document.getElementById("fainsidebg").style.display = "block";
		    document.getElementById("facontentleftheader2").style.display = "block";
		      document.getElementById("fainsidebgbottom").style.display = "block";
		} else {
	  	 document.getElementById("fainsidebgtop").style.display = "none";
		  document.getElementById("fainsidebg").style.display = "none";
	 	   document.getElementById("facontentleftheader2").style.display = "none";
		    document.getElementById("fainsidebgbottom").style.display = "none";
			
		}
	}

}


function mustdelhealthrecfa(){
	var cxkezx = "";

    if(document.getElementById("checkallphefa").checked==true){
		cxkezx = true; 
		
	}else{
		cxkezx = false;
	
	}
	var btnperph = document.forms[1].checkdelhealthrecfa
	
	var cntperph = -1;
	for (var ixph=btnperph.length-1; ixph > -1; ixph--) {
		btnperph[ixph].checked = cxkezx; 
		
	
	}
	
}



// end dec 2, 2k9



// nov 27, 2009
function mustdelinboxlist(){
	var cxkezx = "";
	if(document.getElementById("checkallinboxlist").checked==true){
		cxkezx = true; 
	}else{
		cxkezx = false;		
	}
	

	
	var btnperph = document.forms[1].checkdelinboxlist
	var cntperph = -1;
	for (var ixph=btnperph.length-1; ixph > -1; ixph--) {
		btnperph[ixph].checked = cxkezx; 
	}

}

function mustdelhealthrec(){
	var cxkezx = "";

    if(document.getElementById("checkallphe").checked==true){
		cxkezx = true; 
		
	}else{
		cxkezx = false;
	
	}
	var btnperph = document.forms[1].checkdelhealthrec
	var cntperph = -1;
	for (var ixph=btnperph.length-1; ixph > -1; ixph--) {
		btnperph[ixph].checked = cxkezx; 
		
	
	}
	
}
// end nov 27, 2k9


function headerchange(divid,sect){
	var divel = document.getElementById(divid);
	
divel.innerHTML = "<span class='hz'>My</span>&nbsp;<span class='hq'>Health Record</span>";
	if(sect=='1'){
		divel.innerHTML = "<span class='hz'>My</span>&nbsp;<span class='hq'>Inbox</span>";
		
	}
	if(sect=='5'){
		divel.innerHTML = "<span class='hz'>My</span>&nbsp;<span class='hq'>Appointments</span>";
	

	}
	
	if(sect=='9'){
		divel.innerHTML = "<span class='hz'>My</span>&nbsp;<span class='hq'>Family Members</span>";
	}	
	
	if(sect=='3'){
	
		divel.innerHTML = "<span class='hz'>My</span>&nbsp;<span class='hq'>Profile</span>";
	if(sect=='7'){
	    $_SESSION['add']='';$_SESSION['vload']='';
		divel.innerHTML = "<span class='hz'>My</span>&nbsp;<span class='hq'>Health Record</span>";
	}	
	
	
	}	
}

function headerchangehits(divid,sect){
	var divel = document.getElementById(divid);
	if(sect=='1'){
		divel.innerHTML = "<span class='headerlight'></span>&nbsp;<span class='headerdark'>New Register Not Verified</span>";
	}
	if(sect=='2'){
		divel.innerHTML = "<span class='headerlight'></span>&nbsp;<span class='headerdark'>Register</span>";
	}	
	if(sect=='3'){
		divel.innerHTML = "<span class='headerlight'></span>&nbsp;<span class='headerdark'>New Register</span>";
	}	
}
function headerchangeuserhits(divid,sect){
	var divel = document.getElementById(divid);
	if(sect=='1'){
		divel.innerHTML = "<span class='headerlight'></span>&nbsp;<span class='headerdark'>New Patient Register Not Verified</span>";
	}
	if(sect=='2'){
		divel.innerHTML = "<span class='headerlight'></span>&nbsp;<span class='headerdark'>Patient Register</span>";
	}	
	if(sect=='3'){
		divel.innerHTML = "<span class='headerlight'></span>&nbsp;<span class='headerdark'>New Patient Register</span>";
	}	
}

//optimind code

function checksetappt(){
	var xdate_month= document.getElementById("month").value;
	var xdate_day= document.getElementById("day").value;
	var xdate_year= document.getElementById("year").value;
	var xlocation= document.getElementById("hlocation").value;
	var xsetmsg= document.getElementById("setmsg").value;
	var xdt=xdate_day+"/"+xdate_month+"/"+xdate_year;
//	var xdt=xdate_year+"-"+xdate_month+"-"+xdate_day;
	var xspace ='     ';
	var msgerr = "";
	var	datemsg = isDate(xdt);
	if (datemsg!=true){
		msgerr +=xspace+datemsg+' \n';
	}
	if(xlocation==''){
		msgerr +=xspace+'Location'+' \n';
	}
	if(xsetmsg==''){
		msgerr +=xspace+'Message'+' \n';
	}
	if(msgerr!=''){
		alert("Error:\n"+msgerr);
		return false;
	}
}

function inboxshpat(sect){

	if (sect!='7') {
		document.getElementById("inbox_7").style.display = "none";
	}
    if (sect!='9') {
		document.getElementById("inbox_9").style.display = "none";
	}
    var secx=1;
	for (secx=1;secx<=5;secx++){
		document.getElementById("inbox_"+secx).style.display = "none";
		
	}
	document.getElementById("inbox_"+sect).style.display = "block";
	if(sect=='1' || sect=='2' || sect=='3' || sect=='7' || sect=='9'){
		document.getElementById("pageactive").value = sect;
		
	}

   
    
	if(sect=='7') {
	 
	   document.getElementById("pageactive").value = '7';
	   	   
	}
	if(sect=='9') {
	 
	   document.getElementById("pageactive").value = '9';
	   	   
	}
	if(sect=='1') {
	 
	   document.getElementById("pageactive").value = '1';
	   	   
	}
	

}


function inboxsh(sect){
	var secx=1;
	for (secx=1;secx<=5;secx++){
		document.getElementById("inbox_"+secx).style.display = "none";
	}
	document.getElementById("inbox_"+sect).style.display = "block";
	if(sect=='1' || sect=='2' || sect=='3'){
		document.getElementById("pageactive").value = sect;
	}
}
function mustdel(){
	var cxkezx = "";
	if(document.getElementById("checkall").checked==true){
		cxkezx = true;
	}else{
		cxkezx = false;		
	}
	var btnperph = document.forms[0].checkdel
	var cntperph = -1;
	for (var ixph=btnperph.length-1; ixph > -1; ixph--) {
		btnperph[ixph].checked = cxkezx;
	}
	
}

function mustdel1(){
	var cxkezx = "";
	if(document.getElementById("checkall").checked==true){
		cxkezx = true;
	}else{
		cxkezx = false;		
	}
	
	var btnperph = document.forms[0].chkadm
	var cntperph = -1;
	for (var ixph=btnperph.length-1; ixph > -1; ixph--) {
		btnperph[ixph].checked = cxkezx;
	}
	
}

function mustdel2(){
	var cxkezx = "";

    if(document.getElementById("checkallphe").checked==true){
		cxkezx = true; 
		
	}else{
		cxkezx = false;
	
	}
	var btnperph = document.forms[1].checkdel
	var cntperph = -1;
	for (var ixph=btnperph.length-1; ixph > -1; ixph--) {
		btnperph[ixph].checked = cxkezx;
		
	
	}
	
}


function changeKeyCaption(ioption) {
	if (ioption=='1') {
		document.getElementById("searchdesc").innerHTML = "Type Expertise or Specialty or Doctor&rsquo;s Name";//Type Doctor&rsquo;s Name or Specialty or Expertise
		document.getElementById("frmsearch").action = 'search.php';
	} else {
		document.getElementById("searchdesc").innerHTML = "Type generic or brand name of the drug";
		document.getElementById("frmsearch").action = 'search-drug.php';
	}
}
//validate date//

var dtCh= "/";
var minYear=1900;
var maxYear=2100;
function cleartext(texfield,textenterd){
	if(texfield.value==textenterd){
		texfield.value = "";
	}
}
function returntext(texfield,textenterd){
	if(texfield.value==""){
		texfield.value = textenterd;
	}
}
function isInteger(s){
	var i;
    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function daysInFebruary (year){
	// February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.
    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
function DaysArray(n) {
	for (var i = 1; i <= n; i++) {
		this[i] = 31
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
		if (i==2) {this[i] = 29}
   } 
   return this
}

function isDate(dtStr){
	var daysInMonth = DaysArray(12)
	var pos1=dtStr.indexOf(dtCh)
	var pos2=dtStr.indexOf(dtCh,pos1+1)
	var strDay=dtStr.substring(0,pos1)
	var strMonth=dtStr.substring(pos1+1,pos2)
	var strYear=dtStr.substring(pos2+1)
	strYr=strYear
	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
	}
	month=parseInt(strMonth)
	day=parseInt(strDay)
	year=parseInt(strYr)
	if (pos1==-1 || pos2==-1){
		return "The date format should be : yyyy/mm/dd"
	}
	if (strMonth.length<1 || month<1 || month>12){
		return "Please enter a valid month"
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
		return "Please enter a valid day"
	}
	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
		return "Please enter a valid 4 digit year between "+minYear+" and "+maxYear
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
		return "Please enter a valid date"
	}
return true
}
function autoclr(sec, text, xfield){
	if(sec=='1' &&  xfield.value!='' && xfield.value == text){
		xfield.value = '';
	}else if(sec=='2' &&  xfield.value==''){
		xfield.value = text;		
	}else{
		xfield.select()
		}
}
function hospothers(hospitalval){
	if(hospitalval=='others'){
			document.getElementById("divhospother").style.display='block';
		}else{
			document.getElementById("divhospother").style.display='none';
	}
}

function hospothers2(hospitalval){
	if(hospitalval=='20090167'){
			
			document.getElementById("clin_name_oth").style.display='block';
			document.getElementById("tdh").style.height='47px';
	
		}else{
			document.getElementById("clin_name_oth").style.display='none';
			document.getElementById("tdh").style.height='27px';
		   cboprovhos('','',hospitalval);cbocityhos('','',hospitalval);
			txtstreet(hospitalval);txtdistrict(hospitalval);
	}
}

//cbocityhos
function cbocityhos(provi,prevcity,comid){
	xmlhttpZ=GetXmlHttpObjectZ();
    if (xmlhttpZ==null)
     {
      alert ("Browser does not support HTTP Request");
      return;
     }
	
	
	//alert("hospital id city");
	//document.getElementById('clin_cityv').value=''+prevcity;
	// var vmuni = document.getElementById('clin_cityv').value;
	 var url="cbocity.php?";
  url=url+"gprovgetid="+provi+"&gmunigetid="+prevcity+"&gclinicgetid="+comid;
url=url+"&sid="+Math.random();
xmlhttpZ.onreadystatechange=stateChangedZ;
xmlhttpZ.open("GET",url,true);
xmlhttpZ.send(null);

}

function stateChangedZ()
{
if (xmlhttpZ.readyState==4)
{
document.getElementById("divcitycbo").innerHTML=xmlhttpZ.responseText;
}
}

//endcbocity



//cboprovhos
function cboprovhos(provi,prevcity,comid){
	xmlhttpX=GetXmlHttpObjectX();
    if (xmlhttpX==null)
     {
      alert ("Browser does not support HTTP Request");
      return;
     }
	// var hd1 = document.getElementById('h1prov').value;
 //    if (provi=='') {provi=hd1;}     
//alert("com id : "+comid);
	      	//document.getElementById('clin_cityv').value=''+prevcity;
	// var vmuni = document.getElementById('clin_cityv').value;
	 var url="cboprov.php?";
  url=url+"gprovgetid="+provi+"&gmunigetid="+prevcity+"&gclinicgetid="+comid;
url=url+"&sid="+Math.random();
xmlhttpX.onreadystatechange=stateChangedX;
xmlhttpX.open("GET",url,true);
xmlhttpX.send(null);

}

function stateChangedX()
{
if (xmlhttpX.readyState==4)
{
document.getElementById("divprovcbo").innerHTML=xmlhttpX.responseText;
}
}

//endcboprovhos

//txtstreet
function txtstreet(comid){
	xmlhttpST=GetXmlHttpObjectST();
    if (xmlhttpST==null)
     {
      alert ("Browser does not support HTTP Request");
      return;
     }
	 
	// alert("txtstreet");
	// var vmuni = document.getElementById('clin_cityv').value;
	 var url="txtnostreet.php?";
  url=url+"gclinicgetid="+comid;
url=url+"&sid="+Math.random();
xmlhttpST.onreadystatechange=stateChangedST;
xmlhttpST.open("GET",url,true);
xmlhttpST.send(null);

}

function stateChangedST()
{
if (xmlhttpST.readyState==4)
{
document.getElementById("divnostreet").innerHTML=xmlhttpST.responseText;
}
}

//endtxtstreet

//txtdistrict
function txtdistrict(comid){
	xmlhttpD=GetXmlHttpObjectD();
    if (xmlhttpD==null)
     {
      alert ("Browser does not support HTTP Request");
      return;
     }
	// var vmuni = document.getElementById('clin_cityv').value;
	 var url="txtdistrict.php?";
  url=url+"gclinicgetid="+comid;
url=url+"&sid="+Math.random();
xmlhttpD.onreadystatechange=stateChangedD;
xmlhttpD.open("GET",url,true);
xmlhttpD.send(null);

}

function stateChangedD()
{
if (xmlhttpD.readyState==4)
{
document.getElementById("divdistrict").innerHTML=xmlhttpD.responseText;
}
}

//endtxtdistrict


function checksearch(){
	var tfield = document.getElementById("keyword");
	if(tfield.value.length<2){
		alert('Search field must not be less than 2 characters. \n Please try again.');
		tfield.focus();
		return false;
	}
}
function echeck2(str) {
		//	alert(str);
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		  // alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		  // alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		   // alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    //alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(" ")!=-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }
 		 return true
	}
//end of validating date

function GetXmlHttpObjectX()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}	

function GetXmlHttpObjectZ()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}	

function GetXmlHttpObjectST()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}	

function GetXmlHttpObjectD()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}	
