var thisSelect=document.getElementById('selectID'); //Put div to target name here
var URLlist=Array(); //list of URL's
var URLselecttext=Array(); //list of text items to show for each URL in select box

// RJA eSolutions September 2009

// add options to list
function addOption(selectbox,text,value )
{
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}

// goto selected url (hardcoded select control id)
function gotoURL()
{
var thisSelectTarget2=document.getElementById('createdSelect');
var url=thisSelectTarget2.options[thisSelectTarget2.selectedIndex].value;
if (url != "") { location.href=url; } 
return false;
}

// list of URL to go to
URLlist[0]="/connect/com/home/benvenuto";
URLlist[1]="/connect/com/home/willkommen";
URLlist[2]="/connect/com/home/welcome";
URLlist[3]="/connect/com/home/bienvenue";


// corresponding list of items in list that user sees
URLselecttext[0]="IT";
URLselecttext[1]="DE";
URLselecttext[2]="EN";
URLselecttext[3]="FR";

// create select list
thisSelect.innerHTML="<SELECT id='createdSelect'></SELECT>";
var thisSelectTarget=document.getElementById('createdSelect');

for (var i=0; i < URLlist.length;++i){
addOption(thisSelectTarget,URLselecttext[i],URLlist[i]);
}

// add button and event handler (can put image here too).
thisSelect.innerHTML+="<input type='image' src='/NR/rdonlyres/88A0137D-7CF1-41C2-BF2B-C8633956B6AB/0/orangearrow.gif' value='Go!' onclick='return gotoURL();'>";
