function gmapsContainer(boxW,boxH,tip,code,scr){
	kapatBtn = "js/close.png";
	kapatBtnW = 42;
	kapatBtnH = 42;
	
	var arkaplan = document.createElement('div');
	var popup = document.createElement('div');
	var kapat = document.createElement('div');

	arkaplan.setAttribute('class', 'arkaplan');
	popup.setAttribute('class', 'popup');
	kapat.setAttribute('class', 'kapat'); 

	document.body.appendChild(arkaplan);
	document.body.appendChild(popup);
	document.body.appendChild(kapat);
	                                                                   
	$('.body').css({'margin':0+'px','padding':0+'px','overflow' :'hidden'});
	$('.arkaplan').css({'width': 1+'px','height': 1+'px','position': 'absolute','overflow' :'hidden','visibility':'hidden','z-index' : 9005});   
	$('.popup').css({'width': 1+'px','height': 1+'px','padding':5 +'px','position': 'absolute','overflow' :'hidden','visibility':'hidden','z-index' : 9005});
	$('.kapat').css({'width': 1+'px','height': 1+'px','position': 'absolute','visibility':'hidden','z-index' : 9009});
	$('.kapat').append('<img src="'+kapatBtn+'" border="0" style="margin:0px auto; border= none" />')
	if (tip == 'iframe'){
		popup.innerHTML = '<iframe src="'+code+'" frameborder="0" scrolling="'+scr+'" width="100%" height="100%" ></iframe>'
		Beklet()
	}else if (tip == 'image'){
		popup.innerHTML = '<img class="pIcon" src="'+code+'" border="0" />';
		var img = new Image();
		img.src = code;         
		img.onload  = function(){
		$('.arkaplan').animate({'left' :0 +'px'}, 'slow',function() {
							boxW = img.width;
							boxH = img.height;
							Beklet()
				});
		}
	}else{
		popup.innerHTML = code;
		Beklet()
	}
	function Beklet(){
	$(function(){
		var LW = ($(document).width() - boxW);
		var TH = ($(document).height() - boxH);
		Wt = $(window).width();
		Wh = $(window).height();
		$('.arkaplan').css({'background':'#000000','width': $(window).width()+'px','height': $(window).height()+'px','visibility':'visible','z-index' : 9000,'opacity':0}).animate( {'opacity':.7}, 2000,function() {$('.popup').css({'background':'#000','visibility':'visible','top': (Wh - 1)*0.5 +'px','left':(Wt - 1)*0.5 +'px' }).animate({'top': ($(window).height()-boxH)*0.5 +'px','left': ($(window).width()-boxW)*0.5 +'px','width': boxW +'px','height': boxH +'px'}, 'slow', function() {$('.kapat').css({'top' : (Wh - $('.popup').height()-kapatBtnW)*0.5 +'px','left' :(Wt + $('.popup').width()-kapatBtnH)*0.5 +'px','visibility':'visible','cursor':'pointer'}).animate({'width': kapatBtnW+'px','height': kapatBtnH+'px','left' : ($(window).width() + $('.popup').width())*0.5- kapatBtnW*0.5 +'px','top' : ($(window).height() - $('.popup').height())*0.5 - kapatBtnH*0.5 +'px'}, 'fast')})})});
		$(window).resize(function() {
			$('.popup').animate({'top' :($(window).height()-boxH)*0.5 +'px','left' :($(window).width()-boxW)*0.5 +'px'}, 'fast');
			$('.kapat').animate({'left' : ($(window).width() + $('.popup').width())*0.5+'px','top' : ($(window).height() - $('.popup').height())*0.5 - kapatBtnH*0.5 +'px'}, 'fast');
			$('.arkaplan').animate({'width' :$(window).width(),'height' :$(window).height()}, 'fast')});
			$('.kapat').click(function(){$('.popup').animate({'opacity':0}, 100,function() {
					$('.arkaplan').remove();
					$('.popup').remove();
					$('.kapat').remove();
					$('.arkaplan').animate({opacity:0}, 100)
						document.body.style.cursor = 'auto';
					})
			});
			$('.arkaplan').click(function(){
  				$('.popup').animate({opacity:0}, 100,function() {
				$('.arkaplan').remove();
				$('.popup').remove();
				$('.kapat').remove();
				$('.arkaplan').animate({opacity:0}, 100)
					document.body.style.cursor = 'auto';
				})
			});
		}
}
