var server = "http://www.vamoose.com";

var iframe = document.createElement('iframe');

iframe.frameBorder='no';
iframe.height=height;
iframe.width=width;
iframe.scrolling='no';

document.getElementById(divID).appendChild(iframe);
//reference vars via window object to avoid "variable not defined" errors
//all global variables are implicitly members of window
var feedType = vamooseJSDefaultParam(window.vType, "vacation_homes");
var min = vamooseJSDefaultParam(window.startAt, 0)
var feature = vamooseJSDefaultParam(window.feature, "");

var url = server + "/search/" + feedType + "/noheaders?vID=" + vID + 
  "&amount=" + size + "&min=" + min 
if(feature != ""){
  var features=feature.split(",")
  var part_num=0;
  while (part_num < features.length)
  {
    url = url + "&" + features[part_num] + "=ok";
    part_num+=1;
  }
}
  
  
iframe.src = url;

//go a bit crazy with the name to avoid potential conflicts
function vamooseJSDefaultParam(p, d) {
  if(p == undefined) {
    return d;
  }
  else {
    return p;
  }
}

/*
  Incomplete thought, but harmless at this point
*/
function vamooseAmenitiesToQueryString(amenities) {
  if(amenities == undefined) {
    return "";
  }
  else {
    return ""; 
  }
}
