//MF.js division-7.com for marksflowers.com 11/18/2003
var HOME='http://www.marksflowers.com/'; //'http://abq-www-01.lobo.net/marksflowers.com/'
//HOME='http://67.205.33.38/';
var CGI=HOME+'cgi-bin/order.pl'
var PG_DIR=HOME+'flowers'


function Oper() {
  var features="scrollbars,resizable,width=150,height=150"
  var URL=PG_DIR+'/pages/update.html'
  var winN="Update"
  upWin=window.open(URL,winN,features)
  }


// Use this function to save a cookie.
function setCookie(user, value) {
  var D=new Date()
  var T=new Date((1000*60*60*24*31) + D.getTime()) // one month
  var exp=T.toGMTString()
  document.cookie=user+"=" + escape(value) + ";path=/;expires="+exp
  //alert("new cookie path")
  }

// Use this function to delete a cookie.
function delCookie(Name) {
  if(Name=='_ALL_') {
    var dc=document.cookie.split(';');
    for (i in dc){
      var name=dc[i].split('=')
      document.cookie=name+"=; expires=Thu, 01-Jan-70 00:00:01 GMT" +  "; path=/";
      }
    }
  else {
    var C=getCookie(Name)
    if (C!="") {document.cookie=Name+"=;path=/;expires=Thu, 01-Jan-70 00:00:01 GMT"}
    }
  }

// Use this function to retrieve a cookie.
var count=0
function getCookie(name) {
  var oldCookie=""
  var dc=document.cookie;
  var c_name=name + "=";
  if (dc.length > 0) {
    var begin=dc.indexOf(c_name);
    if (begin!=-1) {
      begin+=c_name.length;
      var end=dc.indexOf(";", begin);
      if (end==-1) { end=dc.length; }
      oldCookie=unescape(dc.substring(begin, end));
      }
    }
  return oldCookie
  }

// session cookie
function cookIt(arg){
if (!arg) {arg='Session'}
  var St=getCookie(arg)
  //alert("cookie? "+St)
  if(St==''){
    var t='test'
    //alert(t)
    setCookie(arg,t)

    if(getCookie(arg) != t){
      var atext ="Your browser is not returning a cookie.\n"
          atext+="Cookies are used to track orders.\n"
      alert(atext)
      }
    }
  var session=getCookie(arg)
  //alert(session)
  if ((session)&&(session.length>9)){document.Order.Session.value=session}
  }
