function osDetect() {
  if(navigator.platform.indexOf("Win") != -1) {
    return "Windows";
  }
  if(navigator.platform.indexOf("Mac") != -1) {
    return "Mac";
  }
  if(navigator.platform.indexOf("Linux") != -1) {
    return "Linux";
  }
  return "Desconocido";
}

function browserDetect() {
  if(navigator.userAgent.indexOf("MSIE") != -1) {
    return "Explorer";
  }
  if(navigator.vendor.indexOf("Apple") != -1) {
    return "Safari";
  }
  if(navigator.vendor.indexOf("KDE") != -1) {
    return "Konqueror";
  }
  if(navigator.userAgent.indexOf("Firefox") != -1) {
    return "Firefox";
  }
  if(navigator.userAgent.indexOf("Gecko") != -1) {
    return "Mozilla";
  }
  if(navigator.userAgent.indexOf("Netscape") != -1 || navigator.userAgent.indexOf("Mozilla") != -1) {
    return "Netscape";
  }
  return "Desconocido";
}

function writeElement(id, text) {
  if (document.getElementById) {
    element = document.getElementById(id);
    element.innerHTML = '';
    element.innerHTML = text;
  } else if (document.all) {
    element = document.all[id];
    element.innerHTML = text;
  } else if (document.layers) {
    element = document.layers[id];
    text_alt = "<p>" + text + "</p>";
    element.document.open();
    element.document.write(text2);
    element.document.close();
  }
}

function videoObject(browser) {
  var text = "";
  if(browser == "Explorer") {
    text = "<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\" width=\"320\" height=\"260\">";
    text += "video","  <param name=\"src\" value=\"rtsp://rtsp.whitebearsolutions.com/default/diving_buceo_256kbps.mp4\"/>";
    text += "video","<param name=\"controller\" value=\"true\"/>";
    text += "<param name=\"autoplay\" value=\"true\"/>";
    text += "<param name=\"loop\" value=\"false\"/>";
    text += "</object>";
  } else {
    text = "<object type=\"video/quicktime\" pluginspage=\"http://www.apple.com/quicktime/download/\" src=\"rtsp://rtsp.whitebearsolutions.com/default/diving_buceo_256kbps.mp4\" width=\"320\" height=\"260\" autoplay=\"true\" controller=\"true\" loop=\"false\">";
    text += "</object>";
  }
  writeElement("video", text);
}
