isShowingBillboard = true; setTimeout("loadBillBoard()", 5000); function loadBillBoard() { //Get the window height and width var winH = $(window).height(); var winW = $(window).width(); //Set the popup window to center $('#dialog').css('top', (winH / 2 - $('#dialog').height() / 2) + $(document).scrollTop()); $('#dialog').css('left', (winW / 2 - $('#dialog').width() / 2) + $(document).scrollLeft()); //transition effect $('#dialog').fadeIn(2000); // Remove the top Flash-banner $('.topAds').hide(); $('.AdBox').hide(); $('#topBannerAd').hide(); $('#topad').hide(); // Log the pop up showing logPopUpShowing(); } function closeDialog() { jQuery('#dialog').hide(); $('.topAds').show(); $('.AdBox').show(); $('#topBannerAd').show(); $('#topad').show(); } function registerLead() { var companyNameVal = ''; //$('#companyInput').val(); var nameVal = $('#nameInput').val(); if (nameVal == '' || nameVal == 'Dit navn') { $('#message').text('Du skal udfylde dit navn.'); return; } //var urlVal = $('#urlInput').val(); //if (urlVal = '') { // $('#message').text('Du skal udfylde din URL.'); // return; //} var zipCodeVal = '' var countryIdVal = ''; var cityVal = '***popup***'; var phoneVal = $('#phoneInput').val(); if (phoneVal == '' || phoneVal == 'Dit tlf. nr.') { $('#message').text('Du skal udfylde dit telefonnummer'); return; } var emailVal = $('#emailInput').val(); if (emailVal == '' || emailVal == 'Din email') { $('#message').text('Du skal udfylde din emailadresse'); return; } var companyNameVal = $('#companyNameInput').val(); if (companyNameVal == '' || companyNameVal == 'Dit virksomhedsnavn') { $('#message').text('Du skal udfylde virksomhedsnavn'); return; } var addressVal = $('#cvrInput').val(); if (addressVal == '' || addressVal == 'Dit CVR-nummer eller virksomhedsadresse') { $('#message').text('Du skal udfylde CVR eller adresse'); return; } addressVal = "CVR eller Adresse: " + addressVal; var userIdVal = '0847a2f1-1a55-4ce2-b79f-3bba4ef918c8'; var campaignIdVal = '86'; var isFromPopUpVal = true; $.post("https://www.amino.dk/RegisterPartnerCampaignLead.aspx", { companyName: companyNameVal, name: nameVal, zipCode: zipCodeVal, countryId: countryIdVal, address: addressVal, city: cityVal, email: emailVal, phone: phoneVal, userId: userIdVal, campaignId: campaignIdVal, isFromPopUp: isFromPopUpVal }); closeDialog(); } function logPopUpShowing() { $.post("https://www.amino.dk/LogPartnerCampaignPopUpShowing.aspx", {userId: '0847a2f1-1a55-4ce2-b79f-3bba4ef918c8', campaignId: 86}); }