// JavaScript Document
var mstr_POPUP_SETTINGS = "status=0,toolbar=0,menubar=0" ;
var mstr_POPUP_WINDOW_NAME = "DogwoodWindow";

function InitializeMenus() 
{
	if (document.all&&document.getElementById) {
			navRoot = document.getElementById("nav");

			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
			
  			if (node.nodeName=="LI") {
  			
  				node.onmouseover=function() {
  				this.className+=" over";
					
  			}
								
					
	    	node.onmouseout=function() {
  				  this.className=this.className.replace(" over", "");					
  		   }
	   }
	}
 }
}

// A string used with the window.open command to set window properties
// This method adds height and width properties to the default open command
function getDefaultOpenSettings( iHeight, iWidth )
{
	return mstr_POPUP_SETTINGS + ",height=" + iHeight + ",width=" + iWidth  + ",scrollbars=1" ;
}

/*
DETAIL WINDOW POPUP CODE
*/

function showPopupBathroomHardware( strItemNumber, iHeight, iWidth )
{
	var strOpenSettings = "" ;
	var strURL = "BathroomHardware/" + strItemNumber + ".htm" ;
		
	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 650 ;
	 iWidth = 680;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );	
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);	
	newWindow.focus();
}

function showPopupCeilingFan( strItemNumber, iHeight, iWidth )
{
	var strOpenSettings = "" ;
	var strURL = "CeilingFans/" + strItemNumber + ".htm" ;
	
	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 550 ;
	 iWidth = 800;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );

  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.focus();
}

function showPopupFaucets( strItemNumber, iHeight, iWidth  )
{
	var strOpenSettings = "" ;
	var strURL = "Faucets/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 600 ;
	 iWidth = 850;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);	
	newWindow.focus();
}

function showPopupLighting( strItemNumber, iHeight, iWidth  )
{
	var strOpenSettings = "" ;
	var strURL = "Lighting/" + strItemNumber + ".htm" ;
		
	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 750 ;
	 iWidth = 750;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth ) ; // + ",scrollbars=1";

  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);	
	newWindow.focus();
}

function showPopupDoorKnobs( strItemNumber, iHeight, iWidth  )
{
	var strOpenSettings = "" ;
	var strURL = "DoorKnobs/" + strItemNumber + ".htm" ;
		
	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 400 ;
	 iWidth = 400;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth ); // + ",scrollbars=1";

  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);
	newWindow.focus();
}



function showPopupPlumbingBathtubDrain( strItemNumber, iHeight, iWidth )
{

	var strOpenSettings = "" ;
	var strURL = "PlumbingBathtubDrain/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 400 ;
	 iWidth = 450;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);	
	newWindow.focus();
}

function showPopupPlumbingToilet( strItemNumber, iHeight, iWidth )
{

	var strOpenSettings = "" ;
	var strURL = "PlumbingToilet/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 400 ;
	 iWidth = 450;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);	
	newWindow.focus();
}

function showPopupPlumbingPlasticTubular( strItemNumber, iHeight, iWidth )
{

	var strOpenSettings = "" ;
	var strURL = "PlumbingPlasticTubular/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 400 ;
	 iWidth = 450;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);	
	newWindow.focus();
}

function showPopupCeilingLighting( strItemNumber, iHeight, iWidth )
{

	var strOpenSettings = "" ;
	var strURL = "CeilingLighting/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 400 ;
	 iWidth = 450;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);	
	newWindow.focus();
}

function showPopupWallLighting( strItemNumber, iHeight, iWidth )
{

	var strOpenSettings = "" ;
	var strURL = "WallLighting/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 400 ;
	 iWidth = 450;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);	
	newWindow.focus();
}

function showPopupChandelierLighting( strItemNumber, iHeight, iWidth )
{

	var strOpenSettings = "" ;
	var strURL = "ChandelierLighting/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 400 ;
	 iWidth = 450;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);	
	newWindow.focus();
}


function showPopupPendantLighting( strItemNumber, iHeight, iWidth )
{

	var strOpenSettings = "" ;
	var strURL = "PendantLighting/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 400 ;
	 iWidth = 450;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);	
	newWindow.focus();
}

function showPopupFluorescentLighting( strItemNumber, iHeight, iWidth )
{

	var strOpenSettings = "" ;
	var strURL = "FluorescentLighting/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 400 ;
	 iWidth = 600;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);	
	newWindow.focus();
}

function showPopupOutdoorLighting( strItemNumber, iHeight, iWidth )
{

	var strOpenSettings = "" ;
	var strURL = "OutdoorLighting/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 400 ;
	 iWidth = 450;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);
	newWindow.focus();
}

function showPopupMirrors( strItemNumber, iHeight, iWidth )
{

	var strOpenSettings = "" ;
	var strURL = "Mirrors/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 700 ;
	 iWidth = 600;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);
	newWindow.focus();
}

function showPopupBrassValves( strItemNumber, iHeight, iWidth )
{

	var strOpenSettings = "" ;
	var strURL = "BrassValves/" + strItemNumber + ".htm" ;

	// If we only have one argument use the default sizes for this section
	if ( arguments.length == 1 )
	{
	 iHeight = 400 ;
	 iWidth = 450;
	}
	
	strOpenSettings = getDefaultOpenSettings( iHeight, iWidth );
	
  var newWindow = window.open ( strURL ,mstr_POPUP_WINDOW_NAME,strOpenSettings);
	newWindow.resizeTo(iWidth,iHeight);
	newWindow.focus();
}




function printPage()
{
	window.print(); 
}


function showMenu( objMenu, objSubMenu )
{

	var x = findPosX( objMenu );
	var y = findPosY( objMenu );
	
	objSubMenu.style.posLeft = x ;
	objSubMenu.style.posTop = y + 20 ;
	objSubMenu.style.visibility = 'visible' ;
	objSubMenu.style.zindex = 0;
}

function hideMenu( objSubMenu )
{
	objSubMenu.style.visibility = 'hidden' ;
}


