var cont = null; var excont = null; var inpage = ""; var dom = (document.getElementById) ? true:false; var ie = (document.all) ? true:false; function changecolor(elementID){ if (inpage != elementID) { if (dom) { document.getElementById("col_" + elementID).style.backgroundColor='#e5e8ee';} else if (ie) { document.all["col_" + elementID].style.backgroundColor='#e5e8ee';} } } function changeback(elementID){ if (inpage != elementID) { if (dom) { document.getElementById("col_" + elementID).style.backgroundColor='';} else if (ie) { document.all["col_" + elementID].style.backgroundColor='';} } } function page(elementID){ if (inpage == ""){ if (dom) { document.getElementById("col_" + elementID).style.backgroundColor='#e5e8ee'; } else if (ie){ document.all["col_" + elementID].style.backgroundColor='#e5e8ee'; } inpage = elementID; } else{ if (dom) { document.getElementById("col_" + inpage).style.backgroundColor=''; } else if (ie) { document.all["col_" + inpage].style.backgroundColor=''; } inpage = elementID; } } function clearPage() { if (dom) { document.getElementById("col_" + inpage).style.backgroundColor=''; } else if (ie) { document.all["col_" + inpage].style.backgroundColor=''; } inpage = ""; } active_img=new Image; active_img.src='http://www.mpc-capital.com:80/contell/cms/images/mpc-capital/screendesign/pdfPfeil.gif'; inactive_img=new Image; inactive_img.src='http://www.mpc-capital.com:80/contell/cms/images/mpc-capital/screendesign/pdfPfeil90.gif'; function act(name){ document[name].src=active_img.src;} function inact(name) { document[name].src=inactive_img.src; } function showHide(elementID) { if (dom) { cont = document.getElementById("extrarow_" + elementID);} else if (ie) { cont = document.all["extrarow_" + elementID];} expand(cont,elementID); } function expand(cont,elementID) { init();name="img_"+elementID; if(excont!=cont){ cont.style.display = 'block'; excont=cont; page(elementID); inact(name); } else { excont=null; clearPage(); act(name);} } function init() { var items = document.getElementById("pdfTab").getElementsByTagName("table"); for(var i = 1; i < items.length+1; i++) { //alert(i); if (dom){ document.getElementById("extrarow_" + i).style.display = "none"; // Pfeil normal norm_pfeil="img_"+i; act(norm_pfeil); } else if (ie) { document.all["extrarow_" + i].style.display = "none"; norm_pfeil="img_"+i; act(norm_pfeil); } } } init();