﻿/* Gets the popup windows opener (Resume.ascx) */
function GetOpener()
{
   if (navigator.appName == "Microsoft Internet Explorer")
   {
	  if ( window.dialogArguments != undefined )
		return window.dialogArguments.opener;
	  else
	   return window.opener;
   }
   else
   {
     return window.opener;
   }
}  

/* Refershes the parent window.*/
function RefereshParent()
{
   var ObjParent = GetOpener();
   if (ObjParent) 
   {
	  if (ObjParent.RefreshMe)
	    ObjParent.RefreshMe();
	  else
		ObjParent.location.href = ObjParent.location.href; 
   }
}
  

/* Sets focus on the control */
function SetFocus(objID)
{
   var obj = window.document.getElementById(objID);
   if (obj && obj.focus)
     obj.focus();
}

/* Closes the opened dialog box and refreshes 
the parent window if "refereshParent" is set to "true" */
function CloseMe(refershParent)
{
	if (refershParent) 
	{
	  RefereshParent();
	}
	
	window.close();
}

function MM_openBrWindow(theURL,winName,features) 
{
  window.open(theURL,winName,features);
}
function openBrWindow(theURL,winName)
{
  var features = "left=0,top=0,width=" +screen.availWidth + ",height="+screen.availHeight + ",toolbar=no,menubar=no,location=no,status=yes,resizable=yes,scrollbars=yes";
  window.open(theURL,winName,features,true);
}
function MM_openWindow(theURL,winName,wwidth,wheight)
{
  var features = "left=30,top=30,width="+wwidth+",height="+wheight+",toolbar=no,menubar=no,location=no,status=yes,resizable=yes,scrollbars=yes";
  window.open(theURL,winName,features,true);
}
