<!--hide this script from non-javascript-enabled browsers
var currentVersion = "1.492";
var releaseDate = "July 2010";

var checkWindow = null;

function showCheckWindow()
{
	var url = "http://www.oxcryo.com/cryopad/upgrade.htm?"+currentVersion;
	
    //if (checkWindow && !checkWindow.closed) {
    //    checkWindow.focus();
	//	checkWindow.location = url;
    //}
    //else {
        var w = 500;
        var h = 200;
        var l = (screen.width - w)/2;
        var t = (screen.height - h)/2;
        checkWindow = window.open(url,
            "CheckVersion",
            "status=no,scrollbars=no,resizable=no,"+
            "width="+w+",height="+h+
            ",top="+t+",left="+l);
        checkWindow.focus();
    //}
}

function writeShortVersion() {
	document.write(currentVersion);
}

function writeVersionAndDate() {
	document.write("Cryopad version "+currentVersion+", released "+releaseDate+".");	
}

function upToDate(version)
{
	return (currentVersion==version);
}

function checkForUpgrade() {
    var yourVersion = location.search.substring(1);
    if (upToDate(yourVersion)) {
        document.getElementById('checkVersion').innerHTML = "<p>The latest version is "+currentVersion+", released "+releaseDate+". Your version is up-to-date.</p>"; 
    }
    else {
        document.getElementById('checkVersion').innerHTML = "<p>The latest version is "+currentVersion+", released "+releaseDate+". Visit <a href='http://www.oxcryo.com/software/cryopad/' target='_blank' class='mainlink'> www.oxcryo.com/software/cryopad/</a> for a free update.</p>"; 
    }
}

// stop hiding -->
