function open_icon_pop(img)
{
	var pop = window.open('icons_instructions.html?img=' + img, 'icon', 'scrollbars=no, status=no, location=no, toolbar=no, width=600, height=350');
  !pop ? alert('Please disable your popup blocker and try again.') : '';
}  

function open_pop(url,widthPop,heigthPop)
{
	 var left   = (screen.width  - widthPop)/2;
	 var top    = (screen.height - heigthPop)/2;
	 var params = 'width='+widthPop+', height='+heigthPop;
	 params += ', top='+top+', left='+left;
	 params += ', directories=no';
	 params += ', location=no';
	 params += ', menubar=no';
	 params += ', resizable=no';
	 params += ', scrollbars=no';
	 params += ', status=no';
	 params += ', toolbar=no';
	 newwin=window.open(url,'windowname5', params);
	 !newwin ? alert('Please disable your popup blocker and try again.') : '';  
	 if (window.focus) {newwin.focus()}
	 return false;
}

function open_wallpaper_pop(img)
{
  var pop = window.open('wallpaper_instructions.html?img=' + img, 'wallpaper', 'scrollbars=no, status=no, location=no, toolbar=no, width=970, height=550');
  !pop ? alert('Please disable your popup blocker and try again.') : '';
}

function open_twitter_pop(img)
{
	var pop = window.open('twitter_instructions.html?img=' + img, 'twitter', 'scrollbars=no, status=no, location=no, toolbar=no, width=970, height=550');
  !pop ? alert('Please disable your popup blocker and try again.') : '';
}

function open_screensaver_pop(img)
{
  var pop = window.open('screensaver_instructions.html?img=' + img, 'sacreensaver', 'scrollbars=no, status=no, location=no, toolbar=no, width=970, height=550');
  !pop ? alert('Please disable your popup blocker and try again.') : '';
}

function open_register_pop()
{
	var pop = window.open('http://www.sonypictures.com/movies/takers/registration/', 'register', 'scrollbars=no, status=no, location=no, toolbar=no, width=450, height=520');
  !pop ? alert('Please disable your popup blocker and try again.') : '';
}

function open_twibbon_pop()
{
	alert('open_twibbon_pop');
	var pop = window.open('http://www.whoarethetakers.com/twitter', 'twibbon', 'scrollbars=no, status=no, location=no, toolbar=yes');
  !pop ? alert('Please disable your popup blocker and try again.') : '';
}


function open_share(link)
{
	var pop = window.open( link, 'share', '' );
	  !pop ? alert('Please disable your popup blocker and try again.') : '';
}

function game_share( url, title )
{
		var pop = window.open( "http://facebook.com/share.php?u=" + url + "&t=" + title, 'share', '' );
	  !pop ? alert('Please disable your popup blocker and try again.') : '';
}

function open_rating(link)
{
		var pop = window.open( link, 'open_rating', '' );
	  !pop ? alert('Please disable your popup blocker and try again.') : '';
}

function open_page(link)
{
 		var pop = window.open( link, 'open_rating', '' );
	  !pop ? alert('Please disable your popup blocker and try again.') : '';
}

window.onfocus  = function()
{
	try
	{
		if ($("#overlayPlayer").is(":hidden"))
		{
			var theSwf = document.getElementById(parentSwf);
			if (theSwf)
				if(theSwf.HandleWindowFocus)
					theSwf.HandleWindowFocus();
		}
	}
	catch(error){}
}

