function browser() { var browser = navigator.userAgent; if (browser.indexOf('Gecko')>-1) return "FF"; //Mozilla og Netscape else if (browser.indexOf('Opera')>-1) return "Opera"; //Opera else if (browser.indexOf('MSIE')>-1) return "IE"; //Internet Explorer else return false; } function str_replace(ch,nch,str){ var chl = ch.length; var nchl = nch.length; var i = str.indexOf(ch); while(i>-1){ str = str.substring(0,i)+nch+str.substring(i+chl); i = str.indexOf(ch,i+nchl); } return str; } function onhover(row,antal) { for(i=1;i<=antal;i++) { document.getElementById('row_' + row + '_' + i).style.backgroundColor = '#CCCCCC'; } } function outhover(row,antal,color) { for(i=1;i<=antal;i++) { document.getElementById('row_' + row + '_' + i).style.backgroundColor = color; } } function popupvindue(url,width,height) { var isIE = (navigator.appName.indexOf('Microsoft') > -1)? 1 : 0; var swidth = (isIE)? document.body.clientWidth : window.innerWidth; var sheight = (isIE)? document.body.clientHeight : window.innerHeight; var left = (swidth - width) / 2; var top = (sheight - height) / 2; var popup = window.open(url,'popup','left=' + left + ',top=' + top + ',width=' + width + ',height=' + height); popup.focus(); return false; }