var popUpWindow = null
var popUpWindowCount = 0
var popUpWindowName = "popUpWindow"
var preloadFlag;

// ***************************
function toi_doItWithStyle()
// ***************************
{
  document.write( '<STYLE TYPE="text/css">');
  document.write( '	BODY');
  document.write( '	{ ');
  document.write( ' font-family: verdana, arial, helvetica; font-size: 10pt;');
  document.write( '	scrollbar-base-color: 0076A3; ');
  document.write( '	scrollbar-arrow-color: 63AFCC;');
  document.write( '	scrollbar-DarkShadow-Color: 025778;');
  document.write( '	scrollbar-Highlight-Color: 9FCCDD; ');
  document.write( '	}');
  document.write( '.largebluetext {text-decoration: none; color:#2C60BE; font-size: 14pt; line-height: 15pt; font-family: verdana,arial,helvetica}');
  document.write( 'a.largebluetext:hover {text-decoration: underline; color:#2C60BE}');
  document.write( '.bigbluetext {text-decoration: none; color:#2C60BE; font-size: 12pt; line-height: 13pt; font-family: verdana,arial,helvetica}');
  document.write( 'a.bigbluetext:hover {text-decoration: underline; color:#2C60BE}');
  document.write( '.medbluetext {text-decoration: none; color:#2C60BE; font-size: 10pt; line-height: 11pt; font-family: verdana,arial,helvetica}');
  document.write( 'a.medbluetext:hover {text-decoration: underline; color:#000000}');
  document.write( '.medblueitalic {text-decoration: none; color:#2C60BE; font-size: 10pt; line-height: 11pt; font-style: italic; font-family: verdana,arial,helvetica}');
  document.write( 'a.medblueitalic:hover {text-decoration: underline; color:#000000}');
  document.write( '.lilblueitalic {text-decoration: none; color:#2C60BE; font-size: 10pt; line-height: 11pt; font-style: italic; font-family: verdana,arial,helvetica}');
  document.write( 'a.lilblueitalic:hover {text-decoration: underline; color:#000000}');
  document.write( '.lilgreenitalic {text-decoration: none; color:#45AE37; font-size: 10pt; line-height: 11pt; font-style: italic; font-family: verdana,arial,helvetica}');
  document.write( 'a.lilgreenitalic:hover {text-decoration: underline; color:#000000}');
  document.write( '.hugeblacktext {text-decoration: none; color:#000000; font-size: 15pt; line-height: 16pt; font-family: verdana,arial,helvetica}');
  document.write( 'a.hugeblacktext:hover {text-decoration: underline; color:#000000}');
  document.write( '.bigblacktext {text-decoration: none; color:#000000; font-size: 12pt; line-height: 13pt; font-family: verdana,arial,helvetica}');
  document.write( 'a.bigblacktext:hover {text-decoration: underline; color:#000000}');
  document.write( '.medblacktext {text-decoration: none; color:#000000; font-size: 9pt; line-height: 11pt; font-family: verdana,arial,helvetica}');
  document.write( 'a.medblacktext:hover {text-decoration: underline; color:#000000}');
  document.write( '.lilblacktext {text-decoration: none; color:#000000; font-size: 8pt; line-height: 9pt; font-family: verdana,arial,helvetica}');
  document.write( 'a.lilblacktext:hover {text-decoration: underline; color:#000000}');
  document.write( '.lilbluetext {text-decoration: none; color:#2C60BE; font-size: 8pt; line-height: 9pt; font-family: verdana,arial,helvetica}');
  document.write( 'a.lilbluetext:hover {text-decoration: underline; color:#2C60BE}');
  document.write( '.tinyblacktext {text-decoration: none; color:#000000; font-size: 7pt; line-height: 8pt; font-family: verdana,arial,helvetica}');
  document.write( 'a.tinyblacktext:hover {text-decoration: underline; color:#000000}');
  document.write( '.links {text-decoration: none; color:#000000; font-size: 7pt; line-height: 11pt; font-family: verdana,arial,helvetica}');
  document.write( 'a.links:hover {text-decoration: bold; font-weight: bold; color:#0076A3; font-size: 8pt;}');
  document.write( '</STYLE>');

}
// ****************************
function toi_textLinkTable()
// ****************************
{
  document.write(' <table width=550 border="0" cellpadding="0" cellspacing="0">');
  document.write('   <tr>');
  document.write('     <td valign="top" align="center" class="tinyblacktext">');
  document.write('       &nbsp;&nbsp;<a href="fp_home.htm" class="tinyblacktext">Home</a>&nbsp;&nbsp;');
  document.write('       <a href="fp_aboutus.htm" class="tinyblacktext">About Us</a>&nbsp;&nbsp;');
  document.write('       <a href="fp_portfolio.htm" class="tinyblacktext" onClick="toi_putCookieVar( \'FOLIOTYPE\', 0, 0);">Portfolios</a>&nbsp;&nbsp;');
  document.write('       <a href="refersg.htm" class="tinyblacktext">References</a>&nbsp;&nbsp;');
  document.write('       <a href="fp_contacts.htm" class="tinyblacktext">Contacts</a>&nbsp;&nbsp;');
  document.write('       <A href="fp_annualtours.htm" class="tinyblacktext">Annual Tours</A>&nbsp;&nbsp;');


  document.write('       <BR>&nbsp;&nbsp;<a href="ecosystem.htm" class="tinyblacktext">Pond Ecosystems</a>&nbsp;&nbsp;');
  document.write('       <a href="fp_waterfeatures.htm" class="tinyblacktext">WaterScapes</a>&nbsp;&nbsp;');
  document.write('       <a href="fp_landscape.htm" class="tinyblacktext">LandScapes</a>&nbsp;&nbsp;');
  document.write('       <a href="fp_golfscapes.htm" class="tinyblacktext">GolfScapes</a>&nbsp;&nbsp;');
  document.write('       <a href="fp_deckswalls.htm" class="tinyblacktext">Decks/Walls/Patios/Arbors</a>&nbsp;&nbsp;');


  document.write('     </TD>');
  document.write('   </TR>');
  document.write(' </TABLE> ');
}

// **************************************
function toi_copyAndDesign()
// copy right notice and design credit.
// **************************************
{
		document.write('<table width=550 border="0" cellpadding="0" cellspacing="0">');
			document.write('<tr>');
				document.write('<td valign="top" align="center" class="tinyblacktext"><br>Copyright &copy; 2003-2009&nbsp;Frolicking Ponds&reg;, Inc.');
						document.write(' All Rights Reserved.');
				document.write('</td>');
			document.write('</tr>');
		document.write('</table>');
}

// ************************
function toi_mainPreLoad()
// ************************
{
  preloadFlag = false;

	if (document.images)
	{
    p1 = toi_newImage( "images/fp_menuaboutmo.gif" );
    p2 = toi_newImage( "images/fp_menucontactsmo.gif" );
    p3 = toi_newImage( "images/fp_menuhomemo.gif" );
    p4 = toi_newImage( "images/fp_menuportfoliomo.gif" );
		preloadFlag = true;
	}
}

// **********************
function toi_newImage(arg)
// ***********************
{
	if (document.images)
	{
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

// **************************
function toi_changeImages()
// **************************
{
  //preloadFlag =1;
	if (document.images && preloadFlag == true)
	{
		for (var i=0; i<toi_changeImages.arguments.length; i+=2)
		{
			document[toi_changeImages.arguments[i]].src = toi_changeImages.arguments[i+1];
		}
	}
}

// *****************************************************
function openImageWindow( imageFileName, width, height )
// *****************************************************
{
  //var attrString="toolbar=yes,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=" +width+ ",height=" +height ;
  var attrString="toolbar=yes,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes";
  //window.open(imageFileName,'remote','toolbar=yes,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=" +width+ ',height=' +height+ '');
  toi_openPopUpWindow(imageFileName, width, height, attrString);
  //window.open(imageFileName,'remote', attrString);
}

// ******************************************************************
function toi_openPopUpWindow(daURL, daWidth, daHeight, daFeatures)
// ******************************************************************
{
  popUpWindowName = "popUpWindow" + popUpWindowCount++;
  toi_closePopUpWindow();
  if (toi_openPopUpWindow.arguments.length >= 4)
     daFeatures = "," + daFeatures;
   else
     daFeatures = "";
   popUpWindow = window.open(daURL, popUpWindowName, "width=" + daWidth + ",height=" + daHeight + daFeatures);
}

// ******************************************************************
function toi_closePopUpWindow()
// ******************************************************************
{
  if( navigator.appName != "Microsoft Internet Explorer" || parseInt(navigator.appVersion) >=4)
    if(popUpWindow != null)
      if(!popUpWindow.closed)
        popUpWindow.close()
}

// ************************************************
function toi_pageHeaderMenu()
// ************************************************
{
	document.write(' <TR>');
	document.write(' <TD><a href="fp_home.htm" onClick="if(this.blur)this.blur();" onMouseOver="toi_changeImages(\'ihome\',\'images/fp_menuhomemo.gif\');" onMouseOut="toi_changeImages(\'ihome\',\'images/fp_menuhome.gif\');"><IMG name="ihome" SRC="images/fp_menuhome.gif" border=0 WIDTH=128 HEIGHT=32 ALT=""></A></TD>');
	document.write(' <TD><a href="fp_aboutus.htm" onClick="if(this.blur)this.blur();" onMouseOver="toi_changeImages(\'iabout\',\'images/fp_menuaboutmo.gif\');" onMouseOut="toi_changeImages(\'iabout\',\'images/fp_menuabout.gif\');"><IMG name="iabout" SRC="images/fp_menuabout.gif" border=0 WIDTH=104 HEIGHT=32 ALT=""></A></TD>');
	//document.write(' <TD><a href="fp_product-services.htm" onClick="if(this.blur)this.blur();" onMouseOver="toi_changeImages(\'iproducts\',\'images/fp_menuproductsmo.gif\');" onMouseOut="toi_changeImages(\'iproducts\',\'images/fp_menuproducts.gif\');"><IMG name="iproducts" SRC="images/fp_menuproducts.gif" border=0 WIDTH=151 HEIGHT=32 ALT=""></A></TD>');
	document.write(' <TD><a href="fp_portfolio.htm" onClick="if(this.blur)this.blur();toi_putCookieVar( \'FOLIOTYPE\', 0, 0);" onMouseOver="toi_changeImages(\'iportfolio\',\'images/fp_menuportfoliomo.gif\');" onMouseOut="toi_changeImages(\'iportfolio\',\'images/fp_menuportfolio.gif\');"><IMG name="iportfolio" SRC="images/fp_menuportfolio.gif" border=0 WIDTH=104 HEIGHT=32 ALT=""></A></TD>');
	document.write(' <TD><a href="fp_contacts.htm" onClick="if(this.blur)this.blur();" onMouseOver="toi_changeImages(\'icontacts\',\'images/fp_menucontactsmo.gif\');" onMouseOut="toi_changeImages(\'icontacts\',\'images/fp_menucontacts.gif\');"><IMG name="icontacts" SRC="images/fp_menucontacts.gif" border=0 WIDTH=157 HEIGHT=32 ALT=""></A></TD>');
	//document.write(' <TD><a href="fp_links.htm" onClick="if(this.blur)this.blur();" onMouseOver="toi_changeImages(\'ilinks\',\'images/fp_menulinksmo.gif\');" onMouseOut="toi_changeImages(\'ilinks\',\'images/fp_menulinks.gif\');"><IMG name="ilinks" SRC="images/fp_menulinks.gif" border=0 WIDTH=44 HEIGHT=32 ALT=""></A></TD>');
	document.write(' </TR>');
  document.write(' </TABLE>');
}
// **********************************
function toi_subpageheader()
// **********************************
{
  document.write(' <TABLE WIDTH=493 BORDER=0 CELLPADDING=0 CELLSPACING=0>');
  document.write(' <TR>');
  document.write(' <TD COLSPAN=6><IMG SRC="images/fp_subheader_01.gif" WIDTH=493 HEIGHT=55 ALT=""></TD>');
  document.write(' </TR>');
}
// *********************************
function toi_pageFooter()
// *********************************
{
  document.write('<img src="images/spacer.gif" width=15><IMG SRC="images/fp_subheader_08.gif" WIDTH=502 HEIGHT=7 ALT="">');
  toi_textLinkTable();
  toi_copyAndDesign();
}

// *********************************************************
function toi_getCookieVar( forString )
// This function gets the value associated with "forString"
// from the cookie. Return value is numeric
// *********************************************************
{
  var testString = "";
  testString = toi_getCookieStr(forString);
  if( testString == "" )
    return 0;
  else
    return testString.valueOf();
}

// ************************************************************************
function toi_getCookieStr( forString )
// This function gets the value associated with "forString"
// from the cookie. Return value is alpa string.
// Example: to retrieve the value of a cookie named
// NUMBEROFHOUSES: var numberOfHouses = toi_getCookieStr("NUMBEROFHOUSES");
// Note that numberOfHouses will be "24" (string) not 24.0 number.
// To get a numeric value, see function toi_getCookieVar.
// ************************************************************************
{
  var index;
  var namestart;
  var nameend;
  // if this function fails to get a valid string retString
  // will be returned with NULL value.
  var retString = "";
  if(document.cookie)  // is there a cookie?
  {
    // if the cookie exists, get the character position of
    // the first occurance of "forString" in the cookie and
    // assign it to the index variable. -1 is the result
    // when the string is not found within the cookie.
    index = document.cookie.indexOf(forString);
    if (index != -1)
    {
      namestart = (document.cookie.indexOf("=", index) + 1);
      if( namestart == -1 )
        retString = "";
      else
      {
        nameend = document.cookie.indexOf(";", index);
        if (nameend == -1)
        {
          nameend = document.cookie.length;
          retString = document.cookie.substring(namestart, nameend);
        }
        else if ( nameend > namestart )
        {
          retString = document.cookie.substring(namestart, nameend);
        }
      }
    }
  }
  return unescape(retString);
}

// ******************************************
function toi_putCookieVar( forString, sVal, perma )
//
// Save a temporary cookie.
// Example: to save the value of 24 as numberOfHouses
// var numberOfHouses = 12;
// toi_putCookieVar( "NUMBEROFHOUSES", numberOfHouses );
// ******************************************
{
  if( perma > 0)
  {
    //create a cookie expiration date variable
    var expdate = new Date ();
    expdate.setTime (expdate.getTime() + (365 * 24 * 60 * 60 * 1000));
    document.cookie = forString+ "=" +sVal+ "; expires=" + expdate.toGMTString();
  }
  else if( perma < 0 )
    {document.cookie = forString+ "=" +sVal+ "; expires=Thu, 01-Jan-70 00:00:01 GMT";}
  else
    {document.cookie = forString+ "=" +sVal}
}

// ****************************
function toi_deleteCookie( forString )
// ****************************
{
  toi_putCookieVar( forString, "expired", -1 );
  //document.cookie = forString+ "=''; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

