﻿function detectJRE(){
    var list = deployJava.getJREs();
    var result = "";

    if (list.length == 0)
    {
        alert ('No Detectable Java Platforms are Installed');
    }
    else
    {
	result = list[0];
	for (var i=1; i<list.length; i++) {
            result += ", " + list[i];
	}
        alert("You have the following Java Platform(s) installed: \n" + result);
    }
}

function isWebStartInstalled(version){
	alert("Is "+version+" WebStartInstalled = "+deployJava.isWebStartInstalled(version));
}

function checkJRE(version){
	alert("Version:"+version+" is "+deployJava.versionCheck(version));
}


function lunchRemoteControl(){
	jnlp='http://www.jptv24.com/rc.jnlp';
	
	if (deployJava.returnPage == null) {
        // if there is an install, come back and run the jnlp file
        deployJava.returnPage = jnlp;
    }

    if (deployJava.isWebStartInstalled('1.5.0')) {
    	deployJava.launch(jnlp);
     } else {
    	window.open("http://www.jptv24.com/jptv24setup.exe", "jptv24setup");
     }
}