// JavaScript Document
// change clothing item on collections page
// onClick="change_item('2007-fall-winter','1182')"

function change_item( target, purchase, collection, item )
 {
 // item values
 var names = new Array();
	// collection-2007-fall-winter
 names["1182"] = "Can It Be";
 names["1171"] = "Bentley";
 names["1154"] = "Prune Wool Houndstooth";
 names["1143"] = "Classic Reinvent Thyself and Houndstooth";
 names["1195"] = "Sneaker Guru";
 names["1183"] = "Runnin";
 names["1221"] = "Classic Reinvent Thyself and black/white houndstooth";
 names["1200"] = "America's Next Top Mogul";
 names["1219"] = "Sneaker Guru";
 // collection-2008-men
	names["0003"] = "name-0003";
	names["0004"] = "name-0004";
	names["0006"] = "name-0006";
	names["0007"] = "name-0007";
	names["0009"] = "name-0009";
	names["0011"] = "name-0011";
	names["0014"] = "name-0014";
	names["0015"] = "name-0015";
	names["0023"] = "name-0023";
	names["0030"] = "name-0030";
	names["0051"] = "name-0051";
	names["0074"] = "name-0074";
	// collections-2008-spring-summer
	names["0101"] = "Cinderella Story";
	names["0102"] = "JMJ Lives";
	names["0103"] = "Hello Glory";
	names["0104"] = "Memory Lane";
	names["0105"] = "Thrill of Victory";
	names["0106"] = "T.R.O.Y. Part I";
 // collections-2008-fall-winter
	names["08fws0001"] = "Be Water";
	names["08fws0002"] = "Do the Knowledge";
	names["08fws0003"] = "Dream Together";
	names["08fws0004"] = "School of Thought";
	names["08fws0005"] = "Success";
	names["08fws0006"] = "Teach the Children";
	// collection-2009-spring-summer
	names["ss0901"] = "name-ss0901";
	names["ss0902"] = "name-ss0902";
	names["ss0903"] = "name-ss0903";
	names["ss0904"] = "name-ss0904";
	names["ss0905"] = "name-ss0905";
	names["ss0906"] = "name-ss0906";
	names["ss0907"] = "name-ss0907";
	names["ss0908"] = "name-ss0908";
	names["ss0909"] = "name-ss0909";
	names["ss0910"] = "name-ss0910";
	names["ss0911"] = "name-ss0911";
	names["ss0912"] = "name-ss0912";
	names["ss0913"] = "name-ss0913";
	names["ss0914"] = "name-ss0914";
	names["ss0915"] = "name-ss0915";
	names["ss0916"] = "name-ss0916";
	names["ss0917"] = "name-ss0917";
	names["ss0918"] = "name-ss0918";
	names["ss0919"] = "Homage";
	names["ss0920"] = "A Night at the Garden";
	names["ss0921"] = "Dillawarhol Vol. 1";
	names["ss0922"] = "Glory Days";
	names["ss0923"] = "Windrunner";

 var descriptions = new Array();
	// collection-2007-fall-winter
 descriptions["1182"] = "Inspired by one of our mottos at Reinvent Thyself. The only time success comes before work is in the dictionary";
 descriptions["1171"] = "Inspired by those that follow their dreams and don't give up.";
 descriptions["1154"] = "Inspired by our love for luxury and wool.";
 descriptions["1143"] = "Perfect for fall/Winter.";
 descriptions["1195"] = "We pay a tribute to the greatest sneakers ever. Thanks Mike!";
 descriptions["1183"] = "Inspired by the pharcyde, you can't keep running away from your dreams, problems, and goals.";
 descriptions["1221"] = "Simple and classic.";
 descriptions["1200"] = "Reasonable Doubt was a timeless album. We aspire to make timeless pieces and be a generation of America's Next top Mogul's.";
 descriptions["1219"] = "We pay a tribute to the greatest sneaker EVER. Thanks Mike!";
 // collection-2008-men
 descriptions["0003"] = "description-0003";
 descriptions["0004"] = "description-0004";
 descriptions["0006"] = "description-0006";
 descriptions["0007"] = "description-0007";
 descriptions["0009"] = "description-0009";
 descriptions["0011"] = "description-0011";
 descriptions["0014"] = "description-0014";
 descriptions["0015"] = "description-0015";
 descriptions["0023"] = "description-0023";
 descriptions["0030"] = "description-0030";
 descriptions["0051"] = "description-0051";
 descriptions["0074"] = "description-0074";
	// collections-2008-spring-summer
 descriptions["0101"] = "";
 descriptions["0102"] = "";
 descriptions["0103"] = "";
 descriptions["0104"] = "";
 descriptions["0105"] = "";
 descriptions["0106"] = "";
 // collections-2008-fall-winter
	descriptions["08fws0001"] = "";
	descriptions["08fws0002"] = "";
	descriptions["08fws0003"] = "";
	descriptions["08fws0004"] = "";
	descriptions["08fws0005"] = "";
	descriptions["08fws0006"] = "";
	// collections-2008-spring-summer
 descriptions["ss0901"] = "";
 descriptions["ss0902"] = "";
 descriptions["ss0903"] = "";
 descriptions["ss0904"] = "";
 descriptions["ss0905"] = "";
 descriptions["ss0906"] = "";
 descriptions["ss0907"] = "";
 descriptions["ss0908"] = "";
 descriptions["ss0909"] = "";
 descriptions["ss0910"] = "";
 descriptions["ss0911"] = "";
 descriptions["ss0912"] = "";
 descriptions["ss0913"] = "";
 descriptions["ss0914"] = "";
 descriptions["ss0915"] = "";
 descriptions["ss0916"] = "";
 descriptions["ss0917"] = "";
 descriptions["ss0918"] = "";
 descriptions["ss0919"] = "";
 descriptions["ss0920"] = "";
 descriptions["ss0921"] = "";
 descriptions["ss0922"] = "";
 descriptions["ss0923"] = "";

 var colors = new Array();
	// collection-2007-fall-winter
 colors["1182"] = new Array( "Black", "Blue" );
 colors["1171"] = new Array( "Silver", "Lavender" );
 colors["1154"] = new Array( "colors-1154" );
 colors["1143"] = new Array( "colors-1143" );
 colors["1195"] = new Array( "Purple", "Black" );
 colors["1183"] = new Array( "Black", "White" );
 colors["1221"] = new Array( "colors-1221" );
 colors["1200"] = new Array( "colors-1200" );
 colors["1219"] = new Array( "Black", "Purple" );
 // collection-2008-men
 colors["0003"] = new Array( "colors-0003" );
 colors["0004"] = new Array( "colors-0004" );
 colors["0006"] = new Array( "colors-0006" );
 colors["0007"] = new Array( "colors-0007" );
 colors["0009"] = new Array( "colors-0009" );
 colors["0011"] = new Array( "colors-0011" );
 colors["0014"] = new Array( "colors-0014" );
 colors["0015"] = new Array( "colors-0015" );
 colors["0023"] = new Array( "colors-0023" );
 colors["0030"] = new Array( "colors-0030" );
 colors["0051"] = new Array( "colors-0051" );
 colors["0074"] = new Array( "colors-0074" );
	// collections-2008-spring-summer
 colors["0101"] = new Array( "Black", "White" );
 colors["0102"] = new Array( "White" );
 colors["0103"] = new Array( "Black", "White" );
 colors["0104"] = new Array( "White" );
 colors["0105"] = new Array( "Black", "White" );
 colors["0106"] = new Array( "Grey", "White" );
 // collections-2008-fall-winter
	colors["08fws0001"] = new Array( "Black", "White", "Heather" );
	colors["08fws0002"] = new Array( "Black", "Navy" );
	colors["08fws0003"] = new Array( "Black", "Navy", "Heather" );
	colors["08fws0004"] = new Array( "White", "Charcoal" );
	colors["08fws0005"] = new Array( "Heather", "Black", "Navy" );
	colors["08fws0006"] = new Array( "White", "Heather" );
	// collections-2008-spring-summer
 colors["ss0901"] = new Array( "colors-ss0901" );
 colors["ss0902"] = new Array( "colors-ss0902" );
 colors["ss0903"] = new Array( "colors-ss0903" );
 colors["ss0904"] = new Array( "colors-ss0904" );
 colors["ss0905"] = new Array( "colors-ss0905" );
 colors["ss0906"] = new Array( "colors-ss0906" );
 colors["ss0907"] = new Array( "colors-ss0907" );
 colors["ss0908"] = new Array( "colors-ss0908" );
 colors["ss0909"] = new Array( "colors-ss0909" );
 colors["ss0910"] = new Array( "colors-ss0910" );
 colors["ss0911"] = new Array( "colors-ss0911" );
 colors["ss0912"] = new Array( "colors-ss0912" );
 colors["ss0913"] = new Array( "colors-ss0913" );
 colors["ss0914"] = new Array( "colors-ss0914" );
 colors["ss0915"] = new Array( "colors-ss0915" );
 colors["ss0916"] = new Array( "colors-ss0916" );
 colors["ss0917"] = new Array( "colors-ss0917" );
 colors["ss0918"] = new Array( "colors-ss0918" );
 colors["ss0919"] = new Array( "Black", "White", "Red" );
 colors["ss0920"] = new Array( "Black", "Purple", "Teal" );
 colors["ss0921"] = new Array( "Black", "White" );
 colors["ss0922"] = new Array( "Black", "Charcoal" );
 colors["ss0923"] = new Array( "Black", "Blue" );

 var sizes = new Array();
	// collection-2007-fall-winter
 sizes["1182"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["1171"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["1154"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["1143"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["1195"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["1183"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["1221"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["1200"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["1219"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 // collection-2008-men
 sizes["0003"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0004"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0006"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0007"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0009"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0011"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0014"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0015"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0023"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0030"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0051"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0074"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	// collections-2008-spring-summer
 sizes["0101"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0102"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0103"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0104"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0105"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 sizes["0106"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
 // collections-2008-fall-winter
	sizes["08fws0001"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["08fws0002"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["08fws0003"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["08fws0004"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["08fws0005"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["08fws0006"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	// collections-2008-spring-summer
	sizes["ss0901"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0902"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0903"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0904"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0905"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0906"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0907"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0908"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0909"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0910"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0911"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0912"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0913"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0914"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0915"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0916"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0917"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );
	sizes["ss0918"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );	
	sizes["ss0919"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );	
	sizes["ss0920"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );	
	sizes["ss0921"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );	
	sizes["ss0922"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );	
	sizes["ss0923"] = new Array( "Small", "Medium", "Large", "X-Large", "XX-Large" );	
	
 var prices = new Array();
	// collection-2007-fall-winter
 prices["1182"] = "$29.99";
 prices["1171"] = "$29.99";
 prices["1154"] = "$29.99";
 prices["1143"] = "$29.99";
 prices["1195"] = "$29.99";
 prices["1183"] = "$29.99";
 prices["1221"] = "$29.99";
 prices["1200"] = "$29.99";
 prices["1219"] = "$29.99";
 // collection-2008-men
 prices["0003"] = "$99.91";
 prices["0004"] = "$99.92";
 prices["0006"] = "$99.93";
 prices["0007"] = "$99.94";
 prices["0009"] = "$99.95";
 prices["0011"] = "$99.96";
 prices["0014"] = "$99.97";
 prices["0015"] = "$99.98";
 prices["0023"] = "$99.99";
 prices["0030"] = "$99.90";
 prices["0051"] = "$99.91";
 prices["0074"] = "$99.92";
	// collections-2008-spring-summer
 prices["0101"] = "$29.99";
 prices["0102"] = "$29.99";
 prices["0103"] = "$29.99";
 prices["0104"] = "$29.99";
 prices["0105"] = "$29.99";
 prices["0106"] = "$29.99";
 // collections-2008-fall-winter
	prices["08fws0001"] = "$29.99";
	prices["08fws0002"] = "$29.99";
	prices["08fws0003"] = "$29.99";
	prices["08fws0004"] = "$29.99";
	prices["08fws0005"] = "$29.99";
	prices["08fws0006"] = "$29.99";
	// collections-2008-spring-summer
 prices["ss0901"] = "$99.99";
 prices["ss0902"] = "$99.99";
 prices["ss0903"] = "$99.99";
 prices["ss0904"] = "$99.99";
 prices["ss0905"] = "$99.99";
 prices["ss0906"] = "$99.99";
 prices["ss0907"] = "$99.99";
 prices["ss0908"] = "$99.99";
 prices["ss0909"] = "$99.99";
 prices["ss0910"] = "$99.99";
 prices["ss0911"] = "$99.99";
 prices["ss0912"] = "$99.99";
 prices["ss0913"] = "$99.99";
 prices["ss0914"] = "$99.99";
 prices["ss0915"] = "$99.99";
 prices["ss0916"] = "$99.99";
 prices["ss0917"] = "$99.99";
 prices["ss0918"] = "$99.99";
 prices["ss0919"] = "$29.99";
 prices["ss0920"] = "$29.99";
 prices["ss0921"] = "$31.99";
 prices["ss0922"] = "$29.99";
 prices["ss0923"] = "$59.99";

 // change image
 var image_name = 'images/collection-' + collection + '/pic_' + item + '_large.jpg';
	if( target == 'parent' )
	 { parent.document.getElementById( 'itemImg' ).src = image_name; }
	else
  { document.getElementById( 'itemImg' ).src = image_name; }
 //alert( image_name );
 
 // change text 
 var text_string  = '';
	if( purchase == 'buy' )
		{
		// online store page
  text_string += '<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
  text_string += '<input type="hidden" name="add" value="1">';
  text_string += '<input type="hidden" name="cmd" value="_cart">';
  text_string += '<input type="hidden" name="business" value="info@reinventthyself.com">';
  text_string += '<input type="hidden" name="no_shipping" value="2">';
  text_string += '<input type="hidden" name="return" value="http://www.reinventthyself.com/thankyou.html">';
  text_string += '<input type="hidden" name="cancel_return" value="http://www.reinventthyself.com/cancel.html">';
  text_string += '<input type="hidden" name="cn" value="How did you hear about us?">';
  text_string += '<input type="hidden" name="currency_code" value="USD">';
  text_string += '<input type="hidden" name="lc" value="US">';
  text_string += '<input type="hidden" name="bn" value="PP-ShopCartBF">';
  text_string += '<input type="hidden" name="item_name" value="' + names[item] + '">';
  text_string += '<input type="hidden" name="amount" value="' + prices[item] + '">';
  text_string += '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
  text_string += '<tr><td height="100">&nbsp;</td></tr>';
  text_string += '<tr><td>&nbsp;</td></tr>';
  text_string += '<tr><td><strong><em>' + names[item] + '</em></strong></td></tr>';
  text_string += '<tr><td>&nbsp;</td></tr>';
  text_string += '<tr><td>' + descriptions[item] + '</td></tr>';
  text_string += '<tr><td>&nbsp;</td></tr>';
  text_string += '<tr><td><table>';
  text_string += '<tr><td><input type="hidden" name="on0" value="size">Sizes</td><td><select name="os0">';	
		for( i=0; i<sizes[item].length; i++ )
   { text_string += '<option value="' + sizes[item][i] + '">' + sizes[item][i]; }
  text_string += '</select></td></tr>';		
  text_string += '<tr><td><input type="hidden" name="on1" value="color">Colorways</td><td><select name="os1">';
		for( i=0; i<colors[item].length; i++ )
   { text_string += '<option value="' + colors[item][i] + '">' + colors[item][i]; }
  text_string += '</select></td></tr>';
  text_string += '</table></td></tr>';
  text_string += '<tr><td>&nbsp;</td></tr>';
  text_string += '<tr><td>&nbsp;</td></tr>';
  text_string += '<tr><td><center>' + prices[item] + '</center></td></tr>';
  text_string += '<tr><td><center><input type="image" src="images/store/add-to-cart.gif" border="0" name="submit" width="122" height="28" alt="Add this item to your ReinventThyself.com shopping cart"></center></td></tr>';
  text_string += '</table>';
  text_string += '</form>';	
		}
 else
  {
		// collections page
		// don't display anything
	 //text_string += '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
  //text_string += '<tr><td height="100">&nbsp;</td></tr>';
  //text_string += '<tr><td>&nbsp;</td></tr>';
  //text_string += '<tr><td><strong><em>' + names[item] + '</em></strong></td></tr>';
  //text_string += '<tr><td>&nbsp;</td></tr>';
  //text_string += '<tr><td>' + descriptions[item] + '</td></tr>';
  //text_string += '<tr><td>&nbsp;</td></tr>';
  //text_string += '<tr><td>' + colors[item] + '</td></tr>';
  //text_string += '<tr><td>&nbsp;</td></tr>';
  //text_string += '</table>';
		}
		
	if( target == 'parent' )
  { parent.document.getElementById( 'itemText' ).innerHTML = text_string; }
	else
	 { document.getElementById( 'itemText' ).innerHTML = text_string; }

 }

