<!-- Hide script from old browsers
/*
	Filename: junctions.js
	Author: Christopher J. Deleo
	Date: December 4, 2007
	Application: Internet Page
	Version: 1.0
	
	This script is used to search only part of a domain with the google search appliance
*/

/*
	This functions uses the document.write function to write out the code passed in to display the flash movie.  This is used to get around the eola problem with IE6 and newer versions of FireFox where you have to click on the flash movie to activate. 
*/
function flash(code)
{
	document.write(code);
}

/*
	DoT function used to clear the search box on the default value "Search 7jd Site"
*/
function clearDefaultandCSS(el) {
	if (el.defaultValue==el.value) el.value = ""
}


/*
	Used to open window with specific width and height and no toolbars, scrollbars, ect.
*/
function openWindow(url,windowName,width,height,sb)
{
	var iMyWidth;
	var iMyHeight;
	iMyWidth = (window.screen.width/2) - (width/2 + 10);
	iMyHeight = (window.screen.height/2) - (height/2 + 10);
	var edit = window.open(url,windowName,"width=" + width + ",height=" + height + ",toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=" + sb + ",copyhistory=no,resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight);
	edit.focus();
}

/*
	DEPRECATED function
	Used to take in a specific site for google to search and return as a string value in the field that requested it.
*/
function sendQuery(domain, action)
{
	if((action == "key" && window.event.keyCode == "13") || (action == null))
	{
		var search_str = document.forms['gs'].q.value;
		var google_str = search_str + " site:" + domain;
		
		document.forms['gs'].q.value = google_str;
		document.forms['gs'].submit();
	}
}

/*
	These functions are used for DOT's Right nav Bar image swaps
*/
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_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_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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];}
}

// End hiding script from old browsers -->
