//OPEN LINKS IN NEW WINDOW
function externalLinks(){
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank";
	}
}
function setMaxSize(){
	if (!document.getElementById) return;
	var fla_div = document.getElementById("fla_content");
	var win_h = window.innerHeight;
	var win_w = window.innerWidth;
	//Deal with resonable browsers
	if(!isNaN(win_h)){
		try{
			fla_div.style.height = win_h < 580 ? 580 + "px"  : win_h + "px";
			fla_div.style.width = win_w < 990 ? 990 + "px"  : win_w + "px";
			return;
		}catch(err){};
	};
	//Deal with the rest....IE for instance
	win_h = isNaN(win_h) ? document.body.clientHeight : win_h;
	win_w = isNaN(win_w) ? document.body.clientWidth : win_w;
	try{
		fla_div.style.height = win_h < 580 ? 580 + "px" : win_h + "px";
		fla_div.style.width = win_w < 990 ? 990 + "px"  : win_w + "px";
		return;
	}catch(err){};
}
function onLoad(){
	setMaxSize();
	externalLinks();
}
function onResize(){
	setMaxSize();
}
window.onresize = onResize
window.onload = onLoad;
