function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}    
	
function showlaptop(theTable)
{
     obj = document.getElementsByTagName('TR');
       for (i=0; i<obj.length; i++)
     {
            if (obj[i].id == theTable)
          obj[i].style.display = 'block';
     }
}
//-->

<!--

function hidelaptop(theTable)
{
      obj = document.getElementsByTagName('TR');
       for (i=0; i<obj.length; i++)
     {
            if (obj[i].id == theTable)
          obj[i].style.display = 'none';
     }
}

function FDK_AddToValidateArray(FormName,FormElement,Validation,SetFocus)
{
    var TheRoot=eval("document."+FormName);
 
    if (!TheRoot.ValidateForm) 
    {
        TheRoot.ValidateForm = true;
        eval(FormName+"NameArray = new Array()")
        eval(FormName+"ValidationArray = new Array()")
        eval(FormName+"FocusArray = new Array()")
    }
    var ArrayIndex = eval(FormName+"NameArray.length");
    eval(FormName+"NameArray[ArrayIndex] = FormElement");
    eval(FormName+"ValidationArray[ArrayIndex] = Validation");
    eval(FormName+"FocusArray[ArrayIndex] = SetFocus");
 
}

function FDK_ValidateRadio(RadioGroup,ErrorMsg)
{
	var msg = ErrorMsg;

    for (x=0;x<RadioGroup.length;x++)  {
		if (RadioGroup[x].checked)  {
			msg=""
		} 
	}
	return msg;
}

function FDK_AddRadioValidation(FormName,FormElementName,SetFocus,ErrorMsg)  {
  var ValString = "FDK_ValidateRadio("+FormElementName+","+ErrorMsg+")"
  FDK_AddToValidateArray(FormName,eval(FormElementName + '[0]'),ValString,SetFocus)
}

function FDK_Validate(FormName, stopOnFailure, AutoSubmit, ErrorHeader)
{
 var theFormName = FormName;
 var theElementName = "";
 if (theFormName.indexOf(".")>=0)  
 {
   theElementName = theFormName.substring(theFormName.indexOf(".")+1)
   theFormName = theFormName.substring(0,theFormName.indexOf("."))
 }
 var ValidationCheck = eval("document."+theFormName+".ValidateForm")
 if (ValidationCheck)  
 {
  var theNameArray = eval(theFormName+"NameArray")
  var theValidationArray = eval(theFormName+"ValidationArray")
  var theFocusArray = eval(theFormName+"FocusArray")
  var ErrorMsg = "";
  var FocusSet = false;
  var i
  var msg
    
 
        // Go through the Validate Array that may or may not exist
        // and call the Validate function for all elements that have one.
  if (String(theNameArray)!="undefined")
  {
   for (i = 0; i < theNameArray.length; i ++)
   {
    msg="";
    if (theNameArray[i].name == theElementName || theElementName == "")
    {
      msg = eval(theValidationArray[i]);
    }
    if (msg != "")
    {
     ErrorMsg += "\n"+msg;                   
     if (stopOnFailure == "1") 
     {
       if (theFocusArray[i] && !FocusSet)  
      {
       FocusSet=true;
       theNameArray[i].focus();
      }
      alert(ErrorHeader+ErrorMsg);
      document.MM_returnValue = false; 
      break;
     }
     else  
     {
      if (theFocusArray[i] && !FocusSet)  
      {
       FocusSet=true;
       theNameArray[i].focus();
      }
     }
    }
   }
  }
  if (ErrorMsg!="" && stopOnFailure != "1") 
  {
   alert(ErrorHeader+ErrorMsg);
  }
  document.MM_returnValue = (ErrorMsg==""); 
  if (document.MM_returnValue && AutoSubmit)  
  {
   eval("document."+FormName+".submit()")
  }
 }
}

function FDK_StripChars(theFilter,theString)
{
	var strOut,i,curChar

	strOut = ""
	for (i=0;i < theString.length; i++)
	{		
		curChar = theString.charAt(i)
		if (theFilter.indexOf(curChar) < 0)	// if it's not in the filter, send it thru
			strOut += curChar		
	}	
	return strOut
}

function FDK_ValidateNonBlank(FormElement,ErrorMsg)
{
  var msg = ErrorMsg;
  var val = FormElement.value;  

  if (!(FDK_StripChars(" \n\t\r",val).length == 0))
  {
     msg="";
  }

  return msg;
}

function FDK_AddNonBlankValidation(FormName,FormElementName,SetFocus,ErrorMsg)  {
  var ValString = "FDK_ValidateNonBlank("+FormElementName+","+ErrorMsg+")"
  FDK_AddToValidateArray(FormName,eval(FormElementName),ValString,SetFocus)
}

function FDK_ValidateSelectionMade(FormElement,ErrorMsg)
{
  msg = "";

  var iPos = FormElement.selectedIndex;
  if ((iPos<=0 && FormElement.size<=1) || (iPos<0))
  {
    msg = ErrorMsg;
  }

  return msg;
}

function FDK_AddSelectionMadeValidation(FormName,FormElementName,SetFocus,ErrorMsg)  {
  var ValString = "FDK_ValidateSelectionMade("+FormElementName+","+ErrorMsg+")"
  FDK_AddToValidateArray(FormName,eval(FormElementName),ValString,SetFocus)
}
	



function popup(url,h,w){
	sb="no";
	if(h>500){
		height=518;
		sb="yes";
	}
	else {
		height=parseInt(h)+20;
	}
		
	if(w>700){
		width=700;
		sb="yes";
	}
	else{
		if(sb=="yes")
			width=parseInt(w)+20;
		else
			width=w;
	}
	newWin=window.open("popup.asp?image="+url,"popup","height="+height+",width="+width+",scrollbars="+sb+",toolbars=yes");
}


/*
activateActiveX
---------------
Purpose:  Dynamically replace any elements that will be affected by the new security feature in IE6/IE7 that requires a user to click certain types of elements to activate them before use.

Usage:  Include this file in the <head></head> section of your html document using the following...
	<script language="JScript" type="text/jscript" src="activateActiveX_onload.js"></script>


Since this script is in response to a software patent lawsuit, I feel it necessary to state the following...	

License:
activateActiveX is Copyright (C) 2006 Jason Baker (therippa AT gmail.com). It is available as open source code from:
http://therippa.blogspot.com

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details http://www.gnu.org/licenses/gpl.html
*/

//trap onload event
window.onload = function () {
	//Determine browser, we only need this for Internet Explorer
	if (navigator.appName == "Microsoft Internet Explorer") {
		
		//Array of elements to be replaced
		var arrElements = new Array(3);
		arrElements[0] = "object";
		arrElements[1] = "embed";
		arrElements[2] = "applet";
	
		
		//Loop over element types
		for (n = 0; n < arrElements.length; n++) {
		
			//set object for brevity
			replaceObj = document.getElementsByTagName(arrElements[n]);
			
			//loop over element objects returned
			for (i = 0; i < replaceObj.length; i++ ) {
			
				//set parent object for brevity
				parentObj = replaceObj[i].parentNode;
				
				//grab the html inside of the element before removing it from the DOM
				newHTML = parentObj.innerHTML;
				
				//remove element from the DOM
				parentObj.removeChild(replaceObj[i]);
				
				//stick the element right back in, but as a new object
				parentObj.innerHTML = newHTML;
			
				}
			}
		}
	}
	
/***A more elegant implementation of google analytics - by Al Stevens 20 July 2008***/
/* Simplifies onload, you will no longer have to add an onload event call just call addLoadEvent */
function addLoadEvent(func,arg){
	if (!arg){
	  var oldonload = window.onload;
	  if (typeof window.onload != 'function') {
		window.onload = func;
	  } else {
		window.onload = function() {
		  oldonload();
		  func();
		}
	}
	}
	  else{/*if the onload event has an argument/parameter cater for that*/
	  if (arg){
	  oldonload = window.onload;
	  if (typeof window.onload != 'function') {
		window.onload = func(arg); 
		}
		 window.onload = function() {
		  oldonload();
		  func(arg); 
		}
	  }
	}
}	

//track docs js
function loadGALinkScript(){
	var hrefs = document.getElementsByTagName('a');
	var link_path = "";
	for (var l = 0; l < hrefs.length; l++) { 
			try {
				var link_path = hrefs[l].pathname;
				if (location.host == hrefs[l].hostname) {
					if (link_path.match(/\.(doc|pdf|xls|ppt|zip|txt|mov|wmv|mp3)$/)) {addtrackerlistener(hrefs[l]);}
				} else {addtrackerlistener(hrefs[l]);}
			}
			catch(err) {}}
		
}

function addtrackerlistener(obj,pageTracker) {
	if (obj.addEventListener) {
		obj.addEventListener('click', trackfiles, true);
	} else if (obj.attachEvent) {
		obj.attachEvent("on" + 'click', trackfiles);
	}
}

function trackfiles(array_element,pageTracker) {
	file_path = "";
	var pageTracker = _gat._getTracker("UA-12545525-1"); //Added 5-5-10
	if (location.host != this.hostname) {
		file_path = "/exlinks/" + ((array_element.srcElement) ? "/" + array_element.srcElement.hostname : this.hostname);
	}
	file_path = file_path + ((array_element.srcElement) ? "/" + array_element.srcElement.pathname : this.pathname);
	pageTracker._trackPageview(file_path);
}
// end track docs js
function loadGAScript(){
	/*Check browser for Dom compatibility*/
	if (!document.getElementsByTagName) return false;
	/*Determines whether the page is using a secure or unsecure protocol*/
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	/*Writes in the script to the document head*/
	var gaScript = document.createElement("script");
	gaScript.setAttribute("src",gaJsHost +"google-analytics.com/ga.js");
	gaScript.setAttribute("type","text/javascript");
	var domHead = document.getElementsByTagName("head")[0]
	domHead.appendChild(gaScript);
}
	loadGAScript();

/*Calls the analytics function*/
function callGA(){	
	var pageTracker = _gat._getTracker("UA-12545525-1");
	pageTracker._initData();
	pageTracker._trackPageview();
}
	addLoadEvent(callGA);
	addLoadEvent(loadGALinkScript);