var theImages = new Array();
var theStyle = new Array();
var theFabric = new Array();
var thePrice = new Array();
var alttag = new Array();

var pathprefix = 'images/test_FPX/white_bg/';

	theImages[0] = '1'; // replace with names of images
	theStyle[0] = "Traditional Spread collar with Contour French cuffs.";
	theFabric[0] = "100% Two Ply Superfine Cotton, Maroon Check .";
	thePrice[0] = "$75";
	alttag[0] = "Traditional Spread collar with Contour French cuffs ";
	
	theImages[1] = '2'; // replace with names of images
	theStyle[1] = "Tab Collar with Rounded French Cuffs.";
	theFabric[1] = "100% Two Ply Superfine Cotton, Yellow Stripe .";
	thePrice[1] = "$75";
	alttag[1] = "Tab Collar with Rounded French Cuffs";
	
	theImages[2] = '3' // replace with names of images
	theStyle[2] = "Classic Spread Collar with Two Button Cut Away Cuffs.";
	theFabric[2] = "100% Two Ply Superfine Cotton , French Blue end on end.";
	thePrice[2] = "$75 ";
	alttag[2] = "Classic Spread Collar with Two Button Cut Away Cuffs.";
	
	theImages[3] = '4'; // replace with names of images
	theStyle[3] = " English Spread collar with Square French cuffs, . ";
	theFabric[3] = "100% Two Ply Superfine Cotton,Dark Blue White stripe with White collar and cuff . ";
	thePrice[3] = "$75";
	alttag[3] = " English Spread collar with Square French cuffs";

	theImages[4] = '5'; // replace with names of images
	theStyle[4] = "Narrow Contour collar  with  Contour French cuffs.";
	theFabric[4] = "100% Two Ply Superfine Cotton,Blue white stripe with White collar and cuff .";
	thePrice[4] = "$75";
	alttag[4] = "Narrow Contour collar with Contour French cuffs";
	
	theImages[5] = '6'; // replace with names of images
	theStyle[5] = "Traditional Spread collar with Square French cuffs.";
	theFabric[5] = "100% Two Ply Superfine Cotton,Blue Pink Check .";
	thePrice[5] = "$75";
	alttag[5] = "Traditional Spread collar with Square French cuffs";

	theImages[6] = '7'; // replace with names of images
	theStyle[6] = "Hidden Button down collar with 2 Button Cut Away cuffs.";
	theFabric[6] = "100% Two Ply Superfine Cotton, Blue Purple Check .";
	thePrice[6] = "$75";
	alttag[6] = "Hidden Button down collar with 2 Button Cut Away cuffs";
	
	theImages[7] = '8' // replace with names of images
	theStyle[7] = "Classic Button down collar with 1 Button Rounded cuffs.";
	theFabric[7] = "100% Two Ply Superfine Cotton,Navy Lavender Check - Oxford .";
	thePrice[7] = "$75 ";
	alttag[7] = "Classic Button down collar with 1 Button Rounded cuffs";
	
	theImages[8] = '9'; // replace with names of images
	theStyle[8] = "Classic Spread collar  with  1 Button cut-away cuffs. ";
	theFabric[8] = "100% Two Ply Superfine Cotton, Blue Navy. ";
	thePrice[8] = "$65";
	alttag[8] = "Classic Spread collar  with  1 Button cut-away cuffs";

	theImages[9] = '10'; // replace with names of images
	theStyle[9] = "English Cut-Away collar with Square French cuffs.";
	theFabric[9] = "100% Two Ply Superfine Cotton , Blue Red Stripe with White collar and cuff.";
	thePrice[9] = "$65";
	alttag[9] = "English Cut-Away collar with Square French cuffs";
	
	theImages[10] = '11'; // replace with names of images
	theStyle[10] = "Classic Straight with Pin Holes collar with Contour French cuffs.";
	theFabric[10] = "100% Two Ply Superfine Cotton, Tan Twill .";
	thePrice[10] = "$75";
	alttag[10] = "Classic Straight with Pin Holes collar with Contour French cuffs.";
	
	theImages[11] = '12' // replace with names of images
	theStyle[11] = "Classic Straight collar with Contour French cuffs.";
	theFabric[11] = "100% Two Ply Superfine Cotton,Light Lavender Twill.";
	thePrice[11] = "$75 ";
	alttag[11] = "Classic Straight collar with Contour French cuffs";
	
	theImages[12] = '13'; // replace with names of images
	theStyle[12] = "Hidden Button down collar with one Button cut-away cuffs. ";
	theFabric[12] = "100% Two Ply Superfine Cotton,Light Blue Nailhead. ";
	thePrice[12] = "$75";
	alttag[12] = "Hidden Button down collar with one Button cut-away cuffs.";

	theImages[13] = '14'; // replace with names of images
	theStyle[13] = "Contour Spread collar with one Button Rounded cuffs.";
	theFabric[13] = "100% Two Ply Superfine Cotton,Lime Green Herringbone .";
	thePrice[13] = "$75";
	alttag[13] = "Contour Spread collar with one Button Rounded cuffs";
	
	theImages[14] = '15'; // replace with names of images
	theStyle[14] = "Classic Spread collar  with  one Button cut-away cuffs.";
	theFabric[14] = "100% Two Ply Superfine Cotton,Brown Tan Stripe .";
	thePrice[14] = "$75";
	alttag[14] = "Classic Spread collar  with  one Button cut-away cuffs";
	
	theImages[15] = '16' // replace with names of images
	theStyle[15] = "Classic Spread Collar with Two Button Cut Away Cuffs.";
	theFabric[15] = "100% Two Ply Superfine Cotton, Blue with Lavender check .";
	thePrice[15] = "$75 ";
	alttag[15] = "Classic Spread Collar with Two Button Cut Away Cuffs";
	
	theImages[16] = '17'; // replace with names of images
	theStyle[16] = "Rounded collar with Eyelets/Pin Holes and Square French cuffs. ";
	theFabric[16] = "100% Two Ply Superfine Cotton,Pink on Pink Tonal Stripe . ";
	thePrice[16] = "$75";
	alttag[16] = "Rounded collar with Eyelets/Pin Holes and Square French cuffs";
	
	theImages[17] = '18'; // replace with names of images
	theStyle[17] = "English Cut-Away collar with Square French cuffs.";
	theFabric[17] = "100% Two Ply Superfine Cotton,Orange White Stripe .";
	thePrice[17] = "$75";
	alttag[17] = "English Cut-Away collar with Square French cuffs";
	
	theImages[18] = '19' // replace with names of images
	theStyle[18] = "English Spread collar with Contour French cuffs.";
	theFabric[18] = "100% Two Ply Superfine Cotton, Pink Twill.";
	thePrice[18] = "$75 ";
	alttag[18] = "English Spread collar with Contour French cuffs";




var j = 0
var p = theImages.length;
var preBuffer = new Array();

for (i = 0; i < p; i++){
	preBuffer[i] = new Image();
	preBuffer[i].src = theImages[i];
}

var whichImage = Math.round(Math.random()*(p-1));

function showImage(){	
	//script Modified By Vejai On 2 June 2007
	//Reason: Client wants the image to fetch in the resolution based.
	var windowWidth = 0;
	windowWidth = screen.availWidth;
	//alert(windowWidth + "--->" + theImages[whichImage]);
	if(windowWidth  >= 1280)
	{
		document.write('<a href ="javascript:shirtShowcase(\''+pathprefix+theImages[whichImage] +'_b.jpg'+'\')" ><img src="' + pathprefix +theImages[whichImage] + '_bg.jpg"  border=0 alt="'+alttag[whichImage]+'"/></a>');
	}
	else
	{
	// script modified for shirt showcase popup window from homepage, by raghavan, 6-4-2006 //
	document.write('<a href ="javascript:shirtShowcase(\''+pathprefix+theImages[whichImage] +'_b.jpg'+'\')" ><img src="' + pathprefix +theImages[whichImage] + '.jpg"  border=0 alt="'+alttag[whichImage]+'"/></a>');
	}
}


function showstyle(){
	document.write("<span class='gl_title'>Style: </span><span class='gl_text'>" + theStyle[whichImage]);
}
function showfabric(){
	document.write("<span class='gl_title'>Fabrics: </span><span class='gl_text'>" + theFabric[whichImage]);
}
function showprice(){
	document.write("<span class='gl_title'>Price: </span><span class='gl_text'>" + thePrice[whichImage]);
}

<!--
var newWin = null;

//script for shirt showcase larger image from homepage, by raghavan, 6-04-2006//

	function shirtShowcase(theURL) { //v2.0
 
 
  	if (newWin != null && !newWin.closed) {
		newWin.close();
	}	
	
	newWin = window.open(theURL, 'shirtShowcase', 'width=461,height=650px,resizable=no'); 
	newWin.document.writeln('<html> <head><style> .FabricName{font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;color: #000000;}</style>');
	newWin.document.writeln('</head>');
	newWin.document.writeln('<body style="margin:0px;padding:10px;" >');
	
	newWin.document.writeln('<table width="100%" height="57" border="0" cellpadding="0" cellspacing="0"><tr>');
	

	newWin.document.writeln('<td align="left" valign="top" nowrap background="images/header_classic/t_gradientBar.jpg"><img src="images/newsletter/MyTailorLogo.jpg" alt="MyTailor.com"  /></td>');
	newWin.document.writeln('<td width="50" align="center" valign="middle" nowrap background="images/header_classic/t_gradientBar.jpg"><a href="javascript:window.print();"><img src="images/print_small_but.gif"  border="0" /></a></td>');
	newWin.document.writeln('<td width="50" align="center" valign="middle" nowrap background="images/header_classic/t_gradientBar.jpg"><a href="javascript:window.close()"><img src="images/close_small_but.gif"  border="0" /></a></td>');
	newWin.document.writeln(' <td width="17" align="right" valign="top" background="images/header_classic/t_gradientBar.jpg"><img src="images/header_classic/t_rtendcurve.gif"  /></td>');	
	newWin.document.writeln('</tr></table>');	
	
	//
	newWin.document.writeln('<table cellspacing="0" cellpadding="0" border="0" width="100%" align="center" style="border:1px solid #3D5D8C;">');
	newWin.document.writeln('<tr><td align="center" colSpan="2" valign=center style="padding-top:5px;" >');
	newWin.document.writeln('<img src="' + theURL + '"/> <br /><br />');
	newWin.document.writeln('</td></tr> <tr> <td class="FabricName" vAlign="middle" colSpan="2" height="30px" style="padding:5px;text-alignment:justify; border-top:1px solid #3D5D8C;border-bottom:1px solid #3D5D8C;">')
	newWin.document.writeln('<strong>Style:'+ theStyle[whichImage] +'</strong>');
	newWin.document.writeln('</td></tr> <tr><td class="FabricName" height="30px" width="100%" style="padding:5px;text-alignment:justify;border-bottom:1px solid #3D5D8C;">');
	newWin.document.writeln('<strong>Fabrics:' + theFabric[whichImage] +'</strong>');
	newWin.document.writeln('</td></tr> <tr><td class="FabricName" height="30px"  width="100%" style="padding:5px;text-alignment:justify;">');
	newWin.document.writeln('<strong>Price:' + thePrice[whichImage] +'</strong>');
	newWin.document.writeln('<td></tr></table>');
	newWin.document.writeln('</body></html>');
	newWin.focus();
}
//-->

// end of popup shirt showcase script //
