/* all the onload will call this method only. this method will act as redirector */
function customBodyOnload(flag)
{
    ajaxDateFillerForAdvSearch();
	
    if( flag == 1 )
	{
        searchPageOnload(); /* this method is available in ajax.js*/
	}
	
}

/* 
  the announcement popup will show in home page only at first time.
  first time a value will be set to the cookie.
  if user come to home page again, then again it will check against cookie.
  if value already set, the popup wont shown.
  
  when user close the window. then the cookie will be cleared automatically.
*/
/**function showAnnouncementDiv()
{           
	var dia = getCookie('dia');
	if (dia!=null && dia != "")
	{
	}
	else
	{
		dia = "dia";
		setCookie(dia, dia, 1);
		hideDrop();
		announcementPopup(); /* this method is in csspopup.js
	}
}**/

/* this will hide the announcement popup*/
function hideDrop()
{
  try
  {
    document.getElementById('showDropDown').style.display = 'none';// this class in body-1.component
	document.getElementById('showDropDown2').style.display = 'none';
  }
  catch(e)
  {
  }
}

/* this will show the announcement popup*/
function showDrop()
{
  try
  {
    document.getElementById('showDropDown').style.display = 'block';
	document.getElementById('showDropDown2').style.display = 'block';
  }
  catch(e)
  {
  }
}

/* this will in the user system cookie. */
function getCookie(c_name)
{
	if (document.cookie.length>0)
	{
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1)
		{
			c_start=c_start + c_name.length+1;
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end));
		}
	}
	return "";
}

/* a new cookie will be set in enduser machine */
function setCookie(c_name, c_value, dateDuration)
{
	//var exdate=new Date();
	//exdate.setDate(exdate.getDate());
	//document.cookie=c_name+ "=" + escape(value)+ ((expiredays==null) ? "" : ";expires=" + exdate.toUTCString());			
	document.cookie="dia=dia";
}
