
// Used to id browsers.
var browser="";
if(navigator.appName=="Netscape" && parseInt(navigator.appVersion)==2) { browser="n2"; }
if(navigator.appName=="Netscape" && parseInt(navigator.appVersion)==3) { browser="n3"; }
if(navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) { browser="n4"; }
if(navigator.appName=="Netscape" && parseInt(navigator.appVersion)==5) { browser="n5"; }
if(navigator.appVersion.indexOf("MSIE 3.0") != -1) { browser="ie3"; }
if(navigator.appVersion.indexOf("MSIE 4.0") != -1) { browser="ie4"; }
if(navigator.appVersion.indexOf("MSIE 5.0") != -1) { browser="ie5"; }

// Used to position window for Netscape 4
var w=0;
var h=0;
if ( browser=="n4" )
   {
   var screen_height=parent.screen.height;
   var screen_width=parent.screen.width;
   var main_height=parent.window.innerHeight;
   w=(screen_width/2)-300;
   }

// Called by onLoad statement in the BODY tag.

function openWindow()

   {
   var newWind=window.open("http://database.townhall.com/heritage/referemail.cfm?Referer=" + document.URL,"display","width=600,height=500,screenX="+w+",screenY="+h);
   if (newWind.opener == null)

      {newWind.opener = window;}

   else

      {

      if ( browser=="n3"  ||  browser=="n4"  ||  browser=="ie4"  ||  browser=="ie5")

         newWind.focus();

      }
   }


function OpenGlossaryWindow(DocumentURL)
{

var WindowFeatures = "toolbar=no,menubar=no,status=no,location=no,resizable=yes,scrollbars=yes,width=350,height=350"
var PathGlossary = "./Glossary/"

philWindow = window.open(PathGlossary + DocumentURL, 'Glossary', WindowFeatures)

}
function OpenFAQWindow(DocumentURL)
{

var WindowFeatures = "toolbar=yes,menubar=no,status=no,location=no,resizable=yes,scrollbars=yes,width=500,height=450,screenX=100,screenY=100,top=100,left=100'"

philWindow = window.open(DocumentURL, 'EditData', WindowFeatures)

}
function OpenEditDataWindow(DocumentURL)
{

var WindowFeatures = "toolbar=no,menubar=no,status=no,location=no,resizable=yes,scrollbars=yes,width=400,height=450,screenX=100,screenY=100,top=100,left=100'"

philWindow = window.open(DocumentURL, 'EditData', WindowFeatures)

}
function OpenLargeChartWindow(DocumentURL)
{

var WindowFeatures = "toolbar=no,menubar=no,status=no,location=no,resizable=yes,scrollbars=yes,width=1050,height=650"

philWindow = window.open(DocumentURL, 'LargeChart', WindowFeatures)

}
function OpenDynamicWindow(DocumentURL)
{

var WindowFeatures = "toolbar=yes,menubar=yes,status=no,location=no,resizable=yes,scrollbars=yes"

philWindow = window.open(DocumentURL, 'Dynamic', WindowFeatures)

}


//Called by Reset button

function clearAll()
{
var len = document.forms[0].elements.length;

for (var i = 0; i<len;i++) {
	var fType = (document.forms[0].elements[i].type).toUpperCase();
	if (fType == "TEXT") {
			document.forms[0].elements[i].value = "";
		}
	}
}

/*
function clearAll()
{
var len = document.forms[0].elements.length;

for (var i = 0; i<len;i++) {
	var fType = (document.forms[0].elements[i].type).toUpperCase();
	if (fType == "TEXT") {
			document.forms[0].elements[i].value = "";
		}
	}
}
*/