// JavaScript Document
function my_getbyid(id)
{
   itm = null;
   if (document.getElementById)
   {
      itm = document.getElementById(id);
   }
   else if (document.all)
   {
      itm = document.all[id];
   }
   else if (document.layers)
   {
      itm = document.layers[id];
   }
   
   return itm;
}
function SetMaxSelect(ob,type,start,cur,longstr)
{
	for (m = ob.options.length; m >= 0; m--)
	{
		ob.options[m] = null;
	}
	
	if(type == 1)
	{
		if(start < 18) start = 18;
		end = 60;
	}
	if(type == 2)
	{
		if(start < 140) start = 140;
		end = 230;
	}
	
	if(longstr)
	{
		newOption = new Option("²»ÏÞ",0);
		ob.options.add(newOption);
	}else
	{
		newOption = new Option("²»ÏÞ",0);
		ob.options.add(newOption);
	}
	for(m = start; m <= end; m++)
	{ 
		newOption = new Option(m,m);
		if(cur == m) newOption.id="opt_selected" + cur;
		ob.options.add(newOption);
	}
	
	if (my_getbyid('opt_selected'+cur))
	{
		my_getbyid('opt_selected'+cur).selected = true;
	}
}
//window.onload=function()
//{
 // SetMaxSelect(my_getbyid('max_age'), 1,25, my_getbyid("max_age").value,true);
//}
