

function MM_preloadImages() { //v3.0
	
	var d=document; 
  	if(d.images)
  	{ 
  		if(!d.MM_p) 
			
			d.MM_p=new Array();
    		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
	
			for(i=0; i<a.length; i++)
    			
				if (a[i].indexOf("#")!=0)
				{ 
					d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
				}
	}

}


function MM_swapImgRestore() { //v3.0

	var i,x,a=document.MM_sr; 
	
	for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) 
		x.src=x.oSrc;
}


function MM_findObj(n, d) { //v4.01

	var p,i,x;  
	
	if(!d) d=document; 
	
	if((p=n.indexOf("?"))>0&&parent.frames.length) 
	{
    	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
	}
  	
	if(!(x=d[n])&&d.all) 
		x=d.all[n]; 
		for (i=0;!x&&i<d.forms.length;i++) 
			x=d.forms[i][n];
  			for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
				x=MM_findObj(n,d.layers[i].document);
  
  	if(!x && d.getElementById) 
		x=d.getElementById(n); 
		return x;
}


function MM_swapImage() { //v3.0

	var i,j=0,x,a=MM_swapImage.arguments; 
	
	document.MM_sr=new Array; 
	for(i=0;i<(a.length-2);i+=3)
   		if ((x=MM_findObj(a[i]))!=null)
		{
			document.MM_sr[j++]=x; 
			if(!x.oSrc) 
				x.oSrc=x.src; 
				x.src=a[i+2];
		}
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
	
	window.open(theURL,winName,features);

}


function CalculateOrder(form)
{
	/*
	//10% off order promo - Fathers Day 2009
	if (document.promo_form.promo_txt.value == "dad2010")
	{
	document.pp_GFLXL.amount.value = 17.97;
	document.pp_GFLXL.item_name.value = "Grillfloss - Ultimate Grill Cleaning Tool ** 10% discount **";
	
	document.pp_GFLXL2.amount.value = 26.97;
	document.pp_GFLXL2.item_name.value = "Grillfloss - Ultimate Grill Cleaning Tool - x2 ** 10% discount **";
	
	document.pp_GFRPH.amount.value = 3.57;
	document.pp_GFRPH.item_name.value = "Replacement Dual Sized Cleaning Head ** 10% discount **";

	document.pp_SSWB.amount.value = 44.97;
	document.pp_SSWB.item_name.value = "Stainless Steel Grill Grates for Weber ** 10% discount **";
	}	
	

	//20% off order promo - holiday 2009
	if (document.promo_form.promo_txt.value == "xmas2009")
	{
	document.pp_GFLXL.amount.value = 19.97;
	document.pp_GFLXL.item_name.value = "Grillfloss - Ultimate Grill Cleaning Tool ** Holiday 2009 Special - 20% discount **";
	
	document.pp_GFLXL2.amount.value = 29.97;
	document.pp_GFLXL2.item_name.value = "Grillfloss - Ultimate Grill Cleaning Tool - x2 ** Holiday 2009 Special - 20% discount **";
	
	document.pp_GFRPH.amount.value = 4.77;
	document.pp_GFRPH.item_name.value = "Replacement Dual Sized Cleaning Head ** Holiday 2009 Special - 20% discount **";

	document.pp_SSWB.amount.value = 46.38;
	document.pp_SSWB.item_name.value = "Stainless Steel Grill Grates for Weber ** Holiday 2009 Special - 20% discount **";
	}
	
	
	//20% off order promo - valentines day 2010
	if (document.promo_form.promo_txt.value == "love20")
	{
	document.pp_GFLXL.amount.value = 20.00;
	document.pp_GFLXL.item_name.value = "Grillfloss - Ultimate Grill Cleaning Tool ** Valentine's Day Special - 20% discount **";
	
	document.pp_GFRPH.amount.value = 5.20;
	document.pp_GFRPH.item_name.value = "Replacement Dual Sized Cleaning Head ** Valentine's Day Special - 20% discount **";

	document.pp_SSWB.amount.value = 48.00;
	document.pp_SSWB.item_name.value = "Stainless Steel Grill Grates for Weber ** Valentine's Day Special - 20% discount **";
	}
	
	
	//20% off order promo - twitter fathers day 2010

	if (document.promo_form.promo_txt.value == "twitter20")
	{
	document.pp_GFLXL.amount.value = 20.00;
	document.pp_GFLXL.item_name.value = "Grillfloss - Ultimate Grill Cleaning Tool ** Twitter Father's Day Special - 20% discount **";
	
	document.pp_pb.amount.value = 32.00;
	document.pp_pb.item_name.value = "Grillfloss Professional Bundle ** Twitter Father's Day Special - 20% discount **";

	document.pp_GFRPH.amount.value = 5.20;
	document.pp_GFRPH.item_name.value = "Replacement Dual Sized Cleaning Head ** Twitter Father's Day Special - 20% discount **";

	document.pp_SSWB.amount.value = 48.00;
	document.pp_SSWB.item_name.value = "Stainless Steel Grill Grates for Weber ** Twitter Father's Day Special - 20% discount **";

	document.pp_cb.amount.value = 10.40;
	document.pp_cb.item_name.value = "All Natural Bamboo Cutting Board ** Twitter Father's Day Special - 20% discount **";
	}


		
	//free ship promo
	if (document.promo_form.promo_txt.value == "freeship")
	{
	document.pp_GFLXL.shipping.value = 0.00;
	document.pp_GFLXL.item_name.value = "Grillfloss - Ultimate Grill Cleaning Tool ** FREE shipping **";
	
	document.pp_GFLXL2.shipping.value = 0.00;
	document.pp_GFLXL2.item_name.value = "Grillfloss - Ultimate Grill Cleaning Tool - x2 ** FREE shipping **";
	}
	
	*/


    //20% off order promo - Cooking Club of America 2009
    if (document.promo_form.promo_txt.value == "CCOA2009") {
        document.pp_GFLXL.amount.value = 20.00;
        document.pp_GFLXL.item_name.value = "Grillfloss - Ultimate Grill Cleaning Tool ** CCOA Special - 20% discount **";

        document.pp_GFLXL2.amount.value = 40.00;
        document.pp_GFLXL2.item_name.value = "Grillfloss Buddy Special 2010 ** CCOA Special - 20% discount **";

        document.pp_pb.amount.value = 32.00;
        document.pp_pb.item_name.value = "Grillfloss Professional Bundle ** CCOA Special - 20% discount **";

        document.pp_GFRPH.amount.value = 5.20;
        document.pp_GFRPH.item_name.value = "Replacement Dual Sized Cleaning Head ** CCOA Special - 20% discount **";

        document.pp_SSWB.amount.value = 48.00;
        document.pp_SSWB.item_name.value = "Stainless Steel Grill Grates for Weber ** CCOA Special - 20% discount **";

        document.pp_cb.amount.value = 10.40;
        document.pp_cb.item_name.value = "All Natural Bamboo Cutting Board ** CCOA - 20% discount **";
    }

	return false;
}
