﻿function registerInterest() {
    var iFrameID = ('iFrame' + new Date().getTime());
    $.modal("<iframe id='" + iFrameID + "' frameborder='0' src='/StudentRegister.aspx' style='width: 449px; height: 481px;' />", {
        overlayCss: { backgroundColor: '#000' },
        containerCss: { height: 481, width: 449 },
        containerId: 'registerInterestForm'
    });
}

function instructorRegister() {
    var iFrameID = ('iFrame' + new Date().getTime());
    $.modal("<iframe id='" + iFrameID + "' frameborder='0' src='/Register.aspx' style='width: 449px; height: 580px;' />", {
        overlayCss: { backgroundColor: '#000' },
        containerCss: { height: 580, width: 449 },
        containerId: 'registerInterestForm'
    });
}

function requestCallBack() {
    var iFrameID = ('iFrame' + new Date().getTime());
    $.modal("<iframe id='" + iFrameID + "' frameborder='0' src='/CallBackRequest.aspx' style='width: 449px; height: 350px;' />", {
        overlayCss: { backgroundColor: '#000' },
        containerCss: { height: 350, width: 449 },
        containerId: 'registerInterestForm'
    });
}

function bookOnline() {
    var iFrameID = ('iFrame' + new Date().getTime());
    $.modal("<iframe id='" + iFrameID + "' frameborder='0' src='/bookOnline.aspx' style='width: 439px; height: 525px;' />", {
    overlayCss: { backgroundColor: '#000' },
    containerCss: { height: 525, width: 439 },
        containerId: 'registerInterestForm'
    });
}

function paramPriceCheck(postCode, isManual, isPassPluss) {
    var iFrameID = ('iFrame' + new Date().getTime());
    $.modal("<iframe id='" + iFrameID + "' allowtransparency='true' scrolling='no' frameborder='0' src='/NewPriceCheck.aspx?pc=" + postCode + "&im=" + isManual + "&ip=" + isPassPluss + "' style='width: 722px; height: 525px;' />", {
        overlayCss: { backgroundColor: '#222' },
        containerCss: { height: 500, width: 722 },
        containerId: 'priceResults'
    });
}

function priceCheck() {
    var iFrameID = ('iFrame' + new Date().getTime());
    $.modal("<iframe id='" + iFrameID + "' allowtransparency='true' scrolling='no' frameborder='0' src='/NewPriceCheck.aspx' style='width: 722px; height: 600px;' />", {
        overlayCss: { backgroundColor: '#222' },
        containerCss: { height: 600, width: 722 },
        containerId: 'priceResults'
    });
}

function GetRadioButtonValue(id) {
    var radio = document.getElementsByName(id);
    for (var j = 0; j < radio.length; j++) {
        if (radio[j].checked)
            return radio[j].value;
    }
}