// JavaScript Document
/*第一种形式 第二种形式 更换显示样式*/
function setTab(name,cursel,n){
for(i=1;i<=n;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById("con_"+name+"_"+i);
menu.className=i==cursel?"hover":"";
con.style.display=i==cursel?"block":"none";
}
}





//关闭时加入收藏
function getCookie( cookieName )      //读取Cookie
{
    var start = document.cookie.indexOf( cookieName + "=" );
    var len = start + cookieName.length + 1;
    if ( ( !start ) && ( cookieName != document.cookie.substring( 0, cookieName.length ) ) )
    {
        return null;
    }
    if ( start == -1 ) return null;
    var end = document.cookie.indexOf( ';', len );
    if ( end == -1 ) end = document.cookie.length;
    return ( document.cookie.substring( len, end ) );
}

function setCookie( cookieName, value, expires, path, domain, secure )  //设置Cookie
{
    var today = new Date();
    today.setTime( today.getTime() );
    if ( expires )
    {
        expires = expires * 1000 * 60 * 60 * 24;  //有效时间1天,按自己需要改
    }
    var expires_date = new Date( today.getTime() + (expires) );
    document.cookie = cookieName+'='+escape( value ) +
        ( ( expires ) ? ';expires='+expires_date.toGMTString() : '' ) +  //expires.toGMTString()
        ( ( path ) ? ';path=' + path : '' ) +
        ( ( domain ) ? ';domain=' + domain : '' ) +
        ( ( secure ) ? ';secure' : '' );
}

function deleteCookie( cookieName, path, domain ) //删除Cookie
{
    if ( getCookie( cookieName ) ) document.cookie = cookieName + '=' +
            ( ( path ) ? ';path=' + path : '') +
            ( ( domain ) ? ';domain=' + domain : '' ) +
            ';expires=Thu, 01-Jan-1970 00:00:01 GMT';
}

function exeFunction()
{
var cookieValue = getCookie( "soumore" );
if( cookieValue == null )
{
  setCookie( "soumore","not_first",1 );
  bk();
}
// alert(cookieValue)
}

function bk()
{
window.external.AddFavorite('http://www.89006006.com', '济南协和肝病医院-山东最好的肝病专科医院')
}

//document.write('<body onunload=\"exeFunction()\">');



