

	if (document.all)
	{
		sp_docObj = "document.all"
		sp_Top = ".style.top"
		sp_Left = ".style.left"
		sp_High = ".style.pixelHeight"
		sp_Wide = ".style.pixelWidth"
		sp_see = ".style.visibility = 'visible'"
		sp_dontSee = ".style.visibility = 'hidden'"
		sp_bgCol = ".style.backgroundColor"
		sp_txtCol = ".style.color"
		bracketA = '['
		bracketB = ']'
	}
else if(document.layers)
	{
		sp_docObj = "document.layers"
		sp_Top = ".top"
		sp_Left = ".left"
		sp_High = ".clip.height"
		sp_Wide = ".clip.width"
		sp_see = ".visibility = 'show'"
		sp_dontSee = ".visibility = 'hide'"
		sp_bgCol = ".document.bgColor"
		bracketA = '['
		bracketB = ']'
	}
else if (document.getElementById)
	{
		sp_docObj = "document.getElementById"
		sp_Top = ".style.top"
		sp_Left = ".style.left"
		sp_High = ".style.pixelHeight"
		sp_Wide = ".style.pixelWidth"
		sp_see = ".style.visibility = 'visible'"
		sp_dontSee = ".style.visibility = 'hidden'"
		sp_bgCol = ".style.backgroundColor"
		sp_txtCol = ".style.color"
		bracketA = '('
		bracketB = ')'
	}
	
curPic = 0
curThumbs = 1
function showLayer(layerName)
	{
		eval("(" + sp_docObj + bracketA + "'" + layerName + "'" + bracketB + sp_see + ")")
	}
function hideLayer(layerName)
	{
		eval("(" + sp_docObj + bracketA + "'" + layerName + "'" + bracketB + sp_dontSee + ")")
	}
function showPic(id,pic)
	{
		if (id == 'c')
			{
				no = 12
				topFirst = 5
			}
		if (id == 'w')
			{
				no = 17
				topFirst = 8
			}
		if (id == 'p')
			{
				no = 12
				topFirst = 5
			}
		if (pic < 0 || pic >= no)
			{
				// do nothing
			}
		else
			{
				for(i=0;i<no;i++)
			{
				layerName = id+i
				eval("(" + sp_docObj + bracketA + "'" + layerName + "'" + bracketB + sp_dontSee + ")")
			}
		layerName = id+pic
		eval("(" + sp_docObj + bracketA + "'" + layerName + "'" + bracketB + sp_see + ")")
		curPic = pic*1
		//alert("curPic ="+curPic)
		//alert("topFirst ="+topFirst)
		//alert("curThumbs ="+curThumbs)
		if (curPic > topFirst && curThumbs == 1)
			{
				swapThumbs()
			}
		if (curPic <= topFirst && curThumbs == 2)
			{
				swapThumbs()
			}
			}
		

	}
function swapThumbs()
	{
		if (curThumbs == 1)
			{
				hideLayer('thumbs01')
				showLayer('thumbs02')
				curThumbs = 2
			}
		else
			{
				hideLayer('thumbs02')
				showLayer('thumbs01')
				curThumbs = 1
			}
		
	}