Sie sind auf Seite 1von 17

//doclix_show('file: ad_popup.

js');
//doclix_time_stamp();
/*[if this file is loading, the ads had been returned from the server, so we sho
w the ads, ad pins, and ad units]*/
var doclix_all_spans = doclix_$TN('span');
for (var i=0; i<doclix_all_spans.length; i++) {
var span_cn = doclix_all_spans[i].className;
if (
span_cn.indexOf('doclix_ad_slot') >= 0 ||
span_cn.indexOf('doclix_ad_spot') >= 0 ||
span_cn.indexOf('doclix_ad_unit') >= 0 ||
span_cn.indexOf('doclix_ad_pin') >= 0
)
doclix_all_spans[i].style.display = 'block';
}
var doclix_z_index = 10000000000;
/*[Ad Rotation Routines]*/
var doclix_ad_state = 'down';
var doclix_ad_current = -1;
var doclix_ad_init, doclix_ad_decay, doclix_ad_waiting, doclix_ad_turn, doclix_r
otate_call;/*[timeouts]*/
var doclix_ad_delay_in = 100; /*[ms]*/
var doclix_ad_delay_out = 1500; /*[ms]*/
var doclix_ad_rev_limit = 3; /*[number of ad turns before they stop rotating]*/
var doclix_que_repeat_timer = 10001; /*[ms]*/
var doclix_que_offset_timer = 1; /*[ms]*/
var doclix_que_restart_timer = 501; /*[ms]*/
if (doclix_use_frame) {
doclix_ad_delay_out = 2500; /*[ms]*/
}
if (doclix_home_mode) {
doclix_ad_rev_limit = false; /*[rotate infinitely]*/
}
if (doclix_demo_mode) {
doclix_que_repeat_timer = 5001;
doclix_ad_rev_limit = false; /*[rotate infinitely]*/
}
/*[do not make make panel, unless needed]*/
var doclix_make_panel = false;
/*[ad tracing string]*/
var doclix_msgTrace;
doclix_traceStr = function (top_index, sub_index) {
var trace_string = '';
if (typeof doclix_ad_target_urls[top_index] != 'undefined') {
if (typeof doclix_ad_target_urls[top_index] != 'string') {
if (sub_index) {
trace_string = doclix_ad_target_urls[top_index][
sub_index].substr(doclix_ad_target_urls[top_index][sub_index].indexOf('='));
} else { /*[if no sub_index, or sub_index = 0...]*/
trace_string = doclix_ad_target_urls[top_index][
0].substr(doclix_ad_target_urls[top_index][0].indexOf('='));
}
} else {
trace_string = doclix_ad_target_urls[top_index].substr(d
oclix_ad_target_urls[top_index].indexOf('='));
}
}
return trace_string;
}

doclix_fillAd = function (obj, ad_index) {


obj.innerHTML = '';
var ad_code = parseInt(obj.getAttribute('doclix_ad'));
var msg_txt = doclix_$T(doclix_ad_messages[ad_index]);
if (!doclix_demo_mode && (!obj.getAttribute('adturn') || parseInt(obj.ge
tAttribute('adturn')) == 1)) {
/*[msg tracing string]*/
doclix_msgTrace = doclix_$E('img');
doclix_msgTrace.className = 'doclix_msg_trace';
doclix_msgTrace.style.display = 'none';
var trace_str = doclix_traceStr(ad_index);
doclix_msgTrace.src = 'http://ads.doclix.com/adserver/CntImprImg
?type=msg&p' + trace_str + '&r=' + Math.ceil(10000 * Math.random());
obj.insertBefore(doclix_msgTrace, obj.lastChild);
}
obj.insertBefore(msg_txt, obj.lastChild);
if (ad_code >= 20) {
var spot = obj.parentNode;
var show_url, show_icon;
ad_code == 21 || ad_code == 23 ? show_url = true : show_url = fa
lse;
ad_code == 22 || ad_code == 23 ? show_icon = true : show_icon =
false;
spot.id = ad_index+'_ad_spot';
if (spot.className.indexOf('doclix_ad_slot') >= 0) {
spot.className = spot.className.replace('doclix_ad_slot'
, 'doclix_ad_spot');
} else if (spot.className.indexOf('doclix_ad_spot') < 0) {
spot.className += ' doclix_ad_spot';
} else {
spot.className = 'doclix_ad_spot';
}
var ad_front = doclix_$E('div');
ad_front.id = ad_index+'_ad_front';
show_icon ? ad_front.className = 'ad_front_icon' : ad_fr
ont.className = 'ad_front';
var ad_back = doclix_$E('div');
ad_back.id = ad_index+'_ad_back';
show_icon ? ad_back.className = 'ad_back_icon' : ad_back
.className = 'ad_back';
ad_back.style.display = 'none';
var ad_base_font_size = 11;
var ad_font_size_str = doclix_getCSSProp(obj, 'font-size', 'font
Size');
if (ad_font_size_str.indexOf('px') > 0) {
ad_base_font_size = parseInt(doclix_getCSSProp(obj, 'fon
t-size', 'fontSize'));
}
var ad_bg_offset_y = Math.max(ad_base_font_size-11, 0)+'px';
if (show_icon) {
if (doclix_isIE) {
ad_front.style.backgroundPositionY = ad_bg_offse
t_y;
ad_back.style.backgroundPositionY = ad_bg_offset
_y;
} else {
ad_front.style.backgroundPosition = '0px '+ad_bg
_offset_y;
ad_back.style.backgroundPosition = '0px '+ad_bg_
offset_y;
}
}
var ad_site;
if (show_url) {
ad_site = doclix_$E('div');
ad_site.className = 'ad_site';
ad_site.style.fontSize = ad_base_font_size-1+'px';
}
var ad_head = doclix_$E('div');
ad_head.className = 'ad_head';
ad_head.style.fontSize = ad_base_font_size+'px';
var ad_text = doclix_$E('div');
ad_text.className = 'ad_text';
ad_text.style.fontSize = ad_base_font_size-1+'px';
var ad_site_txt;
if (show_url) {
if (typeof doclix_ad_display_urls[ad_index] == 'string')
{
ad_site_txt = doclix_$T(doclix_ad_display_urls[a
d_index]);
} else if (typeof doclix_ad_display_urls[ad_index] == 'o
bject' && typeof doclix_ad_display_urls[ad_index][0] == 'string') {
ad_site_txt = doclix_$T(doclix_ad_display_urls[a
d_index][0]);
}
}
var ad_head_txt;
if (typeof doclix_ad_titles[ad_index] == 'string') {
ad_head_txt = doclix_$T(doclix_ad_titles[ad_index]);
} else if (typeof doclix_ad_titles[ad_index] == 'object' && type
of doclix_ad_titles[ad_index][0] == 'string') {
ad_head_txt = doclix_$T(doclix_ad_titles[ad_index][0]);
}
var ad_text_txt;
if (typeof doclix_ad_descriptions[ad_index] == 'string') {
ad_text_txt = doclix_$T(doclix_ad_descriptions[ad_index]
);
} else if (typeof doclix_ad_descriptions[ad_index] == 'object' &
& typeof doclix_ad_descriptions[ad_index][0] == 'string') {
ad_text_txt = doclix_$T(doclix_ad_descriptions[ad_index]
[0]);
}
ad_head.appendChild(ad_head_txt);
ad_text.appendChild(ad_text_txt);
spot.appendChild(ad_front);
spot.appendChild(ad_back);
ad_front.appendChild(obj);
if (show_url) {
ad_site.appendChild(ad_site_txt);
ad_front.appendChild(ad_site);
}
ad_back.appendChild(ad_head);
ad_back.appendChild(ad_text);
}
}
doclix_flipAd = function (obj, show_ad) {
var ad_id = parseInt(obj.id);
var ad_front = doclix_$ID(ad_id + '_ad_front');
var ad_back = doclix_$ID(ad_id + '_ad_back');
if (show_ad) {
ad_back.style.display = 'block';
ad_front.style.display = 'none';
if (!doclix_demo_mode) {
trace_str = doclix_traceStr(ad_id);
doclix_adTrace.src = 'http://ads.doclix.com/adserver/Cnt
ImprImg?type=ad&p' + trace_str + '&r=' + Math.ceil(10000 * Math.random());
}
/*[debug info]*/
if (doclix_ad_debug_info) {
var debug_txt;
if (typeof doclix_ad_debug_info[ad_id] == 'string') {
debug_txt = doclix_ad_debug_info[ad_id];
} else if (typeof doclix_ad_debug_info[ad_id] == 'object
' && typeof doclix_ad_debug_info[ad_id][0] == 'string') {
debug_txt = doclix_ad_debug_info[ad_id][0];
}
doclix_$ID('doclix_ad_debug').innerHTML = debug_txt;
doclix_$ID('doclix_ad_debug').style.display = 'block';
}
} else {
ad_back.style.display = 'none';
ad_front.style.display = 'block';
}
}
/*[ad message fore-aft switching]*/
doclix_shiftAd = function (obj, fwd) {
var ad_to_shift = doclix_$TAV('span', 'doclix_ad', '', obj.parentNode.pa
rentNode)[0];
var ad_dom_id = parseInt(ad_to_shift.getAttribute('id'));
var ad_shift_id = parseInt(ad_to_shift.getAttribute('adid'));
if (fwd) {
ad_shift_id++;
if (ad_shift_id > ad_dom_id+doclix_slot_cap-1) {
ad_shift_id = ad_dom_id;
}
} else {
ad_shift_id--;
if (ad_shift_id < ad_dom_id) {
ad_shift_id = ad_dom_id+doclix_slot_cap-1;
}
}
ad_to_shift.setAttribute('adid', ad_shift_id);
var ad_new_id = parseInt(ad_to_shift.getAttribute('adid'));
doclix_fillAd(ad_to_shift, ad_new_id);
}
/*[Animation]*/
var doclix_animation_running = false;
/*[CSS Animation]*/
/*[Fade]*/
doclix_setFade = function (obj,f) {
obj.fade = f;
if (doclix_isIE) {
obj.style.zoom = 1;
obj.style.filter = 'alpha(opacity='+parseInt(f*100)+')';
} else {
obj.style.opacity = f;
}
}
/*[Spread]*/
var doclix_ad_hide_kern, doclix_ad_show_kern;
doclix_setSpread = function (obj,krn) {
obj.kern = krn;
obj.style.letterSpacing = krn+'px';
}
/*[Zoom]*/
var doclix_ad_font_size, doclix_ad_font_unit, doclix_base_font_size, doclix_base
_font_unit;
doclix_getFontSize = function (obj) {
if (typeof doclix_ad_font_size == 'undefined') {
doclix_ad_font_size = parseFloat(doclix_getCSSProp(obj, 'font-si
ze', 'fontSize'));
}
if (typeof doclix_ad_font_unit == 'undefined') {
doclix_ad_font_unit = doclix_getCSSProp(obj, 'font-size', 'fontS
ize').replace(/[0-9\.]/g, '');
}
if (typeof doclix_base_font_size == 'undefined') {
if (!isNaN(parseInt(doclix_getCSSProp(document.body, 'font-size'
, 'fontSize')))) {
doclix_base_font_size = parseFloat(doclix_getCSSProp(doc
ument.body, 'font-size', 'fontSize'));
//doclix_base_font_unit = doclix_getCSSProp(document.bod
y, 'font-size', 'fontSize').replace(/[0-9\.]/g, '');
} else {
doclix_base_font_size = 16;
}
}//alert(doclix_ad_font_size+doclix_ad_font_unit)
}
doclix_setZoom = function (obj,fs,unit) {
obj.fzoom = fs;
obj.style.fontSize = fs+unit;//alert(fs+unit)
}
var doclix_css_change;
doclix_animateCSS = function (obj,ad_id,effect) {
if (doclix_animation_running == false) {
doclix_xInt(doclix_css_change);
var ms, io;
switch (effect) {
case 'fade':
ms = 25;
if (typeof obj.fade == 'undefined') {
doclix_setFade(obj,0);
}
if (obj.fade == 0) {
io = 'in';
} else {
io = 'out';
}
break;
case 'spread':
if (typeof doclix_ad_show_kern == 'undefined') {
if (!isNaN(parseInt(doclix_getCSSProp(ob
j, 'letter-spacing', 'letterSpacing')))) {
doclix_ad_show_kern = parseInt(d
oclix_getCSSProp(obj, 'letter-spacing', 'letterSpacing'));
} else {
doclix_ad_show_kern = 0;
}
}
doclix_getFontSize(obj);
if (doclix_ad_font_unit != 'px') {/*[IE situatio
n]*/
if (doclix_ad_font_unit == '%') {
doclix_ad_hide_kern = Math.floor
(((doclix_ad_font_size/100)*11)/2);
} else if (doclix_ad_font_unit == 'pt')
{
doclix_ad_hide_kern = Math.floor
(doclix_ad_font_size/2);
} else if (doclix_ad_font_unit == 'em')
{
doclix_ad_hide_kern = Math.floor
(doclix_base_font_size*16/2);
} else {
//doclix_ad_hide_kern = 5;//for
now
}
} else {
doclix_ad_hide_kern = Math.floor(doclix_
ad_font_size/2);
}
ms = 25;
if (typeof obj.kern == 'undefined') {
doclix_setSpread(obj,-doclix_ad_hide_ker
n);
}
if (obj.kern == -doclix_ad_hide_kern) {
io = 'in';
} else {
io = 'out';
}
break;
case 'zoom':
doclix_getFontSize(obj);
ms = 10;
if (typeof obj.fzoom == 'undefined') {
doclix_setZoom(obj,0,doclix_ad_font_unit
);
}
if (obj.fzoom == 0) {
io = 'in';
} else {
io = 'out';
}
break;
}
doclix_css_change = window.setInterval(function () {doclix_changeProp(ob
j,ad_id,effect,io)},ms);
}
}
doclix_changeProp = function (obj,ad_id,effect,io) {
switch (effect) {
case 'fade':
var step = 0.1;
if (io == 'in') {
if (obj.fade == 0) {
doclix_animation_running = true;
doclix_fillAd(obj,ad_id);
}
if (obj.fade < 1) {
doclix_setFade(obj,parseFloat(obj.fade) + parseF
loat(step));
} else {
doclix_setFade(obj,1);
/*[switch ads]*/
doclix_xInt(doclix_css_change);
doclix_animation_running = false;
doclix_rotateAds(doclix_getTimer());
}
} else if (io == 'out') {
if (obj.fade > 0) {
doclix_setFade(obj,parseFloat(obj.fade) - parseF
loat(step))
} else {
doclix_setFade(obj,0);
doclix_animateCSS(obj,ad_id,effect);
}
}
break;
case 'spread':
var step = 1;
if (io == 'in') {
if (obj.kern == -doclix_ad_hide_kern) {
doclix_animation_running = true;
doclix_fillAd(obj,ad_id);
}
if (obj.kern < doclix_ad_show_kern) {
doclix_setSpread(obj,parseInt(obj.kern) + parseI
nt(step));
} else {
doclix_setSpread(obj,doclix_ad_show_kern);
/*[switch ads]*/
doclix_xInt(doclix_css_change);
doclix_animation_running = false;
doclix_rotateAds(doclix_getTimer());
}
} else if (io == 'out') {
if (obj.kern > -doclix_ad_hide_kern) {
doclix_setSpread(obj,parseInt(obj.kern) - parseI
nt(step))
} else {
doclix_setSpread(obj,-doclix_ad_hide_kern);
doclix_animateCSS(obj,ad_id,effect);
}
}
break;
case 'zoom':
var step = 1;
if (doclix_ad_font_unit == '%') {
step = 5;
} else if (doclix_ad_font_unit == 'em') {
step = 0.1;
}
if (io == 'in') {
if (obj.fzoom == 0) {
doclix_animation_running = true;
doclix_fillAd(obj,ad_id);
}
if (obj.fzoom < doclix_ad_font_size) {
doclix_setZoom(obj,parseFloat(obj.fzoom) + parse
Float(step),doclix_ad_font_unit);
} else {
doclix_setZoom(obj,doclix_ad_font_size,doclix_ad
_font_unit);
/*[switch ads]*/
doclix_xInt(doclix_css_change);
doclix_animation_running = false;
doclix_rotateAds(doclix_getTimer());
}
} else if (io == 'out') {
if (obj.fzoom > 0) {
doclix_setZoom(obj,parseFloat(obj.fzoom) - parse
Float(step),doclix_ad_font_unit)
} else {
doclix_setZoom(obj,0,doclix_ad_font_unit);
doclix_animateCSS(obj,ad_id,effect,doclix_ad_fon
t_unit);
}
}
break;
}
}
/*[DOM text animation]*/
var doclix_ad_text_holder;
var doclix_ad_text_target;
var doclix_ad_text_letter;
var doclix_ad_text_index;
var doclix_ad_text_printing;
/*[animations]*/
var doclix_ad_que = [];
var doclix_ad_que_i = 0;
/*[start]*/
doclix_typeString = function (obj_id, msg_i, mode) {
if (doclix_animation_running == false) {
doclix_xTmo(doclix_ad_turn); /*[pause rotation]*/
doclix_ad_text_target = doclix_$ID(obj_id);
var msg_str = doclix_ad_messages[msg_i];
doclix_ad_text_index = 0;
doclix_animation_running = true;
doclix_ad_text_target.innerHTML = '&nbsp;';/*[clear the text]*/
if (!doclix_demo_mode && (!doclix_ad_text_target.getAttribute('a
dturn') || parseInt(doclix_ad_text_target.getAttribute('adturn')) == 1)) {
doclix_msgTrace = doclix_$E('img');
doclix_msgTrace.className = 'doclix_msg_trace';
doclix_msgTrace.style.display = 'none';
var trace_str = doclix_traceStr(msg_i);
doclix_msgTrace.src = 'http://ads.doclix.com/adserver/Cn
tImprImg?type=msg&p' + trace_str + '&r=' + Math.ceil(10000 * Math.random());
doclix_ad_text_target.insertBefore(doclix_msgTrace, docl
ix_ad_text_target.lastChild);
}
if (mode == 5 || mode == 6) {
doclix_ad_text_holder = msg_str.reverse().split('');
} else if (mode == 3 || mode == 4) {
doclix_ad_text_holder = msg_str.split('');
}
doclix_sendToType(mode);
}
}
doclix_sendToType = function (mode) {
if (doclix_ad_text_index < doclix_ad_text_holder.length) {
doclix_ad_text_printing = window.setTimeout( function () {
doclix_getLetter(doclix_ad_text_target,doclix_ad_text_in
dex,mode);
}, 5);
} else {
doclix_ad_text_target.removeChild(doclix_ad_text_target.lastChil
d);
doclix_animation_running = false;
doclix_rotateAds(doclix_getTimer());
}
}
doclix_getLetter = function (trgt,ind,mode) {
doclix_ad_text_letter = doclix_$T(doclix_ad_text_holder[ind]);
if (doclix_ad_text_letter.value == '\\') doclix_ad_text_letter.value = '
';
doclix_typeLetter(trgt,doclix_ad_text_letter,mode);
}
doclix_typeLetter = function (trgt,ltr,mode) {
if (mode == 3 || mode == 4) {/*[spell out]*/
trgt.insertBefore(ltr,trgt.lastChild);
} else if (mode == 5 || mode == 6) {/*[push in]*/
trgt.insertBefore(ltr,trgt.firstChild);
}
doclix_xTmo(doclix_ad_text_printing);
doclix_ad_text_index++;
doclix_sendToType(mode);
}
/*[ad fron-back transitions]*/
var doclix_transition_running = false;
doclix_transition = function (start_obj, end_obj, effect) {
doclix_transition_running = true;
switch (effect) {
case 'fade':
//tbd
break
}
}
doclix_adImage = function (pin, ad_id) {/*[clear existing image, if any]*/
var ad_pics = doclix_$TAV('img', 'class', 'doclix_img', pin.parentNode);
if (ad_pics.length > 0) {
pin.parentNode.removeChild(ad_pics[0]);
pin.parentNode.className = pin.parentNode.className.replace(/ do
clix_img_slot/g, '');
pin.className = '';
}
if (doclix_ad_images) {
if (doclix_ad_images[ad_id]) {
var ad_pic = doclix_$E('img');
ad_pic.className = 'doclix_img';
ad_pic.src = doclix_ad_images[ad_id];
/*[assign actions, copy from corresponding message]*/
ad_pic.onmouseover = function () {
doclix_xTmo(doclix_ad_waiting);
doclix_xTmo(doclix_ad_init);
doclix_ad_init = window.setTimeout (function ()
{
doclix_activateAd(ad_id, pin);
}, doclix_ad_delay_in);
}
ad_pic.onmouseup = function () {
doclix_xTmo(doclix_ad_waiting);
doclix_xTmo(doclix_ad_init);
doclix_activateAd(ad_id, this, true);/*[set the
click to true to avoid pop-up blockers]*/
}
ad_pic.onmouseout = function () {
doclix_xTmo(doclix_ad_waiting);
doclix_xTmo(doclix_ad_init);
}
/*[insert image]*/
pin.parentNode.insertBefore(ad_pic, pin);
pin.className = 'doclix_img_msg';
pin.parentNode.className += ' doclix_img_slot';
}
}
}
doclix_turnAd = function (obj_id, animate, effect, timer) { doclix_show(obj_id+'
'+timer);
var obj = doclix_$ID(obj_id);
var ad_rev = parseInt(obj.getAttribute('adrev'));
var ad_run = parseInt(obj.getAttribute('adrun'));
var ad_turn = parseInt(obj.getAttribute('adturn'));
doclix_xTmo(doclix_ad_turn);
if ( ((!isNaN(ad_run) && !isNaN(ad_turn)) && ((ad_turn < doclix_ad_re
v_limit || (ad_turn == doclix_ad_rev_limit && ad_run == 0)) || !doclix_ad_rev_li
mit))
|| ((!isNaN(ad_rev) && ad_rev < 1))
) {
doclix_ad_turn = window.setTimeout(function () {
/*[multiple ads vs. single ad id]*/
if (!isNaN(ad_run)) {
obj.setAttribute('adid', parseInt(obj_id) + ad_r
un);
} else {
obj.setAttribute('adid', parseInt(obj_id));
}
/*[multiple ads - rotation counters]*/
if (!isNaN(ad_run) && !isNaN(ad_turn)) {
if (ad_run < doclix_slot_cap-1) {
ad_run++;
} else {
ad_run = 0;/*[reset count]*/
ad_turn++;
}
obj.setAttribute('adrun', ad_run);
obj.setAttribute('adturn', ad_turn);
} else if (!isNaN(ad_rev)) {
ad_rev++;
obj.setAttribute('adrev', ad_rev);
}
var ad_id = parseInt(obj.getAttribute('adid'));
if (doclix_use_frame) {
if (typeof doclix_iframe_params[ad_id] != 'undef
ined') {
obj.setAttribute('ifpars', doclix_iframe
_params[ad_id]);
}
}
if (typeof doclix_ad_images != 'undefined') {
doclix_adImage(obj, ad_id);
}
if (animate) {
if (effect <= 6) {
doclix_typeString(obj_id, parseInt(ad_id
), effect);
} else if (effect == 7 || effect == 8) {
doclix_animateCSS(obj, parseInt(ad_id),'
fade');
} else if (effect == 9 || effect == 10) {
doclix_animateCSS(obj, parseInt(ad_id),'
spread');
} else if (effect == 11 || effect == 12) {
doclix_animateCSS(obj, parseInt(ad_id),'
zoom');
}
} else {
doclix_fillAd(obj, ad_id);
doclix_rotateAds(doclix_getTimer());
}
}, timer);
}
}
doclix_getTimer = function () {
if (doclix_ad_que.length > 1) {
if (doclix_ad_que_i < doclix_ad_que.length - 1) {
doclix_ad_que_i++;
ad_timer = doclix_que_offset_timer; /*[go to the next ad
]*/
} else {
doclix_ad_que_i = 0;
ad_timer = doclix_que_repeat_timer; /*[return to the beg
ining of the que]*/
}
} else if (doclix_ad_que.length == 1) {
ad_timer = doclix_que_repeat_timer;
} else {
return false;
}
return ad_timer;
}
doclix_rotateAds = function (timer) {
if (timer) {
doclix_turnAd(doclix_ad_que[doclix_ad_que_i][0], doclix_ad_que[d
oclix_ad_que_i][1], doclix_ad_que[doclix_ad_que_i][2], timer-1);
}
}
/*[make html buffer]*/
var doclix_adBuffer;
doclix_makeAdBuffer = function () {
var html_string = '';
for (var i = 0; i < doclix_ad_titles.length; i++) {
if (typeof doclix_ad_titles[i] == 'string' && doclix_ad_titles[i
].indexOf('**html**') != -1) {
if (typeof doclix_ad_descriptions[i] == 'string' && docl
ix_ad_descriptions[i].indexOf('<img') != -1) {
html_string += doclix_ad_descriptions[i];
}
}
}
if (html_string != '') {
if (!doclix_adBuffer) {
doclix_adBuffer = doclix_$E('div');
doclix_adBuffer.id = 'ad_buffer';
doclix_adBuffer.style.position = 'absolute';
doclix_adBuffer.style.top = '-1px';
doclix_adBuffer.style.left = '-1px';
doclix_adBuffer.style.width = '1px';
doclix_adBuffer.style.height = '1px';
doclix_adBuffer.style.overflow = 'hidden';
document.body.appendChild(doclix_adBuffer);
}
doclix_adBuffer.innerHTML = html_string;
}
}
/*[collect ad anchors and assign actions]*/
doclix_assignAdAnchors = function () {
var ad_id = 0;
for (var i = 0; i < doclix_ad_links.length; i++) {
/*[check the arrays again]*/
if (typeof doclix_ad_titles[ad_id] == 'undefined') {
var arr_length = doclix_ad_titles.length;
doclix_inflateArray(doclix_ad_messages, ad_id + 2, ad_id
- (arr_length - 1));
doclix_inflateArray(doclix_ad_titles, ad_id + 2, ad_id -
(arr_length - 1));
doclix_inflateArray(doclix_ad_descriptions, ad_id + 2, a
d_id - (arr_length - 1));
doclix_inflateArray(doclix_ad_display_urls, ad_id + 2, a
d_id - (arr_length - 1));
doclix_inflateArray(doclix_ad_target_urls, ad_id + 2, ad
_id - (arr_length - 1));
doclix_inflateArray(doclix_ad_debug_info, ad_id + 2, ad_
id - (arr_length - 1));
}
var this_ad = doclix_ad_links[i];
this_ad.style.cursor = 'pointer';
var ad_code = parseInt(this_ad.getAttribute('doclix_ad'));
if ((ad_code > 12 && ad_code < 20) || ad_code > 23) /*[ignore il
legal codes]*/
ad_code = 1;
if (ad_code < 20) {/*[build panel, initiate services and message
rotation]*/
doclix_make_panel = true;
/*[assign attributes]*/
this_ad.id = ad_id + '_doclix';/*[will be parsed later t
o extract integer]*/
this_ad.setAttribute('adid', ad_id);
if (ad_code % 2 == 1) {/*[single static, single animated
]*/
this_ad.setAttribute('adrev', 0);/*[set initial
revolution count to 0]*/
if (ad_code == 1) {
doclix_ad_que.push([this_ad.id, false]);
} else {
doclix_ad_que.push([this_ad.id, true, ad
_code]);
}
ad_id++;
} else {/*[multiple static, multiple animated]*/
this_ad.setAttribute('adrun', 0);/*[set initial
run count to 0]*/
this_ad.setAttribute('adturn', 0);/*[set total r
un count to 0]*/
if (ad_code == 2) {
doclix_ad_que.push([this_ad.id, false]);
} else {
doclix_ad_que.push([this_ad.id, true, ad
_code]);
}
ad_id = ad_id + doclix_slot_cap;
}
/*[assign actions]*/
this_ad.onmouseover = function () {
doclix_xTmo(doclix_ad_waiting);
doclix_xTmo(doclix_ad_init);
var ad_id = this.getAttribute('adid');
var dom_id = this.getAttribute('id');
doclix_ad_init = window.setTimeout(function(){
doclix_activateAd(ad_id, doclix_$ID(dom_
id));
}, doclix_ad_delay_in);
}
this_ad.onmouseup = function () {
doclix_xTmo(doclix_ad_waiting);
doclix_xTmo(doclix_ad_init);
doclix_activateAd(this.getAttribute('adid'), thi
s, true);/*[set the click to true to avoid pop-up blockers]*/
}
this_ad.onmouseout = function () {
doclix_xTmo(doclix_ad_waiting);
doclix_xTmo(doclix_ad_init);
}
} else { /*[initiate services and message replacement]*/
if (this_ad.parentNode.className != 'ad_front') { /*[not
to nest ads if ran more then once!]*/
if (doclix_ad_titles[ad_id].toString().indexOf('
**html**') < 0) {
this_ad.style.cursor = 'pointer';
/*[assign attributes]*/
this_ad.id = ad_id + '_doclix';/*[will b
e parsed later to extract integer]*/
this_ad.setAttribute('adid', ad_id);
doclix_fillAd(this_ad, ad_id);
/*[assign actions]*/
var this_ad_spot = this_ad.parentNode.pa
rentNode;
this_ad_spot.onmouseover = function () {
doclix_flipAd(this, true);
}
this_ad_spot.onmouseout = function () {
doclix_flipAd(this);
}
this_ad_spot.onmouseup = function () {
doclix_new_window ? window.open(
doclix_ad_target_urls[parseInt(this.id)], '') : document.location.href = doclix_
ad_target_urls[parseInt(this.id)];
}
} else {
i--;
}
if (ad_id < 50) {
ad_id++;
} else {
break;
}
}
}
}
if (doclix_ad_que.length > 0) {
doclix_rotateAds(doclix_que_offset_timer);
}
if (!doclix_demo_mode) {
doclix_adTrace = doclix_$E('img');
doclix_adTrace.className = 'doclix_ad_trace';
document.body.appendChild(doclix_adTrace);
}
doclix_makeAdBuffer();
//doclix_show('ad anchors assigned');
}
doclix_assignAdAnchors();
//doclix_show(doclix_ad_que.length)
/*[panel support routines]*/
/*[find viewport size]*/
doclix_viewPort = function () {
if (document.clientHeight && document.clientWidth) { /*[some browsers]*/
doclix_vpX = document.clientWidth;
doclix_vpY = document.clientHeight;
} else if (window.innerHeight && window.innerWidth) { /*[standards-aware
browsers]*/
doclix_vpX = window.innerWidth;
doclix_vpY = window.innerHeight;
} else if (document.documentElement && (document.documentElement.clientW
idth || document.documentElement.clientHeight )) { /*[IE 6+ in standards-complia
nt mode]*/
doclix_vpX = document.documentElement.clientWidth;
doclix_vpY = document.documentElement.clientHeight;
} else if (document.body && (document.body.clientWidth || document.body.
clientHeight)) { /*[IE in quirks mode]*/
doclix_vpX = document.body.clientWidth;
doclix_vpY = document.body.clientHeight;
}
dBX = Math.max(document.body.scrollWidth,document.body.offsetWidth,docum
ent.documentElement.scrollWidth,document.documentElement.offsetWidth);
dBY = Math.max(document.body.scrollHeight,document.body.offsetHeight,doc
ument.documentElement.scrollHeight,document.documentElement.offsetHeight);
/*[check for the rare case if document.body is offset in relation to the
viewport]*/
doclix_body_ofsX = 0;
doclix_body_ofsY = 0;
var body_position = doclix_getCSSProp(document.body, 'position', 'positi
on');
if (body_position == 'relative') {
if (doclix_isIE) {
if (!isNaN(document.body.offsetLeft)) {doclix_body_ofsX
= document.body.offsetLeft;}
} else { /*[one can only guess, since Mozilla and WebKit incorre
ctly state computed style "auto" as "0" for the body margin]*/
var body_width = parseInt(doclix_getCSSProp(document.bod
y, 'width'));
if (!isNaN(body_width)) {
if (doclix_vpX > body_width) {
doclix_body_ofsX = parseInt((doclix_vpX
- body_width) / 2);
}
}
}
} else if (body_position == 'absolute') {
if (doclix_isIE) {
if (!isNaN(document.body.offsetLeft)) {doclix_body_ofsX
= document.body.offsetLeft;}
if (!isNaN(document.body.offsetTop)) {doclix_body_ofsY =
document.body.offsetTop;}
} else {
var body_width = parseInt(doclix_getCSSProp(doc
ument.body, 'width'));
var body_height = parseInt(doclix_getCSSProp(doc
ument.body, 'height'));
var body_top = parseInt(doclix_getCSSProp(doc
ument.body, 'top'));
var body_left = parseInt(doclix_getCSSProp(doc
ument.body, 'left'));
var body_right = parseInt(doclix_getCSSProp(doc
ument.body, 'right'));
var body_bottom = parseInt(doclix_getCSSProp(doc
ument.body, 'bottom'));
if (!isNaN(body_left)) {
doclix_body_ofsX = body_left;
} else if (!isNaN(body_width) && !isNaN(body_right)) {
doclix_body_ofsX = doclix_vpX - (body_width + bo
dy_right);
}
if (!isNaN(body_top)) {
doclix_body_ofsY = body_top;
} else if (!isNaN(body_height) && !isNaN(body_bottom)) {
doclix_body_ofsY = doclix_vpY - (body_height + b
ody_bottom);
}
}
}
return doclix_vpX, doclix_vpY, dBX, dBY, doclix_body_ofsX, doclix_body_o
fsY;
}
doclix_viewPort();
doclix_findObj = function (obj) {
objX = objY = 0;
if (obj.offsetParent) {
while (obj.offsetParent) {
objX += obj.offsetLeft;
objY += obj.offsetTop;
obj = obj.offsetParent;
}
}
return objX, objY;
}
/*[on page resize]*/
doclix_addEvent(window,'resize', doclix_viewPort);
/*[page scrolling offset]*/
doclix_findScroll = function () {
doclix_page_scrY = Math.max(document.body.scrollTop,document.documentEle
ment.scrollTop);
doclix_page_scrX = Math.max(document.body.scrollLeft,document.documentEl
ement.scrollLeft);
return doclix_page_scrY, doclix_page_scrX;
}
/*[find mouse position]*/
var doclix_mX, doclix_mY;
doclix_findMouse = function (event) {
doclix_mX = event.clientX;
doclix_mY = event.clientY;
}
doclix_addEvent(document, 'mousemove', doclix_findMouse);
/*[collect specific page elements, which may interfere with pop-up]*/
var doclix_allObjs, doclix_allEmbs, doclix_allSels, doclix_allApps;
doclix_collectEls = function () {
doclix_allObjs = doclix_$TN('object');
doclix_allEmbs = doclix_$TN('embed');
doclix_allSels = doclix_$TN('select');
doclix_allApps = doclix_$TN('applet');
}
doclix_collectEls();
/*[build popup]*/
var doclix_adPanel;
var doclix_adDrag;
var doclix_adW = 280;
var doclix_adH_fold = 42;
var doclix_adH = doclix_adH_fold;
va

Das könnte Ihnen auch gefallen