var gotIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var gotNS = (navigator.appName == 'Netscape') ? true : false;
var ns=document.layers;
var ie=document.all;
var ns6=document.getElementById&&!document.all;
var flag=0;
function showselect(id){
/*
var my_div = document.getElementById('voyageswf');
if (my_div){
if(ie||ns6){
my_div.style.visibility = "visible";
}
if(ns){
my_div.visibility = "show";
}
}
*/
SDDM_deactivate(id);
}
function checkEmailAddress() {
if (! (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,5})+$/.test(document.TheForm.email.value))){
alert("Invalid E-mail Address")
document.TheForm.email.focus();
document.TheForm.email.select();
return false;
}
return true;
}
function contact_form_val(form)
{
form = document.getElementById(form);
if (flag == 1)
return false;
if (! form.name.value){
alert("Please Enter Your Name");
form.name.focus();
form.name.select();
return false;
}
if (! (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value))){
alert("Please Enter A valid E-mail Address")
form.email.focus();
form.email.select();
return false;
}
if (! form.phone.value){
alert("Please Enter Your Phone #");
form.phone.focus();
form.phone.select();
return false;
}
if (! form.subject.value){
alert("Please Enter A Subject");
form.subject.focus();
form.subject.select();
return false;
}
if (! form.message.value){
alert("Please Enter Your Message");
form.message.focus();
form.message.select();
return false;
}
flag = 1;
return true;
}
function hideselect(id){
/*
var my_div = document.getElementById('voyageswf');
if (my_div){
if(ie||ns6){
my_div.style.visibility = "hidden";
}
if(ns){
my_div.visibility = "none";
}
}
*/
SDDM_activate(id);
}
function popWin( url, name, width, height, scroller ) {
if (gotIE) {
var left = (screen.Width/2) - width/2;
var top = (screen.Height/2) - height/2;
} else if (gotNS) {
var left = (screen.availWidth/2) - width/2;
var top = (screen.availHeight/2) - height/2;
} else {
var left = (screen.Width/2) - width/2;
var top = (screen.Height/2) - height/2;
}
var outStr = 'left='+left+',top='+top+',height=' + height + ',width=' + width;
if (scroller == true) {
outStr = outStr + ',menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=1,resizable=no';
} else {
outStr = outStr + ',menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=no,resizable=no';
}
window.open(url, name, outStr);
}
function checklogin(form)
{
if (flag == 1)
return false;
if (! form.email.value){
alert("Please Enter Your Email Address");
form.email.focus();
form.email.select();
return false;
}
if (! (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value))){
alert("Invalid E-mail Address")
form.email.focus();
form.email.select();
return false;
}
if (! form.pass.value){
alert("Please Enter Your Password");
form.pass.focus();
form.pass.select();
return false;
}
flag = 1;
return true;
}
function search(form)
{
if (flag == 1)
return false;
if (! form.skeyword.value){
alert("Please Enter A Search Term");
form.skeyword.focus();
form.skeyword.select();
return false;
}
flag = 1;
return true;
}
function signup(form)
{
if (flag == 1)
return false;
if (! form.fname.value){
alert("Please Enter Your First Name");
form.fname.focus();
form.fname.select();
return false;
}
if (! form.lname.value){
alert("Please Enter Your Last Name");
form.lname.focus();
form.lname.select();
return false;
}
if (! form.email.value){
alert("Please Enter Your Email Address");
form.email.focus();
form.email.select();
return false;
}
if (! (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email.value))){
alert("Invalid E-mail Address")
form.email.focus();
form.email.select();
return false;
}
if (! form.pass.value){
alert("Please Enter A Password");
form.pass.focus();
form.pass.select();
return false;
}
str = form.pass.value
var validChars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-';
if ((str.length < 3)) {
alert("Your password must be at least 3 characters.")
form.pass.focus();
form.pass.select();
return false;
}
for (var j = 0; j < str.length; j++){
if(validChars.indexOf(str.charAt(j)) == -1) {
alert("Your password can only contain letters and numbers.")
form.pass.focus();
form.pass.select();
return false;
}
}
Ctrl = form.pass2;
if (Ctrl.value =="") {
validatePromt(Ctrl,"Please Confirm Your Password");
return false;
}
if (form.pass.value != form.pass2.value) {
validatePromt(Ctrl,"Your passwords do not match");
form.pass2.focus();
form.pass2.select();
return false;
}
flag = 1;
return true;
}
function enewsletter(form)
{
if (flag == 1)
return false;
if (form.email_addr.value == ''){
alert("Please Enter Your Email Address");
form.email_addr.focus();
form.email_addr.select();
return false;
}
if (! (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(form.email_addr.value))){
alert("Invalid E-mail Address")
form.email_addr.focus();
form.email_addr.select();
return false;
}
flag = 1;
return true;
}
function showStatus(sMsg) {
window.status = sMsg ;
return true ;
}
function add_email() {
var fobj = new Array("fname", "lname");
var cmdoutput = "";
for(var i = 0;i < fobj.length;i++)
{
cmdoutput += fobj[i] + "=" + escape(eval("document.enewsletter."+fobj[i]+".value")) + "&";
}
var email = document.enewsletter.email_addr.value;
var strURL = "/inc_js/add_email.php";
var querystring = cmdoutput + "email="+email;
var xmlHttpReq = false;
if (enewsletter(document.enewsletter)){
// Mozilla/Safari
if (window.XMLHttpRequest) {
xmlHttpReq = new XMLHttpRequest();
if (xmlHttpReq.overrideMimeType) {
xmlHttpReq.overrideMimeType('text/xml');
}
}
// IE
else if (window.ActiveXObject) {
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlHttpReq.open('POST', strURL, true);
xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttpReq.onreadystatechange = function() {
if (xmlHttpReq.readyState == 4) {
updatenewsletter(xmlHttpReq.responseText);
}
}
xmlHttpReq.send(querystring);
}
}
function showads(sec){
var strURL = "/inc_js/showad.php";
var querystring = "sec="+sec;
var xmlHttpReq = false;
// Mozilla/Safari
if (window.XMLHttpRequest) {
xmlHttpReq = new XMLHttpRequest();
if (xmlHttpReq.overrideMimeType) {
xmlHttpReq.overrideMimeType('text/xml');
}
}
// IE
else if (window.ActiveXObject) {
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlHttpReq.open('POST', strURL, true);
xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttpReq.onreadystatechange = function() {
if (xmlHttpReq.readyState == 4) {
if (sec=='2'){
var strarray = xmlHttpReq.responseText.split("~~~~");
document.getElementById("adslot1").innerHTML = strarray[0];
document.getElementById("adslot3").innerHTML = strarray[1];
}
if (sec=='3'){
var strarray = xmlHttpReq.responseText.split("~~~~");
document.getElementById("adslot1").innerHTML = strarray[0];
}
if (sec=='4'){
var strarray = xmlHttpReq.responseText.split("~~~~");
document.getElementById("adslot1").innerHTML = strarray[0];
document.getElementById("adslot2").innerHTML = strarray[1];
document.getElementById("adslot3").innerHTML = strarray[2];
}
if (sec=='5' || sec=='6' || sec=='7'){
var strarray = xmlHttpReq.responseText.split("~~~~");
document.getElementById("adslot1").innerHTML = strarray[0];
document.getElementById("adslot2").innerHTML = strarray[1];
}
}
}
xmlHttpReq.send(querystring);
}
function updatenewsletter(str){
var strarray = str;
document.getElementById("newslettersignup").innerHTML = strarray;
}
function handlecartResponse () {
if(http.readyState == 4){
var response = http.responseText;
var update = new Array();
if (response){
//document.getElementById("bagvol").style.display="none";
//oldvol=document.getElementById("rbagvol").innerHTML;
//newvol=oldvol-(-quant);
//document.getElementById("rbagvol").innerHTML=newvol;
//if (newvol==1) newcontent='
1 item in my bag';
//else if (newvol<10) newcontent=''+newvol+' items in my bag';
//else newcontent=''+newvol+' items';
//document.getElementById("bagvol").innerHTML = newcontent;
//Effect.Appear('bagvol');
iscomplete=1;
}
}
}
function addtocart(pid){
var cmdoutput = '';
var fobj2 = new Array("qty", "oid");
for(var i = 0;i < fobj2.length;i++)
{
var bulk = eval("document.formaddcart"+pid+"."+fobj2[i]+".options[document.formaddcart"+""+pid+"."+fobj2[i]+".options.selectedIndex].value");
if (fobj2[i]=='oid' && bulk<1){
alert("Please choose a photo format");
return false;
}
if (fobj2[i]=='qty' && bulk<1){
alert("Please choose a quantity");
return false;
}
cmdoutput += fobj2[i] + "=" + escape(bulk) + "&";
}
var strURL = "/inc_js/carttop.php";
var querystring = "pid="+pid+"&"+cmdoutput;
var xmlHttpReq = false;
// Mozilla/Safari
if (window.XMLHttpRequest) {
xmlHttpReq = new XMLHttpRequest();
if (xmlHttpReq.overrideMimeType) {
xmlHttpReq.overrideMimeType('text/xml');
}
}
// IE
else if (window.ActiveXObject) {
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlHttpReq.open('POST', strURL, true);
xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttpReq.onreadystatechange = function() {
if (xmlHttpReq.readyState == 4) {
var strarray = xmlHttpReq.responseText.split("~~~~");
if (strarray[0]=='1'){
document.getElementById("cartitemsamt").innerHTML = ' '+strarray[0]+' item in your cart';
} else {
document.getElementById("cartitemsamt").innerHTML = ' '+strarray[0]+' items in your cart';
}
var cartdiv=document.getElementById("carttop");
cartdiv.innerHTML=strarray[1];
cartdiv.style.position="absolute";
closeimagebuy('thumbimage'+pid, 'explode'+pid)
location.href='#viewcarttopbook';
Effect.SlideDown(cartdiv.id);
}
}
xmlHttpReq.send(querystring);
}
function showthisweek(){
var cartdiv=document.getElementById("thisweekevents");
//cartdiv.style.position="absolute";
Effect.SlideDown(cartdiv.id);
}
function populareventlisting(){
var cartdiv=document.getElementById("populareventlisting");
//cartdiv.style.position="absolute";
Effect.SlideDown(cartdiv.id);
}
function slidecartup(){
var cartdiv=document.getElementById("carttop");
cartdiv.style.position="absolute";
Effect.SlideUp(cartdiv.id);
}
var blockroll = "no"
function closeimagebuy(start, olay){
dojo.lfx.implode(olay, start, 250).play();
blockroll = "no"
}
function showimagebuy(start, olay, pid){
if (blockroll!='yes'){
blockroll = "yes"
//var email = document.enewsletter.email_addr.value;
var strURL = "/inc_js/popup.php";
var querystring = "pid="+pid;
var xmlHttpReq = false;
// Mozilla/Safari
if (window.XMLHttpRequest) {
xmlHttpReq = new XMLHttpRequest();
if (xmlHttpReq.overrideMimeType) {
xmlHttpReq.overrideMimeType('text/xml');
}
}
// IE
else if (window.ActiveXObject) {
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlHttpReq.open('POST', strURL, true);
xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttpReq.onreadystatechange = function() {
if (xmlHttpReq.readyState == 4) {
document.getElementById(olay).innerHTML = xmlHttpReq.responseText;
dojo.lfx.explode(start, olay, 250).play();
}
}
xmlHttpReq.send(querystring);
}
}
function addgallery(pid){
var strURL = "/inc_js/add_gallery.php";
var querystring = "photo="+pid;
var xmlHttpReq = false;
// Mozilla/Safari
if (window.XMLHttpRequest) {
xmlHttpReq = new XMLHttpRequest();
if (xmlHttpReq.overrideMimeType) {
xmlHttpReq.overrideMimeType('text/xml');
}
}
// IE
else if (window.ActiveXObject) {
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlHttpReq.open('POST', strURL, true);
xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttpReq.onreadystatechange = function() {
if (xmlHttpReq.readyState == 4) {
//alert(xmlHttpReq.responseText);
alert("Photo has been added to your gallery");
}
}
xmlHttpReq.send(querystring);
}
function addbookmark(pid){
var strURL = "/inc_js/add_bookmark.php";
var querystring = "photo="+pid;
var xmlHttpReq = false;
// Mozilla/Safari
if (window.XMLHttpRequest) {
xmlHttpReq = new XMLHttpRequest();
if (xmlHttpReq.overrideMimeType) {
xmlHttpReq.overrideMimeType('text/xml');
}
}
// IE
else if (window.ActiveXObject) {
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlHttpReq.open('POST', strURL, true);
xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttpReq.onreadystatechange = function() {
if (xmlHttpReq.readyState == 4) {
//alert(xmlHttpReq.responseText);
alert("Calendar Event has been added to your bookmarks");
}
}
xmlHttpReq.send(querystring);
}
function show_events_results(keyword, page){
var strURL = "/inc_js/searchgallery.php";
var querystring = "keyword="+escape(keyword)+"&page="+page;
var xmlHttpReq = false;
// Mozilla/Safari
if (window.XMLHttpRequest) {
xmlHttpReq = new XMLHttpRequest();
if (xmlHttpReq.overrideMimeType) {
xmlHttpReq.overrideMimeType('text/xml');
}
}
// IE
else if (window.ActiveXObject) {
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlHttpReq.open('POST', strURL, true);
xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttpReq.onreadystatechange = function() {
if (xmlHttpReq.readyState == 4) {
var strarray = xmlHttpReq.responseText.split("~~~~");
document.getElementById("galleryshowing").innerHTML = strarray[1];
document.getElementById("galleryresults").innerHTML = strarray[0];
var cartdiv=document.getElementById("galleryresults");
Effect.SlideDown(cartdiv.id);
}
}
xmlHttpReq.send(querystring);
}
function add_share(page, id, pid){
var strURL = "/inc_js/"+page+".php";
var querystring = 'id='+id+'&pid='+pid+'&emails='+escape(eval("document.formshare"+pid+".femails"+pid+".value"))+'&comments='+escape(eval("document.formshare"+pid+".fcomments"+pid+".value"));
var xmlHttpReq = false;
// Mozilla/Safari
if (window.XMLHttpRequest) {
xmlHttpReq = new XMLHttpRequest();
if (xmlHttpReq.overrideMimeType) {
xmlHttpReq.overrideMimeType('text/xml');
}
}
// IE
else if (window.ActiveXObject) {
xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlHttpReq.open('POST', strURL, true);
xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttpReq.onreadystatechange = function() {
if (xmlHttpReq.readyState == 4) {
//alert(xmlHttpReq.responseText);
alert("Emails have been sent.");
eval("document.formshare"+pid+".femails"+pid+".value = ''");
eval("document.formshare"+pid+".fcomments"+pid+".value = ''");
}
}
xmlHttpReq.send(querystring);
}
function showvoyage(trip){
if (trip=='0'){
location.href='/voyage14.html';
} else if (trip=='5'){
location.href='/voyage15.html';
} else if (trip=='6'){
location.href='/voyage15-2.html';
} else if (trip=='13'){
location.href='/voyage15-2.html';
} else if (trip=='19'){
location.href='/voyage17.html';
} else if (trip=='20'){
location.href='/voyage17-2.html';
} else if (trip=='27'){
location.href='/viewtrip.html?tid=34';
} else if (trip=='31'){
location.href='/viewtrip.html?tid=32';
} else if (trip=='32'){
location.href='/viewtrip.html?tid=31';
} else {
location.href='/viewtrip.html?tid='+trip;
}
}/**
* SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
*
* SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
* **SWFObject is the SWF embed script formarly known as FlashObject. The name was changed for
* legal reasons.
*/
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
if (!document.createElement || !document.getElementById) { return; }
this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params = new Object();
this.variables = new Object();
this.attributes = new Array();
if(swf) { this.setAttribute('swf', swf); }
if(id) { this.setAttribute('id', id); }
if(w) { this.setAttribute('width', w); }
if(h) { this.setAttribute('height', h); }
if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute('version'), useExpressInstall);
if(c) { this.addParam('bgcolor', c); }
var q = quality ? quality : 'high';
this.addParam('quality', q);
this.setAttribute('useExpressInstall', useExpressInstall);
this.setAttribute('doExpressInstall', false);
var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
this.setAttribute('xiRedirectUrl', xir);
this.setAttribute('redirectUrl', '');
if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
setAttribute: function(name, value){
this.attributes[name] = value;
},
getAttribute: function(name){
return this.attributes[name];
},
addParam: function(name, value){
this.params[name] = value;
},
getParams: function(){
return this.params;
},
addVariable: function(name, value){
this.variables[name] = value;
},
getVariable: function(name){
return this.variables[name];
},
getVariables: function(){
return this.variables;
},
getVariablePairs: function(){
var variablePairs = new Array();
var key;
var variables = this.getVariables();
for(key in variables){
variablePairs.push(key +"="+ variables[key]);
}
return variablePairs;
},
getSWFHTML: function() {
var swfNode = "";
if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "PlugIn");
swfNode = '