function openit(thispage)
	{
	window.open(thispage,'603x774','toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,width=603,height=774')
	}

function calc_total()
	{
		var subtotal = 0;
		var quantity = 0;
		var shipcharge = 0;
		if (document.orderform.profile_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal1a.value * 1;
			quantity = quantity + document.orderform.profile_qty.value * 1;
			}
		if (document.orderform.communication_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal2a.value * 1;
			quantity = quantity + document.orderform.communication_qty.value * 1;
			}
		if (document.orderform.leadership_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal3a.value * 1;
			quantity = quantity + document.orderform.leadership_qty.value * 1;
			}
		if (document.orderform.personality_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal4a.value * 1;
			quantity = quantity + document.orderform.personality_qty.value * 1;
			}
		if (document.orderform.working_boss_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal5a.value * 1;
			quantity = quantity + document.orderform.working_boss_qty.value * 1;
			}
		if (document.orderform.pep_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal6a.value * 1;
			quantity = quantity + document.orderform.pep_qty.value * 1;
			}
		if (document.orderform.team_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal7a.value * 1;
			quantity = quantity + document.orderform.team_qty.value * 1;
			}
		if (document.orderform.timestyle_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal8a.value * 1;
			quantity = quantity + document.orderform.timestyle_qty.value * 1;
			}
		if (document.orderform.presentation_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal9a.value * 1;
			quantity = quantity + document.orderform.presentation_qty.value * 1;
			}
		if (document.orderform.sales_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal10a.value * 1;
			quantity = quantity + document.orderform.sales_qty.value * 1;
			}
		if (document.orderform.negotiate_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal11a.value * 1;
			quantity = quantity + document.orderform.negotiate_qty.value * 1;
			}
		if (document.orderform.super_star_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal12a.value * 1;
			quantity = quantity + document.orderform.super_star_qty.value * 1;
			}
		if (document.orderform.service_audit_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal13a.value * 1;
			quantity = quantity + document.orderform.service_audit_qty.value * 1;
			}
		if (document.orderform.sample_pack_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal14a.value * 1;
			quantity = quantity + document.orderform.sample_pack_qty.value * 1;
			}
		if (document.orderform.user_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal15a.value * 1;
			quantity = quantity + document.orderform.user_qty.value * 1;
			}
		if (document.orderform.typo_game_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal16a.value * 1;
			quantity = quantity + document.orderform.typo_game_qty.value * 1;
			}
		if (document.orderform.Birds_Feather_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal17a.value * 1;
			quantity = quantity + document.orderform.Birds_Feather_qty.value * 1;
			}
		if (document.orderform.behavior_inv_qty.value != "")
			{
			subtotal = subtotal + document.orderform.linetotal18a.value * 1;
			quantity = quantity + document.orderform.behavior_inv_qty.value * 1;
			}		
		document.orderform.subtotal.value = formatCurrency(subtotal);
		if (subtotal > 0 && subtotal <= 25) shipcharge = 5;
		if (subtotal > 25 && subtotal <= 50) shipcharge = 7;
		if (subtotal > 50 && subtotal <= 100) shipcharge = 9;
		if (subtotal > 100 && subtotal <= 200) shipcharge = 11;
		if (subtotal > 200 && subtotal <= 300) shipcharge = 14;
		if (subtotal > 300 && subtotal <= 500) shipcharge = 17.5;
		if (subtotal > 500) shipcharge = subtotal * 0.04;
		document.orderform.packandship.value = formatCurrency(shipcharge);
		document.orderform.total.value = formatCurrency(subtotal + shipcharge);
	}

	
	function formatCurrency(num)
	{
		num = num.toString().replace(/\$|\,/g,'');
		if(isNaN(num))
		   num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num*100);
		cents = num%100;
		num = Math.floor(num/100).toString();
		if(cents<10)
		    cents = "0" + cents;
		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
		    num = num.substring(0,num.length-(4*i+3))+','+
		          num.substring(num.length-(4*i+3));
  	    return (((sign)?'':'-') + '$' + num + '.' + cents);
	}


	function roundoff_Currency(num)
	{
		num = num.toString().replace(/\$|\,/g,'');
		if(isNaN(num))
		   num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num*100);
		cents = num%100;
		num = Math.floor(num/100).toString();
		if(cents<10)
		    cents = "0" + cents;
		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
		    num = num.substring(0,num.length-(4*i+3))+','+
		          num.substring(num.length-(4*i+3));
  	    return (((sign)?'':'-') + num + '.' + cents);
	}
