<script type="text/javascript" src="/Scripts/modernizr-2.6.2.js"></script>
<script type="text/javascript" src="/Scripts/jquery-1.11.1.js"></script>
transglobalexpress.co.uk is using jquery
<script type="text/javascript" src="/Scripts/jquery-ui-1.11.1.custom.js"></script>
transglobalexpress.co.uk is using jquery
<script type="text/javascript" src="/Scripts/bootstrap.js"></script>
<script type="text/javascript" src="/assets/shared/js/shared.js"></script>
<script type="text/javascript" src="/assets/js/prompts.js"></script>
<script type="text/javascript" src="/assets/js/validation.js"></script>
<script type="text/javascript" src="/assets/shared/js/jquery.blockUI.js"></script>
transglobalexpress.co.uk is using jquery
<script type="text/javascript" src="/assets/shared/js/jquery.colorbox.v1.4.33.min.js"></script>
transglobalexpress.co.uk is using jquery
<script type="text/javascript" src="/assets/shared/js/jquery-impromptu.min.js"></script>
transglobalexpress.co.uk is using jquery
<script type="text/javascript" src="/Scripts/jquery.validate.js"></script>
transglobalexpress.co.uk is using jquery
<script type="text/javascript" src="/Scripts/jquery.validate.unobtrusive.js"></script>
transglobalexpress.co.uk is using jquery
<script type="text/javascript" src="/Scripts/jquery.unobtrusive-ajax.js"></script>
transglobalexpress.co.uk is using jquery
<script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.sync.bootstrap.min.js"></script>
<script type="text/javascript" src="/Scripts/angular.min.js"></script>
<script type="text/javascript" src="/Scripts/angular-sanitize.min.js"></script>
<script type="text/javascript" src="/Scripts/angular-animate.min.js"></script>
<script type="text/javascript" src="/Scripts/angular-route.js"></script>
<script type="text/javascript" src="/Scripts/angular-ui-router.min.js"></script>
<script type="text/javascript" src="/Scripts/AngularApp/TransglobalApp.js?V=5.2.721.0"></script>
<script type="text/javascript" src="/Scripts/AngularApp/GlobalController.js?V=5.2.721.0"></script>
<script type="text/javascript" src="/Scripts/AngularApp/CommonFactories.js?V=5.2.721.0"></script>
<script type="text/javascript" src="/Scripts/AngularApp/CommonDirectives.js?V=5.2.721.0"></script>
<script type="text/javascript" src="/assets/js/responsive-menu/jquery.mmenu.min.all.js"></script>
transglobalexpress.co.uk is using jquery
<script type="text/javascript">
if (do***ent.do***entElement.clientWidth < 740) {
$(function () {
$('nav#menu').mmenu({
extensions: ['effect-slide', 'pageshadow'],
header: true,
searchfield: false,
counters: false
});
});
}
if (do***ent.do***entElement.clientWidth < 1024) {
$(function () {
$('.click, .badge-hover').click(function () {
$(this).toggleClass('active');
});
});
}
/*$(window).bind('resize', function () {
window.location.href = window.location.href;
});
*/
</script>
<script type="text/javascript">
$(do***ent).on("click", ".viewpopup", function () {
console.log("click");
$('#overlay').addClass("active");
$(this).next('.moredetail').addClass("active");
$('#popup-content').addClass("active");
return false;
});
$(do***ent).on("click", ".closePopUp, .close", function () {
console.log("click");
$('#overlay').removeClass("active");
$('.moredetail').removeClass("active");
$('#popup-content').removeClass("active");
$('.slider.left').removeClass("active");
return false;
});
$(do***ent).ready(function () {
$("#cart").show();
$(".inputWeight, .inputDimensions").keyup(null);
$(".inputWeight, .inputDimensions").keypress(function (evt) {
var charCode = (evt.which) ? evt.which : event.keyCode;
var fromWhich = (evt.which) ? true : false;
console.log(charCode);
var stop = true;
if ((charCode > 47 && charCode < 58) || (!fromWhich && charCode > 95 && charCode < 106) || charCode == 44 || charCode == 46) {
stop = false;
}
return !stop;
});
$(".inputWeight, .inputDimensions").blur(function (evt) {
$(evt.target).val($(evt.target).val().replace(",", "."));
});
$(do***ent).on("click", ".confirmCollection", function (event) {
$(event.target).parent(".collection_section_content").addClass("deactivate");
});
$('.gsc-input').attr('placeholder', 'Search');
$(window).scroll(function () {
var sticky = $('#sticky'),
scroll = $(window).scrollTop();
if (scroll >= 100) sticky.addClass('fixed');
else sticky.removeClass('fixed');
});
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= 50) {
$(".widget_accreditations").removeClass("active");
} else {
$(".widget_accreditations").addClass("active");
}
});
$("#slideshow > figure:gt(0)").hide();
setInterval(function () {
$('#slideshow > figure:first')
.fadeOut(1500)
.next()
.fadeIn(1500)
.end()
.appendTo('#slideshow');
}, 5000);
$('.search_options input[type="radio"]').click(function(){
var inputValue = $(this).attr("value");
var targetBox = $("." + inputValue);
$(".search_option").not(targetBox).removeClass('active');
$(targetBox).addClass('active');
});
var parentDivs = $('#nestedAccordion div'),
childDivs = $('#nestedAccordion span.title').siblings('div');
$('#nestedAccordion h2, #nestedAccordion h3, #nestedAccordion h4, #nestedAccordion h5').click(function () {
parentDivs.slideUp();
if ($(this).next().is(':hidden')) {
$(this).next().slideDown();
} else {
$(this).next().slideUp();
}
$("#nestedAccordion h2, #nestedAccordion h3, #nestedAccordion h4, #nestedAccordion h5").removeClass("active");
$("#nestedAccordion span.title").removeClass("active");
$(this).toggleClass("active");
return false
});
$('#nestedAccordion span.title').click(function () {
childDivs.slideUp();
if ($(this).next().is(':hidden')) {
$(this).next().slideDown();
} else {
$(this).next().slideUp();
}
$("#nestedAccordion span.title").removeClass("active");
$(this).addClass("active");
return false
});
var alphabetise = $('.alphabetise');
var listitems = alphabetise.children('li').get();
listitems.sort(function (a, b) {
var compA = $(a).text().toUpperCase();
var compB = $(b).text().toUpperCase();
return (compA < compB) ? -1 : (compA > compB) ? 1 : 0;
})
$.each(listitems, function (idx, itm) {
alphabetise.append(itm);
});
$('.more, .expandadvanced').click(function () {
$(this).prev('.moreinfo').slideToggle("slow").css('display', 'block');
$(this).prev('.moreinfo').toggleClass("active");
$(this).toggleClass("active");
return false;
});
$('.expand').click(function () {
$(this).next('.moreinfo').slideToggle("slow").css('display', 'block');
$(this).next('.moreinfo').toggleClass("active");
$(this).toggleClass("active");
return false;
});
$(".enquiry-button").click(function () {
$(".enquiry-form").slideToggle("slow");
$(this).toggleClass("active");
return false;
});
$('.expandall').click(function () {
$(".moreinfo").slideToggle("slow");
$(this).toggleClass("active");
return false
});
$('.search').click(function () {
$(this).toggleClass('active');
});
$("#trackingFailed span.close").click(function () {
$("#trackingFailed").css({ "display": "none"
});
return false;
});
$("#trigger-video, .close-video").click(function () {
$(".videoContainer").slideToggle("slow");
$(this).toggleClass("active");
return false;
});
$(".trigger_popup").click(function () {
$(this).parent().next(".info_popup").addClass("active");
$("#overlay").addClass("active");
});
$(".info_popup, #overlay").click(function () {
$(".info_popup, #overlay, .consignment_summary_value").removeClass("active");
});
$(".video_popup .control").click(function () {
$(this).next('.video_player').children('video').trigger('play');
$(".video_popup, #overlay").addClass("active");
});
$('.video_popup .close').click(function () {
$(this).next('video').trigger('pause');
$(".video_popup, #overlay").removeClass("active");
$(this).removeClass("active");
});
$(".close-video").click(function () {
$("#trigger-video").removeClass("active");
return false;
});
$(".slide-terms").click(function () {
$(".footer-links").slideToggle("slow");
$(this).toggleClass("active");
return false;
});
$(".popupTrigger").click(function () {
$(".popupWrapper").toggleClass("hidden");
return false;
});
$(".viewbasket").click(function () {
$(".shopping-cart").slideToggle("slow");
$(this).toggleClass("active");
return false;
});
$('#tabs li a:not(:first)').addClass('inactive');
$('.container').hide();
$('.container:first').show();
$('#tabs li a').click(function () {
var t = $(this).attr('href');
if ($(this).hasClass('inactive')) {
//added to not animate when active
$('#tabs li a').addClass('inactive');
$(this).removeClass('inactive');
$('.container').hide();
$(t).fadeIn('fast');
}
return false;
}) //end click
$('.back-to-top').css({ "display": "none"
});
$(function () {
$('a.scroll[href*=#]:not([href=#])').click(function () {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
var offset = 250;
var duration = 600;
jQuery(window).scroll(function () {
if (jQuery(this).scrollTop() > offset) {
jQuery('.back-to-top').fadeIn(duration);
} else {
jQuery('.back-to-top').fadeOut(duration);
}
});
jQuery('.back-to-top').click(function (event) {
event.preventDefault();
jQuery('html, body').animate({ scrollTop: 0
}, duration);
return false;
})
// Detect compatibility mode
if (do***ent.do***entMode && do***ent.do***entMode < 8) {
$("#compatibilityModeWarning").show();
}
$(window).resize(function () {
if ($('#cboxOverlay').is(':visible')) {
$.colorbox.load(true);
}
});
$(do***ent).ready(function () {
$(".iframe").colorbox({ iframe: true, width: "80%", height: "80%"
});
});
var value = $('h2.flag span.capitalise').text();
$('span.capitalise').html(value.replace(/-/g, " "));
});
function ValidateNumber(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode;
var fromWhich = (evt.which) ? true : false;
console.log(charCode);
if ((charCode > 47 && charCode < 58) || (!fromWhich && charCode > 95 && charCode < 106)) {
// number
}
else
event.preventDefault();
}
function DoLogin(email, password, rememberme) {
$('body').css('cursor', 'wait');
$.ajax({
url: '/Account/Login/',
type: 'POST',
data: { email: email, password: password, rememberme: rememberme
},
dataType: 'json',
success: function (data, textStatus, jqXHR) {
LoginSuccess(data, textStatus, jqXHR);
},
error: function (jqXHR, textStatus, errorThrown) {
LoginFail(jqXHR, textStatus, errorThrown);
}
});
}
function LoginSuccess(data, textstatus, xhr) {
if (data.RedirectUrl != '') {
window.location.href = data.RedirectUrl;
}
else {
window.location.reload();
}
}
function LoginFail(xhr, textstatus, error) {
$('body').css('cursor', 'auto');
displayLoginFailed();
}
</script>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 107***77242;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script>
<script type="text/javascript">
</script>
<script type="text/javascript">
!function (f, b, e, v, n, t, s) {
if (f.fbq) return;
n = f.fbq = function () {
n.callMethod ?
n.callMethod.apply(n, arguments) : n.queue.push(arguments)
};
if (!f._fbq) f._fbq = n;
n.push = n;
n.loaded = !0;
n.version = '2.0';
n.queue = [];
t = b.createElement(e);
t.async = !0;
t.src = v;
s = b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t, s)
}(window, do***ent, 'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '497268880648958');
fbq('track', 'PageView');
</script>
<script type="text/javascript">
(function(w,d,t,r,u){var f,n,i;
w[u]=w[u]||[],f=function(){var o={ti:"25060270"};
o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;
s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,do***ent,"script","//bat.bing.com/bat.js","uetq");
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-440927-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = do***ent.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == do***ent.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = do***ent.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript">
var bccbId = Math.random();
do***ent.write(unescape('%3Cdiv id=' + bccbId + '%3E%3C/div%3E'));
window._bcvma = window._bcvma || [];
_bcvma.push(["setAccountID", "787897579***6325022"]);
_bcvma.push(["setParameter", "WebsiteID", "4369354513203712538"]);
_bcvma.push(["addText", { type: "chat", department: "4122453345614960491", window: "2260004032226476657", available: "<span>Live Chat", unavailable: "", id: bccbId
}]);
var bcLoad = function () {
if (window.bcLoaded) return;
window.bcLoaded = true;
var vms = do***ent.createElement("script");
vms.type = "text/javascript";
vms.async = true;
vms.src = ('https:' == do***ent.location.protocol ? 'https://' : 'http://') + "vmss.boldchat.com/aid/787897579***6325022/bc.vms4/vms.js";
var s = do***ent.getElementsByTagName('script')[0];
s.parentNode.insertBefore(vms, s);
};
if (window.pageViewer && pageViewer.load) pageViewer.load();
else if (do***ent.readyState == "complete") bcLoad();
else if (window.addEventListener) window.addEventListener('load', bcLoad, false);
else window.attachEvent('onload', bcLoad);
</script>
<script type="text/javascript">
$(do***ent).ready(function () {
$("#Password").keypress(function (e) {
if (e.which == 13) {
LoginHelper();
}
});
});
function LoginHelper() {
var email = $("#Email").val();
var password = $("#Password").val();
var rememberme = $("#RememberMe").is(':checked');
DoLogin(email, password, rememberme);
}
</script>
<script type="text/javascript">
$(do***ent).ready(function (){
$("#TrackingReference").keypress(function (e) {
if (e.which == 13) {
trackShipment();
}
});
});
function trackShipment()
{
$("#trackingformurl").attr("href", "#");
$("#trackingFailed").hide();
var ref = $.trim($("#TrackingReference").val());
if (ref == "") {
displayTrackingNumberError();
return;
}
var findHead = "de-";
var redirectURL = "";
redirectURL = "http://www.transglobalexpress.de";
if ($.trim(ref).toLowerCase().match("^" + findHead))
{
window.open(redirectURL + "/Tracking/Go?id=" + ref.toLowerCase(), '_blank');
return;
}
$.ajax({
url: '/Tracking/Track?id=' + ref,
type: 'GET',
dataType: 'json',
async : false,
success: function (data, textStatus, jqXHR) {
showTracking(data.TrackingUrl, data.CollectionTrackingUrl, data.uspsOrderId);
},
error: function (jqXHR, textStatus, errorThrown) {
$("#trackingFailed").show();
}
});
}
function showTracking(trackingUrl, collectionTrackingUrl, uspsOrderId) {
if (uspsOrderId != null) {
$.blockUI({ message: '<div class="processing">Please wait...<br /><img src="/assets/layout/processing.gif" width="100" height="100" />
</script>
<script type="text/javascript" src="/assets/js/content-slider.js"></script>
<script type="text/javascript">
$(function () {
$('.content-slider').unslider();
});
</script>
<script type="text/javascript" src="/Scripts/PostcodeAutoFill.js"></script>
<script type="text/javascript" src="/assets/js/jquery.newsticker.js"></script>
transglobalexpress.co.uk is using jquery
<script type="text/javascript">
$(do***ent).ready(
function () {
$("#announcements").newsTicker();
}
);
</script>
<script type="text/javascript">
var autoChangeCountryCount = 0;
$(do***ent).ready(function () {
$(".postcode, .inputWeight, .inputDimensions").click(function () {
$(this).val('');
});
$('.postcode, .inputWeight, .inputDimensions').on("input", function () {
$(".alert-comma").css('display', 'none');
});
$("#NoItems").change(function () {
var noItems = $("#NoItems").val();
updateParcelRows(noItems);
if (noItems > 1) {
$("#copyToAll").show();
}
else {
$("#copyToAll").hide();
}
});
$("#DeliveryCountryId option").each(function () {
if ($(this).val() == "-1") {
$(this).css("nonSelectable");
$(this).attr("disabled", true);
}
});
$("#CollectionCountryId").change(function () {
collectionCountryChanged();
$('#CollectionPostCode').val(null);
});
$("#DeliveryCountryId").change(function () {
var currentCountry = $("#CollectionCountryId").val();
deliveryCountryChanged();
});
$("#NoItems").val(1);
var currentCollectionCountryId = $('#CollectionCountryId').val();
if (currentCollectionCountryId != null && currentCollectionCountryId != '') {
var collectionId = parseInt(currentCollectionCountryId, 10);
if (collectionId > 0) {
collectionCountryChanged(0);
}
}
var currentDeliveryCountryID = $('#DeliveryCountryId').val();
if (currentDeliveryCountryID != null && currentDeliveryCountryID != '') {
var deliveryId = parseInt(currentDeliveryCountryID, 10);
if (deliveryId > 0) {
deliveryCountryChanged(0);
}
}
});
function collectionCountryChanged(targetCityID) {
var deliveryCountryBox = $('#DeliveryCountryId');
var isFiltered = deliveryCountryBox.attr('data-isfiltered');
var selectedValue = $('#CollectionCountryId').val();
var deliveryCountryID = $("#DeliveryCountryId").val();
var accountUserID = '';
if (!IsDomesticCountry(selectedValue)) {
//alert('call server to get filtered results');
deliveryCountryBox.attr('data-isfiltered', true);
populateDeliveryCountries(selectedValue, deliveryCountryID, accountUserID, targetCityID);
}
else {
if (isFiltered != null && isFiltered == 'true') {
populateDeliveryCountries(selectedValue, deliveryCountryID, accountUserID, targetCityID);
//alert('isFiltered: ' + isFiltered + ' (' + typeof(isFiltered) + ')' + '\ncall server to get full export country list');
}
deliveryCountryBox.attr('data-isfiltered', false);
}
//$('#CollectionPostCode').val(null);
}
function deliveryCountryChanged(targetCityID) {
var deliveryCountryID = $('#DeliveryCountryId').val();
var deliveryCityRow = $('#deliveryCityRow');
var deliveryCity = $('#deliveryCity');
if (deliveryCountryID != null && deliveryCountryID != '') {
$.ajax({
url: '/api/searchFormApi/GetDeliveryCities/?deliveryCountryID=' + deliveryCountryID,
type: 'GET',
success: function (data, textStatus, jqXHR) {
if (data != null && data.length > 0) {
deliveryCity.find('option').remove();
deliveryCity.append($('<option>', { value: 0, text: 'All Areas'
}));
for (var i = 0;
i < data.length;
i++) {
deliveryCity.append($('<option>', { value: data[i].cityID, text: data[i].displayTitle
}));
}
// if city is pre populated, attempt to select.
if (targetCityID != null) {
deliveryCity.val(targetCityID);
}
deliveryCityRow.show();
var deliveryCityOptionsValue = $('#deliveryCity option').size();
$('#deliveryCity').attr('size', deliveryCityOptionsValue);
$("#deliveryCity").val($("#deliveryCity option:first").val());
}
else {
deliveryCity.find('option').remove();
deliveryCityRow.hide();
}
}
});
}
else {
deliveryCity.find('option').remove();
deliveryCityRow.hide();
}
}
function populateDeliveryCountries(collectionCountryID, deliveryCountryID, accountUserID, targetCityID) {
$.ajax({
url: '/api/searchFormApi/GetDeliveryCountries/?collectionCountryID=' + collectionCountryID + '&deliveryCountryID=' + deliveryCountryID + '&accountUserID=' + accountUserID,
type: 'GET',
success: function (data, textStatus, jqXHR) {
if (data.success) {
$('#DeliveryCountryId').html('');
for (var i = 0;
i < data.countries.length;
i++) {
if (data.countries[i].countryID < 1) {
$('#DeliveryCountryId').append($("<option />").val(data.countries[i].countryID).text(data.countries[i].title).attr('disabled', 'disabled'));
}
else {
$('#DeliveryCountryId').append($("<option />").val(data.countries[i].countryID).text(data.countries[i].title));
}
}
var collectionCityRow = $('#collectionCityRow');
var collectionCity = $('#collectionCity');
if (data.collectionCountryCities != null && data.collectionCountryCities.length > 0) {
collectionCity.find('option').remove();
collectionCity.append($('<option>', { value: 0, text: 'All Areas'
}));
for (var i = 0;
i < data.collectionCountryCities.length;
i++) {
collectionCity.append($('<option>', { value: data.collectionCountryCities[i].cityID, text: data.collectionCountryCities[i].displayTitle
}));
}
// set city if pre populated.
if (targetCityID != null) {
collectionCity.val(targetCityID);
}
collectionCityRow.show();
var collectionCityOptionsValue = $('#collectionCity option').size();
$('#collectionCity').attr('size', collectionCityOptionsValue);
$("#collectionCity").val($("#collectionCity option:first").val());
}
else {
collectionCity.find('option').remove();
collectionCityRow.hide();
}
$('#DeliveryCountryId').val(data.selectedDeliveryCountryID);
deliveryCountryChanged();
}
}
});
}
function copyAboveDims(div) {
// Get dims from previous div.
var prev = $(div).prev();
// if previous element is not a div track back until we find one.
// limit tries to avoid being caught in an infinite loop.
for (var i = 0;
i < 5;
i++) {
if (!prev.is('div')) {
prev = prev.prev();
}
else {
break;
}
}
var weight = $(prev).find('[data-weight="true"]').val();
var height = $(prev).find('[data-height="true"]').val();
var length = $(prev).find('[data-length="true"]').val();
var width = $(prev).find('[data-width="true"]').val();
//var msg = 'prev: ' + prev + '\nweight:' + weight + '\nlength: ' + length + '\nwidth: ' + width + '\nheight: ' + height;
//alert(msg);
// Write dims to current div.
$(div).find('[data-weight="true"]').val(weight);
$(div).find('[data-height="true"]').val(height);
$(div).find('[data-length="true"]').val(length);
$(div).find('[data-width="true"]').val(width);
}
function copyToAll() {
var firstRow = $('#baseRow');
//// get dims from first row
var weight = $(firstRow).find('[data-weight="true"]').val();
var height = $(firstRow).find('[data-height="true"]').val();
var length = $(firstRow).find('[data-length="true"]').val();
var width = $(firstRow).find('[data-width="true"]').val();
// Copy to all rows, skipping the first.
$('#parcelRows > div').slice(1).each(function () {
var $row = $(this);
$row.find('[data-weight="true"]').val(weight);
$row.find('[data-height="true"]').val(height);
$row.find('[data-length="true"]').val(length);
$row.find('[data-width="true"]').val(width);
});
}
function IsDomesticCountry(val) {
var countries = [231,247,272,271];
for (var i = 0;
i < countries.length;
i++) {
if (countries[i] == val)
return true;
}
return false;
}
function validate() {
// check destination country selected
if ($("#DeliveryCountryId").val() == null) {
displayDestinationCountryError();
return false;
}
// check we have valid package definitions
var packageError = false;
var packageWarning = false;
$('#parcelRows > div').each(function () {
var weight = $(this).find('[data-weight="true"]').val();
var length = $(this).find('[data-length="true"]').val();
var width = $(this).find('[data-width="true"]').val();
var height = $(this).find('[data-height="true"]').val();
// TGE-2488
if (weight.match(/^([.,]{1}[0-9]+)$/gi)) weight = weight.replace(/^([.,]{1}[0-9]+)$/gi, "0$1");
if (length.match(/^([.,]{1}[0-9]+)$/gi)) length = length.replace(/^([.,]{1}[0-9]+)$/gi, "0$1");
if (width.match(/^([.,]{1}[0-9]+)$/gi)) width = width.replace(/^([.,]{1}[0-9]+)$/gi, "0$1");
if (height.match(/^([.,]{1}[0-9]+)$/gi)) height = height.replace(/^([.,]{1}[0-9]+)$/gi, "0$1");
if (!isValidDecimal(weight) || weight == 0) packageError = true;
if (!isValidDecimal(length) || length == 0) packageError = true;
if (!isValidDecimal(width) || width == 0) packageError = true;
if (!isValidDecimal(height) || height == 0) packageError = true;
//if (!packageError) {
// //TGE-823: add warning message based on volumetric rates. At this point we don't have a service selected,
// //so using minumum and maximum divisor values from service table
// var volume = length * width * height;
// var minVolumetricHeight = volume / 6000;
// var maxVolumetricHeight = volume / 4000;
// if (minVolumetricHeight < 0.025 || maxVolumetricHeight > (weight * 2)) {
// packageWarning = true;
//
}
//}
});
if (packageError) {
displayPackageInvalidError();
return false;
}
if (packageWarning) {
$.blockUI({ message: $('#divDimensionsWarning'), css: { cursor: 'default'
}
});
$('.blockOverlay').css('cursor', 'default');
$('#divDimensionsWarning').css('display', 'block');
return false;
}
var collectionPostCode = $('#CollectionPostCode');
var deliveryPostCode = $('#DeliveryPostCode');
var postcodeCharacterLimit = 16;
//alert('collectionPostCode: ' + collectionPostCode.length + '\n'
//+ 'deliveryPostCode: ' + deliveryPostCode.length);
if (collectionPostCode.length > 0) {
var collectionPostcodeVal = collectionPostCode.val();
//alert('collectionPostcodeVal: ' + collectionPostcodeVal + ' (' + collectionPostcodeVal.length + ')\nlimit: ' + postcodeCharacterLimit);
if (collectionPostcodeVal.length > postcodeCharacterLimit) {
displayCollectionPostcodeError(postcodeCharacterLimit);
return false;
}
}
if (deliveryPostCode.length > 0) {
var deliveryPostcodeVal = deliveryPostCode.val();
//alert('deliveryPostcodeVal: ' + deliveryPostcodeVal + ' (' + deliveryPostcodeVal.length + ')\nlimit: ' + postcodeCharacterLimit);
if (deliveryPostcodeVal.length > postcodeCharacterLimit) {
displayDeliveryPostcodeError(postcodeCharacterLimit);
return false;
}
}
var currentCountry = $("#CollectionCountryId").val();
if (IsDomesticCountry(currentCountry) && ('True' === 'True')) {
if ($('#CollectionPostCode').val() == null || $('#CollectionPostCode').val() === '') {
displayCollectionPostCodeError(collectionPostCodeCallback);
return false;
}
}
return true;
}
function collectionPostCodeCallback(e, value, m, formVals) {
$("#CollectionPostCode").val(formVals.inputCollectionPostcode);
fetchQuote();
}
function fetchQuote() {
// check for restriction popup
var restrictionPopupCountries = new Array(30,***0);
var countryIndex = $.inArray(parseInt($("#DeliveryCountryId").val()), restrictionPopupCountries);
if (countryIndex != -1) {
var restrictionContentPages = new Array(331,140);
openContentPagePrompt(restrictionContentPages[countryIndex], 800, 600);
return;
}
doNextStep();
}
function doNextStep() {
$.blockUI({ message: '<div class="processing">Generating your quote...<br /><img src="/assets/layout/ajax-loader.gif" width="31" height="31" class="loading" />
</script>
<script type="text/javascript">
$(do***ent).ready(function () {
setupRotator();
});
function setupRotator() {
if ($('.item div').length > 1) {
$('.item:first').addClass('current').fadeIn(2000);
$('.item:first div').addClass('current').fadeIn(2000);
setInterval('textRotate()', 5000);
}
}
function textRotate() {
var current = $('#rotator > .current');
if (current.next().length == 0) {
current.removeClass('current').fadeOut(100);
$('.item:first').addClass('current').fadeIn(2000);
}
else {
current.removeClass('current').fadeOut(100);
current.next().addClass('current').fadeIn(2000);
}
}
</script>
<script type="text/javascript">
var bccbId = Math.random();
do***ent.write(unescape('%3Cdiv id=' + bccbId + '%3E%3C/div%3E'));
window._bcvma = window._bcvma || [];
_bcvma.push(["setAccountID", "787897579***6325022"]);
_bcvma.push(["setParameter", "WebsiteID", "4369354513203712538"]);
_bcvma.push(["addText", { type: "chat", department: "4122453345614960491", window: "2260004032226476657", available: "Live Chat", unavailable: "Currently Offline", id: bccbId
}]);
var bcLoad = function () {
if (window.bcLoaded) return;
window.bcLoaded = true;
var vms = do***ent.createElement("script");
vms.type = "text/javascript";
vms.async = true;
vms.src = ('https:' == do***ent.location.protocol ? 'https://' : 'http://') + "vmss.boldchat.com/aid/787897579***6325022/bc.vms4/vms.js";
var s = do***ent.getElementsByTagName('script')[0];
s.parentNode.insertBefore(vms, s);
};
if (window.pageViewer && pageViewer.load) pageViewer.load();
else if (do***ent.readyState == "complete") bcLoad();
else if (window.addEventListener) window.addEventListener('load', bcLoad, false);
else window.attachEvent('onload', bcLoad);
</script>
<script type="text/javascript">
$(do***ent).ready(function () {
new PostcodeCityAutoSuggest('CollectionPostCode', GetCollectionCountryId);
new PostcodeCityAutoSuggest('DeliveryPostCode', GetDeliveryCountryId);
});
function GetCollectionCountryId() {
return $('#CollectionCountryId').val();
}
function GetDeliveryCountryId() {
return $('#DeliveryCountryId').val();
}
</script>
<script type="text/javascript" src="https://addsearch.com/js/?key=a68876cec000e7cbc424d73ef3b29c88"></script>