// JavaScript Document


// Copyright for Footer

COPYRIGHT = "&copy; Avia International Travel ";

   function writeCopyright()
   {
      document.write(COPYRIGHT, new Date().getFullYear(), " ");
   }




// Gets rid of border around active links 

var old_onload  = null;
if (typeof window.onload == "function")
{
	old_onload = window.onload;
}
window.onload = function()
{
	if (old_onload) 
	{
		old_onload();
		old_onload  = null;
	}
	if (typeof hide_focus == 'function') 
	{ 
		hide_focus(['A','AREA','IMG', 'LI']);
	}
}
function hide_focus(el)
{
	if (!document.all) { return; }
	for (var i = 0; i < el.length; i++)
	{
		for (var j = 0; j < document.all.tags(el[i]).length; j++)
		{
			document.all.tags(el[i])[j].hideFocus = true;	
		}
	}
}


// Generic cross-browser code for attaching events to elements
// You should really have this in a separate common JS file
var addEvent;
if (document.addEventListener) {
   addEvent = function(element, type, handler) {
   element.addEventListener(type, handler, null);
   if (element.href) element.href="javascript:void('');" ;
   }
}
else if (document.attachEvent) {
   addEvent = function(element, type, handler) {
     element.attachEvent("on" + type, handler);
     if (element.href) element.href="javascript:void('');" ;
   }
}
else {
   addEvent = new Function; // not supported
}

// Validate form - only for information request2 page

function validator(form) { 

  if (form.spam.value != "r7ZmTa") {
    alert("The SpamCheck letters you have typed do not match the picture.  Please try again.");
    form.spam.focus();
    return false;
  }
  
return true; 
} 