﻿var map;

function initialize() {
    //document.title = "RSM Betty &amp; Dickson :: Home"
    //document.nameProp = "test"
  //  alert(document.aspnetForm.action);
    try {
        if (GBrowserIsCompatible()) {
            if (document.getElementById("map_canvas") != null) {
                map = new GMap2(document.getElementById("map_canvas"));
                map.setCenter(new GLatLng(-26.10522, 27.99017), 14);
                map.setUIToDefault();
                var newtext = "Executive City<br/>Corner Cross Str &amp; Charmaine Ave<br />President Ridge<br/>Randburg";
                map.openInfoWindowHtml(map.getCenter(), newtext);
            }
            if (document.getElementById("map_canvas1") != null) {
                map = new GMap2(document.getElementById("map_canvas1"));
                map.setCenter(new GLatLng(-33.962748, 18.47285), 16);
                map.setUIToDefault();
                var newtext = "15 Greenwich Grove<br/>Station Road<br/>Rondebosch";
                map.openInfoWindowHtml(map.getCenter(), newtext);
            }
            if (document.getElementById("map_canvas2") != null) {
                map = new GMap2(document.getElementById("map_canvas2"));
                map.setCenter(new GLatLng(-29.831104, 30.952799), 16);
                map.setUIToDefault();
                var newtext = "Block A Surrey Park <br/>6 Barham Road<br/>Westville";
                map.openInfoWindowHtml(map.getCenter(), newtext);
            }
            if (document.getElementById("map_canvas3") != null) {
                map = new GMap2(document.getElementById("map_canvas3"));
                map.setCenter(new GLatLng(-25.774306, 28.240206), 16);
                map.setUIToDefault();
                var newtext = "Suite 1<br/>267 Waterkloof Road<br/>Brooklyn";
                map.openInfoWindowHtml(map.getCenter(), newtext);
            }

        }
    }
    catch (e) {
        //Used to ignore if no internet connection
        var test = "";
    }

}

function doUnload() {
    try {
        GUnload();
    }
    catch (e) {
        //Used to ignore if no internet connection

        var test = "";
    }
}    

    function btnSearch_onclick() {
        var URL = 'Search.html';
        eval("GoogleSearch = window.open(URL, 'Search', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width=1000,height=700');");
    }

function showNBC() {
    var URL = 'http://www.cnbc.com/id/15840232?video=927606548&play=1';
    eval("pageNBCInterview = window.open(URL, 'Interview', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showRSMI() {
    var URL = 'http://www.rsmi.com';
    eval("RSMI = window.open(URL, 'RSMI', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showCons() {
    var URL = 'http://www.consolidated.co.za';
    eval("Consolidated = window.open(URL, 'Consolidated', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showProBeta() {
    var URL = 'http://www.probeta.co.za';
    eval("ProBeta = window.open(URL, 'ProBeta', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showSARS() {
    var URL = 'http://www.sars.gov.za';
    eval("SARS = window.open(URL, 'SARS', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showJSE() {
    var URL = 'http://www.jse.co.za';
    eval("JSE = window.open(URL, 'JSE', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showUJ() {
    var URL = 'http://www.uj.ac.za';
    eval("UJ = window.open(URL, 'UJ', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showUNISA() {
    var URL = 'http://www.unisa.ac.za';
    eval("UNISA = window.open(URL, 'UNISA', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showIRBA() {
    var URL = 'http://www.irba.co.za';
    eval("IRBA = window.open(URL, 'IRBA', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showUCT() {
    var URL = 'http://www.uct.ac.za';
    eval("UCT = window.open(URL, 'UCT', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showWITS() {
    var URL = 'http://www.wits.ac.za';
    eval("WITS = window.open(URL, 'WITS', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showFSB() {
    var URL = 'http://www.fsb.co.za';
    eval("FSB = window.open(URL, 'FSB', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showSACIA() {
    var URL = 'http://www.saica.co.za';
    eval("SAICA = window.open(URL, 'SAICA', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function showFIN() {
    var URL = 'http://www.treasury.gov.za';
    eval("FIN = window.open(URL, 'FIN', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}
function showDTI() {
    var URL = 'http://www.thedti.gov.za';
    eval("DTI = window.open(URL, 'DTI', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=700,height=700');");
}

function btnLabelCape_onclick() {
    map.setCenter(new GLatLng(-33.962748, 18.47285), map.getZoom());
    map.setUIToDefault();
    var newtext = "15 Greenwich Grove<br/>Station Road<br/>Rondebosch";
    map.openInfoWindowHtml(map.getCenter(), newtext);
}
function btnLabelDurban_onclick() {
    map.setCenter(new GLatLng(-29.831104, 30.952799), map.getZoom());
    map.setUIToDefault();
    var newtext = "Block A Surrey Park <br/>6 Barham Road<br/>Westville";
    map.openInfoWindowHtml(map.getCenter(), newtext);
}
function btnLabelJhb_onclick() {
    map.setCenter(new GLatLng(-26.10522, 27.99017), map.getZoom());
    map.setUIToDefault();
    var newtext = "Executive City<br/>Corner Cross Str &amp; Charmaine Ave<br />President Ridge<br/>Randburg";
    map.openInfoWindowHtml(map.getCenter(), newtext);
}
function btnLabelTshwane_onclick() {
    map.setCenter(new GLatLng(-25.774306, 28.240206), map.getZoom());
    map.setUIToDefault();
    var newtext = "Suite 1<br/>267 Waterkloof Road<br/>Brooklyn";
    map.openInfoWindowHtml(map.getCenter(), newtext);
}

function displaymsg() {
    alert("Thank you for your application! Please note your email has been sent. You will also need to submit your required documents so please check your personal email account.");
}


