function fnDropDownReduce(objSource,intRemaining){for(intI=objSource.options.length-1;intI>=intRemaining;intI--)objSource.remove(intI);}
function fnDropDownReplace(objSource,intRemaining,jsonArray)
 {
  fnDropDownReduce(objSource,intRemaining);
  for (var strKey in jsonArray)objSource.options[objSource.options.length]=new Option(jsonArray[strKey],strKey);
  if (intRemaining==1 && objSource.options.length==2) objSource.selectedIndex = 1;
}
function fnString2File(strInput)
 {
  while (strInput.indexOf(" ")>-1)strInput=strInput.replace(" ","-");
  strInput = escape(strInput);
  while (strInput.indexOf("%")>-1)strInput=strInput.replace("%","+");
  return strInput.toLowerCase();
 }