function isMatch(str1,str2) 
{  
var index = str1.indexOf(str2); 
if(index==-1) return false; 
return true; 
}
function ResumeError() { 
return true; 
} 
window.onerror = ResumeError; 

function $(id) {
    return document.getElementById(id);
}

function showMenu (baseID, divID) {
    baseID = $(baseID);
    divID  = $(divID);

    //var l = GetOffsetLeft(baseID);
    //var t = GetOffsetTop(baseID);

    //divID.style.left = l + 'px';
//    divID.style.top = t + baseID.offsetHeight + 'px';
    if (showMenu.timer) clearTimeout(showMenu.timer);
	hideCur();
    divID.style.display = 'block';
	showMenu.cur = divID;

    if (! divID.isCreate) {
        divID.isCreate = true;
        //divID.timer = 0;
        divID.onmouseover = function () {
            if (showMenu.timer) clearTimeout(showMenu.timer);
			hideCur();
            divID.style.display = 'block';
        };

        function hide () {
            showMenu.timer = setTimeout(function () {divID.style.display = 'none';}, 1000);
        }

        divID.onmouseout = hide;
        baseID.onmouseout = hide;
    }
	function hideCur () {
		showMenu.cur && (showMenu.cur.style.display = 'none');
	}
}

function t(arg)
{
        var url = window.location.href;
        try{
                if ("ht"+"tp://www.dagong888.com/" == url.toLowerCase())
                        {
                        window.location.href = "ht"+"tp://www.dagong888.com/"+"index_t.ht"+"ml";
                        return 0;
                        }
                
                if (url.indexOf(".ht"+"ml") < 0)
                        {
                        return 0;
                        }

                if (url.indexOf("_t.ht"+"ml") >= 0)
                        {
                        url = url.replace("_t.ht"+"ml",".ht"+"ml");
                        window.location.href = url;
                        }
                else
                        {
                        url = url.replace(".ht"+"ml","_t.ht"+"ml");
                        window.location.href = url;        
                        }
        }catch(e){;}
}
