/******************************************************************************
$Workfile: CustomScripts.js $
$Revision: 6 $
$Author: Nfeller $

A file to hold any user-defined custom scripts.  All RtWebParts will include
this script file at the bottom of the page using Page.RegisterStartupScript()
That ASP.NET method places the script on the page just before the Microsoft
SharePoint javascript code that initiates any client-side web part 
communication.

<script language="javascript" 
src="http://localhost:80/RtWebParts/scripts/CustomScripts.js"></script>

This allows the custom scripts to take advantage of RtWebPart javascript vars,
objects and functions. Just place your javascript code after this comment block
One example of how this might be used is when PI property values contain
javascript function calls which are triggerd by click events in RtTreeView.


Copyright © 2006 OSIsoft, Inc. All rights reserved.
Unpublished - rights reserved under the copyright law of the United States.
USE OF A COPYRIGHT NOTICE IS PRECAUTIONARY ONLY AND DOES NOT
IMPLY PUBLICATION OR DISCLOSURE.
THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE SECRETS OF OSIsoft, Inc. USE, DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF OSIsoft, Inc.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227.7013

OSIsoft, Inc.
777 Davis St., San Leandro CA 94577
*******************************************************************************/
function SetSyncTime(id,optionIndex)
{
	var s = id;
	var objID = s.substring(0,s.lastIndexOf('__')) + '__txtSyncInterval' ;
	var obj = document.getElementById(objID);
	if(optionIndex == 2)
	{
		obj.disabled = true;
		//obj.text = '';
	}
	else
	{
		obj.disabled = false;
		if(obj.value == '')
			obj.value = '12:00:00';
	}
		
}