// *****************************************************
// detectframename.js
// ************************
// Find out what is the frame name from URL.
// *****************************************************

// Parses the URL (string) that is passed in and 
// returns the 'FN' (Frame Name) parameter value.
function getFrameName(strURL)
{
	var frameName = "";
	var intIndex;

	intIndex = strURL.toLowerCase().indexOf('fn=');
	if (intIndex > 0) {
		intIndex = intIndex + 3;
		if (intIndex>=strURL.length || strURL.charAt(intIndex)=='&')
		{
			return frameName;
		}
		while (intIndex<strURL.length && strURL.charAt(intIndex)!='&')
		{
			frameName = frameName + strURL.charAt(intIndex);
			intIndex = intIndex + 1;
		}
	}
	return frameName;
}

if(typeof(Sys) !== "undefined") {
	Sys.Application.notifyScriptLoaded();
}