/*
'*************************************************************************
' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK!
' Function : Javascript functions
' Product  : Active Knowledge Content Management System
' Version  : 1.1.4
' Copyright: Copyright (C) 2008 Direct Knowledge, LLC
'            See http://www.directk.com/directk/activek/license.html 
'            for this product for details regarding licensing, usage, 
'            disclaimers, distribution and general copyright requirements. 
'*************************************************************************
*/

var formchanged=false;

function help_win(sTopicID) {
  HelpWindow = window.open('help.asp?topic='+sTopicID, 'activek_help','scrollbars,resizable,height=360,width=360');
  if (navigator.appName == "Netscape") HelpWindow.focus();
}

function formcheck(sURL) {
  if (formchanged) {
    if (confirm("You have made changes that aren't yet saved. Do you want to save them now?")) {
      document.entry.submit();
      return "#";
    } else {
    return sURL;
  }
  } else {
    return sURL;
  }
}

function CheckSearch () {
	if (document.frmSearch.txtSearch.value=="") {
		alert("Please enter at least one keyword.");
		document.frmSearch.txtSearch.focus();
		return false;
	} else if (document.frmSearch.txtSearch.value.length<3) {
		alert("Please enter search terms including at least 3 characters.");
		document.frmSearch.txtSearch.focus();
		return false;
	} else {
		return true;
	}
}

function ToggleDisplay(id) {

	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = 'block';
		} else {
			document.getElementById(id).style.display = 'none';			
		}	
	} else { 
		if (document.layers) {	
			if (document.id.display == "none"){
				document.id.display = 'block';
			} else {
				document.id.display = 'none';
			}
		} else {
			if (document.all.id.style.visibility == "none"){
				document.all.id.style.display = 'block';
			} else {
				filter(("img"+id),'imgout');
				document.all.id.style.display = 'none';
			}
		}
	}
}

/*------------------------------------------------------------
	Document Text Sizer- Copyright 2003 - Taewook Kang.  All rights reserved.
	Coded by: Taewook Kang (txkang.REMOVETHIS@hotmail.com)
	Web Site: http://txkang.com
	Script featured on Dynamic Drive (http://www.dynamicdrive.com)
	
	Please retain this copyright notice in the script.
	License is granted to user to reuse this code on 
	their own website if, and only if, 
	this entire copyright notice is included.
--------------------------------------------------------------*/

//Specify affected tags. Add or remove from list:
var tgs = new Array( 'div','td','p','li','a');

//Specify spectrum of different font sizes:
var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
var startSz = 2;

function ts( trgt,inc ) {
	if (!document.getElementById) return
	var d = document,cEl = null,sz = startSz,i,j,cTags;
	
	if (inc == 0) {
		sz = 2;
	} else {
		sz += inc;
	}
	if ( sz < 0 ) sz = 0;
	if ( sz > 6 ) sz = 6;
	startSz = sz;
		
	if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

	cEl.style.fontSize = szs[ sz ];

	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
	}
}

