﻿window.onresize = resize;

swfobject.embedSWF("loader.swf", "flashContent", "100%", "100%", "10.2.0", "swfobject/expressInstall.swf", {}, {bgcolor: "000000", allowfullscreen:true});

//use FBJSBridge embed
//embedSWF("loader.swf", "flashContent", "100%", "600", "10.0.0", {}, {bgcolor: "FFFFFF", allowfullscreen:true}, {}, "swfobject/expressInstall.swf");
resize();

function resize()
{
	if(document.getElementById("flashContent")) {
	iw = ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth );
	ih = ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight );
	if(980>iw) {
			document.getElementById("flashContent").width = 980;
		} else {
			document.getElementById("flashContent").width = "100%";
	}	
	if(600>ih) {
		document.getElementById("flashContent").height = 600;
	} else {
		document.getElementById("flashContent").height = ih;
	}
	}
	
}

//Redirect for authorization for application loaded in an iFrame on Facebook.com 
function redirect(id,perms,uri) {
	var params = window.location.toString().slice(window.location.toString().indexOf('?'));
	top.location = 'https://graph.facebook.com/oauth/authorize?client_id='+id+'&scope='+perms+'&redirect_uri='+uri+params;				 
}

function getLocation() {
	return document.location.href;
}

