dialogClose = function() {
		$('#dialog').animate({"opacity":" 0"},"fast",function() {
														$('#dialog').html("")
													});
		$('#dialog').css({"top":"0px",
						 "left":"0px",
						 "opacity":" 0"});
		$('#scDisp').html("");
}

_popUp = function(ar,comment) {
	//	ar = encodeURIComponent(ar);
		$('#scDisp').html("<div id=\"myScreen\"></div><div id=\"dialogMap\"></div>");
		var b_width = $('body').width();
		var b_height = $('body').height();
		var d_width = Math.round($('#dialogMap').width()/2);
		var d_left = Math.round(b_width/2) - d_width;
		var d_height = Math.round($('#dialogMap').height()/2);
		var vH = parseInt( $( window ).height() );
		var pS =  parseInt( $( document ).scrollTop() );
		var d_top = pS + Math.round(vH/5);
		
		var h_1 = document.body.clientHeight;
		var h_2 = document.body.scrollHeight;
		var h_3 = document.documentElement.scrollHeight;
		var h_4 = document.documentElement.clientHeight;
		var H = Math.max(h_1,h_2,h_3,h_4);
		
		$('#dialogMap').css({
							"top": d_top,
							"left": d_left + "px",
						 	"opacity":" 0"});
		$('#myScreen').css({"width":b_width + "px",
						//	"height": b_height + "px",
							"height": H + "px",
							"opacity": "0"})
					  .animate({"opacity":"0.7"},"fast",function(){$('#dialogMap').animate({"opacity":" 1"},"fast",function(){
					  																						$('#dialogMap').html("<div id='innerDialog'><img src='"+ar+"' width='400'><div class='innerDialogMsg'>"+comment+"</div><form id='innerImg'><input type='button' value='ウィンドウを閉じる' onClick=\"dialogClose()\"></form></div>");
					  																						})
					  									})
}
