static/admin/print_r.js
function writeTable(properties, tbodyprops, name, print_r)
		{
			// only output to the tbody if there are actually props to enumerate
			if (properties.length > 0)
			{
				// Build the Header Row
				var tr = tbodyprops.appendChild(document.createElement('tr'));
				var th1 = tr.appendChild(document.createElement('th'));
				print_r.applyStyles (styleObj.propTableTh, th1);
				th1.appendChild(document.createTextNode(name));
				th1.colSpan = "3";	
				// Build the Header
				var tr = tbodyprops.appendChild(document.createElement('tr'));
				var th1 = tr.appendChild(document.createElement('th'));
				print_r.applyStyles (styleObj.propTableTd, th1);				
				th1.appendChild(document.createTextNode('Name'));
				var th1 = tr.appendChild(document.createElement('th'));
				print_r.applyStyles (styleObj.propTableTd, th1);
				th1.appendChild(document.createTextNode('toString'));
				var th1 = tr.appendChild(document.createElement('th'));
				print_r.applyStyles (styleObj.propTableTd, th1);
				th1.appendChild(document.createTextNode('Type'));
				// before we do anything lets alphabatize the list
				properties.sort(arrSort);
				// now we iterate through the list
				for (prop in properties)
				{
					if (properties[prop] && properties[prop].name)
					{
					// create a row for the object
					var tr = document.createElement('tr');
					var tdname = document.createElement('td');
					// output the div that will be clickable for appropriate elements				
					var z = document.createElement('div');	
					var a = document.createElement('a');		
					a.appendChild(document.createTextNode(properties[prop].name));					
					var type = 	properties[prop].type;				
					// if the object is enumerable or null don't run the onclick function
					if (type  != "object*")
					{
						a.href = "javascript:void(0);";
						// if the property name is a number access it as an array otherwise access it as an object 
						//i.e. array obj[4] object obj.prop
						if (isNaN(parseInt(properties[prop].name.charAt(0))))
						{
							try
							{
								var test = eval(print_r.strObjRef + "." + properties[prop].name);
								a.onclick = clickMe(print_r, print_r.strObjRef + "." + properties[prop].name);
							} catch(e) 
							{
								try {									
									var test = eval(print_r.strObjRef + "[" + properties[prop].name + "]");									
									a.onclick = clickMe(print_r, print_r.strObjRef + "[" + properties[prop].name + "]");
								}
								catch (e) 
								{
									a.onclick = clickMe(print_r, print_r.strObjRef + "['" + properties[prop].name + "']");
								}
							}
							//a.onclick = clickMe(print_r, print_r.strObjRef + "." + properties[prop].name);
							/*
							if (properties[prop].name.match(/[^a-zA-Z_\-]/g))
							{
								a.onclick = clickMe(print_r, print_r.strObjRef + "['" + properties[prop].name + "']");
							}
							else
							{
								a.onclick = clickMe(print_r, print_r.strObjRef + "." + properties[prop].name);
							}	
							*/			
						}	
						else
						{
							try
							{
								var test = eval(print_r.strObjRef + "." + properties[prop].name);	
								a.onclick = clickMe(print_r, print_r.strObjRef + "[" + properties[prop].name + "]");	
							} catch(e) 
							{
								try {
									var test = eval(print_r.strObjRef + "[" + properties[prop].name + "]");									
									a.onclick = clickMe(print_r, print_r.strObjRef + "[" + properties[prop].name + "]");
								}
								catch (e) 
								{
									a.onclick = clickMe(print_r, print_r.strObjRef + "['" + properties[prop].name + "']");
								}
							}							
						}
					}
					z.appendChild(a);
					tdname.appendChild(z);
						
					// now add the toString representation of the code.
					// some browsers keep formatting so add it to a <pre> element					
					var tdstring = document.createElement('td');	
					var pre = document.createElement('pre');
					try 
					{
						pre.appendChild(document.createTextNode(properties[prop].toString));
					} catch (e) {
						pre.appendChild(document.createTextNode('undefined1'));						
					}
					tdstring.appendChild(pre);
					// finally add the type and apply appropriate styles
					var tdtype = document.createElement('td');				
					tdtype.appendChild(document.createTextNode(properties[prop].type));
					print_r.applyStyles (styleObj.propTableTd, tdname);
					print_r.applyStyles (styleObj.name, z);
					print_r.applyStyles (styleObj.propTableTd, tdstring);
					print_r.applyStyles (styleObj.propTableTd, tdtype);					
					print_r.applyStyles (styleObj.tostring, pre);					
					tr.appendChild(tdname);
					tr.appendChild(tdstring);
					tr.appendChild(tdtype);
					tbodyprops.appendChild(tr);	
										
					} 
				}
				
			}
		}
function writeTable(properties, tbodyprops, name, print_r)
		{
			// only output to the tbody if there are actually props to enumerate
			if (properties.length > 0)
			{
				// Build the Header Row
				var tr = tbodyprops.appendChild(document.createElement('tr'));
				var th1 = tr.appendChild(document.createElement('th'));
				print_r.applyStyles (styleObj.propTableTh, th1);
				th1.appendChild(document.createTextNode(name));
				th1.colSpan = "3";	
				// Build the Header
				var tr = tbodyprops.appendChild(document.createElement('tr'));
				var th1 = tr.appendChild(document.createElement('th'));
				print_r.applyStyles (styleObj.propTableTd, th1);				
				th1.appendChild(document.createTextNode('Name'));
				var th1 = tr.appendChild(document.createElement('th'));
				print_r.applyStyles (styleObj.propTableTd, th1);
				th1.appendChild(document.createTextNode('toString'));
				var th1 = tr.appendChild(document.createElement('th'));
				print_r.applyStyles (styleObj.propTableTd, th1);
				th1.appendChild(document.createTextNode('Type'));
				// before we do anything lets alphabatize the list
				properties.sort(arrSort);
				// now we iterate through the list
				for (prop in properties)
				{
					if (properties[prop] && properties[prop].name)
					{
					// create a row for the object
					var tr = document.createElement('tr');
					var tdname = document.createElement('td');
					// output the div that will be clickable for appropriate elements				
					var z = document.createElement('div');	
					var a = document.createElement('a');		
					a.appendChild(document.createTextNode(properties[prop].name));					
					var type = 	properties[prop].type;				
					// if the object is enumerable or null don't run the onclick function
					if (type  != "object*")
					{
						a.href = "javascript:void(0);";
						// if the property name is a number access it as an array otherwise access it as an object 
						//i.e. array obj[4] object obj.prop
						if (isNaN(parseInt(properties[prop].name.charAt(0))))
						{
							try
							{
								var test = eval(print_r.strObjRef + "." + properties[prop].name);
								a.onclick = clickMe(print_r, print_r.strObjRef + "." + properties[prop].name);
							} catch(e) 
							{
								try {									
									var test = eval(print_r.strObjRef + "[" + properties[prop].name + "]");									
									a.onclick = clickMe(print_r, print_r.strObjRef + "[" + properties[prop].name + "]");
								}
								catch (e) 
								{
									a.onclick = clickMe(print_r, print_r.strObjRef + "['" + properties[prop].name + "']");
								}
							}
							//a.onclick = clickMe(print_r, print_r.strObjRef + "." + properties[prop].name);
							/*
							if (properties[prop].name.match(/[^a-zA-Z_\-]/g))
							{
								a.onclick = clickMe(print_r, print_r.strObjRef + "['" + properties[prop].name + "']");
							}
							else
							{
								a.onclick = clickMe(print_r, print_r.strObjRef + "." + properties[prop].name);
							}	
							*/			
						}	
						else
						{
							try
							{
								var test = eval(print_r.strObjRef + "." + properties[prop].name);	
								a.onclick = clickMe(print_r, print_r.strObjRef + "[" + properties[prop].name + "]");	
							} catch(e) 
							{
								try {
									var test = eval(print_r.strObjRef + "[" + properties[prop].name + "]");									
									a.onclick = clickMe(print_r, print_r.strObjRef + "[" + properties[prop].name + "]");
								}
								catch (e) 
								{
									a.onclick = clickMe(print_r, print_r.strObjRef + "['" + properties[prop].name + "']");
								}
							}							
						}
					}
					z.appendChild(a);
					tdname.appendChild(z);
						
					// now add the toString representation of the code.
					// some browsers keep formatting so add it to a <pre> element					
					var tdstring = document.createElement('td');	
					var pre = document.createElement('pre');
					try 
					{
						pre.appendChild(document.createTextNode(properties[prop].toString));
					} catch (e) {
						pre.appendChild(document.createTextNode('undefined1'));						
					}
					tdstring.appendChild(pre);
					// finally add the type and apply appropriate styles
					var tdtype = document.createElement('td');				
					tdtype.appendChild(document.createTextNode(properties[prop].type));
					print_r.applyStyles (styleObj.propTableTd, tdname);
					print_r.applyStyles (styleObj.name, z);
					print_r.applyStyles (styleObj.propTableTd, tdstring);
					print_r.applyStyles (styleObj.propTableTd, tdtype);					
					print_r.applyStyles (styleObj.tostring, pre);					
					tr.appendChild(tdname);
					tr.appendChild(tdstring);
					tr.appendChild(tdtype);
					tbodyprops.appendChild(tr);	
										
					} 
				}
				
			}
		}
helper function to perform repeating tasks