// global variables.
var w2 = null;
var w,h

function dyn_pop_up(fileName,wdth,hght)
{
 var wsize = ",width=" + wdth + ",height=" + hght;
 
	features = "location=no,toolbar=no,menubar=no,resizable=no" + wsize
	if (navigator.appName == "Netscape") features += ",screenX=160,screenY=160"
	else features += ",left=160,top=160"
   
	 newWindow = window.open(fileName,"name",features,true);
     newWindow.resizeTo(wdth,hght);
     newWindow.focus();
}


function winOpen(){
  if(popImg != null){ 
    if(popImg.closed != true) return true; else return false
    }  
  else
    return false
  }

function popw(title,pic)
{

/* T.Dreher, econom, 15.5.2003 

   this function opens a new window, loads the picture, and resizes the window
   according to the size of the picture */

        w=300;
        h=200;

        var wsize = ",width=" + w + ",height=" + h;

	features = "location=no,toolbar=no,menubar=no,resizable=no" + wsize
	if (navigator.appName == "Netscape") features += ",screenX=10,screenY=10"
	else features += ",left=10,top=10"


	w2= window.open("","name",features,true);
    var doc = w2.document;

	doc.writeln("<HTML><HEAD><TITLE>"+title+"</TITLE>");
	doc.writeln('<LINK REL="stylesheet" HREF="/css/atm.css">');

    doc.writeln('<SCRIPT LANGUAGE="JavaScript">');
    doc.writeln('function res() {');
    doc.writeln('w = document.images[0].width + 50')
    doc.writeln('h = document.images[0].height + 150')

    if (navigator.appName == "Netscape") {
     doc.writeln('window.innerWidth=w;');
     doc.writeln('window.innerHeight=h;'); 
     doc.writeln('window.outerWidth=w+10;');
     doc.writeln('window.outerHeight=h+10;'); 
     }
    else
      doc.writeln('self.resizeTo(w,h+30);');
    
    doc.writeln('window.focus();');    
    doc.writeln('return false;');    
    doc.writeln('}');
    doc.writeln('</SCRIPT>');

	doc.writeln("</HEAD><BODY bgcolor='#FFFFFF' onload='res()'>");
	doc.writeln("<P class='medium' align='center'><B>"+title+"</B></P>");
    doc.writeln("<P align='center'><IMG border='0' src='"+pic+"'></P><BR>")
	doc.writeln("<P class='smaller' align='center'><A HREF='javascript:self.close()'>close window.</A></P>");

	doc.writeln('</BODY></HTML>');
	doc.close();
    return

    w2.moveTo(10,10);
	w2.focus();
}


