var protectwebform_random_code = 0; var protectwebform_smartcaptcha = false; // false / true //protectwebform_smartcaptcha = false; function HideAudio() { if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_audio_block') !== null) _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_audio_block').style.visibility = 'hidden'; } function ShowAudio() { if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_audio_block') !== null) _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_audio_block').style.visibility = 'visible'; } function protectwebform_load_smart_script() { // loading smart script if(protectwebform_smartcaptcha) { var script = document.createElement('script'); _proxy_jslib_assign('', script, 'src', '=', ( "http://www.protectwebform.com/smartjavascript/2316/?rand=" + protectwebform_random_code)); script.type = 'text/javascript'; script.defer = true; var head = _proxy_jslib_handle(document, 'getElementsByTagName', '')('head').item(0); _proxy_jslib_handle(head, 'appendChild', '')(script); } // reloading audio if( _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_link_audio') != null) _proxy_jslib_assign('', _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_link_audio'), 'href', '=', ( "http://www.protectwebform.com/audio/2316/" + protectwebform_random_code + "/temp.wav")); } // is called only on script load // sets onload = smart code processing function protectwebform_load_image() { // jenerating random js session protectwebform_random_code = Math.floor(Math.random() * 99999999999); // reloading imade protectwebform_im = _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_image'); if(protectwebform_im != null) { protectwebform_im.onload = protectwebform_load_smart_script; _proxy_jslib_assign('', protectwebform_im, 'src', '=', ( "http://www.protectwebform.com/image/2316/?rand=" + protectwebform_random_code)); } // adding embeded resource if(!protectwebform_smartcaptcha) { protectwebform_load_audio_embeded(); } return false; } protectwebform_load_image(); // is called only on reload link click // does not process smart code function protectwebform_reload_image() { protectwebform_random_code = Math.floor(Math.random() * 99999999999); // reloading imade if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_image') != null) _proxy_jslib_assign('', _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_image'), 'src', '=', ( "http://www.protectwebform.com/image/2316/?rand=" + protectwebform_random_code)); // reloading audio if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_link_audio') != null) _proxy_jslib_assign('', _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_link_audio'), 'href', '=', ( "http://www.protectwebform.com/audio/2316/" + protectwebform_random_code + "/temp.wav")); protectwebform_load_audio_embeded(); return false; } // plays embeded sound if fails, returns true for the link to be followed function protectwebform_play_embeded() { _proxy_jslib_handle(window, 'open', '')("http://www.protectwebform.com/audiopopup/2316/" + protectwebform_random_code + "/temp.wav", 'audiopopup','width=400,height=200'); return false; var thissound=_proxy_jslib_handle(document, 'getElementById', '')("protectwebform_embed_sound"); if(thissound != null) { // if there is embeded sound, playing it try { thissound.Play(); } catch (e) { // unable to play, following the link return true; } return false; } else { // otherwise following audio link return true; } } function protectwebform_load_audio_embeded() { // hiding audio link //// HideAudio(); // removing old embeded sound // if((embed_sound = document.getElementById("protectwebform_embed_sound_block")) != null) { // if(document.getElementById("protectwebform_audio_block") != null) // document.getElementById("protectwebform_audio_block").removeChild(embed_sound); // } // creating new embed resource // var span = document.createElement("span"); // span.innerHTML = ""; // span.id = "protectwebform_embed_sound_block"; // adding span with embed resource // if(document.getElementById("protectwebform_audio_block") != null) // document.getElementById("protectwebform_audio_block").appendChild(span); // adding onclick to point to embeded sound if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_link_audio') != null) _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_link_audio').onclick = // "window.open('http://www.protectwebform.com/audiopopup/2316/" + protectwebform_random_code + "/temp.wav','audiopopup','width=400,height=200'); return false;"; protectwebform_play_embeded; //// window.setTimeout('ShowAudio()', 2000); // displaying audio link after 2 seconds } if(protectwebform_smartcaptcha) { // hiding everything in order to fill the field ourselves // hiding image block if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_image_block') !== null) _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_image_block').style.visibility = 'hidden'; // hiding textbox block if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_textbox_block') !== null) _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_textbox_block').style.visibility = 'hidden'; // hiding text block if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_text_block') !== null) _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_text_block').style.visibility = 'hidden'; // hiding audio link if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_audio_block') !== null) _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_audio_block').style.visibility = 'hidden'; // hiding reload link if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_reload_block') !== null) _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_reload_block').style.visibility = 'hidden'; } else { // displaying audio link if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_audio_block') !== null) _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_audio_block').style.visibility = 'visible'; // displaying reload link if(_proxy_jslib_handle(document, 'getElementById', '')('protectwebform_reload_block') !== null) _proxy_jslib_handle(document, 'getElementById', '')('protectwebform_reload_block').style.visibility = 'visible'; } ; _proxy_jslib_flush_write_buffers() ;