function openWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}


function randomQuote() {
i = Math.round(Math.random()*2)+1;
	switch (i) {
		case 1:
		document.write("<span class='accentHel9'><b>Just so you know:</b></span><span class='accentHel9Grey'> The U.S. Environmental Protection Agency (U.S. EPA) has ranked indoor air pollution as a high priority public health risk. (1990)</span>");
		break;
		case 2:
		document.write("<span class='accentHel9'><b>Just so you know:</b></span><span class='accentHel9Grey'> Air pollution contributes to lung disease, including respiratory tract infections, asthma, and lung cancer. (American Lung Association 1999)</span>");
		break;
		case 3:
		document.write("<span class='accentHel9'><b>Just so you know:</b></span><span class='accentHel9Grey'> Asthma is the leading serious chronic illness among children accounting for 10 million lost school days annually. (American Lung Association 2002)</span>");
		break;
	}
}

function randomblock() {
i = Math.round(Math.random()*1)+1;
	switch (i) {
		case 1:
		document.write("<table width='124' cellpadding='0' cellspacing='0' border='0'><tr valign='top'><td><a href='in-the-news.htm'><img src='/images/news/natural_home_cover_tn.jpg' width='124' height='162' alt='Natural Home' border='0'></a></td></tr><tr valign='top'><td><img src='/images/clear.gif' width='1' height='5' alt='' border='0'></td></tr><tr valign='top'><td class='accentHel9Grey'><span class='accentHel9'><b>In the News...</b></span><br>Our <a href='Organic_Mattresses/Natural_Latex/natural_latex_organic_mattresses.html' class='accentHel9Green'>Natural Latex Mattress</a> selection was mentioned in the Nov/Dec issue of Natural Home<br><a href='in-the-news.htm' class='accentHel9Green'>Find out more &gt;</a></td></tr></table>");
		break;
		case 2:
		document.write("<table width='130' cellpadding='0' cellspacing='0' border='0'><tr valign='top'><td><img src='/images/logos/renest-logo.jpg' width='130' height='31' alt='re-nest' border='0'><br><a href='in-the-news.htm'><img src='/images/homepage/pillows-tn.jpg' width='130' height='102' alt='Organic & natural pillows' border='0'></a></td></tr><tr valign='top'><td><img src='/images/clear.gif' width='1' height='5' alt='' border='0'></td></tr><tr valign='top'><td class='accentHel9Grey'><span class='accentHel9'><b>In the News...</b></span><br>Our Organic & Natural Pillows were mentioned on Apartment Therapy's re-nest.com<br><a href='in-the-news.htm' class='accentHel9Green'>Find out more &gt;</a></td></tr></table>");
		break;
	}
}


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];}}
}

function buildDepth(iterations){
    var iterations=iterations-3;
    var depthStr="";
    for (i=0;i<iterations;i++){
        depthStr=depthStr + "../";
    }
    return depthStr;
}


// Javascript for the CMS CSS Menu Module
// Copyright (c) 2005 Alexander Endresen
// Released under General Public Licence
// This script will emulate the css :hover effect on the menu elements in IE

// The variables
var cssid = "primary-nav"; // CSS ID for the menuwrapper
var menuadd = "h";  // Character to be added to the specific classes upon hovering. So for example, if this is set to "h", class "menuparent" will become "menuparenth" when hovered over.
var menuh = "menuh"; // Classname for hovering over all other menu items

if (window.attachEvent) window.attachEvent("onload", cssHover);

function cssHover() {
	var sfEls = document.getElementById(cssid).getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {

		sfEls[i].onmouseover=function() {
			if (this.className != "") {
				this.className = this.className + menuadd;
			}
			else {	
				this.className = menuh;
			}
		}

		sfEls[i].onmouseout=function() {
			if (this.className == menuh) {
				this.className = "";
			}
			else {
				this.className = this.className.replace(new RegExp(menuadd + "$"), "");
			}
		}
	}
}




