function UpdateCalendarEventInstance(eid, evdesc, exdate, action){
	
	var blnOutput;
	
	sMsg = 'Are you sure you want to'
	
	switch(action) {		
		case 'CANCEL DATE':
			 sMsg = sMsg + ' CANCEL ';
		break;
		
		case 'ACTIVATE DATE':
			sMsg = sMsg + ' ACTIVATE ';			
		break;		
	}

	sMsg = sMsg + 'this event instance?\n\n';
	sMsg = sMsg + '          Event: ' + evdesc + '\n\n';
	sMsg = sMsg + '          Date: ' + exdate + '\n';
	sMsg = sMsg + '\n';
	
	
	blnOutput = confirm(sMsg);

	if(blnOutput) {
		window.location = '/members/editeventhistory.asp?eid=' + eid + '&exdate=' + exdate + '&action=' + action
	}
	
	return false;	

}

function getWindowHeight() {
	if (window.self && self.innerHeight) {
		return self.innerHeight;
	}
	if (document.documentElement && document.documentElement.clientHeight) {
		return document.documentElement.clientHeight;
	}
	return 0;
}


function ComingSoon(){
		alert('This feature is coming soon...');
}

function doMapMenuClick(strDivId,strDispType,strMapNameId){

	var oTemp;
			
	// set the original class
	SetElementClass('MainMapMenuTitle'+strMapNameId,'MainMapMenuTitle');
	SetElementClass('BeachesMapMenuTitle'+strMapNameId,'BeachesMapMenuTitle');
	SetElementClass('TouristPointsMapMenuTitle'+strMapNameId,'TouristPointsMapMenuTitle');
	SetElementClass('RentalsMapMenuTitle'+strMapNameId,'RentalsMapMenuTitle');
	SetElementClass('HotelsMapMenuTitle'+strMapNameId,'HotelsMapMenuTitle');
	SetElementClass('HostelsMapMenuTitle'+strMapNameId,'HostelsMapMenuTitle');
	SetElementClass('MoreMapMenuTitle'+strMapNameId,'MoreMapMenuTitle');
	SetElementClass('InfoMapMenuTitle'+strMapNameId,'InfoMapMenuTitle');

	// hide all
	ShowHideObject('MainMapMenu'+strMapNameId,'none');
	ShowHideObject('BeachesMapMenu'+strMapNameId,'none');
	ShowHideObject('TouristPointsMapMenu'+strMapNameId,'none');	
	ShowHideObject('RentalsMapMenu'+strMapNameId,'none');	
	ShowHideObject('HotelsMapMenu'+strMapNameId,'none');
	ShowHideObject('HostelsMapMenu'+strMapNameId,'none');
	ShowHideObject('MoreMapMenu'+strMapNameId,'none');	
	ShowHideObject('InfoMapMenu'+strMapNameId,'none');	



	// show the one that we want
	SetElementClass(strDivId+'Title'+strMapNameId,strDivId+'TitleClick');
	
	ShowHideObject(strDivId+strMapNameId,'block');

	return false;
}

function ShowHideObject(oBj,DisplayType) {
  var d=document.getElementById(oBj);
  d.style.display=DisplayType;  
  return true;
}

function SetElementClass(strElementId, strClassName) {
  var oElement = document.getElementById(strElementId);
  oElement.className = strClassName;  
}
	
function openWindow(url, name, width, height, features) {
	var win;
	var top = 0;
	var left = 0;
	
	if (screen.width > width) left = (screen.width - width) / 2;
	if (screen.height > height) top = (screen.height - height) / 2;
	
	if (typeof(features) == "undefined") win = window.open(url, '_blank', 'left='+left+',top='+top+',screenX='+left+',screenY='+top+',width='+width+',height='+ height);
	else win = window.open(url, '_blank', 'left='+left+',top='+top+',screenX='+left+',screenY='+top+',width='+width+',height='+ height +', ' + features);
		
	if (navigator.appName != 'Microsoft Internet Explorer')  { if ( window.focus )  win.focus()};
}


function ShowHideLayer(szDivID, iState) { //v6.0
    //Layer1.style.visibility='visible';
	var obj = document.getElementById(szDivID);
	obj.style.visibility = iState;	
}

function ShowHideLayer_Orig(szDivID, iState) { //v6.0
    //Layer1.style.visibility='visible';
	var obj = document.getElementById(szDivID, iState);
	obj.style.visibility = iState ? "visible" : "hidden";	
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function SetLayerText(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.Layer1.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}


function checkUncheckAll(theElement) {
	var theForm = theElement.form;
	z = 0;
	for(z=0; z<theForm.length;z++){
		if(theForm[z].type == 'checkbox'){
			if(theForm[z].checked == true){
				theForm[z].checked = false;
			}
			else{
				theForm[z].checked = true;
			}
			
		}
	}
}

function submitForm(frameName, formName) {
	eval(frameName + 'document.' + formName + '.submit()');
}

function disableCheckBoxes(theForm, blnSwitch) {
	z = 0;
	for(z=0; z<theForm.length;z++){
		if(theForm[z].type == 'checkbox'){
			theForm[z].disabled = blnSwitch;
		}
	}
}

function disableElement(theElement, blnSwitch) {
	theElement.disabled = blnSwitch;	
}

