function openWindow(url,title,w,h,tb,stb,l,mb,sb,rs,x,y)
{
var pos=(document.layers)? ',screenX='+x+',screenY='+y: ',left='+x+',top='+y;
var tb=(tb)?'yes':'no';
var stb=(stb)?'yes':'no';
var l=(l)?'yes':'no';
var mb=(mb)?'yes':'no';
var sb=(sb)?'yes':'no';
var rs=(rs)?'yes':'no';
var txt='';
txt+='scrollbars='+sb;
txt+=',width='+w;
txt+=',height='+h;
txt+=',toolbar='+tb;
txt+=',status='+stb;
txt+=',menubar='+mb;
txt+=',links='+l;
txt+=',resizable='+rs;

var x=window.open(url, title, txt+pos);
x.focus();
}


function fillNumericSelect (selectName, begin, end, increment, dummyFirtValue, defaultValue)
{
	if (increment == 0) return ("rtfm");
	if (begin==end) return ("rtfm");

	select_to_fill= document.getElementById (selectName);
	
	optbegin = document.createElement('option');
	optbegin.value = "#dummy#";
	optbegin.text = dummyFirtValue ;
	
	if (defaultValue == '')
	{
		optbegin.selected = true ;
	}	
	try
	{
		select_to_fill.add (optbegin,null);
	}
	catch (e){}
	try
	{
		select_to_fill.add (optbegin);
	}
	catch (e){}
	
	
	if (begin > end)
	{		
		inc = Math.abs (increment) * -1 ;
	}
	else
	{
		inc = Math.abs (increment) ;
	}
	i = begin ;

	while (true) 
	{
		opt = document.createElement('option');
		opt.text = i ;
		opt.value = i ;
		/*
		if (i == 0 && defaultValue == '')
		{
			opt.selected = true ;
		}
		else
		*/
		if (defaultValue > '')
		{
			if (i == defaultValue)
			{			
				opt.selected = true ;
			}	
		}
			if (select_to_fill.selectedIndex>=0)
			attachTo = select_to_fill.options[select_to_fill.selectedIndex] ;
		else
			attachTo = null ;
			
		try
		{
			select_to_fill.add (opt,null);
		}
		catch (e){}
		try
		{
			select_to_fill.add (opt);
		}
		catch (e){}
		
		
		if (inc > 0)
		{
			if (i >= end)
			{
				break ;
			}
		} 
		else
		{
			if (i <= end)
			{
				break ;
			}
		}		
		i+= inc ;
	}
}

