<!--
//
// Browser Detection
//
isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
NS4 = (document.layers) ? true : false;
IEmac = ((document.all)&&(isMac)) ? true : false;
IE4plus = (document.all) ? true : false;
IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;
IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
ver4 = (NS4 || IE4plus) ? true : false;
NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;

IE5plus = IE5 || IE6;
IEMajor = 0;

if (IE4plus)
{
	var start = navigator.appVersion.indexOf("MSIE");
	var end = navigator.appVersion.indexOf(".",start);
	IEMajor = parseInt(navigator.appVersion.substring(start+5,end));
	IE5plus = (IEMajor>=5) ? true : false;
}



/*function fntLeftNav(layername,visibility,newColour,what)
{
	document.getElementById(layername).style.visibility = visibility;
	what.style.backgroundColor=newColour;
}*/

function displayPrint()
{
	document.write('<a href="#" onclick="javascript:window.print();" onkeypress="javascript:window.print();"><img src="images/btn_print.gif" width="115" height="18" vspace="5" align="right" hspace="5" alt="Print Page" border="0" /></a>');
}
function displayUpdates()
{
	document.write('<a href="#" title="Receive Updates (opens in a new window)"><img src="images/btn_updates.gif" width="115" height="18" hspace="5" vspace="5" align="right" alt="Receive Updates (opens in a new window)" border="0" onclick="openWindow(\'receive_updates.asp\',\'updates\',\'scrollbars=yes,width=320,height=400\')" onkeypress="openWindow(\'receive_updates.asp\',\'updates\',\'scrollbars=yes,width=320,height=400\')"/></a>');
}
function displaySendFriend(pageName,type,description,shortContent)
{
	document.write('<a href="#" title="Send to a Friend (opens in a new window)"><img src="images/btn_send-friend.gif" width="115" height="18" hspace="5" vspace="5" align="right" alt="Send to a Friend (opens in a new window)" border="0" onclick="openWindow(\'send_friend.asp?page='+pageName+'&amp;type='+type+'&amp;description='+description+'&amp;shortContent='+shortContent+'\',\'updates\',\'scrollbars=yes,width=320,height=400\')" onkeypress="openWindow(\'send_friend.asp?page='+pageName+'&amp;type='+type+'&amp;description='+description+'&amp;shortContent='+shortContent+'\',\'updates\',\'scrollbars=yes,width=320,height=400\')"/></a>');
}
function displayPrintOff()
{
	document.write('<img src="images/btn_print_off.gif" width="115" height="18" vspace="5" align="right" hspace="5" alt="Print Page (Disabled)" border="0" />');
}
function displayUpdatesOff()
{
	document.write('<img src="images/btn_updates_off.gif" width="115" height="18" hspace="5" vspace="5" align="right" alt="Receive Updates (Disabled)" border="0" />');
}
function displaySendFriendOff()
{
	document.write('<img src="images/btn_send-friend_off.gif" width="115" height="18" hspace="5" vspace="5" align="right" alt="Send to a Friend (Disabled)" border="0" />');
}
function displayClose()
{
	document.write('<a href="#" class="close" onclick="window.close();" onkeypress="window.close();" title="Close this window">Close</a>');
}

function openWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*
	**************************************************************************************
	FORM FIELD COUNTER
	**************************************************************************************
	This counts down the number of characters left allowed to be entered into a form field
*/

function textCounter(field, countfield, maxlimit){
	if (field.value.length > maxlimit) // if too long...trim it!
	field.value = field.value.substring(0, maxlimit);
	// otherwise, update 'characters left' counter
	else 
	countfield.value = maxlimit - field.value.length;
}

function changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}


//-->
