// HOME PAGE ARRAY SCRIPT
  imageArray = new Array();
  var current = "";
  function load_img(name_src)
  {
    if(document.images) {
      var temp = imageArray[name_src];
      if(! temp) {
        temp = new Image();
        temp.src = name_src;
        imageArray[name_src] = temp;
      }

      return temp;
    }
  }
  function replace_img(name, name_src)
  {
    if(document.images) {
      if(name != current) {
        document[name].src = load_img(name_src).src;
      }
    }
  }



//WINDOW OPEN SCRIPTS SHOULD ALL BE CONTAINED IN THIS FILE 

//protects against iFrame theft...

//if (top != self) {
//	top.location = self.location;
//}


function Forms(cUrl){xWin = window.open(cUrl,"Forms","width=700,height=400,location=no,resizable=yes,scrollbars=yes,toolbar=yes,url=yes,menubar=yes")}
function FromADA(cUrl){xWin = window.open(cUrl,"FromADA","width=710,height=400,location=yes,resizable=yes,scrollbars=yes,toolbar=yes,url=yes,menubar=yes")}
function ADAForms(cUrl){xWin = window.open(cUrl,"Link","width=700,height=500,location=no,resizable=yes,scrollbars=yes,toolbar=no,url=no,menubar=no")}
function FromADAPhoto(cUrl){xWin = window.open(cUrl,"Photo","width=775,height=530,location=no,resizable=yes,scrollbars=yes,toolbar=no,url=no,menubar=yes")}
function ToCatalog(cUrl){xWin = window.open("http://www.adacatalog.org","ToCatalog","width=850,height=550,location=no,resizable=yes,scrollbars=yes,toolbar=no,url=no,menubar=no")}
function ToContactUs(cUrl){xWin = window.open("/ada/includes/scripts/dcs_contactusredirect.asp","ToContactUs","width=710,height=550,location=no,resizable=yes,scrollbars=yes,toolbar=no,url=no,menubar=no")} 
function ToGKAS(cUrl){xWin = window.open(cUrl,"ToGKAS","width=710,height=500,location=yes,resizable=yes,scrollbars=yes,toolbar=yes,url=yes,menubar=yes")}
function ToGKASPopup(cUrl){xWin = window.open(cUrl,"ToGKASPopup","width=350,height=500,location=yes,resizable=yes,scrollbars=yes,toolbar=yes,url=yes,menubar=yes")}
function FromGKAS(cUrl){xWin = window.open(cUrl,"FromGKAS","width=650,height=400,location=yes,resizable=yes,scrollbars=yes,toolbar=yes,url=yes,menubar=yes")}
function Popup(cUrl){xWin = window.open("/popup_sitealertmessage.asp","Popup","width=350,height=200,location=no,resizable=yes,scrollbars=yes,toolbar=no,url=no,menubar=no")}
function FromInternational(handle,cUrl){xWin = window.open(cUrl,handle,"width=710,height=800,location=yes,resizable=yes,scrollbars=yes,toolbar=yes,url=yes,menubar=yes,status=yes")}

        function resizeImage(elem, size) {
            if (elem == undefined || elem == null) return false;
            var maxSize;
            if (size == undefined || size == null) maxSize = 400;
            else maxSize = size;
            var width = elem.width;
            var height = elem.height;
            var origSize = (2 * elem.width) + (2 * elem.height);
            if (maxSize < origSize) {
                var scalingFactor = maxSize / origSize
                elem.width = width * scalingFactor;
                elem.height = height * scalingFactor;
            }
            elem.style.visibility = "visible";
        }
		
		function reloadFrame(){ 
        	if (!navigator.reloaded) { 
            	navigator.reloaded = 1;
            	location.reload();
        	}
    	}


