/* OAS Adspot list, will use the most exact match based off the current url.
 * Set new items by adding new lines using following the describe format:
 *
 *      adspots["/relative/location"] = "Adspot1,Adspot2,AdspotN";
 */
    var adspots = new Object();
    adspots["/"]                      = "Top,x01,TopRight";
    // adspots["/viewclassifieds"]       = "Top";

//Determines what adspot list to use 
var loc = (document.location + "").toLowerCase();
var lastposition = -1;
var listpos = '';

// let's see if 'home/' is already in the URL

 
// makes the location consistent
if (-1 == loc.indexOf('home')){
  loc = loc + 'home/';
}

if( '/home' == loc.substr(((loc.length) - 5)) ){
  loc = loc + '/';
}

for( var i in adspots ) {

    var position = loc.indexOf( linkurl + i );

    if( position != -1 && i.length > lastposition ) {

        lastposition = i.length;
        listpos = adspots[i];
    }
}
OAS_listpos = listpos;
// Configuration Variables
OAS_url = 'http://oascentral.bakersfield.com/RealMedia/ads/';
OAS_query = ''; 

OAS_target = '_top';

// end of configuration

OAS_rn = new String (Math.random()); OAS_RNS = OAS_rn.substring (2, 11);

function OAS_NORMAL(pos) {
  document.write('<A HREF="' + OAS_url + 'click_nx.ads/' + OAS_sitepage + '/1' + OAS_RNS + '@' + OAS_listpos + '!' + pos + '?' + OAS_query + '" TARGET=' + OAS_target + '>'); 
} 
  
if (navigator.userAgent.indexOf('Mozilla/3') != -1 || navigator.userAgent.indexOf('Mozilla/4.0 WebTV') != -1){
  OAS_version = 10; 
} else {
  OAS_version = 11;
}
 
if (OAS_version >= 11){
  document.write('<SCRIPT LANGUAGE=JavaScript1.1 SRC="' + OAS_url + 'adstream_mjx.ads/' + OAS_sitepage + '/1' + OAS_RNS + '@' + OAS_listpos + '?' + OAS_query +'"><\/SCRIPT>'); 
}
 
function OAS_AD(pos) {
if (OAS_version >= 11)
  OAS_RICH(pos); 
else 
  OAS_NORMAL(pos);
} 

