/* http://headlines.ocregister.com/common/tools/load.php?js=common_fi_oas,common_dartads */ function getLast(s, num) { return s.substr(s.length - num, num); } function approveAd(tagpos) { var last = getLast(location.href, 7); if(last.toLowerCase() == "?google") { if(tagpos == "Right3") return false; } return true; } function FI_OAS_RICH(tagpos) { if(approveAd(tagpos)) OAS_RICH(tagpos); } function resize_iframe(obj) { var h=obj.contentWindow.document.body.scrollHeight; obj.style.height=h; }// Updated 6/09/2009 11:01AM DartAds = function() { this.CALLTYPE_JS = 2; this.CALLTYPE_IFRAME = 1; this.CALLTYPE_HTML = 0; this.baseurl = 'http://ad.doubleclick.net/'; this.ord = Math.random()*10000000000000000; this.sitepage = ''; this.autoRefresh = false; this.refreshTime = 2 * 60 * 1000; // Milliseconds this.kw = ""; this.tile = 0; this.initialize.apply(this, arguments); this.ist = false; this.dbmsg = ""; }; DartAds.prototype = { initialize: function() { var args; if ((arguments.length == 1) && (typeof(arguments[0]) == 'object')) { args = arguments[0]; } else { args = {}; switch(arguments.length) { case 1: args.domain = arguments[0]; break; case 2: args.domain = arguments[0]; args.taxonomy = arguments[1]; break; case 3: args.domain = arguments[0]; args.taxonomy = arguments[1]; args.ref = arguments[2]; break; case 4: args.domain = arguments[0]; args.taxonomy = arguments[1]; args.ref = arguments[2]; args.kw = arguments[3]; break; case 5: args.domain = arguments[0]; args.taxonomy = arguments[1]; args.ref = arguments[2]; args.kw = arguments[3]; args.extra = arguments[4]; break; case 6: default: args.domain = arguments[0]; args.taxonomy = arguments[1]; args.ref = arguments[2]; args.kw = arguments[3]; args.extra = arguments[4]; args.test = arguments[5]; break; } } this.domain = typeof(args.domain) != 'undefined' ? args.domain : 'ocr.sant.ocregister'; var taxonomy = typeof(args.taxonomy) != 'undefined' ? args.taxonomy : 'homepage'; var ti = taxonomy.indexOf('/'); if(ti==0) this.taxonomy = taxonomy.substr(1); else this.taxonomy = taxonomy; this.sitepage = this.domain+'/'+this.taxonomy; this.ref = ''; if(typeof(args.ref) != 'undefined' && args.ref != "") this.ref=args.ref; else if (document.referrer != "") { var ref=document.referrer; if(ref.substr(0,4).toLowerCase()!="http") // verify valid start of url ref=""; ref = ref.replace(/h.*:\/\//i,"?"); ref = ref.replace(/\/.*/i,""); var parts=ref.split("."); if(parts.length>2) ref=parts[parts.length-2]+'.'+parts[parts.length-1]; var test=ref.replace(".",""); if(this.isNumeric(test)) ref=""; this.ref = ref; } this.kw = typeof(args.kw) != 'undefined' ? args.kw : ''; this.extra = typeof(args.extra) != 'undefined' ? args.extra : ''; this.test = typeof(args.test) != 'undefined' ? args.test : ''; this.svalues = new Array(); var sindex = 0; var remainingTaxonomy=this.taxonomy; var svalues=remainingTaxonomy.split("/"); if(svalues.length>0) { for(i=0;i'); document.write(''); this.debugAdd("Write IFramed Ad Tag - pos="+pos+" sz="+width+"x"+height+"\n"); if (this.autoRefresh) { document.write('setInterval("reloadFrame(\\"DartTag' + (this.tile+1) + '\\")", ' + this.refreshTime + ');<\/scr' + 'ipt>'); document.write(''); } } else if(typeof(this.calltype) != 'undefined' && this.calltype==this.CALLTYPE_JS) { document.write(''); document.write('