﻿var basehref = 'http://www.muis.nl';

var ie9 = navigator.userAgent.match(/MSIE 9.0/i) != null;
var isipad = navigator.userAgent.match(/iPad/i) != null;
var isiphone = navigator.userAgent.match(/iPhone/i) != null;
if (isiphone) { isipad = true; }
var isfirefox = navigator.userAgent.match(/Firefox/i) != null;

function terugnaarhomepage() 
{
    location.href = basehref;
}

function terugnaarcontact()
{
    location.href = 'http://www.muis.nl/contact/';
}

function supports_video() { return !!document.createElement('video').canPlayType; }

function supports_h264_baseline_video()
{
  if (!supports_video()) { return false; }
  var v = document.createElement("video");
  return v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');
}

function html(obj_id) { return document.getElementById(obj_id); }

function ShowYouTube(srt, returnhtml, w, h)
{
    if (srt == undefined) { srt = 'imuisonline'; }
    if (returnhtml == undefined) { returnhtml = false; }
    if (w == undefined) { w = 0; }
    if (h == undefined) { h = 0; }

    var filmcode = '';
    var htmlbox = '';
    
    var streamyoutube = true;
    // alert(supports_h264_baseline_video());
    
    var _isipad = isipad;
	switch(srt)
	{
	case 'accountants stellen top eisen aan software':
		_isipad = false;
		break;
	}
	
    if (_isipad)
	{
		streamyoutube = false;
	}
    if (isfirefox) { streamyoutube = true; }
    
    switch(streamyoutube)
    {
    case true:
        filmcode = 'IEuB8k1kcYU';
        switch(srt)
        {
        case 'deboekhoudkoppeling':
            filmcode = 'VkwIfD-BT3g';
            break;
		 case 'accountants stellen top eisen aan software':
            filmcode = 'Un5y5XQUi3o';
            break;
        case 'bedrijfsprofiel':
            filmcode = 'J0n_CwGyM-Q';
            break;
		case 'bedrijfsprofiel_sept2011':
			filmcode = 'eBaNUAoitb0';
			            break;
		case 'onlinefinancieel':
			filmcode = 'IEuB8k1kcYU';
			            break;
		case 'BTWaangifte1':
			filmcode = '-f-sdOnjOcU';
        }
        
        var youtubeurl = 'http://www.youtube.com/v/' + filmcode;

        if (_isipad)
        {
            if (!returnhtml)
            {
                w = 800;
                h = 450;
            }
            
            var urlprefix = 'http://www.youtube.com/watch?v=';
            
            htmlbox += '<video width="' + w + '" height="' + h + '" src="' + urlprefix + filmcode + '" autobuffer autoplay controls="controls"></video>';
            // alert(htmlbox);
            if (returnhtml) { return htmlbox; }
            LaadDiv('d_youtube', null, null, w, h + 30, null, 'MUIS Software', htmlbox);
        }
        else
        {
            if (!returnhtml)
            {
                w = 1280;
                h = 750;
            }
            if (w > $(document).width()) { w = $(document).width() - 20; }
            if ((h + 30) > $(document).height()) { h = $(document).height() - 50; }
            
            htmlbox += '<object width="' + w + '" height="' + h + '"><param name="movie" value="' + youtubeurl + '?version=3&autohide=1&showinfo=0"></param><param name="allowScriptAccess" value="always"></param><embed src="' + youtubeurl + '?version=3&autohide=1&showinfo=0" type="application/x-shockwave-flash" allowscriptaccess="always" width="' + w + '" height="' + h + '"></embed></object>';
            if (returnhtml) { return htmlbox; }
            LaadDiv('d_youtube', null, null, w, h + 30, null, 'MUIS Software', htmlbox);
        }
    
        break;
    default:
        var urlprefix = 'http://website.imuisonline.com/media';
        filmcode = 'iMUIS Online internetboekhouden.mp4';
        switch(srt)
        {
        case 'bedrijfsprofiel':
            filmcode = 'MUISin2GetBusiness.mp4';
            break;
        case 'bedrijfsprofiel_sept2011':
            filmcode = 'MUISin2GetBusiness_sept2011.mp4';
            break;
        case 'deboekhoudkoppeling':
            filmcode = 'Deboekhoudkoppeling.mp4';
            break;
        }
        
        if (_isipad)
        {
            if (!returnhtml)
            {
                w = 800;
                h = 450;
            }
            
            htmlbox += '<video width="' + w + '" height="' + h + '" src="' + urlprefix + '/' + filmcode + '" autobuffer autoplay controls="controls"></video>';
            if (returnhtml) { return htmlbox; }
            LaadDiv('d_html5', null, null, w, h + 30, null, 'MUIS Software', htmlbox);
        }
        else
        {
            if (!returnhtml)
            {
                w = 1280;
                h = 750;
            }
            if (w > $(document).width()) { w = $(document).width() - 20; }
            if ((h + 30) > $(document).height()) { h = $(document).height() - 50; }
            htmlbox += '<iframe title="" width="' + w + '" height="' + h + '" src="' + urlprefix + '/' + filmcode + '" frameborder="0"></iframe>';
            if (returnhtml) { return htmlbox; }
            LaadDiv('d_youtube', null, null, w, h + 30, null, 'MUIS Software', htmlbox);
        }
        break;
    }
}

function ShowLoginBox()
{
    var loginboxhtml = '<center>';
    
    loginboxhtml += '<table width=100% cellspacing=0 cellpadding=0 border=0>';
    loginboxhtml += '<tr>';
    loginboxhtml += '<td align=center valign=bottom onclick="ShowLoginBijAcc(); return false;" style="cursor: pointer;">';
    loginboxhtml += '<img src="' + basehref + '/images/landkaart_nl.gif" height=120 border=0><br><br>';
    loginboxhtml += '<div style="background-image: url(\'' + basehref + '/images/btn_blue_300x60.gif\'); background-repeat: no-repeat; width: 300px; height: 60px; text-decoration: none; overflow: hidden; padding-top: 20px; cursor: pointer; color: #FFFFFF; font-weight: bold; font-size: 12px;">';
    loginboxhtml += 'Ik wil inloggen bij mijn accountant';
    loginboxhtml += '</div>';
    loginboxhtml += '</td>';
    loginboxhtml += '<td align=center valign=bottom style="cursor: pointer; border-left: solid 1px #C0C0C0;">';
    loginboxhtml += '<a href="http://imuisonline.com" target=_new>';
    loginboxhtml += '<table width=300 cellspacing=0 cellpadding=0 border=0>';
    loginboxhtml += '<tr>';
    loginboxhtml += '<td align=center valign=bottom>';
    loginboxhtml += '<img src="' + basehref + '/images/muislogo_180x93.jpg" width=180 height=93 border=0>';
    loginboxhtml += '</td>';
    loginboxhtml += '<td align=center valign=bottom>';
    loginboxhtml += '<img width="94" height="54" border="0" src="//images.scanalert.com/meter/www.muis.nl/13.gif?lang=NL" alt="HACKER SAFE gecertificeerde sites voorkomen meer dan 99,9% van het misbruik door hackers." alt="Afbeelding">';
    loginboxhtml += '</td>';
    loginboxhtml += '</tr>';
    loginboxhtml += '</table>';
    loginboxhtml += '<br><br>';
    loginboxhtml += '<div style="background-image: url(\'' + basehref + '/images/btn_blue_300x60.gif\'); background-repeat: no-repeat; width: 300px; height: 60px; text-decoration: none; overflow: hidden; padding-top: 20px; cursor: pointer; color: #FFFFFF; font-weight: bold; font-size: 12px;">';
    loginboxhtml += 'Ik wil inloggen bij MUIS Software</div>';
    loginboxhtml + '</div>';
    loginboxhtml += '</td>';
    loginboxhtml += '</tr>';
    loginboxhtml += '</table>';
    
    loginboxhtml += '</center>';

    // btn_green_300x60.gif
    LaadDiv('d_loginbox', null, null, 820, 280, null, '<div class="left">Login voor geabonneerde klanten</div> / <a href="' + basehref + '/demo/index.html" target=_new><font style="font-size: 10pt; color: #FFFFFF;">Klik hier voor een gratis demo</font></a></div>', loginboxhtml);
    // <div id="d_loginbox" style="width: 400px; height: 300px; background-color: #C0C0C0; display: none;">loginbox</div>
    
    return false;
}

function ShowDemoBox(profiel)
{
	location.href = '/demo';
	return false;
	
	if (profiel == undefined) { profiel = 'MKB'; }
	
    var loginboxhtml = '<center>';
    
    loginboxhtml += '<table width=100% cellspacing=0 cellpadding=0 border=0>';
    loginboxhtml += '<tr>';
    loginboxhtml += '<td align=center valign=bottom>';
	loginboxhtml += '<table style="width: 300px; cellspacing: 4px;">';
	loginboxhtml += '<form method="post" name="form_demo" style="margin: 0px; padding: 0px;">';
	loginboxhtml += '<tr><td style="width: 120px; font-weight: bold; text-align: right;" class="formtext">Mijn naam:</td><td><input type=text name="NAAM1" size=20 maxlength=40 style="width: 180px;" onfocus="veldfocus(this);" onblur="veldfocusout(this);"></td></tr>';
	loginboxhtml += '<tr><td style="width: 120px; font-weight: bold; text-align: right;" class="formtext">E-mailadres:</td><td><input type=text name="EMAIL" size=20 maxlength=100 style="width: 180px;" onfocus="veldfocus(this);" onblur="veldfocusout(this);"></td></tr>';
	loginboxhtml += '<tr><td style="width: 120px; font-weight: bold; text-align: right;" class="formtext">Mobiel nummer:</td><td><input type=text name="MOBIEL" size=20 maxlength=20 style="width: 180px;" onfocus="veldfocus(this);" onblur="veldfocusout(this);"></td></tr>';
	loginboxhtml += '<tr><td style="width: 120px; font-weight: bold; text-align: right;" class="formtext">Soort demo:</td><td>';
	loginboxhtml += '<select name="PROFIEL" style="width: 180px;">';
	loginboxhtml += '<option value="MKB" ';
	if (profiel == 'MKB') { loginboxhtml += ' selected '; }
	loginboxhtml += '>MKB</option>';
	loginboxhtml += '<option value="IMUISONLINE" ';
	if (profiel == 'IMUISONLINE') { loginboxhtml += ' selected '; }
	loginboxhtml += '>iMUIS Online</option>';
	loginboxhtml += '<option value="ACC" ';
	if (profiel == 'ACC') { loginboxhtml += ' selected '; }
	loginboxhtml += '>Accountancy</option>';
	loginboxhtml += '</select>';
	loginboxhtml += '</form>';
	loginboxhtml += '</td></tr>';
	loginboxhtml += '</table>';
	
    loginboxhtml += '<div onclick="MaakDemoLogin(document.form_demo.NAAM1.value, document.form_demo.EMAIL.value, document.form_demo.MOBIEL.value, document.form_demo.PROFIEL.value);" style="background-image: url(\'' + basehref + '/images/btn_blue_300x60.gif\'); background-repeat: no-repeat; width: 300px; height: 60px; text-decoration: none; overflow: hidden; padding-top: 20px; cursor: pointer; color: #FFFFFF; font-weight: bold; font-size: 12px;">';
    loginboxhtml += 'Inloggen op mijn demo-omgeving';
    loginboxhtml += '</div>';
    loginboxhtml += '</td>';
    loginboxhtml += '</tr>';
    loginboxhtml += '</table>';
    
    loginboxhtml += '</center>';

    // btn_green_300x60.gif
    LaadDiv('d_loginbox', null, null, 340, 200, null, '<div class="left">Aanmelden voor een demo</div>', loginboxhtml);
    // <div id="d_loginbox" style="width: 400px; height: 300px; background-color: #C0C0C0; display: none;">loginbox</div>
    
    return false;
}

function MaakDemoLogin(naam1, email, mobiel, profiel)
{
	if (naam1 == '') { alert('Vul aub uw naam in.'); return false; }
	if (email == '') { alert('Vul aub uw e-mailadres in.'); return false; }
	if (mobiel == '') { alert('Vul aub uw mobiele nummer in.'); return false; }
	if (profiel == undefined) { profiel = 'MKB'; }
	if (profiel == '') { profiel = 'MKB'; }
	
	// alert(naam1);
	
	return false;	
}

function ShowBrochures(profiel)
{
    var loginboxhtml = '<center>';

    switch(profiel)
    {
    case 'business':
        loginboxhtml += '<table width=100% cellspacing=5 cellpadding=5 border=0>';
        loginboxhtml += '<tr>';
        loginboxhtml += '<td align=center>';
        loginboxhtml += '<b><font style="font-size: 10pt;">Handel en Logistiek</font></b><br><br>';
        if (!isipad)
        { loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-handel-logistiek?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new">'; }
        else
        { loginboxhtml += '<a href="/documents/brochures/iMUIS-handel-logistiek.pdf" target="_new">'; }
        loginboxhtml += '<img src="' + basehref + '/images/Brochure_iMUIS_Handel_logistiek.jpg" width=75 height=105 border=0></a>';
        loginboxhtml += '<br>';
        if (!isipad)
        {
            loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-handel-logistiek?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><font style="font-size: 10pt; color: #000000;">Bekijken</font></a>';
            loginboxhtml += '<br>';
        }
        loginboxhtml += '<a href="/documents/brochures/iMUIS-handel-logistiek.pdf" target="_new"><font style="font-size: 10pt; color: #000000;">Downloaden</font></a>';
        loginboxhtml += '</td>';

        loginboxhtml += '<td align=center>';
        loginboxhtml += '<b><font style="font-size: 10pt;">MKB</font></b><br><br>';
        if (!isipad)
        { loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-voor-het-mkb?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><img src="' + basehref + '/images/Brochure_iMUIS_MKB.jpg" width=75 height=105 border=0></a>'; }
        else
        { loginboxhtml += '<a href="/documents/brochures/iMUIS-voor-het-MKB.pdf" target="_new"><img src="' + basehref + '/images/Brochure_iMUIS_MKB.jpg" width=75 height=105 border=0></a>'; }
        loginboxhtml += '<br>';
        if (!isipad)
        {
            loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-voor-het-mkb?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><font style="font-size: 10pt; color: #000000;">Bekijken</font></a>';
            loginboxhtml += '<br>';
        }
        loginboxhtml += '<a href="/documents/brochures/iMUIS-voor-het-MKB.pdf" target="_new"><font style="font-size: 10pt; color: #000000;">Downloaden</font></a>';
        loginboxhtml += '</td>';
        
        loginboxhtml += '<td align=center>';
        loginboxhtml += '<b><font style="font-size: 10pt;">Financiële administratie</font></b><br><br>';
        if (!isipad)
        { loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-financiele-administratie?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new">'; }
        else
        { loginboxhtml += '<a href="/documents/brochures/iMUIS-financiele-administratie.pdf" target="_new">'; }
        loginboxhtml += '<img src="' + basehref + '/images/Brochure_iMUIS_Financiele_administratie.jpg" width=75 height=105 border=0></a><br>';
        if (!isipad)
        {
            loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-financiele-administratie?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><font style="font-size: 10pt; color: #000000;">Bekijken</font></a>';
            loginboxhtml += '<br>';
        }
        loginboxhtml += '<a href="/documents/brochures/iMUIS-financiele-administratie.pdf" target="_new"><font style="font-size: 10pt; color: #000000;">Downloaden</font></a>';
        loginboxhtml += '</td>';        
        
        loginboxhtml += '</tr>';

        loginboxhtml += '</table>';
        loginboxhtml += '</center>';
        LaadDiv('d_loginbox', null, null, 700, 220, null, 'iMUIS Business Software', loginboxhtml);
        break;
    case 'imuisonline':
        loginboxhtml += '<table width=100% cellspacing=0 cellpadding=0 border=0>';
        loginboxhtml += '<tr>';
               loginboxhtml += '<td align=center>';
        loginboxhtml += '<b><font style="font-size: 10pt;">Internetboekhouden</font></b><br><br>';
        if (!isipad)
        { loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-online-voor-ondernemers?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new">'; }
        else
        { loginboxhtml += '<a href="/documents/brochures/imuis-online-voor-ondernemers.pdf" target="_new">'; }
        loginboxhtml += '<img src="' + basehref + '/images/Brochure_iMUIS_Online.jpg" width=75 height=105 border=0></a>';
        loginboxhtml += '<br>';
        if (!isipad)
        {
            loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-online-voor-ondernemers?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><font style="font-size: 10pt; color: #000000;">Bekijken</font></a>';
            loginboxhtml += '<br>';
        }
        loginboxhtml += '<a href="/documents/brochures/imuis-online-voor-ondernemers.pdf" target="_new"><font style="font-size: 10pt; color: #000000;">Downloaden</font></a>';
        loginboxhtml += '</td>';
        loginboxhtml += '</tr>';
        loginboxhtml += '</table>';
        loginboxhtml += '</center>';
        LaadDiv('d_loginbox', null, null, 300, 220, null, 'Brochure iMUIS Online', loginboxhtml);
        break;
    case 'accountancy':
        loginboxhtml += '<table width=100% cellspacing=5 cellpadding=5 border=0>';
        loginboxhtml += '<tr>';
        loginboxhtml += '<td align=center>';
        loginboxhtml += '<b><font style="font-size: 10pt;">Accountancy</font></b><br><br>';
        if (!isipad)
        { loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-accountancy?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new">'; }
        else
        { loginboxhtml += '<a href="/documents/brochures/iMUIS-accountancy.pdf" target="_new">'; }
        loginboxhtml += '<img src="' + basehref + '/images/Brochure_iMUIS_Accountancy.jpg" width=75 height=105 border=0></a>';
        loginboxhtml += '<br>';
        if (!isipad)
        {
            loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-accountancy?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><font style="font-size: 10pt; color: #000000;">Bekijken</font></a>';
            loginboxhtml += '<br>';
        }
        loginboxhtml += '<a href="/documents/brochures/iMUIS-accountancy.pdf" target="_new"><font style="font-size: 10pt; color: #000000;">Downloaden</font></a>';
        loginboxhtml += '</td>';

        loginboxhtml += '<td align=center>';
        loginboxhtml += '<b><font style="font-size: 10pt;">Internetboekhouden</font></b><br><br>';
        if (!isipad)
        { loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-online-voor-ondernemers?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new">'; }
        else
        { loginboxhtml += '<a href="/documents/brochures/imuis-online-voor-ondernemers.pdf" target="_new">'; }
        loginboxhtml += '<img src="' + basehref + '/images/Brochure_iMUIS_Online.jpg" width=75 height=105 border=0></a>';
        loginboxhtml += '<br>';
        if (!isipad)
        {
            loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-online-voor-ondernemers?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><font style="font-size: 10pt; color: #000000;">Bekijken</font></a>';
            loginboxhtml += '<br>';
        }
        loginboxhtml += '<a href="/documents/brochures/imuis-online-voor-ondernemers.pdf" target="_new"><font style="font-size: 10pt; color: #000000;">Downloaden</font></a>';
        loginboxhtml += '</td>';
        
        loginboxhtml += '</tr>';

        loginboxhtml += '</table>';
        loginboxhtml += '</center>';
        LaadDiv('d_loginbox', null, null, 500, 220, null, 'Accountancy', loginboxhtml);
        break;
    default:
        loginboxhtml += '<table width=100% cellspacing=5 cellpadding=5 border=0>';
        loginboxhtml += '<tr>';
        loginboxhtml += '<td align=center width=25%>';
        loginboxhtml += '<b><font style="font-size: 10pt;">Internetboekhouden</font></b><br><br>';
        if (!isipad)
        { loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-online-voor-ondernemers?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new">'; }
        else
        { loginboxhtml += '<a href="/documents/brochures/imuis-online-voor-ondernemers.pdf" target="_new">'; }
        loginboxhtml += '<img src="' + basehref + '/images/Brochure_iMUIS_Online.jpg" width=75 height=105 border=0></a>';
        loginboxhtml += '<br>';
        if (!isipad)
        {
            loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-online-voor-ondernemers?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><font style="font-size: 10pt; color: #000000;">Bekijken</font></a>';
            loginboxhtml += '<br>';
        }
        loginboxhtml += '<a href="/documents/brochures/imuis-online-voor-ondernemers.pdf" target="_new"><font style="font-size: 10pt; color: #000000;">Downloaden</font></a>';
        loginboxhtml += '</td>';    
        loginboxhtml += '<td align=center width=25%>';
        loginboxhtml += '<b><font style="font-size: 10pt;">Handel en Logistiek</font></b><br><br>';
        if (!isipad)
        { loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-handel-logistiek?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new">'; }
        else
        { loginboxhtml += '<a href="/documents/brochures/iMUIS-handel-logistiek.pdf" target="_new">'; }
        loginboxhtml += '<img src="' + basehref + '/images/Brochure_iMUIS_Handel_logistiek.jpg" width=75 height=105 border=0></a>';
        loginboxhtml += '<br>';
        if (!isipad)
        {
            loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-handel-logistiek?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><font style="font-size: 10pt; color: #000000;">Bekijken</font></a>';
            loginboxhtml += '<br>';
        }
        loginboxhtml += '<a href="/documents/brochures/iMUIS-handel-logistiek.pdf" target="_new"><font style="font-size: 10pt; color: #000000;">Downloaden</font></a>';
        loginboxhtml += '</td>';

        loginboxhtml += '<td align=center width=25%>';
        loginboxhtml += '<b><font style="font-size: 10pt;">MKB</font></b><br><br>';
        if (!isipad)
        { loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-voor-het-mkb?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><img src="' + basehref + '/images/Brochure_iMUIS_MKB.jpg" width=75 height=105 border=0></a>'; }
        else
        { loginboxhtml += '<a href="/documents/brochures/iMUIS-voor-het-MKB.pdf" target="_new"><img src="' + basehref + '/images/Brochure_iMUIS_MKB.jpg" width=75 height=105 border=0></a>'; }
        loginboxhtml += '<br>';
        if (!isipad)
        {
            loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-voor-het-mkb?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><font style="font-size: 10pt; color: #000000;">Bekijken</font></a>';
            loginboxhtml += '<br>';
        }
        loginboxhtml += '<a href="/documents/brochures/iMUIS-voor-het-MKB.pdf" target="_new"><font style="font-size: 10pt; color: #000000;">Downloaden</font></a>';
        loginboxhtml += '</td>';
        
        loginboxhtml += '<td align=center width=25%>';
        loginboxhtml += '<b><font style="font-size: 10pt;">Accountancy</font></b><br><br>';
        if (!isipad)
        { loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-accountancy?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new">'; }
        else
        { loginboxhtml += '<a href="/documents/brochures/iMUIS-accountancy.pdf" target="_new">'; }
        loginboxhtml += '<img src="' + basehref + '/images/Brochure_iMUIS_Accountancy.jpg" width=75 height=105 border=0></a>';
        loginboxhtml += '<br>';
        if (!isipad)
        {
            loginboxhtml += '<a href="http://issuu.com/muissoftware/docs/imuis-accountancy?mode=embed&layout=http%3A%2F%2Fskin.issuu.com%2Fv%2Fdark%2Flayout.xml&showFlipBtn=true" target="_new"><font style="font-size: 10pt; color: #000000;">Bekijken</font></a>';
            loginboxhtml += '<br>';
        }
        loginboxhtml += '<a href="/documents/brochures/iMUIS-accountancy.pdf" target="_new"><font style="font-size: 10pt; color: #000000;">Downloaden</font></a>';
        loginboxhtml += '</td>';

        loginboxhtml += '</tr>';

        loginboxhtml += '</table>';
        loginboxhtml += '</center>';
        LaadDiv('d_loginbox', null, null, 900, 220, null, 'Brochures', loginboxhtml);
    }    
    
    return false;
}

function ShowLoginBijAcc()
{
    var loginboxhtml = '<center>';
    
    loginboxhtml += '<font style="font-size: 12px;">U logt in op iMUIS en iMUIS Online via de WEBSITE van uw accountant.<br></font>';
    loginboxhtml += '<br>';
    loginboxhtml += '<a href="http://server8.muis.nl/gmaps/" target=_new><div style="background-image: url(\'' + basehref + '/images/btn_blue_300x24.gif\'); background-repeat: no-repeat; width: 300px; height: 24px; text-decoration: none; overflow: hidden; padding-top: 5px; cursor: pointer; color: #FFFFFF; font-weight: bold; font-size: 12px;">Ik zoek een accountant bij mij in de buurt</div></a>';
    loginboxhtml += '</center>';

    LaadDiv('d_loginbox', null, null, 450, 150, null, 'Inloggen bij mijn accountant', loginboxhtml);
    
    return false;
}

function BrowserType()
{
    if ($.browser.msie)
    { return 'MSIE'; }
    else
    { return 'FIREFOX'; }
}

function GetWindowSize()
{
    var winWidth;
    var winHeight;
    var d=document;

    switch(BrowserType())
    {
    case 'MSIE':
        winWidth = d.documentElement.clientWidth;
        winHeight = d.documentElement.clientHeight;
        
        if (((winWidth * 1) == 0) || ((winHeight * 1) == 0))
        {
            winWidth = d.body.clientWidth;
            winHeight = d.body.clientHeight;
        }
        break;
    default:
        winWidth = window.innerWidth;
        winHeight = window.innerHeight;
    }
    return (winWidth + ';' + winHeight).split(';');
}

function LaadDiv(d_id, x, y, w, h, url, titel, htmlbody)
{
    if (x == null) { x = parseInt(((GetWindowSize()[0] - w) / 2)); }
    if (y == null) { y = parseInt(((GetWindowSize()[1] - h) / 2)); }

    var zindex = 10000;
    var overflowX = 'auto';
    var overflowY = 'auto';
    var grijzeachtergrond = true;
    
    var d = html(d_id);
    if (d == null)
    {
        if (grijzeachtergrond)
        {
            if (html('d_grijs_' + d_id) == null)
            {
                var d_grijs = top.document.createElement('DIV');
                d_grijs.id = 'd_grijs_' + d_id;
                d_grijs.style.position='absolute';
                d_grijs.style.width = '100%';
                d_grijs.style.height = '100%';
                d_grijs.style.left = 0;
                d_grijs.style.top = 0;
                d_grijs.style.zIndex = zindex;
                d_grijs.style.backgroundColor = '#999999';
                
                switch(BrowserType()) 
                {
                    case 'MSIE':
                        d_grijs.style.filter = 'alpha(opacity=70)';
                        break;
                    default:
                        d_grijs.style.opacity = '0.70';
                }
                top.document.body.appendChild(d_grijs);
            }
            else
            { html('d_grijs_' + d_id).style.display = ''; }
        }
        
        d = parent.document.createElement('DIV');
        d.id = d_id;
        d.style.position = 'absolute';
        d.style.border = 'solid 1px #000000';
        d.style.backgroundColor = '#FFFFFF';
        d.style.overflowX = 'hidden';
        d.style.overflowY = 'hidden';
        if (grijzeachtergrond)
        {
            d.style.zIndex = parseInt(zindex) + 1;
        }
        else
        {
            d.style.zIndex = zindex;
        }
        document.body.appendChild(d);
    }
    else
    {
        if (html('d_grijs_' + d_id) != null)
        {
            html('d_grijs_' + d_id).style.zIndex = zindex;
        }
        d.style.zIndex = zindex;
    }
    
    d.style.width = w;
    d.style.height = h;
    d.style.left = x;
    d.style.top = y;

    var k_titelbalk_background = '#999999';
    var k_titelbalk_color = '#FFFFFF';
    
    var str = '';
    str += '<table width="100%" height="100%" cellspacing=0 cellpadding=0>';
    str += '<col width=100%>';

    var waarde = '';
    if (url == undefined) { url = ''; }
    if (url != '')
    {
        var Resp = PostRequest(url, null);
        waarde = Resp;
    }
    else
    { waarde = htmlbody; }

    str += '<tr height=30 style="background-color: ' + k_titelbalk_background + '; color: ' + k_titelbalk_color + '; font-weight: bold;"><td class="menubar" style="padding: 5px; border-bottom: solid 1px #000000; width: 100%;">';
    
    str += '<table width=100% cellspacing=0 cellpadding=0><col width=*><col width=125 align=right>';
    
    str += '<tr><td id="' + d_id + '_divtitel" style="font-size: 12px; color: ' + k_titelbalk_color + ';"><b>' + titel + '</b>';
    str += '</td>';
    str += '<td align=right>';
    str += '<input id="knop_sluiten_' + d_id + '" type=button value="Sluiten" style="background: url(' + basehref + '/images/btn_black_65x22.gif); background-repeat: no-repeat; width: 65px; color: #FFFFFF; border: none; height: 22px; margin: 0px; padding: 0px; margin-bottom: 1px;" onclick="';
    if (grijzeachtergrond)
    {
        str += 'if (window.DisableGreyBackground != null) { DisableGreyBackground(); } ';
        if (html('d_grijs_' + d_id) != null) { str += ' if (html(\'d_grijs_' + d_id + '\') != null) { html(\'d_grijs_' + d_id + '\').style.display = \'none\'; } '; }
    }
    str += ' if (html(\'' + d_id + '\') != null) { $(html(\'' + d_id + '\')).fadeOut(\'slow\'); }';
    str += 'd_' + d_id + '_content.innerHTML = \'&nbsp;\';';
    str += '">';
    str += '</td></tr></table>';
    str += '</td></tr>';
    str += '<tr height=*><td>';
    str += '<div id="d_' + d_id + '_content" style="text-align: center; width: ' + (w) + 'px; height: ' + (h - 30) + 'px; overflow-x: ' + overflowX + '; overflow-y: ' + overflowY + '; padding: 0px; background-color: #FFFFFF;">';
    str += waarde;
    str += '</div>';
    str += '</td></tr>';
    str += '</table>';    

    d.innerHTML = str;
    if (grijzeachtergrond) { html('d_grijs_' + d_id).style.display = ''; }
    
    d.style.display = 'none';
    
    $('#' + d_id).css('left', x);
    $('#' + d_id).css('top', y);
    
    $('#' + d_id).fadeIn('slow');
    
    return d;
}

function center(d)
{
    $(d).css({ position: 'absolute', top: '50%', 'margin-top': (0) - ($(d).height() / 2), left: '50%', 'margin-left': (0) - ($(d).width() / 2) });
}

$(document).ready(function()
{
    var menuhtml = '<div class="right"><ul><li class="first"><a href="' + basehref + '/overmuis/contact.html">Contact</a></li><li class="last"><a href="' + basehref + '/overmuis/nieuwsbrief.html">Nieuwsbrief</a></li></ul><div class="clear"></div></div><div class="left"><ul><li class="first"><a href="' + basehref + '/index.html">Home</a></li><li><a href="' + basehref + '/overmuis/index.html">Over MUIS</a></li><li><a href="' + basehref + '/producten/index.html">Producten</a></li><li><a href="' + basehref + '/services/index.html">Services</a></li><li class="last"><a href="' + basehref + '/demo/index.html">Demo & webinars</a></li></ul><div class="clear"></div></div><div class="clear"></div>';
    if (document.getElementById('nav_prim_inner') != null) { document.getElementById('nav_prim_inner').innerHTML = menuhtml; }
    
    var huidigjaar = '';
    try
    {
        var currenttime = new Date();
        huidigjaar = currenttime.getFullYear();
    }
    catch(e) { }
    var footerhtml = '<div class="paginabreed" style="margin-top: 10px; border-top: solid 1px #c0c0c0; height: 1px; margin-left: 20px; margin-right: 20px;"> </div><div id="con_footer"><div id="con_footer_inner"><div class="left grijs">© ' + huidigjaar + ' MUIS Software B.V. Rijksstraatweg 41, 1969 LB Heemskerk, T: 0251 241641  E: <a href="mailto:info@muis.nl"><font style="text-decoration: none; font-weight: normal;">info@muis.nl</font></a></div><div class="right"><ul><li><a href="./overmuis/socialmedia.html"><img src="' + basehref + '/images/social media/twitter.png" /></a></li><li><a href="http://www.youtube.com/muissoftware"><img src="' + basehref + '/images/social media/youtube.png" /></a></li><li><a href="' + basehref + '"><font class="grijs">Home</font></a></li><li><a href="' + basehref + '/documents/algemene-voorwaarden.pdf" target=_new><font class="grijs">Algemene voorwaarden</font></a></li><li class="last"><a href="' + basehref + '/overmuis/disclaimer.html"><font class="grijs">Disclaimer</font></a></li></ul></div><div class="clear"></div></div></div>';
    if (document.getElementById('d_footer') != null) { document.getElementById('d_footer').innerHTML = footerhtml; }
    
    var headerhtml = '<div class="left"><a href="' + basehref + '"><img src="' + basehref + '/images/logo_MUIS_klein.jpg" alt="MUIS Software" /></a></div><div class="right"><div style="padding-top: 20px; padding-left: 375px;"><a href="" target="_blank" onclick="ShowLoginBox(); return false;"><img src="' + basehref + '/images/btn_login_0.gif" alt="Login" /></a></div><a href="/overmuis/bdo-certificering.html"><img src="' + basehref + '/images/Top-of-the_Line.jpg" alt="MUIS Software" style="padding: 10px 20px 0px 0px;" border=0 /></a></div>';
    
    if (window.app != null)
    {
    	switch(app)
	{
	case 'demo':
		headerhtml = '<div class="left"><a href="' + basehref + '"><img src="' + basehref + '/images/logo_MUIS_klein.jpg" alt="MUIS Software" /></a></div><div class="right" style="padding-top: 55px; padding-right: 35px;"><a href="/overmuis/bdo-certificering.html"><img src="' + basehref + '/images/Top-of-the_Line.jpg" alt="MUIS Software" style="padding: 10px 20px 0px 0px;" border=0 /></a></div>';
		break;
	}
    }
    if (document.getElementById('con_header') != null) { document.getElementById('con_header').innerHTML = headerhtml; }
    
    if (isipad) { $('body').css('background', 'none'); }
    
    ReloadSizing();
    
    if (document.getElementById('contactblock') != null)
    {
        document.getElementById('contactblock').innerHTML = ' ';
        document.getElementById('contactblock').style.display = 'none';
    }
    // $('#contactblock').css('position', 'absolute');
    // $('#contactblock').css('top', '400');

    if (isipad)
    {
        window.onorientationchange = function() { location.href = location.href; }
        // ReloadSizing(); 
    }

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-8420097-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
}
);

function ReloadSizing()
{
    if (document.getElementById('d_middenkader') != null)
    {
        // $("#d_middenkader").hide();
        $('#d_middenkader').css('height', parseInt($(document).height()) - 280);
        // $('#d_middenkader').css('height', parseInt($(document).height()) - 288);
        // $("#d_middenkader").slideDown('slow');
	    // $("#d_middenkader").css('visibility', 'inherit');
	    // $("#d_middenkader").css('display', 'none');
        // alert(parseInt($(document).height()) - 280);
        if (!ie9)
        {
            $('.scroll-pane').jScrollPane('showArrows=true');
        }
	else
	{
		$("#d_middenkader").css('overflow-y', 'auto');
	}
    }
    
    if (document.getElementById('d_middenkader_mijnimuis') != null)
    {
        // $("#d_middenkader").hide();
        $('#d_middenkader_mijnimuis').css('height', parseInt($(document).height()) - 190);
        // $("#d_middenkader").slideDown('slow');
	    // $("#d_middenkader").css('visibility', 'inherit');
	    // $("#d_middenkader").css('display', 'none');
        // alert(parseInt($(document).height()) - 280);
        var w = parseInt($('#d_middenkader_mijnimuis').css('width').replace('px', ''));
        // alert(w);
        //$('#d_middenkader_mijnimuis').css('width', w - 50);
        if (!ie9)
        {
            $('.scroll-pane').jScrollPane('showArrows=true');
        }
	else
	{
	    $("#d_middenkader_mijnimuis").css('overflow-y', 'auto');
	}
        // $('#d_middenkader_mijnimuis').css('width', 997);
    }
    
    if (isipad)
    {
        if (html('d_snelmenu_acc') != null)
        {
            html('d_snelmenu_acc').style.display = 'none';
            html('slidedownmenu').style.height = '145px';
        }
    }
    
    if (html('d_slideshow') != null)
    {
        if (html('d_slideshow').getAttribute('toonbedrijfsfilm') == 'J')
        {
            // html('d_slideshow').innerHTML = ShowYouTube('bedrijfsfilm', true, 250, 100);
        }
    }
    
    return false;
}

function veldfocus(veld)
{
	veld.select();
	veld.style.backgroundColor = '#f4f77c';
	veld.style.color = '#000000';
}
function veldfocusout(veld)
{
	veld.style.backgroundColor = '#FFFFFF';
	veld.style.color = '#000000';
}
