function reSubmit()
{
 var elem = document.getElementById('selProducts');
 var filterValue = elem.selectedIndex;

 setCookie("filterValue",filterValue,1);
 document.frmMain.action = "webinars.php";

 document.frmMain.submit();
 
}


function setCookie(c_name, value, n_expDays)
{
  var expDate = new Date();
  expDate.setDate(expDate.getDate() + n_expDays);
  document.cookie = c_name + "=" + escape(value) + ((n_expDays == null) ? "" : "; expires = " + expDate.toGMTString());
}


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 unescape(document.cookie.substring(c_start,c_end));
}


function load()
{
	var elem = document.getElementById("selProducts");
	var cval = getCookie("filterValue");

	elem.selectedIndex = cval;

	setCookie("filterValue","null",null);
	
}
