/* Images for mouseover routines */
InfoEmailImage = new Image();
InfoEmailImage.src = "images/info_arial.jpg"
/* Javascript Routines for akwebsoft */
function resolveLink(pathSimple){
	var domain = document.domain;
	var path;
	if(domain == "bart.johnson.com" || domain == "localhost"){
	  path = "http://" + domain + "/cgi-bin/rebol/"	 
	  }
	else{
	  path = "http://" + domain + "/cgi-bin/reb/"	
	  }
	return path + pathSimple;
	}
function DhtmlEmail(link,ref){
	var URL = resolveLink(ref);
	AjaxRequest.get({
	  'url':URL,
      'onSuccess':function(r){$('#dynamic_content').html(r.responseText);},
      'onError':function(r){ alert("ERROR: " + r.statusText);}
  	  });	
	return false;
	}
function ValidateContactForm(form){
  if(!TextAreaEntered(form["message"],"Message")){return false;}
  if(!TextEntered(form["from"],"From")) return false;
  return true;
  }
function ContactForm(theform,theURL) {
  theform.action = resolveLink(theURL);
  AjaxRequest.submit(
    theform,{
      'onSuccess':
	  function(r){$('#dynamic_content').html(r.responseText);},
      'onError':function(r){ alert("ERROR: " + r.statusText);}
      });
  return false;
  }
function LinkTo(URL){
  window.location.replace(URL);
  }
function CloseForm() {
  $('#dynamic_content').html('Email cancelled.');
  return false;
  }
function SendForm(theform) {
   if(ValidateContactForm(theform)){
     AjaxRequest.submit(
        theform,{
        'onSuccess':
		  function(r){$('#dynamic_content').html("Thanks for the email. " +
		               "We will contact you shortly.");},
        'onError':function(r){ alert("ERROR: " + r.statusText);}
        });
      return false;
    } else return false; 
  }
