<!--

//MM functions are MacroMedia and produced by dreamweaver products used by archer malmo 
//when they originally made the website
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 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_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow2(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  var rc = /&#146;/g;
  theURL = theURL.replace(rc, "~");
  var rc = /&amp;/g;
  theURL = theURL.replace(rc, "*amp*");
  window.open(theURL,winName,features);
}
//END ARCHER MALMO MM FUNCTIONS




//Newer function compatible with ASP.NET with RegisterStartupScript function for supplying variables
function openwin(url) 
{
  var wname = "thewindow";
  var wproperties = "toolbar=0,location=1,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=400,height=400";
  var rc = /[~]/g;
  
  url = url.replace(rc, "&#146;");
  rc = /\s/g;
  url = url.replace(rc, "+");
  rc = /[&]/g;
  url = url.replace(rc, "%26");
  rc = /[#]/g;
  url = url.replace(rc, "%23");
  rc = /[;]/g;
  url = url.replace(rc, "%3B");
  aWindow = window.open("pop.aspx?ID1=popup&ID2=" + varID2 + "&ID3=" + url, wname, wproperties);
}

//not used?
function openWin2(url) 
{
  var wname = "thewindow2";
  var wproperties = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=400,height=400";
  aWindow2 = window.open(url, wname, wproperties);
}


/*
 * Brandon made this to try to have a general site wide function that takes two parameters
 * whereas the old openwin functions only took one, and relied on an outside varID2 variable
 * which was meant to be populated from the current page that the link was on.
 * However due to our need to pop windows on the search page, where there is no varID2 available,
 * we needed this function to specify it.
 */
function popcontentwin(var2,var3) 
{
  var wname = "thewindow";
  var wproperties = "toolbar=0,location=1,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=400,height=400";
  var rc = /[~]/g;
  var2 = var2.replace(rc, "&#146;");
  rc = /\s/g;
  var2 = var2.replace(rc, "+");
  rc = /[&]/g;
  var2 = var2.replace(rc, "%26");
  rc = /[#]/g;
  var2 = var2.replace(rc, "%23");
  rc = /[;]/g;
  var2 = var2.replace(rc, "%3B");
  
  var3 = var3.replace(rc, "&#146;");
  rc = /\s/g;
  var3 = var3.replace(rc, "+");
  rc = /[&]/g;
  var3 = var3.replace(rc, "%26");
  rc = /[#]/g;
  var3 = var3.replace(rc, "%23");
  rc = /[;]/g;
  var3 = var3.replace(rc, "%3B");

  aWindow = window.open("pop.aspx?ID1=popup&ID2=" + var2 + "&ID3=" + var3, wname, wproperties);
}


/*
  * Brandon added this to fix the look of the Divs with different heights
  * CSS doesnt allow for div height comparison
  * the divs were tricky so we had to set the text area div to the desired height - 12px for the padding of the col2 div
  */
function fixColumns(){
	var h1 = document.getElementById("col1").offsetHeight;
	var h2 = document.getElementById("col2").offsetHeight;
	var max = h1;
	if(h2 > max) max = h2;
	document.getElementById("col1").style.height = max + "px";
	document.getElementById("col2").style.height = max + "px";
	document.getElementById("ctext").style.height = (max - 12) + "px";
}


/*
 * DEPRECATED CODE FUNCTIONS
 */
 //DEPRECATED: Old function compatible with ASP pre .NET
function openwinDEPRECATED(url) {
  var rc = /[~]/g;
  url = url.replace(rc, "&#146;");
  rc = /\s/g;
  url = url.replace(rc, "+");
  rc = /[&]/g;
  url = url.replace(rc, "%26");
  rc = /[#]/g;
  url = url.replace(rc, "%23");
  rc = /[;]/g;
  url = url.replace(rc, "%3B");
  aWindow = window.open("pop.asp?ID1=popup&amp;ID2=<%= Server.URLEncode(varID2) %>&amp;ID3=" + url,"thewindow","toolbar=0,location=1,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=400,height=400");
}
 
-->