// ************* FRAME BUSTER *************
// This automatically kills frames if someone has had the 
// audacity to open our site in their frames.
if (parent.frames.length > 0)
{
parent.location.href = location.href;
}

// ************* NEW WINDOW *************
// This is used for opening a link in a new window (since we cant use target="_blank" in xhtml)
function jump(sLocation)
{
window.open(sLocation, '_blank');
}

// ************* POPUP WINDOW *************
// This is used for generating a pop-up window
function winPop(sLocation,sWidth,sHeight,sScrollbars)
{
window.open(sLocation, '', 'toolbar=0,resizable=0,scrollbars=' + sScrollbars + ',left=2,top=2,width=' + sWidth + ',height=' + sHeight);
}

// ************* POPUP IMAGE WINDOW *************
// This is used for poping up a window with a large image
// when the user clicks a thumbnail.
function imagePop(imgFile,imgWidth,imgHeight)
{
window.open('../includes/Wc69705d01d9ca.htm' + escape(location.href) + '&img=' + imgFile, '', 'toolbar=0,resizable=0,scrollbars=0,left=2,top=2,width=' + imgWidth + ',height=' + imgHeight);
}

// ************* POPUP VR WINDOW *************
// This is used for poping up a window of virtual tours
// when the user clicks a thumbnail.
function vrPop(imgId)
{
window.open('../includes/Wcce7cb38c0d75.htm' + imgId, '', 'toolbar=0,resizable=0,scrollbars=0,left=2,top=2,width=490,height=330');
}

// ************* SUBSCRIBER FUNCTIONS *************
// These are used with the email subscriber box.
function submitEmail(){
window.open('','PopUp','resizable=0,scrollbars=1,width=600,height=400'); 
document.getElementById('subscribe').target = 'PopUp';
document.getElementById('subscribe').submit();
}

function clearField(){
if (document.getElementById('subscribe').EAddy.value =='Your email here!')
	 { 
		(document.getElementById('subscribe').EAddy.value ='');
	 }
}
function galleryEmailSubmit(){
window.open('http://www.poresorts.com/enquiries/email_add.asp','PopUp','resizable=0,scrollbars=1,width=500,height=300');
}
SwapMap = 0;

function swapMap(sDirectory){
	if (SwapMap == 0){
	document.images.LocationMap.src = '../images/default.htm' + sDirectory + '../map_on.gif';
	SwapMap = 1;
	}else{
	document.images.LocationMap.src = '../images/default.htm' + sDirectory + '../map.gif';
	SwapMap = 0;
	}
}

function launchSelfDrive(){
	window.open('../includes/self_drive_virtual_tour.asp.htm','PopUp','resizable=0,scrollbars=0,left=2,top=2,width=750,height=550');
}