﻿var gg = true;
var mm = new Array();
function printContent(id){
			str=document.getElementById(id).innerHTML
			newwin=window.open('','Udskriv','left=100,top=100,width=980,height=710')
			newwin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n')
			newwin.document.write('<TITLE>Udskriv</TITLE>\n')
			newwin.document.write('<script>\n')
			newwin.document.write('function chkstate(){\n')
			newwin.document.write('if(document.readyState=="complete"){\n')
			newwin.document.write('window.close()\n')
			newwin.document.write('}\n')
			newwin.document.write('else{\n')
			newwin.document.write('setTimeout("chkstate()",2000)\n')
			newwin.document.write('}\n')
			newwin.document.write('}\n')
			newwin.document.write('function print_win(){\n')
			newwin.document.write('window.print();\n')
			newwin.document.write('chkstate();\n')
			newwin.document.write('}\n')
			newwin.document.write('<\/script>\n')
			newwin.document.write('<link href="CSS/mainstyle.css" rel="stylesheet" type="text/css" />\n')
			newwin.document.write('<\/HEAD>\n')
			//newwin.document.write('<STYLE>body, td { font-family: Arial, Verdana, Sans-Serif; font-size: 10px; color: #7a7a7a; } .tabl { border-spacing: 4px; } .bold { font-weight: bold; }</STYLE></HEAD>\n')
			newwin.document.write('<BODY onload="print_win()">\n')
			newwin.document.write('<div style="position: relative; text-align: left;">\n')
			newwin.document.write(str)
			newwin.document.write('</div></BODY>\n')
			newwin.document.write('</HTML>\n')
			newwin.document.close()
}


function underline_on(menuitemid) {
	//var m_top = menuitem.offsetTop;
    //var m_left = menuitem.offsetLeft;
    var offLeft1 = parseInt(document.getElementById('n'+menuitemid).offsetLeft);
    var offTop1 = parseInt(document.getElementById('n'+menuitemid).offsetTop);
    var newTop1 = offTop1 + 25;
    var newLeft1 = offLeft1 + 8;
    if(document.getElementById('u2')) {
        var d1 = document.getElementById('u2');
        d1.style.display = 'block';
        d1.style.top = newTop1+'px';
        d1.style.left=newLeft1+'px';
    }
}

function underline_off() {
    var d2 = document.getElementById('u2');
    d2.style.display='none';
}


/*
function getPageSize(){
	
				var xScroll, yScroll;
	
					if (window.innerHeight && window.scrollMaxY) {	
						xScroll = document.body.scrollWidth;
						yScroll = window.innerHeight + window.scrollMaxY;
					} else if (document.body.scrollHeight > document.body.offsetHeight){ // alle undtagen Explorer Mac
						xScroll = document.body.scrollWidth;
						yScroll = document.body.scrollHeight;
					} else { // Explorer Mac...virker også i Explorer 6, Mozilla og Safari
						xScroll = document.body.offsetWidth;
						yScroll = document.body.offsetHeight;
					}
	
				var windowWidth, windowHeight;
					if (self.innerHeight) {	// alle undtagen Explorer
						windowWidth = self.innerWidth;
						windowHeight = self.innerHeight;
					} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6
						windowWidth = document.documentElement.clientWidth;
						windowHeight = document.documentElement.clientHeight;
					} else if (document.body) { // Andre Explorers
						windowWidth = document.body.clientWidth;
						windowHeight = document.body.clientHeight;
			}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}


	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}

 
*/
