﻿function MenuOver(obj) {
    obj.style.backgroundPosition = '0px -38px';
}
function MenuOut(obj) {
    obj.style.backgroundPosition = '0px 0px';
}

function LightMenuOver(obj) {
    obj.style.backgroundPosition = '0px -45px';
}

function LightMenuOut(obj) {
    obj.style.backgroundPosition = '0px -2px';
}

function show(obj) {
    document.getElementById(obj).style.display = "";
}
function inline(obj) {
    document.getElementById(obj).style.display = "inline-table";
}
function hide(obj) {
    document.getElementById(obj).style.display = "none";
}

///////////////////////////ORDET FORM//////////////////////////////
var Result = 0;

function Step_Type(SLC) {
    if (SLC == "1")
        show('tr_Host');
    else
        hide('tr_Host');
}

function Step_Host(SLC) {
     if (SLC == "2") {
       show('tr_Data');
       show('SetHost');
       hide('tr_HostDetail');
    }
    if (SLC == "1") {
        show('tr_HostDetail');
        hide('SetHost');
     }
        if (SLC == "3") {
            hide('tr_Data');
            hide('tr_HostDetail');
        }
    }

function Step_Domain(SLC) {
        if (SLC == "2") {
            show('tr_Data');
            show('SetDomain');
            hide('SetYourDomain');
        }
        if (SLC == "1") {
            show('tr_Data');
            show('SetYourDomain');
            hide('SetDomain');
        }

        if (SLC == "3") {
            hide('tr_Data');
            hide('tr_HostDetail');
        }

    }
    function HostType(SLC) {
        if (SLC == 1) {
            show("SqlVersionWin");
            hide("SqlVersionLin");
            Result = 0;
        }
        if (SLC == 2) {
            alert('کاربر محترم؛ به دلیل ساختار سایت های رایگان؛ این سایتها در هاستهای لینوکسی ارائه نمی شوند.');
            show("SqlVersionLin");
            hide("SqlVersionWin");
            Result = Result + 1;
        }

    }
    function SqlVer(SLC) {
        if (SLC == 1) {
            alert('این ورژن از پایگاه داده برای پورتال طراحی سایت رایگان مجاز نمی باشد');
            Result = Result + 1;
        }
        else
            Result = 0;

        MyValidation()
    }

    function MyValidation() {
        if (Result == 0)
            show("tr_Submit");
    }
////////////////////////ORDER FORM//////////////////////////
