/// <reference path="jquery-1.4.1-vsdoc.js" />
/// http://shareflake.com/
//var oldPath;
//var oldOrganizationId;
//var oldOrganizationName;

function updateFlake(path) {
    $("#flake-it-button").attr("src", path);
}

//function updateFlake(path, organizationId, organizationName) {

//    oldPath = path;
//    oldOrganizationId = organizationId;
//    oldOrganizationName = organizationName;

//    var conversionTextBox = document.getElementById("register-box-3-provision-input");
//    var conversionValue = 0;
//    if (conversionTextBox.value != '') conversionValue = parseInt(conversionTextBox.value);
//    if (conversionValue.toString().length != conversionTextBox.value.length && conversionTextBox.value != 0) conversionValue = 'NaN';
//    conversionValue = Math.round(conversionValue * 0.8 * 100) / 100;
//    if (isNaN(conversionValue)) {
//        conversionTextBox.style.color = "red";
//    }
//    else {
//        //var conversionValue = document.getElementById("register-box-3-provision-input").value;
//        conversionTextBox.style.color = "#B21FAD";
//        if (conversionValue == "") conversionValue = '0';
//        var conversionType = 'SEK';
//        var conversionTypes = document.getElementsByName("ConversionType");
//        if (conversionTypes.length == 0) {
//            conversionType = $("#txtConversionType").val();
//        }
//        else {
//            if (conversionTypes[0].checked) {
//                conversionType = ' %';
//            }
//        }

//        var scriptText = "<img id='sf_button' src='" + path + "' id='shareflake_btn_img' alt='Shareflake' />";

//        var divFlakePreview = document.getElementById("flake-it-button");
//        divFlakePreview.innerHTML = scriptText;

//        ShowFlake(conversionValue, conversionType, 'f4e2ed8f-1b56-4a41-9af9-04ebee4ff807', 1, 'http://shareflake.com/FlakeClick', organizationId, 'http://shareflake.com/Content/Images/Charity/charity-' + organizationId + '.png');
//    }
//}

//function updateFlakeOldPath() {
//    document.getElementById('flake-it-button').style.display = 'none';
//    updateFlake(oldPath, oldOrganizationId, oldOrganizationName);
//}

//function updateFlakeOldPathNewOrg(organizationId, organizationName) {
//    document.getElementById('flake-it-button').style.display = 'none';
//    updateFlake(oldPath, organizationId, organizationName);
//}
