<!-- hide jscript from old browsers ---

function refresh_screen()
{
     window.location.reload()
}
/****** this object holds all of the key data **********/
function Link(name, url)
{
	this.name = name;
	this.title = new Array();
	this.url = new Array();
}
/**************************************************************/

var names      = new Array ();
var temp       = new Array ();
var temp2      = new Array ();
var link       = new Link ();
var final_list = new Array ();

/******** array declaration... it holds all of the data for the menus ****/

var menu = new Array (
"Médicos* | - Selecione a Cidade -#" +
"56|AC - RIO BRANCO#" +
"44|AL - MACEIO#" +
"45|AM - MANAUS#" +
"43|AP - MACAPA#" +
"28|CE - FORTALEZA#" +
"12|DE - BRASILIA#" +
"65|ES - VITORIA#" +
"30|GO - GOIANIA#" +
"9|MG - BELO HORIZONTE#" +
"16|MS - CAMPO GRANDE#" +
"23|MT - CUIABA#" +
"8|PA - BELEM#" +
"41|PB - JOAO PESSOA#" +
"24|PR - CURITIBA#" +
"52|RJ - RESENDE#" +
"55|RJ - RIO BONITO#" +
"57|RJ - RIO CLARO#" +
"58|RJ - RIO DE JANEIRO#" +
"48|RN - NATAL#" +
"10|RR - BOA VISTA#" +
"51|RS - PORTO ALEGRE#" +
"27|SC - FLORIANOPOLIS#" +
"4|SE - ARACAJU#" +
"1|SP - AGUAS DE LINDOIA#" +
"2|SP - AMERICANA#" +
"3|SP - AMPARO#" +
"5|SP - ARUJA#" +
"6|SP - ATIBAIA#" +
"7|SP - BARUERI#" +
"11|SP - BOITUVA#" +
"13|SP - CACAPAVA#" +
"14|SP - CAIEIRAS#" +
"15|SP - CAMPINAS#" +
"17|SP - CARAGUATATUBA#" +
"18|SP - CARAPICUIBA#" +
"19|SP - CERQUILHO#" +
"20|SP - COSMOPOLIS#" +
"21|SP - COTIA#" +
"22|SP - CUBATAO#" +
"25|SP - DIADEMA#" +
"26|SP - FERRAZ DE VASCONCELOS#" +
"29|SP - FRANCO DA ROCHA#" +
"31|SP - GUARAREMA#" +
"32|SP - GUARATINGUETA#" +
"33|SP - GUARUJA#" +
"34|SP - GUARULHOS#" +
"35|SP - IGUAPE#" +
"36|SP - ILHA BELA#" +
"37|SP - ITAPEVI#" +
"38|SP - ITATIBA#" +
"39|SP - ITU#" +
"40|SP - JACAREI#" +
"42|SP - JUNDIAI#" +
"46|SP - MAUA#" +
"47|SP - MOGI DAS CRUZES#" +
"49|SP - OSASCO#" +
"53|SP - RIBEIRAO PIRES#" +
"54|SP - RIBEIRAO PRETO#" +
"59|SP - SANTO ANDRE#" +
"60|SP - SÃO BERNARDO DO CAMPO#" +
"61|SP - SÃO CAETANO DO SUL#" +
"62|SP - SÃO PAULO#" +
"63|SP - SUZANO#" +
"64|SP - TABOAO DA SERRA#" +
"50|TO - PALMAS" ,

"Farmácias*http://Link|Farmácias Nome1#" +
	"http://Link|Farmácias Nome2#" +
	"http://Link|Farmácias Nome3",

"Hemocentros*http://Link|Hemocentros Nome1#" +
	"http://Link|Hemocentros Nome2#" +
	"http://Link|Hemocentros Nome3",

"Genéricos*http://Link|Genéricos Nome1#" +
	"http://Link|Genéricos Nome2#" +
	"http://Link|Genéricos Nome3");


/*****************************************************************/

function updateMenus ( what ) {
   var n = what.selectedIndex;
   what.form.p1.length = final_list[n].title.length;
   for (var x = 0; x < what.form.p1.length; x++)
   {
      what.form.p1.options[x].text = final_list[n].title[x];
      what.form.p1.options[x].value = final_list[n].url[x]; 
   }
   what.form.p1.selectedIndex = 0;
}
/**************************************************************/

function give_names () 
{
	document.myForm.main.length = names.length;
	document.myForm.p1.length = final_list[0].title.length;
	for ( var i=0; i<names.length; i++ )
		document.myForm.main.options[i].text = final_list[i].name;
	for (var x=0; x<final_list[0].url.length; x++)
		document.myForm.p1.options[x].value = final_list[0].url[x];
	for (var x=0; x<final_list[0].title.length; x++)
		document.myForm.p1.options[x].text = final_list[0].title[x];

}
/**************************************************************/

function createMenus () {

	for ( var i=0; i < menu.length; i++ )
	{
		names[i] = menu[i].split("*");
		
		link = new Link(names[i][0]);
		temp[i] = names[i][1].split("#");
		final_list[i] = link;
		for (var x=0; x<temp[i].length; x++)
		{
			temp2[x]  = temp[i][x].split("|");
			final_list[i].url[x] = temp2[x][0];
			final_list[i].title[x] = temp2[x][1];
		}
	}
give_names();
}

/**************************************************************/

// end jscript hiding -->