The following code works in IE, Firefox, Opera, Netscape but not Safari 1.3.2 and I cannot see why and its driving me mad.

Code:
mySelect=document.getElementById('Qualification');
removeAll(mySelect);		

var myOpt=document.createElement('option');
myOpt.value="0";
myOpt.text="-- All --";
mySelect.options.add(myOpt);

var sOutData=s;
var x=s.toLowerCase();				
if(x.indexOf("error")==-1) 	{
	var sRecord=s.split('|');
	var cnt=0;
	var sOutData="";
	
	while(cnt<sRecord.length) {
		sData=sRecord[cnt].split(',');
		if(sData[0]) {
			//sOutData+=sData[1];
			var myOpt=document.createElement('option');
			myOpt.value=sData[0];
			myOpt.text=sData[1];
			mySelect.options.add(myOpt);
		} else {
			var myOpt=document.createElement('option');
			myOpt.value="";
			myOpt.text="No data";
			mySelect.options.add(myOpt);						
		}
		cnt++;
	} //end while
}
mySelect.disabled=false;