function openPopup(helpValue,winwidth,winheight,winTop,winLeft){	
		bgWidth=$("body").width();
		bgHeight=$("body").height();
		var windowWidth = document.documentElement.clientWidth;  
		var windowHeight = document.documentElement.clientHeight;
		var moveToCenter;
		var leftSpace;
		if (winLeft==null){
			leftSpace=windowWidth/2-winwidth/2;
		}
		else
			leftSpace=winLeft+"px";

		if (winTop==null){
			if (navigator.appName == "Netscape"){
				 moveToCenter=window.pageYOffset+windowHeight/2-winheight/2+'px';
			}
			else{ 
				moveToCenter=document.documentElement.scrollTop+windowHeight/2-winheight/2+'px';
			}
		}
		else
			moveToCenter=winTop+"px";
		
		
			
		$("body").append("<div id='popupContact'></div>");
						
		if(bgWidth<windowWidth){
			bgWidth=windowWidth;
		}
		if(bgHeight<windowHeight){
			bgHeight=windowHeight;
		}
		
		$("#popupContact").css({  
			"position": "absolute",
			"z-index": "1000",  
			"background-color": "#484848",
			"width": "0px",
			"height": "0px",
			"opacity": "0.1",
			"border": "1px solid gray",
			"top": moveToCenter,  
			"left": leftSpace
 		});	
 		
		 $("#popupContact").animate({
			width: winwidth+"px",
			height: winheight+"px",
			opacity: "0.95",
			top: moveToCenter,
			left: leftSpace
			},
			800
		);
			
			
			
			setTimeout('appendPopup("'+helpValue+'",'+winwidth+','+winheight+',"'+moveToCenter+'","'+leftSpace+'")',1000);

		
		
			
	
 

}

function closePopup(moveToCenter,leftSpace){
	var windowWidth = document.documentElement.clientWidth;  
	var windowHeight = document.documentElement.clientHeight;
	$("#popupContact *").remove();
	$("#popupContact").animate({
		"top": moveToCenter,  
		"left": leftSpace,
		"width": "0px",
		"height": "0px",
		opacity: "0.1"	
	},800);
	setTimeout('$("#popupContact").remove()',800);
}

function appendPopup(Value,winwidth,winheight,moveToCenter,leftSpace){
				moveToCenter='"'+moveToCenter+'"';
				leftSpace='"'+leftSpace+'"'
				$("#popupContact").prepend("<div class='popupHead' onclick='closePopup("+moveToCenter+","+leftSpace+")'>Bezárás (x)</div>");
				$("#popupContact").append("<iframe src="+Value+" class='popupContent'></iframe>");
				$(".popupHead").css({  
					"color": "white",
					"height": "20px",
					"font-size": "16px",
					"text-align": "right",
					"padding-right": "20px",
					"padding-top": "10px",
					"font-weight": "bold",
					"font-family": "arial",
					"cursor": "pointer",
					"z-index":"1000" 
 				});	
 
		 		$(".popupContent").css({
					"margin": "2px",
					"height": (winheight-56)+"px",
					"width": (winwidth-26)+"px",
					"padding": "10px",
					"border": "1px solid gray",
					"font-size": "14px",
					"overflow": "auto",
					"z-index": "1000",
					"background-color":"#e5e5e5"	
				});
		
				if($.browser.msie && $.browser.version.substr(0,1)=="6"){
				//	$("#popupContact").append("<iframe class='masker pc'></iframe>");
					$(".pc").css({
						"width":"600px",
						"height":"400px"
					});
					$(".pbg").css({
						"width":bgWidth,
						"height":bgHeight,
						"z-index": "-2"
					});
				}
				}

