<!--
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 
		else {
			return null;
		}
} //end function getCookie

function Format_BookMarks( CourseName ) {
        var bookmark,chapter, pagenum, course;
        var args = new Object();

        bookmark = getCookie("Bookmark"+ escape( CourseName ) + "=" );
        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 = '/tutorial/' + args['Course'] + '/'+ args['Chapter'] +"pg"+args['Page']+"_text.htm";
                
                return pagePath;
        } else {
                return "";
        } //end if
}//end func Format_BookMarks

function Show_BookMarks() {
        var bookmark;
		var courses = new Array('photoshop6','fireworks4','dreamweaver4','ASP','fireworks','flash5','flash4','photoshop55','javascript','dreamweaver3','html','FrontPage2000','mivamerchant','mivascript','hotmetal','dreamweaver','FrontPage98','intranet','vbscript');
		var coursenames = new Array('PhotoShop 6','Fireworks 4','Dreamweaver 4','Active Server Pages','Fireworks 3','Flash 5','Flash 4','PhotoShop 5.5','Javascript','Dreamweaver 3','HTML','FrontPage 2000','MIVA Merchant','MIVA Script','HoTMetaL PRO 6','Dreamweaver 2','FrontPage 98','Intranet Deployment Guide','VBScripting');
		
        bookmark = getCookie("Bookmark");
        
        if ( bookmark != null ) {
	        winpopup = window.open('','popup','height=300,width=325,menubar=no,scrollbars=yes,status=no,toolbar=no,screenX=100,screenY=100,left=100,top=100');
    	    winpopup.document.write('<HTML>\n<HEAD>\n');
        	winpopup.document.write('<TITLE>WhereWasI?&#153;</TITLE>\n');
        	winpopup.document.write('</HEAD>\n');
        	winpopup.document.write('<BODY>\n');
			winpopup.document.write('<IMG SRC="../wherewasi_title.gif" border="0"><BR><BR>');
        	winpopup.document.write('<FONT FACE="Verdana" Size="2">\n');
        	var link = new String();
		
			var i;
			for ( i=0; i <= courses.length; i++ ) {
	        	link = Format_BookMarks( courses[i] );
    	    	if( link.length > 0 ) {
                        winpopup.document.write('<A HREF="javascript:" onclick="window.opener.parent.location.replace(\'../../tutorial/' + courses[i] + '/index2.htm\'\)\;window.close();">' + coursenames[i] + '</A><BR>\n');
                	}// end if
				} // end for loop		

        	winpopup.document.write('<br><CENTER><A HREF="javascript:" onclick="window.close();"><img src="../closewindow.gif" border="0"></A></CENTER><BR>\n');
        	winpopup.document.write('</FONT>\n');
        	winpopup.document.write('</BODY>\n');
        	winpopup.document.write('</HTML>\n');
        	winpopup.document.close();
        } //end if 
} //end func Show_BookMarks

function Display_WWIT( WhatWuzIt ) {
    if (WhatWuzIt.length > 0 ) {
        winpopup = window.open('','popup','height=400,width=325,menubar=no,scrollbars=yes,status=no,toolbar=no,screenX=100,screenY=100,left=100,top=100');
        winpopup.document.write('<HTML>\n<HEAD>\n');
        winpopup.document.write('<TITLE>WhatWuzIt?</TITLE>\n');
        winpopup.document.write('</HEAD>\n');
        winpopup.document.write('<BODY>\n');
		winpopup.document.write('<IMG SRC="tutorial/WhutWuzIt_title_view.gif" border="0"><BR><BR>');
		winpopup.document.write('<font face="Verdana" size="2">');
        winpopup.document.write( WhatWasIt );
		winpopup.document.write('</font>');
        winpopup.document.write('<FORM>\n');
        winpopup.document.write('<CENTER><A HREF="javascript:" onclick="window.print();"><img src="printlist.gif" border="0"></A>&nbsp;&nbsp;\n');
        winpopup.document.write('<A HREF="javascript:" onclick="window.close();"><img src="closewindow.gif" border="0"></A></CENTER><BR>\n');
        winpopup.document.write('</FORM>\n');
        winpopup.document.write('</BODY>\n');
        winpopup.document.write('</HTML>\n');
        winpopup.document.close();
    }//end if 
}//end function Display_WWIT( What was it text )

function Format_WWIT( rawString ) {
	//alert( rawString.substring(0,4) );
	if ( rawString.substring(0,4) == 'WWIT' ) {
		var slashLocation = rawString.indexOf("/");
		var coursename = rawString.substring(4, slashLocation-4);
		var chapternum = rawString.substring( slashLocation-2, slashLocation );
		var pagenum = rawString.substring( slashLocation+1, slashLocation+3 );
		var whatwuzit_rawtext = rawString.substring( slashLocation+4, rawString.length );
		//alert(whatwuzit_rawtext);
		var whatwuzit_text = whatwuzit_rawtext.substring( whatwuzit_rawtext.indexOf('=')+1, whatwuzit_rawtext.length );

		var formated_WWIT = '<B><font color="#006699">Course:</font></B> ' + coursename + '<BR><B><font color="#006699">Chapter:</font></B> ' + chapternum + ' <B><font color="#006699">Page:</Font></B> ' + pagenum + '<BR><B><font color="#006699">WhatWuzIt?:</font></B> ' + whatwuzit_text+ '<BR>_______________________________';

		return formated_WWIT;
		} //end if
	else return '';
} // end function Format_WWIT( rawString )

function Show_WWIT() {
		var answer = '';
		var cookie_var='WWIT';
		//Retrieve all of the cookies into a variable called all cookies 
        var allcookies = document.cookie; 
		var the_end = allcookies.length;
		//alert(the_end);
		//alert(allcookies);

		//Locate the position of the cookie label
        while (end != the_end  && the_end > 0) { 
                //find the end of the value 
                var end = allcookies.indexOf(";"); 

                // if end is equal to negative one then set it to the length of allcookies 
                if (end == -1) end = the_end; 
             	//convert the sub string or value of the parameter and store it in answer.
				if ( Format_WWIT( unescape( allcookies.substring(0,end) ) ).length > 0 ) { 
                	answer = answer + Format_WWIT( unescape( allcookies.substring(0,end) ) ) +'<BR>'; 
				} // end if
                //alert(allcookies.substring(end+2,allcookies.length));
				allcookies = allcookies.substring(end+2,allcookies.length);
				
                //display the value 
                //alert(answer);
                //return answer;
        } //loop 
		Display_WWIT( answer );
        //alert(answer); 
} //end func show_WWIT()
//-->

