
var iedrop=document.all ;
var domdrop=document.getElementById ;
var ns4drop=document.layers ;
var calunits=document.layers? "" : "px" ;

var bouncelimit=32 ;
var direction="up" ;

function initbox(){
    if (!domdrop&&!iedrop&&!ns4drop) return ;

    crossobj=(domdrop)?document.getElementById("dropin").style : iedrop? document.all.dropin : document.dropin ;
    scroll_top=(iedrop)? truebody().scrollTop : window.pageYOffset ;
    crossobj.top=scroll_top-250+calunits ;
    crossobj.visibility=(domdrop||iedrop)? "visible" : "show" ;
    dropstart=setInterval("dropin()",50) ;
}

function dropin(){
    scroll_top=(iedrop)? truebody().scrollTop : window.pageYOffset ;
    if (parseInt(crossobj.top)<250+scroll_top) {
        crossobj.top=parseInt(crossobj.top)+40+calunits ;
      }else{
        clearInterval(dropstart) ;
        bouncestart=setInterval("bouncein()",50) ;
    }
}

function bouncein(){
    crossobj.top=parseInt(crossobj.top)-bouncelimit+calunits ;
    if (bouncelimit<0) bouncelimit+=8 ;
    bouncelimit=bouncelimit*-1 ;
    if (bouncelimit==0){
        clearInterval(bouncestart) ;
    }
}

function dismissbox(){
    var winnews = window.open("http://comingout.free.fr/gnews.htm","news","width=750,height=580,scrollbars=yes");
    winnews.focus();
    if (window.bouncestart) clearInterval(bouncestart) ;
    crossobj.visibility="hidden" ;
}

function dismissbox2(){
    if (window.bouncestart) clearInterval(bouncestart) ;
    crossobj.visibility="hidden" ;
}

function truebody(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body ;
}


function get_cookie(Name) {
var search = Name + "=" ;
var returnvalue = "" ;
    if (document.cookie.length > 0) {
        offset = document.cookie.indexOf(search)
        if (offset != -1) {
            offset += search.length ;
            end = document.cookie.indexOf(";", offset) ;
            if (end == -1) end = document.cookie.length ;
            returnvalue=unescape(document.cookie.substring(offset, end)) ;
        }
    }
    return returnvalue ;
}

function dropornot(){
    if (get_cookie("droppin")==""){
        window.onload=initbox ;
        date=new Date ;

        var expires = date ;
        document.cookie="droppin=yes ; expires="+expires.toGMTString() ;
    }
}

dropornot() ;