// (C) Copyrights 2008 eTeks - All rights reserved
// Tested with Windows   IE 7, Firefox 3, Opera 9.6
//             Mac OS X  Safari 3, Firefox 2, 
//             Linux     Firefox 3

document.write("<script type='text/javascript' src='http://java.com/js/deployJava.js'></script>");

// Launches Sweet Home 3D with Java Web Start
function launchSweetHome3D() {
  launchJavaWebStartApplication("http://www.sweethome3d.eu/SweetHome3D.jnlp");
}

// Launches Sweet Home 3D / Java 3D 1.3 with Java Web Start
function launchSweetHome3DJava3D13() {
  launchJavaWebStartApplication("http://www.sweethome3d.eu/SweetHome3D-Java3D1.3.jnlp");
}

// Launches Sweet Home 3D / DirectX with Java Web Start
function launchSweetHome3DDirectX() {
  launchJavaWebStartApplication("http://www.sweethome3d.eu/SweetHome3D-DirectX.jnlp");
}

// Launches the given JNLP file with Java Web Start
function launchJavaWebStartApplication(jnlpFile) {
  if (!deployJava.isWebStartInstalled("1.5")) { 
    if (deployJava.installLatestJRE()) { 
      if (deployJava.launch(jnlpFile)) {
      } 
    } 
  } else { 
    if (deployJava.launch(jnlpFile)) {
    } 
  }
}
