// JavaScript Document

var Path1='images/POKER/';


function CngPlayer(obj){
index= obj.selectedIndex;

	if (index<0){ return; }
	else
	{	
		if(index == 0)
		{
			window.document.getElementById('cup1').src = Path1+"8_seater_Cups/brass.png";
			window.document.getElementById('race').src = Path1+"8_Seater_Race/" + window.document.getElementById('wood').value + ".png";
			
			
		}
		if(index == 1)
		{
			window.document.getElementById('cup1').src = Path1+"Poker_Cups/brass.png";
			window.document.getElementById('race').src = Path1+"Poker_Race/" + window.document.getElementById('wood').value + ".png";
			
		}

	}
}


function CngColor(obj){
index= obj.selectedIndex;

	if (index<0){ return; }
	else
	{	
		if(obj.options[index].title == "Poker_Legs_Flat_Pack")
		{
			window.document.getElementById('leg2').src = Path1+obj.options[index].title+"/"+window.document.getElementById('wood').value+".png";
			window.document.getElementById('container').value = "Poker_Legs_Flat_Pack";
		}
		if(obj.options[index].title == "Poker_Legs_Turned")
		{
			window.document.getElementById('leg2').src = Path1+obj.options[index].title+"/"+window.document.getElementById('wood').value+".png";
			window.document.getElementById('container').value = "Poker_Legs_Turned";
		}
		if(obj.options[index].title == "Poker_Legs_Square")
		{
			window.document.getElementById('leg2').src = Path1+obj.options[index].title+"/"+window.document.getElementById('wood').value+".png";
			window.document.getElementById('container').value = "Poker_Legs_Square";
		}	
	}
}



function Cngwood(obj){



if(window.document.getElementById('players').value == "eight")
{
	var path2 = "8_Seater_Race";
}
if(window.document.getElementById('players').value == "ten")
{
	var path2 = "Poker_Race";
}

window.document.getElementById('race').src = Path1+path2+"/poker_race_jarrah.png";
window.document.getElementById('leg2').src = Path1+path2+"Poker_Legs_Flat_Pack/jarrah.png";

index= obj.selectedIndex;
table_top = window.document.getElementById('table_top').value;

	if (index<0){ return; }
	else
	{
		if(index == 0)
		{
			
			alert(Path1+path2+"Poker_Race/jarrah.png");
			window.document.getElementById('race').src = Path1+path2+"/jarrah.png";
			window.document.getElementById('leg2').src = Path1+window.document.getElementById('container').value+"/jarrah.png";
			if(table_top == "yes")
			{
				window.document.getElementById('table_top1').src = Path1+"Table_Tops/jarrah.png";
			}	
			//alert (window.document.getElementById('container').value);

		}
		if(index == 1)
		{
			window.document.getElementById('race').src = Path1+path2+"/oak.png";
			window.document.getElementById('leg2').src = Path1+window.document.getElementById('container').value+"/oak.png";	
			if(table_top == "yes")
			{
				window.document.getElementById('table_top1').src = Path1+"Table_Tops/oak.png";				
			}	
			//alert (window.document.getElementById('container').value);
		}
		if(index == 2)
		{
			window.document.getElementById('race').src = Path1+path2+"/ceder.png";
			window.document.getElementById('leg2').src = Path1+window.document.getElementById('container').value+"/ceder.png";	
			if(table_top == "yes")
			{		
				window.document.getElementById('table_top1').src = Path1+"Table_Tops/ceder.png";		
			}	
		}	
		if(index == 3)
		{
			window.document.getElementById('race').src = Path1+path2+"/maple.png";
			window.document.getElementById('leg2').src = Path1+window.document.getElementById('container').value+"/maple.png";
			if(table_top == "yes")
			{			
				window.document.getElementById('table_top1').src = Path1+"Table_Tops/maple.png";			
			}			
		}
		if(index == 4)
		{
			window.document.getElementById('race').src = Path1+path2+"/walnut.png";
			window.document.getElementById('leg2').src = Path1+window.document.getElementById('container').value+"/walnut.png";
			if(table_top == "yes")
			{			
				window.document.getElementById('table_top1').src = Path1+"Table_Tops/walnut.png";			
			}	
		}
		if(index == 5)
		{
			window.document.getElementById('race').src = Path1+path2+"/rawfinish.png";
			window.document.getElementById('leg2').src = Path1+window.document.getElementById('container').value+"/rawfinish.png";
			if(table_top == "yes")
			{			
				window.document.getElementById('table_top1').src = Path1+"Table_Tops/rawfinish.png";	
			}			
		}	
		if(index == 6)
		{
			window.document.getElementById('race').src = Path1+path2+"/painted.png";
			window.document.getElementById('leg2').src = Path1+window.document.getElementById('container').value+"/painted.png";
			if(table_top == "yes")
			{			
				window.document.getElementById('table_top1').src = Path1+"Table_Tops/painted.png";	
			}			
		}									
	}
}



function Chntabletop(obj){
index= obj.selectedIndex;

	if (index<0){ return; }
	else
	{
	
	
		if(index == 0)
		{		
			//window.document.getElementById("tabletop").innerHTML = "<img src='images/POKER/Table_Tops/'  name='table_top1' id='table_top1' width='750' height='400'  border='0' style='visibility:visible;' usemap='#tabletopMap'>";		
			window.document.getElementById('table_top1').src = Path1+"Table_Tops/"+window.document.getElementById('wood').value+".png";			
			//alert (Path1+"Table_Tops/"+window.document.getElementById('wood').value+".gif");



		}
		if(index == 1)
		{
			
			//window.document.getElementById("tabletop").innerHTML = "<img src='images/POKER/Table_Tops/'  name='table_top1' id='table_top1' width='750' height='400'  border='0' style='visibility:hidden;' usemap='#tabletopMap'>";			
			window.document.getElementById('table_top1').src = Path1+"Table_Tops/blank.png";			
		
			//alert (window.document.getElementById('container').value);
		}
						
	}
}


function mouseOver()
{

//window.document.getElementById("table_top1").style.visibility = "hidden"; 
//window.document.getElementById("tabletop").innerHTML = "<img src='/images/POKER/Table_Tops/'  name='table_top1' width='750' height='400' id='table_top1'  border='0' style='visibility:visible; filter:alpha(opacity=40); -moz-opacity:.40; opacity:.40;' usemap='#tabletopMap' >";
	//window.document.getElementById('table_top1').src = Path1+"Table_Tops/"+window.document.getElementById('wood').value+".png";
	window.document.getElementById('table_top1').src = Path1+"Table_Tops/blank.png";
}


function mouseUt()
{

	//window.document.getElementById("table_top1").style.visibility = "visible";
	//alert("===");

	//window.document.getElementById("tabletop").innerHTML = "<img src='/images/POKER/Table_Tops/'  name='table_top1' width='750' height='400' id='table_top1'  border='0' style='visibility:visible; filter:alpha(opacity=100); -moz-opacity:100; opacity:100;' usemap='#tabletopMap'>";
	//window.document.getElementById('table_top1').src = Path1+"Table_Tops/"+window.document.getElementById('wood').value+".png";
	
	if(window.document.getElementById('table_top').value == "yes")
	{	
	
		window.document.getElementById('table_top1').src = Path1+"Table_Tops/"+window.document.getElementById('wood').value+".png";			
	}
}
//-->

function Chnlogo(obj)
{
	index =  obj.selectedIndex;
	
	var Path1='images/POKER/';	
	
		if(index == 0)
		{
			window.document.getElementById("table_logo").innerHTML = "<img src='images/POKER/Logo/poker_felt_logo_ps.png'  name='table_logo1' id='table_logo1' width='750' height='400'  border='0' style='visibility:visible;' >";			
			window.document.getElementById("contact_for_logo").innerHTML = "<div id='contact_for_logo' style='visibility:visible;'>*PAOK logo used for preview purposes only. Contact PAOK for details on how to provide your logo/image.</div>";	
			//alert (Path1+"Table_Tops/"+window.document.getElementById('wood').value+".gif");

		}
		if(index == 1)
		{
			window.document.getElementById("table_logo").innerHTML = "<img src='images/POKER/Logo/poker_felt_logo_ps.png'  name='table_logo1' id='table_logo1' width='750' height='400'  border='0' style='visibility:hidden;' >";		
			window.document.getElementById("contact_for_logo").innerHTML = "<div id='contact_for_logo' style='visibility:hidden;'>*PAOK logo used for preview purposes only. Contact PAOK for details on how to provide your logo/image.</div>";																
			//alert (Path1+"Table_Tops/"+window.document.getElementById('wood').value+".gif");
		}				

}


function ChnFelt(obj)
{	
	index =  obj.selectedIndex;	

	
		if(index == 0)
		{
			window.document.getElementById("texture").innerHTML = "<img name=\"tex\" id=\"tex\" src=\"images/POKER/Speed-Cloth-Texture.jpg\"  width=\"40\" height=\"40\" border=\"0\"/> <em>Speed Cloth Texture. Ideal for durability and playability! This is the same type of cloth found in professional high grade poker tables.</em>";	
			//alert (Path1+"Table_Tops/"+window.document.getElementById('wood').value+".gif");

		}
		if(index == 1)
		{
	
			window.document.getElementById("texture").innerHTML = "<img name=\"tex1\" id=\"tex1\" src=\"images/POKER/Felt-Texture.jpg\"  width=\"40\" height=\"40\" border=\"0\"/>  <em> Krypton Texture. Waterproof and has a nap similar to that of billiard cloth</em>";																
			//alert (Path1+"Table_Tops/"+window.document.getElementById('wood').value+".gif");
		}

		if(index == 2)
		{
	
			window.document.getElementById("texture").innerHTML = "<img name=\"tex1\" id=\"tex1\" src=\"images/POKER/Felt-Texture.jpg\"  width=\"40\" height=\"40\" border=\"0\"/>  <em> Zircon Texture. Flat finish water repellant playing cloth similar to that of cotton</em>";																
			//alert (Path1+"Table_Tops/"+window.document.getElementById('wood').value+".gif");
		}
}



function Chncup(obj)
{

if(window.document.getElementById('players').value == "eight")
{
	var path2 = "8_seater_Cups";
}
if(window.document.getElementById('players').value == "ten")
{
	var path2 = "Poker_Cups";
}

if(window.document.getElementById('leg1').value == "Flat Pack")
{
	var path3 = "Poker_Legs_Flat_Pack";
}
if(window.document.getElementById('leg1').value == "Turned")
{
	var path3 = "Poker_Legs_Turned";
}
if(window.document.getElementById('leg1').value == "Square")
{
	var path3 = "Poker_Legs_Square";
}



index =  obj.selectedIndex;
	
	var Path1='images/POKER/';	
	
		if(index == 0)
		{
				window.document.getElementById('cup1').src = Path1+path2+"/brass.png";
				window.document.getElementById('feet1').src = Path1+path3+"/blank.png";
				//alert(Path1+path3+"/brass.png");
				
		}
		if(index == 1)
		{
				window.document.getElementById('cup1').src = Path1+path2+"/stainless.png";
				window.document.getElementById('feet1').src = Path1+path3+"/stainless.png";
				
		}		
}


function setOptions(chosen) 
{
	var selbox = document.formy.color;
	 
	selbox.options.length = 0;
//	if (chosen == " ") 
//	{
//	  selbox.options[selbox.options.length] = new Option('----------------------',' ');
	 
//	}
	if (chosen == "mock") 
	{
	  //selbox.options[selbox.options.length] = new Option('----------------------',' ');
	  selbox.options[selbox.options.length] = new Option('Croc 1','croc1');
	  selbox.options[selbox.options.length] = new Option('Croc 2 ','croc2');
	  selbox.options[selbox.options.length] = new Option('Ostrich 1','ostrich1');
	  selbox.options[selbox.options.length] = new Option('Ostrich 2','Ostrich2');
	  selbox.options[selbox.options.length] = new Option('Buck 1','buck1');
	  selbox.options[selbox.options.length] = new Option('Buck 2','buck2');       
	}
	if (chosen == "real") 
	{
	 
	  selbox.options[selbox.options.length] = new Option('Raw Leather','raw');
	  selbox.options[selbox.options.length] = new Option('Coloured (call to discuss','coloured');
	}
	if (chosen == "vinyl") 
	{
	  
	  selbox.options[selbox.options.length] = new Option('White','white');
	  selbox.options[selbox.options.length] = new Option('Honeycomb','honeycomb');
	  selbox.options[selbox.options.length] = new Option('Poppy (red)','poppy');
	  selbox.options[selbox.options.length] = new Option('Lime','lime');
	  selbox.options[selbox.options.length] = new Option('Black','black');      
	}
}




function ChnColor(obj)
{
	index =  obj.selectedIndex;
	
	var Path1='images/POKER/';	

	
	if(window.document.getElementById('rest_material').value == "mock")
	{
	
		if(index == 0)
		{
				window.document.getElementById('leather1').src = Path1+"Mock_Leather/crock1.png";
				path2 = "Mock_Leather/crock1.png";
		}
		if(index == 1)
		{
				window.document.getElementById('leather1').src = Path1+"Mock_Leather/crock2.png";
				path2 = "Mock_Leather/crock2.png";
		}
		if(index == 2)
		{
				window.document.getElementById('leather1').src = Path1+"Mock_Leather/ostrich1.png";
				path2 = "Mock_Leather/ostrich1.png";
		}
		if(index == 3)
		{
				window.document.getElementById('leather1').src = Path1+"Mock_Leather/ostrich2.png";
				path2 = "Mock_Leather/ostrich2.png";
		}
		if(index == 4)
		{
				window.document.getElementById('leather1').src = Path1+"Mock_Leather/buck1.png";
				path2 = "Mock_Leather/buck1.png";
		}
		if(index == 5)
		{
				window.document.getElementById('leather1').src = Path1+"Mock_Leather/buck2.png";
				path2 = "Mock_Leather/buck2.png";
		}		
		
	}
	if(window.document.getElementById('rest_material').value == "real")	
	{
	
		if(index == 0)
		{
				window.document.getElementById('leather1').src = Path1+"Real_Leather/raw.png";
				path2 = "Real_Leather/raw.png";
		}
		if(index == 1)
		{
				window.document.getElementById('leather1').src = Path1+"Real_Leather/black.png";
				path2 = "Real_Leather/black.png";
		}
	
	}	
	
	if(window.document.getElementById('rest_material').value == "vinyl")	
	{
		if(index == 0)
		{
				window.document.getElementById('leather1').src = Path1+"Rest-Vinyl/white.png";
				path2 = "Rest-Vinyl/white.png";
		}
		if(index == 1)
		{
				window.document.getElementById('leather1').src = Path1+"Rest-Vinyl/honeycomb.png";
				path2 = "Rest-Vinyl/honeycomb.png";
		}
		if(index == 2)
		{
				window.document.getElementById('leather1').src = Path1+"Rest-Vinyl/poppy.png";
				path2 = "Rest-Vinyl/poppy.png";
		}
		if(index == 3)
		{
				window.document.getElementById('leather1').src = Path1+"Rest-Vinyl/lime.png";
				path2 = "Rest-Vinyl/lime.png";
		}
		if(index == 4)
		{
				window.document.getElementById('leather1').src = Path1+"Rest-Vinyl/black.png";
				path2 = "Rest-Vinyl/black.png";
		}						
	
	}	
	
	
	window.document.getElementById('leather_link').value = path2;
	
}




function set()
{
	window.document.getElementById('felt_image').value = window.document.getElementById('felt1').src;
	window.document.getElementById('race_image').value = window.document.getElementById('race').src;
}