//---------------------------------------------------------------------------------------------------------
//	DHTML JavaScript (ver 2.3)
//---------------------------------------------------------------------------------------------------------


//----------------------------------//
//  Javascript - scrapbookDetails 	//	
//  opens large horzonal window		//
//----------------------------------//	
	
	function scrapbookDetails(content,target)
{
	window.open(content,target,"menubar=0,statusbar=0,scrollbars=1,toolbar=0,location=0,width=600,height=650");
}

function DoJunc( url )
{
 if ( !opener.closed )
 {
  opener.document.location    = url
 } 
}


//-------------------------------------------------------------------------------------------------------
//	Show/ Hide menus
//-------------------------------------------------------------------------------------------------------
function show(group,item,imgId,imgBase)
{
	if(document.getElementById)
	{
		menuCount	= eval("m_" + group);
		
		mainMenu	= document.getElementById("m" + group + "0");
		subMenu		= document.getElementById("m" + group + item);

		//	Does object exist?
		if( !subMenu )
		{
			//	No, don't process
			return false;
		}
		
		if( imgId != 'NULL' )
		{
			imgObj	= document.getElementById( imgId );
			imgObj.setAttribute( 'base', imgBase );
			imgObj.setAttribute( 'src', imgBase );
		}
		
		mainMenu.style.visibility	= "visible";
		
		if ((mainMenu != subMenu) && (item != 0))
		{
			subMenu.style.visibility	= "visible";
			for (i = 1; i <= menuCount; i++)
			{
				if (i != item)
				{
					document.getElementById("m" + group + i).style.visibility	= "hidden";
				}
			}
		}
	}
}

//-------------------------------------------------------------------------------------------------------
//	Hide menu
//-------------------------------------------------------------------------------------------------------
function hide(group,item,imgId,imgBase)
{
	if(document.getElementById)
	{
		menuCount	= eval("m_" + group);

		//	Does object exist?
		if( !document.getElementById( "m" + group + menuCount ))
		{
			//	No, don't process
			return false;
		}
		
		if( imgId != 'NULL' )
		{
			imgObj	= document.getElementById( imgId );
			imgObj.setAttribute( 'base', imgBase );
			imgObj.setAttribute( 'src', imgBase );
		}
		
		if (item == 0)
		{
			startFrom	= 0;
		}
		else
		{
			startFrom	= 1;
		}
		for (i = startFrom; i <= menuCount; i++)
		{
			document.getElementById("m" + group + i).style.visibility	= "hidden";
		}
	}
}
//-------------------------------------------------------------------------------------------------------
//	Image swap
//-------------------------------------------------------------------------------------------------------
function swapImg(id,img)
{
	if( document.getElementById)
	{
		obj	= document.getElementById(id);
		obj.setAttribute( 'src', img );
	}
}



//----------------------------------//
//  Javascript - enchantedDetails 	//	
//  opens large horzonal window		//
//----------------------------------//	
	
	function enchantedDetails(content,target)
{
	window.open(content,target,"menubar=0,statusbar=0,scrollbars=0,toolbar=0,location=0,width=300,height=350");
}

function DoJunc( url )
{
 if ( !opener.closed )
 {
  opener.document.location    = url
 } 
}
