/**********************************************************************/
// m_sfcon: Email Function 
// Description: the email account name is passed in, then parsed onto 
//   the domain for this web site, then launched using the 'mailto' 
//   link. This is to help prevent bots from scouring a web page to 
//   find email addresses, since it is broken up into pieces in this 
//   function
/**********************************************************************/
function m_sfcon (u) {
pre = "mail";
url = pre + "to:" + u;
document.location.href = url + "@hiddengemsbookstore.com";
}
// JavaScript Document
var gallwindow = '';
var mapwindow = '';

function popup_gallery(propertyid, unitid) {

	if (!gallwindow.closed && gallwindow.location) {
		gallwindow.location.href = 'gallery.php?pid='+propertyid+'&uid='+unitid;
	}
	else {
		gallwindow=window.open('gallery.php?pid='+propertyid+'&uid='+unitid,'name','height=600,width=700,scrollbars=no');
		if (!gallwindow.opener) gallwindow.opener = self;
	}
	
	if (window.focus) {gallwindow.focus()}

}

function popup_map(businessid) {

	if (!mapwindow.closed && mapwindow.location) {
		mapwindow.location.href = '/futures/include/popmap.php?bid='+businessid;
	}
	else {
		mapwindow=window.open('/futures/include/popmap.php?bid='+businessid,'name','height=500,width=625,scrollbars=no');
		if (!mapwindow.opener) mapwindow.opener = self;
	}
	
	if (window.focus) {gallwindow.focus()}

}

function popup_cal(unitid) {

	if (!mapwindow.closed && mapwindow.location) {
		mapwindow.location.href = '/include/popcal.php?id='+unitid;
	}
	else {
		mapwindow=window.open('/include/popcal.php?id='+unitid,'name','height=350,width=575,scrollbars=no');
		if (!mapwindow.opener) mapwindow.opener = self;
	}
	
	if (window.focus) {gallwindow.focus()}

}
