// JavaScript Document
function load_ok_popup(popup_text,overlay_div,top,left,opacity)
{
		if (typeof top == 'undefined' ||  top == "") top = 250;
		if (typeof left == 'undefined' ||  left == "") left = "center";
		if (typeof opacity == 'undefined' ||  opacity == "") opacity = 0;
		if (typeof overlay_div == 'undefined' ||  overlay_div == "") overlay_div = 'body';

		$(".st_popup_text").html(popup_text)
		$(".button_ok_div img").bind("click",function(){
												var selector=overlay_div;
												if (overlay_div!='body')
												{
												selector="#"+overlay_div;
												$(selector+" div:last").trigger("click");
												}
												else
												{$("body").trigger("click");}
												$(".button_ok_div img").unbind("click");
												});
			$(".st_popup").overlay({
				speed:200,
				top:top,
				left:left,
				expose: 
				{ 
					color: '#000', 
					loadSpeed: 200,
					opacity: opacity,
					element:overlay_div
				},
				api: true,
				onClose: function() { 
					if(window.location.href.split("/")[3]=='activities' || window.location.href.split("/")[3]=='world' || (window.location.href.split("/")[3]=='games' && navigator.appName=='Microsoft Internet Explorer'))
					{
						window.location='/';
					}
				}
			}).load();
}
