// ******* Initial ALL Master variables section

var yourwords = "This is the initial flashing window words";
var speed = 500;
var control = 1;
var outMsg = "";
var i = 0;
var lineNo = 1;
var timerDM=null;
var msg = " ";
var msgNum = 1;          // set to first message to display
var msgCnt = 13;         // set to number of last message "page" to display.
var typeSpeed = 70;      // the typing rate, in milliseconds. (Higher number is slower)
var pageLen = 5;         // set to page size, usually number of ROWS in TEXTAREA
var delay=typeSpeed;
var r = 0;
var cr="\r\n"
var pause = 1500 
var timerID = null
var bannerRunning = false
var ar = new Array()
var message = 0
var state = ""
var shortcut=document.combowithtext
var descriptions=new Array()
var head="display:''"
var testresults
var win=null;

function bwsfooter() {
var d=new Date();
yr=d.getFullYear();
bws1 = '<center><font size="2">This website is maintained and hosted by ';
bws2 = '<a href="http://www.safeharborfoundation.us"> Safe Harbor Foundation</a><BR>';
bws3 = 'Please send us your comments or suggestions.<BR>';
bws4 = '<font color="#ff0000">© Copyright 1985 thru '+yr+' Safe Harbor Foundation, All Rights Reserved';
bws5 = '<a href="http://www.safeharborfoundation.us/Legal.htm"> Legal Disclaimer</a>';
document.write(bws1);
document.write(bws2);
document.write(bws3);
document.write(bws4);
document.write(bws5);
}

function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}

function checkEmail(el) {
	var email=el.value;
	var errMsg= email + " is an invalid email address.";

	if ((email.indexOf('@',0)==-1 ||
	email.indexOf('@',0)== 0 ||
	email.indexOf('.',0)==-1) && email.length > 0) {
		alert(errMsg);
		return false;
	}
	
	el.value = email.replace(/ /g,"");
	return true;
}

function copywrite(){
   var d=new Date();
   yr=d.getFullYear();
   if (yr!=1995)
	  document.write("© Copyright 1985 thru "+yr+" Safe Harbor Foundation, All Rights Reserved");
}

function display_image1(form) {
selectionname = form.imagename1.options[form.imagename1.selectedIndex].text;
selection = form.imagename1.options[form.imagename1.selectedIndex].value;
PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=320,height=340");
PreView.document.open();
PreView.document.write("<HTML><HEAD>");
PreView.document.write("<TITLE>Preview</TITLE>");
PreView.document.write("</HEAD><BODY BGCOLOR=FFFFFF TEXT=000000>");
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" + 
selectionname + "</FONT></B><HR>");
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +
"SRC='" + selection + "'>");
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +
"onClick='window.close()'></FORM>");
PreView.document.write("</CENTER>");
PreView.document.write("</BODY></HTML>");
PreView.document.close();
}

function display_image2(form) {
selectionname = form.imagename2.options[form.imagename2.selectedIndex].text;
selection = form.imagename2.options[form.imagename2.selectedIndex].value;
PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=320,height=340");
PreView.document.open();
PreView.document.write("<HTML><HEAD>");
PreView.document.write("<TITLE>Preview</TITLE>");
PreView.document.write("</HEAD><BODY BGCOLOR=FFFFFF TEXT=000000>");
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" + 
selectionname + "</FONT></B><HR>");
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +
"SRC='" + selection + "'>");
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +
"onClick='window.close()'></FORM>");
PreView.document.write("</CENTER>");
PreView.document.write("</BODY></HTML>");
PreView.document.close();
}

function display_image3(form) {
selectionname = form.imagename3.options[form.imagename3.selectedIndex].text;
selection = form.imagename3.options[form.imagename3.selectedIndex].value;
PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=320,height=340");
PreView.document.open();
PreView.document.write("<HTML><HEAD>");
PreView.document.write("<TITLE>Preview</TITLE>");
PreView.document.write("</HEAD><BODY BGCOLOR=FFFFFF TEXT=000000>");
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" + 
selectionname + "</FONT></B><HR>");
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +
"SRC='" + selection + "'>");
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +
"onClick='window.close()'></FORM>");
PreView.document.write("</CENTER>");
PreView.document.write("</BODY></HTML>");
PreView.document.close();
}

function display_image4(form) {
selectionname = form.imagename4.options[form.imagename4.selectedIndex].text;
selection = form.imagename4.options[form.imagename4.selectedIndex].value;
PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=320,height=340");
PreView.document.open();
PreView.document.write("<HTML><HEAD>");
PreView.document.write("<TITLE>Preview</TITLE>");
PreView.document.write("</HEAD><BODY BGCOLOR=FFFFFF TEXT=000000>");
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" + 
selectionname + "</FONT></B><HR>");
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +
"SRC='" + selection + "'>");
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +
"onClick='window.close()'></FORM>");
PreView.document.write("</CENTER>");
PreView.document.write("</BODY></HTML>");
PreView.document.close();
}

function display_image5(form) {
selectionname = form.imagename5.options[form.imagename5.selectedIndex].text;
selection = form.imagename5.options[form.imagename5.selectedIndex].value;
PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=320,height=340");
PreView.document.open();
PreView.document.write("<HTML><HEAD>");
PreView.document.write("<TITLE>Preview</TITLE>");
PreView.document.write("</HEAD><BODY BGCOLOR=FFFFFF TEXT=000000>");
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" + 
selectionname + "</FONT></B><HR>");
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +
"SRC='" + selection + "'>");
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +
"onClick='window.close()'></FORM>");
PreView.document.write("</CENTER>");
PreView.document.write("</BODY></HTML>");
PreView.document.close();
}


function display_image6(form) {
selectionname = form.imagename6.options[form.imagename6.selectedIndex].text;
selection = form.imagename6.options[form.imagename6.selectedIndex].value;
PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=320,height=340");
PreView.document.open();
PreView.document.write("<HTML><HEAD>");
PreView.document.write("<TITLE>Preview</TITLE>");
PreView.document.write("</HEAD><BODY BGCOLOR=FFFFFF TEXT=000000>");
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" + 
selectionname + "</FONT></B><HR>");
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +
"SRC='" + selection + "'>");
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +
"onClick='window.close()'></FORM>");
PreView.document.write("</CENTER>");
PreView.document.write("</BODY></HTML>");
PreView.document.close();
}

function display_image7(form) {
selectionname = form.imagename7.options[form.imagename7.selectedIndex].text;
selection = form.imagename7.options[form.imagename7.selectedIndex].value;
PreView = window.open("", "Preview", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,copyhistory=0,width=320,height=340");
PreView.document.open();
PreView.document.write("<HTML><HEAD>");
PreView.document.write("<TITLE>Preview</TITLE>");
PreView.document.write("</HEAD><BODY BGCOLOR=FFFFFF TEXT=000000>");
PreView.document.write("<FORM><CENTER><B><FONT SIZE=+1>" + 
selectionname + "</FONT></B><HR>");
PreView.document.write("<IMG HSPACE=0 VSPACE=0 " +
"SRC='" + selection + "'>");
PreView.document.write("<HR><FORM><INPUT TYPE='button' VALUE='Close' " +
"onClick='window.close()'></FORM>");
PreView.document.write("</CENTER>");
PreView.document.write("</BODY></HTML>");
PreView.document.close();
}

function formatMoney(el){
	var input=el.value;
	var i;

	if (el.value == ""){
		return true;
		}

	var re=	/^\$?\d{1,3}(\,?\d{3})*(\.\d\d)?$/;
	
	if (!re.test(input)) {
		alert(el.value + " is not a valid dollar amount.");				
		el.focus()
		el.select()
		return false;
	}
	else {
		return true;
	}

	return true;
}

function formatPhone(el) {
	var phone=el.value;
	var rePhone=/^\d{3}-\d{3}-\d{4}$|^\d{10}$/
	var errMsg= phone + " is an invalid phone number";
					
	if (phone.match(rePhone)==null && phone.length > 0)
	{	
		alert(errMsg);
		return false;
	}
	
	if (isNumeric(phone))
	{
		el.value=phone.substring(0,3) + "-" + phone.substring(3,6) + "-" +  phone.substring(6,10);
	}
	
	return true;
}

function formatZip(el) {
	var zip = el.value;
	var reZip = /^\d{5}-\d{4}$|^\d{9}$|^\d{5}$/;
	var errMsg= zip + " is an invalid zip code";

	if(zip.match(reZip)==null && zip.length > 0)
	{
		alert(errMsg);
		return false;
	}

	if(zip.length > 5){
		el.value = zip.substring(0,5);
		}
	return true;
}

function gone()
{
location=document.jumpy.example.options[document.jumpy.example.selectedIndex].value
}

function isNumeric(str) {
	
	if (str.match(/^\d+$/))
		return true;
	else
		return false;
}

function KW_amortize(yr,ir,la,at,ai,mp) { // v2.0
  var mi=ir/1200;var b=1;var mb=1+mi;for(i=0;i<yr*12;i++){b=b*mb}
  var ds=la*mi/(1-(1/b))-(-at-ai)/12;rv=Math.floor(ds*Math.pow(10,2))/Math.pow(10,2);
  rs=rv.toString(); if(rs.indexOf(".")==-1) mp.value=rs+".00";
  else {if (rs.indexOf(".")==rs.length-2) mp.value=rs+"0"; else mp.value=rs;}
}

function lastupdate(){
   var aceDate=new Date()
   var aceYear=aceDate.getYear()
   if (aceYear < 1000)
      aceYear+=1900
   var aceDay=aceDate.getDay()
   var aceMonth=aceDate.getMonth()+1
   if (aceMonth<10)
      aceMonth="0"+aceMonth
   var aceDayMonth=aceDate.getDate()
   if (aceDayMonth<10)
      aceDayMonth="0"+aceDayMonth
document.write(""+aceMonth+"/"+aceDayMonth+"/"+aceYear+"")
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MonitorChk(){
alert("this site has optimized for viewing at 640 x 480 pixtels, if your monitor is NOT set to this resolution, you WILL NOT be able to enjoy all the benfits of the scripting and streaming multimedia presentations");
HowOftenVisitedBlackWhipSociety()
}

function NewURL_1()
{
location=document.newurl1.dropdown.options[document.newurl1.dropdown.selectedIndex].value
}

function NewURL_2()
{
location=document.newurl2.dropdown.options[document.newurl2.dropdown.selectedIndex].value
}

function NewURL_3()
{
location=document.newurl3.dropdown.options[document.newurl3.dropdown.selectedIndex].value
}

function NewURL_4()
{
location=document.newurl4.dropdown.options[document.newurl4.dropdown.selectedIndex].value
}

function NewURL_5()
{
location=document.newurl5.dropdown.options[document.newurl5.dropdown.selectedIndex].value
}

function NewURL_6()
{
location=document.newurl6.dropdown.options[document.newurl6.dropdown.selectedIndex].value
}

function NewURL_7()
{
location=document.newurl7.dropdown.options[document.newurl7.dropdown.selectedIndex].value
}

function NewURL_8()
{
location=document.newurl8.dropdown.options[document.newurl8.dropdown.selectedIndex].value
}

function NewURL_9()
{
location=document.newurl9.dropdown.options[document.newurl9.dropdown.selectedIndex].value
}

function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();
}

function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}

function PrinterCheckSize(){
popupwin = window.open("http://www.usaxiom.org/PrinterCheckSize.htm","","width=250,height=350,location=no,toolbar=no,menubar=no,scrollbars=Yes,resizable=yes");
}

function ServerProblems()
{
alert ('We are currently experienceing a problem with our web and em-mail servers that are hosted at Network Solutions. Not all information is up to date, as well as some buttons will be missing and some buttons will be mis named. Additionally our mail is sometimes not getting out, and other times being sent 2 or more times. This also lends to us not receiving in-bound mail from many of our cleints.\r\n\r\nWe are told the issue is being repaired as rapidly as possible, and we ask your patience while this is being worked out, as it is out of our control, and only Network Solutions can remedy the problem.\r\n\r\nThank You...\r\n\r\nJSEVonda\r\nTrust Manger\r\nVonda Family Trust')
}

function VisionQuestFall(){
popupwin = window.open("http://www.usaxiom.org/VisionQuestFall.htm","","width=250,height=350,location=no,toolbar=no,menubar=no,scrollbars=Yes,resizable=yes");
}

function warp(){
window.location=gotolink
}

// *********  BEGIN COOKIE AREA ************

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) 
break; 
}
return null;
}

function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (2 < argc) ? argv[2] : null;
var path = (3 < argc) ? argv[3] : null;
var domain = (4 < argc) ? argv[4] : null;
var secure = (5 < argc) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}

// **************************  Safe Harbor Foundation Scripts *************************

function SafeHarborAdultChk(){
if (!confirm("This site has been optimized this site for viewing at 800 x 600 pixels                                    IF YOU DO NOT AGREE TO THE TERMS DISPLAYED ON THIS PAGE                                                                                                                                                                                                                      PRESS CANCEL NOW."))
	history.back()
else
	HowOftenVisitedSafeHarbor()
}

function SafeHarborScroll(seed) {
var m1 = "Welcome to the Safe Harbor Foundation";
var m2 = ".......";
var m3 = ".......";
var m4 = ".......";
var m5 = ".......";
var m6 = "........";
var m7 = "........";
var msg=m1+m2+m3+m4+m5+m6+m7;
var out = " ";
var c = 1;
if (seed > 100) {
seed--;
cmd="SafeHarborScroll("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed--;
window.status=out;
cmd="SafeHarborScroll("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length);
seed--;
window.status=out;
cmd="SafeHarborScroll("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else {
window.status=" ";
timerTwo=window.setTimeout("SafeHarborScroll(100)",75);
}
}
}

function HowOftenVisitedSafeHarbor(){
var expdate = new Date();
var visit;
expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 365)); 
if (!(visit = GetCookie("visit"))) 
visit = 0;
visit++;
SetCookie("visit", visit, expdate, "/", null, false);
var message;
if (visit == 1) 
message="Greetings Traveler, I, James Soaring Eagle Vonda of the 'House of Vonda', or Master Vonda as I am called, welcome you to SafeHarbor for the first time";
if (visit == 2) 
message="Welcome back Traveler, As this is your second visit with us, I see you enjoyed what we have to offer.....ENJOY !!!";
if (visit == 3) 
message="Greetings again Traveler, As this is your third visit, it is becoming obvious that you are VERY interested in the current happenings at Apache Junction, so once again, ENJOY !!!";
if(visit == 4)
message="Oh, there you are, I was wondering when we would see you smiling face for the fourth time. You really are quite delighted with our site, I see. We work hard at providing an environment condusive to our lifestyle. If you see something that needs our immedate attention,  please email us so that we can remedy the issue....ENJOY !!!"; 
if(visit == 5) 
message="Good to see you again Traveler, this is your fifth visit with  us, you're practically a regular, perhaps you should think of becoming a Black Whip Society member, it does have it's rewards you know...for more information see  the membership form at the top of the page....ENJOY !!!";
if(visit > 5)
message="Greetings again to you Traveler, you have visited us a little  less than ten (10) times now, Membership has it's rewards, you know!";
if(visit == 10)
message="Greetings again to you Traveler, you have now visited us ten  (10) times, Membership is definitely in your best interest....it saves  you money the products you can purchase via Domain of Vonda's online stores, as well  as any visit to the retreat / resort, bed / breakfast and Lifestyle facilites!";
if(visit > 10)
message="Greetings again to you Traveler, you have visited us a over than ten (10) times now, FYI Membership comes in six varities, white, copper, bronze, silver, gold and platinum, it definitely has it's rewards, for someone who  visits as much as you do!";
if(visit > 24)
message="How pleased I am to you see you again Traveler, you have  visited us over twenty five (25) times now, We do offer a FREE newsletter to keep you informed of our current developments, see inside  for more details";
if(visit > 51)
message="I see you just can not stay away, this pleases me greatly  Traveler, you have visited us over than fifty (50) times now, any  questions, send us a e-mail?";
if(visit > 100)
message="You have now visited us over one hundred (100) times, we  appreciate you desire to visit Apache Junction often....Enjoy yourself";
alert(message);
location.href= "http://www.accounts.usaxiom.org/Default.htm"
}

function MemberNotice(){
alert("                             IMPORTANT NOTICE TO MEMBERSHIP                                                                                                                                                                                             We would like to inform you that the new email service and list manager is up and functional. To see what changes you need to make on your email client to retrieve your email from our server, click the mail icon on the membership roster page.  The chat server is still under test, but coming soon, as well as the message board server.                                                                                                                                                                           The prepaid legal program is now available to members of The Black Whip Society as per our extensive efforts to secure such services. We are still working on the prepaid health and dental program with the services provider and will keep you informed via the newsletter.                                                                                                                                                                                                                                                                              We want to thank the membership for the wonderful support during our times of transition and for bearing with us under the pressure of this very trying last year.");
}

