function doSubmit(){
document.globalSearchForm.submit();
}

var IMGPath = "/capnew2/images";


function doPhone()
{
	var popupBody="<table width=100%><tr bgcolor=#dbe8f8><td colspan=2 nowrap>Local Phone Numbers</td></tr><tr bgcolor=#dbe8f8><td nowrap>Toll Free:</td><td>800.968.5844</td></tr> <tr bgcolor=#dbe8f8><td nowrap>Richmond, VA:</td><td> 804.968.5000</td></tr><tr bgcolor=#dbe8f8><td nowrap> VA Beach:</td><td> 757.456.1800</td></tr><tr bgcolor=#dbe8f8><td nowrap> Northern VA:</td><td> 703.778.9872</td></tr></table>"; 
	document.all.divPhone.innerHTML=popupBody;
	document.all.divPhone.style.top=event.clientY+document.body.scrollTop; //event.clientY-window.event.offsetY;
	if(screen.width==800){
	document.all.divPhone.style.left="395px";  //event.clientX+document.body.scrollLeft; //event.clientX+25; 
	}

	if(screen.width==1024){
	document.all.divPhone.style.left="495px";  //event.clientX+document.body.scrollLeft; //event.clientX+25; 
	}

	
	document.all.divPhone.style.display='';
	
	
}

function doCVAMLS()
{
var popupBody="Here is a list of cities and counties covered under the Central Virginia MLS<hr>City of Richmond<br>City of Hopewell<br>City of Petersburg<br>City of Colonial Heights<br>Chesterfield County<br>Dinwiddie County<br>Goochland County<br>Hanover County<br>Henrico County<br>Powhatan County<br>Prince George County<br>Charles City County<br>New Kent County<br>King William County"; 
document.all.vabMLS.innerHTML=popupBody;
document.all.vabMLS.style.top="285px"  //event.clientY+5+document.body.scrollTop; 

if(screen.width==640){
document.all.vabMLS.style.left="395px";  //event.clientX+15+document.body.scrollLeft; 
}
if(screen.width==800){
document.all.vabMLS.style.left="395px";  //event.clientX+15+document.body.scrollLeft; 
}

if(screen.width==1024){
document.all.vabMLS.style.left="495px";  //event.clientX+15+document.body.scrollLeft; 
}



document.all.vabMLS.style.display='';

}
function doVBMLS()
{
var popupBody="Here is a list of cities and counties covered under the Virginia Beach MLS<hr>Accomack County<br>Chesapeake<br>Emporia / Greensville County<br>Franklin<br>Gloucester County<br>Hampton<br>Isle of Wight County<br>James City County<br>Mathews County<br>Middlesex County<br>Newport News<br>Norfolk<br>Northampton County <br>Poquoson<br>Portsmouth<br>Smithfield<br>Southampton County<br>Suffolk<br>Surry County<br>Sussex County<br>Virginia Beach<br>Williamsburg<br>York County"; 

document.all.vabMLS.innerHTML=popupBody;
document.all.vabMLS.style.top="300px"//event.clientY+5+document.body.scrollTop; 

if(screen.width==640){
document.all.vabMLS.style.left="395px";  //event.clientX+15+document.body.scrollLeft; 
}
if(screen.width==800){
document.all.vabMLS.style.left="395px";  //event.clientX+15+document.body.scrollLeft; 
}

if(screen.width==1024){
document.all.vabMLS.style.left="495px";  //event.clientX+15+document.body.scrollLeft; 
}

document.all.vabMLS.style.display='';
}

function doNVAMLS()
{
var popupBody="Here is a list of cities and counties covered under the Northern Virginia MLS<hr>Clarke County<br>Frederick County<br>Warren  County<br>City of Winchester<br>Loudon County<br>Stafford County <br>Spottsylvania County<br>Caroline County <br>Fredericksburg City<br>Page County<br>Shenandoah County<br>Fairfax<br>Arlington<br>Alexandria<br>Prince William County<br>Faquier County <br>Rappahannock County"; 
document.all.vabMLS.innerHTML=popupBody;

document.all.vabMLS.style.top="315px" //event.clientY+5+document.body.scrollTop; 

if(screen.width==640){
document.all.vabMLS.style.left="395px";  //event.clientX+15+document.body.scrollLeft; 
}
if(screen.width==800){
document.all.vabMLS.style.left="395px";  //event.clientX+15+document.body.scrollLeft; 
}

if(screen.width==1024){
document.all.vabMLS.style.left="495px";  //event.clientX+15+document.body.scrollLeft; 
}
  // event.clientX+15+document.body.scrollLeft; 

document.all.vabMLS.style.display='';

}


function doOut(){
document.all.vabMLS.style.display='none';


}
function doOutp(){
document.all.divPhone.style.display='none';

}

function displayCenterImage(){

	var thePics = new Array();

//	thePics[0] = "http://www.capcenter.com/capnew2/images/Cornucopia.jpg";
//	thePics[1] = "http://www.capcenter.com/capnew2/images/Pumpkins.jpg";
//	thePics[0] = "http://www.capcenter.com/capnew2/images/family.jpg"; 
//	thePics[3] = "http://www.capcenter.com/capnew2/images/leaves.jpg";

    //thePics[0] = "/realtors/images/xmas1.jpg";
	//thePics[1] = "/realtors/images/xmas2.jpg";
	//thePics[2] = "/realtors/images/xmas3.jpg";
	//thePics[3] = "/realtors/images/xmas4.jpg";
	thePics[1] = "/realtors/images/bnr_home_7.jpg";
	//thePics[5] = "/realtors/images/xmas4.jpg";
    //thePics[6] = "/realtors/images/xmas3.jpg";
   // thePics[2] = "http://www.capcenter.com/capnew2/images/xmas/Building-Snowman.jpg";
	//thePics[2] = "http://www.capcenter.com/capnew2/images/xmas/Child-Catching-Snowflakes.jpg";
	//thePics[3] = "http://www.capcenter.com/capnew2/images/xmas/Child-Catching-Snowflakes.jpg";
	//thePics[10] = "http://www.capcenter.com/capnew2/images/xmas/Dragging-Tree.jpg";
	//thePics[4] = "http://www.capcenter.com/capnew2/images/xmas/Building-Snowman.jpg";

	thePics[0] = "http://www.capcenter.com/capnew2/images/boyrain.jpg";
	thePics[5] = "http://www.capcenter.com/capnew2/images/childwoman1.jpg";
	thePics[2] = "http://www.capcenter.com/capnew2/images/BoyRain.jpg"; 
	thePics[3] = "http://www.capcenter.com/capnew2/images/leaves.jpg";
	thePics[4] = "http://www.capcenter.com/capnew2/images/Kite.jpg";	
    thePics[5] = "http://www.capcenter.com/capnew2/images/fup.jpg";
    thePics[6] = "http://www.capcenter.com/capnew2/images/bnr_home_4.jpg";
    thePics[7] = "http://www.capcenter.com/capnew2/images/bnr_home_1.jpg";


	

	
	var rn = Math.floor(Math.random() * (thePics.length-1)) + 1
 
	document.write('<img src="'+thePics[rn]+'" border="0" width="241" height="186" alt="CapCenter">');	

	
}
