var contactUs = new Array('danceland@nycap.rr.com', 'danceland', 'nycap.rr.com'
);
function setDocumentCookie( oDoc, sName, sValue ) {
    if ( sName.length < 1 ) return;

    if ( 0 < sValue.length ) {
        var expDate = new Date();
        expDate.setTime( expDate.getTime() + 365*24*60*60*1000 );

        oDoc.cookie = ""
                        + sName + "=" + sValue + "; "
                        + "expires=" + expDate.toGMTString();
    } else {
        oDoc.cookie = sName + "=";
    }
}

function setNamedCookie( sName, sValue ) {
    setDocumentCookie( document, sName, sValue );
}

function deleteDocumentCookie( oDoc, sName ) {
    oDoc.cookie = sName + "=";
}

function deleteCookie( sName ) {
    deleteDocumentCookie( document, sName );
}

function fetchDocumentCookie( oDoc, sName ) {
    var sValue = "";
    var index = 0;

    if( oDoc.cookie )
        index = oDoc.cookie.indexOf( sName + "=" );
    else
        index = -1;

    if ( index < 0 )
        sValue = "";
    else {
        var countbegin = (oDoc.cookie.indexOf( "=", index ) + 1);
        if ( 0 < countbegin )
        {
            var countend = oDoc.cookie.indexOf( ";", countbegin );
            if ( countend < 0 )
                countend = oDoc.cookie.length;
            sValue = oDoc.cookie.substring( countbegin, countend );
        } else {
            sValue = "";
        }
    }
    return sValue;
}

function fetchNamedCookie( sName ) {
    return fetchDocumentCookie( document, sName );
}

var phraseNbr = parseInt(fetchNamedCookie("phraseNbr"));
var phrase = new Array();

phrase[0] = "Danceland...a pleasant haven in an indifferent world";
phrase[1] = "If you love dancing...and good company...this is the place to be!";
phrase[2] = "Go dancing ...for the health of it!";
phrase[3] = "Danceland/Boomers...a step above the others!";
phrase[4] = "Get more out of life...go dancing!";
phrase[5] = "Dancing makes the difference!";
phrase[6] = "We're in business for the fun of it!";

if (phraseNbr = "NaN") phraseNbr = Math.floor(Math.random() * phrase.length);

function getPhrase() {
    phraseNbr++;
    if (phraseNbr == phrase.length) phraseNbr = 0;
    setNamedCookie("phraseNbr", phraseNbr);
    return ("<p class='phrase' align='center'>&quot;" + phrase[phraseNbr] + "&quot;</p>");
}


