


function setCookie(name, value, expires, path, domain, secure)
{
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

function BrowserDetect() {
   var ua = navigator.userAgent.toLowerCase(); 

   // browser engine name
   this.isGecko       = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
   this.isAppleWebKit = (ua.indexOf('applewebkit') != -1);

   // browser name
   this.isKonqueror   = (ua.indexOf('konqueror') != -1); 
   this.isSafari      = (ua.indexOf('safari') != - 1);
   this.isOmniweb     = (ua.indexOf('omniweb') != - 1);
   this.isOpera       = (ua.indexOf('opera') != -1); 
   this.isIcab        = (ua.indexOf('icab') != -1); 
   this.isAol         = (ua.indexOf('aol') != -1); 
   this.isIE          = (ua.indexOf('msie') != -1 && !this.isOpera && (ua.indexOf('webtv') == -1) ); 
   this.isMozilla     = (this.isGecko && ua.indexOf('gecko/') + 14 == ua.length);
   this.isFirebird    = (ua.indexOf('firebird/') != -1);
   this.isNS          = ( (this.isGecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && !this.isOpera && !this.isSafari && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
   
   // spoofing and compatible browsers
   this.isIECompatible = ( (ua.indexOf('msie') != -1) && !this.isIE);
   this.isNSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.isNS && !this.isMozilla);
   
   // rendering engine versions
   this.geckoVersion = ( (this.isGecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
   this.equivalentMozilla = ( (this.isGecko) ? parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) ) : -1 );
   this.appleWebKitVersion = ( (this.isAppleWebKit) ? parseFloat( ua.substring( ua.indexOf('applewebkit/') + 12) ) : -1 );
   
   // browser version
   this.versionMinor = parseFloat(navigator.appVersion); 
   
   // correct version number
   if (this.isGecko && !this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('/', ua.indexOf('gecko/') + 6) + 1 ) );
   }
   else if (this.isMozilla) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
   }
   else if (this.isIE && this.versionMinor >= 4) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
   }
   else if (this.isKonqueror) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('konqueror/') + 10 ) );
   }
   else if (this.isSafari) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('safari/') + 7 ) );
   }
   else if (this.isOmniweb) {
      this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('omniweb/') + 8 ) );
   }
   else if (this.isOpera) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('opera') + 6 ) );
   }
   else if (this.isIcab) {
      this.versionMinor = parseFloat( ua.substring( ua.indexOf('icab') + 5 ) );
   }
   
   this.versionMajor = parseInt(this.versionMinor); 
   
   // dom support
   this.isDOM1 = (document.getElementById);
   this.isDOM2Event = (document.addEventListener && document.removeEventListener);
   
   // css compatibility mode
   this.mode = document.compatMode ? document.compatMode : 'BackCompat';

   // platform
   this.isWin    = (ua.indexOf('win') != -1);
   this.isWin32  = (this.isWin && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1 || ua.indexOf('xp') != -1) );
   this.isMac    = (ua.indexOf('mac') != -1);
   this.isUnix   = (ua.indexOf('unix') != -1 || ua.indexOf('sunos') != -1 || ua.indexOf('bsd') != -1 || ua.indexOf('x11') != -1)
   this.isLinux  = (ua.indexOf('linux') != -1);
   
   // specific browser shortcuts
   this.isNS4x = (this.isNS && this.versionMajor == 4);
   this.isNS40x = (this.isNS4x && this.versionMinor < 4.5);
   this.isNS47x = (this.isNS4x && this.versionMinor >= 4.7);
   this.isNS4up = (this.isNS && this.versionMinor >= 4);
   this.isNS6x = (this.isNS && this.versionMajor == 6);
   this.isNS6up = (this.isNS && this.versionMajor >= 6);
   this.isNS7x = (this.isNS && this.versionMajor == 7);
   this.isNS7up = (this.isNS && this.versionMajor >= 7);
   
   this.isIE4x = (this.isIE && this.versionMajor == 4);
   this.isIE4up = (this.isIE && this.versionMajor >= 4);
   this.isIE5x = (this.isIE && this.versionMajor == 5);
   this.isIE55 = (this.isIE && this.versionMinor == 5.5);
   this.isIE5up = (this.isIE && this.versionMajor >= 5);
   this.isIE6x = (this.isIE && this.versionMajor == 6);
   this.isIE6up = (this.isIE && this.versionMajor >= 6);
   
   this.isIE4xMac = (this.isIE4x && this.isMac);
}

function displayPOP(top, lft) {
 if (pngAlpha) {
  document.write('  <div id="popwin" style="visibility: hidden; position:absolute; width:339px; height:287px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwin3" style="position:absolute; width:339px; height:287px; z-index:300; left: 0; top: 0; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'front.png\',sizingMethod=\'scale\');">')
  document.write('    <div style="padding:40px 20px 0 20px;"><span class="subtitle">National Green Building Festival </span>');
  document.write('<span class="smallPrint"><br /><strong>May 16-18 2010</strong> - Next Spring the Green Home Builders of the Triangle will be honored and challenged to host the best National Green Building Conference ever! We&#8217;ll take lessons from past conferences, including the Custom Builder Symposium, to make the awards dinners more inclusive and affordable.  No-cost round tables will be held to discuss topics raised and to have two different green home tours with on-line previews featuring information and photos of the tour building excitement and improving learning potential.  We have the opportunity to show the world what N.C. brings to the table besides great microbrew and barbeque.</span>');
  document.write('    </div></div>');
  document.write('    <div id="popwin4" style="position:absolute; width:339px; height:287px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwin5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwin6" style="position:absolute; width:250px; height:18px; z-index:600; left: 20px; top: 250px;"><span class="smallPrint"><a href="http://www.nahb.org/conference_details.aspx?conferenceID=59&selectedTab=Overview" target="_blank">Breaking News!</a></span></div>');
  document.write('</div>');
	} else {
  document.write('  <div id="popwin" style="visibility: hidden; position:absolute; width:339px; height:287px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwin3" style="position:absolute; width:339px; height:287px; z-index:300; left: 0; top: 0;"><img src="front.png">');
  document.write('    <div style="padding:50px 40px 0 40px;position:absolute; left: 0; top: 0;"><span class="subtitle">National Green Building Festival </span>');
  document.write('	<p class="smallPrint"><strong>May 16-18 2010</strong><br />Next Spring the Green Home Builders of the Triangle will be honored and challenged to host the best National Green Building Conference ever! We&#8217;ll take lessons from past conferences, including the Custom Builder Symposium, to make the awards dinners more inclusive and affordable.  No-cost round tables will be held to discuss topics raised and to have two different green home tours with on-line previews featuring information and photos of the tour building excitement and improving learning potential.  We have the opportunity to show the world what N.C. brings to the table besides great microbrew and barbeque.</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwin4" style="position:absolute; width:339px; height:287px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwin5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwin6" style="position:absolute; width:250px; height:18px; z-index:600; left: 40px; top: 310px;"><span class="smallPrint"><a href="http://www.nahb.org/conference_details.aspx?conferenceID=59&selectedTab=Overview" target="_blank">Breaking News!</a></span></div>');
  document.write('</div>');
	} 
}

function displayPOP2(top, lft) {
 if (pngAlpha) {
  document.write('  <div id="popwinB" style="visibility: hidden; position:absolute; width:339px; height:287px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinB3" style="position:absolute; width:339px; height:330px; z-index:300; left: 0; top: 0; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'front.png\',sizingMethod=\'scale\');">')
  document.write('    <div style="padding:40px 40px 0 40px;"><span class="subtitle">Michael is Nominated for Energy Value Housing Awards</span>');
  document.write('  <p class="smallPrint"><strong>Nominations:</strong><br />1. EVHA Builder of the year<br />2. EVHA Home of the year<br />3. EVHA People&#8217;s Choice<br />4. NAHB University of Housing Designee of the year.</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinB4" style="position:absolute; width:339px; height:287px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinB5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinB6" style="position:absolute; width:250px; height:18px; z-index:600; left: 40px; top: 200px;"><span class="smallPrint">Please <a href="http://www.nahbrc.com/evha/voting.aspx" target="_blank">vote for us</a> in the EVHA People&#8217;s Choice Award, entry #20.<br /><br />More information at <a href="http://www.nahbrc.com/evha/index.html" target="_blank">www.nahbrc.com/evha</a></span></div>');
  document.write('</div>');
	} else {
  document.write('  <div id="popwinB" style="visibility: hidden; position:absolute; width:339px; height:287px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinB3" style="position:absolute; width:339px; height:330px; z-index:300; left: 0; top: 0;"><img src="front.png">');
  document.write('    <div style="padding:50px 40px 0 40px;position:absolute; left: 0; top: 0;"><span class="subtitle">Michael is Nominated for Energy Value Housing Awards</span>');
  document.write('	<p class="smallPrint"><strong>Nominations:</strong><br />1. EVHA Builder of the year<br />2. EVHA Home of the year<br />3. EVHA People&#8217;s Choice<br />4. NAHB University of Housing Designee of the year.</p>'); 
  document.write('    </div></div>');
  document.write('    <div id="popwinB4" style="position:absolute; width:339px; height:287px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinB5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinB6" style="position:absolute; width:250px; height:18px; z-index:600; left: 40px; top: 200px;"><span class="smallPrint">Please <a href="http://www.nahbrc.com/evha/voting.aspx" target="_blank">vote for us</a> in the EVHA People&#8217;s Choice Award, entry #20.<br /><br />More information at <a href="http://www.nahbrc.com/evha/index.html" target="_blank">www.nahbrc.com/evha</a></span></div>');
  document.write('</div>');
	} 
}


function displayPOP3(top, lft) {
 if (pngAlpha) {
  document.write('  <div id="popwinC" style="visibility: hidden; position:absolute; width:339px; height:487px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinC3" style="position:absolute; width:339px; height:487px; z-index:300; left: 0; top: 0; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'front.png\',sizingMethod=\'scale\');">')
  document.write('    <div style="padding:50px 40px 0 40px;"><span class="subtitle">Bus Tour Map</span>');
  document.write('<p class="smallPrint"><a href="images/busTourMapLarge.jpg"><img src="images/busTourMap.jpg" border="0"></a></p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinC4" style="position:absolute; width:339px; height:487px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinC5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinC6" style="position:absolute; width:260px; height:48px; z-index:600; left: 40px; top: 380px;"><span class="smallPrint"><a href="images/busTourMapLarge.jpg" target="_blank">Larger image</a><br /><a href="http://www.ecohomemagazine.com/news/2010/03/raleigh-durham-builders-to-showcase-green-building-during-nahb-conference-tour.aspx " target="_blank">See all the homes on the tour</a></span></div>');
  document.write('</div>');
	} else {
  document.write('  <div id="popwinC" style="visibility: hidden; position:absolute; width:339px; height:487px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinC3" style="position:absolute; width:339px; height:487px; z-index:300; left: 0; top: 0;"><img src="front.png">');
  document.write('    <div style="padding:40px 40px 0 40px;position:absolute; left: 0; top: 0;"><span class="subtitle">Bus Tour Map</span>');
  document.write('	<p class="smallPrint"><a href="images/busTourMapLarge.jpg"><img src="images/busTourMap.jpg" border="0"></a></p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinC4" style="position:absolute; width:339px; height:487px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinC5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinC6" style="position:absolute; width:260px; height:48px; z-index:600; left: 40px; top: 316px;"><span class="smallPrint"><a href="images/busTourMapLarge.jpg" target="_blank">Larger image</a><br /><a href="http://www.ecohomemagazine.com/news/2010/03/raleigh-durham-builders-to-showcase-green-building-during-nahb-conference-tour.aspx " target="_blank">See all the homes on the tour</a></span></div>');
  document.write('</div>');
	} 
}

function displayPOP4(top, lft) {
 if (pngAlpha) {
  document.write('  <div id="popwinD" style="visibility: hidden; position:absolute; width:339px; height:287px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwin3D" style="position:absolute; width:339px; height:287px; z-index:300; left: 0; top: 0; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'front.png\',sizingMethod=\'scale\');">')
  document.write('    <div style="padding:50px 40px 0 40px;"><span class="subtitle">Certified Green Professional Class</span>');
  document.write('<p class="smallPrint"><strong>Oct. 14 and 15</strong><br /><em>Get Your National Certification!</em><br />This designation for building professionals discusses strategies for incorporating green-building principles into homes without driving up the cost of construction.</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinD4" style="position:absolute; width:339px; height:287px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinD5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinD6" style="position:absolute; width:250px; height:18px; z-index:600; left: 40px; top: 200px;"><span class="smallPrint">For more information, e-mail <a href="mailto:susan.hchba@charterinternet.com">Susan W. Miller</a> or call 828.297.6566.<span></div>');
  document.write('</div>');
	} else {
  document.write('  <div id="popwinD" style="visibility: hidden; position:absolute; width:339px; height:287px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinD3" style="position:absolute; width:339px; height:287px; z-index:300; left: 0; top: 0;"><img src="front.png">');
  document.write('    <div style="padding:50px 40px 0 40px;position:absolute; left: 0; top: 0;"><span class="subtitle">Certified Green Professional Class</span>');
  document.write('	<p class="smallPrint"><strong>Oct. 14 and 15</strong><br /><em>Get Your National Certification!</em><br />This designation for building professionals discusses strategies for incorporating green-building principles into homes without driving up the cost of construction.</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinD4" style="position:absolute; width:339px; height:287px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinD5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinD6" style="position:absolute; width:250px; height:18px; z-index:600; left: 40px; top: 200px;"><span class="smallPrint">For more information, e-mail <a href="mailto:susan.hchba@charterinternet.com">Susan W. Miller</a> or call 828.297.6566.</div>');
  document.write('</div>');
	} 
}

function displayPOP5(top, lft) {
 if (pngAlpha) {
  document.write('  <div id="popwinE" style="visibility: hidden; position:absolute; width:339px; height:287px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwin3E" style="position:absolute; width:339px; height:367px; z-index:300; left: 0; top: 0; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'front.png\',sizingMethod=\'scale\');">')
  document.write('    <div style="padding:50px 40px 0 40px;"><span class="subtitle">Certified Green Professional Class</span>');
  document.write('<p class="smallPrint"><strong>Nov. 10 and 11</strong><br /><em>Get Your National Certification!</em><br />This designation for building professionals discusses strategies for incorporating green-building principles into homes without driving up the cost of construction.</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinE4" style="position:absolute; width:339px; height:287px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinE5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinE6" style="position:absolute; width:250px; height:18px; z-index:600; left: 40px; top: 200px;"><span class="smallPrint">For more information, e-mail <a href="mailto:scraft@pitthbamail.com">Sharon W. Craft</a> or call 252.756.7915.  Online at <a href="http://www.pitthba.com" target="_blank">www.pitthba.com</a>.</span></div>');
  document.write('</div>');
	} else {
  document.write('  <div id="popwinE" style="visibility: hidden; position:absolute; width:339px; height:287px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinE3" style="position:absolute; width:339px; height:287px; z-index:300; left: 0; top: 0;"><img src="front.png">');
  document.write('    <div style="padding:50px 40px 0 40px;position:absolute; left: 0; top: 0;"><span class="subtitle">Certified Green Professional Class</span>');
  document.write('	<p class="smallPrint"><strong>Nov. 10 and 11</strong><br /><em>Get Your National Certification!</em><br />This designation for building professionals discusses strategies for incorporating green-building principles into homes without driving up the cost of construction.</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinE4" style="position:absolute; width:339px; height:287px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinE5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinE6" style="position:absolute; width:250px; height:18px; z-index:600; left: 40px; top: 200px;"><span class="smallPrint">For more information, e-mail <a href="mailto:scraft@pitthbamail.com">Sharon W. Craft</a> or call 252.756.7915.  Online at <a href="http://www.pitthba.com" target="_blank">www.pitthba.com</a>.</span></div>');
  document.write('</div>');
	} 
}

function displayPOP6(top, lft) {
 if (pngAlpha) {
  document.write('  <div id="popwinF" style="visibility: hidden; position:absolute; width:339px; height:287px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwin3F" style="position:absolute; width:339px; height:450px; z-index:300; left: 0; top: 0; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'front.png\',sizingMethod=\'scale\');">')
  document.write('    <div style="padding:50px 40px 0 40px;"><span class="subtitle">Green Theme your Homeowners Manual</span>');
  document.write('<p class="smallPrint"><img src="http://www.chandlerdesignbuild.com/images/evLV.jpg"><br /><br />Both the NAHB green certification and LEED for homes REQUIRE a comprehensive homeowner’s manual to help your buyers maintain their homes for optimum performance and durability.  Implementing a user-friendly and repeatable manual adds value to your business as well as to your homes by reducing your liability and warrantee expense while improving the homes durability and performance and your homeowner’s satisfaction. 90 minutes</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinF4" style="position:absolute; width:339px; height:287px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinF5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinF6" style="position:absolute; width:250px; height:18px; z-index:600; left: 40px; top: 380px;"><span class="smallPrint"><a href="http://www.buildershow.com/Home/Page.aspx?pageID=1" target="_blank">More information...</a></span></div>');
  document.write('</div>');
	} else {
  document.write('  <div id="popwinF" style="visibility: hidden; position:absolute; width:339px; height:287px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinF3" style="position:absolute; width:339px; height:490px; z-index:300; left: 0; top: 0;"><img src="front.png">');
  document.write('    <div style="padding:50px 40px 0 40px;position:absolute; left: 0; top: 0;"><span class="subtitle">Green Theme your Homeowners Manual</span>');
  document.write('	<p class="smallPrint"><img src="http://www.chandlerdesignbuild.com/images/evLV.jpg"><br /><br />Both the NAHB green certification and LEED for homes REQUIRE a comprehensive homeowner’s manual to help your buyers maintain their homes for optimum performance and durability.  Implementing a user-friendly and repeatable manual adds value to your business as well as to your homes by reducing your liability and warrantee expense while improving the homes durability and performance and your homeowner’s satisfaction. 90 minutes</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinF4" style="position:absolute; width:339px; height:287px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinF5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinF6" style="position:absolute; width:250px; height:18px; z-index:600; left: 40px; top: 332px;"><span class="smallPrint"><a href="http://www.buildershow.com/Home/Page.aspx?pageID=1" target="_blank">More information...</a></span></div>');
  document.write('</div>');
	} 
}

function displayPOP7(top, lft) {
 if (pngAlpha) {
  document.write('  <div id="popwinG" style="visibility: hidden; position:absolute; width:339px; height:387px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinG3" style="position:absolute; width:339px; height:400px; z-index:300; left: 0; top: 0; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'front.png\',sizingMethod=\'scale\');">')
  document.write('    <div style="padding:50px 40px 0 40px;"><span class="subtitle">Atlantic Green Conference</span>');
  document.write('<p class="smallPrint"><img src="http://www.chandlerdesignbuild.com/images/evAGC.jpg"><br /><br />Michael will give the keynote address at this event. His talk will be a humorous, provocative and inspiring discussion of green building and its role in revitalizing our economy, our neighborhoods, and our planet. 45 minutes w/ Q&A</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinG4" style="position:absolute; width:339px; height:387px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinG5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinG6" style="position:absolute; width:260px; height:18px; z-index:600; left: 40px; top: 325px;"><span class="smallPrint"><a href="http://atlanticgreen.eventbrite.com/ " target="_blank">More information...</a></span></div>');
  document.write('</div>');
	} else {
  document.write('  <div id="popwinG" style="visibility: hidden; position:absolute; width:339px; height:387px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinG3" style="position:absolute; width:339px; height:387px; z-index:300; left: 0; top: 0;"><img src="front.png">');
  document.write('    <div style="padding:50px 40px 0 40px;position:absolute; left: 0; top: 0;"><span class="subtitle">Atlantic Green Conference</span>');
  document.write('	<p class="smallPrint"><img src="http://www.chandlerdesignbuild.com/images/evAGC.jpg"><br /><br />Michael will give the keynote address at this event. His talk will be a humorous, provocative and inspiring discussion of green building and its role in revitalizing our economy, our neighborhoods, and our planet. 45 minutes w/ Q&A</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinG4" style="position:absolute; width:339px; height:400px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinG5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinG6" style="position:absolute; width:260px; height:18px; z-index:600; left: 40px; top: 315px;"><span class="smallPrint"><a href="http://atlanticgreen.eventbrite.com/ " target="_blank">More information...</a></span></div>');
  document.write('</div>');
	} 
}

function displayPOP8(top, lft) {
 if (pngAlpha) {
  document.write('  <div id="popwinH" style="visibility: hidden; position:absolute; width:339px; height:387px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinH3" style="position:absolute; width:339px; height:387px; z-index:300; left: 0; top: 0; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'front.png\',sizingMethod=\'scale\');">')
  document.write('    <div style="padding:50px 40px 0 40px;"><span class="subtitle">Thirteenth Annual Westford Symposium on Building Science</span>');
  document.write('<p class="smallPrint"><img src="http://www.chandlerdesignbuild.com/images/evBSC.jpg"><br /><br /><strong>August 3-5:</strong><br />Thirteenth Annual Westford Symposium on Building Science<br />Building Science Corp, Westford Mass.</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinH4" style="position:absolute; width:339px; height:387px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinH5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinH6" style="position:absolute; width:260px; height:18px; z-index:600; left: 40px; top: 257px;"><span class="smallPrint">By invitation only.<br /><a href="http://www.greenbuildingadvisor.com/blogs/dept/green-building-blog/day-1-building-science-summer-camp" target="_blank">More information...</a></span></div>');
  document.write('</div>');
	} else {
  document.write('  <div id="popwinH" style="visibility: hidden; position:absolute; width:339px; height:387px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinH3" style="position:absolute; width:339px; height:387px; z-index:300; left: 0; top: 0;"><img src="front.png">');
  document.write('    <div style="padding:50px 40px 0 40px;position:absolute; left: 0; top: 0;"><span class="subtitle">Thirteenth Annual Westford Symposium on Building Science</span>');
  document.write('	<p class="smallPrint"><img src="http://www.chandlerdesignbuild.com/images/evBSC.jpg"><br /><br /><strong>August 3-5:</strong><br />Thirteenth Annual Westford Symposium on Building Science<br />Building Science Corp, Westford Mass.</p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinH4" style="position:absolute; width:339px; height:387px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinH5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinH6" style="position:absolute; width:260px; height:18px; z-index:600; left: 40px; top: 257px;"><span class="smallPrint">By invitation only.<br /><a href="http://www.greenbuildingadvisor.com/blogs/dept/green-building-blog/day-1-building-science-summer-camp" target="_blank">More information...</a></span></div>');
  document.write('</div>');
	} 
}

function displayPOP9(top, lft) {
 if (pngAlpha) {
  document.write('  <div id="popwinI" style="visibility: hidden; position:absolute; width:339px; height:387px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinI3" style="position:absolute; width:339px; height:387px; z-index:300; left: 0; top: 0; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'front.png\',sizingMethod=\'scale\');">')
  document.write('    <div style="padding:50px 40px 0 40px;"><span class="subtitle">Challenges of green architecture</span>');
  document.write('<p class="smallPrint"><strong>April 20:</strong> "Challenges of green architecture: how to make buildings socially ethical, functional and practical" at UNC Chapel Hill as part of their "Earth Week" discussion series. Lectute begins at 6 p.m. </p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinI4" style="position:absolute; width:339px; height:387px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinI5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinI6" style="position:absolute; width:260px; height:18px; z-index:600; left: 40px; top: 207px;"><span class="smallPrint">Contact <a href="mailto:RDPatel@email.unc.edu" target="_blank">Rhea Patel</a>.</span></div>');
  document.write('</div>');
	} else {
  document.write('  <div id="popwinI" style="visibility: hidden; position:absolute; width:339px; height:387px; z-index:100; left:'+lft+'px; top:'+top+'px">');
  document.write('    <div id="popwinI3" style="position:absolute; width:339px; height:387px; z-index:300; left: 0; top: 0;"><img src="front.png">');
  document.write('    <div style="padding:50px 40px 0 40px;position:absolute; left: 0; top: 0;"><span class="subtitle">Challenges of green architecture</span>');
  document.write('	<p class="smallPrint"><strong>April 20:</strong> "Challenges of green architecture: how to make buildings socially ethical, functional and practical" at UNC Chapel Hill as part of their "Earth Week" discussion series.  Lectute begins at 6 p.m. </p>');
  document.write('    </div></div>');
  document.write('    <div id="popwinI4" style="position:absolute; width:339px; height:387px; z-index:400; left: 0; top: 0;"><img src="y.gif" height="287" width="339" border="0"></div>');
  document.write('    <div id="popwinI5" style="position:absolute; width:17px; height:18px; z-index:500; left: 285px; top: 25px;"><a href="javascript:Close();"><img src="x.gif" border="0"></a></div>');
  document.write('    <div id="popwinI6" style="position:absolute; width:260px; height:18px; z-index:600; left: 40px; top: 207px;"><span class="smallPrint">Contact <a href="mailto:RDPatel@email.unc.edu" target="_blank">Rhea Patel</a>.</span></div>');
  document.write('</div>');
	} 
}


function Close()
{
	var popwin = document.getElementById("popwin");
	popwin.style.visibility = 'hidden';
	var popwinB = document.getElementById("popwinB");
	popwinB.style.visibility = 'hidden';
	var popwinC = document.getElementById("popwinC");
	popwinC.style.visibility = 'hidden';
	var popwinD = document.getElementById("popwinD");
	popwinD.style.visibility = 'hidden';

	var popwinE = document.getElementById("popwinE");
	popwinE.style.visibility = 'hidden';
	var popwinF = document.getElementById("popwinF");
	popwinF.style.visibility = 'hidden';
	var popwinG = document.getElementById("popwinG");
	popwinG.style.visibility = 'hidden';
	var popwinH = document.getElementById("popwinH");
	popwinH.style.visibility = 'hidden';
	var popwinI = document.getElementById("popwinI");
	popwinI.style.visibility = 'hidden';
}

function ShowPop()
{
	var popwin = document.getElementById("popwin");
	popwin.style.visibility = 'visible';
}

function ShowPop2()
{
	var popwinB = document.getElementById("popwinB");
	popwinB.style.visibility = 'visible';
}

function ShowPop3()
{
	var popwinC = document.getElementById("popwinC");
	popwinC.style.visibility = 'visible';
}

function ShowPop4()
{
	var popwinD = document.getElementById("popwinD");
	popwinD.style.visibility = 'visible';
}

function ShowPop5()
{
	var popwinE = document.getElementById("popwinE");
	popwinE.style.visibility = 'visible';
}
function ShowPop6()
{
	var popwinF = document.getElementById("popwinF");
	popwinF.style.visibility = 'visible';
}
function ShowPop7()
{
	var popwinG = document.getElementById("popwinG");
	popwinG.style.visibility = 'visible';
}
function ShowPop8()
{
	var popwinH = document.getElementById("popwinH");
	popwinH.style.visibility = 'visible';
}
function ShowPop9()
{
	var popwinI = document.getElementById("popwinI");
	popwinI.style.visibility = 'visible';
}


function preloadImages() {
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

var browser = new BrowserDetect();
// if IE5.5+ on Win32, then display PNGs with AlphaImageLoader
if ((browser.isIE55 || browser.isIE6up) && browser.isWin32) {
	var pngAlpha = true;
// else, if the browser can display PNGs normally, then do that
} else if ((browser.isGecko) || (browser.isIE5up && browser.isMac) || (browser.isOpera && browser.isWin && browser.versionMajor >= 6) || (browser.isOpera && browser.isUnix && browser.versionMajor >= 6) || (browser.isOpera && browser.isMac && browser.versionMajor >= 5) || (browser.isOmniweb && browser.versionMinor >= 3.1) || (browser.isIcab && browser.versionMinor >= 1.9) || (browser.isWebtv) || (browser.isDreamcast)) {
	var pngNormal = true;
}

preloadImages('front.png','x.gif','y.gif');

displayPOP(540,700);
displayPOP2(510,700);
displayPOP3(500,700);
displayPOP7(400,700);
displayPOP4(500,700);
displayPOP5(440,700);
displayPOP6(450,700);
displayPOP8(480,700);
displayPOP9(550,700);


