    //var args = parseQueryString();
	var result;
	var boxStyle;
	var boxStyle2;
	var arr_Month = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
	var dayNum = <!--ICAL.ToDayMonthName-->;
	var newday = parseFloat("<!--ICAL.TodayDay-->");
		
	//(args['side'] == 1)?result=1:result=0;

    //if(result==1)
	//{
	//  boxStyle2='block'; 
	//  boxStyle='none';
	//}
	//else
	//{
	//  boxStyle2='none';
	//  boxStyle='block';
	//}




  <!-- Function to Go To the selected date -->
  function sendDate()
  {
    var iDay,iMonth,iYear;
	iDay = document.forms[0].GoToDay.selectedIndex;
	iMonth = document.forms[0].GoToMonth.selectedIndex;
	iYear = document.forms[0].GoToYear.selectedIndex;
	
	document.forms[0].UI_Date.value= document.forms[0].GoToYear.options[iYear].value+document.forms[0].GoToMonth.options[iMonth].value+document.forms[0].GoToDay.options[iDay].value;
	document.forms[0].UI_CurrentView.value = "DAILY";
	document.forms[0].action = "DAILYVIEW.<!--ICAL.Number-->.cgi";
	document.forms[0].submit();
  }

  <!--Function For Search -->
  function searchString()
  {
	var iDay,iMonth,iYear;
	
	iDay = document.forms[0].GoToDay.selectedIndex;
	iMonth = document.forms[0].GoToMonth.selectedIndex;
	iYear = document.forms[0].GoToYear.selectedIndex;
				
	document.forms[0].UI_Date.value= document.forms[0].GoToYear.options[iYear].value+document.forms[0].GoToMonth.options[iMonth].value+document.forms[0].GoToDay.options[iDay].value;
	document.forms[0].UI_CurrentView.value = "<!--ICAL.CurrentView-->";//"SEARCHRESULT";	

	document.forms[0].action = "SEARCHRESULT.<!--ICAL.Number-->.cgi"
	document.forms[0].submit();
  }
	
  <!-- Function to set the current date -->
  function setDate()
  {
    //if(boxStyle=='none')
	//{
	//  return;
	//}


    var tDay,lenDay,tMonth,lenMonth,tYear,lenYear,toDay;
    tDay = parseFloat("<!--ICAL.UserDay-->")-1;
	tMonth = parseFloat("<!--ICAL.UserMonth-->") - 1;
	tYear = parseFloat("<!--ICAL.UserYear-->");
	lenDay = document.forms[0].GoToDay.length;
	lenMonth = document.forms[0].GoToMonth.length;
	lenYear = document.forms[0].GoToYear.length;


	document.forms[0].GoToDay.options[tDay].selected = true;
	document.forms[0].GoToMonth.options[tMonth].selected = true;
	for(i=0; i < lenYear; i++)
	{
	  if(document.forms[0].GoToYear.options[i].value == tYear)
	  {
	    document.forms[0].GoToYear.options[i].selected = true;
	  }
	}
  }


  <!-- Function to validate the search string -->
  function chkSearchString()
  {
    var tmp_string = document.forms[0].UI_Search.value;
	if(tmp_string == "" || tmp_string.length == 0)
	{
	  alert("Please enter title to search!");
	  document.forms[0].UI_Search.focus();
	}
	else if(tmp_string.length > 80)
	{
	  alert("Title should be less than 80 characters!");
	  document.forms[0].UI_Search.focus();
	}
	else
	{
	  searchString();
	}
  }
			
  <!-- Function to validate the search string for Enter Pressed -->
  function chkSearchStringEnter()
  {
    
	var tmp_string = document.forms[0].UI_Search.value;
	if(tmp_string == "" || tmp_string.length == 0)
	{
	  alert("Please enter title to search!");
	  document.forms[0].UI_Search.focus();
	  return; 
	}
	else if(tmp_string.length > 80)
	{
	  alert("Title should be less than 80 characters!");
	  document.forms[0].UI_Search.focus();
	  return;
	}
	else
	{
	  searchString();
	}
  }

  function OpenIcal()
  { 
	var link;
	<!--ICAL.BeginSSL-->
		<!--ICAL.BeginIfCurrentDomainIsAVirtualDomain-->
			link = "https://<!--ICAL.PrimaryDomain-->:<!--ICAL.ImailSSLServerPort-->/ical.cgi?&App=IWebMsg&<!--ICAL.UserParameters-->";
			open(link,"iwebmsg", "toolbar=yes,location=1,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=1,copyhistory=0,width=512,height=512");
		<!--ICAL.ElseBeginIfCurrentDomainIsAVirtualDomain-->
			link = "https://<!--ICAL.CurrentDomain-->:<!--ICAL.ImailSSLServerPort-->/ical.cgi?&App=IWebMsg&<!--ICAL.UserParameters-->";
			open(link,"iwebmsg", "toolbar=yes,location=1,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=1,copyhistory=0,width=512,height=512");
		<!--ICAL.EndBeginIfCurrentDomainIsAVirtualDomain-->
	<!--ICAL.ElseBeginSSL-->
		<!--ICAL.BeginIfCurrentDomainIsAVirtualDomain-->
			link = "http://<!--ICAL.PrimaryDomain-->:<!--ICAL.ImailServerPort-->/ical.cgi?&App=IWebMsg&<!--ICAL.UserParameters-->";
			open(link,"iwebmsg", "toolbar=yes,location=1,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=1,copyhistory=0,width=512,height=512");
		<!--ICAL.ElseBeginIfCurrentDomainIsAVirtualDomain-->
			link = "http://<!--ICAL.CurrentDomain-->:<!--ICAL.ImailServerPort-->/ical.cgi?&App=IWebMsg&<!--ICAL.UserParameters-->";
			open(link,"iwebmsg", "toolbar=yes,location=1,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=1,copyhistory=0,width=512,height=512");
		<!--ICAL.EndBeginIfCurrentDomainIsAVirtualDomain-->
	<!--ICAL.EndBeginSSL-->
  }


  //function parseQueryString (str) 
  //{  
  //  str = str ? str : location.search;
  //  var query = str.charAt(0) == '?' ? str.substring(1) : str;
  //  var args = new Object();  
  //  if (query)
  //  {
  //    var fields = query.split('&');
  //    for (var f = 0; f < fields.length; f++)
  //  {
  //      var field = fields[f].split('=');
  //      args[unescape(field[0].replace(/\+/g, ' '))] = unescape(field[1].replace(/\+/g, ' '));
  //  }
  //  }
  //  return args;
  //}

//---------------- Function to create the list of year -------------------
function getYearList()
{
	var s_year, e_year;
	s_year = 1970;  // <!--ICAL.StartYear-->;
	e_year = 2037;  // <!--ICAL.EndYear-->;
	for (;s_year <= e_year; s_year++) 
	{
		document.write("<OPTION VALUE="+s_year+">"+s_year+"</OPTION>");
	}
}

//---------------- Function to create the list of month ------------------
var arrMonth = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
function getMonthList()
{
	for(i=0; i<arrMonth.length; i++)
	{
		var j = i + 1;
		if(j<10)
			document.write("<OPTION VALUE= 0"+j+">"+arrMonth[i]+"</OPTION>");
		else
			document.write("<OPTION VALUE="+j+">"+arrMonth[i]+"</OPTION>");
	}
}

//---------------- Function to create the list of days -------------------
function getDaysList()
{
	for (i=0; i<31; i++)
	{
		var j = i + 1;
		if(j<10)
			document.write("<OPTION VALUE= 0"+j+">"+j+"</OPTION>");
		else
			document.write("<OPTION VALUE="+j+">"+j+"</OPTION>");
	}
}