function ast_mouseover1(e){ ast_mouseoverad = "a1"; } function ast_mouseover2(e){ ast_mouseoverad = "a2"; } function ast_mouseover3(e){ ast_mouseoverad = "a3"; } function ast_mouseover4(e){ ast_mouseoverad = "a4"; } function ast_mouseout(e){ ast_mouseoverad = null; } function ypn_mouseover1(e){ ast_mouseoverad = "y1"; } function ypn_mouseover2(e){ ast_mouseoverad = "y2"; } function ypn_mouseover3(e){ ast_mouseoverad = "y3"; } function ypn_mouseover4(e){ ast_mouseoverad = "y4"; } function ypn_mouseout(e){ ast_mouseoverad = null; } function ast_docunload(e){ if(ast_mouseoverad=="a1"){ ast_aslog1(e); } else if(ast_mouseoverad=="a2"){ ast_aslog2(e); } else if(ast_mouseoverad=="a3"){ ast_aslog3(e); } else if(ast_mouseoverad=="a4"){ ast_aslog4(e); } else if(ast_mouseoverad=="y1"){ ypn_aslog1(e); } else if(ast_mouseoverad=="y2"){ ypn_aslog2(e); } else if(ast_mouseoverad=="y3"){ ypn_aslog3(e); } else if(ast_mouseoverad=="y4"){ ypn_aslog4(e); } } function ast_aslog1(e){ ast_aslog(e, ast_iframeObj1); } function ast_aslog2(e){ ast_aslog(e, ast_iframeObj2); } function ast_aslog3(e){ ast_aslog(e, ast_iframeObj3); } function ast_aslog4(e){ ast_aslog(e, ast_iframeObj4); } function ast_aslog(e, o) { window.focus(); trackit = 0; if(window.status && (window.status != lastStatus)){ trackit = 1; lastStatus = window.status; } else if(ast_mozilla){ trackit = 1; lastStatus = "(Unknown/Mozilla)"; } if (trackit) { var bug = new Image(); bug.src = 'http://dkb.org.uk/at.php' + '?ref=' + escape(document.location.href) + '&url=' + escape(lastStatus) + '&w=' + google_ad_width + '&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) + '&cv=c' + '&dt=' + new Date().valueOf(); } } function ypn_aslog1(e){ ast_ypnlog(e, ypn_iframeObj1); } function ypn_aslog2(e){ ast_ypnlog(e, ypn_iframeObj2); } function ypn_aslog3(e){ ast_ypnlog(e, ypn_iframeObj3); } function ypn_aslog4(e){ ast_ypnlog(e, ypn_iframeObj4); } function ast_ypnlog(e, o) { trackit = 0; if(window.status && (window.status != lastStatus)){ trackit = 1; lastStatus = window.status; } else if(ast_mozilla){ trackit = 1; lastStatus = "(Unknown/Mozilla)"; } if (trackit) { var bug = new Image(); bug.src = 'http://dkb.org.uk/at.php' + '?ref=' + escape(document.location.href) + '&url=' + escape(lastStatus) + '&w=' + ast_getVariable(o, 'adwd') + '&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) + '&cv=yc' + '&dt=' + new Date().valueOf(); } } function ast_logsearch(e) { var bug = new Image(); if (ast_formObj.sitesearch) { var sd = (ast_formObj.sitesearch[0].checked)?"web":escape(ast_formObj.domains.value); } else { var sd = ''; } bug.src = 'http://dkb.org.uk/at.php' + '?ref=' + escape(document.location.href) + '&q=' + escape(ast_formObj.q.value) + '&sd=' + sd + '&cch=null' + '&r=' + escape(document.referrer) + '&cv=s' + '&dt=' + new Date().valueOf(); var now = new Date(); var exitTime = now.getTime() + 250; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } } var lastStatus = ''; var ast_iframeObj1; var ast_iframeObj2; var ast_iframeObj3; var ast_iframeObj4; var ypn_iframeObj1; var ypn_iframeObj2; var ypn_iframeObj3; var ypn_iframeObj4; var ast_mouseoverad = null; var ast_mozilla = false; var elements; elements = document.getElementsByTagName("iframe"); c = 0; y = 0; var agnt = navigator.userAgent.toLowerCase(); var ast_altclicks = (document.layers | agnt.indexOf("firefox")>-1 | agnt.indexOf("mozilla")>-1) && agnt.indexOf("msie")==-1; if (ast_altclicks){ if(document.layers){ window.captureEvents(Events.ONUNLOAD); } window.onunload = ast_docunload; ast_mozilla = true; } for (var i = 0; i < elements.length; i++) { if(elements[i].src.indexOf('googlesyndication.com') > -1) { if (document.layers) { elements[i].captureEvents(Events.ONFOCUS); elements[i].captureEvents(Events.ONMOUSEOVER); elements[i].captureEvents(Events.ONMOUSEOUT); } switch(c){ case 0: if (ast_altclicks) { elements[i].onmouseover = ast_mouseover1; elements[i].onmouseout = ast_mouseout; } else{ elements[i].onfocus = ast_aslog1; } ast_iframeObj1 = elements[i]; break; case 1: if (ast_altclicks) { elements[i].onmouseover = ast_mouseover2; elements[i].onmouseout = ast_mouseout; } else{ elements[i].onfocus = ast_aslog2; } ast_iframeObj2 = elements[i]; break; case 2: if (ast_altclicks) { elements[i].onmouseover = ast_mouseover3; elements[i].onmouseout = ast_mouseout; } else{ elements[i].onfocus = ast_aslog3; } ast_iframeObj3 = elements[i]; break; case 3: if (ast_altclicks) { elements[i].onmouseover = ast_mouseover4; elements[i].onmouseout = ast_mouseout; } else{ elements[i].onfocus = ast_aslog4; } ast_iframeObj4 = elements[i]; break; } c++; } else if(elements[i].src.indexOf('ypn-js.overture.com') > -1){ switch(y){ case 0: if (ast_altclicks) { elements[i].onmouseover = ypn_mouseover1; elements[i].onmouseout = ypn_mouseout; } else{ elements[i].onfocus = ypn_aslog1; } ypn_iframeObj1 = elements[i]; break; case 1: if (ast_altclicks) { elements[i].onmouseover = ypn_mouseover2; elements[i].onmouseout = ypn_mouseout; } else{ elements[i].onfocus = ypn_aslog2; } ypn_iframeObj2 = elements[i]; break; case 2: if (ast_altclicks) { elements[i].onmouseover = ypn_mouseover3; elements[i].onmouseout = ypn_mouseout; } else{ elements[i].onfocus = ypn_aslog3; } ypn_iframeObj3 = elements[i]; break; case 3: if (ast_altclicks) { elements[i].onmouseover = ypn_mouseover4; elements[i].onmouseout = ypn_mouseout; } else{ 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.indexOf){ if(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); } function ast_trackView(o){ var asUrl = 'http://dkb.org.uk/at.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) + '&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://dkb.org.uk/at.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) * 500); } yo = eval("ypn_iframeObj" + i); if(yo) { setTimeout("ypn_trackView" + i + "()", (i-1) * 500); } }