/**********************************************************************/
// 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 + "@sicamoustravel.com";
}
// JavaScript Document
var gallwindow = '';
var mapwindow = '';
var policywindow = '';

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=550,width=790,scrollbars=no');
		if (!gallwindow.opener) gallwindow.opener = self;
	}
	
	if (window.focus) {gallwindow.focus()}

}

function popup_map(propertyid, unitid) {

	if (!mapwindow.closed && mapwindow.location) {
		mapwindow.location.href = '/include/popmap.php?pid='+propertyid+'&uid='+unitid;
	}
	else {
		mapwindow=window.open('/include/popmap.php?pid='+propertyid+'&uid='+unitid,'name','height=465,width=610,scrollbars=no');
		if (!mapwindow.opener) mapwindow.opener = self;
	}
	
	if (window.focus) {mapwindow.focus()}

}
function popup_policy() {

	if (!policywindow.closed && policywindow.location) {
		policywindow.location.href = '/include/poppolicy.php';
	}
	else {
		policywindow=window.open('/include/poppolicy.php','name','height=465,width=610,scrollbars=vertical');
		if (!policywindow.opener) policywindow.opener = self;
	}
	
	if (window.focus) {policywindow.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()}

}
