// this is the array containing the item info
gdpItemsArray = new Array();

// buy_option 
// 0 - Unframed
// 1 - Framed
// 2 - Print
// 3 - Framed/Unframed
// 4 - Framed/Unframed/Print
// 5 - Framed/Print
// 6 - Unframed/Print



//gdpItem = new Object();
//gdpItem.name = 'Mini Book';
//gdpItem.description = '22 images, black and white, and colour 4" x 5 3/8"';
//gdpItem.image = '../../images/mark/store/minibook.jpg';
//gdpItem.height = 322;
//gdpItem.width = 263;
//gdpItem.buy_option = 1;
//gdpItem.price_framed = 15;
//gdpItem.price_unframed = 0;
//gdpItem.price_print = 0;
//gdpItem.sold = false;
//gdpItemsArray.push(gdpItem);

gdpItem = new Object();
gdpItem.name = 'Visual Dialogues';
gdpItem.description = 'Full colour, 8 3/4" x 12" <br><br>48 pages<br><br> Hard Cover, Smythe sewn <br><br>1,000 copies<br><br>Signed Book: $25 <br>Remarked With Drawing $50.00<br><br> Plus $5 for shipping and handeling';
gdpItem.image = '../../images/mark/store/visualdialogues_b.jpg';
gdpItem.height = 380;
gdpItem.width = 266;
gdpItem.buy_option = 5;
gdpItem.price_framed = 30;
gdpItem.price_unframed = 55;
gdpItem.price_print = 55;
gdpItem.sold = false;
gdpItemsArray.push(gdpItem);

gdpItem = new Object();
gdpItem.name = 'OMK';
gdpItem.description = 'Black and white, 8 1/2" x 11"<br><br> 44 pages <br><br> softcover<br><br> collects the cat drawings, One Mad Kat and others<br><br>Signed Book: $20<br><br> Plus $3 for shipping and handeling';
gdpItem.image = '../../images/mark/store/omk_b.jpg';
gdpItem.height = 380;
gdpItem.width = 266;
gdpItem.buy_option = 1;
gdpItem.price_framed = 23;
gdpItem.price_unframed = 0;
gdpItem.price_print = 0;
gdpItem.sold = false;
gdpItemsArray.push(gdpItem);


gdpItem = new Object();
gdpItem.name = 'Broken Angels';
gdpItem.description = '14 images, black and white, and colour  5 ½" x 7 ¾"<br><br>Printed with archival ink on epson paper, hand folded, and signed by the artist<br><br>Signed Book: $15<br><br> Plus $3 for shipping and handeling';
gdpItem.image = '../../images/mark/store/brokenangels.jpg';
gdpItem.height = 380;
gdpItem.width = 266;
gdpItem.buy_option = 1;
gdpItem.price_framed = 18;
gdpItem.price_unframed = 0;
gdpItem.price_print = 0;
gdpItem.sold = false;
gdpItemsArray.push(gdpItem);

gdpItem = new Object();
gdpItem.name = 'HeadDress';
gdpItem.description = '14 images, black and white, and colour  5 ½" x 7 ¾" <br><br>Printed with archival ink on epson paper, hand folded, and signed by the artist<br><br>Signed Book: $15<br><br> Plus $3 for shipping and handeling';
gdpItem.image = '../../images/mark/store/headdress.jpg';
gdpItem.height = 380;
gdpItem.width = 265;
gdpItem.buy_option = 1;
gdpItem.price_framed = 18;
gdpItem.price_unframed = 0;
gdpItem.price_print = 0;
gdpItem.sold = false;
gdpItemsArray.push(gdpItem);

gdpItem = new Object();
gdpItem.name = 'Medusa and other Exotica';
gdpItem.description = '14 images, black and white, and colour 5 ½" x 7 ¾" <br><br>Printed with archival ink on epson paper, hand folded, and signed by the artist<br><br>Signed Book: $15<br><br> Plus $3 for shipping and handeling';
gdpItem.image = '../../images/mark/store/medusa.jpg';
gdpItem.height = 380;
gdpItem.width = 266;
gdpItem.buy_option = 1;
gdpItem.price_framed = 18;
gdpItem.price_unframed = 0;
gdpItem.price_print = 0;
gdpItem.sold = false;
gdpItemsArray.push(gdpItem);

gdpItem = new Object();
gdpItem.name = 'Medusa and other Exotica 2';
gdpItem.description = '14 images, black and white, colour , and contains nudity 5 ½" x 7 ¾"  (Must be 18 or older to buy) <br><br>Printed with archival ink on epson paper, hand folded, and signed by the artist<br><br>Signed Book: $15 <br><br> Plus $3 for shipping and handeling';
gdpItem.image = '../../images/mark/store/medusa2.jpg';
gdpItem.height = 380;
gdpItem.width = 264;
gdpItem.buy_option = 1;
gdpItem.price_framed = 18;
gdpItem.price_unframed = 0;
gdpItem.price_print = 0;
gdpItem.sold = false;
gdpItemsArray.push(gdpItem);

gdpItem = new Object();
gdpItem.name = 'From Pencils to Inks';
gdpItem.description = '64 pages black and white  8 ½" x 11"<br><br>Unsigned Book: $15<br><br>Signed limited Edition, with Additional  plate, Dust cover and no Lettering on front cover: $20 <br><br> Plus $3 for shipping and handeling';
gdpItem.image = '../../images/mark/store/fpti.jpg';
gdpItem.height = 357;
gdpItem.width = 280;
gdpItem.buy_option = 3;
gdpItem.price_framed = 18;
gdpItem.price_unframed = 23;
gdpItem.price_print = 0;
gdpItem.sold = false;
gdpItemsArray.push(gdpItem);


function gdpChangePrice(index){

	var priceExpression;

	switch(gdpItemsArray[index].buy_option)
	{
		case 0:
			priceExpression = 'paintings' + index + '.price.value = ' + gdpItemsArray[index].price_unframed;
			break;
		
		case 1:
			priceExpression = 'paintings' + index + '.price.value = ' + gdpItemsArray[index].price_framed;
			break;
			
		case 2:
			priceExpression = 'paintings' + index + '.price.value = ' + gdpItemsArray[index].price_print;
			break;
			
		case 3:
			priceExpression = 'if(paintings' + index + '.framed.checked != false){	paintings' + index + '.price.value = ' + gdpItemsArray[index].price_framed + ';	}	else if(paintings' + index + '.unframed.checked != false){	paintings' + index + '.price.value = ' + gdpItemsArray[index].price_unframed + ';	}';
			break;
			
		case 4:
			priceExpression = 'if(paintings' + index + '.framed.checked != false){	paintings' + index + '.price.value = ' + gdpItemsArray[index].price_framed + ';	}	else if(paintings' + index + '.unframed.checked != false){	paintings' + index + '.price.value = ' + gdpItemsArray[index].price_unframed + ';	}	else{	paintings' + index + '.price.value = ' + gdpItemsArray[index].price_print + ';	}';
			break;
			
		case 5:
			priceExpression = 'if(paintings' + index + '.framed.checked != false){	paintings' + index + '.price.value = ' + gdpItemsArray[index].price_framed + ';	}	else if(paintings' + index + '.print.checked != false){	paintings' + index + '.price.value = ' + gdpItemsArray[index].price_print + ';	}';
			break;
			
		case 6:
			priceExpression = 'if(paintings' + index + '.unframed.checked != false){	paintings' + index + '.price.value = ' + gdpItemsArray[index].price_unframed + ';	}	else if(paintings' + index + '.print.checked != false){	paintings' + index + '.price.value = ' + gdpItemsArray[index].price_print + ';	}';
			break;
	}
	//alert(priceExpression);
	eval(priceExpression);
	
	
	switch(gdpItemsArray[index].buy_option)
	{
		case 0:
			priceExpression = 'paintings' + index + '.item_name.value =  "' + gdpItemsArray[index].name + ' (Book)"';
			break;
		
		case 1:
			priceExpression = 'paintings' + index + '.item_name.value =  "' + gdpItemsArray[index].name + ' (Book)"';
			break;
			
		case 2:
			priceExpression = 'paintings' + index + '.item_name.value =  "' + gdpItemsArray[index].name + ' (Book)"';
			break;
			
		case 3:
			priceExpression = 'if(paintings' + index + '.framed.checked != false){	paintings' + index + '.item_name.value = "' + gdpItemsArray[index].name + '  (Unsigned)";	}	else if(paintings' + index + '.unframed.checked != false){	paintings' + index + '.item_name.value = "' + gdpItemsArray[index].name + ' (Signed)";	}';
			break;
			
		case 4:
			priceExpression = 'if(paintings' + index + '.framed.checked != false){	paintings' + index + '.item_name.value =  "' + gdpItemsArray[index].name + ' (Framed)";	}	else if(paintings' + index + '.unframed.checked != false){	paintings' + index + '.item_name.value =  "' + gdpItemsArray[index].name + ' (Unframed)";	}	else{	paintings' + index + '.item_name.value =  "' + gdpItemsArray[index].name + ' (Print)";	}';
			break;
			
		case 5:
			priceExpression = 'if(paintings' + index + '.framed.checked != false){	paintings' + index + '.item_name.value =  "' + gdpItemsArray[index].name + ' (Signed)";	}	else if(paintings' + index + '.print.checked != false){	paintings' + index + '.item_name.value =  "' + gdpItemsArray[index].name + ' (Remarked)";	}';
			break;
			
		case 6:
			priceExpression = 'if(paintings' + index + '.framed.checked != false){	paintings' + index + '.item_name.value =  "' + gdpItemsArray[index].name + ' (Unframed)";	}	else if(paintings' + index + '.print.checked != false){	paintings' + index + '.item_name.value =  "' + gdpItemsArray[index].name + ' (Print)";	}';
			break;
	}
//alert(priceExpression);
	eval(priceExpression);

}

for(i = 0; i < gdpItemsArray.length; i++)
{

	if(gdpItemsArray[i].sold == true) continue;

document.write('      <tr>');
document.write('        <td width="56%"><div align="center"><img src="' + gdpItemsArray[i].image + '" width="' + gdpItemsArray[i].width + '" height="' + gdpItemsArray[i].height + '"></div></td>');
document.write('        <td width="44%" valign="top"><p class="artTitles">' + gdpItemsArray[i].name + '</p>');
document.write('            <p class="infotxt">' + gdpItemsArray[i].description + '</p>');
document.write('          <form id="paintings' + i + '" target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">');
document.write('              <p>');


// buy_option 
// 0 - Framed
// 1 - Unframed
// 2 - Print
// 3 - Framed/Unframed
// 4 - Framed/Unframed/Print
// 5 - Framed/Print
// 6 - Unframed/Print
switch(gdpItemsArray[i].buy_option)
{
	case 0:
		document.write('<label>$' + gdpItemsArray[i].price_unframed + ' Unframed</label>')
		break;
		
	case 1:
		document.write('<label>$' + gdpItemsArray[i].price_framed + '   Total</label>')
		break;
		
	case 2:
		document.write('<label>$' + gdpItemsArray[i].price_print + ' Print</label>')
		break;
		
	case 3:
		document.write('                <label>');
		document.write('                <input type="radio" id="framed" name="RadioGroup1">');
		document.write('                  $' + gdpItemsArray[i].price_framed + ' Unsigned</label>');
		document.write('                <br>');
		document.write('                <label>');
		document.write('                <input type="radio" id="unframed" name="RadioGroup1"  checked>');
		document.write('                  $' + gdpItemsArray[i].price_unframed + ' Signed</label>');
		break;
		
	case 4:
		document.write('                <label>');
		document.write('                <input type="radio" id="framed" name="RadioGroup1">');
		document.write('                  $' + gdpItemsArray[i].price_framed + ' Framed</label>');
		document.write('                <br>');
		document.write('                <label>');
		document.write('                <input type="radio" id="unframed" name="RadioGroup1">');
		document.write('                  $' + gdpItemsArray[i].price_unframed + ' Unframed</label>');
		document.write('                <br>');
		document.write('                <label>');
		document.write('                <input type="radio" id="print" name="RadioGroup1"  checked>');
		document.write('                  $' + gdpItemsArray[i].price_print + ' Print</label>');
		break;
		
	case 5:
		document.write('                <label>');
		document.write('                <input type="radio" id="framed" name="RadioGroup1">');
		document.write('                  $' + gdpItemsArray[i].price_framed + ' Signed</label>');
		document.write('                <br>');
		document.write('                <label>');
		document.write('                <input type="radio" id="print" name="RadioGroup1"  checked>');
		document.write('                  $' + gdpItemsArray[i].price_print + ' Remarked</label>');
		break;
		
	case 6:
		document.write('                <label>');
		document.write('                <input type="radio" id="unframed" name="RadioGroup1">');
		document.write('                  $' + gdpItemsArray[i].price_unframed + ' Unframed</label>');
		document.write('                <br>');
		document.write('                <label>');
		document.write('                <input type="radio" id="print" name="RadioGroup1"  checked>');
		document.write('                  $' + gdpItemsArray[i].price_print + ' Print</label>');
		break;
		
}




document.write('                <input name="submit" type="image" src="../../images/mark/store/addtocart.gif" alt="PayPal - The safer, easier way to pay online!" align="right" border="0" style="float:right" onClick=gdpChangePrice('+i+') >');
document.write('                <input type="hidden" name="add" value="1">');
document.write('                <input type="hidden" name="cmd" value="_cart">');
document.write('                <input type="hidden" name="business" value="gdpanita@comcast.net">');
document.write('				<input type="hidden" name="item_name" value="' + gdpItemsArray[i].name + '">');
document.write('                <input type="hidden" name="item_number" value="p' + (i + 1) + '">');
document.write('                <input type="hidden" id="price" name="amount" value="0">');
document.write('                <input type="hidden" name="no_shipping" value="0">');
document.write('                <input type="hidden" name="no_note" value="1">');
document.write('                <input type="hidden" name="currency_code" value="USD">');
document.write('                <input type="hidden" name="lc" value="US">');
document.write('                <input type="hidden" name="bn" value="PP-ShopCartBF">');

document.write('          </form>');
document.write('          </td>');
document.write('        </tr>	');
	


}