function ShowCPACproduct(n){n==110?($("#divBasic").show(),$(".yrselectBasic").show(),$("#divPro").hide(),$(".yrselectPro").hide(),$("#divEnt").hide(),$(".yrselectlEnt").hide()):n==111?($("#divBasic").hide(),$(".yrselectBasic").hide(),$("#divPro").show(),$(".yrselectPro").show(),$("#divEnt").hide(),$(".yrselectlEnt").hide()):n==112&&($("#divBasic").hide(),$(".yrselectBasic").hide(),$("#divPro").hide(),$(".yrselectPro").hide(),$("#divEnt").show(),$(".yrselectlEnt").show())}function SetPricing(){var i=$("#drpQty").val(),r,u,t,e,h,o;if($("#drpCPACType").val()=="110"?(u=110,r=$("input:radio[name='Basic']:checked").attr("data")):$("#drpCPACType").val()=="111"?(u=111,r=$("input:radio[name='Pro']:checked").attr("data")):$("#drpCPACType").val()=="112"&&(u=112,r=$("input:radio[name='Ent']:checked").attr("data")),r){var n=r.split("|"),f=n[0],s=parseInt(f)<12?1:parseInt(f)/12,v=parseFloat(n[1].replace("$","")).toFixed(2),y=n[2],k=n[3],p=n[5];SetYearSelection(s);t=1;t=parseInt($("#ddlNumberOfServer").val())>0&&parseInt($("#ddlNumberOfServer").val())!=9999?parseInt($("#ddlNumberOfServer").val()):1;e=0;parseFloat(n[4])>0?(h=$("#hdnSanMin").val(),o=$("#drpSAN").val(),e=o*n[4],$("#spntotalsan").html((t>1?"# Servers: <span>"+t+"<\/span>&nbsp;&nbsp;|&nbsp;&nbsp;":"")+"Total Domains: <span>"+(parseInt(o)+parseInt(h)+1)+"<\/span>")):$("#spntotalsan").html("Total Domains: <span>"+(parseInt($("#hdnSanMin").val())+1)+"<\/span>");var c=parseFloat(parseFloat(y.toString().replace("$",""))*parseFloat(i)).toFixed(2),d=c.toString().split("."),w=parseFloat(c*t-parseFloat(v.toString())*parseInt(s)*parseFloat(i)*t).toFixed(2),l=w.toString().split("."),b=((p*t+e)*parseInt(i)).toFixed(2),a=b.toString().split(".");$("#spTotalAmt").html(currSymbol+a[0]+$("#hdnNumberDecimalSeparator").val()+a[1]);$("#pSavePrice").html(currSymbol+l[0]+$("#hdnNumberDecimalSeparator").val()+l[1]);$(".pro-price").html($("#spTotalAmt").text());$("#btnBuyNow").attr("onclick","window.location.href ='/checkout.ashx?m="+f+"&productid="+u+"&qty="+i+"';");$("#btnBuyNowSKy").attr("onclick","window.location.href ='/checkout.ashx?m="+f+"&productid="+u+"&qty="+i+"';")}else $("#spTotalAmt").html(currSymbol+"0.00"),$(".pro-price").html($("#spTotalAmt").text())}function SetYearSelection(n){$("#drpCPACType").val()=="110"?$("#ddlBasic > [value="+n+"]").prop("selected",!0):$("#drpCPACType").val()=="111"?$("#ddlPro > [value="+n+"]").prop("selected",!0):$("#drpCPACType").val()=="112"&&$("#ddlEnt > [value="+n+"]").prop("selected",!0)}function SetStickyPriceCpac(n){var i,t;n.id=="ddlBasic"&&(i=$("#ddlBasic").val(),t=parseInt(i)-1,$("#rbtBasicPrice"+t).prop("checked",!0),UnCheckOtherRadio($("#rbtBasicPrice"+t),t));n.id=="ddlPro"&&(i=$("#ddlPro").val(),t=parseInt(i)-1,$("#rbtProPrice"+t).prop("checked",!0),UnCheckOtherRadio($("#rbtProPrice"+t),t));n.id=="ddlEnt"&&(i=$("#ddlEnt").val(),t=parseInt(i)-1,$("#rbtEntPrice"+t).prop("checked",!0),UnCheckOtherRadio($("#rbtEntPrice"+t),t));SetPricing()}function UnCheckOtherRadio(n){n.checked=!0;$("div#dvPricing"+$(n).attr("name")).addClass("newpriceonebox").removeClass("newpricetwonebox");$(n).parent().parent().addClass("newpricetwonebox").removeClass("newpriceonebox")}function GetCurrencySymbol(){currSymbol=$("#hdnSymbol").val()}function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i="[\\?&]"+n+"=([^&#]*)",r=new RegExp(i),t=r.exec(window.location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}var allrbtPrice,strUrl,currSymbol;$(function(){allrbtPrice=document.getElementsByTagName("input")});$(document).ready(function(){strUrl=window.location.href;GetCurrencySymbol(strUrl);var n=getParameterByName("pid").toString();n!=""?($("#drpCPACType").val(getParameterByName("pid")),ShowCPACproduct(n)):($("#divBasic").show(),$("#divPro").hide(),$("#divEnt").hide(),$(".yrselectBasic").show(),$(".yrselectPro").hide(),$(".yrselectlEnt").hide());$("#drpCPACType").change(function(){ShowCPACproduct($(this).val());SetPricing();$("#drpCPACTypeSticky > [value="+$(this).val()+"]").prop("selected",!0)});$("#drpCPACTypeSticky").change(function(){$("#drpCPACType > [value="+$(this).val()+"]").prop("selected",!0);ShowCPACproduct($(this).val());SetPricing()});SetPricing();$("#rbtBasic").click(function(){$("#btnBasicBuy").attr("onclick","window.location.href ='/checkout.ashx?m="+$("#rbtBasic input[type='radio']:checked").val()+"&productid=110';")});$("#rbtPro").click(function(){$("#btnProBuy").attr("onclick","window.location.href ='/checkout.ashx?m="+$("#rbtPro input[type='radio']:checked").val()+"&productid=111';")});$("#rbtEnt").click(function(){$("#btnEntBuy").attr("onclick","window.location.href ='/checkout.ashx?m="+$("#rbtEnt input[type='radio']:checked").val()+"&productid=112';")})});$(function(){$("#prodtlaccordian").accordion({collapsible:!0,active:0,heightStyle:"content"})});$(function(){$(".protitle").each(function(){len=$(this).text().length;str=$(this).text().substr(0,86);lastIndexOf=str.lastIndexOf(" ");len>80&&$(this).text(str.substr(0,lastIndexOf)+"")})})