serverURL = "http://beta1.shrimadrajchandradharampur.org"
function hide_all()
{
	hideDiv('jan');
	hideDiv('feb');
	hideDiv('mar');
	hideDiv('apr');
	hideDiv('may');
	hideDiv('jun');
	hideDiv('jul');
	hideDiv('aug');
	hideDiv('sep');
	hideDiv('oct');
	hideDiv('nov');
	hideDiv('dec');
}

function show_all()
{
	showSingleDiv('jan');
	showSingleDiv('feb');
	showSingleDiv('mar');
	showSingleDiv('apr');
	showSingleDiv('may');
	showSingleDiv('jun');
	showSingleDiv('jul');
	showSingleDiv('aug');
	showSingleDiv('sep');
	showSingleDiv('oct');
	showSingleDiv('nov');
	showSingleDiv('dec');
}

function hideDiv(name)
{
   document.getElementById(name).style.visibility ='hidden';
   document.getElementById(name).style.display = 'none';
   //alert(document.getElementById('jan').style.visibility);
}

function showSingleDiv(name)
{
	document.getElementById(name).style.visibility='visible';	
	document.getElementById(name).style.display = 'block';
}

function ifrHeight(){ 
//alert(document.body.clientHeight); 
//alert(document.body.scrollHeight); 
for(i=1;i<document.body.scrollHeight;i++){ 
document.getElementById('dataIframe').style.height=i; 
if(document.body.scrollHeight>=document.body.clientHeight){break} 
} 
document.getElementById('dataIframe').style.height=document.body.scrollHeight+550;
document.getElementById('dataIframe').setAttribute('height',document.body.scrollHeight);
//alert(document.getElementById('dataIframe').style.height); 
} 

function loadIFrame(monthNum,schdType,year)
{
	if (monthNum == -1) { 
	var dt = new Date();
	monthNum=(dt.getMonth()+1); };
	document.getElementById("dataIframe").src=serverURL+ "/Schedules/PPGSchedule?month=" + monthNum+ "&flgActive=Y&schdType=" + schdType +"&year="+year;
	ifrHeight();
	hiLite(monthNum+"TD");
}
function showDiv(name)
{	
	hide_all();
	showSingleDiv(name);
}


function hiLite(id) { 
// clear colors 
for (intI=1;intI<=12;intI++)
{
	document.getElementById(intI+"TD").style.background = "url(../images/months_bkg.jpg)"; 	
} 
document.getElementById(id).style.background = "url(../images/months_bkg_ef.jpg)"; 
} 

function showInitDiv()
{
//	showSingleDiv('nov');
	showSingleDiv('dec');
//	showSingleDiv('dec');
}



function renderMonthStrip(scheduleType)
{
/*	alert(scheduleType);
		document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">');
		document.write('<tr>');
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg_ef.jpg" id="1TD"><a class="A1" href="javascript:void(0);" onclick="hiLite("1TD");"/>Jan</a></td>');
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg.jpg" id="2TD"><a class="A1" href="javascript:void(0);" onclick="loadIFrame(2,\'' + scheduleType + '\');hiLite("2TD");"/>Feb</a></td>");
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg.jpg" id="3TD"><a class="A1" href="javascript:void(0);" onclick="loadIFrame(3,\'' + scheduleType + '\');hiLite("3TD");"/>Mar</a></td>');
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg.jpg" id="4TD"><a class="A1" href="javascript:void(0);" onclick="loadIFrame(4,\'' + scheduleType + '\');hiLite("4TD");"/>Apr</a></td>');
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg.jpg" id="5TD"><a class="A1" href="javascript:void(0);" onclick="loadIFrame(5,\'' + scheduleType + '\');hiLite("5TD");"/>May</a></td>');            
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg.jpg" id="6TD"><a class="A1" href="javascript:void(0);" onclick="loadIFrame(6,\'' + scheduleType + '\');hiLite("6TD");"/>Jun</a></td>');
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg.jpg" id="7TD"><a class="A1" href="javascript:void(0);" onclick="loadIFrame(7,\'' + scheduleType + '\');hiLite("7TD");"/>Jul</a></td>');
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg.jpg" id="8TD"><a class="A1" href="javascript:void(0);" onclick="loadIFrame(8,\'' + scheduleType + '\');hiLite("8TD");"/>Aug</a></td>');
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg.jpg" id="9TD"><a class="A1" href="javascript:void(0);" onclick="loadIFrame(9,\'' + scheduleType + '\');hiLite("9TD");"/>Sep</a></td>');
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg.jpg" id="10TD"><a class="A1" href="javascript:void(0);" onclick="loadIFrame(10,\'' + scheduleType + '\');hiLite("10TD");"/>Oct</a></td>');
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg.jpg" id="11TD"><a class="A1" href="javascript:void(0);" onclick="loadIFrame(11,\'' + scheduleType + '\');hiLite("11TD");"/>Nov</a></td>');
		document.write('<td height="34" align="center" valign="middle" background="../images/months_bkg.jpg" id="12TD"><a class="A1" href="javascript:void(0);" onclick="loadIFrame(12,\'' + scheduleType + '\');hiLite("12TD");"/>Dec</a></td>');
		document.write('</tr>');
		document.write('</table>');
		document.write('<iframe id="dataIframe" src ="" width="650" height="600" frameBorder = "0"></iframe> ');
*/		
}
