var mt_tries; var mt_clickevent; var mt_clicklink; var mt_handler; var mt_req = "req"; var mt_opt = "opt"; var mtrslib_uid; var mtrslib_retry; var mtrslib_retry_text; var mt_disable = 0; //////////////////////////////////////////////////////////////////////////////////////////// // Public functions & attributes to call from the header. // Version 2 API: // mtrslib_uid - UID to credit // mtrslib_retry - # of "persistent retries" (default 1) // Note that, for example, 3 will pop the box 4 times. mtrslib_uid = ''; mtrslib_retry_text = "You must click Yes to access this content."; mtrslib_retry = 1; // mt_set_recurrence must be invoked before mt_set_on* functions. function mt_set_recurrence( recur ) { var duration = 0; if ( recur == "hourly" ) duration = 60*60; if ( recur == "daily" ) duration = 60*60*24; if ( recur == "weekly" ) duration = 60*60*24*7; if ( duration != 0 ) { if ( !get_cookie( "mt" + mtrslib_uid ) ) { set_cookie( "mt" + mtrslib_uid, mtrslib_uid, duration ); } else mt_disable = 1; } } // mt_set_* - define page behavior. function mt_set_onload() { if (mtrslib_retry > 3) { mtrslib_retry = 3; } if ( mt_disable ) { return false; } mtreq_link(null); } function mt_set_onunload() { if (mtrslib_retry > 3) { mtrslib_retry = 3; } if ( mt_disable ) { return false; } window.onunload = mt_onunload; } function mt_set_onfirstclick() { if (mtrslib_retry > 3) { mtrslib_retry = 3; } if ( mt_disable ) { return false; } document.onclick = mt_onfirstclick; } // End functions to call from the header. // Public linking functions (to decorate individual links; advanced.) // Decorate a link with to // cause the MT ActiveX to appear. function mt_protect() { // if ( mt_disable ) { window.event.srcElement.click(); return true; } mtreq_link( window.event.srcElement ); } // End link functions //////////////////////////////////////////////////////////////////////////////////////////// function set_cookie( k, v, expire ) { var expire_val = ""; if ( expire ) { var exp_date; exp_date = new Date(); exp_date.setTime( exp_date.getTime() + expire ); expire_val = "expires=" + exp_date.toGMTString() + ";"; } document.cookie = k + "=" + escape(v) + ";" + expire_val; } function get_cookie( k ) { var c_arr = document.cookie.split( "; " ); var i; for ( i = 0; i < c_arr.length; i++ ) { var pair = c_arr[i].split("="); if ( pair[0] == k ) { return unescape( pair[1] ); } } return null; } mt_clicklink = null; function mt_passthru() { return true; } function mt_clickthru() { content.document.open("text/html", "replace") content.document.write(""); content.document.close(); if ( mt_clicklink != null ) { mt_clicklink.click(); if(mt_handler == mt_req) { mt_clicklink.onclick = function() { mtreq_link(this); } } else { mt_clicklink.onclick = function() { mtopt_link(this); } } } } // Event handlers. function mt_onunload() { // Throw an offscreen pop with the AX code. newWindow=window.open('','','toolbar=no,scrollbars=no,width=200,height=150,top=10000,left=100000'); var contentstring = ""; contentstring += "