	function popin(url){
		var doc_width = $(document).width();
		var doc_height = $(document).height();
		
		/* OverLay */
		$('#popin_overlay').fadeTo(0, 0);
		$('#popin_overlay').width(doc_width);
		$('#popin_overlay').height(doc_height);
		$('#popin_overlay').show();
		$('#popin_overlay').fadeTo(50, .8, function(){
			$('#popin_iframe').html('<iframe src="'+url+'" id="popin_myiframe" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto" width="'+($('#popin_iframe').width()+35)+'" onLoad="javascript:popin_resize();" allowTransparency="true"></iframe>');
			setTimeout(function(){ popin_resize(); }, 300);
		});
	}
	
	function popin_resize(loaded){
		if(!loaded || loaded == "undefined") { 
			var ifr = document.getElementById("popin_myiframe");
			if ($.browser.msie && $.browser.version == "6.0") {
				//var height = parseInt(document.frames('popin_myiframe').document.body.scrollHeight) + 30;
				var height = $(window).innerHeight();
			}  else if($.browser.mozilla || $.browser.msie) {
				var height = $(window).height();
			} else {
				var height = parseInt(ifr.contentDocument.body.scrollHeight) + 150;
			}
			//if (ifr) ifr.style.height = height+"px";
		}	

		var obj = $('#popin_iframe');
		var pos_x = ( $(window).width() - $('#popin_iframe').width() ) / 2;
		var pos_y = ( $(window).height() - $('#popin_iframe').height() ) / 2 + $(document).scrollTop();
		if(pos_y < $(document).scrollTop()) pos_y = $(document).scrollTop();
		
		obj.css('top',  pos_y); 
		obj.css('left', pos_x); 
		
		if(!loaded || loaded == "undefined") {
			$(window).resize(
				function() {
					popin_resize(true);
				}
			); 
			$('#popin_iframe').show();
		}
	}
	
	function popin_close(){
		$('#popin_overlay').hide();
		$('#popin_iframe').hide();
		$('#popin_iframe').html('');
		/* window.location.reload(); */
	}
	
	function popin_close_refresh() {	
	/*	$('#popin_overlay').hide();
		$('#popin_iframe').hide();
		$('#popin_iframe').html('');*/
		window.location.reload();
	}