function recommendUs(pre) {
	window.open(pre + 'recommend.php', '', 'resizable=no,scrollbars=no,width=540,height=320')
}

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_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];
		}
  }
}

function displayBig(n) {
	document.getElementById('bigpic').src = "images/pics/big-" + n + ".jpg";
}

function pop(theURL, w, h){		//this opens the ipix file in a new window 
	ver = parseInt(navigator.appVersion.substring(0,1));
newWin=window.open(theURL,"pop_ipix","width="+w+",height="+h+",menubar=no,toolbar=no,status=no,resizable=no,scrollbars=no,");
	if ((!((navigator.appName == "Netscape")&&(ver==2))) &&
 (!((navigator.appName == "Microsoft Internet Explorer")&&(ver < 4)))){
          setTimeout("if (newWin) newWin.focus();",1000);
    }
}

function popForms(theURL, w, h) {
	ver = parseInt(navigator.appVersion.substring(0,1));
newWin=window.open(theURL,"pop_ipix","width="+w+",height="+h+",menubar=no,toolbar=no,status=no,resizable=no,scrollbars=yes,");
	if ((!((navigator.appName == "Netscape")&&(ver==2))) &&
 (!((navigator.appName == "Microsoft Internet Explorer")&&(ver < 4)))){
          setTimeout("if (newWin) newWin.focus();",1000);
    }
}

function resizeMe() {
	window.resizeTo(450,340);
	window.document.locationbar=false;
	window.menubar=false;
	window.statusbar=false;
	window.personalbar=false;
}

function validateEntry() { //v3.0
  var i,p,q,nm,test,num,min,max,errors='',args=validateEntry.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=findObject(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 (val!=''+num) 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.returnValue = (errors == '');
}

function openMap() {
	window.open("map.html",null,"height=480,width=560,status=no,toolbar=no,menubar=no,location=no");
}

function openBoat() {
	window.open("../boat.html",null,"height=480,width=560,status=no,toolbar=no,menubar=no,location=no");
}

function openCurrency() {
	window.open("http://www.oanda.com/convert/classic?user=sharkcagediving&lang=en",null,"height=520,width=640,status=no,toolbar=no,menubar=no,location=no");
}

