function atl_ToggleDisplay(a){var b=document.getElementById(a);if(b){b.style.display=(b.style.display=="block"?"none":"block")}return true}function atl_SwapDisplay(b,a){atl_ToggleDisplay(b);atl_ToggleDisplay(a);return true}function atl_Go(a,b){if((b===null)||(b==="")){b="_self"}window.open(a,b)}function atl_PopHelp(a){window.open(a,"spop","left=20,top=20,resizable=yes,scrollbars=yes,width=610,height=620")}function atl_PopUp(b,a,d){window.open(b,a,d)}var atl_quickhelp_source;function atl_GetQuickHelpContent(d,b,a,f){if(typeof(atl_GetQuickHelpUrl)!="undefined"){var e=atl_GetQuickHelpUrl();atl_quickhelp_source=f;$.ajax({type:"POST",url:e,data:"{'keyName':'"+d+"'}",contentType:"application/json; charset=utf-8",dataType:"json",success:b,error:a})}}function atl_OnQuickHelpError(a){}var atl_HideInvoked=false;function atl_HideQuickHelp(){atl_HideInvoked=true;var a=document.getElementById("atl_quickhelp");if(a!==null){a.style.display="none";a.style.visibility="hidden"}}function atl_ShowDivContent(a){if(a!==null&&!atl_HideInvoked){a.style.display="block";a.style.visibility="visible"}}function atl_getOffsetLeft(d){var b=d.offsetLeft;if(d.offsetParent!=null){var a=d.offsetParent;while(a){b+=a.offsetLeft;a=a.offsetParent}}return b}function atl_getScrollY(){var a=0;if(typeof(window.pageYOffset)=="number"){a=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){a=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){a=document.documentElement.scrollTop}}}return a}function atl_ShowHelp(d){var b=d.offsetTop;var a=d.offsetParent;while(a){b+=a.offsetTop;a=a.offsetParent}return b}function atl_ShowHelpById(h,e){if(e){var a=340;var g=atl_getOffsetLeft(h);var f=(window.innerWidth)?window.innerWidth-25:document.body.clientWidth;if((g+a)>f){g=f-a}newX=g;var b=e.offsetHeight;var d=atl_ShowHelp(h)+h.offsetHeight;var j=(window.innerHeight)?window.innerHeight-25:document.body.clientHeight;if((d+b)>(j+atl_getScrollY())){d=atl_ShowHelp(h)-b}newY=d;e.style.top=newY+"px";e.style.left=newX+"px";e.left=newX+"px";e.left=newY+"px"}}function atl_SetQuickHelpDiv(a,d){d=atl_quickhelp_source;if(a!==null){a=a.d}var b=document.getElementById("atl_quickhelp");if(b!==null&&a!==null){b.innerHTML=a.Html;atl_ShowHelpById(d,b);atl_ShowDivContent(b);if(!$.jCache.hasItem(a.Name)){$.jCache.setItem(a.Name,a.Html)}}}function atl_ShowQuickHelp(d,a){atl_HideInvoked=false;var b=document.getElementById("atl_quickhelp");if(b===null){return}var e;if(typeof(d.target)!="undefined"){e=d.target}else{if(typeof(d.srcElement)!="undefined"){e=d.srcElement}else{return}}if(!$.jCache.hasItem(a)){atl_GetQuickHelpContent(a,atl_SetQuickHelpDiv,atl_OnQuickHelpError,e)}else{b.innerHTML=$.jCache.getItem(a);atl_ShowHelpById(e,b);atl_ShowDivContent(b)}}function atlCookieDomain(){var a=window.location.hostname;var d=a.lastIndexOf(".");if(d<0){return"."+a}else{var b="";if(a.lastIndexOf(".",d-1)>-1){b=a.substr(a.lastIndexOf(".",d-1))}else{b="."+a}return b}}function atlSetMemCookie(b,e,d){var a=b+"="+e+"; path=/; domain="+atlCookieDomain();document.cookie=a}function atlSetCookie(d,g,e){var f=new Date();var a=new Date(Date.parse(f.getDay()+"/"+f.getMonth()+"/"+(f.getFullYear()+e)));var b=d+"="+g+"; expires="+a.toGMTString()+"; path=/; domain="+atlCookieDomain();document.cookie=b}function atlReadCookie(e){var d="";if(document.cookie.length>0){var b=e+"=";var a=document.cookie.indexOf(b);var f=0;if(a>-1){a+=b.length;f=document.cookie.indexOf(";",a);if(f<a){f=document.cookie.length}d=document.cookie.substring(a,f)}}return unescape(d)}function atl_isemailvalid(d){var a="@";var b=".";var g=d.indexOf(a);var e=d.length;var f=d.indexOf(b);if(g==-1){return false}if(g==-1||g===0||g==e){return false}if(f==-1||f===0||f==e){return false}if(d.indexOf(a,(g+1))!=-1){return false}if(d.substring(g-1,g)==b||d.substring(g+1,g+2)==b){return false}if(d.indexOf(b,(g+2))==-1){return false}if(d.indexOf(" ")!=-1){return false}return true}function atl_isnoscript(a){var b=/[<>]+/;if(b.test(a)){return false}return true}function atl_textarea_trim(b,a){if(b.value.length<=a){return}b.value=b.value.substr(0,a)}function atl_textarea_canaddchar(f,d){var e=null;if(typeof(f.onkeypress.arguments[0])!="undefined"){e=f.onkeypress.arguments[0].keyCode}else{if(document.selection.createRange().text.length!==0){return true}e=event.keyCode}var b=[8,37,38,39,40,46];for(var a=0;a<b.length;a++){if(b[a]==e){return true}}if(f.value.length<d){return true}return false}(function(a){this.version="(beta)(0.0.1)";this.maxSize=10;this.keys=[];this.cache_length=0;this.items=[];this.setItem=function(d,b){if(typeof(b)!="undefined"){if(typeof(this.items[d])=="undefined"){this.cache_length++}this.keys.push(d);this.items[d]=b;if(this.cache_length>this.maxSize){this.removeOldestItem()}}return b};this.removeItem=function(d){var b;if(typeof(this.items[d])!="undefined"){this.cache_length--;b=this.items[d];delete this.items[d]}return b};this.getItem=function(b){return this.items[b]};this.hasItem=function(b){return typeof(this.items[b])!="undefined"};this.removeOldestItem=function(){this.removeItem(this.keys.shift())};this.clear=function(){var b=this.cache_length;this.keys=[];this.cache_length=0;this.items=[];return b};a.jCache=this;return a})(jQuery);function atlFormGetInput(f,e){var a=null;for(var d=0;d<f.length;d++){if(f[d].id==e){a=f[d];break}}if(a===null){var b=document.createElement("input");b.setAttribute("id",e);b.setAttribute("type","hidden");b.name=e;a=b;f.append(a)}return a}function atlFormSubmit(d,b){var a=$("#"+d);a.attr("action",b);a.submit()}function atlFormSetValue(f,b,e){var d=$("#"+f);var a=atlFormGetInput(d,b);a.value=e}function atl_toggleTextOnclick(d,a,b){var e=document.getElementById(d);if(e.innerHTML==a){e.innerHTML=b}else{e.innerHTML=a}}function atl_toggledisplayAndVisibility(b){var d=document.getElementById(b);var a="";var e="";if(d!==null){if((d.style.visibility=="hidden")||(d.style.display=="none")){a="visible";e="inline"}else{a="hidden";e="none"}d.style.visibility=a;d.style.display=e}return true}function atl_changeDivVisibilityByImage(f,a,e,g){var d=document.getElementById(g);var b=document.getElementById(f);if(d!==null){if((d.style.visibility=="hidden")||(d.style.display=="none")){if(b!==null){b.src=a}}else{if(b!==null){b.src=e}}}atl_toggledisplayAndVisibility(g)}function atl_toggleVisibility(a){var b=document.getElementById(a);if(b.style.visibility=="visible"||b.style.visibility===""){b.style.visibility="hidden";b.style.display="none"}else{b.style.visibility="visible";b.style.display="block"}}function atl_disableEnterKey(b){var a;if(!b){b=window.event}if(b.keyCode){a=b.keyCode}else{if(b.which){a=b.which}}if(a==13){if(!b){return false}b.returnValue=false;b.cancelBubble=true;if(b.stopPropagation){b.stopPropagation()}if(b.preventDefault){b.preventDefault()}return false}return true}function atl_disable_enableField(a,b){var d=document.getElementById(a);if(d!==null){d.disabled=b}}jQuery.fn.currentMousePosition=function(b){var a=$("#[isjsonrendercontainer]");if(b!==null&&b!==undefined){$(a).data("currentMousePosition",b)}else{if($(a).data("currentMousePosition")==null||$(a).data("currentMousePosition")==undefined){$(a).data("currentMousePosition",{left:0,top:0})}return $(a).data("currentMousePosition")}};jQuery.fn.lockMousePosition=function(a){var b=$(this).getJsonContainerDiv();$(b).data("lockedMousePosition",$(b).currentMousePosition())};jQuery.fn.lockedMousePosition=function(){return $(this).getJsonContainerDiv().data("lockedMousePosition")};jQuery.fn.getJsonContainerDiv=function(){var a=$(this).parents().andSelf().filter("#[isjsonrendercontainer]:first");return a};jQuery.fn.jsonGet=function(d){if(d==undefined||d==null){d=$(this).args()}var e=d.cache!==false;var b=d.url;if(b==undefined||b==null){b=$(this).attr("src")}if(b==undefined||b==null||b.length<=0){handleJsonError("failed","No URL Specified on jsonGet call")}b=appendQueryStringArguments(d,b);var a={url:b,dataType:"json",cache:d.doCacheContent==true,success:d.success,error:function(f,h,g){handleJsonError(h,d,g,f)}};$.ajax(a)};jQuery.fn.jsonPost=function(){var a=$(this).args().url;if(a==undefined||a==null){$(this).args().url=$(this).attr("src")}jsonPost($(this).args())};jQuery.fn.args=function(a,b){if(a!==null&&a!==undefined){if(typeof(a)=="object"){this.data("args",a);this.data("lockedMousePosition",null)}else{if(b!=undefined){arguments=this.data("args");arguments[a]=b}else{return this.data("args")[a]}}}else{a=this.data("args");if((a==null)||(a==undefined)){a={};this.data("args",a)}return a}};jQuery.fn.showAndSetVisible=function(){$(this).getJsonContainerDiv().show();this.css({visibility:"visible"});this.show()};jQuery.fn.piSetTimeout=function(){var b="piHidePopIn({targetDivId:'"+this[0].id+"'})";var a=setTimeout(b,2000);if($(this).args().timerIds==null&&$(this).args().timerIds==undefined){$(this).args().timerIds=[]}$(this).args().timerIds.push(a)};jQuery.fn.piClearMousedOverPopInTimeout=function(){if($(this).args().timerIds!=null){$.each($(this).args().timerIds,function(){clearTimeout(this)})}};jQuery.fn.hideSelectsForIE6PopIn=function(){if($.browser.msie&&$.browser.version.substr(0,1)<7){$("select:visible").each(function(){$(this).attr("hideForIE6PopIn",1);$(this).hide()});$(this).bind("popInHideComplete",function(){$(this).showSelectsForIE6PopIn()});$(this).bind("dialogclose",function(){$(this).showSelectsForIE6PopIn()})}};jQuery.fn.showSelectsForIE6PopIn=function(){$("select[hideForIE6PopIn=1]").each(function(){$(this).attr("hideForIE6PopIn","");$(this).show()})};jQuery.fn.centerToScreen=function(){return this.each(function(){var a=$(this).width();var l=$(this).height();var k=$(window).width();var h=k/2;var f=$(window).height();var g=f/2;var e=$(document).scrollLeft();var b=$(document).scrollTop();var j=g+b-(l/2);var d=h+e-(a/2);$(this).css({top:j+"px"});$(this).css({left:d+"px"})})};jQuery.fn.setAutoEllipseDomain=function(a){$(this).each(function(){var e=$(this).html().trim();$(this).html("");$(this).show();if(a==null||a==undefined){a=$(this).width()}var j=document.createElement("label");$(j).attr("title",e);var b=e.split(".",2)[1];if(b==undefined){b=""}$(j).html(e);$(this)[0].appendChild(j);var f=$(j).width();if(f>=a){var d=10;var h;$(j).html("");while(j.offsetWidth<a&&d<e.length){var g=e.substr(0,d)+"..."+b;$(j).html(g);d++;f=j.offsetWidth;if(f>a){break}h=g}$(j).html(h)}})};jQuery.fn.mergeArgs=function(a){if(a&&a!=null){var b;for(b in a){$(this).args(b,a[b])}}return $(this).args()};jQuery.fn.rebind=function(a,b){$(this).unbind(a).bind(a,b);return this};function getMaxZ(){var a=Math.max.apply(null,$.map($("*"),function(b,d){if($(b).css("position")=="absolute"){return parseInt($(b).css("z-index"),10)||1}}));return a}function piShowPopInWithStaticContent(d,a){var b=$("#"+a.targetDivId);piShowPopIn(d,a);piPositionDiv(b);$(b).getJsonContainerDiv().showAndSetVisible()}function piShowPopIn(d,a){var b=$("#"+a.targetDivId);if(a.sourceUrl){$(b).attr("isJsonTargetDiv",true)}$(b).piClearMousedOverPopInTimeout();$(b).hideSelectsForIE6PopIn();$(b).args(a);if(a.doMoveToMousePosition==true){d=d||window.event;$(b).currentMousePosition({left:d.clientX+$(document).scrollLeft(),top:d.clientY+$(document).scrollTop()});$(b).lockMousePosition();if(a.showBeforeContentLoaded===true){$(b).getJsonContainerDiv().showAndSetVisible();piPositionDiv(b)}}piRenderPopIn(b);if(a.doAutoHideOnMouseLeave){$(b).mouseover(function(){$(b).piClearMousedOverPopInTimeout()});$(b).mouseenter(function(){if($(b).is(":visible")){$(b).piClearMousedOverPopInTimeout()}});$(b).mouseleave(function(){if($(b).is(":visible")){$(b).piClearMousedOverPopInTimeout();$(b).piSetTimeout()}})}$(b).one("popInLoadCompleteInternal",function(f){if($(b).args().doCenterToScreen===true){$(b).centerToScreen();$(b).getJsonContainerDiv().showAndSetVisible()}else{piPositionDiv(b);$(b).getJsonContainerDiv().showAndSetVisible()}})}function piHidePopIn(b){var d=$("#"+b.targetDivId);b=$(d).mergeArgs(b);var a=$(d).data("forcePageRefreshOnClose");if(a!=undefined&&a!=null&&(a===true||a===false)){b.forcePageRefreshOnClose=a}$(d).piClearMousedOverPopInTimeout();if($(d).args().forcePageRefreshOnClose===true){reloadPage()}$(d).getJsonContainerDiv().fadeOut("fast");$(".ui-widget-overlay").fadeOut("fast",function(){if(typeof($(d).dialog)=="function"){$(d).dialog("close")}});$(d).args({});$(d).trigger("popInHideComplete",b)}jQuery.fn.hideJsonPopIn=function(a){if(a==null||a==undefined){a={}}var b=$(this).parents("[isJsonTargetDiv]");if(a.targetDivId==undefined||a.targetDivId==null){a.targetDivId=$(b).attr("id")}piHidePopIn(a)};function piPositionDiv(d){var f=-1;var b=-1;if($(d).args().doCenterToScreen===true){$(d).centerToScreen()}else{var a=$(d).lockedMousePosition();if(a!==undefined&&a!==null){f=a.left-10;b=a.top-10}if($(d).args().overridePosition!==undefined&&$(d).args().overridePosition!==null){b=$(d).args().overridePosition.top;f=$(d).args().overridePosition.left}var e=document.body.clientWidth;if((f+$(d).width())>e){f=f-$(d).width()+20}if($(d).args().doOffsetFromBottom===true){b-=$(d).height()-20}if(f>0&&b>0){$(d).css({postion:"absolute",top:b,left:f})}}$(d).css({postion:"absolute","z-index":getMaxZ()+1})}function piRenderPopIn(d){var a=$(d).args();if(a.showBeforeContentLoaded===true){$(d).getJsonContainerDiv().showAndSetVisible();piPositionDiv(d)}if(a.sourceUrl!=null&&a.sourceUrl!=""){var e="?";if(a.sourceUrl.indexOf("?")>=0){e="&"}var b=a.sourceUrl+e+"TargetDivID="+a.targetDivId;a.url=b;a.success=piJsonCallback;if(a.postData!=null&&a.postData!=undefined&&a.postData.length>0){$(d).jsonPost()}else{$(d).jsonGet()}}}function atl_openAgreement(a){atl_PopUp(a,"display1","left=50,top=50,resizable=yes,scrollbars=yes,width=800,height=600")}function validateAgreements(f,e){if(atl_valid_getValidation()){var b=document.getElementById("agreeCount");var h;for(count=1;count<=b.value;count++){var g="chkAgree"+count;var a=document.getElementById(g);if(a!=null){if(a.checked==false){var d=document.getElementById("msg"+a.value);if(d!=null){h=d.value;break}}}}if(h!=null){confirm(h);e.IsValid=false}else{e.IsValid=true}}}var standard_control_set=new Array();var pageValidity=true;function atl_valid_setValidation(a){pageValidity=a}function atl_valid_getValidation(){return pageValidity}function atl_valid_IsNumericCheck(b){var e="0123456789";var d=true;var a;for(i=0;i<b.length&&d==true;i++){a=b.charAt(i);if(e.indexOf(a)==-1){d=false}}return d}function atl_valid_IsBlankByID(a){var b=document.getElementById(a);result=atl_valid_IsBlank(b);return result}function atl_valid_IsBlank(a){if(a==null){return true}if(a.value==""){return true}return false}function atl_valid_validatePhone(e,b){var f=e.value;var a=/[^0-9]/g;var d="";d=f.replace(a,"");if((b=="226"||b=="37")&&(d.length!=10||d.charAt(0)==0||d.charAt(0)==1)){return false}else{if(d.length==0){return false}}return true}function atl_valid_validateZip(b,a){if((a=="226")&&((b.length<5)||(b.length>10))){return false}else{if(b.length==0){return false}}return true}function atl_valid_removeBadCharById(b){var a=document.getElementById(b);atl_valid_removeBadChar(a)}function atl_valid_removeBadChar(d){var e="";for(var b=0;b<d.value.length;b++){if(d.value.charAt(b)!="<"&&d.value.charAt(b)!=">"){var a=d.value.charCodeAt(b);if((a>=32&&a<128)||(a==229)||(a==228)||(a==246)||(a==197)||(a==196)||(a==214)){e=e+d.value.charAt(b)}}}if(d.value!=e){d.value=e}}function atl_valid_goToElem(b,a){var d=document.getElementById(b);d.focus();if(a){d.select()}}function atl_valid_isEmailValid(d){var b=/^[\.?\w-\+]+\@[\.?\w-]+\.(([a-zA-Z]{2,4})|([a-zA-Z]{2,3}\.[a-zA-Z]{2,3}))$/;var a=new RegExp(b);result=a.test(d);return result}function atl_valid_processError(g,f,a,e,h,d,b){if(g){if(f!=null){atl_valid_addErrorToDiv(f,a,e,h,d);atl_valid_setValidation(false)}}else{atl_valid_removeErrorFromDiv(f,b)}}function atl_valid_processError_2(g,f,a,e,h,d,b){if(g){if(f!=null){atl_valid_addErrorToDiv_2(f,a,e,h,d);atl_valid_setValidation(false)}}else{atl_valid_removeErrorFromDiv(f,b)}}function atl_valid_processError_3(a,b){var d=$("#"+b);if(a){d.addClass("field_invalid");atl_valid_setValidation(false)}else{d.removeClass("field_invalid")}}function atl_valid_addErrorToDiv(d,g,h,e,a){if(d==null){return}d.innerHTML="";var f="atl_valid_goToElem('"+g.id+"', "+a+"); ";var b='<a href="#" class="bodytextbold" style="color:#ff0000;" onclick="';b+=f;b+='return false;">'+h+"</a> ";b+=e;d.innerHTML+=b;d.style.display="block";d.style.visibility="visible"}function atl_valid_addErrorToDiv_2(b,e,f,d,a){if(b==null){return}b.innerHTML="";b.innerHTML+=d;b.style.display="block";b.style.visibility="visible"}function atl_valid_removeErrorFromDivByID(a,b){var d=document.getElementById(a);atl_valid_removeErrorFromDiv(d,b)}function atl_valid_removeErrorFromDiv(b,a){if(b==null){return}b.innerHTML=a;if(a.length==0){b.style.display="none";b.style.visibility="hidden"}}function atl_valid_validateConfirmation(a,b){if(a.value==""){return true}if(a.value==b.value){return true}return false}function atl_valid_basicValidation(j,b,f,d,a){var h=document.getElementById(j);atl_valid_removeBadChar(h);var g=atl_valid_IsBlank(h);var e=document.getElementById(d);atl_valid_processError(g,e,h,b,f,true,a)}function atl_valid_basicValidation_2(j,b,f,d,a){var h=document.getElementById(j);atl_valid_removeBadChar(h);var g=atl_valid_IsBlank(h);var e=document.getElementById(d);atl_valid_processError_2(g,e,h,b,f,true,a)}function atl_valid_basicValidation_3(b){var d=document.getElementById(b);atl_valid_removeBadChar(d);var a=atl_valid_IsBlank(d);atl_valid_processError_3(a,b)}function atl_valid_phoneValidation(j,h,g,d,a){var k="not Supplied or Invalid";var f=document.getElementById(j);atl_valid_removeBadChar(f);var b=!atl_valid_validatePhone(f,d);if(d=="226"||d=="37"){k="Please enter a valid 10 digit number"}var e=document.getElementById(g);atl_valid_processError(b,e,f,h,k,true,a);return b}function atl_valid_phoneValidation_2(j,h,g,d,a){var k="ERROR: Please enter a valid ";k=k+h;var f=document.getElementById(j);atl_valid_removeBadChar(f);var b=!atl_valid_validatePhone(f,d);if(d=="226"||d=="37"){k="ERROR: Please enter a valid 10 digit number"}var e=document.getElementById(g);atl_valid_processError_2(b,e,f,h,k,true,a);return b}function atl_AlphaOnlyKeypress(b){var f;var d;var a;if(window.event){f=b.keyCode}else{if(b.which){f=b.which}}d=String.fromCharCode(f);regForm="[0-9!@#$%^&*()<>]";var a=new RegExp(regForm);return !a.test(d)}function atl_NumericOnlyKeypress(b){var f;var d;var a;if(window.event){f=b.keyCode}else{if(b.which){f=b.which}}d=String.fromCharCode(f);regForm="[a-zA-Z!@#$%^&*()<>]";var a=new RegExp(regForm);return !a.test(d)}function atl_AlphaNumericOnlyKeypress(b){var f;var d;var a;if(window.event){f=b.keyCode}else{if(b.which){f=b.which}}d=String.fromCharCode(f);regForm="[!@#,;:$%^&*()<>]";var a=new RegExp(regForm);return !a.test(d)}function atl_PasswordKeypress(b){var f;var d;var a;if(window.event){f=b.keyCode}else{if(b.which){f=b.which}}d=String.fromCharCode(f);regForm="[()<>]";var a=new RegExp(regForm);return !a.test(d)}function atl_valid_basicValidation_2(j,b,f,d,a){var h=document.getElementById(j);atl_valid_removeBadChar(h);var g=atl_valid_IsBlank(h);var e=document.getElementById(d);atl_valid_processError_2(g,e,h,b,f,true,a)}function atl_purgeBasketForm(){var a=$("#cartform");if(a.length>0){a.empty()}}function css_browser_selector(m){var a=m.toLowerCase(),e=function(b){return a.indexOf(b)>-1},j="gecko",l="webkit",n="safari",d="opera",f=document.documentElement,k=[(!(/opera|webtv/i.test(a))&&/msie\s(\d)/.test(a))?("ie ie"+RegExp.$1):e("firefox/2")?j+" ff2":e("firefox/3.5")?j+" ff3 ff3_5":e("firefox/3")?j+" ff3":e("gecko/")?j:e("opera")?d+(/version\/(\d+)/.test(a)?" "+d+RegExp.$1:(/opera(\s|\/)(\d+)/.test(a)?" "+d+RegExp.$2:"")):e("konqueror")?"konqueror":e("chrome")?l+" chrome":e("iron")?l+" iron":e("applewebkit/")?l+" "+n+(/version\/(\d+)/.test(a)?" "+n+RegExp.$1:""):e("mozilla/")?j:"",e("j2me")?"mobile":e("iphone")?"iphone":e("ipod")?"ipod":e("mac")?"mac":e("darwin")?"mac":e("webtv")?"webtv":e("win")?"win":e("freebsd")?"freebsd":(e("x11")||e("linux"))?"linux":"","js"];c=k.join(" ");f.className+=" "+c;return c}css_browser_selector(navigator.userAgent);function atl_hideSelect(b){agt=navigator.appVersion;var a=(agt.indexOf("MSIE 6")!=-1||agt.indexOf("MSIE 5")!=-1||agt.indexOf("MSIE 4")!=-1);if(a){if(b){$("select").each(function(){this.style.visibility="hidden"})}else{$("select").each(function(){this.style.visibility="visible"})}}}$.fn.outerHtml=function(d){if(d){return this.each(function(){$(this).replaceWith(d)})}var b=$("<div></div>").append($(this).clone());var a=b.html();b.remove();return a};$.fn.centerInClient=function(a){var b={forceAbsolute:false,container:window,completeHandler:null};$.extend(b,a);return this.each(function(f){var h=$(this);var g=$(b.container);var e=b.container==window;if(b.forceAbsolute){if(e){h.remove().appendTo("body")}else{h.remove().appendTo(g.get(0))}}h.css("position","absolute");var j=e?2:1.8;var d=(e?g.width():g.outerWidth())/2-h.outerWidth()/2;var k=(e?g.height():g.outerHeight())/j-h.outerHeight()/2;h.css("left",d+g.scrollLeft());h.css("top",k+g.scrollTop());if(b.completeHandler){b.completeHandler(this)}})};function billingInfo_resetToLoadedValues(d){var a=$(d.target).is(":checked");billingInfo_synchronizeField(d.data.firstName,a);billingInfo_synchronizeField(d.data.lastname,a);billingInfo_synchronizeField(d.data.address1,a);billingInfo_synchronizeField(d.data.address2,a);billingInfo_synchronizeField(d.data.city,a);billingInfo_synchronizeField(d.data.zipcode,a);billingInfo_synchronizeField(d.data.organization,a);billingInfo_synchronizeField(d.data.workPhone,a);billingInfo_synchronizeField(d.data.email,a);billingInfo_synchronizeField(d.data.extenstion,a);var b=$("#"+d.data.countryID);if(!a){b.find(":selected").removeAttr("selected");var e=b.find("[value=N/A]");e.attr("selected","selected")}else{b.find(":selected").removeAttr("selected");var f=$("#"+d.data.country).val();var e=b.find("[value="+f+"]");e.attr("selected","selected")}atl_countryChanged(d.data.countryID,d.data.stateID,$("#"+d.data.state).val());b.trigger("change.CountryChanged");$("[billValidateName=useAcctInfo]").each(function(){if(a){$(this).attr("checked","checked")}else{$(this).removeAttr("checked")}})}function billingInfo_synchronizeField(b,a){var f=$("#"+b);var d=f.attr("billValidateDest");var e=f.val();$("[billValidateName="+d+"]").each(function(){if(a){$(this).val(e)}else{$(this).val("")}})}function billingInfo_synchFields(b){var d=$(b).attr("billValidateName");var a=$(b).val();$("[billValidateName="+d+"]").each(function(){$(this).val(a)})}function billing_synchronizeVisibility(d,e,b,a){$("["+d+"="+e+"]").each(function(){if(b){$(this).hide()}else{$(this).show();if(a!=null){$(this).html(a)}}})}function billing_statesync(e,d){var b=$("#"+d.StateClientID+"_stateText");var a=$("#"+d.StateClientID+"_StateID");var g=$("#"+d.StateClientID+"_StateLabel");var h="billValidateName";billName=a.attr(h);hide=a.is(":hidden");stateOptions=a.html();var f=a.find(":selected").val();$("["+h+"="+billName+"]").each(function(){if(a.is(":hidden")){$(this).hide()}else{$(this).show();if(stateOptions!=null){$(this).html(stateOptions)}$(this).find("[value="+f+"]").attr("selected","selected")}});billName=b.attr(h);hide=b.is(":hidden");billing_synchronizeVisibility(h,billName,hide,null);billName=g.attr(h);hide=g.is(":hidden");billing_synchronizeVisibility(h,billName,hide,null)}function billingInfo_synchDropdowns(d){var b=$(d.target);var e=b.attr("billValidateName");var a=b.find(":selected").val();$("[billValidateName="+e+"]").each(function(){var g=$(this).find(":selected");if(g.val()!=a){$(this).find(":selected").removeAttr("selected");var f=$(this).find("[value="+a+"]");f.attr("selected","selected")}})}function billInfo_validatefields(q,B,k,f,u,j,p,l,r,x,D,G,h,E,g,t,K,m,o,n,a,N,e,A,H,v){popupWarningShown=false;atl_valid_basicValidation_2(q,"First Name","ERROR: Please enter your first name",B,"&nbsp;");atl_valid_basicValidation_3(q);atl_valid_basicValidation_2(k,"Last Name","ERROR: Please enter your last name",f,"&nbsp;");atl_valid_basicValidation_3(k);atl_valid_basicValidation_2(u,"Address1 ","ERROR: Please enter your address",j,"&nbsp;");atl_valid_basicValidation_3(u);atl_valid_removeBadCharById(p);atl_valid_basicValidation_2(r,"City","ERROR: Please enter a city",x,"&nbsp;");atl_valid_basicValidation_3(r);var F=document.getElementById(D);var J=F.options[F.selectedIndex].value;countryId="0";if(J=="us"){countryId="226"}var b=document.getElementById(g);atl_valid_removeBadChar(b);if(!atl_valid_validateZip(b.value,countryId)){temDiv=document.getElementById(t);if(J=="us"){atl_valid_processError_2(true,temDiv,b,"Zip/Postal Code","ERROR: Please enter a valid Zip Code.",true,"&nbsp;")}else{atl_valid_processError_2(true,temDiv,b,"Zip/Postal Code","ERROR: Please enter a valid Zip/Postal Code",true,"&nbsp;")}atl_valid_processError_3(true,g)}else{atl_valid_removeErrorFromDivByID(t,"&nbsp;");atl_valid_processError_3(false,g)}atl_valid_removeErrorFromDivByID(E,"&nbsp;");var y=$("#"+h);atl_valid_removeErrorFromDivByID(E,"&nbsp;");if(!y.is(":hidden")){temDiv=document.getElementById(E);var I=jQuery.trim(y.find(":selected").text());if(I=="Select State"){atl_valid_processError_2(true,temDiv,y,"State Selected","ERROR : Please select a valid State/Province/Territory",true,"&nbsp;")}}else{atl_valid_removeBadCharById(H);atl_valid_processError_3(false,H);var L=$("#"+H);temDiv=document.getElementById(E);if(L.is("input")){if(L.val()==""){atl_valid_processError_2(true,temDiv,document.getElementById(H),"State Invalid ","ERROR : Please enter a valid State/Province/Territory",true,"&nbsp;");atl_valid_basicValidation_3(H)}}}atl_valid_removeBadCharById(K);temDiv=document.getElementById(n);billInfo_validate_phoneNumber(o,"Work Number",n,countryId,h);var w=document.getElementById(a);atl_valid_removeBadChar(w);var M=atl_valid_IsBlank(w)|!atl_valid_isEmailValid(w.value);temDiv=document.getElementById(N);atl_valid_processError_2(M,temDiv,w,"Email","ERROR: Please enter a valid email",true,"&nbsp;");atl_valid_processError_3(M,a);var z=document.getElementById(e);atl_valid_removeBadChar(z);if(!atl_valid_IsBlank(z.value)){if(!atl_valid_IsNumericCheck(z.value)){temDiv=document.getElementById(A);atl_valid_processError_2(true,temDiv,z,"Phone Ext","ERROR: Invalid value",true,"&nbsp;");atl_valid_processError_3(M,a)}}var d=document.getElementById(v);if(d!=null){if((d.style.visibility!="hidden")){var C=document.getElementById(K);var s=/ +/gi;C.value=Trim(C.value);if(atl_valid_IsBlank(C)){atl_valid_basicValidation_2(K,"Organization","ERROR : Please enter the Organization name for the Value-Added Tax ID",m,"&nbsp;")}else{atl_valid_removeErrorFromDivByID(m,"&nbsp;")}}}return atl_valid_getValidation()}function billInfo_validate_phoneNumber(m,l,j,e,o){var n="ERROR: Please enter a valid ";n=n+l;var h=document.getElementById(m);atl_valid_removeBadChar(h);var d=false;var k=/[^0-9]/g;var b="";b=h.value.replace(k,"");if(b.length==0){d=true}else{if((e=="37")&&(b.length!=10||b.charAt(0)==0||b.charAt(0)==1)){d=true;n="ERROR: Please enter a valid 10 digit number"}else{if((e=="226")){var a=document.getElementById(o);var f=a.options[a.selectedIndex].value;if(f.indexOf("AA")==-1&&f.indexOf("AE")==-1&&f.indexOf("AP")==-1){if(b.length!=10||b.charAt(0)==0||b.charAt(0)==1){d=true;n="ERROR: Please enter a valid 10 digit number"}}}}}var g=document.getElementById(j);atl_valid_processError_2(d,g,h,l,n,true,"&nbsp;");atl_valid_processError_3(d,m);return d}var VAT_currentCountry="none";function Vat_CountryChanged(e){if(e.data.vatControlID!=""){var b=$(e.target);var a=$("#"+e.data.vatControlID);var f="synchVat";var d=a.attr(f);VAT_currentCountry=b.find(":selected").val();if(Vat_IsVATCountry(VAT_currentCountry)){a.show();billing_synchronizeVisibility("synchVat","StepNum",false,"3")}else{a.hide();billing_synchronizeVisibility("synchVat","StepNum",false,"2")}billing_synchronizeVisibility(f,d,a.is(":hidden"),null);$("#"+e.data.vatControlID).trigger("vatShowVatInformation",e)}}var VAT_CountryCodes=new Array("at","be","bg","cy","cz","dk","ee","fi","fr","de","gr","hu","ie","it","lv","lt","lu","mt","nl","pl","pt","ro","sk","si","es","se","uk");function Vat_IsVATCountry(d){var a=false;for(var b=0;b<VAT_CountryCodes.length;b++){var e=VAT_CountryCodes[b];if(e==d){a=true;break}}return a}function VAT_ShowVatChanged(d,a){var b=$(a.target);countryCode=b.find(":selected").val();VAT_UpdateExemptData(d.data.drpRegions,countryCode,d.data.regionDiv,d.data.orderSummaryID,d.data.basketTotal,d.data.OrderSummaryTaxesContainer,d.data.OrderSummaryTaxesID,d.data.regionAvailableID,"")}function VAT_GetExemptRegions(d,a){var b=$("#"+d.DrpRegionClientID);if(d.Status){if(!d.RegionUpdated){if(d.ExemptRegions!=null){var e=d.ExemptRegions.length;var b=$("#"+d.DrpRegionClientID);b.html("");if(e>0){VAT_AddCountrytoDropdown(b,"Select a region",true);for(count=0;count<e;count++){VAT_AddCountrytoDropdown(b,d.ExemptRegions[count],false)}$("#"+d.RegionAvailableID).show()}else{$("#"+d.RegionAvailableID).hide()}}else{$("#"+d.RegionAvailableID).hide()}}VAT_UpdateOrderTotal(d.OrderSummaryTotalID,d.OrderSummaryTotalValue,d.ShowTaxes,d.TaxesContainerID,d.TaxesID,d.TaxesValue,d.OrderSummaryGaGTotalValue);VAT_SynchronizeTabs(d)}}function VAT_UpdateOrderTotal(l,j,b,g,m,h,e){var n=$("#"+g);var f="synchSummary";var k;if(b){n.show();k=n.attr(f);billing_synchronizeVisibility(f,k,n.is(":hidden"),null);var a=$("#"+m);a.html(h);k=a.attr(f);billing_synchronizeVisibility(f,k,a.is(":hidden"),h)}else{n.hide();k=n.attr(f);billing_synchronizeVisibility(f,k,n.is(":hidden"),null)}var d=$("#"+l);d.html(j);k=d.attr(f);$("["+f+"="+k+"]").each(function(){if(j!=null){$(this).html(j);$(this).trigger("ConfirmTotal",e)}})}function VAT_AddCountrytoDropdown(d,b,a){var e;if(a){e='<option selected="selected" value="'+b+'">'+b+"</option>"}else{e='<option value="'+b+'">'+b+"</option>"}d.append(e)}function VAT_ShowHideSelection(d){var a=$(d.target);var h=a.attr("id");var f=$("#"+d.data.regionID);var e=$("#"+d.data.businessID);var g="synchVat";if(h.indexOf("vatBusiness")!=-1){e.show();f.hide()}else{if(h.indexOf("vatPersonal")!=-1){f.hide();e.hide()}else{f.show();e.hide()}}var b=e.attr(g);billing_synchronizeVisibility(g,b,e.is(":hidden"),null);b=f.attr(g);billing_synchronizeVisibility(g,b,f.is(":hidden"),null);b=a.attr(g);$("["+g+"="+b+"]").each(function(){if(a.is(":checked")){$(this).attr("checked","checked")}else{$(this).removeAttr("checked")}})}function VAT_SynchronizeTabs(d){var h=$("#"+d.DrpRegionDivClientID);var b=$("#"+d.DrpRegionClientID);var e=$("#"+d.RegionAvailableID);var g="synchVat";var a=h.attr(g);billing_synchronizeVisibility(g,a,h.is(":hidden"),null);a=b.attr(g);var j=b.html();var f=b.find(":selected").val();$("["+g+"="+a+"]").each(function(){if(b.is(":hidden")){$(this).hide()}else{$(this).show();if(j!=null){$(this).html(j)}$(this).find("[value="+f+"]").attr("selected","selected")}});a=e.attr(g);billing_synchronizeVisibility(g,a,e.is(":hidden"),null)}function VAT_SetDefaultOption(b){var a=$("#"+b.data.defaultOption);a.trigger("click")}function VAT_RegionChanged(b){var a=$(b.target);regionName=a.find(":selected").val();if(regionName=="Select a region"){regionName="N/A"}$("[billValidateName=StateInput]").each(function(){$(this).val(regionName)});VAT_UpdateExemptData(b.data.drpRegions,"",b.data.regionDiv,b.data.orderSummaryID,b.data.basketTotal,b.data.OrderSummaryTaxesContainer,b.data.OrderSummaryTaxesID,b.data.regionAvailableID,regionName)}function VAT_IsValidVat(b){var e=b.val();var a=false;var f="";var g=new Array();var d=new Array();g.push([14,"AT",/^(AT)?(U\d{8})$/]);g.push([21,"BE",/^(BE){0,1}[0]{0,1}[0-9]{9}$/]);g.push([53,"CY",/^(CY){0,1}[0-9]{8}[A-Z]$/]);g.push([54,"CZ",/^(CZ)(\d{8,10})(\d{3})?$/]);g.push([57,"DK",/^(DK)((\d{8}))$/]);g.push([62,"EE",/^(EE)(\d{9})$/]);g.push([68,"FI",/^(FI)(\d{8})$/]);g.push([73,"FR",/^(FR)(\d{11})$/,/^(FR)[(A-H)|(J-N)|(P-Z)]\d{10}$/,/^(FR)\d[(A-H)|(J-N)|(P-Z)]\d{9}$/,/^(FR)[(A-H)|(J-N)|(P-Z)]{2}\d{9}$/]);g.push([55,"DE",/^(DE)(\d{9})$/]);g.push([86,"EL",/^(EL)(\d{9})$/]);g.push([97,"HU",/^(HU)(\d{8})$/]);g.push([99,"IE",/^(IE){0,1}[0-9][0-9A-Z\+\*][0-9]{5}[A-Z]$/]);g.push([107,"IT",/^(IT)(\d{11})$/]);g.push([132,"LV",/^(LV)(\d{11})$/]);g.push([131,"LU",/^(LU)(\d{8})$/]);g.push([148,"MT",/^(MT)(\d{8})$/]);g.push([161,"NL",/^(NL)(\d{9})B\d{2}$/]);g.push([174,"PL",/^(PL)(\d{10})$/]);g.push([179,"PT",/^(PT)(\d{9})$/]);g.push([196,"SK",/^(SK)(\d{10})$/]);g.push([194,"SI",/^(SI)(\d{8})$/]);g.push([66,"ES",/^(ES)([A-Z]\d{8})$/,/^(ES)(\d{8}[A-Z])$/,/^(ES)([A-Z]\d{7}[A-Z])$/]);g.push([191,"SE",/^(SE){0,1}[0-9]{10}(01)$/]);g.push([224,"GB",/^(GB)?(\d{9})$/,/^(GB)?(\d{10})$/,/^(GB)?(\d{12})$/,/^(GB)?(\d{13})$/,/^(GB)?(GD\d{3})$/,/^(GB)?(HA\d{3})$/]);g.push([23,"BG",/^(BG)(\d{9,10})$/]);g.push([184,"RO",/^(RO)(\d{2,10})$/]);g.push([86,"GR",/^(GR)(\d{8,9})$/]);g.push([130,"LT",/^(LT)(\d{9}|\d{12})$/]);for(i=0;i<g.length;i++){if(g[i][1]==VAT_currentCountry.toUpperCase()){d=g[i].slice(2,g[i].length);f=g[i].slice(1,2);break}}if(e!=""){if(e.substring(0,2)!=f){e=f+e;b.val(e)}}for(i=0;i<d.length;i++){a=a||d[i].test(e)}return a}function VAT_ValidateTaxID(e){var f=$("#"+e.data.errorDiv);var d=$(e.target);atl_valid_removeBadChar(e.target);var g=d.val();f.hide();if(g!=""){var b=g.toUpperCase();var a=false;b=b.replace(/ /g,"");a=VAT_IsValidVat($(e.target));if(!a){f.show()}}}function ToggleAlternateText(b){var a=$("#"+b.data.displayDiv);var d=$(b.target);if(d.is(":checked")){a.show()}else{a.hide()}}function ToggleRadioDependentInfo(d){var e=$(d.target).is(":checked");var b=$("#"+d.data.disableDiv);var a=$("#"+d.data.displayDiv);b.find("input").each(function(f){if($(this).attr("type")!="radio"){$(this).attr("disabled","disabled");$(this).removeClass("field_invalid")}});b.find("select").each(function(f){$(this).attr("disabled","disabled");$(this).removeClass("field_invalid")});b.attr("disabled","disabled");a.find("input").each(function(f){$(this).removeAttr("disabled")});a.find("select").each(function(f){$(this).removeAttr("disabled")});a.removeAttr("disabled")}function ToggleProfileDependentInfo(d){var b=$("#"+d.data.targetElement).find(":selected");var a=$("#"+d.data.displayDiv);if(b.val()>0){a.find("input").each(function(e){$(this).attr("disabled","disabled");$(this).removeClass("field_invalid")});a.find("select").each(function(e){$(this).attr("disabled","disabled");$(this).removeClass("field_invalid")});a.attr("disabled","disabled")}else{a.find("input").each(function(e){$(this).removeAttr("disabled")});a.find("select").each(function(e){$(this).removeAttr("disabled")});a.removeAttr("disabled")}};
