function searchTabIndex(a){switch(a){case"articles":return 2;case"products":return 0;case"downloads":return 3;default:return 0}}function setMoreLink(e,c,d,a,g){if(c.paid){var f={keyword:"companyid:"+a,override:'"'+g+'"',searchType:searchTabIndex(d)};var h=c.searchUrl.indexOf("?")>=0?"&":"?";var b=c.searchUrl+h+$.param(f);e.attr("href",b);return}switch(d.toLowerCase()){case"articles":e.attr("href",c.newsPage);break;case"products":e.attr("href","/content/productshowcase/");break;case"downloads":e.attr("href",c.downloadLibrary);break;default:e.attr("href",c.newsPage);break}}function retrieveList(c,d,a,e,b){$.getJSON(c.thisCompanyUrl,{companyId:a,documentType:d,currentDocument:b},function(f){$(".mostpopularcontent").find("li").remove();setMoreLink($(".navmore > a"),c,d,a,e);$.each(f,function(h,j){var g=$("<li/>").append($("<a/>").html(j.Title).attr("href",j.LinkUrl));$(".mostpopularcontent").append(g)})})}$(document).ready(function(){$(".tabular table[border!=0]").each(function(){if($(this).attr("border")){$(this).css("border","outset "+$(this).attr("border")+"px")}});$(".tabular td").each(function(){var a=$(this).parent().parent().parent();if($(a).attr("cellpadding")&&$(a).attr("cellpadding")!="0"){$(this).css("padding",$(a).attr("cellpadding")+"px")}});if($.browser.msie){$(".tabular table").each(function(){if($(this).css("padding")){$(this).css("margin",$(this).css("padding")+"px")}})}if($("#companySpecific").length>0){this.rules={leadType:"required",specIndustry:"required",specProduct:"required",specProject:"required",specTimeFrame:"required"};this.messages={leadType:"Please choose one of the options.",specIndustry:"Please choose an industry.",specProduct:"Please choose a equipment/service.",specProject:"Please choose stage of your project.",specTimeFrame:"Please choose a project timeframe."}}else{this.rules={leadType:"required"};this.messages={leadType:"Please choose one of the options."}}if($("#leadTypeSelection").length>0||$("#companySpecific").length>0){$("#dlForm").validate({rules:this.rules,messages:this.messages,errorLabelContainer:"#errorList > ul",errorElement:"span",wrapper:"li",errorClass:"field-validation-error",highlight:function(a){$(a).addClass("input-validation-error")},unhighlight:function(a){$(a).removeClass("input-validation-error")}})}});function setUpFlowPlayer(b,c,a){$f(b,"../Content/flash/flowplayer-3.1.3.swf",{clip:{url:c,scaling:"orig",autoPlay:false,onStart:function(d){pageTracker._trackEvent(a,"Play",d.url)},onPause:function(d){pageTracker._trackEvent(a,"Pause",d.url,parseInt(this.getTime()))},onStop:function(d){google._trackEvent(a,"Stop",d.url)},onFinish:function(d){google._trackEvent(a,"Finish",d.url)}},plugins:{audio:{url:"../Content/flash/plugins/flowplayer.audio-3.1.0.swf"},controls:{fullscreen:(a=="Audio"?false:true),height:30}}})};