//New Window Pop Up. Function takes three variables; full file name including path, width & height.//
//sample call: <a href="javascript:newwin('harvclubb.jpg',250,350)">Text or image</a>//

function newwin(filename,wd,ht,docloc)
{

var TopPosition=0;
var LeftPosition=0;
var defwd=400;   //sets a default window width if no width is passed
var defht=300;    //sets a default window height if no height is passed
var padwd=20;   //sets extra padding for the width
var padht=25;    //sets extra padding for the height
var newwinpict=null;

	if(wd==null)wd=defwd;else wd+=padwd;
	if(ht==null)ht=defht;else ht+=padht;
 	if(newwinpict && !newwinpict.closed)newwinpict.close();
 	LeftPosition = (screen.width) ? (screen.width-wd)/2 : 0; 
	TopPosition = 20;
	newwinpict = window.open(filename,"newwin1",'toolbar=no,location=no,directories=no,menuebar=no,width='+wd+',height='+ht+',top='+TopPosition+', left='+LeftPosition+',resizable=yes,scrollbars=yes');
	newwinpict.focus();
}


//SEARCH FORM VALIDATION//
function validatesearch () {
if(document.forms.headersearchform.bigsearch.value.length==0 || document.forms.headersearchform.bigsearch.value=="click here") {
alert('Oops! You did not enter a search term.\nPlease enter a value in the search box and try again.');
return false;
}
}
function validatesearch2 () {
if(document.forms.htsearchform.htsearch.value.length==0 || document.forms.htsearchform.htsearch.value=="") {
alert('Oops! You did not enter a search term.\nPlease enter a value in the search box and try again.');
return false;
}
}

  
  //HEADER SEARCHBOX FORM SIZE EXPANSION
  function searchchange(x) { 
  if (!document.getElementById) return false;
  var elementsize = document.getElementById ("bigsearch");
  var elementpos = document.getElementById ("movesearch");
  if (x=='1')
  {
	elementsize.style.width = "200px";
	elementsize.style.backgroundColor="#ffffff";
	elementsize.style.color="#000000";
	elementsize.value="";
	elementpos.style.position = "relative";
	//elementpos.style.left = "-10px";
	elementpos.style.backgroundColor = "#74a5cd";
	//elementpos.style.border = "3px solid #2B3385";
  } 
  else if (document.forms.headersearchform.bigsearch.value.length==0)
	{
  	elementsize.style.width="60";
	elementsize.style.backgroundColor="#eeeeff";
	elementsize.style.color="#999999";
	elementsize.value="click here";
  	elementpos.style.position = "static";
	elementpos.style.backgroundColor = "transparent";
 	}
  }  

//ROLLOVER FOR CONTENT PAGE HEADERS
//BROWSER DETECT
browserName = navigator.appName;
 browserVer = parseInt(navigator.appVersion);
 if((browserName == "Netscape" && browserVer >=3)||(browserName == "Microsoft Internet Explorer" && browserVer >=4))version = "rollovergood";
 else version = "rolloverbad";


//ROLLOVER IMAGEPRELOAD
if (version == "rollovergood")
{
pointerover=new Image(10,10);
pointerover.src='/graphics/pointer.gif';
spacerout=new Image(10,10);
spacerout.src='/graphics/spacer.gif';
}

//ROLLOVER MOUSEOVER AND MOUSEOUT
 function imgover(imgName)
 {
    if(version=="rollovergood") document[imgName].src = pointerover.src;
 }

function imgout (imgName)
{
   if(version=="rollovergood") document[imgName].src = spacerout.src;
}
