	// returns an object if it exists in the current DOM displayed, or null if it doesn't
	function buildObj(sObject){
		// if netscape build the correct path to the element in the DOM
		if (!document.all){
			var aObjTree = sObject.split("."); // split and store the ie version of the DOM tree
			var sTree = "";

			// when the tree is long, construct a new tree out of the split apart ie tree
			if (aObjTree.length > 1){
				for (var i=0; i<aObjTree.length; i++){
					if ((i+1)%2 == 0) sTree += ".document."; // inserts ref to the DOM document
					if (i < aObjTree.length -1) sTree += aObjTree[i]; // skips the last element
				}

			// just start a basic NS tree
			} else sTree += "document.";

			// reconstruct the sObject for a correct NS path to the element
			sObject = (sTree + "getElementById('"+ aObjTree[aObjTree.length -1] +"')");
		}

		// return the element or null if it doesn't exist
		return oCreatedObj = (eval("typeof("+sObject+")") != "undefined")? (eval(sObject)):null;
	}

    //  Legacy Javascript for enforcing maxlength 
    function maxlengthCheck(txt, maxlength){
        if(txt.value.length > maxlength){
            txt.value = txt.value.substring(0,maxlength);
        }
    }

function hidErroBlock(x)
{
	document.getElementById(x).style.display="none";
}

function positionErrorBlock(x,y,wid)
{
	if(document.getElementById("errorblockdiv"))
	{
		var scrWid=window.screen.width;
		scrWidExSpace = window.screen.width-750;
		defaultLeft = scrWidExSpace/2;
		document.getElementById("errorblockdiv").style.left=defaultLeft;
		document.getElementById("errorblockdiv").style.left=defaultLeft+x;
		document.getElementById("errorblockdiv").style.top=y;
		document.getElementById("errorblockdiv").style.width=wid;
	}
}