function popUpCalc(url) {
	sealWin=window.open(url,"win1",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=617,height=575');
	self.name = "mainWin"; 
}
function popUpEmail(url) {
	sealWin=window.open(url,"win1",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=432,height=525');
	self.name = "mainWin"; 
}
function popUpMap(url) {
	sealWin=window.open(url,"win1",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=650');
	self.name = "mainWin"; 
}
function popUpNeighborhood(url) {
	window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=780,height=400');
	self.name = "mainWin"; 
}
function popUpPhotos(url) {
	sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=740,height=860');
	self.name = "mainWin"; 
}
function popUpPrint(url) {
	sealWin=window.open(url,"win1",'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=740,height=585');
	self.name = "mainWin"; 
}
function popUpSlide(url) {
	sealWin=window.open(url,"wins",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=600,height=400');
	self.name = "mainWin"; 
}
function popUpVTour(url) {
	sealWin=window.open(url,"wins",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=810,height=580');
	self.name = "mainWin"; 
}

function validateContactForm() {
	if (document.theForm.Email.value == '') {
		alert("The field Email is a required field.\n Please update this field before submitting the form.");
		document.theForm.Email.focus();
		return;
	}
	document.theForm.submit();
}

function clrTD() {
	for (i=1; i<21; i++){
		if (document.getElementById('tdc' + i)){
			document.getElementById('tdc' + i).style.background = 'gray';
		}
	}
}


function swap(photo, thumb, title, pWidth, pHeight, pTop, pLeft, shiftTop, show, defaultWidth) {
	if(pWidth.replace(/[^0-9]/g, '') > pHeight.replace(/[^0-9]/g, '')){
		pWidth = defaultWidth+"px";
		pTop = 0;
		pLeft = 0;
	}
	$('#'+photo).attr('src',thumb);
	$('#pic_name').html(title);
	$('#'+photo).css('width',pWidth);
	$('#'+photo).css('height',pHeight);
	$('#'+photo).css('paddingTop',pTop);
	$('#'+photo).css('paddingLeft',pLeft);
	$('#'+photo).css('top',shiftTop);
	$('#'+photo).attr('show',show);
}
