// body onload $(function(){ $('.popup-info').hide(); setTimeout(fitToScreen,10); $(window).resize(fitToScreen); // menu dropdown functionality $('#menu li').mouseenter(showMenu).mouseleave(hideMenu); // login tab dropdown $("#login-button").click(function () { $("#login").slideToggle(function(){ var text = $('#login:hidden').length ? 'Login' : 'Close'; $('#login-button').text(text); $("#login :text:visible:first").focus(); }); }); // Login submit $("#login-submit").click(function(){ var site = $('#login-site').val(); if (!site){ $('#login-site').stop().animate({backgroundColor: "#FFFF00"}, 200).animate({ backgroundColor: "#FFFFFF"}, 800); return false; } // set parameters based on login site selected if (site=='eservice'){ $('#login').attr('action','https://eservice.xactware.com/apps/esc/Login'); $('#login-username').attr('name','userid'); } else if (site=='xactanalysis'){ $('#login').attr('action','https://apps.xactware.com/apps/xnportal/user_router.jsp'); $('#login-username').attr('name','user_id'); } setCookie('login',site,'','/',new Date(Date.parse(Date())+(10*52*7*24*60*60*1000))); // set it out 10 years // send Omniture data s.events="event3"; s.prop1= $('#login-site').val(); s.t(); }); // sites dropdown $("#sites-toggle").click(function () { $("#sites-other").toggle(function(){ $('#sites-other:hidden').length ? $('#sites').removeClass('selected') : $('#sites').addClass('selected'); }); }); // colorbox popup (modal popup with overlay) if($('.popup').length){ $.getScript('/scripts/jquery.colorbox.js', function(){ $('.popup').each(function(){ if(this.hash){ // we removed the need for the extra div around the popup content that would normally hide it, so we need to show/hide it manually $(this).bind('cbox_open',function(){$(this.hash).show()}).bind('cbox_cleanup',function(){$(this.hash).hide()}).colorbox({inline:true,href:this.hash,width:900}); } else { $(this).colorbox(); } // send Omniture tracking when we open a popup $(this).bind('cbox_open',function(){ s.pageName = this.title ? this.title : this.href; s.t(); }); }); }); } // Send Omniture data on search $('#search').submit(function(){ s.events="event5"; s.prop5=$('#search input[name=q]').val(); s.t(); }); }); function header(){ document.write( '
'+ ' '+ ' '+ '
'+ ' United States'+ '
'+ ' Canada
'+ ' UK'+ '
'+ '
'+ ' '+ '
'+ ' '+ ' '+ ' '+ ' '+ '
'+ // The extra hidden login is because some browsers don't send the submit button value, and the ESC checks for that ' Register / Need Help?
'+ ' security'+ ' '+ '
'+ '
Login
' ); // wrapper div is closed in the footer // Add Omniture and Eloqua tracking code document.write( '\n' + '\n'); document.write('\n'); } function footer(){ document.write( ' '+ '
'+ '
'+ '
' ); // Eloqua and Omniture tracking scripts document.write('\n'); } function fitToScreen(){ var min = 980; // 1024 screen with a buffer var max = 1236; // 1280 screen with a buffer var current = $(window).width(); if (current < min) current = min; if (current > max) current = max; //$("#wrapper").width(current); var wrapperH = $('#wrapper').height(); var backgroundH = $('#background-img').height(); var windowH = $(window).height() - backgroundH; current = wrapperH > windowH ? wrapperH : windowH; $("#background-img").css('top',current).show(); $("#footer").css('top',current+backgroundH-30).show(); } function popWindow(loc, config) { //possible configs "left=x,top=y,width=width,height=height,status=no,menubar=no,location=no,directories=no,scrollbars=no,resizable=no' if (loc.charAt(0) == '/'){ if (loc.indexOf('.') != -1){ loc = ""+loc; } else { loc = ""+loc; } } pop = window.open(loc, "Xactware", config); pop.focus(); } function showMenu(){ var parentEl = $(this); parentEl.addClass('selected'); var submenuEl = $('ul',parentEl); if (submenuEl){ var position = parentEl.position(); submenuEl.css('left',position.left); submenuEl.css('top',position.top+parentEl.outerHeight()-1); // -1 is to overlap 1px border submenuEl.show(); } } function hideMenu(){ $('ul',this).hide(); $(this).removeClass('selected'); } function showEstimatesProcessed(){ var dayDate = estCtrDateTime.split(' at')[0].split(', '); var day = dayDate[0]; var date = dayDate[1] + ", " + dayDate[2]; var total = estCtrTotalEstimates; var dollar = estCtrTotalDollar.split('.')[0]; document.write("As of "+day+""+date); document.write("
Xactware has processed "+total+" estimates"); document.write("
with a total value of $"+dollar+""); }