    var wnd=null;
    var bClose = true;
    var str = navigator.appVersion;
    var ie = str.indexOf("MSIE");

	var wndd=null;
    
function showPopup(filename,sizex,sizey,xpos,ypos,bScroll)
    {
       if (ie>0)
       
       {
       	if (wnd!=null && bClose!=true)
       	wnd.close();
       	bClose = false;
       }
       
       else
       
		{
       	if (wnd != null)
          
          {
          		var str = null;
          		str = wnd.name;
          		if ((str=='Popup')==true)
          		wnd.close();
          	}
		}
  	
  		wnd = window.open(filename,'Popup','toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,left='+xpos+',top='+ypos+',width='+sizex+',height='+sizey);
	}

function showPopup2(filename,sizex,sizey,xpos,ypos,bScroll)
    {
       if (ie>0)
       
       {
       	if (wndd!=null && bClose!=true)
       	wndd.close();
       	bClose = false;
       }
       
       else
       
		{
       	if (wndd != null)
          
          {
          		var str = null;
          		str = wndd.name;
          		if ((str=='Popup2')==true)
          		wndd.close();
          	}
		}
  	
  		wndd = window.open(filename,'Popup2','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,left='+xpos+',top='+ypos+',width='+sizex+',height='+sizey);
	}
	
