function swap(bgimage){
document[bgimage].src='images/'+bgimage+'_over.jpg';
}

function swapBack(bgimage){
document[bgimage].src='images/'+bgimage+'_off.jpg';
}




function printpage() {
window.print();  
}

function switchBanner(){

		
		var generatornum = Math.random();
		var maxnumber = 15;
		var randomnum = Math.round(generatornum * maxnumber + 1);
		
		if(randomnum == 1){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">The Corus Difference</h4><div class="orcopy" style="padding-top:6px;">I wanted to thank you all for the great service, advice, and patience you demonstrated during my home buying process... I have already recommended Corus to my friends.  Thanks again!<br /><br /> D. B.</div>';
		}
		if(randomnum == 2){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">The Corus Difference</h4><div class="orcopy" style="padding-top:6px;">Thank you so much for all your hard work and being a pleasure to work with. You have made this past stressful month so much easier for us... Thanks!<br /><br /> C.S.</div>';
		}
		if(randomnum == 3){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">The Corus Difference</h4><div class="copy" align="center"><img src="images/logo_EandYsml.gif" /><br /><br /><a href="PressRoom.aspx#gormannamed">Corus Home Realty&#39;s Michael Gorman Named Finalist For Ernst & Young 2005 Entrepreneur Of The Year Award</a></div>';
		}
		if(randomnum == 4){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">The Corus Difference</h4><div class="copy" align="center"><img src="images/logo_businessjournalsml.gif" /><br /><br /><a href="PressRoom.aspx#businessjournal">Corus Home Realty Named To Washington Business Journal Top 25</a></div>';
		}
		if(randomnum == 5){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">Featured Listing</h4><div class="copy" align="center"><img src="images/list_11965RaybornCreek.jpg" /><br /><a href="pdf/11965RaybornCreek.pdf" target="_blank">11965 Rayborn Creek Drive, Manassas, VA</a><br />$529,990</div>';
		}
		if(randomnum == 6){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">Featured Listing</h4><div class="copy" align="center"><img src="images/longweb.jpg" /><br /><a href="pdf/1260WeatherstoneCt.pdf" target="_blank">1260 Weatherstone Court, Reston, VA</a><br />$549,900</div>';
		}
		if(randomnum == 7){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">Featured Listing</h4><div class="copy" align="center"><img src="images/list_11965RaybornCreek.jpg" /><br /><a href="pdf/11965RaybornCreek.pdf" target="_blank">11965 Rayborn Creek Drive, Manassas, VA</a><br />$529,990</div>';
		}
		if(randomnum == 8){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">Featured Listing</h4><div class="copy" align="center"><img src="images/list_18214SwanStream.jpg" /><br /><a href="pdf/18214SwanStream.pdf" target="_blank">18214 Swan Stream Drive, Gaithersburg, MD</a><br />$499,900</div>';
		}
		if(randomnum == 9){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">The Corus Difference</h4><div class="orcopy" style="padding-top:6px;">We were so impressed with the professionalism and enthusiasm of everyone in your office from the moment we first visited until our closing date...We will certainly recommend you and Corus to everyone!<br /><br />L.C.</div>';
		}
		if(randomnum == 10){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">Featured Listing</h4><div class="copy" align="center"><img src="images/list_2001North15th.jpg" /><br /><a href="pdf/2001North15th.pdf" target="_blank">2001 North 15th Street, #705, Arlington, VA</a><br />$470,000</div>';
		}
		if(randomnum == 11){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">Featured Listing</h4><div class="copy" align="center"><img src="images/list_204Sixth.jpg" /><br /><a href="pdf/204Sixth.pdf" target="_blank">204 Sixth Street, Laurel, MD</a><br />$435,000</div>';
		}
		if(randomnum == 12){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">Featured Listing</h4><div class="copy" align="center"><img src="images/list_204Sixth.jpg" /><br /><a href="pdf/204Sixth.pdf" target="_blank">204 Sixth Street, Laurel, MD</a><br />$435,000</div>';
		}
		if(randomnum == 13){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">Featured Listing</h4><div class="copy" align="center"><img src="images/list_204Sixth.jpg" /><br /><a href="pdf/204Sixth.pdf" target="_blank">204 Sixth Street, Laurel, MD</a><br />$435,000</div>';
		}
		if(randomnum == 14){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">Featured Listing</h4><div class="copy" align="center"><img src="images/list_18214SwanStream.jpg" /><br /><a href="pdf/18214SwanStream.pdf" target="_blank">18214 Swan Stream Drive, Gaithersburg, MD</a><br />$499,900</div>';
}
		if(randomnum == 15){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">Featured Listing</h4><div class="copy" align="center"><img src="images/list_204Sixth.jpg" /><br /><a href="pdf/204Sixth.pdf" target="_blank">204 Sixth Street, Laurel, MD</a><br />$435,000</div>';
		}
		if(randomnum == 16){
		rotating.innerHTML = '<h4 style="BORDER-BOTTOM: #666666 1px solid;">The Corus Difference</h4><div class="copy" align="center"><img src="images/logo_EandYsml.gif" /><br /><br /><a href="PressRoom.aspx#gormannamed">Corus Home Realty&#39;s Michael Gorman Named Finalist For Ernst & Young 2005 Entrepreneur Of The Year Award</a></div>';
		}
	}

var divOne = true;


function switchBanner1(){
	if(divOne == true){
		divOne = false;
		rotating1.innerHTML = '<div><a href="HomeSeller.aspx" /><img src="images/express_elite.gif" border="0"  /></a></div>';
		return false;
	}
	if(divOne != true){
		divOne = true;
		rotating1.innerHTML = '<div><a href="HomeSeller.aspx" /><img src="images/express_elite.gif" border="0"  /></a></div>';
		return false;
	}
}

//rotating1.innerHTML = '<div style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; BACKGROUND-IMAGE: url(images/express_listing.gif); BORDER-LEFT: #666666 1px solid; WIDTH: 200px; BORDER-BOTTOM: #666666 1px solid; HEIGHT: 154px; repeat: repeat y"><div class="lgblue" style="PADDING-TOP:63px; padding-left:15px;">3.9%</div><div class="lgtan" style="PADDING-LEFT:138px; padding-top:30px;">6%</div></div>';
//rotating1.innerHTML = '<div style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; BORDER-LEFT: #666666 1px solid; WIDTH: 200px; BORDER-BOTTOM: #666666 1px solid; HEIGHT: 154px;"><div style="PADDING-TOP:10px; padding-left:00px;"><h4 style="BORDER-BOTTOM: #666666 1px solid;">&nbsp;&nbsp;Thinking about buying?</h4></div><div style="PADDING-TOP:10px; padding-left:3px; padding-right:2px; background-color:#DDDAD1; height:90px;"  class="copyblue" >Get an education without the B.S.<br>Check out our <br /><a href="Buyer101.aspx" class="bllink">Home Buying 101 seminar</a>.<br /><br /> <i>It&#39;s fast, free and fun</i>.</div><img src="images/blue_spacer.gif" width="198" height="25" /></div>';


function openTempWindow(href, name, features)
{
	if(typeof(window.openTempWindowCloser) == 'undefined')
	{
		window.openTempWindowCloser = function()
		{
			for (var name in window.openTempWindowList)
				if (!window.openTempWindowList[name].closed) window.openTempWindowList[name].close();
		};
		if (window.attachEvent)
			window.attachEvent('onunload', window.openTempWindowCloser);
		else if (window.addEventListener)
			window.addEventListener('unload', window.openTempWindowCloser, false);
		else
			window.onunload = window.openTempWindowCloser;
		window.openTempWindowList = {};
	}
	if (typeof(window.openTempWindowList[name]) == 'undefined')
	{
		window.openTempWindowList[name] = window.open(href, name, features);
		if (!window.openTempWindowList[name])
		{
			alert('We have detected that a popup blocker\n'
				+'may be blocking content on this web site.\n\n'
				+'Please add this site to your popup blocking\n'
				+'application\'s allow list so you may view this content.');
		}
		else
		{
			window.openTempWindowList[name].focus();
		}
	}
	else
	{
		openTempWindowList[name] = window.open(href, name, features);
		openTempWindowList[name].focus();
	}
}



// Preloads images for the nav roll-overs
var preloadFinished;
var newImage = new Array();
document.preload = new Array();

function preloadImages() {

	newImage[0] = "images/buyer_homenav_over.gif"
	newImage[1] = "images/seller_homenav_over.gif"
	newImage[2] = "images/owner_homenav_over.gif"
	newImage[3] = "images/search_homenav_over.gif"
	newImage[4] = "images/center_homenav_over.gif"
	newImage[5] = "images/101_homenav_over.gif"


	
	if (document.images) {
		for (var i = 0; i <= newImage.length; i++) {
			document.preload[i] = new Image();
			document.preload[i].src = newImage[i];
		}
	}
	preloadFinished = true
}
 
preloadImages();



