function isMatch(str1,str2) 
{  
var index = str1.indexOf(str2); 
if(index==-1) return false; 
return true; 
} 
/*if (isMatch(window.location.hostname,'xin.us') == false){window.location.href="http://www.xin.us";}*/
function $(id) {
    return document.getElementById(id);
}
// Ïà¶Ô³ß´ç
function GetOffsetTop (el, p) {
    var _t = el.offsetTop;
    var _p = el.offsetParent;

    while (_p) {
        if (_p == p) break;
        _t += _p.offsetTop;
        _p = _p.offsetParent;
    }

    return _t;
};
function GetOffsetLeft (el, p) {
    var _l = el.offsetLeft;
    var _p = el.offsetParent;

    while (_p) {
        if (_p == p) break;
        _l += _p.offsetLeft;
        _p = _p.offsetParent;
    }

    return _l;
};
function showMenu (baseID, divID,ms) {
    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';}, ms);
        }

        divID.onmouseout = hide;
        baseID.onmouseout = hide;
    }
	function hideCur () {
		showMenu.cur && (showMenu.cur.style.display = 'none');
	}
}

function Flash(id,url,w,h,bg,t){
document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width="+w+" height="+h+" id="+id+"><param name='movie' value="+url+" /><param name='wmode' value="+t+" /><param name='bgcolor' value="+bg+" /><param name='allowScriptAccess' value='sameDomain' /><param name='quality' value='high' /><param name='menu' value='false' /><embed src="+url+" wmode="+t+" width="+w+" height="+h+" name="+id+" bgcolor="+bg+" allowScriptAccess='sameDomain' quality='high' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>");
}

