var params = new Array;
var paramparentname = 'jap';
var paramtopname = 'jat';
var paramgotopname = 'jagt';

// In IE6, document.URL may be malformed. This corrects it.
// In Firefox the parameters are appended to document.URL. This function strips them off.
function fDocURL()
{	var vdocurl = location.href;
	if (vdocurl.substr(0,7) == 'file://' && vdocurl.substr(7,1) != '/')
	{	vdocurl = 'file:///' + vdocurl.substr(7);
	}
	if (vdocurl.indexOf('?') > 0)
	{	vdocurl = vdocurl.substr(0, vdocurl.indexOf('?'));
	}

	return vdocurl;
}

// Convert the parameters from the document's URL to an array
function getParams()
{	var vInParams = decodeURIComponent(location.search);
	if (vInParams != '') {
		var paramArray = vInParams.split('?')[1].split('&');
		for(var i = 0, len = paramArray.length; i < len; i++)
		{	params[paramArray[i].split('=')[0]] = (paramArray[i].split('=')[1]).replace(/ /g,'%20');
		}
	}
}

function getCSSProperty(sNodeId, sProperty)
{	var oNode = document.getElementById(sNodeId);
	if(document.defaultView)
	{	return document.defaultView.getComputedStyle(oNode, null).getPropertyValue(sProperty);
	}
	else if(oNode.currentStyle)
	{	var sProperty = sProperty.replace(/-\D/gi, function(sMatch)
		{	return sMatch.charAt(sMatch.length - 1).toUpperCase();
		});
		return oNode.currentStyle[sProperty];
	}
	else return null;
}
