/*
   name - name of the cookie
   value - value of the cookie
   [expires] - expiration date of the cookie
     (defaults to end of current session)
   [path] - path for which the cookie is valid
     (defaults to path of calling document)
   [domain] - domain for which the cookie is valid
     (defaults to domain of calling document)
   [secure] - Boolean value indicating if the cookie transmission requires
     a secure transmission
   * an argument defaults when it is assigned null as a placeholder
   * a null placeholder is not required for trailing omitted arguments
*/
function setCookie(name, value, path, expires, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

// date - any instance of the Date object
// * hand all instances of the Date object to this function for "repairs"
function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}


function SetBannerOnPage()
{
  // create an instance of the Date object
  var now = new Date();
  // fix the bug in Navigator 2.0, Macintosh
//  fixDate(now);
  /*
  cookie expires in one year (actually, 365 days)
  365 days in a year
  24 hours in a day
  60 minutes in an hour
  60 seconds in a minute
  1000 milliseconds in a second
  */
//  now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
//  var v_type = document.select_view_type.view_select_box.selectedIndex;
    var v_type = document.getElementById('ban_on_page').value;
//		document.getElementById('ban_on_page').value=v_type;

//  document.select_view_type.view_type_value.value=v_type;
  // set the new cookie
	  cookie_name="lubkat_onpage";
	  setCookie(cookie_name,v_type,'/');
	  document.select_view_banners.submit();
}

