var WinA = 0;
var WinB = 0;	
function newWindow (adr) {
		wind2 = window.open(adr, "Window2");
		wind2.focus();
	}

	function getWinHTML( image, text, width, height ){
		var	t = "<HTML>\n<HEAD>\n<TITLE>"+ text + "<\/TITLE>\n" +
			"<META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; CHARSET=iso-8859-1\">\n" +
			"<\/HEAD>\n" +
			"<BODY>\n" +
                        "<div align=\"center\">\n"+
                        "&nbsp;<p><img src=\"" + image + "\"  align=\"middle\" alt=\""+text+"\">\n"+ 
                        "<\/p>\n<p>" + text + "<\/p>\n"+
                        "<br><br><a href=\"javascript:this.close();\" > Fenster schlie&szlig;en <\/a>\n"+
                         "<\/div>\n<\/BODY>\n<\/HTML>";
		return t; 
	}

	function createWinA( image, text, width, height) { 
		
		var winwidth = String(parseInt(width) + 60);
		var winheight = String(parseInt(height) + 200);
		var wwidth=width;
		var wheight=height;
		var winam = text.replace(/\//,"_");
		var options="toolbar=no,width="+winwidth+",height="+winheight+",resize=yes,scrollbars=yes,menubar=no,status=no";
                
    	        WinA = window.open("about:blank", "Umgebung", options );
   
		WinA.document.open("text/html");
		WinA.document.write( getWinHTML( image, text, wwidth, wheight ) );
		WinA.document.close();
 		WinA.focus();
	}

function createWinB( image, text, width, height) { 
		
		var winwidth = String(parseInt(width) + 60);
		var winheight = String(parseInt(height) + 200);
		var wwidth=width;
		var wheight=height;
		var winam = text.replace(/\//,"_");
		var options="toolbar=no,width="+winwidth+",height="+winheight+",resize=yes,scrollbars=yes,menubar=no,status=no,left=300";
                
    	        WinB = window.open("about:blank", "SUPlan", options );
   
		WinB.document.open("text/html");
		WinB.document.write( getWinHTML( image, text, wwidth, wheight ) );
		WinB.document.close();
 		WinB.focus();
	}
