function loadImages()
{
    var navHover = new Image(10,52);
    navHover.src = "images/nav-h.png";
}

function navHover(td)
{
    //document.getElementById(td).style.color = "#FFFFFF";
    //document.getElementById(td).style.backgroundColor = "#C24953";
    document.getElementById(td).style.backgroundImage = "url('images/nav-h.png')";
    document.getElementById(td).style.backgroundRepeat = "repeat-x";
}

function navNormal(td)
{
    //document.getElementById(td).style.backgroundColor = "#FFFFFF";
    document.getElementById(td).style.backgroundImage = "url('images/nav.png')";
    document.getElementById(td).style.backgroundRepeat = "repeat-x";
}

function buyStagingOver()
{
    document.arrow.src = 'images/purchase-staging-h.png';
}

function buyStagingOut()
{
    document.arrow.src = 'images/purchase-staging.png';
}

function buyStagingDown()
{
    document.arrow.src = 'images/purchase-staging-d.png';
}

function buyStagingUp()
{
    document.arrow.src = 'images/purchase-staging-h.png';
    window.location = 'cgi-bin/buy.pl';
}

function buyOpenHouseOver()
{
    document.arrow.src = 'images/purchase-openhouse-h.png';
}

function buyOpenHouseOut()
{
    document.arrow.src = 'images/purchase-openhouse.png';
}

function buyOpenHouseDown()
{
    document.arrow.src = 'images/purchase-openhouse-d.png';
}

function buyOpenHouseUp()
{
    document.arrow.src = 'images/purchase-openhouse-h.png';
    window.location = 'cgi-bin/buy.pl';
}

function buyDesignOver()
{
    document.arrow.src = 'images/purchase-design-h.png';
}

function buyDesignOut()
{
    document.arrow.src = 'images/purchase-design.png';
}

function buyDesignDown()
{
    document.arrow.src = 'images/purchase-design-d.png';
}

function buyDesignUp()
{
    document.arrow.src = 'images/purchase-design-h.png';
    window.location = 'cgi-bin/buy.pl';
}

function getQuote()
{
    var quoteArray = new Array();
    
    quoteArray.push('If you think it is expensive to hire a professional to do the job, wait until you hire an amateur.<br /><br /> &ndash; Red Adair');
    quoteArray.push('A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.<br /><br /> &ndash; Douglas Adams');
    quoteArray.push('Good ideas are a dime a dozen ... it\'s execution that counts.<br /><br /> &ndash; Anonymous');
    quoteArray.push('A mind that is all logic is like a knife that is all blade&mdash;it hurts the hand that uses it.<br /><br /> &ndash; Anonymous');
    quoteArray.push('Style is engineering that gives you freedom.<br /><br /> &ndash; Chris Bangle');
    quoteArray.push('Design is about making things good (and then better) and right (and fantastic) for the people who use and encounter them.<br /><br /> &ndash; Matt Beale');
    quoteArray.push('Technology, like art, is a soaring exercise in human imagination.<br /><br /> &ndash; Daniel Bell');
    quoteArray.push('Enthusiasm is excitement with inspiration, motivation, and a pinch of creativity.<br /><br /> &ndash; Bo Bennett');
    quoteArray.push('To say that something is designed means it has intentions to go beyond its function. Otherwise it is just planning.<br /><br /> &ndash; Ayse Birsel');
    quoteArray.push('Art is passion practiced with great discipline. Science is discipline practiced with great passion.<br /><br /> &ndash; Dr. Keith Black');
    quoteArray.push('The opposite of every great idea is another great idea.<br /><br /> &ndash; Niels Bohr');
    quoteArray.push('Color does not add a pleasant quality to design&mdash;it reinforces it.<br /><br /> &ndash; Pierre Bonnard');
    quoteArray.push('It is this quality, the power of seeing order in apparent confusion, that has marked the work of all great men.<br /><br /> &ndash; John Chadwick');
    quoteArray.push('Good design, at least part of the time, includes the criteria of being direct in relation to the problem at hand, not obscure, trendy, or stylish.<br /><br /> &ndash; Ivan Chermayeff');
    quoteArray.push('For every expert, there is an equal and opposite expert.<br /><br /> &ndash; Arthur C. Clarke');
    quoteArray.push('When all you have is a hammer, everything looks like a nail.<br /><br /> &ndash; E. Jefferey Conklin &amp; William Weil');
    quoteArray.push('Creativity is allowing oneself to make mistakes. Art is knowing which ones to keep.<br /><br /> &ndash; The Dilbert Principle');
    quoteArray.push('Continuity is not only the uninterrupted steps from one point to another, but it is the cohesive force that holds a diverse composition together.<br /><br /> &ndash; Donis A. Dondis');
    quoteArray.push('Design is a plan for arranging elements in such a way as to best accomplish a particular purpose.<br /><br /> &ndash; Charles Eames');
    quoteArray.push('Opportunity is missed by most people because it is dressed in overalls and looks like work.<br /><br /> &ndash; Thomas Edison');
    quoteArray.push('Intellectuals solve problems, geniuses prevent them.<br /><br /> &ndash; Albert Einstein');
    quoteArray.push('Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius and a lot of courage to move in the opposite direction.<br /><br /> &ndash; Albert Einstein');
    quoteArray.push('A market is never saturated with a good product, but it is very quickly saturated with a bad one.<br /><br /> &ndash; Henry Ford');
    quoteArray.push('No design works unless it embodies ideas that are held common by the people for whom the object is intended.<br /><br /> &ndash; Adrian Forty');
    quoteArray.push('Every tool carries with it the spirit with which it has been created.<br /><br /> &ndash; Werner Karl Heisenberg');
    quoteArray.push('It is very easy to be different, but very difficult to be better.<br /><br /> &ndash; Jonathan Ive');
    quoteArray.push('Design is the fundamental soul of a man-made creation that ends up expressing itself in successive outer layers of the product or service.<br /><br /> &ndash; Steve Jobs');
    quoteArray.push('The more technology becomes complicated inside, the more it has to be simple outside.<br /><br /> &ndash; Derrick De Kerckhove');
    quoteArray.push('A design isn\'t finished until somebody uses it.<br /><br /> &ndash; Brenda Laurel');
    quoteArray.push('Simplicity of device is always the sign of the master, whether in science or art.<br /><br /> &ndash; Richard C. Maclaurin');
    quoteArray.push('Good design defuses the tension between functional and aesthetic goals precisely because it works within the boundaries defined by the functional elements of the communication problem.<br /><br /> &ndash; Kevin Mullet &amp; Darrell Sano');
    quoteArray.push('Design is intelligence made visible.<br /><br /> &ndash; Don Newgren');
    quoteArray.push('Style impresses, true beauty expresses.<br /><br /> &ndash; Chris Pacione');
    quoteArray.push('The only important thing about design is how it relates to people.<br /><br /> &ndash; Victor Papanek');
    quoteArray.push('Our opportunity, as designers, is to learn how to handle the complexity, rather than shy away from it, and to realize that the big art of design is to make complicated things simple.<br /><br /> &ndash; Tim Parsey');
    quoteArray.push('Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity.<br /><br /> &ndash; George Smith Patton');
    quoteArray.push('All children are artists&mdash;the problem is how to remain an artist once the child grows up.<br /><br /> &ndash; Pablo Picasso');
    quoteArray.push('Art is an idea that has found its perfect visual expression and design is the vehicle by which this expression is made possible...Art is a product and design is a process. Design is the foundation of all arts.<br /><br /> &ndash; Paul Rand');
    quoteArray.push('Objects do not have meaning, but if an object is thoughtful we project meaning into it in daily life.<br /><br /> &ndash; Karim Rashid');
    quoteArray.push('Designing a product is designing a relationship.<br /><br /> &ndash; Steve Rogers');
    quoteArray.push('Always design a thing by considering it in its next larger context&mdash;a chair in a room, a room in a house, a house in an environment, an environment in a city plan.<br /><br /> &ndash; Elial Sarrinen');
    quoteArray.push('Perfection is not reached when there is nothing to be added anymore, but when there is nothing to be left out anymore.<br /><br /> &ndash; Antoine de Saint-Exupery');
    quoteArray.push('The design process, at its best, integrates the aspirations of art, science, and culture.<br /><br /> &ndash; Jeff Smith');
    quoteArray.push('Good design is a lot like clear thinking made visual.<br /><br /> &ndash; Edward Tufte');
    quoteArray.push('You can\'t depend on your eyes, when your imagination is out of focus.<br /><br /> &ndash; Mark Twain');
    quoteArray.push('Bring ideas in and entertain them royally, for one of them may be the king,<br /><br /> &ndash; Mark van Doren');
    quoteArray.push('Great things are not done by impulse, but a series of small things brought together.<br /><br /> &ndash; Vincent Van Gogh');
    quoteArray.push('Designers can create normalcy out of chaos; they can clearly communicate ideas through organizing and manipulating of words and pictures.<br /><br /> &ndash; Jeffery Veen');
    quoteArray.push('Planning is everything; plans are nothing.<br /><br /> &ndash; Helmuth von Moltke');
    quoteArray.push('Space is the breath of art.<br /><br /> &ndash; Frank Lloyd Wright');
    quoteArray.push('I never design a building before I\'ve seen the site and met the people who will be using it.<br /><br /> &ndash; Frank Lloyd Wright');
    quoteArray.push('Great design will not sell an inferior product, but it will enable a great product to achieve its maximum potential.<br /><br /> &ndash; Thomas J. Watson, Jr.');
    quoteArray.push('Home is the most popular, and will be the most enduring of all earthly establishments.<br /><br /> &ndash; Channing Pollock');
    
    var date = new Date();
    var month = date.getMonth();
    month *= 30;
    month += date.getDate();
    month /= 7;
    var week = Math.round(month);
    document.getElementById('quote').innerHTML = '<img src="images/note-top.png" align="center" style="display:block" />' + quoteArray[week];
}

function checkAllFields()
{
    var emailAddress = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
    var subjectLine = /^.+$/;
    var bodyField = /^.+$/m;
    var url = /h\s*r\s*e\s*f/;
    
    if (document.getElementById('email').value.match(emailAddress) && document.getElementById('subject').value.match(subjectLine) && document.getElementById('body').value.match(bodyField))
    {
    	if (!document.getElementById('body').value.match(url))
    	{
    		document.getElementById('submitButton').disabled = false;
    	}
    	else
    	{
    		document.getElementById('submitButton').disabled = true;
    	}
    }
    else
    {
        document.getElementById('submitButton').disabled = true;
    }
}