
function openWindow(url,height,width){
	// Define a variable to set as object type WINDOW
	// Set its value to null
	var newwind = null
	if (width=="")width=300;
	if (height=="")height=225;

	// Create a new browser window called newwind
	newwind = window.open('', 'newwind', 'toolbar=no,personalbar=no,scrollbars=no,status=yes,width='+width+',height='+height+',resizable=no,hotkeys=0,left=0,top=0,dependent=yes');

	// Check if the window newwind created successfully
	if (newwind != null) {
		// Check if newwind opened successfully
		if (newwind.opener == null) {
			// If not open it
			newwind.opener = self
		}
		// Load the page into the window
		newwind.location.href = url;
	}
	// Bring the new window to the front!
	newwind.focus();
}

function printWindow(){
       // IE 4+ use WINDOW.PRINT object  
        if (window.print) {
        window.print() ;  
        } else {
                // Netscape Navigator create custom object
        var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
                document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
                //Use a 1 vs. a 2 for a prompting dialog box    
		WebBrowser1.outerHTML = "";
                WebBrowser1.ExecWB(6, 2);
        }
}

function bookmarkWindow(bmurl, bmtitle){
	
	if(bmurl=="")bmurl="http://www.TripleWood.com";
	if(bmtitle=="")bmtitle="Home Page";

	window.external.AddFavorite(bmurl, 'Triplewood - ' + bmtitle);
}

function toggleDiv(whichDiv)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichDiv).style;
		if(style2.display == "none")
		{
			style2.display = "block";
		}
		else
		{
			style2.display = style2.display = "none";
		}
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichDiv].style;
		if(style2.display == "none")
		{
			style2.display = "block";
		}
		else
		{
			style2.display = style2.display = "none";
		}
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichDiv].style;
		if(style2.display == "none")
		{
			style2.display = "block";
		}
		else
		{
			style2.display = style2.display = "none";
		}
	}
}

