// JavaScript Document
function popUpWindow(loc,name,w,h,pos,scroll,toolbar,menubar,addressbar,directories,resize,status)
{
  goWhere = loc;
  windowName = name;
  wWidth = w;
  wHeight = h;
  sBars = scroll;
  tBar = toolbar;
  mBar = menubar;
  aBar = addressbar;
  dBar = directories;
  statusBar = status;
  canResize = resize;
  if(pos=="center"){
    leftLoc = window.screen.width/2 - wWidth/2;
    topLoc = window.screen.height/2 - wWidth/2;
    }
  else if(pos=="left"){
    leftLoc = 0;
    topLoc = 0;
    }
  else if(pos=="right"){
    leftLoc = window.screen.width - wWidth - 10;
    topLoc = 0;
    }
  return window.open(goWhere,windowName,config='height='+wHeight+',width='+wWidth+',left='+leftLoc+',top='+topLoc+',toolbar='+tBar+',menubar='+mBar+',scrollbars='+sBars+',resizable='+canResize+',location='+aBar+',directories='+dBar+',status='+statusBar+''); 
}
function popUp(loc,name,w,h,pos,scroll,toolbar,menubar,addressbar,directories,resize,status,bReOpen,theWin) 
{
	
	if ( theWin != null ) {
		if (theWin.closed) {
			theWin = popUpWindow(loc,name,w,h,pos,scroll,toolbar,menubar,addressbar,directories,resize,status); }
		else { 
		   if (bReOpen) {
		      theWin.close();
		      theWin = popUpWindow(loc,name,w,h,pos,scroll,toolbar,menubar,addressbar,directories,resize,status); }
		   else { 
		      theWin.location = loc;
		      theWin.focus(); }
		}
	}
	else { 
		theWin = popUpWindow(loc,name,w,h,pos,scroll,toolbar,menubar,addressbar,directories,resize,status);
	}
	
  return theWin;
}	

//-->