/*
	
		PURPOSE: To convert the string with product information to an array.
		MOTIVE: To easier manage the product information in the ProductMaker class.
		METHOD: Using string functions and orienting characters (*,#) in the string - get and store the information
				in the array. Get the name of the product '#' ----> '*' = name. Use a loop to get and store the 
				information between '*' as array entries.
		INPUT: String
		OUTPUT: Array with strings.
		
	*/

function productStringToArray(string){

	var a = Array();
	var store;
	
	var start = string.indexOf('#');
	var end = string.indexOf('*');
	
	var name = string.substr(start,end-start);
	a.push(name);
	alert(string.length);
	while(end != -1){
		alert(end);
		start = end;		
		end = string.indexOf('*', start+1);
		if(end != -1){
			store = string.substr(start,end-start);
			a.push(store);
		}
	}
	alert(a);
	return a;
}
