function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function setPointer(theRow, thePointerColor) {
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    } else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    } else {
        return false;
    }
    var rowCellsCnt=theCells.length;
    for (var c=0;c<rowCellsCnt;c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }
    return true;
}


function ZoomImage(img,w,h)
{
var win = window.open('zoom.php?image='+img,'','width='+w+',height='+h+'');
}

/* AJAX functions */
function showcolour(kledingkleur) {
   var xmlhttp=false;

    /*@cc_on @*/
    /*@if (@_jscript_version >= 5)
    try {
        xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
    } catch (e) {
        try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; }
    }
    @end @*/

    if(!xmlhttp) { xmlhttp=new XMLHttpRequest(); }
    keuze = document.kleuradvies.huidtype.value;
    //xmlhttp.open('GET','index.php?D=19&kleur='+kledingkleur+'&skin='+keuze, true);
    xmlhttp.open('GET','/cmsadmin/mods/Kleuradvies_1.0.0/module.php?kleur='+kledingkleur+'&skin='+keuze, true);
    xmlhttp.onreadystatechange = function() {
        if(xmlhttp.readyState==4) { 
            document.getElementById('output_div').innerHTML = xmlhttp.responseText; 
            //alert(xmlhttp.responseText);
        }
    }
    xmlhttp.send(null);
}


function showhuid(selObj) {
   var xmlhttp=false;
	//keuze = selObj.options[selObj.selectedIndex].value;
    keuze = document.kleuradvies.huidtype.value;
    try {
        xmlhttp = new ActiveXObject('Msxml2.XMLHTTP');
    } catch (e) {
        try { xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; }
    }
    if(!xmlhttp) { xmlhttp=new XMLHttpRequest(); }

    xmlhttp.open('GET','/cmsadmin/mods/Kleuradvies_1.0.0/module.php?skin='+keuze, true);
    xmlhttp.onreadystatechange = function() {
        if(xmlhttp.readyState==4) { 
            document.getElementById('output_huid').innerHTML = xmlhttp.responseText;
            document.getElementById('output_div').innerHTML = "kies een kledingkleur";
        }
    }
    xmlhttp.send(null);
}

