<!--
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_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_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];}
}
//-->

<!--

var uprice = 0.00;
var qty = 0;
var weight = 0;
var desc = "";
var BackTo="http://www.butterflyalphabet.com";

//
//
//
function AssignBackTo(tempBackTo)
{
	BackTo=tempBackTo;
};
//=================================================
//Name:			AddNAToCart		
//Purpose:		Calculate and add the item to the shopping cart.
//				tempType2 - Radiobutton
//				tempQty	- the qty for the item
//				tempPostsel - the poster number				
//=================================================
function AddNAToCart(tempType2, tempQty, tempPostsel)
{
tempType="none";

//Determine which radio button is checked
//Unsigned, Signed or Artist Proof.

if (tempType2)
{
tempType=tempType2.value;
}//end of if

if (tempType2[0])  //Check if the 1st radiobutton exists
{
	if (tempType2[0].checked)  //Check if unsigned is checked
		tempType=tempType2[0].value;
}//end of if
if (tempType2[1])   //Check if the 2nd radiobutton exists
{
	if (tempType2[1].checked)  //Check if signed is checked
		tempType=tempType2[1].value;
}//end of if
if (tempType2[2])  //Check if the 3rd radiobutton exists
{
	if (tempType2[2].checked)  //Check if artist proof is checked
		tempType=tempType2[2].value;
}//end of if

PosterUnsign = new Array();
PosterUnsign[1]="BUTTERFLY POSTER #1- Horizontal, unsigned black background";
PosterUnsign[2]="BUTTERFLY POSTER #2- Vertical, unsigned white background";
PosterUnsign[3]="BUTTERFLY POSTER #3- Horizontal, unsigned soft Butterfly background";
PosterUnsign[4]="NATURE POSTER #4- Horizontal, unsigned black background";
PosterUnsign[5]="NATURE POSTER #5- Horizontal, unsigned white background";
PosterUnsign[6]="NATURE POSTER #6- Vertical, unsigned black background";
PosterUnsign[7]="NATURE POSTER #7- Vertical, unsigned white background";
PosterUnsign[8]="REVELATION POSTER #8- Horizontal, unsigned black background";
PosterUnsign[9]="REVELATION POSTER #9- Horizontal, unsigned white background";
PosterUnsign[10]="HEART&LOVE #10- Vertical, unsigned black background";
PosterUnsign[11]="HEART&LOVE #11- Vertical, unsigned white background";
PosterUnsign[12]="LOVE&JOY #12- Vertical, unsigned black background";
PosterUnsign[13]="LOVE&JOY #13- Vertical, unsigned white background";
PosterUnsign[16]="Maharajah's Pride - Kishnapur #16- Vertical, unsigned";
PosterUnsign[18]="The Little Leopard #18- Vertical, unsigned";
PosterUnsign[19]="The Pool of Siva - Ranthambhor #19- Horizontal, unsigned";
PosterUnsign[20]="Maharajah's Pride - Anatapura #20- Vertical, unsigned";
PosterUnsign[21]="First Crossing #21- Horizontal, unsigned";
PosterUnsign[22]="Purple Mountains Majesty #22- Horizontal, unsigned";
PosterUnsign[23]="Pride of Serengeti #23- Horizontal, unsigned";
PosterUnsign[24]="Not Again #24- Horizontal, unsigned";
PosterUnsign[25]="The Laughing Cheetah #25- Horizontal, unsigned";
PosterUnsign[26]="Summer Fun #26- Horizontal, unsigned";
PosterUnsign[27]="Who #27- Horizontal, unsigned";
PosterUnsign[28]="And Baby Makes Three #28- Horizontal, unsigned";
PosterUnsign[29]="BUTTERFLY POSTER #1- Horizontal, unsigned black background, International--Folded";

PosterUnsignAdditional = new Array();
PosterUnsignAdditional[1]="BUTTERFLY POSTER #1- Additional Horizontal, unsigned black background";
PosterUnsignAdditional[2]="BUTTERFLY POSTER #2- Additional Vertical, unsigned white background";
PosterUnsignAdditional[3]="BUTTERFLY POSTER #3- Additional Horizontal, unsigned soft Butterfly background";
PosterUnsignAdditional[4]="NATURE POSTER #4- Additional Horizontal, unsigned black background";
PosterUnsignAdditional[5]="NATURE POSTER #5- Additional Horizontal, unsigned white background";
PosterUnsignAdditional[6]="NATURE POSTER #6- Additional Vertical, unsigned black background";
PosterUnsignAdditional[7]="NATURE POSTER #7- Additional Vertical, unsigned white background";
PosterUnsignAdditional[8]="REVELATION POSTER #8- Additional Horizontal, unsigned black background";
PosterUnsignAdditional[9]="REVELATION POSTER #9- Additional Horizontal, unsigned white background";
PosterUnsignAdditional[10]="HEART&LOVE #10- Additional Vertical, unsigned black background";
PosterUnsignAdditional[11]="HEART&LOVE #11- Additional Vertical, unsigned white background";
PosterUnsignAdditional[12]="LOVE&JOY #12- Additional Vertical, unsigned black background";
PosterUnsignAdditional[13]="LOVE&JOY #13- Additional Vertical, unsigned white background";
PosterUnsignAdditional[16]="Maharajah's Pride - Kishnapur #16- Additional Vertical, unsigned";
PosterUnsignAdditional[18]="The Little Leopard #18- Additional Vertical, unsigned";
PosterUnsignAdditional[19]="The Pool of Siva - Ranthambhor #19- Additional Horizontal, unsigned";
PosterUnsignAdditional[20]="Maharajah's Pride - Anatapura #20- Additional Vertical, unsigned";
PosterUnsignAdditional[21]="First Crossing #21- Additional Horizontal, unsigned";
PosterUnsignAdditional[22]="Purple Mountains Majesty #22- Additional Horizontal, unsigned";
PosterUnsignAdditional[23]="Pride of Serengeti #23- Additional Horizontal, unsigned";
PosterUnsignAdditional[24]="Not Again #24- Additional Horizontal, unsigned";
PosterUnsignAdditional[25]="The Laughing Cheetah #25- Additional Horizontal, unsigned";
PosterUnsignAdditional[26]="Summer Fun #26- Additional Horizontal, unsigned";
PosterUnsignAdditional[27]="Who #27- Additional Horizontal, unsigned";
PosterUnsignAdditional[28]="And Baby Makes Three #28- Additional Horizontal, unsigned";

Postersign = new Array();
Postersign[1]="BUTTERFLY POSTER #1- Horizontal, signed black background";
Postersign[2]="BUTTERFLY POSTER #2- Vertical, signed white background";
Postersign[3]="BUTTERFLY POSTER #3- Horizontal, signed soft Butterfly background";
Postersign[4]="NATURE POSTER #4- Horizontal, signed black background";
Postersign[5]="NATURE POSTER #5- Horizontal, signed white background";
Postersign[6]="NATURE POSTER #6- Vertical, signed black background";
Postersign[7]="NATURE POSTER #7- Vertical, signed white background";
Postersign[8]="REVELATION POSTER #8- Horizontal, signed black background";
Postersign[9]="REVELATION POSTER #9- Horizontal, signed white background";
Postersign[10]="HEART&LOVE #10- Vertical, signed black background";
Postersign[11]="HEART&LOVE #11- Vertical, signed white background";
Postersign[12]="LOVE&JOY #12- Vertical, signed black background";
Postersign[13]="LOVE&JOY #13- Vertical, signed white background";
Postersign[16]="Maharajah's Pride - Kishnapur #16- Vertical, signed";
Postersign[18]="The Little Leopard #18- Vertical, signed";
Postersign[19]="The Pool of Siva - Ranthambhor #19- Horizontal, signed";
Postersign[20]="Maharajah's Pride - Anatapura #20- Vertical, signed";
Postersign[21]="First Crossing #21- Horizontal, signed";
Postersign[22]="Purple Mountains Majesty #22- Horizontal, signed";
Postersign[23]="Pride of Serengeti #23- Horizontal, signed";
Postersign[24]="Not Again #24- Horizontal, signed";
Postersign[25]="The Laughing Cheetah #25- Horizontal, signed";
Postersign[26]="Summer Fun #26- Horizontal, signed";
Postersign[27]="Who #27- Horizontal, signed";
Postersign[28]="And Baby Makes Three #28- Horizontal, signed";

PostersignAdditional = new Array();
PostersignAdditional[1]="BUTTERFLY POSTER #1- Additional Horizontal, signed black background";
PostersignAdditional[2]="BUTTERFLY POSTER #2- Additional Vertical, signed white background";
PostersignAdditional[3]="BUTTERFLY POSTER #3- Additional Horizontal, signed soft Butterfly background";
PostersignAdditional[4]="NATURE POSTER #4- Additional Horizontal, signed black background";
PostersignAdditional[5]="NATURE POSTER #5- Additional Horizontal, signed white background";
PostersignAdditional[6]="NATURE POSTER #6- Additional Vertical, signed black background";
PostersignAdditional[7]="NATURE POSTER #7- Additional Vertical, signed white background";
PostersignAdditional[8]="REVELATION POSTER #8- Additional Horizontal, signed black background";
PostersignAdditional[9]="REVELATION POSTER #9- Additional Horizontal, signed white background";
PostersignAdditional[10]="HEART&LOVE #10- Additional Vertical, signed black background";
PostersignAdditional[11]="HEART&LOVE #11- Additional Vertical, signed white background";
PostersignAdditional[12]="LOVE&JOY #12- Vertical, signed black background";
PostersignAdditional[13]="LOVE&JOY #13- Vertical, signed white background";
PostersignAdditional[16]="Maharajah's Pride - Kishnapur #16- Additional Vertical, signed";
PostersignAdditional[18]="The Little Leopard #18- Additional Vertical, signed";
PostersignAdditional[19]="The Pool of Siva - Ranthambhor #19- Additional Horizontal, signed";
PostersignAdditional[20]="Maharajah's Pride - Anatapura #20- Additional Vertical, signed";
PostersignAdditional[21]="First Crossing #21- Additional Horizontal, signed";
PostersignAdditional[22]="Purple Mountains Majesty #22- Additional Horizontal, signed";
PostersignAdditional[23]="Pride of Serengeti #23- Additional Horizontal, signed";
PostersignAdditional[24]="Not Again #24- Additional Horizontal, signed";
PostersignAdditional[25]="The Laughing Cheetah #25- Additional Horizontal, signed";
PostersignAdditional[26]="Summer Fun #26- Additional Horizontal, signed";
PostersignAdditional[27]="Who #27- Additional Horizontal, signed";
PostersignAdditional[28]="And Baby Makes Three #28- Additional Horizontal, signed";

PosterAP = new Array();
PosterAP[1]="BUTTERFLY POSTER #1- Artist Proof, horiz. black background";
PosterAP[2]="BUTTERFLY POSTER #2- Artist Proof, vert. white background";
PosterAP[3]="BUTTERFLY POSTER #3- Artist Proof, horiz. soft Butterfly background";
PosterAP[4]="NATURE POSTER #4- Artist Proof, horiz. black background";
PosterAP[5]="NATURE POSTER #5- Artist Proof, horiz. white background";
PosterAP[6]="NATURE POSTER #6- Artist Proof, vert. black background";
PosterAP[7]="NATURE POSTER #7- Artist Proof, vert. white background";
PosterAP[8]="REVELATION POSTER #8- Artist Proof, horiz. black background";
PosterAP[9]="REVELATION POSTER #9- Artist Proof, horiz. white background";
PosterAP[10]="HEART&LOVE #10- Artist Proof, Vert. black background";
PosterAP[11]="HEART&LOVE #11- Artist Proof, Vert. white background";
PosterAP[12]="LOVE&JOY #12- Artist Proof, Vert. black background";
PosterAP[13]="LOVE&JOY #13- Artist Proof, Vert. white background";
PosterAP[14]="The Flight of the Heron #14 - 18 x 24 - Artist Proof";
PosterAP[15]="The Flight of the Heron #14 - 11 x 14 - Artist Proof";
PosterAP[16]="Maharajah's Pride - Kishnapur #16 - Artist Proof";
PosterAP[17]="The Flight of the Heron #17 - 18 x 24 - Artist Proof";
PosterAP[18]="The Little Leopard #18- Vertical, unsigned";
PosterAP[19]="The Pool of Siva - Ranthambhor #19- Horizontal, Artist Proof";
PosterAP[20]="Maharajah's Pride - Anatapura #20- Vertical, Artist Proof";
PosterAP[21]="First Crossing #21- Horizontal, Artist Proof";
PosterAP[22]="Purple Mountains Majesty #22- Horizontal, Artist Proof";
PosterAP[23]="Pride of Serengeti #23- Horizontal, Artist Proof";
PosterAP[24]="Not Again #24- Horizontal, Artist Proof";
PosterAP[25]="The Laughing Cheetah #25- Horizontal, Artist Proof";
PosterAP[26]="Summer Fun #26- Horizontal, Artist Proof";
PosterAP[27]="Who #27- Horizontal, Artist Proof";
PosterAP[28]="And Baby Makes Three #28- Horizontal, Artist Proof";
PosterAP[29]="BUTTERFLY POSTER #1- Horizontal, Artist Proof";


//Make sure the poster number is within the range of the array
if ((tempPostsel > 0) && (tempPostsel < 30))
{

	//Price for artist Proofs.  #4 and 6 are $125 for Endura Metallic prints.
	tempWholesalePrice = 19.95;
	
	if (tempPostsel == 3 || tempPostsel == 2)
	{
		tempWholesalePrice = 24.95;
	}
	if (tempPostsel == 6)
	{
		tempWholesalePrice = 85.00;
	}
	
	switch (tempType)
	{
		case 'u' :{
			if ((tempPostsel >= 8) && (tempPostsel <= 13)) {
					makeQSadditional('Posterr'+tempPostsel, (14.95),tempQty, '0.29',PosterUnsign[tempPostsel], PosterUnsignAdditional[tempPostsel] , (9.95));
			}
			else if ((tempPostsel >= 16) && (tempPostsel <= 27)) {
					makeQSadditional('Posterr'+tempPostsel, (9.95),tempQty, '0.29',PosterUnsign[tempPostsel], PosterUnsignAdditional[tempPostsel] , (9.95));
			}
			else {				
					makeQSadditional('Posterr'+tempPostsel, (14.95),tempQty, '0.29',PosterUnsign[tempPostsel], PosterUnsignAdditional[tempPostsel] , (9.95));
			}
					break;
					};//end of case
		case 's' :{
					//makeQSadditional('Posters'+tempPostsel, (24.95),tempQty, '0.29',Postersign[tempPostsel], PostersignAdditional[tempPostsel], (5.95));
            if ((tempPostsel == 3) || (tempPostsel == 5) || (tempPostsel == 8) || (tempPostsel == 9)) {                            makeQSadditional('Posters'+tempPostsel, (34.95),tempQty, '0.29',Postersign[tempPostsel], PostersignAdditional[tempPostsel], (11.95));            }
            else if ((tempPostsel == 6) || ( tempPostsel == 7)) {
                makeQSadditional('Posters'+tempPostsel, (49.95),tempQty, '0.29',Postersign[tempPostsel], PostersignAdditional[tempPostsel], (11.95));                        
            }                        
			else if ((tempPostsel == 16) || (tempPostsel == 18) || (tempPostsel == 20) || (tempPostsel == 21) || (tempPostsel == 22) || (tempPostsel == 23) || (tempPostsel == 24) || (tempPostsel == 25) || (tempPostsel == 26) || (tempPostsel == 27)) {                    makeQSadditional('Posters'+tempPostsel, (4.95),tempQty, '0.29',Postersign[tempPostsel], PostersignAdditional[tempPostsel], (4.95));            }
			else if (tempPostsel == 19) {  makeQSadditional('Posters'+tempPostsel, (9.95),tempQty, '0.29',Postersign[tempPostsel], PostersignAdditional[tempPostsel], (9.95));            }
            
            else if ((tempPostsel >= 8) && (tempPostsel <= 13)) {
				makeQSadditional('Posters'+tempPostsel, (19.95),tempQty, '0.29',Postersign[tempPostsel], PostersignAdditional[tempPostsel], (19.95));
			}
			else if ((tempPostsel >= 16) && (tempPostsel <= 27)) {
				makeQSadditional('Posters'+tempPostsel, (19.95),tempQty, '0.29',Postersign[tempPostsel], PostersignAdditional[tempPostsel], (19.95));
			}
			else {				
				makeQSadditional('Posters'+tempPostsel, (19.95),tempQty, '0.29',Postersign[tempPostsel], PostersignAdditional[tempPostsel], (19.95));
			}
			
					break;
					};//end of case
		case 'ap' :{					    if ((tempPostsel == 3) || (tempPostsel == 5) || (tempPostsel == 8) || (tempPostsel == 9)) {                            makeQSadditional('Posters'+tempPostsel, (39.95),tempQty, '0.29',Postersign[tempPostsel], PostersignAdditional[tempPostsel], (11.95));            }               else if ((tempPostsel == 6) || (tempPostsel == 7)) {                makeQSadditional('Posters'+tempPostsel, (59.95),tempQty, '0.29',Postersign[tempPostsel], PostersignAdditional[tempPostsel], (11.95));            }                 else if ((tempPostsel == 18) || (tempPostsel == 20) || (tempPostsel == 21) || (tempPostsel == 22) || (tempPostsel == 23) || (tempPostsel == 24) || (tempPostsel == 25) || (tempPostsel == 26) || (tempPostsel == 27)) {                    makeQSadditional('Posters'+tempPostsel, (4.95),tempQty, '0.29',Postersign[tempPostsel], PostersignAdditional[tempPostsel], (4.95));            }
			else if ((tempPostsel >= 8) && (tempPostsel <= 13)) {
					makeQSa('APPoster'+tempPostsel, 24.95,tempQty, '0.29',PosterAP[tempPostsel]);
			}
			else if ((tempPostsel >= 16) && (tempPostsel <= 27)) {
					makeQSa('APPoster'+tempPostsel, 19.95,tempQty, '0.29',PosterAP[tempPostsel]);
			}
			else {				
					makeQSa('APPoster'+tempPostsel, (tempWholesalePrice),tempQty, '0.29',PosterAP[tempPostsel]);
			}
			
			//		makeQSa('APPoster'+tempPostsel, (tempWholesalePrice),tempQty, '0.29',PosterAP[tempPostsel]);
					break;
					};//end of case
        //flight of heron
        case 'big' :{
                    makeQSa('APPoster'+tempPostsel, (125.00),tempQty, '0.29',PosterAP[tempPostsel]);
                    break;
        };//end of case
        case 'small' :{
                    makeQSa('APPoster'+tempPostsel, (125.00),tempQty, '0.29',PosterAP[tempPostsel+1]);
                    break;
        }; 
		case 'i' :{
					makeQSadditional('PosterrInt'+tempPostsel, (19.95),tempQty, '0.29',PosterUnsign[tempPostsel], PosterUnsignAdditional[tempPostsel] , (19.95));
					break;
					};//end of case
        //end flight of the heron
		default:{alert("Please select a poster.");
		return false;}
	};//end of switch

}//end of if
else
{
	alert("Please add an item then add to cart.");
	return false;
}//end of else
};

//*************************************************
//Connect to SCart for secure payment
//*************************************************
function makeQSa(id, p, q, w, d)
{
	var wholeQS="http://www.cartserver.com/sc/cart.cgi?";
	
	if (q == 0) 
	{
		alert("Please enter the quantity then add to cart.")
		return false;
	}//end of if
	else
	{
			uprice = p;
			qty = q;
			weight = w;
			desc = d;
			wholeQS += "&" +makeItemQS(id);
	
		wholeQS += "&" + BackTo;
		window.location = wholeQS;
		return true;
	}//end of else
}// End of makeQSa
//*************************************************
//Connect to SCart for secure payment
//*************************************************
function makeQSadditional(id, p, q, w, d, ad, ap)
{
	var wholeQS="http://www.cartserver.com/sc/cart.cgi?";
	
	if (q == 0) 
	{
		alert("You haven't added anything to your cart.")
		return false;
	}
	else
	{
		uprice = p;
		qty = 1;
		weight = w;
		desc = d;
		wholeQS += "&" +makeItemQS(id);
		if (q > 1)
		{
			uprice = ap;
			qty = q-1;
			weight = w;
			desc = ad;
			wholeQS += "&" +makeItemQS(id+"a");
		}//end of if
		wholeQS += "&" + BackTo;
		window.location = wholeQS;
		return true;
	}//end of else
}//end of function
function makeQS(id, p, q, w, d)
{
	uprice = p;
	qty = q;
	weight = w;
	desc = d;
	var wholeQS="http://www.cartserver.com/sc/cart.cgi?";
	
	if (q == 0) 
	{
		alert("You haven't added anything to your cart.")
		return false;
	}//end of if
	else
	{
		wholeQS += makeItemQS(id);
		//alert(wholeQS);
		wholeQS += "&" + BackTo;
		//Free Poster
		uprice = 0;
		qty = 1;
		weight = 0.16;
		//desc = "With any poster order you receive FREE a surprise gift poster of our choice!";
		//wholeQS += "&" + makeItemQS("BAP10");
		window.location = wholeQS;
		
		return true;
	}//endof else
}//end of makeQS
//*************************************************
//Build query string for SCart
//*************************************************
function makeItemQS(name)
{
	desc = escape(desc);
	//alert("unitprice=" + uprice + "\nqty=" + qty + "\nweight=" + weight + "\ndesc=" + desc);
	var myQS = "item" + name + "=b-5006^^" +  desc + "^" + uprice+ "^" + qty + "^" + "^" + "^" + "^" + weight;
return myQS; 
}//end of makeItemQS

function doStuff(url) { window.opener.location=url;}

function closeThis()
{
	window.opener = self;
  	window.close();
}//end of closeThis

//*************************************************
//Connect to SCart for secure payment
//*************************************************
function makeQSabook(id, p, q, w, d, ad, ap)
{
	var wholeQS="http://www.cartserver.com/sc/cart.cgi?";
	
	if (q == 0) 
	{
		alert("You haven't added anything to your cart.")
		return false;
	}
	else
	{
		uprice = p;
		qty = 1;
		weight = w;
		desc = d;
		wholeQS += "&" +makeItemQS(id);
		if (q > 1)
		{
			uprice = ap;
			qty = q-1;
			weight = w;
			desc = ad;
			wholeQS += "&" +makeItemQS(id+"a");
		}//end of if
		wholeQS += "&" + BackTo;
		window.location = wholeQS;
		return true;
	}//end of else
}//end of function
//-->

