
//popupHelp.js
// used by Help Link from the Task Bar .
// version 1.ab: Do not close the window if it is already open.
// Author: S. Bhattacharjee
var popUpWindow = null    
var windowCount = 0
var floatHeight=200
var floatWidth=700
var windowName = "popUpSolution"


function openHelpWindow(winURL){
 
         //openPopUpWindow(winURL, floatWidth, screen.availHeight, "menubar=no, scrollbars=yes, resizable=yes",0,0,f)
         openPopUpWindow(winURL, 700,
          screen.availHeight, "menubar=no, scrollbars=yes, resizable=yes",screen.availWidth-700,0)
}

function openPopUpFloat(winURL){

		//alert(screen.availWidth)
		moveTo(0,0)
		resizeTo(floatWidth,floatHeight)
	    window.location.replace(winURL);

}
  
function openPopUpDock(winURL){
		 
		 moveTo(screen.availWidth/2,0)
		 resizeTo(screen.availWidth/2,screen.availHeight)
}

function openPopUpWindow(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){
  
  windowName = "popUpSolution" + windowCount++ //unique name for each pop-up window
  
  //closePopUpWindow()  
 

  if(popUpWindow == null) popUpWindow = window.open(winURL, windowName, "width=" + winWidth 
           + ",height=" + winHeight + winFeatures )
  popUpWindow.location.replace(winURL);
  popUpWindow.moveTo(winLeft,winTop);
  
  popUpWindow.resizeTo(winWidth,winHeight);
  popUpWindow.focus();
  /*popUpWindow.focus();*/

  }
function closePopUpWindow(){    
  if (navigator.appName != "Microsoft Internet Explorer" 
      || parseInt(navigator.appVersion) >=4) 
    if(popUpWindow != null) if(!popUpWindow.closed) popUpWindow.close() 
  }


