var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i -1) { if (document.layers) { elements[i].captureEvents(Events.ONFOCUS); elements[i].captureEvents(Events.ONMOUSEOVER); elements[i].captureEvents(Events.ONMOUSEOUT); } switch(c){ case 0: subscribeEvent(elements[i], 'mouseover', function() {ast_mouse_over(1);}); subscribeEvent(elements[i], 'mouseout', function() {ast_mouse_out();}); ast_iframeObj1 = elements[i]; break; case 1: subscribeEvent(elements[i], 'mouseover', function() {ast_mouse_over(2);}); subscribeEvent(elements[i], 'mouseout', function() {ast_mouse_out();}); ast_iframeObj2 = elements[i]; break; case 2: subscribeEvent(elements[i], 'mouseover', function() {ast_mouse_over(3);}); subscribeEvent(elements[i], 'mouseout', function() {ast_mouse_out();}); ast_iframeObj3 = elements[i]; break; case 3: subscribeEvent(elements[i], 'mouseover', function() {ast_mouse_over(4);}); subscribeEvent(elements[i], 'mouseout', function() {ast_mouse_out();}); ast_iframeObj4 = elements[i]; break; } c++; } else if(elements[i].src.indexOf('ypn-js.overture.com') > -1){ switch(y){ case 0: elements[i].onfocus = ypn_aslog1; ypn_iframeObj1 = elements[i]; break; case 1: elements[i].onfocus = ypn_aslog2; ypn_iframeObj2 = elements[i]; break; case 2: elements[i].onfocus = ypn_aslog3; ypn_iframeObj3 = elements[i]; break; case 3: elements[i].onfocus = ypn_aslog4; ypn_iframeObj4 = elements[i]; break; } y++; } } var ast_formObj; elements = document.getElementsByTagName("form"); for (var i = 0; i < elements.length; i++) { if(elements[i].action && !elements[i].action.value && elements[i].action.indexOf('www.google.com/custom') > -1) { if (document.layers) { elements[i].captureEvents(Events.ONSUBMIT); } elements[i].onsubmit = ast_logsearch; ast_formObj = elements[i]; } } function ast_getVariable(o, name) { var dc = o.src; var prefix = name + "="; var begin = dc.indexOf("&" + prefix); if (begin == -1) { begin = dc.indexOf("?" + prefix); if (begin == -1) return null; } else begin += 1; var end = o.src.indexOf("&", begin); if (end == -1) end = dc.length; return unescape(dc.substring(begin + prefix.length, end)); } function ast_trackView1(){ ast_trackView(ast_iframeObj1); } function ast_trackView2(){ ast_trackView(ast_iframeObj2); } function ast_trackView3(){ ast_trackView(ast_iframeObj3); } function ast_trackView4(){ ast_trackView(ast_iframeObj4); } var viewedUnit = false; var viewedLink = false; function ast_trackView(o){ var isLink = ast_getVariable(o, 'format').indexOf('_al')>0; if( isLink ) { if( viewedLink ) return; viewedLink = true; } else { if( viewedUnit ) return; viewedUnit = true; } BrowserDetect.init(); var asUrl = 'http://www.aroma-essence.com/adspytracker/track.php' + '?ref=' + escape(document.location.href) + '&cv=v' + '&w=' + google_ad_width + '&url=' + '&h=' + google_ad_height + '&f=' + ast_getVariable(o, 'format') + '&cb=' + ast_getVariable(o, 'color_border') + '&cbg=' + ast_getVariable(o, 'color_bg') + '&cl=' + ast_getVariable(o, 'color_link') + '&cu=' + ast_getVariable(o, 'color_url') + '&ct=' + ast_getVariable(o, 'color_text') + '&ch=' + ast_getVariable(o, 'channel') + '&cch=null' + '&r=' + escape(document.referrer) + '&br=' + escape(BrowserDetect.browser+' '+BrowserDetect.version) + '&dt=' + new Date().valueOf(); var bug = new Image(); bug.src = asUrl; } function ypn_trackView1(){ ypn_trackView(ypn_iframeObj1); } function ypn_trackView2(){ ypn_trackView(ypn_iframeObj2); } function ypn_trackView3(){ ypn_trackView(ypn_iframeObj3); } function ypn_trackView4(){ ypn_trackView(ypn_iframeObj4); } function ypn_trackView(o){ var asUrl = 'http://www.aroma-essence.com/adspytracker/track.php' + '?ref=' + escape(document.location.href) + '&cv=yv' + '&w=' + ast_getVariable(o, 'adwd') + '&url=' + '&h=' + ast_getVariable(o, 'adht') + '&f=' + ast_getVariable(o, 'format') + '&cb=' + ast_getVariable(o, 'bc') + '&cbg=' + ast_getVariable(o, 'cc') + '&cl=' + ast_getVariable(o, 'lc') + '&cu=' + ast_getVariable(o, 'uc') + '&ct=' + ast_getVariable(o, 'tc') + '&ch=' + ast_getVariable(o, 'type') + '&cch=null' + '&r=' + escape(document.referrer) + '&dt=' + new Date().valueOf(); var bug = new Image(); bug.src = asUrl; } for(i=1;i<5;i++){ o = eval("ast_iframeObj" + i); if(o) { setTimeout("ast_trackView" + i + "()", (i-1) * 300); } yo = eval("ypn_iframeObj" + i); if(yo) { setTimeout("ypn_trackView" + i + "()", (i-1) * 300); } }