﻿/*****************************************************************************/
/*	Behavior.js
/*
/*	Added 08.08.06 by Felix
/*****************************************************************************/

//	Helper method to open pagi in the popup window
function OpenPopup(target, intWidth, intHeight)
{
	var strParam = "height=" + intHeight + ",innerHeight=" + intHeight;
	strParam += ",width=" + intWidth + ",innerWidth=" + intWidth ;
	if (window.screen)
	{
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = (aw - intWidth) / 2;
		var yc = (ah - intHeight) / 2;
    
		strParam += ",left=" + xc + ",screenX=" + xc;
		strParam += ",top=" + yc + ",screenY=" + yc;
	}

  strParam += ",toolbar=no,resizable=yes,directories=no,status=yes,scrollbars=yes,resize=no,menubar=no";
  
	window.open("about:blank", target, strParam);
}

function OpenPopupNew(target, intWidth, intHeight)
{
      var strParam = "height=" + intHeight + ",innerHeight=" + intHeight;
      strParam += ",width=" + intWidth + ",innerWidth=" + intWidth ;
      if (window.screen)
      {
            var ah = screen.availHeight - 30;
            var aw = screen.availWidth - 10;
            var xc = (aw - intWidth) / 2;
            var yc = (ah - intHeight) / 2;
            strParam += ",left=" + xc + ",screenX=" + xc;
            strParam += ",top=" + yc + ",screenY=" + yc;
      }
  strParam += ",toolbar=no,resizable=yes,directories=no,status=yes,scrollbars=yes,resize=no,menubar=no";
  var fff= window.open("about:blank", target, strParam);
  fff.focus();
}


//	Trim text value of control
function TrimCtrlValue(controlId)
{
	document.getElementById(controlId).value = document.getElementById(controlId).value.trim();
}