//--OAS Site and Random Number variables
var randomNum   = ( new String(Math.random()) ).substring(2,11);

//-----------------------------------------------------------------------------------
// function displayAd( sitePage, position, queryString)
//
// sitePage     - the path of the page on the site that this ad slot is on
// position     - the name of the location on a page where the ad is to be displayed
// queryString  - any series of name/value pairs as search terms
//-----------------------------------------------------------------------------------
function displayAd( sitePage, position, queryString )
{
    var oasPage = sitePage + "/1" + randomNum + "@" + position + "?" + queryString;

    //-- This implementation is based on OAS RX tag.
    //-- Please refer to Real Media's Open AdStream Page Tagging Guide
    //   (http://www.realmedia.com/tech/oas/Tagging/Page_Tagging_Guide_Rev-F.pdf)
    if ( jVersion < 11 )
    {
        document.write( "<a href='" + oasServer + "click_nx.ads/" + oasPage +
                        "' target='_top'><img src='" + oasServer + "adstream_nx.ads/" +
                        oasPage + "' border='0'></a>" );
    }
    else
    {
        document.write( "<script language='JavaScript1.1' src='" + oasServer + 
                        "adstream_jx.ads/" + oasPage + "'>" );
        
        document.write( "\<\!-- --\>" );
        document.write( "\<\/script\>" );
        document.write( "\<\!-- --\>" );
    
    }// End if/else

}// End function displayAd()
