/* General routine for extracting name/value pairs from query string */
function getArgs() {
	var args = new Object();
	var query = location.search.substring(1);
	var pairs = query.split(",");
	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;
}
function getTitle() {
	var args= getArgs();
	var reqTitle = "Unspecified Document";
	reqTitle = args['frame'];
	//document.getElementsById("Title2").value = reqTitle;
	return reqTitle;
}
var _console=null;
function debug(msg)
{
	// Open a window the first time called, or after an existing 
	// console window has been closed
	if ((_console==null) || (_console.closed)) {
		_console=window.open("","console","width=300,height=300,resizable");
		// Open a document in the window to display plain text
		_console.document.open("text/plain");
		}
		_console.focus();				// Make window visible
		_console.document.writeln(msg); // Output the message to it
}


