<!-- 
function getCookie( cookie_var ) {

	//Retrieve all of the cookies into a variable called all cookies 
	var allcookies = document.cookie; 

	//Locate the position of the cookie label
	var pos = allcookies.indexOf(cookie_var);      

	// if pos = -1 then cookie label wasn't found 
	if (pos != -1) { 
      
		//Locate the beginning and end of the value of our cookie label

		// Locate the start of the cookie var add the # characters found plus one 
		var start = pos + cookie_var.length; 
           
		//find the end of the value 
		var end = allcookies.indexOf(";",start); 
      
		// if end is equal to negative one then set it to the length of allcookies 
		if (end == -1) end = allcookies.length; 
           
	     //convert the sub string or value of the parameter and store it in answer. 
		answer = unescape( allcookies.substring(start,end) ); 
		
		//display the value 
		//alert(answer); 
		
		return answer;
	} // end if 

} //end function getCookie

function nav(pagenum,path) {
	//alert(top.frames.length);
	top.main.frames[0].location.href=path+"pg"+ pagenum+"_text.htm";
	top.main.frames[1].location.href=path+"pg"+ pagenum+"_nav.htm"; 
}

function LeftOff() {
	var bookmark,chapter, pagenum, course;
	var args = new Object();
	course_dir = location.pathname.split('/')
	bookmark = getCookie("Bookmark"+ escape(course_dir[2]) + "=" );
	if (bookmark != null){
	
		var pairs = bookmark.split('&');
		for( var i=0; i < pairs.length; i++ ) {
			var pos = pairs[i].indexOf('=');
			if (pos==-1) continue;
			var argname = pairs[i].substring(0,pos);
			//alert(argname);
			var value = pairs[i].substring(pos+1);
			//alert(value);
			args[argname] = unescape(value);
		} //end for
	
		var pagePath = '/online/' + args['Course'] + '/'+ args['Chapter'] ;
		
		//Debugging code
		//alert(bookmark);
		//alert( args['Course'] );
		//alert( args['Page'] );
		//alert( pagePath );
		nav(args['Page'],pagePath);
	
	
	
		
	} else {
		alert("No bookmarks");
	}
	return false;
}

 

//-->  