/*********************************************
	JustWidgets JavaScript Utility Functions
  (c)2006 Justwidgets.com. All rights reserved.
 *********************************************

js_util.js Changlog:

[2006-08-21]
	Original version (jw_util.js)
[2006-09-13] 
	Modified to pass JSLint (http://www.jslint.com/) 
		w/options: 1)Detect undefined variables  2) ++ and -- considered harmful
	Changed name to js_util.js

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

/*

<noscript>
	<br />
	<font color="red">
		<b>**JavaScript is disabled. Please enable it for the full functionality of this page.**</b>
	</font>
</noscript>

*/

// Remove duplicate entries from an array
function dedupe(pArray) {
	pArray.sort();
	for (var i in pArray) {
		if (pArray[i] == pArray[i + 1]) {
			var dev_null = pArray.splice(i, 1);
		}
	}
}

// Return a string with array a's contents
function aDump(a) {
	var list = "a.valueOf() = " + a.valueOf() + " \n ";
	list += "typeof a = " + typeof a;
	if (a.length) {
		for (var i in a) {
			list += i + "= " + a[i] + "\n";
		}
	}
	return list;
}


// Create links out of all <td>'s that contain: ".com"
function linkIt() {
	var tableDatas = document.getElementsByTagName("td");
	for (var i in tableDatas) {
		if (tableDatas[i].firstChild !== null) {
			var td = tableDatas[i].firstChild;
			if (td.nodeValue.search("\.com") != -1) {
				tableDatas[i].innerHTML = '<a href="http://' + td.nodeValue + '">' + td.nodeValue.replace("/ ", "")  + "</a>";
			}
		}
	}
}
