<!--
var bgImg = 
	new Array(
		"images/bg-1.gif",
		"images/bg-2.gif",
		"images/bg-3.gif", 
		"images/bg-4.gif",
		"images/bg-5.gif"
	);

function randRange(intLowerBound, intUpperBound){
	return Math.round(Math.random() * (intUpperBound - intLowerBound)) + intLowerBound
}

function randomBackground() 
{
	var r = randRange(0,4);
	var rand_bg = bgImg[r];
	document.body.style.backgroundImage = 'url(' + rand_bg + ')';
}

function init() 
{
	if (document.body){
		randomBackground();
	}
}

function myFocus(element) {
     if (element.value == element.defaultValue) {
       element.value = '';
     }
}

function checkLocator(){ //v2.0
	var theForm = document._locator;
	var errMsg = "";
	var setfocus = "";

	if (theForm['zipcode'].value == ""){
		errMsg = "Please enter your Zip or Postal code.";
		setfocus = "['zipcode']";
	}
	if (theForm['zipcode'].value == "Zip / Postal Code"){
		errMsg = "Please enter your Zip or Postal code.";
		theForm['zipcode'].value = ""
		setfocus = "['zipcode']";
	}
	if (errMsg != ""){
		alert(errMsg);
		eval("theForm" + setfocus + ".focus()");
	}
	else
	{
		theForm.submit();
	}
}

// Zip search
function redirect() {
        var zipInput = document.getElementById('zipInput');
        if (zipInput.value.length > 2 && zipInput.value != 'Zip / Postal Code') {
            window.location = 'flooring-search.aspx?zip=' + zipInput.value;
        } else {
            alert('Please enter a valid Zip or Postal Code.');
        }
    }

 $(document).ready(function() {	
    //equalize columns on interior pages
    var height1 = $('#contentBox').height();
    if (height1 > 340){
	    $('#contentBox').height(340);
    }
    // activate drop-down menus
    parseStylesheets();
 });
//-->