/*
*This function sets the method for getting tags from the document object model.
*For IE the document.all function will be used, for Netscape 4 the layers function
*will be used, and for Netscape 6 the getElementById will be used
*/

function LN_getDocObject() {

	browser = navigator.appName;
	browserNum = parseInt(navigator.appVersion);
	var valsArray = new Array();

	if ((browser == "Netscape") && (browserNum < 5)) {

		// Netscape 4.x
		valsArray[0] = "document.layers['";
		valsArray[1] = "']";
		valsArray[2] = "";
	
	} else if ((browser == "Netscape") && (browser >= 5)) {

		// Netscape 6
		valsArray[0] = "document.getElementById('";
		valsArray[1] = "')";
		valsArray[2] = ".style";

	} else {

		// Internet Explorer
		valsArray[0] = "document.all['container'].all['";
		valsArray[1] = "']";
		valsArray[2] = ".style";

	}

	return valsArray;


}





/*
* This function parses comma-seperated name=value argument pairs from the 
* query string of the URL. It stores the name-value pairs in
* properties of an object and return returns that object.
*/

function LN_getArgs() {

var args = new Object();
var query = location.search.substring(1); //Get Query String
var pairs = query.split("&"); //Break on comma


	for (var i = 0; i < pairs.length; i++) {

		var pos = pairs[i].indexOf('=');

		if (pos == -1) continue;

		var argname = pairs[i].substring(0,pos);

		var value = pairs[i].substring(pos+1);

		args[argname] = unescape(value);
		


	}

	
	return args;

}

/*
* This function will find the id number for the div tag based on the 
* passed in ID.  The passed in ID represents a unique catid number.
* the cat id number is the last number in the '.' delimmited tag id.
*/

function LN_getId(giCatId) {

	

	for (i=0; i < document.all('container').all.length; i++) {

		if (document.all('container').all[i].tagName == "DIV") {

			var divIdRaw = document.all('container').all[i].id;
			
			
			var divIdArray = divIdRaw.split(lftnavIdDelimit);

			if (divIdArray[divIdArray.length-1] == giCatId) {
				
				return divIdRaw;

			}
			

		}


	}

	return -1;



}