var next_sco = null;

function fakeInitialize(str) {
	return "true";
}

function fakeSetValue(str, str2) {
  if (str == "cmi.suspend_data") {
    return setCookieStr(str2);
  } else if (str == "adl.nav.request") {
    next_sco = str2;
    return "true";
  } else {
    window.status = 'SET ['+str+'] ['+str2+']';
    return "true";
  }
}

function fakeGetValue(str) {
  if (str == "cmi.suspend_data") {
    return getCookieStr();
  } else {
    window.status = 'GET ['+str+']';
    return "";
  }
}

function fakeCommit(str) {
  return "true";
}

function fakeTerminate(str) {

if (next_sco != null) 
    top.frames['content'].location = 'sco2.htm';
  next_sco = null;
  return "true";
}

function fakeGetLastError() {
  return "";
}

function fakeAPI() {		
  this.Initialize = fakeInitialize;
  this.SetValue = fakeSetValue;
  this.GetValue = fakeGetValue;
  this.Commit = fakeCommit;
  this.Terminate = fakeTerminate;
  this.GetLastError = fakeGetLastError;
}

var API_1484_11 = new fakeAPI();

/********************************/
/* Cookie HD, working properly! */
/********************************/
function getCookieStr() {
  var ckUtil = new CJL_CookieUtil("storydata", 1000);
  var cookieVal = ckUtil.getSubValue("datastr");
	if (cookieVal) {
		return cookieVal;
	} else {
		return "";
	}
}

function setCookieStr(str) {
  var ckUtil = new CJL_CookieUtil("storydata", 1000);
  ckUtil.expire();
  ckUtil = new CJL_CookieUtil("storydata", 1000);  
	ckUtil.setSubValue("datastr", str);	
	return "true";
}
