// contact_number_updater // jh/june2012 - allows page caching & google spiders to push through. /** Original Scripts **/ var ContactNumberUpdater = { local_assets : { 'number' : '020 7437 4370', 'country' : 'United Kingdom' }, nn : '020 7437 4370', contact_string : '', // Contact message string contact_id : 'contact_id', // Contact ID for HTML element toll_free : '', initialise : function() // Initialise the contact element { try { var sitcount= 0; var sit = setInterval(function() { sitcount++; if ( $ ) { setTimeout( function() { $(".mobile").hide(); } , 300 ); clearInterval(sit); } if ( sitcount > 5 ) clearInterval(sit); },500); } catch ( mobException1 ) { console.log("Hello: " + mobException1.message ) ; } var counter = 0; if ( ContactNumberUpdater.contact_string ) { var contact_interval_test = setInterval ( function() { try { if ( document.getElementById( ContactNumberUpdater.contact_id ) && ContactNumberUpdater.toll_free > '' ) { counter++; document.getElementById( ContactNumberUpdater.contact_id ).innerHTML = ContactNumberUpdater.contact_string ; if ( counter >= 4 ) clearInterval( contact_interval_test ) ; } } catch ( contactExceptionError ) { // EMPTY } try { document.getElementById("cc_call_from_your_country").innerHTML = ContactNumberUpdater.local_assets.number; document.getElementById("cc_country_name").innerHTML = ContactNumberUpdater.local_assets.country; counter=counter+2; if ( counter >= 4 ) clearInterval( contact_interval_test ) ; } catch ( updateContactSettingsRightSideBasic ) { // EMPTY } try { if ( ContactNumberUpdater.toll_free > '' && ContactNumberUpdater.nn != ContactNumberUpdater.toll_free ) { document.getElementById("free_phone_area").style.display = ''; document.getElementById("cc_toll_free_el_one").innerHTML = ContactNumberUpdater.toll_free; counter++; if ( counter >= 4 ) clearInterval( contact_interval_test ) ; } } catch ( tollFreeUpdateNumberException ) { // EMPTY } }, 500 ); } } }; try { ContactNumberUpdater.initialise(); } catch ( genericContactException ) { // EMPTY }