// JavaScript Document

<!--
//Redirect home page to main frameset after 6 seconds
function _loaded() {
   cmd = "parent.window.location.href = 'main.cfm'";
   window.setTimeout(cmd,6000);
   }

//frame jumper for nav bar
function setFrame(frameName, frameSrc)
  {
  parent[frameName].location=(frameSrc + '.cfm');
  }
  
  
  
  
<!-- Begin
function loadFrames(frame1,page1,frame2,page2) {
eval("parent."+frame1+".location='"+page1+"'");
eval("parent."+frame2+".location='"+page2+"'");
}
// End -->  
  
 
  

// image rollover effects
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// populate image array to cache rollover images
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//universal macromedia code for finding object within DOM
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;
}

// form validation

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function terms() {
  alert('SACRED JOURNEYS TERMS AND CONDITIONS \n\n 1.1. Full balance must be received by Sacred Journeys 8 full weeks (60 Days) prior to the start date of Retreats and 12 full weeks (90 days) prior to the start date of Holidays. All deposits are non-refundable. \n\n 1.2. In agreeing to the Terms and Conditions of this Booking Form you (the Client) are accepting responsibility for your condition of health and acknowledging that you have no medical condition which may prohibit participation in programmed activities unless stated on the Booking Form. We regret that we cannot be held responsible for any injury incurred through a Client’s personal negligence in failing to ensure that he/she is not at risk of injury in participating in any programmed activities. \n\n CANCELLATION POLICY \n 2.1. Sacred Journeys reserves the right to cancel any event in light of unavoidable extenuating circumstances in which case a full refund will be issued to the Client. \n\n\ 2.2. Any cancellation on behalf of the Client must be made in writing and be received by Sacred Journeys no less than 2 full weeks (14 days) prior to the start date of Retreats and 4 full weeks (42 days) prior to the start date of Holidays. If cancellation takes place less than - 2 weeks before a Retreat and 4 weeks before a Holiday start date the client will be liable for the full fee. \n\n 2.3. In the event that the Client is forced to cancel his/her reservation owing to illness or unexpected health risk, Sacred Journeys will agree to refund the balance for the Retreat or Holiday but requests written notification in support of such circumstances.'); 
  
 alert('SACRED JOURNEYS TERMS AND CONDITIONS CONTINUED... \n\n LATE BOOKINGS \n 3. In the case of late Bookings: within 2 weeks for a Retreat and within 4 weeks for a Holiday, Sacred Journeys reserves the right to request payment in full at the Booking stage. \n\n SPECIAL DIETARY REQUESTS \n 4.1. Unless clearly stated on the Booking Form, Sacred Journeys cannot be held liable for any lack of provision regarding any special dietary requests. \n\n DAMAGES \n 5. Any breakages or damage caused by the Client to venue property during an event is the responsibility of the Client and must be replaced and or full monetary compensation offered before the Client’s departure from the relevant venue premises.')

}



-->