﻿function CuteWebUI_AjaxUploader_OnStart() {
    var hidden = this;
    document.getElementById('upload_text_div').style.display = "none";
    hidden.internalobject.insertBtn.style.display = "none";
    hidden.internalobject.cancelBtn.style.visibility = "hidden";
}

function infoHover(state, num)
{
    var box = "box" + num;
    var active = document.getElementById('infoActive').value;
    
    if (state) 
    {
        document.getElementById(box).style.backgroundColor = '#ffffff';
    }
    else 
    {
        if(num != active)
        {
            document.getElementById(box).style.backgroundColor = '#f1f1f1';
        }
    }
}

function infoClick(num)
{
    var box = "box_div" + num;
    var navbox = "box" + num;
    
    var oldActive = document.getElementById('infoActive').value;

    document.getElementById('infoActive').value = num;

    document.getElementById(box).style.display = "inline";

    if(num == "1")
    {
        document.getElementById("box_div2").style.display = "none";
        document.getElementById("box_div3").style.display = "none";
        document.getElementById("box1").style.borderBottom = 'none';
        document.getElementById("box2").style.borderBottom = '1px solid #d6d6d6';
        document.getElementById("box3").style.borderBottom = '1px solid #d6d6d6';
    }
    else if(num == "2")
    {
        document.getElementById("box_div1").style.display = "none";
        document.getElementById("box_div3").style.display = "none";
        document.getElementById("box2").style.borderBottom = 'none';
        document.getElementById("box1").style.borderBottom = '1px solid #d6d6d6';
        document.getElementById("box3").style.borderBottom = '1px solid #d6d6d6';
    }
    else if(num == "3")
    {
        document.getElementById("box_div2").style.display = "none";
        document.getElementById("box_div1").style.display = "none";
        document.getElementById("box3").style.borderBottom = 'none';
        document.getElementById("box2").style.borderBottom = '1px solid #d6d6d6';
        document.getElementById("box1").style.borderBottom = '1px solid #d6d6d6';
    }
    
    infoHover(false, oldActive);
}

function changeUploadPanel(showDiv) {
    //alert('changeUploadPanel Ran');
    
    if (showDiv == 1) {
        document.getElementById('step1_a').style.display = 'inline';
        document.getElementById('step1_b').style.display = 'none';
        document.getElementById('checkprice_btn').style.display = 'none';
    }

    if (showDiv == 2) {
        document.getElementById('step1_a').style.display = 'none';
        document.getElementById('step1_b').style.display = 'inline';
        document.getElementById('checkprice_btn').style.display = 'inline';
    }


    //initFlashLoader();
    //document.getElementById('flash_loader_wrap').style.display = 'none';
}


function showFlashLoader(shift) {
    if (shift) {
        document.getElementById('flash_loader_wrap').style.marginTop = '-93px';
        document.getElementById('flash_loader_wrap').style.display = 'inline';
    }
    else {
        document.getElementById('flash_loader_wrap').style.display = 'inline';
    }
}


function initFlashLoader() {
    var flashvars = {};
    var params = {};
    params.wmode = "transparent";
    swfobject.embedSWF("./Flash/wizard_load_white_bg.swf", "flash_loader", "50", "50", "9.0.0", "expressInstall.swf", flashvars, params);
}

function initWhiteFlashLoader() {
    var flashvars = {};
    var params = {};
    params.wmode = "transparent";
    swfobject.embedSWF("./Flash/wizard_load_3.swf", "flash_loader2", "50", "50", "9.0.0", "expressInstall.swf", flashvars, params);
}

function initSplashFlash() {
    var flashvars = {};
    var params = {};
    params.wmode = "transparent";
    swfobject.embedSWF("mainFlash_v2.swf", "splash_write", "600", "285", "9.0.0", "expressInstall.swf", flashvars, params);
}



function cqHover(state) {
    if (state) {
        document.getElementById('cqDiv').style.backgroundPosition = '-241px -96px';
    }
    else {
        document.getElementById('cqDiv').style.backgroundPosition = '-241px -68px';
    }
}
