var arPrice = new Array;
var colArray = new Array;
var bl = 'blue';
var red = 'red';
var gr = 'green';
var blk = 'black';

function GetFolder( path )
{
	var iii = path.lastIndexOf("\\");
	var folder = path.substring(iii+1);
	iii = folder.indexOf(".htm");
	var jjj = folder.indexOf("/") == 0 ? 1: 0;
	folder = folder.substring(jjj,iii);
	folder = 'images/'+ folder;
	return folder;
}

function Fill11()
{
	FillArray( 0,12,19.4,17.4,14,13 );
 	FillArray( 5,14,22.4,21.4,16,15 );
 	FillArray( 10,16,26.4,24.4,19,18);
 	Colors(bl,red,gr,blk);
 	BiggerImage( 'images/acrylic/xlarge_CAP.jpg','CAP','SW', 3, 4);
}

function Colors(p1,p2,p3,p4)
{
	colArray [0]= p1;
	colArray [1] = p2;
	colArray [2]= p3;
	colArray [3] = p4;
}

function FillArray( num,p1,p2,p3,p4,p5 )
{
// alert("111");
	arPrice[num]= p1;
	arPrice[num +1] = p2;
	arPrice[num +2]= p3;
	arPrice[num +3] = p4;
	arPrice[num +4] = p5;
}
function BiggerImage( img, wname,catalog,rowNum,colors )
{
//	wname = catalog;
	WinObj=window.open( '', wname,'HEIGHT=680,WIDTH=460,scrollbars=yes,resizable=yes',false);
	WinObj.focus();
	WinObj.document.open();
	WinObj.document.writeln('<center>Index: <b>' + wname + '</b>   Catalog: <b>' + catalog + '</b></center>');
	WinObj.document.writeln('<center><img src='+img+'></center>');
	WinObj.document.writeln( '<center><br><b>Please call (510)451-7303 for prices.</center>');


	WinObj.document.writeln('<p align="center"><INPUT TYPE="button"  VALUE="Close" ONCLICK=window.close()></p>');
	WinObj.document.close();
	WinObj.focus(); 
}

function BiggerImageOld( img, wname,catalog,rowNum,colors )
{
	rowNum = 3;
	colors = 4;
	wname = catalog;
	Colors(bl,red,gr,blk);
	FillArray( 0,12,19.4,17.4,14,13 );
 	FillArray( 5,14,22.4,21.4,16,15 );
 	FillArray( 10,16,26.4,24.4,19,18);
	WinObj=window.open( '', wname,'HEIGHT=680,WIDTH=460,scrollbars=yes,resizable=yes',false);
	WinObj.focus();
	WinObj.document.open();
	WinObj.document.writeln('<center>Index: <b>' + wname + '</b>   Catalog: <b>' + catalog + '</b></center>');
	WinObj.document.writeln('<center><img src='+img+'></center>');
//	WinObj.document.writeln('<img name = "BigName" src='+img+'>');
//	WinObj.document.writeln('<img src='+img + ' width="400" height="500">');	
//	WinObj.document.writeln('<img src='+img + ' width="400" height="500"><br><center>Index: <b>' + wname + '</b>   Catalog: <b>' + catalog + '</b></center>');
//	alert(WinObj.document.all("BigName").height);
	if( colors > 0 )
	{
		WinObj.document.writeln('<center>Colors: ');
		for( var i1=0; i1 < colors; i1++ )
		{
			WinObj.document.writeln('<b>' + colArray[i1] + '</b>');
		}
		WinObj.document.writeln('</center>');
	}
	WinObj.document.writeln( '<table align="center" border=2 cellpadding=2 cellspacing=2>' +
							'<tr>' +
							'<th><font size=2>Size/Quantity</font></th>' +
							'<th><font size=2>1-5</font></th>' +
							'<th><font size=2>6-12</font></th>' +
							'<th><font size=2>13-50</font></th>' +
							'<th><font size=2>51+</font></th>' +
							'</tr>');
	var ls = '';
	var num = 5;				
	for( var i=0; i < rowNum; i++ )
	{
		ls+='<tr>';
		for( var j=i*num; j < (i+1)*num; j++ )
		{
			if( j == num*i )
			{
     			ls+='<th><font size=2>' + arPrice[j] +'\'\'' + '</font></th>';
    		} 
    		else
    		{
     			ls+='<th><font size=2>$' + arPrice[j] + '</font></th>'; 
     		}
		}
		ls+='</tr>';
	}
	ls+='</table>';
//	alert(ls);
	WinObj.document.writeln( ls );

	WinObj.document.writeln('<p align="center"><INPUT TYPE="button"  VALUE="Close" ONCLICK=window.close()></p>');
	WinObj.document.close();
	WinObj.focus(); 
}


