/* CrossGate Web System */

function Anthem_Error(result){
    MsgAlert("异步处理时发生错误！");
}

function MsgAlert(content,fun){
    try
    {
        Ext.onReady(function(){
            Ext.MessageBox.alert("System Info",content,fun);
        });
    }
    catch(e) { }
}

function MsgBox(content,fun,obj){
    try
    {
        Ext.onReady(function(){
            Ext.MessageBox.show({
                title : "System Info",
                msg : content,
                buttons : Ext.MessageBox.YESNO,
                fn : fun,
                animEl : obj
            });
        });
    }
    catch(e) { }
}

function getElementsByClass(searchClass,node,tag){
	var classElements = new Array();
	if (node == null){
		node = document;
	}
	if (tag == null){
		tag = "*";
	}
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)" + searchClass + "(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++){
		if (pattern.test(els[i].className)){
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}
