/***********************************************************
 * @author Maria A. Zamora
 * @company Digitec Interactive Inc.
 * @version 0.1
 * @date 12/14/2010
 * 
 *HTMLtable class for conceptsFrame3 movie of the CEE application
 * CS5 version of com.digitec.cee.HTMLtable  
**********************************************************/
package com.digitec.cee
{	
	public class HTMLtable 
	{						
		private var _isbn:String;
		private var _htmlTableOfContent:String;				
		
		 public function HTMLtable( _html:String )
		 {			
		 	//SEARCH FOR STRING "<H4>" + ISBN + </H4>
				var matchPub:RegExp =/<h4>.+?<\/h4>/ix; //THIS MATCH ALL THE TEXT BETWEEN <H4> AND </H4>, INCLUDING THE TAGS OF FIRST INSTANCE
				var arr:Array = _html.match(matchPub) ;  //output: <H4> xxxxxxxxxxxxxxx </H4>
				var fname:String = arr[0].replace("<h4>",  "");  //eliminate <h4>
				fname = fname.replace("</h4>", ""); //eliminate </h4>
				fname = fname.replace("<H4>", ""); //eliminate <H4> if any
				fname = fname.replace("</H4>", ""); //eliminate </H4> if any
				_isbn = fname;			
				_htmlTableOfContent = _html;
		}										
		
		/*
		
		var functionArray:Array = new Array(); 				
				var match:RegExp =/function=.+?,/ix; 
				var argumentsStr:String = str.replace( match, "" );
				var arr:Array = str.match(match) ;  //output: function=viewLesson,
				var match2:RegExp =/function=?/ix;  //match: function=				
				var fname:String = arr[0].replace(match2,  "");  //replace match2 (function=) for nothing //output: viewLesson,
				fname = fname.replace("=", ""); //eliminate any comma
				fname = fname.replace(" ", ""); //eliminate anywhite space
				fname = fname.replace(",",  ""); //replace function= for nothing //output: viewLesson,				
				functionArray[0] = fname;
				functionArray[1] = argumentsStr;
				return functionArray;
		*/
		
		
		/*******************************************************************
	 	* GET FUNCTIONS
		*******************************************************************/						
		public function get isbn():String{ return _isbn; }
		
		public function get htmlTableOfContent():String	{ return _htmlTableOfContent; }								
		
		/*******************************************************************
	 	* SET FUNCTIONS
		*******************************************************************/								
		//public function set_relatedConcept( num:int ):void	{ _relatedConceptsArr.push(num); }						
		
				
 
	} // Main class
 
} //end package



/************************************************************************************************************************** HTML STRUCTURE

***********************************************************************************************************************************/







