/*
    Written by Jonathan Snook, http://www.snook.ca/jonathan
    Add-ons by Robert Nyman, http://www.robertnyman.com
	See: http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/
	Call getElementsByClassName(document, "*", "click-me");
*/
function GettblFondsen()
{
    var i;
    var strOpt;
    i = document.getElementById("ctl00_ContentPlaceHolder2_ddlFondsType").selectedIndex;
    strOpt = document.getElementById("ctl00_ContentPlaceHolder2_ddlFondsType").options[i].value;
    document.getElementById("ctl00_ContentPlaceHolder2_tblFondsen").style.visibility="hidden";
	var i;
	var strInnerHTML;
	strInnerHTML="<table class='striped' width='300px'><tr><th class='alignleft'>Fondsnaam</th></tr>"
	for (i=0;i<FondsNaamarray.length;i++){
	    if (FondsTypearray[i] == strOpt || strOpt == ""){
	        strInnerHTML = strInnerHTML + "<tr><td><a href=/Corp_FondsenInformatie.aspx" + FondsLinkarray[i] +  ">" + FondsNaamarray[i] + "</a></td></tr>"
        }
    }
    strInnerHTML = strInnerHTML + "</table>"
    document.getElementById("divtblFondsen").innerHTML = strInnerHTML;
    stripeTables();
}

function getElementsByClassName(oElm, strTagName, strClassName){
    var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    strClassName = strClassName.replace(/\-/g, "\\-");
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
    var oElement;
    for(var i=0; i<arrElements.length; i++){
        oElement = arrElements[i];      
        if(oRegExp.test(oElement.className)){
            arrReturnElements.push(oElement);
        }   
    }
    return (arrReturnElements)
}

/*
	addClass()
	Add a class to an element
*/
function addClass(element,name) {
  if (!element.className) {
    element.className = name;
  } else {
    element.className+= " " + name;
  }
}

/*
	stripeTables()
	Stripes tables in charts (zebra-tables)
*/
function stripeTables() {
  var tables = getElementsByClassName(document, "*", "striped");
  for (var i=0; i<tables.length; i++) {
    var rows = tables[i].getElementsByTagName("tr");
    for (var j=0; j<rows.length; j=j+2) {
      var cells = rows[j].getElementsByTagName("td");
    	for (var k=0; k<cells.length; k++) {
      	addClass(cells[k],"odd");
    	}
    }
  }
}

/*
	Form checks, checkFields uitfaseren naar CheckfieldsNLUK
*/
/*function checkFields() 
{
    document.getElementById("fNaam").style.backgroundColor= "#FFFFFF";
    document.getElementById("fEmail").style.backgroundColor= "#FFFFFF";
    document.getElementById("lNaam").className = "";
    document.getElementById("lEmail").className = "";
    if (document.forms[0].fNaam.value=="")
	{
		document.getElementById("fNaam").style.backgroundColor= "#FFB1B1";
		document.getElementById("lNaam").className = "form_txtError"
	}
	if (document.forms[0].fEmail.value=="")
	{
		document.getElementById("fEmail").style.backgroundColor= "#FFB1B1";
		document.getElementById("lEmail").className = "form_txtError"
	}
	if (document.forms[0].fNaam.value=="" || document.forms[0].fEmail.value=="")
    {
    	document.getElementById("form_helptxt").innerHTML="<b>LET OP:</b><br> De in rood aangegeven velden moeten nog ingevuld worden.";
		document.getElementById("form_helptxt").className = "form_txtError";
		return false;
    }
    document.location
}
*/

function checkFieldsNLUK(langType) 
{
    document.getElementById("fNaam").style.backgroundColor= "#FFFFFF";
    document.getElementById("fEmail").style.backgroundColor= "#FFFFFF";
    document.getElementById("lNaam").className = "";
    document.getElementById("lEmail").className = "";
    if (document.forms[0].fNaam.value=="")
	{
		document.getElementById("fNaam").style.backgroundColor= "#FFB1B1";
		document.getElementById("lNaam").className = "form_txtError"
	}
	if (document.forms[0].fEmail.value=="")
	{
		document.getElementById("fEmail").style.backgroundColor= "#FFB1B1";
		document.getElementById("lEmail").className = "form_txtError"
	}
	if (document.forms[0].fNaam.value=="" || document.forms[0].fEmail.value=="")
    {
    	if (langType == "1033"){document.getElementById("form_helptxt").innerHTML="<b>ATTENTION:</b><br> The fields highlighted in red must be completed.";}
		else {document.getElementById("form_helptxt").innerHTML="<b>LET OP:</b><br> De in rood aangegeven velden moeten nog ingevuld worden.";}
		document.getElementById("form_helptxt").className = "form_txtError";
		return false;
    }
    document.location
}

/* bla1 */

function setClass(hrefid, desc, langType, contentid)
{
   switch(hrefid)
   {
       case 1:
           if (langType == "1043") {
               document.getElementById('Particulieren').className = 'activeitem';
           }
           else if (langType == "1033") {
               document.getElementById('Individual clients').className = 'activeitem';
           }
           else {
               document.getElementById('Particulieren').className = 'activeitem';
           }
           if (contentid == 13259 && langType != "1033") {
               document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/blauw.jpg)';
               document.getElementById('tophalf').style.backgroundRepeat = 'repeat';
           }
           else { document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerParticulier.jpg)'; }
           break;
    case 2:
        if (langType == "1043")
        {
            document.getElementById('Institutionele beleggers').className = 'activeitem';
        }
        else if (langType == "1033")
        {
            document.getElementById('Institutional investors').className = 'activeitem';
        }
        else
        {
            document.getElementById('Institutionele beleggers').className = 'activeitem';
        }
        if (contentid == 13257 && langType != "1033") {
            document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/blauw.jpg)';
            document.getElementById('tophalf').style.backgroundRepeat = 'repeat';
        }
        else { document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerInstitutioneel.jpg)'; }
        break;
    case 3:
        if (langType == "1043")
        {
        document.getElementById('Ondernemingen').className = 'activeitem';
        }
        else if (langType == "1033")
        {
        document.getElementById('Companies').className = 'activeitem';
        }
        else
        {
        document.getElementById('Ondernemingen').className = 'activeitem';
        }
        document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerOndernemingen.jpg)';
        break;
    case 4:
        if (langType == "1043")
        {
            document.getElementById('DGAs').className = 'activeitem';
        }
        if (langType == "1033")
        {
            document.getElementById('DGAs(1)').className = 'activeitem';
        }
        else
        {
            document.getElementById('DGAs').className = 'activeitem';
        }    
        document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerDGA.jpg)';
        break;
    default:
        document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerKEMPEN.jpg)';
   }

   if (document.getElementById("footer") != null)
   { document.getElementById("footer").className = "Disclaimer"; }
   if (desc.substring(0, 1) == "H")
   {
        try
        {
            if (langType == "1043")
            {
                document.getElementById('Werken bij Kempen & Co').className = 'activeitem';
            }
            else if (langType == "1033")
            {
                document.getElementById('Werken bij Kempen & Co').className = 'activeitem';
            }
            else
            {
                document.getElementById('Werken bij Kempen & Co').className = 'activeitem';
            }
        }
        catch(e)
        {}
        document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHR.jpg)';

        if (desc.substring(0, 2) == "HR")
        {
            document.getElementById('bottomhalf').style.minHeight = '342px';
            document.getElementById("navbar").className = "navbarHR";
            document.getElementById("sitemapbar").className = "sitemapbarHR";
            document.getElementById("Corp_LanguageSwitch").className = "languageHR";
            if (document.getElementById("footer") != null)
               {document.getElementById("footer").className = "DisclaimerHR"; }
            if (desc.substring(0, 4) == "HRCU") {
                document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHRnwcultuur.jpg)';
		        if ((desc + " ").substring(0, 5) == "HRCUS") 
                           {document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/cultuur_sub_lang.jpg)';}
		        else 
		           {document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/cultuur_onder.jpg)';}
                document.getElementById('bottomhalf').style.minHeight = '475px';
            }
            else if (desc.substring(0, 4) == "HRKA") {
                document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHRnwcultuur.jpg)';
                if ((desc + " ").substring(0, 5) == "HRKAS")
                { document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/cultuur_sub_lang.jpg)'; }
                else
                { document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/alumni_onder.jpg)'; }
                document.getElementById('bottomhalf').style.minHeight = '475px';
            }
            else if (desc.substring(0, 4) == "HRCA")
                {if (langType == "1033") {document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHRnwcarriere.jpg)'; }
                 else {document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHRnwcarriere.jpg)'; }
                 if ((desc + " ").substring(0, 5) == "HRCAS") 
                    	{document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/carriere_sub_lang.jpg)';}
		         else 
			        {document.getElementById('bottomhalf').style.minHeight = '475px';
			            if (langType == "1033") { document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/carriere_onder_eng.jpg)'; }
			            else { document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/carriere_onder.jpg)'; }
			        }
                     
                }
            else if (desc.substring(0, 4) == "HRST")
                {if (langType == "1033") { document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHRnwstarters.jpg)'; }
                 else { document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHRnwstarters.jpg)'; }
                 if ((desc + " ").substring(0, 5) == "HRSTS") 
                	    {document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/starters_sub_lang.jpg)';}
	             else 
		            {document.getElementById('bottomhalf').style.minHeight = '475px';
		                if (langType == "1033") { document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/starters_onder_eng.jpg)'; }
		                else { document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/starters_onder.jpg)'; }
		            }
                }
            else if (desc.substring(0, 4) == "HRSA")
                {
                    document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHRnwstage.jpg)';
		    if ((desc + " ").substring(0, 5) == "HRSAS") 
                    	{document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/stage_sub_lang.jpg)';}
		    else 
			{document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/stage_onder.jpg)';}
                    document.getElementById('bottomhalf').style.minHeight = '475px';
                }
            else if (desc.substring(0, 4) == "HRCM") {
                if (langType == "1033") { document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHRnw.jpg)'; }
                else { document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHRnw.jpg)'; }
                document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/contact_sub_lang.jpg)';
                document.getElementById('bottomhalf').style.minHeight = '475px';
            }
            else if (desc.substring(0, 4) == "HRVA") {
                document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHRnw.jpg)';
                if (langType == "1033") { document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/Con_midden.jpg)'; }
                else { document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/Con_midden.jpg)'; }
        }
            else
            {
                document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerHRnw.jpg)';
                if (langType == "1033") {document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/hp_onder_eng.jpg)'; }
                else {document.getElementById('bottomhalf').style.backgroundImage = 'url(../Corp_img/hp_onder.jpg)'; }
            }
            document.getElementById('bottomhalf').style.backgroundRepeat = 'no-repeat';
            document.getElementById('ctl00_Corp_ImgLogoLink').style.visibility = 'hidden';
            //document.getElementById('Corp_ImgLogoLink').style.visibility = 'hidden';
            if (document.getElementById('introbox') != null) {
                if (langType == "1033") { document.getElementById('introbox').style.backgroundImage = 'url(../Corp_img/hp_midden_eng.jpg)'; }
                else { document.getElementById('introbox').style.backgroundImage = 'url(../Corp_img/hp_midden.jpg)'; }
                document.getElementById('introbox').style.backgroundRepeat = 'no-repeat';
                document.getElementById('introbox').style.backgroundColor = '#cb8f42';
                document.getElementById('introbox').style.maxWidth = '999px';
            }
            // Onderstaande is niet fraai, moet nog een keertje anders.
            if (document.getElementById('Institutionele beleggers')!=null) document.getElementById('Institutionele beleggers').style.background = 'url(../Corp_img/bg_topnavHR.gif) right no-repeat';
            if (document.getElementById('Ondernemingen') != null) document.getElementById('Ondernemingen').style.background = 'url(../Corp_img/bg_topnavHR.gif) right no-repeat';
            if (document.getElementById('Particulieren') != null) document.getElementById('Particulieren').style.background = 'url(../Corp_img/bg_topnavHR.gif)';
            if (document.getElementById('Over Kempen & Co') != null) document.getElementById('Over Kempen & Co').style.background = 'url(../Corp_img/bg_topnavHR.gif)';
            if (document.getElementById('Werken bij Kempen & Co') != null) 
            {
                document.getElementById('Werken bij Kempen & Co').style.color = '#162F61';
                document.getElementById('Werken bij Kempen & Co').style.borderWidth = '1';
                document.getElementById('Werken bij Kempen & Co').style.borderColor = '#162F61';
            }
            if (document.getElementById('Institutional investors') != null) document.getElementById('Institutional investors').style.background = 'url(../Corp_img/bg_topnavHR.gif) right no-repeat';
            if (document.getElementById('Companies') != null) document.getElementById('Companies').style.background = 'url(../Corp_img/bg_topnavHR.gif) right no-repeat';
            if (document.getElementById('Individual clients') != null) document.getElementById('Individual clients').style.background = 'url(../Corp_img/bg_topnavHR.gif)';
        }
   } 
   else if (desc == "K" || desc == "")
   {
        try
        {   if (contentid == 8171){contentid=contentid;}  /* Eventueel een class activeitem zetten op de link*/
            else if (contentid == 1176){contentid=contentid;}
            else if (contentid == 9015){contentid=contentid;}
            else if (contentid == 9021){contentid=contentid;}
            else if (langType == "1043")
            {
                document.getElementById('Over Kempen & Co').className = 'activeitem';
            }
            else if (langType == "1033")
            {
                document.getElementById('Over Kempen & Co').className = 'activeitem';
            }
            else
            {
                document.getElementById('Over Kempen & Co').className = 'activeitem';
            }
        }
        catch(e)
        {}
        //document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerKEMPEN.jpg)';
        document.getElementById('tophalf').style.backgroundImage = 'url(../Corp_img/bannerMeerOver.gif)';
   }
}

function ecmPopUpWindow(url, hWind, nWidth, nHeight, nScroll, nResize) {
 var popupwin,  cToolBar;
cToolBar = 'toolbar=0,location=0,directories=0,status=' + nResize + ',menubar=0,scrollbars=' + nScroll + ',resizable=' + nResize + ',width=' + nWidth + ',height=' + nHeight;
popupwin = window.open(url, hWind, cToolBar);
return popupwin;
}