function calculate(){var c=document.calculatorform;var flag=0;document.getElementById("inp01").innerHTML="";document.getElementById("inp02").innerHTML="";document.getElementById("inp03").innerHTML="";document.getElementById("inp04").innerHTML="";document.getElementById("inp05").innerHTML="";document.getElementById("inp06").innerHTML="";document.getElementById("inp07").innerHTML="";document.getElementById("inp08").innerHTML="";document.getElementById("inp09").innerHTML="";document.getElementById("inp10").innerHTML="";if(c.rembakser.value!=""){if(!isValidNumber(c.rembakser.value)){alert("Please enter a number in this field");c.rembakser.focus();return false}else{if(c.rembakseros.value=="1"){c.rembakser.value=parseInt(c.rembakser.value,10);c.totremlic.value=(c.rembakser.value)*(c.txtSPEUPerRemServer.value)}else{if(c.rembakseros.value=="2"){c.rembakser.value=parseInt(c.rembakser.value,10);c.totremlic.value=(c.rembakser.value)*(c.txtSPEUPerRemDesktop.value)}}}flag=1}if(c.localbakser.value!=""){if(!isValidNumber(c.localbakser.value)){alert("Please enter a number in this field");c.localbakser.focus();return false}else{if(c.localbakseros.value==1){c.localbakser.value=parseInt(c.localbakser.value,10);c.totlocallic.value=(c.localbakser.value)*(c.txtSPEUPerLocalServer.value)}else{if(c.localbakseros.value==2){c.localbakser.value=parseInt(c.localbakser.value,10);c.totlocallic.value=(c.localbakser.value)*(c.txtSPEUPerLocalDesktop.value)}}}flag=1}if(c.desktops.value!=""){if(!isValidNumber(c.desktops.value)){alert("Please enter a number in this field");c.desktops.focus();return false}else{c.desktops.value=parseInt(c.desktops.value,10);c.totaldesktops.value=(c.desktops.value)*(c.txtSPEUPerDesktop.value)}flag=1}if(c.servers.value!=""){if(!isValidNumber(c.servers.value)){alert("Please enter a number in this field");c.servers.focus();return false}else{c.servers.value=parseInt(c.servers.value,10);c.totalservers.value=(c.servers.value)*(c.txtSPEUPerServer.value)}flag=1}if(c.AdvPlugin.value!=""){if(!isValidNumber(c.AdvPlugin.value)){alert("Please enter a number in this field");c.AdvPlugin.focus();return false}else{c.AdvPlugin.value=parseInt(c.AdvPlugin.value,10);c.totalAdvPlugin.value=c.AdvPlugin.value}flag=1}if(c.remrepser.value!=""){if(!isValidNumber(c.remrepser.value)){alert("Please enter a number in this field");c.remrepser.focus();return false}else{if(c.remrepseros.value=="1"){c.remrepser.value=parseInt(c.remrepser.value,10);c.totreplic.value=(c.remrepser.value)*(c.txtSPEUPerReplServer.value)}else{if(c.remrepseros.value=="2"){c.remrepser.value=parseInt(c.remrepser.value,10);c.totreplic.value=(c.remrepser.value)*(c.txtSPEUPerReplDesktop.value)}}}flag=1}if(c.totremlic.value==0){document.getElementById("inp01").innerHTML=""}else{document.getElementById("inp01").innerHTML=c.totremlic.value}if(c.totlocallic.value==0){document.getElementById("inp10").innerHTML=""}else{document.getElementById("inp10").innerHTML=c.totlocallic.value}if(c.totaldesktops.value==0){document.getElementById("inp04").innerHTML=""}else{document.getElementById("inp04").innerHTML=c.totaldesktops.value}if(c.totalservers.value==0){document.getElementById("inp03").innerHTML=""}else{document.getElementById("inp03").innerHTML=c.totalservers.value}if(c.totalAdvPlugin.value==0){document.getElementById("inp09").innerHTML=""}else{document.getElementById("inp09").innerHTML=c.totalAdvPlugin.value}if(c.totreplic.value==0){document.getElementById("inp02").innerHTML=""}else{document.getElementById("inp02").innerHTML=c.totreplic.value}c.totinstallations.value=parseInt(c.rembakser.value)+parseInt(c.remrepser.value)+parseInt(c.servers.value)+parseInt(c.desktops.value)+parseInt(c.AdvPlugin.value);if(isValidNumber(c.totinstallations.value)){c.totinstallations.value=0}if(c.totinstallations.value==0){document.getElementById("inp05").innerHTML=""}else{document.getElementById("inp05").innerHTML=c.totinstallations.value}c.totalspeus.value=parseInt(c.totlocallic.value)+parseInt(c.totremlic.value)+parseInt(c.totreplic.value)+parseInt(c.totalservers.value)+parseInt(c.totaldesktops.value)+parseInt(c.totalAdvPlugin.value);if(c.totalspeus.value==0){document.getElementById("inp06").innerHTML=""}else{document.getElementById("inp06").innerHTML=c.totalspeus.value}if(c.totalspeus.value==0){c.amtperspeu.value=0}else{if(parseInt(c.totalspeus.value)<parseInt(c.txtSPEULimit12.value)){c.amtperspeu.value=c.txtSPEUPrice1.value;document.getElementById("below25").style.display="";document.getElementById("below50").style.display="none";document.getElementById("below100").style.display="none";document.getElementById("below250").style.display="none";document.getElementById("below500").style.display="none";document.getElementById("below1000").style.display="none"}else{if(parseInt(c.totalspeus.value)<parseInt(c.txtSPEULimit3.value)){c.amtperspeu.value=c.txtSPEUPrice1.value;document.getElementById("below25").style.display="none";document.getElementById("below50").style.display="";document.getElementById("below100").style.display="none";document.getElementById("below250").style.display="none";document.getElementById("below500").style.display="none";document.getElementById("below1000").style.display="none"}else{if(parseInt(c.totalspeus.value)<parseInt(c.txtSPEULimit3.value)){c.amtperspeu.value=c.txtSPEUPrice1.value;document.getElementById("below25").style.display="none";document.getElementById("below50").style.display="";document.getElementById("below100").style.display="none";document.getElementById("below250").style.display="none";document.getElementById("below500").style.display="none";document.getElementById("below1000").style.display="none"}else{if(parseInt(c.totalspeus.value)<parseInt(c.txtSPEULimit5.value)){c.amtperspeu.value=c.txtSPEUPrice2.value;document.getElementById("below25").style.display="none";document.getElementById("below50").style.display="none";document.getElementById("below100").style.display="";document.getElementById("below250").style.display="none";document.getElementById("below500").style.display="none";document.getElementById("below1000").style.display="none"}else{if(parseInt(c.totalspeus.value)<parseInt(c.txtSPEULimit7.value)){c.amtperspeu.value=c.txtSPEUPrice3.value;document.getElementById("below25").style.display="none";document.getElementById("below50").style.display="none";document.getElementById("below100").style.display="none";document.getElementById("below250").style.display="";document.getElementById("below500").style.display="none";document.getElementById("below1000").style.display="none"}else{if(parseInt(c.totalspeus.value)<parseInt(c.txtSPEULimit9.value)){c.amtperspeu.value=c.txtSPEUPrice4.value;document.getElementById("below25").style.display="none";document.getElementById("below50").style.display="none";document.getElementById("below100").style.display="none";document.getElementById("below250").style.display="none";document.getElementById("below500").style.display="";document.getElementById("below1000").style.display="none"}else{if(parseInt(c.totalspeus.value)<parseInt(c.txtSPEULimit11.value)){c.amtperspeu.value=c.txtSPEUPrice5.value;document.getElementById("below25").style.display="none";document.getElementById("below50").style.display="none";document.getElementById("below100").style.display="none";document.getElementById("below250").style.display="none";document.getElementById("below500").style.display="none";document.getElementById("below1000").style.display=""}else{if(parseInt(c.totalspeus.value)>=parseInt(c.txtSPEULimit11.value)){c.amtperspeu.value=c.txtSPEUPrice6.value;document.getElementById("below25").style.display="none";document.getElementById("below50").style.display="none";document.getElementById("below100").style.display="none";document.getElementById("below250").style.display="none";document.getElementById("below500").style.display="none";document.getElementById("below1000").style.display="none"}}}}}}}}}if(c.amtperspeu.value==0){document.getElementById("inp08").innerHTML=""}else{document.getElementById("inp08").innerHTML=c.amtperspeu.value}c.speucost.value=(c.totalspeus.value)*(c.amtperspeu.value);if(c.speucost.value==0){document.getElementById("inp07").innerHTML=""}else{document.getElementById("inp07").innerHTML=c.speucost.value}document.purchaseorder.quantity1.value=c.totalspeus.value;showhide(0);return false}function purchasevalidation(){if(isValidNumber(document.purchaseorder.quantity1.value)){if((document.purchaseorder.quantity1.value==0)||(document.purchaseorder.quantity1.value!=0&&document.purchaseorder.quantity1.value<10)){alert("You need to purchase at least 10 SPEUs");document.purchaseorder.quantity1.focus();return false}}else{if(!isValidNumber(document.purchaseorder.quantity1.value)){alert("Please enter a number in this field");document.purchaseorder.quantity1.focus();return false}}if(document.purchaseorder.quantity1.value>=500){document.purchaseorder.quantity2.value=0}if(document.purchaseorder.upgradeslot1.options[0].selected&&document.purchaseorder.upgradeslot2.options[0].selected){document.purchaseorder.quantity2.value=0}if(document.purchaseorder.quantity2.value!=""&&document.purchaseorder.quantity2.value>0){document.purstore.qt.value=document.purchaseorder.quantity1.value+":"+document.purchaseorder.quantity2.value;document.purstore.cd.value=document.purchaseorder.contractId1.value+":"+document.purchaseorder.contractId2.value;document.purstore.noc.value=2;document.purstore.pd.value=5}else{document.purstore.qt.value=document.purchaseorder.quantity1.value;document.purstore.cd.value=document.purchaseorder.contractId1.value;document.purstore.noc.value=1;document.purstore.pd.value=2}document.purstore.submit()}var popUpWin=0;function popUpWindow(URLStr,left,top,width,height){if(popUpWin){if(!popUpWin.closed){popUpWin.close()}}popUpWin=open(URLStr,"popUpWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width="+width+",height="+height+",left="+left+", top="+top+",screenX="+left+",screenY="+top+"")}function subscribtionLic(){if((document.sublic.quantity1.value==0||document.sublic.quantity1.value=="")&&(document.sublic.quantity2.value==0||document.sublic.quantity2.value=="")&&(document.sublic.quantity3.value==0||document.sublic.quantity3.value=="")&&(document.sublic.quantity4.value==0)){alert("Please enter at least 1 license (of any type)");document.sublic.quantity1.focus();return false}else{if(isNaN(document.sublic.quantity1.value)||!isValidNumber(document.sublic.quantity1.value)){alert("Please enter a number in this field");document.sublic.quantity1.value=0;document.sublic.quantity1.focus();return false}if(isNaN(document.sublic.quantity2.value)||!isValidNumber(document.sublic.quantity2.value)){alert("Please enter a number in this field");document.sublic.quantity2.value=0;document.sublic.quantity2.focus();return false}if(isNaN(document.sublic.quantity3.value)||!isValidNumber(document.sublic.quantity3.value)){alert("Please enter a number in this field");document.sublic.quantity3.value=0;document.sublic.quantity3.focus();return false}if(isNaN(document.sublic.quantity4.value)||!isValidNumber(document.sublic.quantity4.value)){alert("Please enter a number in this field");document.sublic.quantity4.focus();return false}}document.sublic.qt.value="";document.sublic.cd.value="";document.sublic.noc.value=0;document.sublic.pd.value=7;if(document.sublic.quantity1.value!=""&&document.sublic.quantity1.value>0){document.sublic.qt.value=document.sublic.quantity1.value;document.sublic.cd.value=document.sublic.contractId1.value;document.sublic.noc.value=document.sublic.noc.value+1}if(document.sublic.quantity2.value!=""&&document.sublic.quantity2.value>0){if(document.sublic.qt.value!=""){document.sublic.qt.value=document.sublic.qt.value+":"+document.sublic.quantity2.value;document.sublic.cd.value=document.sublic.cd.value+":"+document.sublic.contractId2.value}else{document.sublic.qt.value=document.sublic.quantity2.value;document.sublic.cd.value=document.sublic.contractId2.value}document.sublic.noc.value=document.sublic.noc.value+1}if(document.sublic.quantity3.value!=""&&document.sublic.quantity3.value>0){if(document.sublic.qt.value!=""){document.sublic.qt.value=document.sublic.qt.value+":"+document.sublic.quantity3.value;document.sublic.cd.value=document.sublic.cd.value+":"+document.sublic.contractId3.value}else{document.sublic.qt.value=document.sublic.quantity3.value;document.sublic.cd.value=document.sublic.contractId3.value}document.sublic.noc.value=document.sublic.noc.value+1}if(document.sublic.quantity4.value>0){if(document.sublic.qt.value!=""){document.sublic.qt.value=document.sublic.qt.value+":"+document.sublic.quantity4.value;document.sublic.cd.value=document.sublic.cd.value+":"+document.sublic.contractId4.value}else{document.sublic.qt.value=document.sublic.quantity4.value;document.sublic.cd.value=document.sublic.contractId4.value}document.sublic.noc.value=document.sublic.noc.value+1}return true}function perpetualLic(){if((document.perlic.quantity1.value==0||document.perlic.quantity1.value=="")&&(document.perlic.quantity2.value==0||document.perlic.quantity2.value=="")&&(document.perlic.quantity3.value==0||document.perlic.quantity3.value=="")&&(document.perlic.quantity4.value==0)){alert("Please enter at least 1 license (of any type)");document.perlic.quantity1.focus();return false}else{if(isNaN(document.perlic.quantity1.value)||!isValidNumber(document.perlic.quantity1.value)){alert("Please enter a number in this field");document.perlic.quantity1.value=0;document.perlic.quantity1.focus();return false}if(isNaN(document.perlic.quantity2.value)||!isValidNumber(document.perlic.quantity2.value)){alert("Please enter a number in this field");document.perlic.quantity2.value=0;document.perlic.quantity2.focus();return false}if(isNaN(document.perlic.quantity3.value)||!isValidNumber(document.perlic.quantity3.value)){alert("Please enter a number in this field");document.perlic.quantity3.value=0;document.perlic.quantity3.focus();return false}if(isNaN(document.perlic.quantity4.value)||!isValidNumber(document.perlic.quantity4.value)){alert("Please enter a number in this field");document.perlic.quantity4.focus();return false}}document.perlic.qt.value="";document.perlic.cd.value="";document.perlic.noc.value=0;document.perlic.pd.value=7;if(document.perlic.quantity1.value!=""&&document.perlic.quantity1.value>0){document.perlic.qt.value=document.perlic.quantity1.value;document.perlic.cd.value=document.perlic.contractId1.value;document.perlic.noc.value=document.perlic.noc.value+1}if(document.perlic.quantity2.value!=""&&document.perlic.quantity2.value>0){if(document.perlic.qt.value!=""){document.perlic.qt.value=document.perlic.qt.value+":"+document.perlic.quantity2.value;document.perlic.cd.value=document.perlic.cd.value+":"+document.perlic.contractId2.value}else{document.perlic.qt.value=document.perlic.quantity2.value;document.perlic.cd.value=document.perlic.contractId2.value}document.perlic.noc.value=document.perlic.noc.value+1}if(document.perlic.quantity3.value!=""&&document.perlic.quantity3.value>0){if(document.perlic.qt.value!=""){document.perlic.qt.value=document.perlic.qt.value+":"+document.perlic.quantity3.value;document.perlic.cd.value=document.perlic.cd.value+":"+document.perlic.contractId3.value}else{document.perlic.qt.value=document.perlic.quantity3.value;document.perlic.cd.value=document.perlic.contractId3.value}document.perlic.noc.value=document.perlic.noc.value+1}if(document.perlic.quantity4.value>0){if(document.perlic.qt.value!=""){document.perlic.qt.value=document.perlic.qt.value+":"+document.perlic.quantity4.value;document.perlic.cd.value=document.perlic.cd.value+":"+document.perlic.contractId4.value}else{document.perlic.qt.value=document.perlic.quantity4.value;document.perlic.cd.value=document.perlic.contractId4.value}document.perlic.noc.value=document.perlic.noc.value+1}return true}function isValidNumber(inputStr){if(inputStr.match(/^[0-9]+$/)){return true;alert("true")}else{return false}}function speuslotval(){var bridgecal=document.bridgefeecalculator.speuslot.value;document.getElementById("brandingoption").innerHTML="";document.getElementById("c1").style.display="none";document.getElementById("c2").style.display="none";document.getElementById("d1").style.display="none";document.getElementById("d2").style.display="none";document.getElementById("purchase").style.display="none";document.bridgefeecalculator.upgradeslot1.options[0].selected=true;document.bridgefeecalculator.upgradeslot2.options[0].selected=true;if(bridgecal==0){document.getElementById("brandingoption").innerHTML="";document.getElementById("c1").style.display="none";document.getElementById("c2").style.display="none";document.getElementById("d1").style.display="none";document.getElementById("d2").style.display="none";document.getElementById("purchase").style.display="none"}if(bridgecal>0&&bridgecal<=25){document.getElementById("brandingoption").innerHTML="You are not eligble for any co-branding options. Please purchase at least 25 SPEUs to avail co-branding options.";document.getElementById("c1").style.display="none";document.getElementById("c2").style.display="none";document.getElementById("d1").style.display="none";document.getElementById("d2").style.display="none";document.getElementById("purchase").style.display="none"}if(bridgecal>=25&&bridgecal<=49){document.getElementById("brandingoption").innerHTML="<span onClick='javascript:document.basiccobranding.submit();' class='linkclass'>Basic Co-Branding.</span>";document.getElementById("c1").style.display="";document.getElementById("c2").style.display="none"}else{if(bridgecal>=50&&bridgecal<=99){document.getElementById("brandingoption").innerHTML="<span onClick='javascript:document.basiccobranding.submit();' class='linkclass'>Basic Co-Branding.</span>";document.getElementById("c1").style.display="";document.getElementById("c2").style.display="none"}else{if(bridgecal>=100&&bridgecal<=249){document.getElementById("brandingoption").innerHTML="<span onClick='javascript:document.advancedcobranding.submit();' class='linkclass'>Advanced Co-Branding.</span>";document.getElementById("c1").style.display="none";document.getElementById("c2").style.display=""}else{if(bridgecal>=250){document.getElementById("brandingoption").innerHTML="<span onClick='javascript:document.rebranding.submit();' class='linkclass'>Rebranding.</span>"}}}}}function upgradeslotval(inpstr){var speucount=document.getElementById("speuslot").value;var updatebridge1=document.getElementById("upgradeslot1").value;var updatebridge2=document.getElementById("upgradeslot2").value;var bcb1toacb=2;var bcb2toacb=1;var bcb1torb=3;var bcb2torb=2;var acb1torb=1;var acb2torb=0;var price=1000;if(inpstr==1){if((speucount>=25&&speucount<=49)&&updatebridge1=="ACB"){document.getElementById("d1").style.display="";document.getElementById("d2").style.display="";document.getElementById("purchase").style.display="";document.getElementById("brandingvalue").innerHTML=bcb1toacb;document.getElementById("bridgevalue").innerHTML=bcb1toacb;document.getElementById("totalprice").innerHTML=price*bcb1toacb;document.getElementById("quantity1").value=bcb1toacb}if((speucount>=25&&speucount<=49)&&updatebridge1=="RB"){document.getElementById("d1").style.display="";document.getElementById("d2").style.display="";document.getElementById("purchase").style.display="";document.getElementById("brandingvalue").innerHTML=bcb1torb;document.getElementById("bridgevalue").innerHTML=bcb1torb;document.getElementById("totalprice").innerHTML=price*bcb1torb;document.getElementById("quantity1").value=bcb1torb}if((speucount>=50&&speucount<=99)&&updatebridge1=="ACB"){document.getElementById("d1").style.display="";document.getElementById("d2").style.display="";document.getElementById("purchase").style.display="";document.getElementById("brandingvalue").innerHTML=bcb2toacb;document.getElementById("bridgevalue").innerHTML=bcb2toacb;document.getElementById("totalprice").innerHTML=price*bcb2toacb;document.getElementById("quantity1").value=bcb2toacb}if((speucount>=50&&speucount<=99)&&updatebridge1=="RB"){document.getElementById("d1").style.display="";document.getElementById("d2").style.display="";document.getElementById("purchase").style.display="";document.getElementById("brandingvalue").innerHTML=bcb2torb;document.getElementById("bridgevalue").innerHTML=bcb2torb;document.getElementById("totalprice").innerHTML=price*bcb2torb;document.getElementById("quantity1").value=bcb2torb}}if(inpstr==2){if((speucount>=100&&speucount<=249)&&updatebridge2=="RB"){document.getElementById("d1").style.display="";document.getElementById("d2").style.display="";document.getElementById("purchase").style.display="";document.getElementById("brandingvalue").innerHTML=acb1torb;document.getElementById("bridgevalue").innerHTML=acb1torb;document.getElementById("totalprice").innerHTML=price*acb1torb;document.getElementById("quantity1").value=acb1torb}}}function bridgefeecal(speucount){document.getElementById("brandingoption").innerHTML="";document.getElementById("c1").style.display="none";document.getElementById("c2").style.display="none";document.getElementById("d1").style.display="none";document.getElementById("d2").style.display="none";document.getElementById("upgradeslot1").options[0].selected=true;document.getElementById("upgradeslot2").options[0].selected=true;if(!isValidNumber(speucount)){alert("Please enter a number in this field");document.purchaseorder.quantity1.focus();return false}else{if(speucount<25){document.getElementById("bridgefeecalculator").style.display="";document.getElementById("brandingoption").innerHTML="You are not eligible for any co-branding options. Please purchase at least 25 SPEUs to avail co-branding options.";document.getElementById("c1").style.display="none";document.getElementById("c2").style.display="none";document.getElementById("d1").style.display="none";document.getElementById("d2").style.display="none"}else{if(speucount>=25&&speucount<50){document.getElementById("bridgefeecalculator").style.display="";document.getElementById("brandingoption").innerHTML="<span onClick='javascript:document.basiccobranding.submit();' class='linkclass'>Basic Co-Branding.</span>";document.getElementById("c1").style.display="";document.getElementById("c2").style.display="none"}else{if(speucount>=50&&speucount<=99){document.getElementById("bridgefeecalculator").style.display="";document.getElementById("brandingoption").innerHTML="<span onClick='javascript:document.basiccobranding.submit();' class='linkclass'>Basic Co-Branding.</span>";document.getElementById("c1").style.display="";document.getElementById("c2").style.display="none"}else{if(speucount>=100&&speucount<=249){document.getElementById("bridgefeecalculator").style.display="";document.getElementById("brandingoption").innerHTML="<span onClick='javascript:document.advancedcobranding.submit();' class='linkclass'>Advanced Co-Branding.</span>";document.getElementById("c1").style.display="none";document.getElementById("c2").style.display=""}else{if(speucount>=250){document.getElementById("bridgefeecalculator").style.display="";document.getElementById("brandingoption").innerHTML="<span onClick='javascript:document.rebranding.submit();' class='linkclass'>Rebranding.</span>";document.getElementById("quantity3").value=0}}}}}}}function upgradeoptionsdisplay(){if(document.getElementById("bridgefeecalculator").style.display!=""){bridgefeecal(document.purchaseorder.quantity1.value);showhide(0)}}function showhide(val){if(val==0){if(document.getElementById("showhidebrandingoptions").innerHTML=="Click here to view your branding eligibility and upgrade options"){document.getElementById("showhidebrandingoptions").innerHTML="Hide branding eligibility and upgrade options";document.getElementById("bridgefeecalculator").style.display="";bridgefeecal(document.purchaseorder.quantity1.value)}else{if(document.getElementById("showhidebrandingoptions").innerHTML=="Hide branding eligibility and upgrade options"){document.getElementById("showhidebrandingoptions").innerHTML="Click here to view your branding eligibility and upgrade options";document.getElementById("bridgefeecalculator").style.display="none"}}}else{if(val==1){document.getElementById("showhidebrandingoptions").innerHTML="Click here to view your branding eligibility and upgrade options";document.getElementById("bridgefeecalculator").style.display="none"}}}function updatebridge(inpstr){var speucount=document.purchaseorder.quantity1.value;var updatebridge1=document.getElementById("upgradeslot1").value;var updatebridge2=document.getElementById("upgradeslot2").value;var bcb1toacb=2;var bcb2toacb=1;var bcb1torb=3;var bcb2torb=2;var acb1torb=1;var acb2torb=0;var price=1000;if(inpstr==1){if(updatebridge1<=24){document.getElementById("d1").style.display="none";document.getElementById("d2").style.display="none";document.getElementById("brandingvalue").innerHTML="";document.getElementById("bridgevalue").innerHTML="";document.getElementById("totalprice").innerHTML="";document.getElementById("quantity2").value=0}if((speucount>=25&&speucount<=49)&&updatebridge1=="ACB"){document.getElementById("d1").style.display="";document.getElementById("d2").style.display="";document.getElementById("brandingvalue").innerHTML=bcb1toacb;document.getElementById("bridgevalue").innerHTML=bcb1toacb;document.getElementById("totalprice").innerHTML=price*bcb1toacb;document.getElementById("quantity2").value=bcb1toacb}if((speucount>=25&&speucount<=49)&&updatebridge1=="RB"){document.getElementById("d1").style.display="";document.getElementById("d2").style.display="";document.getElementById("brandingvalue").innerHTML=bcb1torb;document.getElementById("bridgevalue").innerHTML=bcb1torb;document.getElementById("totalprice").innerHTML=price*bcb1torb;document.getElementById("quantity2").value=bcb1torb}if((speucount>=50&&speucount<=99)&&updatebridge1=="ACB"){document.getElementById("d1").style.display="";document.getElementById("d2").style.display="";document.getElementById("brandingvalue").innerHTML=bcb2toacb;document.getElementById("bridgevalue").innerHTML=bcb2toacb;document.getElementById("totalprice").innerHTML=price*bcb2toacb;document.getElementById("quantity2").value=bcb2toacb}if((speucount>=50&&speucount<=99)&&updatebridge1=="RB"){document.getElementById("d1").style.display="";document.getElementById("d2").style.display="";document.getElementById("brandingvalue").innerHTML=bcb2torb;document.getElementById("bridgevalue").innerHTML=bcb2torb;document.getElementById("totalprice").innerHTML=price*bcb2torb;document.getElementById("quantity2").value=bcb2torb}}if(inpstr==2){if(updatebridge2==0){document.getElementById("d1").style.display="none";document.getElementById("d2").style.display="none";document.getElementById("brandingvalue").innerHTML="";document.getElementById("bridgevalue").innerHTML="";document.getElementById("totalprice").innerHTML="";document.getElementById("quantity2").value=0}if((speucount>=100&&speucount<=249)&&updatebridge2=="RB"){document.getElementById("d1").style.display="";document.getElementById("d2").style.display="";document.getElementById("brandingvalue").innerHTML=acb1torb;document.getElementById("bridgevalue").innerHTML=acb1torb;document.getElementById("totalprice").innerHTML=price*acb1torb;document.getElementById("quantity2").value=acb1torb}if(speucount>=250){document.getElementById("quantity2").value=acb2torb}}}function activatepurchase(){if(document.purchasetype.purchasecount[0].checked){opener.document.purchaseorder.submit();self.close()}else{if(document.purchasetype.purchasecount[1].checked){opener.document.purchaseorder.quantity3.value=0;opener.document.purchaseorder.submit();self.close()}}}function resetformfields(){if(document.calculatorform){document.calculatorform.reset()}if(document.purchaseorder){document.purchaseorder.reset()}}function directpurchasevalidation(type){if(isValidNumber(document.directpurchaseorder.qt.value)){if(type==1){if((document.directpurchaseorder.qt.value==0)||(document.directpurchaseorder.qt.value!=0&&document.directpurchaseorder.qt.value<10)){alert("You need to purchase at least 10 SPEUs");document.directpurchaseorder.qt.focus();return false}}if(type==2){if((document.directpurchaseorder.qt.value==0)||(document.directpurchaseorder.qt.value!=0&&document.directpurchaseorder.qt.value<150)){alert("You need to purchase at least 150 MCALs");document.directpurchaseorder.qt.focus();return false}}}else{if(!isValidNumber(document.directpurchaseorder.qt.value)){alert("Please enter a number in this field");document.directpurchaseorder.qt.focus();return false}}return true}function calculateEduLic(){document.getElementById("eduPurResult").style.display="none";document.getElementById("eduMore500").style.display="none";var educal=document.educalform;var flag=0;var elemCnt=4;var totCost,discount,finalPrice,totalSpeu,discntAmt;var edu_desk_os_pri=educal.txt_edu_desk_os_pri.value;var edu_serv_os_pri=educal.txt_edu_serv_os_pri.value;var edu_adv_plug_pri=educal.txt_edu_adv_plug_pri.value;var edu_rep_serv_pri=educal.txt_edu_rep_serv_pri.value;var edu_desk_os_speu=educal.txt_edu_desk_os_speu.value;var edu_serv_os_speu=educal.txt_edu_serv_os_speu.value;var edu_adv_plug_speu=educal.txt_edu_adv_plug_speu.value;var edu_rep_serv_speu=educal.txt_edu_rep_serv_speu.value;var discnt_pri_1=educal.txt_discnt_1.value;var discnt_pri_2=educal.txt_discnt_2.value;var speu_cost=educal.speu_cost.value;if(educal.edu_desktop_os_count.value==""||educal.edu_desktop_os_count.value==0){flag=flag+1}else{if(!isValidNumber(educal.edu_desktop_os_count.value)){alert("Please enter a number in this field");educal.edu_desktop_os_count.value="";educal.edu_desktop_os_count.focus();return false}}if(educal.edu_server_os_count.value==""||educal.edu_server_os_count.value==0){flag=flag+1}else{if(!isValidNumber(educal.edu_server_os_count.value)){alert("Please enter a number in this field");educal.edu_server_os_count.value="";educal.edu_server_os_count.focus();return false}}if(educal.edu_adv_plugin_count.value==""||educal.edu_adv_plugin_count.value==0){flag=flag+1}else{if(!isValidNumber(educal.edu_adv_plugin_count.value)){alert("Please enter a number in this field");educal.edu_adv_plugin_count.value="";educal.edu_adv_plugin_count.focus();return false}}if(educal.edu_replic_serv_count.value==""||educal.edu_replic_serv_count.value==0){flag=flag+1}else{if(!isValidNumber(educal.edu_replic_serv_count.value)){alert("Please enter a number in this field");educal.edu_replic_serv_count.value="";educal.edu_replic_serv_count.focus();return false}}if(elemCnt==flag){alert("Please enter the number of installations in atleast one of the fields to calculate the cost");educal.edu_desktop_os_count.focus();return false}else{totalSpeu=educal.edu_desktop_os_count.value*edu_desk_os_speu;totalSpeu+=educal.edu_server_os_count.value*edu_serv_os_speu;totalSpeu+=educal.edu_adv_plugin_count.value*edu_adv_plug_speu;totalSpeu+=educal.edu_replic_serv_count.value*edu_rep_serv_speu;totCost=totalSpeu*speu_cost;if(totalSpeu>0&&totalSpeu<250){discntAmt=totCost*(discnt_pri_1/100)}else{if(totalSpeu>=250&&totalSpeu<500){discntAmt=totCost*(discnt_pri_2/100)}}finalPrice=totCost-discntAmt;discount=totCost-finalPrice;document.getElementById("eduPurResult").style.display="";document.getElementById("calTotCost").innerHTML=totCost;document.getElementById("calDisCost").innerHTML=discount;document.getElementById("calfinalCost").innerHTML=finalPrice;if(totalSpeu>=500){document.getElementById("eduMore500").style.display=""}else{document.getElementById("eduLess500").style.display=""}}}function mcalCalculator(chk){var mcalform=document.mcal;var mcal_desktop_os=mcalform.txtMCALDesktop.value;var mcal_server_os=mcalform.txtMCALServer.value;var mcal_mssql_bkp=mcalform.txtMCALMSSQL.value;var mcal_exchange_bkp=mcalform.txtMCALExchangeBkp.value;var mcal_exchange_mailbox_bkp=mcalform.txtMCALExchangeMailBoxBkp.value;var mcal_mysql_bkp=mcalform.txtMCALMySQLBkp.value;var mcal_mssql_sbs_bkp=mcalform.txtMCALMSSQLSBS.value;var mcal_exchange_sbs_bkp=mcalform.txtMCALExchangeSBSBkp.value;var mcal_image_bkp=mcalform.txtMCALImageBkp.value;var sharepoint_sbs=mcalform.txtMCALSharePointSBSBkp.value;var sharepoint_non_sbs=mcalform.txtMCALSharePointNonSBSBkp.value;var mcal_list_price=mcalform.txtMCALListPrice.value;var mcal_price1=mcalform.txtMCALPrice1.value;var mcal_price2=mcalform.txtMCALPrice2.value;var mcal_price3=mcalform.txtMCALPrice3.value;var mcal_price4=mcalform.txtMCALPrice4.value;var mcal_price5=mcalform.txtMCALPrice5.value;var mcal_price6=mcalform.txtMCALPrice6.value;var mcal_price7=mcalform.txtMCALPrice7.value;var mcal_limit1=parseInt(mcalform.txtMCALLimit1.value);var mcal_limit2=parseInt(mcalform.txtMCALLimit2.value);var mcal_limit3=parseInt(mcalform.txtMCALLimit3.value);var mcal_limit4=parseInt(mcalform.txtMCALLimit4.value);var mcal_limit5=parseInt(mcalform.txtMCALLimit5.value);var mcal_limit6=parseInt(mcalform.txtMCALLimit6.value);var mcal_limit7=parseInt(mcalform.txtMCALLimit7.value);var mcal_limit8=parseInt(mcalform.txtMCALLimit8.value);var mcal_limit9=parseInt(mcalform.txtMCALLimit9.value);var mcal_limit10=parseInt(mcalform.txtMCALLimit10.value);var mcal_limit11=parseInt(mcalform.txtMCALLimit11.value);var mcal_limit12=parseInt(mcalform.txtMCALLimit12.value);var mcal_limit13=parseInt(mcalform.txtMCALLimit13.value);var mcal_limit14=parseInt(mcalform.txtMCALLimit14.value);var mcal_limit15=parseInt(mcalform.txtMCALLimit15.value);var mcal_percent1=mcalform.txtMCALPercent1.value;var mcal_percent2=mcalform.txtMCALPercent2.value;var mcal_percent3=mcalform.txtMCALPercent3.value;var mcal_percent4=mcalform.txtMCALPercent4.value;var mcal_percent5=mcalform.txtMCALPercent5.value;var mcal_percent6=mcalform.txtMCALPercent6.value;var mcal_percent7=mcalform.txtMCALPercent7.value;if(chk==1){if(!isValidNumber(mcalform.DesktopOsCount.value)&&mcalform.DesktopOsCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALDesktopOsTxt").innerHTML="";mcalform.DesktopOsCount.value="";mcalform.DesktopOsCount.focus()}else{mcalform.reqMCALDesktopOs.value=mcalform.DesktopOsCount.value*mcal_desktop_os;document.getElementById("reqMCALDesktopOsTxt").innerHTML=mcalform.reqMCALDesktopOs.value}}if(chk==2){if(!isValidNumber(mcalform.ServerOsCount.value)&&mcalform.ServerOsCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALServerOsTxt").innerHTML="";mcalform.ServerOsCount.value="";mcalform.ServerOsCount.focus()}else{mcalform.reqMCALServerOs.value=mcalform.ServerOsCount.value*mcal_server_os;document.getElementById("reqMCALServerOsTxt").innerHTML=mcalform.reqMCALServerOs.value}}if(chk==8){if(!isValidNumber(mcalform.MSSQLSBSCount.value)&&mcalform.MSSQLSBSCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALMSSQLSBSTxt").innerHTML="";mcalform.MSSQLSBSCount.value="";mcalform.MSSQLSBSCount.focus()}else{mcalform.reqMCALMSSQLSBS.value=mcalform.MSSQLSBSCount.value*mcal_mssql_sbs_bkp;document.getElementById("reqMCALMSSQLSBSTxt").innerHTML=mcalform.reqMCALMSSQLSBS.value}}if(chk==3){if(!isValidNumber(mcalform.MSSQLCount.value)&&mcalform.MSSQLCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALMSSQLTxt").innerHTML="";mcalform.MSSQLCount.value="";mcalform.MSSQLCount.focus()}else{mcalform.reqMCALMSSQL.value=mcalform.MSSQLCount.value*mcal_mssql_bkp;document.getElementById("reqMCALMSSQLTxt").innerHTML=mcalform.reqMCALMSSQL.value}}if(chk==9){if(!isValidNumber(mcalform.ExchangeBkpSBSCount.value)&&mcalform.ExchangeBkpSBSCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALExchangeSBSBkpTxt").innerHTML="";mcalform.ExchangeBkpSBSCount.value="";mcalform.ExchangeBkpSBSCount.focus()}else{mcalform.reqMCALExchangeSBSBkp.value=mcalform.ExchangeBkpSBSCount.value*mcal_exchange_sbs_bkp;document.getElementById("reqMCALExchangeSBSBkpTxt").innerHTML=mcalform.reqMCALExchangeSBSBkp.value}}if(chk==4){if(!isValidNumber(mcalform.ExchangeBkpCount.value)&&mcalform.ExchangeBkpCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALExchangeBkpTxt").innerHTML="";mcalform.ExchangeBkpCount.value="";mcalform.ExchangeBkpCount.focus()}else{mcalform.reqMCALExchangeBkp.value=mcalform.ExchangeBkpCount.value*mcal_exchange_bkp;document.getElementById("reqMCALExchangeBkpTxt").innerHTML=mcalform.reqMCALExchangeBkp.value}}if(chk==5){if(!isValidNumber(mcalform.ExchangeMailBoxBkpCount.value)&&mcalform.ExchangeMailBoxBkpCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALExchangeMailBoxBkpTxt").innerHTML="";mcalform.ExchangeMailBoxBkpCount.value="";mcalform.ExchangeMailBoxBkpCount.focus()}else{mcalform.reqMCALExchangeMailBoxBkp.value=mcalform.ExchangeMailBoxBkpCount.value*mcal_exchange_mailbox_bkp;document.getElementById("reqMCALExchangeMailBoxBkpTxt").innerHTML=mcalform.reqMCALExchangeMailBoxBkp.value}}if(chk==6){if(!isValidNumber(mcalform.MySQLBkpCount.value)&&mcalform.MySQLBkpCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALMySQLBkpTxt").innerHTML="";mcalform.MySQLBkpCount.value="";mcalform.MySQLBkpCount.focus()}else{mcalform.reqMCALMySQLBkp.value=mcalform.MySQLBkpCount.value*mcal_mysql_bkp;document.getElementById("reqMCALMySQLBkpTxt").innerHTML=mcalform.reqMCALMySQLBkp.value}}if(chk==10){if(!isValidNumber(mcalform.ImageBkpCount.value)&&mcalform.ImageBkpCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALImageBkpTxt").innerHTML="";mcalform.ImageBkpCount.value="";mcalform.ImageBkpCount.focus()}else{mcalform.reqMCALImageBkp.value=mcalform.ImageBkpCount.value*mcal_image_bkp;document.getElementById("reqMCALImageBkpTxt").innerHTML=mcalform.reqMCALImageBkp.value}}if(chk==11){if(!isValidNumber(mcalform.SharePointSBSCount.value)&&mcalform.SharePointSBSCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALSharePointSBSTxt").innerHTML="";mcalform.SharePointSBSCount.value="";mcalform.SharePointSBSCount.focus()}else{mcalform.reqMCALSharePointSBS.value=mcalform.SharePointSBSCount.value*sharepoint_sbs;document.getElementById("reqMCALSharePointSBSTxt").innerHTML=mcalform.reqMCALSharePointSBS.value}}if(chk==12){if(!isValidNumber(mcalform.SharePointNonSBSCount.value)&&mcalform.SharePointNonSBSCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALSharePointNonSBSTxt").innerHTML="";mcalform.SharePointNonSBSCount.value="";mcalform.SharePointNonSBSCount.focus()}else{mcalform.reqMCALSharePointNonSBS.value=mcalform.SharePointNonSBSCount.value*sharepoint_non_sbs;document.getElementById("reqMCALSharePointNonSBSTxt").innerHTML=mcalform.reqMCALSharePointNonSBS.value}}mcalform.ReqMCALPerMonth.value=(mcalform.DesktopOsCount.value*mcal_desktop_os)+(mcalform.ServerOsCount.value*mcal_server_os)+(mcalform.MSSQLCount.value*mcal_mssql_bkp)+(mcalform.ExchangeBkpCount.value*mcal_exchange_bkp)+(mcalform.ExchangeMailBoxBkpCount.value*mcal_exchange_mailbox_bkp)+(mcalform.MySQLBkpCount.value*mcal_mysql_bkp)+(mcalform.MSSQLSBSCount.value*mcal_mssql_sbs_bkp)+(mcalform.ExchangeBkpSBSCount.value*mcal_exchange_sbs_bkp)+(mcalform.ImageBkpCount.value*mcal_image_bkp)+(mcalform.SharePointSBSCount.value*sharepoint_sbs)+(mcalform.SharePointNonSBSCount.value*sharepoint_non_sbs);document.getElementById("ReqMCALPerMonthTxt").innerHTML=mcalform.ReqMCALPerMonth.value;if(chk==7){if(!isValidNumber(mcalform.totReqMCALCount.value)&&mcalform.totReqMCALCount.value.length!=0){alert("Please enter a number in this field");mcalform.totReqMCALCount.value="";mcalform.totReqMCALCount.focus()}else{if(mcalform.DesktopOsCount.value.length==0&&mcalform.ServerOsCount.value.length==0&&mcalform.MSSQLCount.value.length==0&&mcalform.ExchangeBkpCount.value.length==0&&mcalform.ExchangeMailBoxBkpCount.value.length==0&&mcalform.MySQLBkpCount.value.length==0&&mcalform.MSSQLSBSCount.value.length==0&&mcalform.ExchangeBkpSBSCount.value.length==0&&mcalform.ImageBkpCount.value.length==0&&mcalform.SharePointSBSCount.value.length==0&&mcalform.SharePointNonSBSCount.value.length==0){alert("Please tell us the usage before entering this field");mcalform.totReqMCALCount.value="";mcalform.totReqMCALCount.focus();chk=0}}}if(mcalform.totReqMCALCount.value!=0&&mcalform.totReqMCALCount.value!=""){mcalform.totReqMCAL.value=mcalform.totReqMCALCount.value*mcalform.ReqMCALPerMonth.value}else{mcalform.totReqMCAL.value=mcalform.ReqMCALPerMonth.value}document.getElementById("totReqMCALTxt").innerHTML=mcalform.totReqMCAL.value;mcalform.listPrice.value=mcal_list_price;document.getElementById("listPriceTxt").innerHTML="$ "+mcalform.listPrice.value;if(mcalform.totReqMCAL.value<mcal_limit1){mcalform.discountPercent.value=mcal_percent1;mcalform.discountPrice.value=mcal_price1;mcalform.brandingEligblity.value="No Branding"}if(mcalform.totReqMCAL.value>=mcal_limit1&&mcalform.totReqMCAL.value<=mcal_limit2){mcalform.discountPercent.value=mcal_percent1;mcalform.discountPrice.value=mcal_price1;mcalform.brandingEligblity.value="No Branding"}if(mcalform.totReqMCAL.value>=mcal_limit3&&mcalform.totReqMCAL.value<=mcal_limit4){mcalform.discountPercent.value=mcal_percent2;mcalform.discountPrice.value=mcal_price2;mcalform.brandingEligblity.value="Basic Branding"}if(mcalform.totReqMCAL.value>=mcal_limit5&&mcalform.totReqMCAL.value<=mcal_limit6){mcalform.discountPercent.value=mcal_percent3;mcalform.discountPrice.value=mcal_price3;mcalform.brandingEligblity.value="Basic Branding"}if(mcalform.totReqMCAL.value>=mcal_limit7&&mcalform.totReqMCAL.value<=mcal_limit8){mcalform.discountPercent.value=mcal_percent4;mcalform.discountPrice.value=mcal_price4;mcalform.brandingEligblity.value="Advanced Branding"}if(mcalform.totReqMCAL.value>=mcal_limit9&&mcalform.totReqMCAL.value<=mcal_limit10){mcalform.discountPercent.value=mcal_percent5;mcalform.discountPrice.value=mcal_price5;mcalform.brandingEligblity.value="Advanced Branding"}if(mcalform.totReqMCAL.value>=mcal_limit11&&mcalform.totReqMCAL.value<=mcal_limit12){mcalform.discountPercent.value=mcal_percent6;mcalform.discountPrice.value=mcal_price6;mcalform.brandingEligblity.value="Rebranding"}if(mcalform.totReqMCAL.value>=mcal_limit13&&mcalform.totReqMCAL.value<=mcal_limit14){mcalform.discountPercent.value=mcal_percent7;mcalform.discountPrice.value=mcal_price7;mcalform.brandingEligblity.value="Rebranding"}if(mcalform.totReqMCAL.value>=mcal_limit15){mcalform.discountPercent.value="Call Us";mcalform.discountPrice.value="";mcalform.brandingEligblity.value="Rebranding"}mcalform.totalCost.value=Math.round(mcalform.totReqMCAL.value*mcalform.discountPrice.value);document.getElementById("discountPercentTxt").innerHTML=mcalform.discountPercent.value;document.getElementById("discountPriceTxt").innerHTML="$ "+mcalform.discountPrice.value;document.getElementById("brandingEligblityTxt").innerHTML=mcalform.brandingEligblity.value;document.getElementById("totalCostTxt").innerHTML="$ "+mcalform.totalCost.value;var mcalPurchaseform=document.mcalPurchase;mcalPurchaseform.quantity1.value=mcalform.totReqMCAL.value;mcalPurchaseValidation(1);if(chk==0){document.getElementById("reqMCALDesktopOsTxt").innerHTML="";document.getElementById("reqMCALServerOsTxt").innerHTML="";document.getElementById("reqMCALMSSQLSBSTxt").innerHTML="";document.getElementById("reqMCALMSSQLTxt").innerHTML="";document.getElementById("reqMCALExchangeSBSBkpTxt").innerHTML="";document.getElementById("reqMCALExchangeBkpTxt").innerHTML="";document.getElementById("reqMCALExchangeMailBoxBkpTxt").innerHTML="";document.getElementById("reqMCALMySQLBkpTxt").innerHTML="";document.getElementById("ReqMCALPerMonthTxt").innerHTML="";document.getElementById("totReqMCALTxt").innerHTML="";document.getElementById("listPriceTxt").innerHTML="";document.getElementById("discountPercentTxt").innerHTML="";document.getElementById("discountPriceTxt").innerHTML="";document.getElementById("brandingEligblityTxt").innerHTML="";document.getElementById("totalCostTxt").innerHTML="";document.getElementById("reqMCALImageBkpTxt").innerHTML="";document.getElementById("reqMCALSharePointSBSTxt").innerHTML="";document.getElementById("reqMCALSharePointNonSBSTxt").innerHTML=""}}function mcalPurchaseValidation(chk){var mcalPurchaseform=document.mcalPurchase;var mcalform=document.mcal;var mcal_limit1=parseInt(mcalform.txtMCALLimit1.value);var mcal_limit2=parseInt(mcalform.txtMCALLimit2.value);var mcal_limit3=parseInt(mcalform.txtMCALLimit3.value);var mcal_limit4=parseInt(mcalform.txtMCALLimit4.value);var mcal_limit5=parseInt(mcalform.txtMCALLimit5.value);var mcal_limit6=parseInt(mcalform.txtMCALLimit6.value);var mcal_limit7=parseInt(mcalform.txtMCALLimit7.value);var mcal_limit8=parseInt(mcalform.txtMCALLimit8.value);var mcal_limit9=parseInt(mcalform.txtMCALLimit9.value);var mcal_limit10=parseInt(mcalform.txtMCALLimit10.value);var mcal_limit11=parseInt(mcalform.txtMCALLimit11.value);var mcal_limit12=parseInt(mcalform.txtMCALLimit12.value);var mcal_limit13=parseInt(mcalform.txtMCALLimit13.value);var mcal_limit14=parseInt(mcalform.txtMCALLimit14.value);var mcal_limit15=parseInt(mcalform.txtMCALLimit15.value);document.getElementById("mcalBrandingOptionRow").style.display="none";document.getElementById("mcalBridgeCountRow").style.display="none";document.getElementById("mcalBridgeCostRow").style.display="none";if(chk==1){if(!isValidNumber(mcalPurchaseform.quantity1.value)&&mcalPurchaseform.quantity1.value.length!=0){alert("Please enter a number in this field");mcalPurchaseform.quantity1.value="";mcalPurchaseform.quantity1.value.focus()}else{if(mcalPurchaseform.quantity1.value<mcal_limit1){mcalPurchaseform.PurchaseBrandEligibility.value="No Branding";document.getElementById("mcalBrandingOptionRow").style.display="none";document.getElementById("mcalBridgeCountRow").style.display="none";document.getElementById("mcalBridgeCostRow").style.display="none";mcalPurchaseform.quantity2.value=0}if(mcalPurchaseform.quantity1.value>=mcal_limit1&&mcalPurchaseform.quantity1.value<=mcal_limit2){mcalPurchaseform.PurchaseBrandEligibility.value="No Branding";document.getElementById("mcalBrandingOptionRow").style.display="none";document.getElementById("mcalBridgeCountRow").style.display="none";document.getElementById("mcalBridgeCostRow").style.display="none";mcalPurchaseform.quantity2.value=0}if(mcalPurchaseform.quantity1.value>=mcal_limit3&&mcalPurchaseform.quantity1.value<=mcal_limit4){mcalPurchaseform.PurchaseBrandEligibility.value="Basic Branding";document.getElementById("mcalBrandingOptionRow").style.display="";document.getElementById("mcalBridgeCountRow").style.display="";document.getElementById("mcalBridgeCostRow").style.display="";createBridgeOption(2,"upgradeslot")}if(mcalPurchaseform.quantity1.value>=mcal_limit5&&mcalPurchaseform.quantity1.value<=mcal_limit6){mcalPurchaseform.PurchaseBrandEligibility.value="Basic Branding";document.getElementById("mcalBrandingOptionRow").style.display="";document.getElementById("mcalBridgeCountRow").style.display="";document.getElementById("mcalBridgeCostRow").style.display="";createBridgeOption(2,"upgradeslot")}if(mcalPurchaseform.quantity1.value>=mcal_limit7&&mcalPurchaseform.quantity1.value<=mcal_limit8){mcalPurchaseform.PurchaseBrandEligibility.value="Advanced Branding";document.getElementById("mcalBrandingOptionRow").style.display="";document.getElementById("mcalBridgeCountRow").style.display="";document.getElementById("mcalBridgeCostRow").style.display="";createBridgeOption(3,"upgradeslot")}if(mcalPurchaseform.quantity1.value>=mcal_limit9&&mcalPurchaseform.quantity1.value<=mcal_limit10){mcalPurchaseform.PurchaseBrandEligibility.value="Advanced Branding";document.getElementById("mcalBrandingOptionRow").style.display="";document.getElementById("mcalBridgeCountRow").style.display="";document.getElementById("mcalBridgeCostRow").style.display="";createBridgeOption(3,"upgradeslot")}if(mcalPurchaseform.quantity1.value>=mcal_limit11&&mcalPurchaseform.quantity1.value<=mcal_limit12){mcalPurchaseform.PurchaseBrandEligibility.value="Rebranding";document.getElementById("mcalBrandingOptionRow").style.display="none";document.getElementById("mcalBridgeCountRow").style.display="none";document.getElementById("mcalBridgeCostRow").style.display="none";mcalPurchaseform.quantity2.value=0}if(mcalPurchaseform.quantity1.value>=mcal_limit13&&mcalPurchaseform.quantity1.value<=mcal_limit14){mcalPurchaseform.PurchaseBrandEligibility.value="Rebranding";document.getElementById("mcalBrandingOptionRow").style.display="none";document.getElementById("mcalBridgeCountRow").style.display="none";document.getElementById("mcalBridgeCostRow").style.display="none";mcalPurchaseform.quantity2.value=0}if(mcalPurchaseform.quantity1.value>=mcal_limit15){mcalPurchaseform.PurchaseBrandEligibility.value="Rebranding";document.getElementById("mcalBrandingOptionRow").style.display="none";document.getElementById("mcalBridgeCountRow").style.display="none";document.getElementById("mcalBridgeCostRow").style.display="none";mcalPurchaseform.quantity2.value=0}document.getElementById("PurchaseBrandEligibilityTxt").innerHTML=mcalPurchaseform.PurchaseBrandEligibility.value}}if(chk==2){document.getElementById("mcalBrandingOptionRow").style.display="";document.getElementById("mcalBridgeCountRow").style.display="";document.getElementById("mcalBridgeCostRow").style.display="";mcalPurchaseform.quantity2.value=mcalPurchaseform.upgradeslot.value;mcalPurchaseform.PurchaseBridgeFeeCost.value=mcalPurchaseform.upgradeslot.value*500;document.getElementById("PurchaseBridgeFeeTxt").innerHTML=mcalPurchaseform.quantity2.value;document.getElementById("PurchaseBridgeFeeCostTxt").innerHTML="$ "+mcalPurchaseform.PurchaseBridgeFeeCost.value}if(chk==3){if(mcalPurchaseform.quantity1.value<mcal_limit1){alert("Please purchase MCAL above "+mcal_limit1);mcalPurchaseform.quantity1.focus();return false}if(mcalPurchaseform.quantity2.value!=""&&mcalPurchaseform.quantity2.value>0){mcalPurchaseform.qt.value=mcalPurchaseform.quantity1.value+":"+mcalPurchaseform.quantity2.value;mcalPurchaseform.cd.value=mcalPurchaseform.contractId1.value+":"+mcalPurchaseform.contractId2.value;mcalPurchaseform.noc.value=2;mcalPurchaseform.pd.value=8}else{mcalPurchaseform.qt.value=mcalPurchaseform.quantity1.value;mcalPurchaseform.cd.value=mcalPurchaseform.contractId1.value;mcalPurchaseform.noc.value=1;mcalPurchaseform.pd.value=8}}if(chk==4){mcal_limit1=500;if(mcalPurchaseform.quantity1.value<mcal_limit1){alert("Please enter MCAL above "+mcal_limit1);mcalPurchaseform.quantity1.focus();return false}if(mcalPurchaseform.quantity2.value!=""&&mcalPurchaseform.quantity2.value>0){mcalPurchaseform.qt.value=mcalPurchaseform.quantity2.value;mcalPurchaseform.cd.value=mcalPurchaseform.contractId2.value;mcalPurchaseform.noc.value=1;mcalPurchaseform.pd.value=8}else{mcalPurchaseform.quantity1.value="";mcalPurchaseform.quantity1.focus();document.getElementById("PurchaseBrandEligibilityTxt").innerHTML="";return false}mcalPurchaseform.quantity1.value="";document.getElementById("PurchaseBrandEligibilityTxt").innerHTML=""}}function createBridgeOption(num,id){var eleCont=document.getElementById(id);var i;for(i=eleCont.options.length-1;i>=1;i--){eleCont.remove(i)}if(num==1){option=document.createElement("option");option.setAttribute("value","2");option.innerHTML="Advanced Cobranding";eleCont.appendChild(option);option=document.createElement("option");option.setAttribute("value","3");option.innerHTML="Rebranding";eleCont.appendChild(option)}if(num==2){option=document.createElement("option");option.setAttribute("value","1");option.innerHTML="Advanced Cobranding";eleCont.appendChild(option);option=document.createElement("option");option.setAttribute("value","2");option.innerHTML="Rebranding";eleCont.appendChild(option)}if(num==3){option=document.createElement("option");option.setAttribute("value","1");option.innerHTML="Rebranding";eleCont.appendChild(option)}}function resForm(){var i;for(i=0;(i<document.forms.length);i++){document.forms[i].reset()}}function MCALProCalculator(chk){var mcalform=document.mcal;var mcal_desktop_os=mcalform.txtMCALDesktop.value;var mcal_server_os=mcalform.txtMCALServer.value;var mcal_mssql_bkp=mcalform.txtMCALMSSQL.value;var mcal_exchange_bkp=mcalform.txtMCALExchangeBkp.value;var mcal_exchange_mailbox_bkp=mcalform.txtMCALExchangeMailBoxBkp.value;var mcal_mysql_bkp=mcalform.txtMCALMySQLBkp.value;var mcal_mssql_sbs_bkp=mcalform.txtMCALMSSQLSBS.value;var mcal_exchange_sbs_bkp=mcalform.txtMCALExchangeSBSBkp.value;var mcal_image_bkp=mcalform.txtMCALImageBkp.value;var sharepoint_sbs=mcalform.txtMCALSharePointSBSBkp.value;var sharepoint_non_sbs=mcalform.txtMCALSharePointNonSBSBkp.value;var mcal_list_price=mcalform.txtMCALListPrice.value;if(chk==1){if(!isValidNumber(mcalform.DesktopOsCount.value)&&mcalform.DesktopOsCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALDesktopOsTxt").innerHTML="";mcalform.DesktopOsCount.value="";mcalform.DesktopOsCount.focus()}else{mcalform.reqMCALDesktopOs.value=mcalform.DesktopOsCount.value*mcal_desktop_os;document.getElementById("reqMCALDesktopOsTxt").innerHTML=mcalform.reqMCALDesktopOs.value}}if(chk==2){if(!isValidNumber(mcalform.ServerOsCount.value)&&mcalform.ServerOsCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALServerOsTxt").innerHTML="";mcalform.ServerOsCount.value="";mcalform.ServerOsCount.focus()}else{mcalform.reqMCALServerOs.value=mcalform.ServerOsCount.value*mcal_server_os;document.getElementById("reqMCALServerOsTxt").innerHTML=mcalform.reqMCALServerOs.value}}if(chk==8){if(!isValidNumber(mcalform.MSSQLSBSCount.value)&&mcalform.MSSQLSBSCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALMSSQLSBSTxt").innerHTML="";mcalform.MSSQLSBSCount.value="";mcalform.MSSQLSBSCount.focus()}else{mcalform.reqMCALMSSQLSBS.value=mcalform.MSSQLSBSCount.value*mcal_mssql_sbs_bkp;document.getElementById("reqMCALMSSQLSBSTxt").innerHTML=mcalform.reqMCALMSSQLSBS.value}}if(chk==3){if(!isValidNumber(mcalform.MSSQLCount.value)&&mcalform.MSSQLCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALMSSQLTxt").innerHTML="";mcalform.MSSQLCount.value="";mcalform.MSSQLCount.focus()}else{mcalform.reqMCALMSSQL.value=mcalform.MSSQLCount.value*mcal_mssql_bkp;document.getElementById("reqMCALMSSQLTxt").innerHTML=mcalform.reqMCALMSSQL.value}}if(chk==9){if(!isValidNumber(mcalform.ExchangeBkpSBSCount.value)&&mcalform.ExchangeBkpSBSCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALExchangeSBSBkpTxt").innerHTML="";mcalform.ExchangeBkpSBSCount.value="";mcalform.ExchangeBkpSBSCount.focus()}else{mcalform.reqMCALExchangeSBSBkp.value=mcalform.ExchangeBkpSBSCount.value*mcal_exchange_sbs_bkp;document.getElementById("reqMCALExchangeSBSBkpTxt").innerHTML=mcalform.reqMCALExchangeSBSBkp.value}}if(chk==4){if(!isValidNumber(mcalform.ExchangeBkpCount.value)&&mcalform.ExchangeBkpCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALExchangeBkpTxt").innerHTML="";mcalform.ExchangeBkpCount.value="";mcalform.ExchangeBkpCount.focus()}else{mcalform.reqMCALExchangeBkp.value=mcalform.ExchangeBkpCount.value*mcal_exchange_bkp;document.getElementById("reqMCALExchangeBkpTxt").innerHTML=mcalform.reqMCALExchangeBkp.value}}if(chk==5){if(!isValidNumber(mcalform.ExchangeMailBoxBkpCount.value)&&mcalform.ExchangeMailBoxBkpCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALExchangeMailBoxBkpTxt").innerHTML="";mcalform.ExchangeMailBoxBkpCount.value="";mcalform.ExchangeMailBoxBkpCount.focus()}else{mcalform.reqMCALExchangeMailBoxBkp.value=mcalform.ExchangeMailBoxBkpCount.value*mcal_exchange_mailbox_bkp;document.getElementById("reqMCALExchangeMailBoxBkpTxt").innerHTML=mcalform.reqMCALExchangeMailBoxBkp.value}}if(chk==6){if(!isValidNumber(mcalform.MySQLBkpCount.value)&&mcalform.MySQLBkpCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALMySQLBkpTxt").innerHTML="";mcalform.MySQLBkpCount.value="";mcalform.MySQLBkpCount.focus()}else{mcalform.reqMCALMySQLBkp.value=mcalform.MySQLBkpCount.value*mcal_mysql_bkp;document.getElementById("reqMCALMySQLBkpTxt").innerHTML=mcalform.reqMCALMySQLBkp.value}}if(chk==10){if(!isValidNumber(mcalform.ImageBkpCount.value)&&mcalform.ImageBkpCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALImageBkpTxt").innerHTML="";mcalform.ImageBkpCount.value="";mcalform.ImageBkpCount.focus()}else{mcalform.reqMCALImageBkp.value=mcalform.ImageBkpCount.value*mcal_image_bkp;document.getElementById("reqMCALImageBkpTxt").innerHTML=mcalform.reqMCALImageBkp.value}}if(chk==11){if(!isValidNumber(mcalform.SharePointSBSCount.value)&&mcalform.SharePointSBSCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALSharePointSBSTxt").innerHTML="";mcalform.SharePointSBSCount.value="";mcalform.SharePointSBSCount.focus()}else{mcalform.reqMCALSharePointSBS.value=mcalform.SharePointSBSCount.value*sharepoint_sbs;document.getElementById("reqMCALSharePointSBSTxt").innerHTML=mcalform.reqMCALSharePointSBS.value}}if(chk==12){if(!isValidNumber(mcalform.SharePointNonSBSCount.value)&&mcalform.SharePointNonSBSCount.value.length!=0){alert("Please enter a number in this field");document.getElementById("reqMCALSharePointNonSBSTxt").innerHTML="";mcalform.SharePointNonSBSCount.value="";mcalform.SharePointNonSBSCount.focus()}else{mcalform.reqMCALSharePointNonSBS.value=mcalform.SharePointNonSBSCount.value*sharepoint_non_sbs;document.getElementById("reqMCALSharePointNonSBSTxt").innerHTML=mcalform.reqMCALSharePointNonSBS.value}}mcalform.ReqMCALPerMonth.value=(mcalform.DesktopOsCount.value*mcal_desktop_os)+(mcalform.ServerOsCount.value*mcal_server_os)+(mcalform.MSSQLCount.value*mcal_mssql_bkp)+(mcalform.ExchangeBkpCount.value*mcal_exchange_bkp)+(mcalform.ExchangeMailBoxBkpCount.value*mcal_exchange_mailbox_bkp)+(mcalform.MySQLBkpCount.value*mcal_mysql_bkp)+(mcalform.MSSQLSBSCount.value*mcal_mssql_sbs_bkp)+(mcalform.ExchangeBkpSBSCount.value*mcal_exchange_sbs_bkp)+(mcalform.ImageBkpCount.value*mcal_image_bkp)+(mcalform.SharePointSBSCount.value*sharepoint_sbs)+(mcalform.SharePointNonSBSCount.value*sharepoint_non_sbs);document.getElementById("ReqMCALPerMonthTxt").innerHTML=mcalform.ReqMCALPerMonth.value;if(chk==7){if(!isValidNumber(mcalform.totReqMCALCount.value)&&mcalform.totReqMCALCount.value.length!=0){alert("Please enter a number in this field");mcalform.totReqMCALCount.value="";mcalform.totReqMCALCount.focus()}else{if(mcalform.DesktopOsCount.value.length==0&&mcalform.ServerOsCount.value.length==0&&mcalform.MSSQLCount.value.length==0&&mcalform.ExchangeBkpCount.value.length==0&&mcalform.ExchangeMailBoxBkpCount.value.length==0&&mcalform.MySQLBkpCount.value.length==0&&mcalform.MSSQLSBSCount.value.length==0&&mcalform.ExchangeBkpSBSCount.value.length==0&&mcalform.ImageBkpCount.value.length==0&&mcalform.SharePointSBSCount.value.length==0&&mcalform.SharePointNonSBSCount.value.length==0){alert("Please tell us the usage before entering this field");mcalform.totReqMCALCount.value="";mcalform.totReqMCALCount.focus();chk=0}}}if(mcalform.totReqMCALCount.value!=0&&mcalform.totReqMCALCount.value!=""){mcalform.totReqMCAL.value=mcalform.totReqMCALCount.value*mcalform.ReqMCALPerMonth.value}else{mcalform.totReqMCAL.value=mcalform.ReqMCALPerMonth.value}document.getElementById("totReqMCALTxt").innerHTML=mcalform.totReqMCAL.value;mcalform.listPrice.value=mcal_list_price;document.getElementById("listPriceTxt").innerHTML="$ "+mcalform.listPrice.value;mcalform.totalCost.value=Math.round(mcalform.totReqMCAL.value*mcalform.listPrice.value);document.getElementById("totalCostTxt").innerHTML="$ "+mcalform.totalCost.value;var mcalPurchaseform=document.mcalPurchase;mcalPurchaseform.quantity.value=mcalform.totReqMCAL.value;MCALProPurchaseValidation(1);if(chk==0){document.getElementById("reqMCALDesktopOsTxt").innerHTML="";document.getElementById("reqMCALServerOsTxt").innerHTML="";document.getElementById("reqMCALMSSQLSBSTxt").innerHTML="";document.getElementById("reqMCALMSSQLTxt").innerHTML="";document.getElementById("reqMCALExchangeSBSBkpTxt").innerHTML="";document.getElementById("reqMCALExchangeBkpTxt").innerHTML="";document.getElementById("reqMCALExchangeMailBoxBkpTxt").innerHTML="";document.getElementById("reqMCALMySQLBkpTxt").innerHTML="";document.getElementById("ReqMCALPerMonthTxt").innerHTML="";document.getElementById("totReqMCALTxt").innerHTML="";document.getElementById("listPriceTxt").innerHTML="";document.getElementById("totalCostTxt").innerHTML="";document.getElementById("reqMCALImageBkpTxt").innerHTML="";document.getElementById("reqMCALSharePointSBSTxt").innerHTML="";document.getElementById("reqMCALSharePointNonSBSTxt").innerHTML=""}}function MCALProPurchaseValidation(chk){var mcalPurchaseform=document.mcalPurchase;var mcalDirectPurchaseform=document.directpurchaseorder;var mcalform=document.mcal;var mcal_limit=parseInt(mcalform.txtMCALLimit.value);if(chk==1){if(!isValidNumber(mcalPurchaseform.quantity.value)&&mcalPurchaseform.quantity.value.length!=0){alert("Please enter a number in this field");mcalPurchaseform.quantity.value="";mcalPurchaseform.quantity.focus();return false}}if(chk==2){if(!isValidNumber(mcalDirectPurchaseform.qt.value)&&mcalDirectPurchaseform.qt.value.length!=0){alert("Please enter a number in this field");mcalDirectPurchaseform.qt.value="";mcalDirectPurchaseform.qt.focus();return false}if(mcalDirectPurchaseform.qt.value<mcal_limit){alert("Please purchase MCAL above "+mcal_limit);mcalDirectPurchaseform.qt.focus();return false}}if(chk==3){if(mcalPurchaseform.quantity.value<mcal_limit){alert("Please purchase MCAL above "+mcal_limit);mcalPurchaseform.quantity.focus();return false}if(mcalPurchaseform.quantity.value!=""&&mcalPurchaseform.quantity.value>0){mcalPurchaseform.qt.value=mcalPurchaseform.quantity.value}}};