function addpaymentamounts(){
	newitems="<div style='float:left;'>";
	newitems+="<div class='section_heading'>Package Information: </div><span class='required'>(Must select one.)</span><br />";

	newitems+="<label class='frm_label' for='packagetype1'>MyWebDental Classic</label>";
	newitems+="<input type='radio' id='packagetype1' value='packagetype1' name='packagetype' checked='checked' />";
	newitems+="<label for='packagetype1'>$599 + $35 monthly hosting</label><br />";

	newitems+="<label class='frm_label' for='packagetype2'>MyWebDental Premium</label>";
	newitems+="<input type='radio' id='packagetype2' value='packagetype2' name='packagetype' />";
	newitems+="<label for='packagetype2'>$999 + $35 monthly hosting</label><br />";

	newitems+="<label class='frm_label' for='packagetype3'>MyWebDental Signature</label>";
	newitems+="<input type='radio' id='packagetype3' value='packagetype3' name='packagetype' />";
	newitems+="<label for='packagetype3'>$4,999 + $35 monthly hosting</label><br />";

	newitems+="<div class='section_heading'>Monthly Extras: </div><br />";

	newitems+="<label class='frm_label' for='webstats'>Webstats Analytics</label>";
	newitems+="<input type='checkbox' id='webstats' value='2' name='webstats' />";
	newitems+="<label for='webstats'>$5 per month</label><br />";

	newitems+="<label class='frm_label' for='searchengine'>Search Engine Submission</label>";
	newitems+="<input type='checkbox' id='searchengine' value='2' name='searchengine' />";
	newitems+="<label for='searchengine'>$5 per month + $20 setup fee</label><br />";

	newitems+="<label class='frm_label' for='searchengine2'>Search Engine Optimization</label>";
	newitems+="<input type='checkbox' id='searchengine2' value='2' name='searchengine2' />";
	newitems+="<label for='searchengine2'>$499 per month</label><br />";

	newitems+="<div class='section_heading'>Add-ons: </div><br />";

	newitems+="<label class='frm_label' for='facebook'>Facebook Fan Page Creation</label>";
	newitems+="<input type='checkbox' id='facebook' value='facebook' name='facebook' />";
	newitems+="<label for='facebook'>$300</label><br />";

	newitems+="<label class='frm_label' for='twitter'>Twitter Account Creation</label>";
	newitems+="<input type='checkbox' id='twitter' value='twitter' name='twitter' />";
	newitems+="<label for='twitter'>$300</label><br />";

	newitems+="<br><br><br><span style='margin-left:100px; position: relative; top:-5px;'> --- </span><br />";

	newitems+="<label class='frm_label' for='domainsuggestion'>Domain preference</label>";
	newitems+="<input type='text' style='width:200px;' id='domainsuggestion' value='www.' name='domainsuggestion' /><br />";

	newitems+="</div>";
	newitems+="<div style='float:left; margin-left: 100px;'>";
	newitems+="<div class='section_heading'>Interface Style: </div><span class='required'>(Must select one.)</span><br />";

	newitems+="<select id='interfacestyle' name='interfacestyle'>";
	newitems+="<option value='-1'>- Please Select an Interface -</option>";
	newitems+="<option value='site1'>Slate Blue</option>";
	newitems+="<option value='site2'>Moss Green</option>";
	newitems+="<option value='site3'>Sunset Orange</option>";
	newitems+="<option value='site4'>Burnt Sienna</option>";
	newitems+="<option value='site5'>Mountain Shadow</option>";
	newitems+="<option value='customskin'>$1,500 - Custom Skin</option>";
	newitems+="</select><br />";

	newitems+="<div class='section_heading'>Logo: </div><span class='required'>(Must select one.)</span><br />";

	newitems+="<select id='logotype' name='logotype'>";
	newitems+="<option value='-1'>- Please Select a Logo Option -</option>";
	newitems+="<option value='logo0'>$0 - Send existing logo</option>";
	newitems+="<option value='logo50'>$50 - Create text logo</option>";
	newitems+="<option value='logo500'>$500 - Create designed logo</option>";
	newitems+="</select><br />";

	newitems+="<div class='section_heading'>Plug-ins: </div><br />";

	newitems+="<div id='pluginareamsg'>Plug-ins are not available in the Classic package.</div>";
	newitems+="<div id='pluginarea'>";

	newitems+="<div id='pluginblog-area1'><label class='frm_label' for='pluginblog'>Blog</label>";
	newitems+="<input type='checkbox' id='pluginblog' value='pluginblog' name='pluginblog' />";
	newitems+="<label for='pluginblog'>$100</label><br /></div>";
	newitems+="<div id='pluginblog-area2' style='display:none;'><label class='frm_label disabled'>Blog</label>";
	newitems+="<input type='checkbox' checked='checked' disabled=disabled />";
	newitems+="<label>included</label><br /></div>";

	newitems+="<div id='pluginrefer-area1'><label class='frm_label' for='pluginrefer'>Refer-a-Friend</label>";
	newitems+="<input type='checkbox' id='pluginrefer' value='pluginrefer' name='pluginrefer' />";
	newitems+="<label for='pluginrefer'>$100</label><br /></div>";
	newitems+="<div id='pluginrefer-area2' style='display:none;'><label class='frm_label disabled'>Refer-a-Friend</label>";
	newitems+="<input type='checkbox' checked='checked' disabled=disabled />";
	newitems+="<label>included</label><br /></div>";

	newitems+="<div id='pluginnewsltr-area1'><label class='frm_label' for='pluginnewsltr'>Newsletter</label>";
	newitems+="<input type='checkbox' id='pluginnewsltr' value='pluginnewsltr' name='pluginnewsltr' />";
	newitems+="<label for='pluginnewsltr'>$300</label><br /></div>";
	newitems+="<div id='pluginnewsltr-area2' style='display:none;'><label class='frm_label disabled'>Newsletter</label>";
	newitems+="<input type='checkbox' checked='checked' disabled=disabled />";
	newitems+="<label>included</label><br /></div>";

	newitems+="<div id='plugincoupon-area1'><label class='frm_label' for='plugincoupon'>Coupon Generator</label>";
	newitems+="<input type='checkbox' id='plugincoupon' value='plugincoupon' name='plugincoupon' />";
	newitems+="<label for='plugincoupon'>$600</label><br /></div>";
	newitems+="<div id='plugincoupon-area2' style='display:none;'><label class='frm_label disabled'>Coupon Generator</label>";
	newitems+="<input type='checkbox' checked='checked' disabled=disabled />";
	newitems+="<label>included</label><br /></div>";

	newitems+="<label class='frm_label' for='pluginnews'>News</label>";
	newitems+="<input type='checkbox' id='pluginnews' value='pluginnews' name='pluginnews' />";
	newitems+="<label for='pluginnews'>$300</label><br />";

	newitems+="<label class='frm_label' for='pluginevent'>Events</label>";
	newitems+="<input type='checkbox' id='pluginevent' value='pluginevent' name='pluginevent' />";
	newitems+="<label for='pluginevent'>$300</label><br />";

	newitems+="<label class='frm_label' for='plugindocs'>Documents</label>";
	newitems+="<input type='checkbox' id='plugindocs' value='plugindocs' name='plugindocs' />";
	newitems+="<label for='plugindocs'>$300</label><br />";

	newitems+="<label class='frm_label' for='pluginsurvey'>Survey</label>";
	newitems+="<input type='checkbox' id='pluginsurvey' value='pluginsurvey' name='pluginsurvey' />";
	newitems+="<label for='pluginsurvey'>$300</label><br />";

	newitems+="</div>";

	newitems+="<span style='margin-left:100px; position: relative; top:-5px;'> --- </span><br />";

	newitems+="<label class='frm_label' for='TOA'>Terms of Agreement</a></label>";
	newitems+="<input type='checkbox' id='TOA' value='2' name='TOA' />";
	newitems+="<label for='TOA'>I Accept the </label><a href='http://www.digital-ranch.com/tdr_osa.pdf' target='_blank'>Terms of Agreement</a><br/><br/>";

	newitems+="</div>";
	newitems+="<br style='clear:left;' /><hr />";

	$j('#paymentcalc').html(newitems);

	retrieve_field(document.getElementsByName('packagetype'));
	$j('#paymentcalc input, #paymentcalc select').each(function(){if(this.type=='radio' || this.disabled==true){return true;}retrieve_field(this);});
	$j('#paymentcalc input, #paymentcalc select').click(function(){recalc()}).change(function(){recalc()});
	recalc();
}
function recalc(){
	total=document.getElementById('_amountTxt');
	comments=document.getElementById('_commentsTxt');
	nextbtn=document.getElementById('submitBtn');
	subtotal=0;
	monthly=0;
	commentstring='';
	agreedstring='';
	if($j("#packagetype1:checked").size()==1){
		subtotal+=599; monthly+=35; commentstring+='Classic:';
		//$j('#pluginarea input').attr('checked', false);
		$j('#pluginarea').hide();
		$j('#pluginareamsg').show();
	}
	if($j("#packagetype2:checked").size()==1){
		subtotal+=999; monthly+=35; commentstring+='Premium:';
		$j('#pluginarea').show();
		$j('#pluginareamsg').hide();
		$j('#pluginblog-area1').show();
		$j('#pluginblog-area2').hide();
		$j('#pluginrefer-area1').hide();
		$j('#pluginrefer-area2').show();
		$j('#pluginnewsltr-area1').show();
		$j('#pluginnewsltr-area2').hide();
		$j('#plugincoupon-area1').show();
		$j('#plugincoupon-area2').hide();
	}
	if($j("#packagetype3:checked").size()==1){
		subtotal+=4999; monthly+=35; commentstring+='Signature:';
		$j('#pluginarea').show();
		$j('#pluginareamsg').hide();
		if($j('#interfacestyle').val()!="custom"){
			$j('#interfacestyle').html("<option value='custom'>$0 - Custom Skin</option>");
		}
		if($j('#logotype').val()!="custom"){
			$j('#logotype').html("<option value='customlogo'>$0 - Create designed logo</option>");
		}
		$j('#pluginblog-area1').hide();
		$j('#pluginblog-area2').show();
		$j('#pluginrefer-area1').hide();
		$j('#pluginrefer-area2').show();
		$j('#pluginnewsltr-area1').hide();
		$j('#pluginnewsltr-area2').show();
		$j('#plugincoupon-area1').hide();
		$j('#plugincoupon-area2').show();
	}else{
		if($j('#interfacestyle').val()=="custom"){
			$j('#interfacestyle').html("<option value='-1'>- Please Select an Interface -</option><option value='site1'>Slate Blue</option><option value='site2'>Moss Green</option><option value='site3'>Sunset Orange</option><option value='site4'>Burnt Sienna</option><option value='site5'>Mountain Shadow</option><option value='customskin'>$1,500 - Custom Skin</option>");
		}
		if($j('#logotype').val()=="customlogo"){
			$j('#logotype').html("<option value='-1'>- Please Select a Logo Option -</option><option value='logo0'>$0 - Send existing logo</option><option value='logo50'>$50 - Create text logo</option><option value='logo500'>$500 - Create designed logo</option>");
		}
	}
	commentstring+= $j('#interfacestyle').val() + '|-';
	if($j('#interfacestyle').val()=="customskin"){subtotal+=1500;}
	commentstring+= $j('#logotype').val() + '|-';
	switch($j('#logotype').val()){
		case 'logo0': subtotal+=0; break;
		case 'logo50': subtotal+=50; break;
		case 'logo500': subtotal+=500; break;
	}
	if($j("#webstats:checked").size()==1){                     monthly+=5;   commentstring+='Webstats|-';}
	if($j("#searchengine:checked").size()==1){  subtotal+=20;  monthly+=5;   commentstring+='SE Submit|-';}
	if($j("#searchengine2:checked").size()==1){                monthly+=499; commentstring+='SEO|-';}
	if($j("#facebook:checked").size()==1){      subtotal+=300;               commentstring+='facebook|-';}
	if($j("#twitter:checked").size()==1){       subtotal+=300;               commentstring+='twitter|-';}
	
	if($j("#packagetype1:checked").size()==0){
		if($j("#pluginblog:checked").size()==1){
			if($j("#packagetype3:checked").size()==0){ subtotal+=100; commentstring+='pblog|-';}
		}
		if($j("#pluginnewsltr:checked").size()==1){
			if($j("#packagetype3:checked").size()==0){ subtotal+=300; commentstring+='pnewsltr|-';}
		}
		if($j("#plugincoupon:checked").size()==1){
			if($j("#packagetype3:checked").size()==0){ subtotal+=600; commentstring+='pcoupon|-';}
		}
		if($j("#pluginnews:checked").size()==1){    subtotal+=300;               commentstring+='pnews|-';}
		if($j("#pluginevent:checked").size()==1){   subtotal+=300;               commentstring+='pevent|-';}
		if($j("#plugindocs:checked").size()==1){    subtotal+=300;               commentstring+='pdocs|-';}
		if($j("#pluginsurvey:checked").size()==1){  subtotal+=300;               commentstring+='psurvey|-';}
	}
	
	if($j('#interfacestyle').val()==-1 || $j('#logotype').val()==-1){
		nextbtn.disabled=true;
		nextbtn.value='Must select required fields';
		nextbtn.style.width='175px';
	}else{
		nextbtn.disabled=false;
		nextbtn.value='Next -->';
		nextbtn.style.width='100px';
	}
	toa=document.getElementById('TOA');
		if(toa.checked){
			agreedstring='Agreed to TOA'
			nextbtn.disabled=false;
			nextbtn.value='Next -->';
			nextbtn.style.width='100px';
		}else if(nextbtn.disabled==false){
			nextbtn.disabled=true;
			nextbtn.value='Must accept the Terms of Agreement';
			nextbtn.style.width='200px';
		}
	commentstring+= 'setup:$'+subtotal+'|-';
	commentstring+= 'monthly:$'+monthly+'|-';
	commentstring+= agreedstring;
	commentstring+= $j('#domainsuggestion').val() + '|-';
	comments.innerHTML=commentstring;
	//comments.style.display="none";

	total.value=subtotal;
	//total.disabled=true;
	total.onfocus=function(){this.blur();};
	total.onclick=function(){this.blur();};

	save_field(document.getElementsByName('packagetype'));
	$j('#paymentcalc input, #paymentcalc select').each(function(){if(this.type=='radio' || this.disabled==true){return true;}save_field(this);});
}
jQuery(document).ready(function(){
addpaymentamounts();
window.setInterval(recalc,2000);
});

