//---------------------------------------------------------------------------------------------------------
//	DHTML JavaScript (ver 2.3)
//---------------------------------------------------------------------------------------------------------

//----------------------------------//
//  Javascript - Mouseovers		 	//	
//----------------------------------//

//  shop links  //

shop0					= new Image();
shop0.src				= "../images/shop_0.gif";
shop1					= new Image();
shop1.src				= "../images/shop_1.gif";

shop_sm0					= new Image();
shop_sm0.src				= "../images/shop_sm_0.gif";
shop_sm1					= new Image();
shop_sm1.src				= "../images/shop_sm_1.gif";
//  Thumbnails  //

thm_10					= new Image();
thm_10.src				= "../images/thm/thm_1_0.jpg";
thm_11					= new Image();
thm_11.src				= "../images/thm/thm_1_1.jpg";

thm_20					= new Image();
thm_20.src				= "../images/thm/thm_2_0.jpg";
thm_21					= new Image();
thm_21.src				= "../images/thm/thm_2_1.jpg";

thm_30					= new Image();
thm_30.src				= "../images/thm/thm_3_0.jpg";
thm_31					= new Image();
thm_31.src				= "../images/thm/thm_3_1.jpg";

thm_40					= new Image();
thm_40.src				= "../images/thm/thm_4_0.jpg";
thm_41					= new Image();
thm_41.src				= "../images/thm/thm_4_1.jpg";

thm_50					= new Image();
thm_50.src				= "../images/thm/thm_5_0.jpg";
thm_51					= new Image();
thm_51.src				= "../images/thm/thm_5_1.jpg";

thm_60					= new Image();
thm_60.src				= "../images/thm/thm_6_0.jpg";
thm_61					= new Image();
thm_61.src				= "../images/thm/thm_6_1.jpg";

thm_70					= new Image();
thm_70.src				= "../images/thm/thm_7_0.jpg";
thm_71					= new Image();
thm_71.src				= "../images/thm/thm_7_1.jpg";

thm_80					= new Image();
thm_80.src				= "../images/thm/thm_8_0.jpg";
thm_81					= new Image();
thm_81.src				= "../images/thm/thm_8_1.jpg";

thm_90					= new Image();
thm_90.src				= "../images/thm/thm_9_0.jpg";
thm_91					= new Image();
thm_91.src				= "../images/thm/thm_9_1.jpg";

thm_100					= new Image();
thm_100.src				= "../images/thm/thm_10_0.jpg";
thm_101					= new Image();
thm_101.src				= "../images/thm/thm_10_1.jpg";

thm_110					= new Image();
thm_110.src				= "../images/thm/thm_11_0.jpg";
thm_111					= new Image();
thm_111.src				= "../images/thm/thm_11_1.jpg";

thm_120					= new Image();
thm_120.src				= "../images/thm/thm_12_0.jpg";
thm_121					= new Image();
thm_121.src				= "../images/thm/thm_12_1.jpg";

thm_130					= new Image();
thm_130.src				= "../images/thm/thm_13_0.jpg";
thm_131					= new Image();
thm_131.src				= "../images/thm/thm_13_1.jpg";

thm_140					= new Image();
thm_140.src				= "../images/thm/thm_14_0.jpg";
thm_141					= new Image();
thm_141.src				= "../images/thm/thm_14_1.jpg";

thm_150					= new Image();
thm_150.src				= "../images/thm/thm_15_0.jpg";
thm_151					= new Image();
thm_151.src				= "../images/thm/thm_15_1.jpg";

thm_160					= new Image();
thm_160.src				= "../images/thm/thm_16_0.jpg";
thm_161					= new Image();
thm_161.src				= "../images/thm/thm_16_1.jpg";

thm_170					= new Image();
thm_170.src				= "../images/thm/thm_17_0.jpg";
thm_171					= new Image();
thm_171.src				= "../images/thm/thm_17_1.jpg";

thm_180					= new Image();
thm_180.src				= "../images/thm/thm_18_0.jpg";
thm_181					= new Image();
thm_181.src				= "../images/thm/thm_18_1.jpg";

//  Thumbnails - Wedding //

thm_wed_10				= new Image();
thm_wed_10.src			= "../images/thm/thm_wedding_1_0.jpg";
thm_wed_11				= new Image();
thm_wed_11.src			= "../images/thm/thm_wedding_1_1.jpg";

thm_wed_20				= new Image();
thm_wed_20.src			= "../images/thm/thm_wedding_2_0.jpg";
thm_wed_21				= new Image();
thm_wed_21.src			= "../images/thm/thm_wedding_2_1.jpg";

thm_wed_30				= new Image();
thm_wed_30.src			= "../images/thm/thm_wedding_3_0.jpg";
thm_wed_31				= new Image();
thm_wed_31.src			= "../images/thm/thm_wedding_3_1.jpg";

thm_wed_40				= new Image();
thm_wed_40.src			= "../images/thm/thm_wedding_4_0.jpg";
thm_wed_41				= new Image();
thm_wed_41.src			= "../images/thm/thm_wedding_4_1.jpg";

thm_wed_50				= new Image();
thm_wed_50.src			= "../images/thm/thm_wedding_5_0.jpg";
thm_wed_51				= new Image();
thm_wed_51.src			= "../images/thm/thm_wedding_5_1.jpg";

thm_wed_60				= new Image();
thm_wed_60.src			= "../images/thm/thm_wedding_6_0.jpg";
thm_wed_61				= new Image();
thm_wed_61.src			= "../images/thm/thm_wedding_6_1.jpg";

thm_wed_70				= new Image();
thm_wed_70.src			= "../images/thm/thm_wedding_7_0.jpg";
thm_wed_71				= new Image();
thm_wed_71.src			= "../images/thm/thm_wedding_7_1.jpg";

thm_wed_80				= new Image();
thm_wed_80.src			= "../images/thm/thm_wedding_8_0.jpg";
thm_wed_81				= new Image();
thm_wed_81.src			= "../images/thm/thm_wedding_8_1.jpg";

thm_wed_90				= new Image();
thm_wed_90.src			= "../images/thm/thm_wedding_9_0.jpg";
thm_wed_91				= new Image();
thm_wed_91.src			= "../images/thm/thm_wedding_9_1.jpg";


//  Navigation  //

nav_10					= new Image();
nav_10.src				= "../images/nav_moonrock.gif";
nav_11					= new Image();
nav_11.src				= "../images/nav_moonrock_ovr.gif";

nav_20					= new Image();
nav_20.src				= "../images/nav_products.gif";
nav_21					= new Image();
nav_21.src				= "../images/nav_products_ovr.gif";

nav_30					= new Image();
nav_30.src				= "../images/nav_merch.gif";
nav_31					= new Image();
nav_31.src				= "../images/nav_merch_ovr.gif";

nav_40					= new Image();
nav_40.src				= "../images/nav_gallery.gif";
nav_41					= new Image();
nav_41.src				= "../images/nav_gallery_ovr.gif";

nav_50					= new Image();
nav_50.src				= "../images/shop_moonrock_small.gif";
nav_51					= new Image();
nav_51.src				= "../images/shop_moonrock_small_2.gif";

//  View more products  //

view_10					= new Image();
view_10.src				= "../images/view_0.gif";
view_11					= new Image();
view_11.src				= "../images/view_1.gif";

//  View heirlooms  //

heirlooms_10				= new Image();
heirlooms_10.src			= "../images/heirlooms_0.gif";
heirlooms_11				= new Image();
heirlooms_11.src			= "../images/heirlooms_1.gif";


//  Wedding article  //

article_10					= new Image();
article_10.src				= "../images/article_link_0.gif";
article_11					= new Image();
article_11.src				= "../images/article_link_1.gif";

//  Coastal article  //

coastal0					= new Image();
coastal0.src				= "../images/mb_4.05_link_0.jpg";
coastal1					= new Image();
coastal1.src				= "../images/mb_4.05_link_1.jpg";

//  House article  //

house0					= new Image();
house0.src				= "../images/house_link_0.jpg";
house1					= new Image();
house1.src				= "../images/house_link_1.jpg";

//  Mailing / catalog form links  //

join0					= new Image();
join0.src				= "../images/join_0.gif";
join1					= new Image();
join1.src				= "../images/join_1.gif";

retail0					= new Image();
retail0.src				= "../images/retail_0.gif";
retail1					= new Image();
retail1.src				= "../images/retail_1.gif";

request0					= new Image();
request0.src				= "../images/request_catalog_0.gif";
request1					= new Image();
request1.src				= "../images/request_catalog_1.gif";

request20					= new Image();
request20.src				= "../images/request_catalog_0.gif";
request21					= new Image();
request21.src				= "../images/request_catalog_1.gif";

//  splash nav  //

splash_10					= new Image();
splash_10.src				= "images/splash_1_0.gif";
splash_11					= new Image();
splash_11.src				= "images/splash_1_1.gif";

splash_20					= new Image();
splash_20.src				= "images/splash_2_0.gif";
splash_21					= new Image();
splash_21.src				= "images/splash_2_1.gif";

splash_30					= new Image();
splash_30.src				= "images/splash_3_0.gif";
splash_31					= new Image();
splash_31.src				= "images/splash_3_1.gif";

splash_40					= new Image();
splash_40.src				= "images/splash_4_0.gif";
splash_41					= new Image();
splash_41.src				= "images/splash_4_1.gif";

splash_50					= new Image();
splash_50.src				= "images/splash_5_0.gif";
splash_51					= new Image();
splash_51.src				= "images/splash_5_1.gif";

function mOver(what,num)
{
	
	if(num == '1')
	{
		if(document.images)	
		{
			document[what].src	= eval(what + "1.src");
		}
	}

}

function mOut(what,num)
{
	
	if(num == '0')
	{
		if(document.images)	
		{
			document[what].src	= eval(what + "0.src");
		}
	}
}

//---------------------------------------------------------------------------------------------------------
//	Gallery index
//---------------------------------------------------------------------------------------------------------
var selectedID = 0;

function showphoto(what)
{
	//	Hide existing one
	if (selectedID)
	{
		hidephoto();	
	}
	
	photoobject							= document.getElementById('photo' + what);
	photoobject.style.visibility			= 'visible'; 
	selectedID							= what;
}

function hidephoto()
{
	if (selectedID)
	{
		selectedobject					= document.getElementById('photo' + selectedID);
		selectedobject.style.visibility = 'hidden'; 
		selectedID						= 0;
	}
}

//----------------------------------//
//  Javascript - articleDetails 	//	
//  opens large horzonal window		//
//----------------------------------//	
	
	function articleDetails(content,target)
{
	window.open(content,target,"menubar=0,statusbar=0,scrollbars=1,toolbar=0,location=0,width=800,height=600");
}

function DoJunc( url )
{
 if ( !opener.closed )
 {
  opener.document.location    = url
 } 
}


//----------------------------------//
//  Javascript - MM_preloadImages 	//	
//  Does what it says				//
//----------------------------------//	
function MM_preloadImages() 
{ //v3.0
  var d=document; 
	if(d.images)
	{ 
		if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
		for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0)
		{
			d.MM_p[j]=new Image; 
			d.MM_p[j++].src=a[i];
		}
	}
}


//------------------------------------//
//  Javascript - Mouseovers (map)	  //	
//------------------------------------//

map10			= new Image();
map10.src		= "../images/map/us_map_def.gif";
map11			= new Image();
map11.src		= "../images/map/us_map_me.gif";

map20			= new Image();
map20.src		= "../images/map/us_map_def.gif";
map21			= new Image();
map21.src		= "../images/map/us_map_nh.gif";

map30			= new Image();
map30.src		= "../images/map/us_map_def.gif";
map31			= new Image();
map31.src		= "../images/map/us_map_vt.gif";

map40			= new Image();
map40.src		= "../images/map/us_map_def.gif";
map41			= new Image();
map41.src		= "../images/map/us_map_ri.gif";

map50			= new Image();
map50.src		= "../images/map/us_map_def.gif";
map51			= new Image();
map51.src		= "../images/map/us_map_ct.gif";

map60			= new Image();
map60.src		= "../images/map/us_map_def.gif";
map61			= new Image();
map61.src		= "../images/map/us_map_ny.gif";

map70			= new Image();
map70.src		= "../images/map/us_map_def.gif";
map71			= new Image();
map71.src		= "../images/map/us_map_ma.gif";


function changeMapOver(what,num)
{
	if(num == '1')
	{
		if(document.images)	
		{
			document['map1'].src	= eval(what + "1.src");
		}
	}

}

function changeMapOut(what,num)
{
	if(num == '0')
	{
		if(document.images)	
		{
			document['map1'].src	= eval(what + "0.src");
		}
	}
}

//---------------------------------------------------------------------------------------------------------
//	Pop-up window
//---------------------------------------------------------------------------------------------------------
var selectedID = 0;

function showbox(what)
{
	//	Hide existing one
	if (selectedID)
	{
		hidebox();	
	}
	
	boxobject							= document.getElementById('box' + what);
	boxobject.style.visibility			= 'visible'; 
	selectedID							= what;
}

function hidebox()
{
	if (selectedID)
	{
		selectedobject					= document.getElementById('box' + selectedID);
		selectedobject.style.visibility = 'hidden'; 
		selectedID						= 0;
	}
}

//-------------------------------------------------------------------------------------------------------
//	Image swap
//-------------------------------------------------------------------------------------------------------
function swapImg(id,img)
{
	if( document.getElementById)
	{
		obj	= document.getElementById(id);
		obj.setAttribute( 'src', img );
	}
}
