function fillcountry(f,obj,icr)
{
   obj.length=null;
   obj.length++;
   obj.options[obj.length-1].text='-- Any Country --';
   obj.options[obj.length-1].value='';
   
   for (x=0;x<f.length;x++){
    if(f[x].selected){
   for(var i=0; i<Countries.length;i++)
   {
        if(f[x].value==Countries[i][icr])
        {
             if(icr){
                for(var j=(icr);j<Countries[i].length-1;j++)
             {
                  obj.length++;
                  obj.options[obj.length-1].text=Countries[i][j+1]
                  obj.options[obj.length-1].value=Countries[i][j+1];
             }
                
                }else{
                     obj.length++;
                  obj.options[obj.length-1].text=Countries[i][1]
                  obj.options[obj.length-1].value=Countries[i][1];
                }
        }
   }
   }
   }
}

function fillstate(f,obj,icr)
{
   obj.length=null;
   obj.length++;
   obj.options[obj.length-1].text='-- Any State--';
   obj.options[obj.length-1].value='';
				   
   for (x=0;x<f.length;x++){
    if(f[x].selected){
   for(var i=0; i<Countries.length;i++)
   {
        if(f[x].value==Countries[i][icr])
        {
             if(icr){
                for(var j=(icr);j<Countries[i].length-1;j++)
             {
                  obj.length++;
                  obj.options[obj.length-1].text=Countries[i][j+1]
                  obj.options[obj.length-1].value=Countries[i][j+1];
             }
                
                }else{
                     obj.length++;
                  obj.options[obj.length-1].text=Countries[i][1]
                  obj.options[obj.length-1].value=Countries[i][1];
                }
        }
   }
   }
   }
}
