function newWindow(url,width,height,label) {
	
	settings="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,top=50,left=20";
	
	settings+=",width=";
	settings+= +width + 25;
	
	settings+=",height=";
	settings+= +height + 50;
	
	
	bild=new Date();
	bild=bild.getSeconds()+"_"+bild.getMinutes()+"_"+bild.getHours()+"_"+bild.getMilliseconds();
	
	/*
	function getPageScroll(){
	
		var yScroll;
	
		if (self.pageYOffset) {
			yScroll = self.pageYOffset;
		} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
			yScroll = document.documentElement.scrollTop;
		} else if (document.body) {// all other Explorers
			yScroll = document.body.scrollTop;
		}
	
		arrayPageScroll = new Array('',yScroll) 
		return arrayPageScroll;
	}
	
    function appendElement(tag,id,styles,htm,elementClick) {
      if(!document.getElementById(id)) {
        var ne = document.createElement(tag);
        if(id) ne.setAttribute('id',id);
        if(elementClick) ne.onclick = elementClick;
        if(htm) ne.innerHTML = htm;
        if(styles) for(s=0;s<styles.length;s++) {eval("ne.style."+styles[s][0]+"='"+styles[s][1]+"'");}
        document.body.insertBefore(ne,document.body.firstChild);
      }
      else {
        var ne = document.getElementById(id);
        ne.innerHTML = htm;
      }
    }
    
	
	appendElement('div','overlayDiv',[["position","absolute"],["zIndex",900],["background","black"],["color","white"],["top",0],["left",0],["width","100%"],["height","100%"]],'<div>'+url+'</div>',function() { alert('haha');});
	alert(document.getElementById('overlayDiv').outerHTML);
	*/
	pic = window.open('',bild,settings);
	
	pic.document.open();
	pic.document.write("<html>\n<head>\n");
	pic.document.write("<title>"+label+"</title>\n");
	pic.document.write("<style>table {font-family: Verdana, Arial, sans-serif; font-size: 11px;} body {margin:0;color:#333;}</style>\n</head>\n");
	pic.document.write("<body onClick='window.close()' onKeyup='window.close()' onBlur='window.close()' topmargin='5' leftmargin='0'>\n");
	pic.document.write("<table width='"+parseInt(width)+"' align=center><tr>\n");
	pic.document.write("<td><div align='center'>\n<img src='" + url + "' width='"+width+"' height='"+height+"'>\n</div></td>\n</tr><tr>\n");
	pic.document.write("<td align='left'><b>"+label+"</b></td>\n</tr><tr>\n");
	pic.document.write("<td align=right>\nKlicka f&ouml;r att st&auml;nga f&ouml;nstret\n</td>\n</tr></table>\n");
	pic.document.write("</body>\n</html>\n");
	pic.document.close();
	
	pic.focus();
	
}

/***      javascript:newWindow('   URL   ','   WIDTH   ','   HEIGHT   ','   LABEL   ')      ***/
