function schedule(objectID, functionCall, iteration)
{
	if (iteration == null)
	{
		iteration = 0;
	}
	
	if (objectID == "window")
	{
		var oldonload = window.onload;
		
		if (typeof window.onload != "function")
		{
			window.onload = functionCall;
		}
		else
		{
			window.onload = function()
			{
				oldonload();
				functionCall();
			}
		}
	}
	else if (document.getElementById(objectID))
	{
		functionCall();
	}
	else if (iteration < 300)
	{
		setTimeout(function(){schedule(objectID, functionCall, iteration + 1)}, 10);
	}
	
	return true;
};


function getElementsByClassName(oElm, strTagName, oClassNames)
{
    var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    var arrRegExpClassNames = new Array();
    if(typeof oClassNames == "object")
	{
        for(var i=0; i<oClassNames.length; i++)
		{
            arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
        }
    }
    else
	{
        arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
    }
    var oElement;
    var bMatchesAll;
    for(var j=0; j<arrElements.length; j++)
	{
        oElement = arrElements[j];
        bMatchesAll = true;
        for(var k=0; k<arrRegExpClassNames.length; k++)
		{
            if(!arrRegExpClassNames[k].test(oElement.className))
			{
                bMatchesAll = false;
                break;                      
            }
        }
        if(bMatchesAll)
		{
            arrReturnElements.push(oElement);
        }
    }
    return (arrReturnElements);
}



