function start_demo(url) {
  if (isVistaIE())
  {
    // On Vista, javascript on IE does not use the URL set with the base element.
    // Consequently, on resolving this relative URL thinks the base is <app>/cgi-bin/, so we have to remove it here.
    url = repareRelativeUrl(url);
  }
  var w1 = window.open(url, "klikpraat1", "scrollbars=1, resizable=1, left=40, top=100, width=450, height=450, status=0");
  setTimeout("start_demo2('" + url + "&iid=last_id&joinconversation=true&demo=true')", 3000);
}

function start_demo2(url) {
  
  if (isVistaIE())
  {
    // On Vista, javascript on IE does not use the URL set with the base element.
    // Consequently, on resolving this relative URL thinks the base is <app>/cgi-bin/, so we have to remove it here.
    url = repareRelativeUrl(url);
  }
  var w2 = window.open(url, "klikpraat2", "scrollbars=1, resizable=1, left=520, top=100, width=450, height=450, status=0");
}

function popup(url)
{
    if (isVistaIE())
    {
      // On Vista, javascript on IE does not use the URL set with the base element.
      // Consequently, on resolving this relative URL thinks the base is <app>/cgi-bin/, so we have to remove it here.
    url = repareRelativeUrl(url);
    }
    // Setting the focus explicitly does no longer work in IE7 on Vista.
    window.open(url, "tool", "scrollbars=1, resizable=1, left=40, top=100, width=500, height=450, status=0");
};

function popupredacteur(url) {
  if (isVistaIE())
  {
    // On Vista, javascript on IE does not use the URL set with the base element.
    // Consequently, on resolving this relative URL thinks the base is <app>/cgi-bin/, so we have to remove it here.
    url = repareRelativeUrl(url);
  }
  var redacteur = window.open(url, "KlikSterRedacteur", "scrollbars=1, resizable=1, left=40, top=100, width=450, height=450, status=0");
}

function popup2(url) {
  
  if (isVistaIE())
  {
    // On Vista, javascript on IE does not use the URL set with the base element.
    // Consequently, on resolving this relative URL thinks the base is <app>/cgi-bin/, so we have to remove it here.
    url = repareRelativeUrl(url);
  }
  var w2 = window.open(url, "klikpraat2", "scrollbars=1, resizable=1, left=520, top=100, width=450, height=450, status=0");
}

function popup_beheer(url) {
  if (isVistaIE())
  {
    // On Vista, javascript on IE does not use the URL set with the base element.
    // Consequently, on resolving this relative URL thinks the base is <app>/cgi-bin/, so we have to remove it here.
    url = repareRelativeUrl(url);
  }
  var b = window.open(url, "beheer", "scrollbars=1, resizable=1, left=100, top=100, width=650, height=460, status=0");
}

function popup_editor(url) {
  if (isVistaIE())
  {
    // On Vista, javascript on IE does not use the URL set with the base element.
    // Consequently, on resolving this relative URL thinks the base is <app>/cgi-bin/, so we have to remove it here.
    url = repareRelativeUrl(url);
  }
  var c = window.open(url, "editor", "scrollbars=1, resizable=1, left=100, top=100, width=650, height=460, status=0");
}

function admin_popup(url) {
  if (isVistaIE())
  {
    // On Vista, javascript on IE does not use the URL set with the base element.
    // Consequently, on resolving this relative URL thinks the base is <app>/cgi-bin/, so we have to remove it here.
    url = repareRelativeUrl(url);
  }
  var admin = window.open(url, "admin", "scrollbars=1, resizable=1, left=100, top=100, status=0");
}

function isVistaIE()
{
  //alert (("Internet Explorer = " + (navigator.appName.match("Internet Explorer") != null)) + ", Vista = " + (navigator.userAgent.match("NT 6.0") != null ));
  return ((navigator.appName.match("Internet Explorer") != null) && (navigator.userAgent.match("NT 6.0") != null ));
}

function repareRelativeUrl (url)
{
  if (url.indexOf("cgi-bin") == 0)
  {
    return url.replace("cgi-bin/", "");
  }
  else return url;
}
var n = 0;
function popup_ipod(url) {
  if (isVistaIE())
  {
    // On Vista, javascript on IE does not use the URL set with the base element.
    // Consequently, on resolving this relative URL thinks the base is <app>/cgi-bin/, so we have to remove it here.
    url = repareRelativeUrl(url);
  }
    var w = window.open(url, "KlikTolk"+n++, "scrollbars=0, resizable=1, left=0, top=0, width=434, height=804, status=0");
}

function popup_iphone(url) {
  if (isVistaIE())
  {
    // On Vista, javascript on IE does not use the URL set with the base element.
    // Consequently, on resolving this relative URL thinks the base is <app>/cgi-bin/, so we have to remove it here.
    url = repareRelativeUrl(url);
  }
    var w = window.open(url, "KlikTolk"+n++, "scrollbars=0, resizable=1, left=0, top=0, width=400, height=900, status=0");
}
