function populateList (thisListID,printPage) {

	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	// Defining Application ID
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	var thisAppID = 0;
	
	
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	// Setting global variable "cameraListID"
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	cameraListID = thisListID;
	
	
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	// Defining diffrent HTML parts for the projectlist
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	
	if (printPage) {
		var tableStartHTML = '<table border="0" cellpadding="0" cellspacing="0" width="730">';
	} else {
		var tableStartHTML = '<table border="0" cellpadding="0" cellspacing="0" width="708">';
	}
	var tableStartExportHTML = '<table border="0" cellpadding="0" cellspacing="10" width="100%">';
	
	var rowStartHTML = '<tr class="sectionList"><td width=10><img src="/core/graphics/blank.gif" width=10 height=1></td>';
	var rowStartExportHTML = '<tr class="sectionList"><td></td>';
	var rowStartHiddenHTML = '<tr class="sectionListHidden"><td width=10><img src="/core/graphics/blank.gif" width=10 height=1></td>';
	
	var rowStartHeaderHTML = '<tr class="sectionListHeader"><td width=10><img src="/core/graphics/blank.gif" width=10 height=1></td>';
	
	if (printPage) {
	var headInnerHTML = '' +
		'<td width=158><b>'+localizedArray[localizedLang][5]+'</b></td>' +
		'<td width=80><b>'+localizedArray[localizedLang][6]+'</b></td>' +
		'<td width=80 align="center"><b>'+localizedArray[localizedLang][7]+'</b></td>' +
		'<td width=200 align="right"><b>'+localizedArray[localizedLang][8]+'</b></td>' +
		'<td width=120 align="right"><b>'+localizedArray[localizedLang][9]+'&nbsp;('+userMemory[1][0][1][1]+'&nbsp;'+localizedArray[localizedLang][51]+')</b></td>';
	
	} else {
	var headInnerHTML = '' +
		'<td width=158><b>'+localizedArray[localizedLang][5]+'</b></td>' +
		'<td width=80><b>'+localizedArray[localizedLang][6]+'</b></td>' +
		'<td width=80 align="center"><b>'+localizedArray[localizedLang][7]+'</b></td>' +
		'<td width=200 align="right"><b>'+localizedArray[localizedLang][8]+'</b></td>' +
		'<td width=120 align="right"><b>'+localizedArray[localizedLang][9]+'&nbsp;('+userMemory[1][0][1][1]+'&nbsp;'+localizedArray[localizedLang][51]+')</b></td>';
	}
	
	var rowEndHTML = '</tr>';
	
	var tableEndHTML = '</table>';
	
	
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	// Defining variables for the calculation
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++		
	var tmpViewBandwidth = 0;
	var tmpRecBandwidth = 0;
	var tmpTotalRecBandwidth = 0;
	var tmpTotalViewBandwidth = 0;
	var tmpTotalAlarmBandwidth = 0;
	
	var tmpStorageWeek = 0;
	var tmpStorageMax = 0;
	var tmpTotalStorageMax = 0;
	
	var tmpTotalCameras = 0;
	var recommendClient = 0;

	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	// Building the list part, does include <tr> tag
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++		
		var contentHTML = "";
		var contentExportHTML = "";
	
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	// Loop thru userMemory Array and calculate the list output
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	

	for (n1=1; n1<userMemory[thisAppID][thisListID].length; n1++) {
		
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Sorting out the values from the userMemory Array
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	
		var thisNoOfCam = userMemory[thisAppID][thisListID][n1][4];
				tmpTotalCameras += parseInt(thisNoOfCam);
				
		var thisViewUsed = userMemory[thisAppID][thisListID][n1][5];
		var thisViewRateSec = userMemory[thisAppID][thisListID][n1][6];
		var thisViewSize = userMemory[thisAppID][thisListID][n1][10];
		
		var thisRecUsed = userMemory[thisAppID][thisListID][n1][11];
		var thisRecRateSec = userMemory[thisAppID][thisListID][n1][13];
		var thisRecSize = userMemory[thisAppID][thisListID][n1][17];
	
		var thisScheduleHour = userMemory[thisAppID][thisListID][n1][12];		
		
/*		
		var thisRecRateMin = 0;	
		var thisRecRateHour = 0;		
		
		var thisScheduleDay = 7;
*/		

		var thisAlarmUsed = userMemory[thisAppID][thisListID][n1][18];
		var thisAlarmExpected = userMemory[thisAppID][thisListID][n1][19]/100;
		var thisAlarmRateSec = userMemory[thisAppID][thisListID][n1][20];
		var thisAlarmSize = userMemory[thisAppID][thisListID][n1][24];
		
		var thisNasUsed = userMemory[1][0][1][2];
		
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Calculating the view bandwidth
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		var tmpViewBandwidth = calcViewBandwidth(thisViewRateSec,thisViewSize,thisNoOfCam); 		
		
		
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Calculating the idle rec bandwidth if it's 100%
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++				
		var tmpRecBandwidth = calcRecBandwidth(thisRecRateSec,0,0,thisRecSize,thisNoOfCam);
		
		
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Calculating the Alarm rec bandwidth if it's 100%
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++				
		var tmpAlarmBandwidth = calcRecBandwidth(thisAlarmRateSec,0,0,thisAlarmSize,thisNoOfCam);
		
		
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Calculating the idle rec storage if it's 100%
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++				
		var tmpRecStorageWeek = calcRecStorage(thisRecRateSec,thisRecSize,thisNoOfCam,thisScheduleHour,7);
		


		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Calculating the alarm rec storage if it's 100%
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++				
		var tmpAlarmStorageWeek = calcRecStorage(thisAlarmRateSec,thisAlarmSize,thisNoOfCam,24,7);
		
			
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Determing if View/Continous Rec/Event rec Checkbox is checked
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		if (thisViewUsed == 1 && thisRecUsed == 0 && thisAlarmUsed == 0) {
			tmpViewBandwidth = Math.round(tmpViewBandwidth);
			tmpRecBandwidth = 0;
			tmpAlarmBandwidth = 0;
			tmpStorageWeek = 0;
			
		} else if (thisViewUsed == 0 && thisRecUsed == 1 && thisAlarmUsed == 0) {
			tmpViewBandwidth = 0;
			tmpRecBandwidth = Math.round(tmpRecBandwidth);
			tmpAlarmBandwidth = 0;
			tmpStorageWeek = tmpRecStorageWeek;
			
		} else if (thisViewUsed == 0 && thisRecUsed == 0 && thisAlarmUsed == 1) {
			tmpViewBandwidth = 0;
			tmpRecBandwidth = 0;
			tmpAlarmBandwidth = Math.round(tmpAlarmBandwidth*thisAlarmExpected);			
			tmpStorageWeek = thisAlarmExpected*tmpAlarmStorageWeek;
		
		} else if (thisViewUsed == 1 && thisRecUsed == 1 && thisAlarmUsed == 0) {
			tmpViewBandwidth = Math.round(tmpViewBandwidth);
			tmpRecBandwidth = Math.round(tmpRecBandwidth);
			tmpAlarmBandwidth = 0;
			tmpStorageWeek = tmpRecStorageWeek;
		
		} else if (thisViewUsed == 0 && thisRecUsed == 1 && thisAlarmUsed == 1) {
			tmpViewBandwidth = 0;
			tmpRecBandwidth = Math.round(tmpRecBandwidth);
			tmpAlarmBandwidth = Math.round(tmpAlarmBandwidth*thisAlarmExpected);
			tmpStorageWeek = ((1-thisAlarmExpected)*tmpRecStorageWeek) + (thisAlarmExpected*tmpAlarmStorageWeek);
		
		} else if (thisViewUsed == 1 && thisRecUsed == 0 && thisAlarmUsed == 1) {
			tmpViewBandwidth = Math.round(tmpViewBandwidth);
			tmpRecBandwidth = 0;
			tmpAlarmBandwidth = Math.round(tmpAlarmBandwidth*thisAlarmExpected);
			tmpStorageWeek = thisAlarmExpected*tmpAlarmStorageWeek;
					
		} else if (thisViewUsed == 0 && thisRecUsed == 0 && thisAlarmUsed == 0) {
			tmpViewBandwidth = 0;
			tmpRecBandwidth = 0;
			tmpAlarmBandwidth = 0;
			tmpStorageWeek = 0;
		
		} else if (thisViewUsed == 1 && thisRecUsed == 1 && thisAlarmUsed == 1) {
			tmpViewBandwidth = Math.round(tmpViewBandwidth);
			tmpRecBandwidth = Math.round(tmpRecBandwidth);
			tmpAlarmBandwidth = Math.round(tmpAlarmBandwidth*thisAlarmExpected);
			tmpStorageWeek = ((1-thisAlarmExpected)*tmpRecStorageWeek) + (thisAlarmExpected*tmpAlarmStorageWeek);
			
		}
		
/*		
			// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			// Calculating sum of Alarm and Idle bandwidth
			// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++					
			if (tmpIdelRecBandwidth<tmpAlarmRecBandwidth) {
				tmpRecBandwidth = Math.round(tmpAlarmRecBandwidth);
			} else {
				tmpRecBandwidth = Math.round(tmpIdelRecBandwidth);	
			}
			
			
			
			// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			// Calculating the storage per week both alarm and idle
			// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++					
			tmpStorageWeek = ((1-thisAlarmExpected)*tmpIdelStorageWeek) + (thisAlarmExpected*tmpAlarmStorageWeek);
			
			
			
		} else {
			tmpRecBandwidth = tmpIdelRecBandwidth;
			tmpStorageWeek = tmpIdelStorageWeek;	
		}

		
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Determing if nasMultiplicateValue should be used. NAS radiobutton checked = true
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++		
		if (thisNasUsed == 1) {
			tmpRecBandwidth = tmpRecBandwidth*nasMultiplicateValue;	
		}
*/		

		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Calculating storage max values
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++				
		tmpStorageMax = Math.round(tmpStorageWeek*userMemory[1][0][1][1]);
		
		
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Acumulating the values used later for the sum line
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++						
		tmpTotalViewBandwidth += tmpViewBandwidth;
		tmpTotalRecBandwidth += tmpRecBandwidth;
		tmpTotalAlarmBandwidth += tmpAlarmBandwidth;
		tmpTotalStorageMax += tmpStorageMax;
		
		
		//setDataForm(document.cameraForm,0,cameraListID,cameraSetID,0,0,24);
		//setDataForm(window.parent.document.cameraForm,0,' + cameraListID + ',' + n1 + ',0,0,24);
		
		for (n=0; n<cameraList.length; n++) {
		if (cameraList[n][0] == userMemory[thisAppID][thisListID][n1][3]) {
			var model =	'AXIS '+cameraList[n][1];
		}
	}
		
		
		
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Building the content part in the list
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	
		contentHTML +=  rowStartHTML +
			'<td width="175"><b>'+ n1 +'</b> <a href="#" onclick="window.parent.cameraSetID=' + n1 + ';window.parent.setDataForm(window.parent.document.cameraForm,0,' + cameraListID + ',' + n1 + ',0,0,25); return false;"><b>' + userMemory[thisAppID][thisListID][n1][0] + '</b></a></td>' +
			'<td width="120">' + model + '</td>' + 
			'<td align="center">' + userMemory[thisAppID][thisListID][n1][4] + '</td>' +
			'<td align="right" >' + unit(tmpViewBandwidth,false) + ",&nbsp;" + unit(tmpRecBandwidth,false) + ",&nbsp;" + unit(tmpAlarmBandwidth,false) + '</td>' +
			'<td align="right" width="130">' + unit(tmpStorageMax,true) + '</td>' +
			rowEndHTML;
			
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
		// Building the content part in the list
		// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	
		contentExportHTML +=  rowStartExportHTML +
			'<td><b>'+ n1 +'</b> <b>' + userMemory[thisAppID][thisListID][n1][0] + '</b></td>' +
			'<td>' + userMemory[thisAppID][thisListID][n1][2] + '</td>' + 
			'<td align="center">' + userMemory[thisAppID][thisListID][n1][3] + '</td>' +
			'<td align="right">' + unit(tmpViewBandwidth,false) + ",&nbsp;" + unit(tmpRecBandwidth,false) + ",&nbsp;" + unit(tmpAlarmBandwidth,false) +'</td>' +
			'<td align="right">' + unit(tmpStorageMax,true) + '</td>' +
			rowEndHTML;	
		
	}
	
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	//	Recommending hardware
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

		//alert(tmpTotalCameras);
			if(parseInt(tmpTotalCameras) < 11){
				 recommend_arr = 1;
			}else if(parseInt(tmpTotalCameras) < 21){
				 recommend_arr = 2;
			}else if(parseInt(tmpTotalCameras) < 31){
				 recommend_arr = 3;
			}else if(parseInt(tmpTotalCameras)< 41){
				 recommend_arr = 4;
			}else{
				 recommend_arr = 5;
			}
			
			if(parseInt(tmpTotalCameras) > 50){
				
				limitWarning = '<div style="float:right; width:29%; margin-right:15px; color:#880000;">Your project includes more than 50 cameras. You will need more than one server with AXIS Camera Station installed  to support all cameras.</div>';
				
			}else{
				limitWarning ='';
			}
			
			HW_HTML ='';
			
			if( (userMemory[2][0][1][1] != 1) ){
				
				HW_HTML =
				'<div style="float:left; border:1px solid #bbbbbb; margin:10px; margin-top:15px; margin-bottom:100px; width:64%; ">'+
				'<div style="line-height:20px; background-color:#dddddd; padding:5px; font-weight:bold">'+
				'Client Hardware Recommendation</div>'+
				'<div style="padding:5px">';
				
				if(userMemory[2][0][1][2] == 1){
					
					HW_HTML +=
					'<b>Client/Server Combination</b><br>'+
					recommendedServer[recommend_arr][0]+',<br>'+
					recommendedServer[recommend_arr][1]+'GB RAM,<br>'+
					recommendedServer[recommend_arr][2]+'Mbit Network Card,<br>'+
					'Graphics card with full DirectX 9.0 and ' + 
					recommendedClient[recommend_arr][2]+'MB onboard memory,<br>'+
					'Professional monitor with resolution 1280x800 or higher,<br>';
					if(parseInt(tmpTotalStorageMax) > 0){
					HW_HTML += recommendedServer[recommend_arr][3] +' HDDs providing at least '+unit(parseInt(tmpTotalStorageMax*1.2),true)+' storage,<br>';
					}
					HW_HTML += 'Windows XP professional, Vista Business or Windows 7 professional or higher (32/64bit)'
			
				}else if(userMemory[2][0][1][3] == 1){
					
					HW_HTML +=
					'<b>Server</b><br>'+
				
					recommendedServer[recommend_arr][0]+',<br>'+
					recommendedServer[recommend_arr][1]+'GB RAM,<br>'+
					recommendedServer[recommend_arr][2]+'Mbit Network Card,<br>';
					if(parseInt(tmpTotalStorageMax) > 0){
					HW_HTML += recommendedServer[recommend_arr][3] +' HDDs providing at least '+unit(parseInt(tmpTotalStorageMax*1.2),true)+' storage,<br>';
					}
					HW_HTML += 'Windows XP professional, Vista Business or Windows 7 professional or higher (32/64bit)<br>'
					
					HW_HTML +=
					'<br><b>Client</b><br>'+
					recommendedClient[recommend_arr][0]+',<br>'+
					recommendedClient[recommend_arr][1]+'GB RAM,<br>'+
					recommendedServer[recommend_arr][2]+'Mbit Network Card,<br>'+
					'Graphics card with full DirectX 9.0 and ' + 
					recommendedClient[recommend_arr][2]+'MB onboard memory,<br>'+
					'Professional monitor with resolution 1280x800 or higher,<br>';
					HW_HTML += 'Windows XP professional, Vista Business or Windows 7 professional or higher (32/64bit)'
				
				
				}
					HW_HTML += '</div></div>';
					
					
					HW_HTML += 	'<div style="float:right;border:1px solid #bbbbbb; margin:10px; margin-right:15px; margin-top:15px; width:29%; ">'+
											'<div style=" line-height:20px; background-color:#dddddd; padding:5px; font-weight:bold">'+
											'License Recommendation ';
											if(userMemory[2][0][1][4]>0){
											HW_HTML +=	locationList[userMemory[2][0][1][4]].toUpperCase();
										}
					HW_HTML +=	'</div>'+
											'<div style="padding:5px">';
										
					var tmpTotalLicenses = new Array();
					var tmpTotalLicensePart = new Array();
					var j = 0;
					var g = 0;
					var licensType='base';						
					if(tmpTotalCameras <= 4){
						tmpTotalCameras = 4;
					}
						
					while(tmpTotalCameras > 0){
							
					
							
							for(i = 0; i<licenseList.length; i++){
						
									if(licenseList[i][0] == licensType && licenseList[i][1] <= tmpTotalCameras ){
											licensType = 'upgrade';
											tmpTotalCameras -= 	licenseList[i][1];				
											tmpTotalLicenses[j++] = licenseList[i][2]
										
											//--sales location from dropdown--
											if(userMemory[2][0][1][4] > (licenseList[i][3].length-1)){
												 sales_loc = 1;
											}else{
												 sales_loc = userMemory[2][0][1][4]
											}
											
											
												tmpTotalLicensePart[j] = licenseList[i][3][sales_loc];
											
												
											//alert(tmpTotalLicensePart[j])
											//HW_HTML +=licenseList[i][2]+'<br>';
											break;
									}
							}
						
						
					}
					var license_no = 0;
					var lastLicense ='';
					HW_HTML +='<table witdh="100%"><tr><td width="90%"><b>License</b></td><td><b>qty.</b></td></tr>';
					
					for(j=0;j<tmpTotalLicenses.length;j++){
						
						if(lastLicense != tmpTotalLicenses[j]){
							if(license_no > 0){
							HW_HTML += '<tr><td width="90%">'+ lastLicense+'<br> &nbsp;&nbsp;<i>Part: ' +tmpTotalLicensePart[j]+'</i>';
							HW_HTML += '</td><td>'+license_no+'<br>&nbsp;</td></tr>';	
									
							
							license_no = 0;
							}
							
							lastLicense = tmpTotalLicenses[j];
						}
							license_no++;
							
						//alert(tmpTotalLicenses[j]);
					}
						HW_HTML += '<tr><td width="90%">'+ lastLicense+'<br> &nbsp;&nbsp;<i>Part: ' +tmpTotalLicensePart[j]+'</i>';
						HW_HTML += '</td><td>'+license_no+'<br>&nbsp;</td></tr>';	
				
					HW_HTML += '</table></div></div>';
					
					HW_HTML += 	limitWarning;				
				
				if(printPage){
					contentHTML +=  rowStartHTML + '<td colspan="5">';
					contentHTML += HW_HTML;
					contentHTML += '</td>' + rowEndHTML;
				}
			
			}
			
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	// Building the sum part
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	
	var sumInnerHTML = '<td colspan=3 align=left><b>'+localizedArray[localizedLang][71]+'</b></td>' +
		'<td align="right"><b>' + unit(tmpTotalViewBandwidth,false) + ",&nbsp;" + unit(tmpTotalRecBandwidth,false) + ",&nbsp;" + unit(tmpTotalAlarmBandwidth,false) + '</b></td>' + 
		'<td align="right"><b>' + unit(tmpTotalStorageMax,true) + '</b></td>';

	
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	// Printing the data into the page
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++	
	if (printPage) {
		document.getElementById("listDIV").innerHTML = tableStartHTML +
			contentHTML +
			tableEndHTML;
	
		document.getElementById("listHead").innerHTML = tableStartHTML + 
			rowStartHeaderHTML + headInnerHTML + rowEndHTML +
			/*rowStartHiddenHTML + sumInnerHTML +  rowEndHTML +
			contentHTML +*/ 
			tableEndHTML;
		
		document.getElementById("listSum").innerHTML = tableStartHTML + 
			rowStartHTML + sumInnerHTML + rowEndHTML +
			rowEndHTML +
			
			tableEndHTML;
	
	} else {
		window.listFrame.document.getElementById("listDIV").innerHTML = tableStartHTML +
			contentHTML +
			rowStartHiddenHTML + headInnerHTML + rowEndHTML +
			rowStartHiddenHTML + sumInnerHTML +  rowEndHTML +
			tableEndHTML;
	
		
		document.getElementById("listHead").innerHTML = tableStartHTML + 
			rowStartHeaderHTML + headInnerHTML + rowEndHTML +
			rowStartHiddenHTML + sumInnerHTML +  rowEndHTML +
			contentHTML +
			tableEndHTML;
		
		document.getElementById("listSum").innerHTML = tableStartHTML + 
			rowStartHTML + sumInnerHTML + rowEndHTML +
			rowStartHiddenHTML + headInnerHTML + rowEndHTML +
			contentHTML +
			tableEndHTML;
		
		exportContainer = tableStartExportHTML +
			rowStartExportHTML + headInnerHTML + rowEndHTML +
			contentExportHTML +
			rowStartExportHTML + sumInnerHTML +  rowEndHTML +
			tableEndHTML;	
	
		document.getElementById("hw_list_div").innerHTML = HW_HTML;

	
	
	}
	
}


function saveList (listName,newList) {
	
	thisAppID = 0;
	
	if (newList) {
		var tmpListID = userMemory[thisAppID].length;
	} else { 
		var tmpListID = userMemoryListID;
	}
	
	if (newList) {
		userMemory[thisAppID][tmpListID] = eval(convertArrayToSource(userMemory[thisAppID][userMemoryListID]));
	}
	
	userMemory[thisAppID][tmpListID][0] = listName;
	
	populateList (tmpListID);
	
}


function populateListForm (listFormObj) {

	listFormObj.listID.options.length = 0;
	
	listFormObj.listID.options[0] = new Option("-- Select a list --",0);
	
	for (n1=0; n1<userMemory[0].length; n1++) {		
		
		listFormObj.listID.options[n1+1] = new Option(userMemory[0][n1][0],n1);
	}
}

loaded["list.js"] = true



