function sbas_next_fra(obj)
{
var nxt_xp=obj.xp;
nxt_xp++; // increment
  //--> stop at end of dat
  if(nxt_xp >= obj.urlDat.length)
  {
  //--> make timer name
  var tmr_name="tmr_"+obj.fraName;
  clearInterval(eval(tmr_name));
  return;
  }
  else
  {
  // increment xp
  obj.inc();
  //--> get current xp after increment
  var fraName=obj.fraName;
  var curLoc=obj.urlDat[obj.xp];
  sbas_frame_refresh(fraName,curLoc);
  } // end if
}

function sbas_frame_refresh(fraName,fraLoc)
{
//--> refresh iframe location
top.frames[fraName].location=fraLoc;
}

function sbas_get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function sbas_set_cookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}

