/*
 * NETPORT v1.0
 * Created on Jun 24, 2006
 * Author: Dorin SIRBU
 * E-mail: dorin.sirbu@ist.ro
 * 
 * This software is copyrighted. Under the copyright laws, this software
 * may not be copied, in whole or in part, without prior written consent
 * of INDUSTRIAL SOFTWARE TECHOLOGIES SRL or its assignees. This software
 * is provided under the terms of a license between INDUSTRIAL SOFTWARE
 * TECHOLOGIES SRL and the recipient, and its use is subject to the terms
 * of that license.                  										
 * 
 * TRADEMARKS: INDUSTRIAL SOFTWARE TECHNOLOGIES and INDUSTRIAL SOFTWARE   
 * TECHNOLOGIES NETPORT are registered trademarks of INDUSTRIAL SOFTWARE  
 * TECHNOLOGIES SRL, in the European Community and are trademarks of      
 * INDUSTRIAL SOFTWARE TECHNOLOGIES SRL, in other countries. The          
 * INDUSTRIAL SOFTWARE TECHNOLOGIES logo, is a trademark of
 * INDUSTRIAL SOFTWARE TECHNOLOGIES SRL, in the Europenian Community and
 * other countries. 	
 * 
 * (c)2003-2006 INDUSTRIAL SOFTWARE TECHNOLOGIES SRL
 * http://www.ist.ro
 * 
 */
 
/* Enable/Select a selector option. */
function enable_select_option(selector, value)
{
	var n = selector.options.length;
	for(i = 0; i < n ; i ++)
	{
		// Checking if required value.
		if(selector.options[i].value == value)
		{
			selector.options[i] = new Option(selector.options[i].text, value, true, true);
		}
	}
}

function open_div(id, center) {
	if(document.getElementById) {
		div = document.getElementById(id);
		if(center) {
			if (parseInt(navigator.appVersion)>3) {
			 if (navigator.appName=="Netscape") {
			  winW = window.innerWidth;
			  winH = window.innerHeight;
			 }
			 if (navigator.appName.indexOf("Microsoft")!=-1) {
			  winW = document.body.offsetWidth;
			  winH = document.body.offsetHeight;
			 }
			}
			left = (winW - div.offsetWidth) / 2;
			if(left < 0) left = 0;	
			div.style.left = left;	
		}
		div.style.visibility = 'visible';
	}	
}
function close_div(id) {
	if(document.getElementById) {
		div = document.getElementById(id);
		div.style.visibility = 'hidden';
	}
}

