// JavaScript Document
window.addEventListener?window.addEventListener("load",so_init,false):window.attachEvent("onload",so_init);

var d=document, imgs1 = new Array(), imgs2 = new Array(), zInterval = null, current=0, pause=false;


function changeToKitchen () 
{

	document.getElementById('TileIntro').style.display='none';
	document.getElementById('KitchenCategory').style.display='';
	document.getElementById('KitOrBath').value='Kitchen';
	document.getElementById('Options').style.display='none';
}

function changeToBath () 
{

	document.getElementById('TileIntro').style.display='none';
	document.getElementById('BathCategory').style.display='';
	document.getElementById('KitOrBath').value='Bath';
	document.getElementById('Options').style.display='none';
}

function changeToStep1()
{
	document.getElementById('customImage').src="http://www.paulbrent.com/Store/images/customtiles/LoadHoriz.gif";
	document.getElementById('imageFrame').src="http://www.paulbrent.com/Store/images/customtiles/LoadHoriz.gif";
	document.getElementById('imageInstall').src="http://www.paulbrent.com/Store/images/customtiles/LoadHoriz.gif";

	document.getElementById('Framed').style.display='none';
	document.getElementById('Artwork').style.display='none';
	document.getElementById('BathCategory').style.display='none';
	document.getElementById('KitchenCategory').style.display='none';
	document.getElementById('TileIntro').style.display='';
	document.getElementById('Options').style.display='none';
}

function changeToStep2()
{
	document.getElementById('customImage').src="http://www.paulbrent.com/Store/images/customtiles/LoadHoriz.gif";
	document.getElementById('imageFrame').src="http://www.paulbrent.com/Store/images/customtiles/LoadHoriz.gif";
	document.getElementById('imageInstall').src="http://www.paulbrent.com/Store/images/customtiles/LoadHoriz.gif";
	finishText1 = document.getElementById('layoutAttribute');
    finishText1.innerHTML = '2 tiles x 3 tiles - 12" x 18"';
	document.getElementById('Framed').style.display='none';

	if (document.getElementById('KitOrBath').value=='none')
	{
		alert('An error has occured');
	}
	else if (document.getElementById('KitOrBath').value=='Kitchen')
	{
		changeToKitchen();
	}
	else
	{
		changeToBath();
	}	
	document.getElementById('Artwork').style.display='none';
}

function changeToArtWork (subcategory)
{	
	finishText1 = document.getElementById('layoutAttribute');
    finishText1.innerHTML = '2 tiles x 3 tiles - 12" x 18"';
	document.getElementById('customImage').src="http://www.paulbrent.com/Store/images/customtiles/LoadHoriz.gif";
	document.getElementById('imageFrame').src="http://www.paulbrent.com/Store/images/customtiles/LoadHoriz.gif";
	document.getElementById('imageInstall').src="http://www.paulbrent.com/Store/images/customtiles/LoadHoriz.gif";
	
	document.getElementById('Work1').innerHTML="";
	document.getElementById('Work2').innerHTML="";
	document.getElementById('Work3').innerHTML="";
	document.getElementById('Work4').innerHTML="";
	document.getElementById('Work5').innerHTML="";
	document.getElementById('Work6').innerHTML="";
	document.getElementById('Work7').innerHTML="";
	document.getElementById('Work8').innerHTML="";
	if (subcategory==null)
	{
		subcategory=document.getElementById('SubCat').value;
	}
	else
	{
		document.getElementById('SubCat').value=subcategory;
	}

	if (subcategory=='Fruit')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1490"'+")'><img width='150' src='images/product/medium/1490.jpg' /><br />Sugar Loaf Pineapple</a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB07509"'+")'><img width='175' src='images/product/medium/07509--Vintage-Pears.jpg' /><br />Vintage Pears</a>";
		document.getElementById('Work3').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1489"'+")'><img width='150' src='images/product/medium/1489.jpg' /><br />Queen Pineapple</a>";
	}
	if (subcategory=='Wine')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1503"'+")'><img width='175' src='images/product/medium/1503.jpg' /><br />Vintage Wine I</a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1504"'+")'><img width='175' src='images/product/medium/1504.jpg' /><br />Vintage Wine II</a>";
	}
	if (subcategory=='Birds')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1521"'+")'><img width='150' src='images/product/medium/1521.jpg' /><br />Bamboo Flamingo</a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB00011"'+")'><img width='175' src='images/product/medium/00011-tropical-birds-II.jpg' /><br />Tropical Birds II </a>";
	}
	if (subcategory=='Carib')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1467"'+")'><img width='175' src='images/product/medium/1467.jpg' /><br />Palm Bay</a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1340"'+")'><img width='175' src='images/product/medium/1340.jpg' /><br />Island Boat</a>";
	}
	if (subcategory=='Medit')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB06012"'+")'><img width='150' src='images/product/medium/06012-Portofino-Cafe.jpg' /><br />Portofino Caf&eacute; </a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB06013"'+")'><img width='150' src='images/product/medium/06013-Cafe-Cheri.jpg' /><br />Caf&eacute; Cheri </a>";
		document.getElementById('Work3').innerHTML="<a href='#' onClick='changeToFramed("+'"PB06014"'+")'><img width='150' src='images/product/medium/06014-Bistro-St-Emil.jpg' /><br />Bistro St. Emil </a>";
		document.getElementById('Work4').innerHTML="<a href='#' onClick='changeToFramed("+'"PB03074"'+")'><img width='175' src='images/product/medium/03074-puerto-del-mar_1.jpg' /><br />Puerto del Mar I </a>";
		document.getElementById('Work5').innerHTML="<a href='#' onClick='changeToFramed("+'"PB04059"'+")'><img width='175' src='images/product/medium/04059-antigua1.jpg' /><br />Antigua I </a>";
		document.getElementById('Work6').innerHTML="<a href='#' onClick='changeToFramed("+'"PB04052"'+")'><img width='150' src='images/product/medium/04052-veneto-window-II.jpg' /><br />Veneto Window </a>";
	}
	if (subcategory=='Beach')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1290"'+")'><img width='175' src='images/product/medium/1290.jpg' /><br />Sandpiper Dunes  </a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1456"'+")'><img width='150' src='images/product/medium/1456.jpg' /><br />Tranquility  </a>";
		document.getElementById('Work3').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1344"'+")'><img width='175' src='images/product/medium/1344.jpg' /><br />Topsail Hill </a>";
		document.getElementById('Work4').innerHTML="<a href='#' onClick='changeToFramed("+'"PB04024"'+")'><img width='175' src='images/product/medium/04024-cabana-red-deckchair.jpg' /><br />Cabana Stripe Series </a>";
	}	
	if (subcategory=='Boats')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB06060"'+")'><img width='175' src='images/product/medium/06060-bright-boat-harbor.jpg' /><br />Bright Boat Harbor</a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB00032"'+")'><img width='175' src='images/product/medium/00032-spinnaker-3.jpg' /><br />Spinnaker III</a>";
	}
	if (subcategory=='Chairs')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB03133"'+")'><img width='175' src='images/product/medium/03133-sand-and-shadows.jpg' /><br />Sand & Shadows</a>";
	}
	if (subcategory=='Light')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1265"'+")'><img width='175' src='images/product/medium/1265.jpg' /><br />Passing the Light</a>";
	}
	if (subcategory=='Shells')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB05098"'+")'><img width='175' src='images/customtiles/ProductImages/PB05098M_PIC.jpg' /><br />Mosaic Shells</a>";
	}
	if (subcategory=='Palm')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB05020"'+")'><img width='175' src='images/product/medium/05020-palm-breeze-3.jpg' /><br />Palm Breeze Horizontal</a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1458"'+")'><img width='150' src='images/product/medium/1458.jpg' /><br />Twin Palms </a>";
		document.getElementById('Work3').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1459"'+")'><img width='150' src='images/product/medium/1459.jpg' /><br />Solitary Palms  </a>";
	}
	if (subcategory=='Sealife')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1267"'+")'><img width='175' src='images/product/medium/1267.jpg' /><br />Dolphin Duo</a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1216"'+")'><img width='175' src='images/product/medium/1216.jpg' /><br />Turtle Nestlings</a>";
	}	
	if (subcategory=='Wildlife')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1198"'+")'><img width='175' src='images/product/medium/1198.jpg' /><br />Wetland Mallard: Male </a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB98030"'+")'><img width='175' src='images/product/medium/98030-bass-extension.jpg' /><br />Bass Fish </a>";
	}
	if (subcategory=='Floral')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB95073"'+")'><img width='175' src='images/product/medium/95073-sunflowers-new-bdr.jpg' /><br />Sunflowers</a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB96090"'+")'><img width='175' src='images/product/medium/96090-daisyfield.jpg' /><br />Daisyfield</a>";
	}	
	if (subcategory=='Balloons')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB00035"'+")'><img width='175' src='images/product/medium/00035-balloons1.jpg' /><br />Balloons I</a>";
	}
	if (subcategory=='Juvenile')
	{
		document.getElementById('Work1').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1495"'+")'><img width='150' src='images/product/medium/1495.jpg' /><br />Seafriends Octopus </a>";
		document.getElementById('Work2').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1496"'+")'><img width='150' src='images/product/medium/1496.jpg' /><br />Seafriends Blowfish  </a>";
		document.getElementById('Work3').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1497"'+")'><img width='150' src='images/product/medium/1497.jpg' /><br />Seafriends Crab  </a>";
		document.getElementById('Work4').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1498"'+")'><img width='150' src='images/product/medium/1498.jpg' /><br />Seafriends Seahorse</a>";
		document.getElementById('Work5').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1462"'+")'><img width='150' src='images/product/medium/1462.jpg' /><br />Howard the Lion</a>";
		document.getElementById('Work6').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1463"'+")'><img width='150' src='images/product/medium/1463.jpg' /><br />Fred the Elephant </a>";
		document.getElementById('Work7').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1464"'+")'><img width='150' src='images/product/medium/1464.jpg' /><br />Sam the Hippo </a>";
		document.getElementById('Work8').innerHTML="<a href='#' onClick='changeToFramed("+'"PB1465"'+")'><img width='150' src='images/product/medium/1465.jpg' /><br />Gerald the Giraffe </a>";
	}
	document.getElementById('Framed').style.display='none';
	document.getElementById('Artwork').style.display='';
	document.getElementById('BathCategory').style.display='none';
	document.getElementById('KitchenCategory').style.display='none';
	document.getElementById('TileIntro').style.display='none';
	document.getElementById('Options').style.display='none';
	
	
	
}

function changeToFramed(prodnum)
{
	if (prodnum==null)
	{
		prodnum=document.getElementById('ProdNum').value;
	}
	else
	{
		document.getElementById('ProdNum').value=prodnum;
	}
	var isVertical='N'
	switch(document.getElementById('ProdNum').value)
	{
		case 'PB1490':
		case 'PB1489':
		case 'PB1521':
		case 'PB06012':
		case 'PB06013':
		case 'PB06014':
		case 'PB04059':
		case 'PB04052':
		case 'PB1456':
		case 'PB1458':
		case 'PB1459':
		case 'PB1495':
		case 'PB1496':
		case 'PB1497':
		case 'PB1498':
		case 'PB1462':
		case 'PB1463':
		case 'PB1464':
		case 'PB1465':
			isVertical='Y'
			break;
	}
	var squaresonly='N'
	var wideonly='N'
	
	switch(document.getElementById('ProdNum').value)
	{
		case 'PB1495':
		case 'PB1496':
		case 'PB1497':
		case 'PB1498':
		case 'PB1462':
		case 'PB1463':
		case 'PB1464':
		case 'PB1465':
			squaresonly='Y';
			break;
		case 'PB1521':
		case 'PB1198':
		case 'PB05020':
		case 'PB04024':
		case 'PB04052':
		case 'PB1504':
			wideonly='Y';
			break;
	}
	
	finishText1=document.getElementById('layoutAttribute');
	
    if(isVertical=='N')
		finishText1.innerHTML='2 tiles x 3 tiles - 12" x 18"';
	else
		finishText1.innerHTML='3 tiles x 2 tiles - 18" x 12"';
	if (squaresonly=='Y')
	{
		document.getElementById('imageFrame').src='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'M_PIC.jpg&size=2x2&frame=4&materialtype=1';
		document.getElementById('imageInstall').src='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'M_PIC.jpg&size=2x2&frame=0&materialtype=1';
		finishText1.innerHTML='2 tiles x 2 tiles - 12" x 12"';

	}
	else
	{
		document.getElementById('imageFrame').src='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'M_PIC.jpg&size=2x3&frame=4&materialtype=1';
		document.getElementById('imageInstall').src='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'M_PIC.jpg&size=2x3&frame=0&materialtype=1';
	}
	document.getElementById('ProdNum').value=prodnum;
	document.getElementById('Framed').style.display='';
	document.getElementById('Artwork').style.display='none';
	document.getElementById('BathCategory').style.display='none';
	document.getElementById('KitchenCategory').style.display='none';
	document.getElementById('TileIntro').style.display='none';
	document.getElementById('Options').style.display='none';
	
}

function changeToOptions(framedOpt)
{
	document.getElementById('framedOption').value=framedOpt;
	prodnum=document.getElementById('ProdNum').value;	

	document.getElementById('Framed').style.display='none';
	document.getElementById('Artwork').style.display='none';
	document.getElementById('BathCategory').style.display='none';
	document.getElementById('KitchenCategory').style.display='none';
	document.getElementById('TileIntro').style.display='none';
	document.getElementById('Options').style.display='';
	var squaresonly='N'
	var wideonly='N'
	switch(document.getElementById('ProdNum').value)
	{
		case 'PB1495':
		case 'PB1496':
		case 'PB1497':
		case 'PB1498':
		case 'PB1462':
		case 'PB1463':
		case 'PB1464':
		case 'PB1465':
			squaresonly='Y';
			break;
		case 'PB1521':
		case 'PB1198':
		case 'PB05020':
		case 'PB04024':
		case 'PB04052':
		case 'PB1504':
			wideonly='Y';
			break;
	}

	if (document.getElementById('framedOption').value=='Framed')
	{

	

		if (squaresonly=='Y')
		{
			document.getElementById('customImage').src='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'M_PIC.jpg&size=2x2&frame=4&materialtype=1';
			document.getElementById('largeURL').value='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'L_PIC.jpg&size=2x2&frame=4&materialtype=1';
		}
		else
		{
			document.getElementById('customImage').src='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'M_PIC.jpg&size=2x3&frame=4&materialtype=1';
			document.getElementById('largeURL').value='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'L_PIC.jpg&size=2x3&frame=4&materialtype=1';
		}
		document.getElementById('chooseFrame').style.display='';
		
		document.getElementById('matID').innerHTML='<select name="matID2" id="matID2" onChange="frameMat();"><option>Select Material</option><option value="1">4.25" Ceramic Tile</option><option value="2">6" Ceramic Tile</option></select>';
	}
	else
	{
		if (squaresonly=='Y')
		{
			document.getElementById('customImage').src='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'M_PIC.jpg&size=2x2&frame=0&materialtype=1';
			document.getElementById('largeURL').value='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'L_PIC.jpg&size=2x2&frame=0&materialtype=1';
		}
		else
		{
			document.getElementById('customImage').src='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'M_PIC.jpg&size=2x3&frame=0&materialtype=1';
			document.getElementById('largeURL').value='http://www.paulbrent.com/Store/GetImage9.php?src=http://www.paulbrent.com/Store/images/customtiles/ProductImages/' + prodnum + 'L_PIC.jpg&size=2x3&frame=0&materialtype=1';
		}
		document.getElementById('chooseFrame').style.display='none';
		document.getElementById('matID').innerHTML='<select name="matID2" id="matID2" onChange="installMat();"><option>Select Material</option><option value="1">4.25" Ceramic Tile</option><option value="2">6" Ceramic Tile</option><option value="3">4" Tumbled Marble Tile</option><option value="4">6" Tumbled Marble Tile</option></select>';
	}
}

function changeImage(picurl)
{
	document.getElementById('ProdNum').value=picurl;
}







function changepic2 () 
{

	picurl=document.getElementById('ProdNum').value;
	var framed=0;
	var picrul2='blah';
	framePrice=0.00;
	frameHTML=document.forms['tileForm'].elements['frameSelect'];
	var mark='0';
	
	
	if(document.getElementById('frameDesc').innerHTML=='Installation')	
		mark='1';
	
	for (var i=0; i < frameHTML.length; i++)
	{

		
		
 		if (frameHTML[i].checked)
    	{
		  	if(frameHTML[i].value=='NaturalOak')
		  	{
				picurl2='&frame=2';
				framed=1;
				framePrice=.5;
				frameWidth=1.375;

				document.getElementById('frameDesc').innerHTML='Cherry 1 3/8"';
				SKU="Cherry_1.375_inch";

			}
  			if(frameHTML[i].value=='Black')
			{
				picurl2='&frame=1';
				framed=1;
				framePrice=.5;
				frameWidth=1.375;
				document.getElementById('frameDesc').innerHTML='Mahogany 1 3/8"';
				SKU="Mahogany_1.375_inch";
			}
			if(frameHTML[i].value=='Metal1')
			{
				picurl2='&frame=50';
				framed=1;
				framePrice=.5;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Silver 3/4"';
				SKU="Silver_0.75_inch";
			}
			if(frameHTML[i].value=='Metal2')
			{
				picurl2='&frame=51';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Bermuda Peach 3/4"';
				SKU="Bermuda_peach_0.75_inch";
			}
			if(frameHTML[i].value=='Metal3')
			{
				picurl2='&frame=52';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Navy Blue 3/4"';
				SKU="Navy_blue_0.75_inch";
			}
			if(frameHTML[i].value=='Metal4')
			{
				picurl2='&frame=53';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Kelly Green 3/4"';
				SKU="Kelly_green_0.75_inch";

			}
			if(frameHTML[i].value=='Metal5')
			{
				picurl2='&frame=54';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Red 3/4"';
				SKU="Red_0.75_inch";
			}
			if(frameHTML[i].value=='Metal6')
			{
				picurl2='&frame=55';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Yellow 3/4"';
				SKU="Yellow_0.75_inch";
			}
			if(frameHTML[i].value=='Wood3')
			{
				picurl2='&frame=3';
				framed=1;
				framePrice=.5;
				frameWidth=1.625;
				document.getElementById('frameDesc').innerHTML='White 1 5/8"';
				SKU="White_1.625_inch";
			}
			if(frameHTML[i].value=='Wood4')
			{
				picurl2='&frame=4';
				framed=1;
				framePrice=.5;
				frameWidth=1.625;
				document.getElementById('frameDesc').innerHTML='Clear 1 5/8"';
				SKU="Clear_1.625_inch";
			}
			if(frameHTML[i].value=='Wood5')
			{
				picurl2='&frame=5';
				framed=1;
				framePrice=.5;
				frameWidth=1.625;
				document.getElementById('frameDesc').innerHTML='Honey 1 5/8"';
				SKU="Honey_1.625_inch";
			}
			if(frameHTML[i].value=='Wood6')
			{
				picurl2='&frame=6';
				framed=1;
				framePrice=.5;
				frameWidth=1.625;
				document.getElementById('frameDesc').innerHTML='Mahogany 1 5/8"';
				SKU="Mahogany_1.625_inch";
			}
			if(frameHTML[i].value=='Wood7')
			{
				picurl2='&frame=7';
				framed=1;
				framePrice=.5;
				frameWidth=1.625;
				document.getElementById('frameDesc').innerHTML='Walnut 1 5/8"';
				SKU="Walnut_1.625_inch";
			}
			if(frameHTML[i].value=='Wood8')
			{
				picurl2='&frame=8';
				framed=1;
				framePrice=.5;
				frameWidth=1.625;
				document.getElementById('frameDesc').innerHTML='Charcoal 1 5/8"';
				SKU="Charcoal_1.625_inch";
			}
			if(frameHTML[i].value=='Metal7')
			{
				picurl2='&frame=56';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Cookie 3/4"';
				SKU="Cookie_0.75_inch";
			}
			if(frameHTML[i].value=='Metal8')
			{
				picurl2='&frame=57';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Dark Brown 3/4"';
				SKU="Dark_brown_0.75_inch";
			}
			if(frameHTML[i].value=='Metal9')
			{
				picurl2='&frame=58';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Cherry 3/4"';
				SKU="Cherry_0.75_inch";
			}
			if(frameHTML[i].value=='Metal10')
			{
				picurl2='&frame=59';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Tangerine 3/4"';
				SKU="Tangerine_0.75_inch";
			}
			if(frameHTML[i].value=='Metal11')
			{
				picurl2='&frame=60';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Matte Black 3/4"';
				SKU="Matte_black_0.75_inch";
			}
			if(frameHTML[i].value=='Metal12')
			{
				picurl2='&frame=61';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Pickled Rose 3/4"';
				SKU="Pickled_rose_0.75_inch";
			}
			if(frameHTML[i].value=='Metal13')
			{
				picurl2='&frame=62';
				framed=1;
				frameWidth=.75;
				framePrice=.6;
				document.getElementById('frameDesc').innerHTML='Grape 3/4"';
				SKU="Grape_0.75_inch";
			}
			if(frameHTML[i].value=='Metal14')
			{
				picurl2='&frame=63';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Dark Green 3/4"';
				SKU="Dark_green_0.75_inch";
			}
			if(frameHTML[i].value=='Metal15')
			{
				picurl2='&frame=64';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Aqua Blue 3/4"';
				SKU="Aqua_blue_0.75_inch";
			}
			if(frameHTML[i].value=='Metal16')
			{
				picurl2='&frame=65';
				framed=1;
				framePrice=.6;
				frameWidth=.75;
				document.getElementById('frameDesc').innerHTML='Pickled Gray 3/4"';
				SKU="Pickled_gray_0.75_inch";
			}
			if(frameHTML[i].value=='Metal17')
			{
				picurl2='&frame=66';
				framed=1;
				framePrice=.4;
				frameWidth=.5;
				document.getElementById('frameDesc').innerHTML='Black w/ Cherry Pin Stripes 1/2"';
				SKU="Black_cherrypins_0.5_inch";
			}
			
		}
		if (mark=='1')
			SKU="Installation";
	}
	if(document.getElementById('framedOption').value=='Installation')
	{
		framed=0;
		SKU="Installation";
	}
	if(framed==0)
	{
		picurl2='&frame=0';
		framePrice=0;
		frameWidth=0;
	}
		//	picurl2=picurl2+'&tiletype=0';
		//	picurl2=picurl2+'&size=2x3';
		
	switch(document.getElementById('matID2').value)
	{
		case '1':
			markUp = 8.00;
			picurl2=picurl2+'&tiletype=2';
			tileSize=4.25;
			weightMult=.4;
			SKU=SKU+'__4.25_in_Ceramic';
			break;
		case '2':
			markUp = 13.25;
			picurl2=picurl2+'&tiletype=2';
			tileSize=6;
			weightMult=.6;
			SKU=SKU+'__6_in_Ceramic';
			break;
		case '3':
			markUp = 9.60;
			picurl2=picurl2+'&tiletype=4';
			tileSize=4;
			SKU=SKU+'__4_in_Tumbled';
			break;
		case '4':
			markUp = 18.30;
			picurl2=picurl2+'&tiletype=4';
			tileSize=6;
			SKU=SKU+'__6_in_Tumbled';
			break;
		default:
			picurl2=picurl2+'&tiletype=0';
	}

	
	if(document.getElementById('dimensionSelect'))
	{
		matIndex = document.getElementById('dimensionSelect').selectedIndex;
		oOpt = document.getElementById('dimensionSelect').options[matIndex];
		optionHeight = oOpt.getAttribute('height');
		optionWidth = oOpt.getAttribute('width');
		layoutHeight = oOpt.getAttribute('layoutHeight');
		layoutWidth = oOpt.getAttribute('layoutWidth');
	}
	else
	{
		layoutHeight=2;
		layoutWidth=3;
		price=0;
		markUp=0;
		framePrice=0;
	}	


	picurl2=picurl2+'&size=' + layoutHeight+'x'+layoutWidth;
	SKU=SKU+'__'+ layoutHeight+'x'+layoutWidth;
	price=(layoutHeight*layoutWidth)*markUp;
	
	

	if (layoutHeight*tileSize>12 && layoutWidth*tileSize>12 && framed!=0)
		totalFramePrice=framePrice*layoutHeight*2*tileSize + framePrice*layoutWidth*2*tileSize + frameWidth*8*framePrice +7.50;
	else
	{
		totalFramePrice=framePrice*layoutHeight*2*tileSize + framePrice*layoutWidth*2*tileSize + frameWidth*8*framePrice;
	}


	price=price+totalFramePrice;
	price=price.toFixed(2)
	//price = Math.ceil((layoutHeight*layoutWidth)*markUp);
	displayPrice.innerHTML="$"+price;

	
	
	custImg=document.getElementById('customImage');
	custImg.src = 'http://www.paulbrent.com/Store/GetImage8.php?item_code='+picurl+'&enlarge=2'+picurl2;
		

	document.getElementById('largeURL').value='http://www.paulbrent.com/Store/GetImage8.php?item_code='+picurl+'&enlarge=3'+picurl2;
	//changeLink(picurl+'&enlarge=3'+picurl2);

	SKU=document.getElementById("ProdNum").value+SKU;
	document.getElementById("SKU").value=SKU;

}

function changeLayout()
{
	changepic2();
	
	
	
}



function so_init() {
	if(!d.getElementById || !d.createElement)return;

	if(document.getElementById("fromSearch").value!="RTS") {

	if(document.getElementById("fromSearch").value!="none")
	{
		
		document.getElementById('KitOrBath').value='Kitchen';

		var proline=document.getElementById("fromSearch").value;
		changeToFramed(proline.substring(2));
		
		proline=proline.substring(2);
		
		if(proline=="PB1490" || proline=="PB07509" || proline=="PB1489")
			document.getElementById('SubCat').value="Fruit";
		if(proline=="PB1503" || proline=="PB1504")
			document.getElementById('SubCat').value="Wine";
		if(proline=="PB1521" || proline=="PB00011")
			document.getElementById('SubCat').value="Birds";
		if(proline=="PB1467" || proline=="PB1340")
			document.getElementById('SubCat').value="Carib";
		if(proline=="PB06012" || proline=="PB06013" || proline=="PB06014" || proline=="PB03074" || proline=="PB04059" || proline=="PB04052")
			document.getElementById('SubCat').value="Medit";
		if(proline=="PB1290" || proline=="PB1456" || proline=="PB1344" || proline=="PB04024")
			document.getElementById('SubCat').value="Beach";
		if(proline=="PB06060" || proline=="PB00032")
			document.getElementById('SubCat').value="Boats";
		if(proline=="PB03133")
			document.getElementById('SubCat').value="Chairs";
		if(proline=="PB1265")
			document.getElementById('SubCat').value="Light";
		if(proline=="PB05098")
			document.getElementById('SubCat').value="Shells";
		if(proline=="PB05020" || proline=="PB1458" || proline=="PB1459")
			document.getElementById('SubCat').value="Palm";
		if(proline=="PB1267" || proline=="PB1216")
			document.getElementById('SubCat').value="Sealife";
		if(proline=="PB1198" || proline=="PB98030")
			document.getElementById('SubCat').value="Wildlife";
		if(proline=="PB95073" || proline=="PB96090")
			document.getElementById('SubCat').value="Floral";
		if(proline=="PB00035")
		{
			document.getElementById('SubCat').value="Balloons";
			document.getElementById('KitOrBath').value='Bath';
		}
		if(proline=="PB1495" || proline=="PB1496" || proline=="PB1497" || proline=="PB1498" || proline=="PB1462" || proline=="PB1463" || proline=="PB1464" || proline=="PB1464")
		{
			document.getElementById('SubCat').value="Juvenile";
			document.getElementById('KitOrBath').value='Bath';
		}

		
		
	}
	css = d.createElement("link");
	css.setAttribute("href","xfade2.css");
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	d.getElementsByTagName("head")[0].appendChild(css);

	imgs1 = d.getElementById("imageContainer1").getElementsByTagName("img");
	for(i=1;i<imgs1.length;i++) imgs1[i].xOpacity = 0;
	imgs1[0].style.display = "block";
	imgs1[0].xOpacity = .99;

	imgs2 = d.getElementById("imageContainer2").getElementsByTagName("img");
	for(i=1;i<imgs2.length;i++) imgs2[i].xOpacity = 0;
	imgs2[0].style.display = "block";
	imgs2[0].xOpacity = .99;	
		
	setTimeout(so_xfade,3000);
	}
	else
	{
		

	}
}

function so_xfade() {
	cOpacity = imgs1[current].xOpacity;
	nIndex = imgs1[current+1]?current+1:0;

	nOpacity = imgs1[nIndex].xOpacity;

	cOpacity = imgs2[current].xOpacity;
	nIndex = imgs2[current+1]?current+1:0;

	nOpacity = imgs2[nIndex].xOpacity;	
		
	cOpacity-=.05; 
	nOpacity+=.05;
	
	imgs1[nIndex].style.display = "block";
	imgs1[current].xOpacity = cOpacity;
	imgs1[nIndex].xOpacity = nOpacity;
	
	imgs2[nIndex].style.display = "block";
	imgs2[current].xOpacity = cOpacity;
	imgs2[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgs1[current]); 
	setOpacity(imgs1[nIndex]);
	
	setOpacity(imgs2[current]); 
	setOpacity(imgs2[nIndex]);
	
	if(cOpacity<=0) {
		imgs1[current].style.display = "none";
		imgs2[current].style.display = "none";	
		current = nIndex;
		setTimeout(so_xfade,3000);
	} else {
		setTimeout(so_xfade,50);
	}
	
	function setOpacity(obj) {
		if(obj.xOpacity>.99) {
			obj.xOpacity = .99;
			return;
		}
		obj.style.opacity = obj.xOpacity;
		obj.style.MozOpacity = obj.xOpacity;
		obj.style.filter = "alpha(opacity=" + (obj.xOpacity*100) + ")";
	}
	
}




function frameMat()
{
	matIndex = document.getElementById('matID2').selectedIndex;

	changer='onchange="changeLayout()"';
	
	var squaresonly='N'
	var wideonly='N'
	
	switch(document.getElementById('ProdNum').value)
	{
		case 'PB1495':
		case 'PB1496':
		case 'PB1497':
		case 'PB1498':
		case 'PB1462':
		case 'PB1463':
		case 'PB1464':
		case 'PB1465':
			squaresonly='Y';
			break;
		case 'PB1521':
		case 'PB1198':
		case 'PB05020':
		case 'PB04024':
		case 'PB04052':
		case 'PB1504':
			wideonly='Y';
			break;
	}
	var isVertical='N'
	switch(document.getElementById('ProdNum').value)
	{
		case 'PB1490':
		case 'PB1489':
		case 'PB1521':
		case 'PB06012':
		case 'PB06013':
		case 'PB06014':
		case 'PB04059':
		case 'PB04052':
		case 'PB1456':
		case 'PB1458':
		case 'PB1459':
		case 'PB1495':
		case 'PB1496':
		case 'PB1497':
		case 'PB1498':
		case 'PB1462':
		case 'PB1463':
		case 'PB1464':
		case 'PB1465':
			isVertical='Y'
			break;
	}
	
	if(isVertical=='N')
	{
		switch(matIndex)
		{

			case 1:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="4.25" width="4.25" layoutHeight="1" layoutWidth="1" value="A" products_id2="guess">1 tiles x 1 tiles - 4.25" x 4.25"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="8.5" width="8.5" layoutHeight="2" layoutWidth="2" value="B" products_id2="guess">2 tiles x 2 tiles - 8.5" x 8.5"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="8.5" width="12.75" layoutHeight="2" layoutWidth="3" value="L" products_id2="guess" selected>2 tiles x 3 tiles - 8.5" x 12.75"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="12.75" width="12.75" layoutHeight="3" layoutWidth="3" value="C" products_id2="guess">3 tiles x 3 tiles - 12.75" x 12.75"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12.75" width="17" layoutHeight="3" layoutWidth="4" value="1" products_id2="guess">3 tiles x 4 tiles - 12.75" x 17"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="17" width="17" layoutHeight="4" layoutWidth="4" value="D" products_id2="guess">4 tiles x 4 tiles - 17" x 17"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="17" width="21.25" layoutHeight="4" layoutWidth="5" value="2" products_id2="guess">4 tiles x 5 tiles - 17" x 21.25"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="21.25" width="21.25" layoutHeight="5" layoutWidth="5" value="E" products_id2="guess">5 tiles x 5 tiles - 21.25" x 21.25"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="21.25" width="25.5" layoutHeight="5" layoutWidth="6" value="3" products_id2="guess">5 tiles x 6 tiles - 21.25" x 25.5"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="25.5" width="25.5" layoutHeight="6" layoutWidth="6" value="F" products_id2="guess">6 tiles x 6 tiles - 25.5" x 25.5"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="25.5" width="29.75" layoutHeight="6" layoutWidth="7" value="4" products_id2="guess">6 tiles x 7 tiles - 25.5" x 29.75"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="29.75" width="29.75" layoutHeight="7" layoutWidth="7" value="G" products_id2="guess">7 tiles x 7 tiles - 29.75" x 29.75"<\/option>'
				layText=layText+'<\/select>';
				break;
			case 2:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="6" width="6" layoutHeight="1" layoutWidth="1" value="H" products_id2="guess">1 tiles x 1 tiles - 6" x 6"<\/option>'			
				if(wideonly=='N')
					layText=layText+'<option height="12" width="12" layoutHeight="2" layoutWidth="2" value="I" products_id2="guess">2 tiles x 2 tiles - 12" x 12"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12" width="18" layoutHeight="2" layoutWidth="3" value="5" products_id2="guess" selected>2 tiles x 3 tiles - 12" x 18"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="18" width="18" layoutHeight="3" layoutWidth="3" value="J" products_id2="guess">3 tiles x 3 tiles - 18" x 18"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="18" width="24" layoutHeight="3" layoutWidth="4" value="6" products_id2="guess">3 tiles x 4 tiles - 18" x 24"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="24" width="24" layoutHeight="4" layoutWidth="4" value="K" products_id2="guess">4 tiles x 4 tiles - 24" x 24"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="24" width="30" layoutHeight="4" layoutWidth="5" value="7" products_id2="guess">4 tiles x 5 tiles - 24" x 30"<\/option>'
				layText=layText+'<\/select>';
				break;
			default:
				layText='2 tiles x 3 tiles - 12" x 18"';
		}
	}
	else
	{
		switch(matIndex)
		{

			case 1:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="4.25" width="4.25" layoutHeight="1" layoutWidth="1" value="A" products_id2="guess">1 tiles x 1 tiles - 4.25" x 4.25"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="8.5" width="8.5" layoutHeight="2" layoutWidth="2" value="B" products_id2="guess">2 tiles x 2 tiles - 8.5" x 8.5"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="8.5" width="12.75" layoutHeight="2" layoutWidth="3" value="L" products_id2="guess" selected>3 tiles x 2 tiles - 12.75" x 8.5"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="12.75" width="12.75" layoutHeight="3" layoutWidth="3" value="C" products_id2="guess">3 tiles x 3 tiles - 12.75" x 12.75"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12.75" width="17" layoutHeight="3" layoutWidth="4" value="1" products_id2="guess">4 tiles x 3 tiles - 17" x 12.75"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="17" width="17" layoutHeight="4" layoutWidth="4" value="D" products_id2="guess">4 tiles x 4 tiles - 17" x 17"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="17" width="21.25" layoutHeight="4" layoutWidth="5" value="2" products_id2="guess">5 tiles x 4 tiles - 21.25" x 17"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="21.25" width="21.25" layoutHeight="5" layoutWidth="5" value="E" products_id2="guess">5 tiles x 5 tiles - 21.25" x 21.25"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="21.25" width="25.5" layoutHeight="5" layoutWidth="6" value="3" products_id2="guess">6 tiles x 5 tiles - 25.5" x 21.25" <\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="25.5" width="25.5" layoutHeight="6" layoutWidth="6" value="F" products_id2="guess">6 tiles x 6 tiles - 25.5" x 25.5"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="25.5" width="29.75" layoutHeight="6" layoutWidth="7" value="4" products_id2="guess">7 tiles x 6 tiles - 29.75" x 25.5"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="29.75" width="29.75" layoutHeight="7" layoutWidth="7" value="G" products_id2="guess">7 tiles x 7 tiles - 29.75" x 29.75"<\/option>'
				layText=layText+'<\/select>';
				break;
			case 2:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="6" width="6" layoutHeight="1" layoutWidth="1" value="H" products_id2="guess">1 tiles x 1 tiles - 6" x 6"<\/option>'			
				if(wideonly=='N')
					layText=layText+'<option height="12" width="12" layoutHeight="2" layoutWidth="2" value="I" products_id2="guess">2 tiles x 2 tiles - 12" x 12"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12" width="18" layoutHeight="2" layoutWidth="3" value="5" products_id2="guess" selected>3 tiles x 2 tiles - 18" x 12"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="18" width="18" layoutHeight="3" layoutWidth="3" value="J" products_id2="guess">3 tiles x 3 tiles - 18" x 18"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="18" width="24" layoutHeight="3" layoutWidth="4" value="6" products_id2="guess">4 tiles x 3 tiles - 24" x 18"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="24" width="24" layoutHeight="4" layoutWidth="4" value="K" products_id2="guess">4 tiles x 4 tiles - 24" x 24"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="24" width="30" layoutHeight="4" layoutWidth="5" value="7" products_id2="guess">5 tiles x 4 tiles - 30" x 24"<\/option>'
				layText=layText+'<\/select>';
				break;
			default:
				layText='3 tiles x 2 tiles - 18" x 12"';
		}
	}
	
	finishText1 = document.getElementById('layoutAttribute');
    finishText1.innerHTML = layText;

	changeLayout();
}

function setTool()
{
	document.getElementById('Articles').style.display='none';
	document.getElementById('Tool').style.display='';

}

function setArticles()
{
	document.getElementById('Tool').style.display='none';
	document.getElementById('Articles').style.display='';
}


function installMat()
{
	matIndex = document.getElementById('matID2').selectedIndex;
	document.getElementById('frameDesc').innerHTML='Installation';
	changer='onchange="changeLayout()"';
	var squaresonly='N'
	var wideonly='N'
	
	switch(document.getElementById('ProdNum').value)
	{
		case 'PB1495':
		case 'PB1496':
		case 'PB1497':
		case 'PB1498':
		case 'PB1462':
		case 'PB1463':
		case 'PB1464':
		case 'PB1465':
			squaresonly='Y';
			break;
		case 'PB1521':
		case 'PB1198':
		case 'PB05020':
		case 'PB04024':
		case 'PB04052':
		case 'PB1504':
			wideonly='Y';
			break;
	}
	
	var isVertical='N'
	switch(document.getElementById('ProdNum').value)
	{
		case 'PB1490':
		case 'PB1489':
		case 'PB1521':
		case 'PB06012':
		case 'PB06013':
		case 'PB06014':
		case 'PB04059':
		case 'PB04052':
		case 'PB1456':
		case 'PB1458':
		case 'PB1459':
		case 'PB1495':
		case 'PB1496':
		case 'PB1497':
		case 'PB1498':
		case 'PB1462':
		case 'PB1463':
		case 'PB1464':
		case 'PB1465':
			isVertical='Y'
			break;
	}
	
	if (isVertical=='N')
	{
		switch(matIndex)
		{

			case 1:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="4.25" width="4.25" layoutHeight="1" layoutWidth="1" value="A" products_id2="guess">1 tiles x 1 tiles - 4.25" x 4.25"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="8.5" width="8.5" layoutHeight="2" layoutWidth="2" value="B" products_id2="guess">2 tiles x 2 tiles - 8.5" x 8.5"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="8.5" width="12.75" layoutHeight="2" layoutWidth="3" value="L" products_id2="guess" selected>2 tiles x 3 tiles - 8.5" x 12.75"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="12.75" width="12.75" layoutHeight="3" layoutWidth="3" value="C" products_id2="guess">3 tiles x 3 tiles - 12.75" x 12.75"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12.75" width="17" layoutHeight="3" layoutWidth="4" value="1" products_id2="guess">3 tiles x 4 tiles - 12.75" x 17"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="17" width="17" layoutHeight="4" layoutWidth="4" value="D" products_id2="guess">4 tiles x 4 tiles - 17" x 17"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="17" width="21.25" layoutHeight="4" layoutWidth="5" value="2" products_id2="guess">4 tiles x 5 tiles - 17" x 21.25"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="21.25" width="21.25" layoutHeight="5" layoutWidth="5" value="E" products_id2="guess">5 tiles x 5 tiles - 21.25" x 21.25"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="21.25" width="25.5" layoutHeight="5" layoutWidth="6" value="3" products_id2="guess">5 tiles x 6 tiles - 21.25" x 25.5"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="25.5" width="25.5" layoutHeight="6" layoutWidth="6" value="F" products_id2="guess">6 tiles x 6 tiles - 25.5" x 25.5"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="25.5" width="29.75" layoutHeight="6" layoutWidth="7" value="4" products_id2="guess">6 tiles x 7 tiles - 25.5" x 29.75"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="29.75" width="29.75" layoutHeight="7" layoutWidth="7" value="G" products_id2="guess">7 tiles x 7 tiles - 29.75" x 29.75"<\/option>'
				layText=layText+'<\/select>';
				break;
			case 2:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="6" width="6" layoutHeight="1" layoutWidth="1" value="H" products_id2="guess">1 tiles x 1 tiles - 6" x 6"<\/option>'		
				if(wideonly=='N')
					layText=layText+'<option height="12" width="12" layoutHeight="2" layoutWidth="2" value="I" products_id2="guess">2 tiles x 2 tiles - 12" x 12"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12" width="18" layoutHeight="2" layoutWidth="3" value="5" products_id2="guess" selected>2 tiles x 3 tiles - 12" x 18"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="18" width="18" layoutHeight="3" layoutWidth="3" value="J" products_id2="guess">3 tiles x 3 tiles - 18" x 18"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="18" width="24" layoutHeight="3" layoutWidth="4" value="6" products_id2="guess">3 tiles x 4 tiles - 18" x 24"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="24" width="24" layoutHeight="4" layoutWidth="4" value="K" products_id2="guess">4 tiles x 4 tiles - 24" x 24"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="24" width="30" layoutHeight="4" layoutWidth="5" value="7" products_id2="guess">4 tiles x 5 tiles - 24" x 30"<\/option>'
				layText=layText+'<\/select>';
				break;
			case 3:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="4" width="4" layoutHeight="1" layoutWidth="1" value="L" products_id2="guess">1 tiles x 1 tiles - 4" x 4"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="8" width="8" layoutHeight="2" layoutWidth="2" value="M" products_id2="guess">2 tiles x 2 tiles - 8" x 8"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="8" width="12" layoutHeight="2" layoutWidth="3" value="i" products_id2="guess" selected>2 tiles x 3 tiles - 8" x 12"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="12" width="12" layoutHeight="3" layoutWidth="3" value="N" products_id2="guess">3 tiles x 3 tiles - 12" x 12"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12" width="16" layoutHeight="3" layoutWidth="4" value="O" products_id2="guess">3 tiles x 4 tiles - 12" x 16"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="16" width="16" layoutHeight="4" layoutWidth="4" value="P" products_id2="guess">4 tiles x 4 tiles - 16" x 16"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="16" width="20" layoutHeight="4" layoutWidth="5" value="Q" products_id2="guess">4 tiles x 5 tiles - 16" x 20"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="20" width="20" layoutHeight="5" layoutWidth="5" value="R" products_id2="guess">5 tiles x 5 tiles - 20" x 20"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="20" width="24" layoutHeight="5" layoutWidth="6" value="S" products_id2="guess">5 tiles x 6 tiles - 20" x 24"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="24" width="24" layoutHeight="6" layoutWidth="6" value="T" products_id2="guess">6 tiles x 6 tiles - 24" x 24"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="24" width="28" layoutHeight="6" layoutWidth="7" value="U" products_id2="guess">6 tiles x 7 tiles - 24" x 28"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="28" width="28" layoutHeight="7" layoutWidth="7" value="V" products_id2="guess">7 tiles x 7 tiles - 28" x 28"<\/option>'
				layText=layText+'<\/select>';
				break;
			case 4:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="6" width="6" layoutHeight="1" layoutWidth="1" value="W" products_id2="guess">1 tiles x 1 tiles - 6" x 6"<\/option>'			
				if(wideonly=='N')
					layText=layText+'<option height="12" width="12" layoutHeight="2" layoutWidth="2" value="X" products_id2="guess">2 tiles x 2 tiles - 12" x 12"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12" width="18" layoutHeight="2" layoutWidth="3" value="Y" products_id2="guess" selected>2 tiles x 3 tiles - 12" x 18"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="18" width="18" layoutHeight="3" layoutWidth="3" value="Z" products_id2="guess">3 tiles x 3 tiles - 18" x 18"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="18" width="24" layoutHeight="3" layoutWidth="4" value="a" products_id2="guess">3 tiles x 4 tiles - 18" x 24"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="24" width="24" layoutHeight="4" layoutWidth="4" value="b" products_id2="guess">4 tiles x 4 tiles - 24" x 24"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="24" width="30" layoutHeight="4" layoutWidth="5" value="c" products_id2="guess">4 tiles x 5 tiles - 24" x 30"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="30" width="30" layoutHeight="5" layoutWidth="5" value="d" products_id2="guess">5 tiles x 5 tiles - 30" x 30"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="30" width="36" layoutHeight="5" layoutWidth="6" value="e" products_id2="guess">5 tiles x 6 tiles - 30" x 36"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="36" width="36" layoutHeight="6" layoutWidth="6" value="f" products_id2="guess">6 tiles x 6 tiles - 36" x 36"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="36" width="42" layoutHeight="6" layoutWidth="7" value="g" products_id2="guess">6 tiles x 7 tiles - 36" x 42"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="42" width="42" layoutHeight="7" layoutWidth="7" value="h" products_id2="guess">7 tiles x 7 tiles - 42" x 42"<\/option>'
				layText=layText+'<\/select>';
				break;
			default:
				layText='2 tiles x 3 tiles - 12" x 18"';
		}
	}
	else
	{
		switch(matIndex)
		{

			case 1:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="4.25" width="4.25" layoutHeight="1" layoutWidth="1" value="A" products_id2="guess">1 tiles x 1 tiles - 4.25" x 4.25"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="8.5" width="8.5" layoutHeight="2" layoutWidth="2" value="B" products_id2="guess">2 tiles x 2 tiles - 8.5" x 8.5"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="8.5" width="12.75" layoutHeight="2" layoutWidth="3" value="L" products_id2="guess" selected>3 tiles x 2 tiles - 12.75" x 8.5"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="12.75" width="12.75" layoutHeight="3" layoutWidth="3" value="C" products_id2="guess">3 tiles x 3 tiles - 12.75" x 12.75"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12.75" width="17" layoutHeight="3" layoutWidth="4" value="1" products_id2="guess">4 tiles x 3 tiles - 17" x 12.75"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="17" width="17" layoutHeight="4" layoutWidth="4" value="D" products_id2="guess">4 tiles x 4 tiles - 17" x 17"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="17" width="21.25" layoutHeight="4" layoutWidth="5" value="2" products_id2="guess">5 tiles x 4 tiles - 21.25" x 17"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="21.25" width="21.25" layoutHeight="5" layoutWidth="5" value="E" products_id2="guess">5 tiles x 5 tiles - 21.25" x 21.25"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="21.25" width="25.5" layoutHeight="5" layoutWidth="6" value="3" products_id2="guess">6 tiles x 5 tiles - 25.5" x 21.25"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="25.5" width="25.5" layoutHeight="6" layoutWidth="6" value="F" products_id2="guess">6 tiles x 6 tiles - 25.5" x 25.5"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="25.5" width="29.75" layoutHeight="6" layoutWidth="7" value="4" products_id2="guess">7 tiles x 6 tiles - 29.75" x 25.5"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="29.75" width="29.75" layoutHeight="7" layoutWidth="7" value="G" products_id2="guess">7 tiles x 7 tiles - 29.75" x 29.75"<\/option>'
				layText=layText+'<\/select>';
				break;
			case 2:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="6" width="6" layoutHeight="1" layoutWidth="1" value="H" products_id2="guess">1 tiles x 1 tiles - 6" x 6"<\/option>'		
				if(wideonly=='N')
					layText=layText+'<option height="12" width="12" layoutHeight="2" layoutWidth="2" value="I" products_id2="guess">2 tiles x 2 tiles - 12" x 12"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12" width="18" layoutHeight="2" layoutWidth="3" value="5" products_id2="guess" selected>3 tiles x 2 tiles - 18" x 12"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="18" width="18" layoutHeight="3" layoutWidth="3" value="J" products_id2="guess">3 tiles x 3 tiles - 18" x 18"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="18" width="24" layoutHeight="3" layoutWidth="4" value="6" products_id2="guess">4 tiles x 3 tiles - 24" x 18"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="24" width="24" layoutHeight="4" layoutWidth="4" value="K" products_id2="guess">4 tiles x 4 tiles - 24" x 24"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="24" width="30" layoutHeight="4" layoutWidth="5" value="7" products_id2="guess">5 tiles x 4 tiles - 30" x 24"<\/option>'
				layText=layText+'<\/select>';
				break;
			case 3:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="4" width="4" layoutHeight="1" layoutWidth="1" value="L" products_id2="guess">1 tiles x 1 tiles - 4" x 4"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="8" width="8" layoutHeight="2" layoutWidth="2" value="M" products_id2="guess">2 tiles x 2 tiles - 8" x 8"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="8" width="12" layoutHeight="2" layoutWidth="3" value="i" products_id2="guess" selected>3 tiles x 2 tiles - 12" x 8"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="12" width="12" layoutHeight="3" layoutWidth="3" value="N" products_id2="guess">3 tiles x 3 tiles - 12" x 12"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12" width="16" layoutHeight="3" layoutWidth="4" value="O" products_id2="guess">4 tiles x 3 tiles - 16" x 12"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="16" width="16" layoutHeight="4" layoutWidth="4" value="P" products_id2="guess">4 tiles x 4 tiles - 16" x 16"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="16" width="20" layoutHeight="4" layoutWidth="5" value="Q" products_id2="guess">5 tiles x 4 tiles - 20" x 16"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="20" width="20" layoutHeight="5" layoutWidth="5" value="R" products_id2="guess">5 tiles x 5 tiles - 20" x 20"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="20" width="24" layoutHeight="5" layoutWidth="6" value="S" products_id2="guess">6 tiles x 5 tiles - 24" x 20"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="24" width="24" layoutHeight="6" layoutWidth="6" value="T" products_id2="guess">6 tiles x 6 tiles - 24" x 24"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="24" width="28" layoutHeight="6" layoutWidth="7" value="U" products_id2="guess">7 tiles x 6 tiles - 28" x 24"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="28" width="28" layoutHeight="7" layoutWidth="7" value="V" products_id2="guess">7 tiles x 7 tiles - 28" x 28"<\/option>'
				layText=layText+'<\/select>';
				break;
			case 4:
				layText='<select name="dimensionSelect" id="dimensionSelect"'+ changer + '>'
				layText=layText+'<option layoutHeight="2" layoutWidth="3">Select Layout<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="6" width="6" layoutHeight="1" layoutWidth="1" value="W" products_id2="guess">1 tiles x 1 tiles - 6" x 6"<\/option>'			
				if(wideonly=='N')
					layText=layText+'<option height="12" width="12" layoutHeight="2" layoutWidth="2" value="X" products_id2="guess">2 tiles x 2 tiles - 12" x 12"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="12" width="18" layoutHeight="2" layoutWidth="3" value="Y" products_id2="guess" selected>3 tiles x 2 tiles - 18" x 12"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="18" width="18" layoutHeight="3" layoutWidth="3" value="Z" products_id2="guess">3 tiles x 3 tiles - 18" x 18"<\/option>'
				if(squaresonly=='N')
					layText=layText+'<option height="18" width="24" layoutHeight="3" layoutWidth="4" value="a" products_id2="guess">4 tiles x 3 tiles - 24" x 18"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="24" width="24" layoutHeight="4" layoutWidth="4" value="b" products_id2="guess">4 tiles x 4 tiles - 24" x 24"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="24" width="30" layoutHeight="4" layoutWidth="5" value="c" products_id2="guess">5 tiles x 4 tiles - 30" x 24"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="30" width="30" layoutHeight="5" layoutWidth="5" value="d" products_id2="guess">5 tiles x 5 tiles - 30" x 30"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="30" width="36" layoutHeight="5" layoutWidth="6" value="e" products_id2="guess">6 tiles x 5 tiles - 36" x 30"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="36" width="36" layoutHeight="6" layoutWidth="6" value="f" products_id2="guess">6 tiles x 6 tiles - 36" x 36"<\/option>'
				if(squaresonly=='N')
					if(wideonly=='N')
						layText=layText+'<option height="36" width="42" layoutHeight="6" layoutWidth="7" value="g" products_id2="guess">7 tiles x 6 tiles - 42" x 36"<\/option>'
				if(wideonly=='N')
					layText=layText+'<option height="42" width="42" layoutHeight="7" layoutWidth="7" value="h" products_id2="guess">7 tiles x 7 tiles - 42" x 42"<\/option>'
				layText=layText+'<\/select>';
				break;
			default:
				layText='3 tiles x 2 tiles - 18" x 12"';
		}
	}
	
	finishText1 = document.getElementById('layoutAttribute');
    finishText1.innerHTML = layText;
	changeLayout();


}

function goImgWin() 
{
	myImage=document.getElementById('largeURL').value;
	myHeight =500;
	myWidth = 500;
	origLeft=0;
	origTop=0;
	
	
	TheImgWin = window.open(myImage,'Enlarged_Image','height=' + myHeight + ',width=' + myWidth + ',toolbar=no,directories=no,status=no,' + 'menubar=no,scrollbars=no,resizable=no');
	
	
	
	TheImgWin.resizeTo(myWidth+2,myHeight+30);
	TheImgWin.moveTo(origLeft,origTop);
	TheImgWin.focus();
}

function changeToRTSArtwork(changeCat)
{

	document.getElementById('RTSArtwork').style.display='';
	document.getElementById('RTSCategories').style.display='none';
	var xmlDoc;

		try //Internet Explorer
  		{
  			xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
			xmlDoc.async=false;

  			tester=xmlDoc.load("ReadyToShip.xml");

  		}
		catch(e)
  		{
//   			try //Firefox, Mozilla, Opera, etc.
//     		
    			try
    			{
    				var newd = new XMLHttpRequest();
    				newd.open("GET", "ReadyToShip.xml", false);
    				newd.send(null);
    				xmlDoc=newd.responseXML;
    			}
    			catch(e)
    			{
    		
    				alert(e.message);
    				return;
    			}
				xmlDoc.async=false;

    		//}
  		}

					
		var ProdNameArray=xmlDoc.getElementsByTagName("ProductName");
		
		
		//var changeCat="Caribbean";
		var countItems=0;
		for (var i=0; i < ProdNameArray.length; i++)
		{
			if(xmlDoc.getElementsByTagName("Category")[i].childNodes[0].nodeValue==changeCat)
			{
				countItems++;
				var href="<a style='border:none' href='http://www.paulbrent.com/Store/p-"+xmlDoc.getElementsByTagName("ProductID")[i].childNodes[0].nodeValue.toLowerCase()+"-"+xmlDoc.getElementsByTagName("ProductName")[i].childNodes[0].nodeValue.toLowerCase()+".aspx?variant="+xmlDoc.getElementsByTagName("VariantID")[i].childNodes[0].nodeValue+"&prev="+xmlDoc.getElementsByTagName("Category")[i].childNodes[0].nodeValue+"'>";
				var innerVar=" ";
				
var framename="Installation Mural";
var framePrice=0.00;
var frameWidth=0.00;
var tileType=" ";
var markUp=0.00;
var tileSize=0.00;
if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue!="NotApplicable")
{
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Cherry_1.375_inch")>0)
	{ 
		framename='Cherry 1 3/8" Framed Mural';
		framePrice=0.50;
		frameWidth=1.375;
	}
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Mahogany_1.375_inch")>0)
	{ 
		framename='Mahogany 1 3/8" Framed Mural';
		framePrice=0.50;
		frameWidth=1.375;
	}
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Silver_0.75_inch")>0)
	{ 
		framename='Silver 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Bermuda_peach_0.75_inch")>0)
	{ 	
		framename='Bermuda Peach 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Navy_blue_0.75_inch")>0)
	{ 
		framename='Navy Blue 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Kelly_green_0.75_inch")>0)
	{ 
		framename='Kelly Green 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Red_0.75_inch")>0)
	{ 
		framename='Red 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Yellow_0.75_inch")>0)
	{ 
		framename='Yellow 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("White_1.625_inch")>0)
	{ 
		framename='White 1 5/8" Framed Mural';
		framePrice=0.50;
		frameWidth=1.625;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Clear_1.625_inch")>0)
	{ 
		framename='Clear 1 5/8" Framed Mural';
		framePrice=0.50;
		frameWidth=1.625;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Honey_1.625_inch")>0)
	{ 
		framename='Honey 1 5/8" Framed Mural';
		framePrice=0.50;
		frameWidth=1.625;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Mahogany_1.625_inch")>0)
	{ 
		framename='Mahogany 1 5/8" Framed Mural';
		framePrice=0.50;
		frameWidth=1.625;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Walnut_1.625_inch")>0)
	{ 
		framename='Walnut 1 5/8" Framed Mural';
		framePrice=0.50;
		frameWidth=1.625;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Charcoal_1.625_inch")>0)
	{ 
		framename='Charcoal 1 5/8" Framed Mural';
		framePrice=0.50;
		frameWidth=1.625;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Cookie_0.75_inch")>0)
	{ 
		framename='Cookie 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Dark_brown_0.75_inch")>0)
	{ 
		framename='Dark Brown 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Cherry_0.75_inch")>0)
	{ 
		framename='Cherry 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Tangerine_0.75_inch")>0)
	{ 
		framename='Tangerine 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Matte_black_0.75_inch")>0)
	{ 
		framename='Matte Black 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Pickled_rose_0.75_inch")>0)
	{ 
		framename='Pickled Rose 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
		
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Grape_0.75_inch")>0)
	{ 
		framename='Grape 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Dark_green_0.75_inch")>0)
	{ 
		framename='Dark Green 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Aqua_blue_0.75_inch")>0)
	{ 
		framename='Aqua Blue 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Pickled_gray_0.75_inch")>0)
	{ 
		framename='Pickled Gray 3/4" Framed Mural';
		framePrice=0.60;
		frameWidth=0.75;
	}
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Black_cherrypins_0.5_inch")>0)
	{ 
		framename='Black w/ Cherry Pin Stripes 1/2" Framed Mural';
		framePrice=0.40;
		frameWidth=0.50;
	}
	
	
	
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("4.25_in_Ceramic")>0)
	{
		markUp = 8.00;
		tileSize=4.25;
		tileType='4.25" Ceramic Tile';
	}
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("4_in_Ceramic")>0)
	{
		markUp = 8.00;
		tileSize=4.25;
		tileType='4" Ceramic Tile';
	}
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("6_in_Ceramic")>0)
	{
		markUp = 13.25;
		tileSize=6.0;
		tileType='6" Ceramic Tile';
	}
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("4_in_Tumbled")>0)
	{
		markUp = 9.60;
		tileSize=4;
		tileType='4" Tumbled Tile';
	}
	
	if(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("6_in_Tumbled")>0)
	{
		markUp = 18.30;
		tileSize=6;
		tileType='6" Tumbled Tile';
	}
	var isVertical='N'
		switch(xmlDoc.getElementsByTagName("ProductName")[i].childNodes[0].nodeValue.toUpperCase())
		{
			case 'CTPB1490':
			case 'CTPB1489':
			case 'CTPB1521':
			case 'CTPB06012':
			case 'CTPB06013':
			case 'CTPB06014':
			case 'CTPB04059':
			case 'CTPB04052':
			case 'CTPB1456':
			case 'CTPB1458':
			case 'CTPB1459':
			case 'CTPB1495':
			case 'CTPB1496':
			case 'CTPB1497':
			case 'CTPB1498':
			case 'CTPB1462':
			case 'CTPB1463':
			case 'CTPB1464':
			case 'CTPB1465':
				isVertical='Y'
				break;
		}
	if(isVertical=='Y')	
	{
		layoutHeight=xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.substr(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.length-1,1);
		layoutWidth=xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.substr(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.length-3,1);
	}
	else
	{
		layoutHeight=xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.substr(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.length-3,1);
		layoutWidth=xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.substr(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.length-1,1);
	}
	var price=(layoutHeight*layoutWidth)*markUp;	
	if (layoutHeight*tileSize>12 && layoutHeight*tileSize>12 && !(xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue.search("Installation")>0))
		var totalFramePrice=framePrice*layoutHeight*2*tileSize + framePrice*layoutWidth*2*tileSize + frameWidth*8*framePrice +7.50;
	else
		var totalFramePrice=framePrice*layoutHeight*2*tileSize + framePrice*layoutWidth*2*tileSize + frameWidth*8*framePrice;
	price=price+totalFramePrice;
	
	price=price.toFixed(2)
	var displayPrice="$"+price;				
}				
else
{
	var displayPrice="$";
	displayPrice=displayPrice+xmlDoc.getElementsByTagName("OverridePrice")[i].childNodes[0].nodeValue;
}
				
// 				innerVar=innerVar+"<tr><td>";
// 				innerVar=innerVar+href+"<img src='GetImage10.php?PID="+xmlDoc.getElementsByTagName("ProductName")[i].childNodes[0].nodeValue+"&SKU="+xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue+"' />"
// 				innerVar=innerVar+"</a></td></tr>";				
// 				innerVar=innerVar+"<tr><td><b>";
// 				innerVar=innerVar+href+xmlDoc.getElementsByTagName("Description")[i].childNodes[0].nodeValue;
// 				innerVar=innerVar+"</a></b></td></tr>";
// 				innerVar=innerVar+"<tr><td>";
// 				innerVar=innerVar+href+framename;
// 				innerVar=innerVar+"</a></td></tr>";
// 				innerVar=innerVar+"<tr><td>";
// 				innerVar=innerVar+href+layoutHeight+'x'+layoutWidth + " "+tileType;
// 				innerVar=innerVar+"</a></td></tr>";
// 				innerVar=innerVar+"<tr><td>";
// 				innerVar=innerVar+href+displayPrice;
// 				innerVar=innerVar+"</a></td></tr>";
// 				document.getElementById("Work"+countItems).innerHTML=innerVar;


			if(xmlDoc.getElementsByTagName("OverrideImage")[i].childNodes[0].nodeValue=="NotApplicable")
				innerVar=innerVar+href+"<img style='border-style: none' src='GetImage10.php?PID="+xmlDoc.getElementsByTagName("ProductName")[i].childNodes[0].nodeValue+"&SKU="+xmlDoc.getElementsByTagName("VariantSKU")[i].childNodes[0].nodeValue+"' />";
			else
				innerVar=innerVar+href+"<img style='border-style: none' src='images/product/medium/"+xmlDoc.getElementsByTagName("OverrideImage")[i].childNodes[0].nodeValue+"' />";

				innerVar=innerVar+"</a><br>";				
				innerVar=innerVar+"<b>";
				innerVar=innerVar+href+xmlDoc.getElementsByTagName("Description")[i].childNodes[0].nodeValue;
				innerVar=innerVar+"</a></b>";
				innerVar=innerVar+"<br>";
			if(xmlDoc.getElementsByTagName("OverrideText")[i].childNodes[0].nodeValue=="NotApplicable")
			{
				innerVar=innerVar+href+framename;
				innerVar=innerVar+"</a><br>";
				innerVar=innerVar+href+layoutHeight+'x'+layoutWidth + " "+tileType;
				innerVar=innerVar+"</a><br>";
				innerVar=innerVar+href+(layoutHeight*tileSize)+'" x '+(layoutWidth*tileSize) + '"';
				innerVar=innerVar+"</a><br>";
			}
			else
			{
				innerVar=innerVar+href+xmlDoc.getElementsByTagName("OverrideText")[i].childNodes[0].nodeValue;
				innerVar=innerVar+"</a><br>";	
			}
				innerVar=innerVar+href+displayPrice;
				innerVar=innerVar+"</a>";
				elementid="Work"+countItems;
				document.getElementById(elementid).innerHTML=innerVar;

			}
		}
		//document.getElementById("RTSCategories").innerHTML=innerVar;
		for (var i2=countItems; i2<12; i2++)
		{
			elementid="Work"+(i2+1);
			document.getElementById(elementid).innerHTML=" ";
		}
}

function changeToRTSCategories()
{
	document.getElementById('RTSArtwork').style.display='none';
	document.getElementById('RTSCategories').style.display='';
}
