function ppWindow(wFrame) {
	var This = this;
	var ModalBg = null;
	var ppW = null;
	var MouseDown = false;
	var mX = 0;
	var my = 0;



	function CreateModalBG() {
		$(wFrame).each(function() { ppW = this });	
		ModalBg = document.createElement("DIV");
		ModalBg.style.backgroundColor = '#000000';
		ModalBg.style.position = GetFixedPos();
		ModalBg.style.left = '0px';
		ModalBg.style.top = '0px';
		ModalBg.style.width = '100%';
		ModalBg.style.height = '100%';
		ModalBg.style.opacity = '.5';
		ModalBg.style.filter = 'alpha(opacity=50)';
		document.body.appendChild(ModalBg);
		ModalBg.onmousedown = function() { This.hidePopUp(); }
		document.body.appendChild(ppW);
		ppW.style.position = 'absolute'; if (window.navigator.appVersion.indexOf('Chrome') >= 0) ppW.style.position = 'fixed'; 
		ppW.style.display = 'none';
		ppW.onmousedown = function(e) { SetCapture(); if (e == undefined) { mX = event.clientX - ppW.offsetLeft; mY = event.clientY - ppW.offsetTop; } else { mX = e.pageX - ppW.offsetLeft; mY = e.pageY - ppW.offsetTop; } MouseDown = true; return false; }
		ppW.onmouseup = function() { MouseDown = false; RelCapture(); }
		ppW.onselectstart = function() { return false; }
		ppW.ondragstart = function() { return false; }
		ModalBg.onmousemove=ppW.onmousemove = function(e) { if (MouseDown == false) return false; if (e == undefined) { ppW.style.left = (event.clientX - mX) + 'px'; ppW.style.top = (event.clientY - mY) + 'px'; } else { ppW.style.left = (e.pageX - mX) + 'px'; ppW.style.top = (e.pageY - mY) + 'px' }; return false; }
	}

	this.showLoader = function(imgsrc) {
		if (ModalBg == null) { CreateModalBG(); }
		ModalBg.style.display = 'block';
		if (imgsrc == undefined) return false;
		ModalBg.style.backgroundImage = "url('" + imgsrc + "')";
		ModalBg.style.backgroundPosition = "center";
		ModalBg.style.backgroundRepeat = "no-repeat";
	}

	this.showPopUp = function() {
		This.showLoader();
		ppW.style.display = 'block';
		ppW.style.visibility = 'hidden';
		ppW.style.left = ((document.documentElement.offsetWidth / 2) - (ppW.offsetWidth / 2)) + document.documentElement.scrollLeft + 'px';
		ppW.style.top = (((document.documentElement.offsetHeight) / 2) - (ppW.offsetHeight / 2)) + document.documentElement.scrollTop + 'px';
		ppW.style.display = 'none';
		ppW.style.visibility = 'visible';
		$(wFrame).each(function() { });
		$(wFrame).fadeIn(300);
		ModalBg.style.backgroundImage = "";
		if ((GetIeVersion() < 7) && (GetIeVersion() >0 )) { $('SELECT').each(function() { this.style.visibility = 'hidden' }) }
	}
	this.hidePopUp = function() {
		$(wFrame).fadeOut(300, function() {ModalBg.style.display = 'none'; });
		if ((GetIeVersion() < 7) && (GetIeVersion() > 0)) { $('SELECT').each(function() { this.style.visibility = 'visible' }) }


	}

	function GetFixedPos() {
		if ((GetIeVersion() < 7)&&(GetIeVersion()>0)) return 'absolute';
		return 'fixed';
	}

	function GetIeVersion() {
		var i0 = window.navigator.appVersion.indexOf('MSIE');
		if (i0 < 0) return 0;
		var i1 = window.navigator.appVersion.indexOf(';',i0);
		return window.navigator.appVersion.substring(i0+4, i1)*1;
	}

	function SetCapture() {if (ppW.setCapture) ppW.setCapture(); }
	function RelCapture() { if (ppW.releaseCapture) ppW.releaseCapture(); }
	
}
