function OpenWin(location) 
{
	
  var ieDHTML = document.all !=null;
  var nsDHTML = document.layers;

		if (ieDHTML) 
		{
			window.open(location, "popup",
				'width=500,toolbar=no,status=yes,menubar=yes,top=45,left=120,scrollbars=yes,resizable=no');

		} 
		else 
		{
			window.open(location, 'popup', 
				'width=500,menubar=yes,scrollbars=yes,status=yes,top=45,left=120');
		}
} 

function OpenWinCust(location, xWidth, yHeight, secure)
{
  if (secure == 'ssl') {
    location = "https://www.NCMICGroup.com" + location;
  }
  
  //Make the window smaller if it is bigger than the client's screen
  var scrxWidth = window.screen.availWidth;
  var scryHeight = window.screen.availHeight;

  if (xWidth > scrxWidth) {
	xWidth = scrxWidth;
	}
  if (yHeight > scryHeight) {
	yHeight = scryHeight;
	}
	
  //Set the position of the window based on the client's resolution.
  var Top;
  var Left;
  if ((scrxWidth - xWidth) >= 150) {
	Left = 135
  } else {
	Left = (scrxWidth - xWidth) - 15;
	}
	//alert(Left);
  if ((scryHeight - yHeight) >= 175) {
	Top = 55
  } else {
	Top = (scryHeight - yHeight) - 120;
	}
	//alert(Top);
	
  var ieDHTML = document.all !=null;
  var toolbarswitch;
  if (secure == "toolbar") {
    toolbarswitch = "toolbar=yes";
  } else {
    toolbarswitch = "toolbar=no";
  }

  if (window.name == "popup") {
    if (ieDHTML) {
      window.open(location, "newPopup",
        "width=" + xWidth +",height=" + yHeight + "," + toolbarswitch + ",status=no,menubar=no,top=" + Top + ",left=" + Left + ",scrollbars=yes,resizable=yes");
    } else {
      window.open(location, 'newPopup',
        'menubar=no,scrollbars=yes," + toolbarswitch + ",status=yes,width=' + xWidth + ',height=' + yHeight +',top=' + Top + ',left=' + Left);
    }
  } else {
    if (ieDHTML) {
      window.open(location, "popup",
        "width=" + xWidth +",height=" + yHeight +"," + toolbarswitch + ",status=yes,menubar=no,top=" + Top + ",left=" + Left + ",scrollbars=yes,resizable=yes");
    } else {
      window.open(location, 'popup',
        'width=' + xWidth + ',height=' + yHeight +',menubar=no," + toolbarswitch + ",scrollbars=yes,status=yes,top=' + Top + ',left=' + Left);
    }
  }
}

