﻿

var defaultDownloadLocation = 'http://www.casinostates.com/download/';
var defaultRedirectPageLocation = 'http://www.casinostates.com/gettingstarted/';

function downloadCS(downloadLink, redirectPageLink) {
    var downloadLocation = "";
    var redirectPageLocation = "";
    
    if (downloadLink != null && downloadLink != "") {
        downloadLocation = downloadLink;
    }
    else
        downloadLocation = defaultDownloadLocation;

    if (redirectPageLink != null && redirectPageLink != "") {
        redirectPageLocation = redirectPageLink;
    }
    else
        redirectPageLocation = defaultRedirectPageLocation;

    document.location = downloadLocation;
    
    if (redirectPageLocation != null && redirectPageLocation != "")
        setTimeout("window.location='" + redirectPageLocation + "'", 3000);
        
    return true;
}