
 closeBtn1 = null;
 closeBtn2 = null;
 
 closeBtn1  = LoadImage("../images/close1.gif");
 closeBtn2 = LoadImage("../images/close2.gif");  




function hidePopup(id)

{

 var ie=document.all

 var dom=document.getElementById 

 var crossobj = (dom)? document.getElementById(id).style : ie? eval("document.all." + id) : eval("document." + id)
 
 
 if(crossobj) crossobj.visibility="hidden"

}


function addPopupFrame (url, left, top, width, height, headerBgColor, title)
{
 

 var s = '<iframe src="' + url + '" width="' + width + '" height="' + height + '" frameborder="0" scrolling="no"></iframe>'

 addPopup (s, left, top, width, height, headerBgColor, title)
}


function addPopupImage (url, left, top, width, height, headerBgColor, title)
{
 

 var s = '<img src="' + url + '" hspace=0 vspace=0 alt="" title = "" border=0 />'

 addPopup (s, left, top, width, height, headerBgColor, title)
}

function addPopupFlash (swf, left, top, width, height, headerBgColor, title, swfBgColor, bild)
{
 

 var s = '<script language=javascript>showFlash("' + swf + '", "' + bild + '", "' + width + '", "' + height + '", "' + swfBgColor + '")</script>'

 addPopup (s, left, top, width, height, headerBgColor, title)
}


function addPopup (content, left, top, width, height, headerBgColor, title)
{
 if (headerBgColor == '') headerBgColor = '#6561a2'

 var wHeight = 20
 var height2 = height + wHeight

 id = "popup" + Math.round(Math.random()*1000)

 var s = '<div id="' + id + '" style="position:absolute; left:' + left + 'px; top:' + top + 'px; width:' + width + 'px; height:' + height2 + 'px; z-index:100">'
 s = s + '<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%"><tr><td height="20" bgcolor="' + headerBgColor + '" '

 s = s + ' nowrap>&nbsp;<font face="arial" size="2" color="white"><b>' + title + '</b></font></td><td align="right" bgcolor="' + headerBgColor + '" ><a href=' 
 s = s + '"javascript:hidePopup(\'' + id + '\')"  onMouseOver = "ChangeImage(\'closeBtn\', closeBtn2);" onMouseOut =  "ChangeImage(\'closeBtn\', closeBtn1);"><img '
 s = s + ' src="../images/close1.gif" border="0" name="closeBtn" hspace="3"/></a>'


 s = s + '</td></tr><tr><td colspan="2" height="100%" valign="top">' + content + '</td></tr></table></div>'

 document.write(s);
}

