function MedPhoto(mls, i)
	{
	mphoto.src = 'photos/' + ImagePath + '/m' + mls + '_' + i + '.jpg';
	}
var popUpWin=0;
function LargePhotos()
	{
	var mypage = 'LargePhotos.cfm?mls=' + MLS
	if(popUpWin)
		{
	    if(!popUpWin.closed) popUpWin.close();
	  	}
	  	newLeft = (self.screen.width - 700)/2;
		newTop = (self.screen.height - 600)/2;
	  	popUpWin2 = open(mypage, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=700,height=600,left=' + newLeft + ', top=' + newTop + ',screenX=' + newLeft + ',screenY=' + newTop);
	}



	
function submitForm(){

  if (document.THISFORM.name.value == ''){
    alert('Please Enter Your Name');
    document.THISFORM.name.focus();
  }
  else if( (document.THISFORM.phone.value == '') ){
    alert('Please Enter Your Phone Number');
    document.THISFORM.phone.focus();
  }
  else if (document.THISFORM.email.value == ''){
  	alert('Please Enter Your Email Address');
	document.THISFORM.email.focus();
  }
  else{
    document.THISFORM.submit();
  }
}

var popUpWin2=0;
function GetCommute(from, to)
	{
	var mypage = 'Commuting.cfm?from=' + from + '&to=' + to
	if(popUpWin2)
		{
	    if(!popUpWin2.closed) popUpWin2.close();
	  	}
		newLeft = (self.screen.width - 500)/2;
		newTop = (self.screen.height - 550)/2;
	  	popUpWin2 = open(mypage, 'popUpWin2', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=no,width=500,height=550,left=' + newLeft + ', top=' + newTop + ',screenX=' + newLeft + ',screenY=' + newTop);
	}

var popUpWin3=0;
function AddFavorite(mls)
	{
	var mypage = 'Favorites.cfm?mls=' + mls
	if(popUpWin3)
		{
	    if(!popUpWin3.closed) popUpWin3.close();
	  	}
		newLeft = (self.screen.width - 650)/2;
		newTop = (self.screen.height - 450)/2;
	  	popUpWin3 = open(mypage, 'popUpWin3', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=650,height=450,left=' + newLeft + ', top=' + newTop + ',screenX=' + newLeft + ',screenY=' + newTop);
	}
	
var popUpWin3=0;
function ViewFavorites()
	{
	var mypage = 'Favorites.cfm'
	if(popUpWin3)
		{
	    if(!popUpWin3.closed) popUpWin3.close();
	  	}
		newLeft = (self.screen.width - 650)/2;
		newTop = (self.screen.height - 450)/2;
	  	popUpWin3 = open(mypage, 'popUpWin3', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=650,height=450,left=' + newLeft + ', top=' + newTop + ',screenX=' + newLeft + ',screenY=' + newTop);
	}

var popUpWin4=0;
function MissingPhotos()
	{
	var mypage = 'MissingPhotos.cfm?mls=' + MLS
	if(popUpWin4)
		{
	    if(!popUpWin4.closed) popUpWin4.close();
	  	}
	  	newLeft = (self.screen.width - 700)/2;
		newTop = (self.screen.height - 600)/2;
	  	popUpWin4 = open(mypage, 'popUpWin4', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=no,width=300,height=100,left=' + newLeft + ', top=' + newTop + ',screenX=' + newLeft + ',screenY=' + newTop);
	}