function getXMLHTTPRequest() { http=null if (window.XMLHttpRequest) { req=new XMLHttpRequest() } else if (window.ActiveXObject) try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { req = null; } } return req; } var http = getXMLHTTPRequest(); function ShowPersonalInfo(lid){ document.getElementById('personalinfo').innerHTML = 'Laddar...'; http.open("GET", "/includes/personalinfo_ajax.asp?lid=" + lid + "", true); http.onreadystatechange = ShowPersonalInfo_action; http.send(null); } function ShowPersonalInfo_action() { if (http.readyState==4 || http.readyState=='complete'){ document.getElementById('personalinfo').innerHTML = http.responseText; } } window.onload = function() { var menu = document.getElementById('menu'); menu.style.float = 'left'; var menu_width = menu.offsetWidth; // får varning i ie här menu.style.float = 'none'; menu.style.width = menu_width + 'px'; menu.style.margin = '-20px auto'; } /** ====================== Funktioner för att få handover i en tabell ========================= **/ var arrayOfRolloverClasses = new Array(); var arrayOfClickClasses = new Array(); var activeRow = false; var activeRowClickArray = new Array(); function highlightTableRow() { var tableObj = this.parentNode; if(tableObj.tagName!='TABLE')tableObj = tableObj.parentNode; if(this!=activeRow){ this.setAttribute('origCl',this.className); this.origCl = this.className; } this.className = arrayOfRolloverClasses[tableObj.id]; activeRow = this; } function clickOnTableRow() { var tableObj = this.parentNode; if(tableObj.tagName!='TABLE')tableObj = tableObj.parentNode; if(activeRowClickArray[tableObj.id] && this!=activeRowClickArray[tableObj.id]){ activeRowClickArray[tableObj.id].className=''; } this.className = arrayOfClickClasses[tableObj.id]; activeRowClickArray[tableObj.id] = this; } function resetRowStyle() { var tableObj = this.parentNode; if(tableObj.tagName!='TABLE')tableObj = tableObj.parentNode; if(activeRowClickArray[tableObj.id] && this==activeRowClickArray[tableObj.id]){ this.className = arrayOfClickClasses[tableObj.id]; return; } var origCl = this.getAttribute('origCl'); if(!origCl)origCl = this.origCl; this.className=origCl; } function addTableRolloverEffect(tableId,whichClass,whichClassOnClick) { arrayOfRolloverClasses[tableId] = whichClass; arrayOfClickClasses[tableId] = whichClassOnClick; var tableObj = document.getElementById(tableId); var tBody = tableObj.getElementsByTagName('TBODY'); if(tBody){ var rows = tBody[0].getElementsByTagName('TR'); }else{ var rows = tableObj.getElementsByTagName('TR'); } for(var no=0;no