// JavaScript Document

// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

// Function-Function-Function-Function-Function-Function-Function-Function

/*** simpleFindObj, by Andrew Shearer - http://shearersoftware.com/
Efficiently finds an object by name/id, using whichever of the IE,
classic Netscape, or Netscape 6/W3C DOM methods is available.
The optional inLayer argument helps Netscape 4 find objects in
the named layer or floating DIV. */

function simpleFindObj(name, inLayer) 
{
	return document[name] || (document.all && document.all[name])
	|| (document.getElementById && document.getElementById(name))
	|| (document.layers && inLayer && document.layers[inLayer].document[name]);
}
// endFunction-endFunction-endFunction-endFunction-endFunction-endfunc

// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

//Function-Function-Function-Function-Function-Function-Function-Function

//*** Implementation of WriteToDiv function by Andrew Shearer. */

function divWrite(div, input)
{
	var div_x = simpleFindObj(div);
	input = input;
	if (div_x && div_x.innerHTML) 
	{
		div_x.innerHTML = input;
	}
	else if (div_x && div_x.document) 
	{
		div_x.document.writeln(input);
		div_x.document.close();
	}
}