// JavaScript Document
function getgame(name)   
{   
	/*var url = "";
	if(name =="testyourstrength"){
		url = "http://www.vimto.co.uk/games/testyourstrength.html";	
	}
    my_window= window.open (url,"Vimto_Games","status=0,width=960,height=540"); */
	//alert('test');
	fadein(0,'fullBox');
	window.onbeforeunload = function () {
   		return "You have not saved your document yet.  If you continue, your work will not be saved.";
	}
} 

var fadeinSpeed = 20; 
var current=0;
var temp = 0;
	
function fadePannelin() {
	
	document.getElementById("fullBox").style.filter="alpha(opacity=100)";
	document.getElementById("fullBox").style.MozOpacity=(100/100);
	document.getElementById("fullBox").style.KhtmlOpacity=(100/100);
	document.getElementById("fullBox").style.visibility = "visible";
	document.body.margin = 0;
	document.body.style.margin = 0;
	$('#flashGame').flash({ src: 'http://cdn.cloudfiles.mosso.com/c108632/strength.swf' });
}
	
function fadePannelout() {
	document.getElementById("fullBox").style.filter="alpha(opacity=0)";
	document.getElementById("fullBox").style.MozOpacity=(0/100);
	document.getElementById("fullBox").style.KhtmlOpacity=(0/100);
	document.getElementById("fullBox").style.visibility = "hidden";
	document.body.scroll="yes";
	document.body.style.overflow = "visible";
	document.body.overflow = "visible";
	document.getElementById('flashGame').innerHTML = "";
	window.onbeforeunload = function () {}
}
	
function fadein(current,id){
	document.getElementById(id).style.visibility = "visible";
	var temp = current+fadeinSpeed;
	if(temp<=80){
		document.getElementById(id).style.filter="alpha(opacity="+temp+")";
		document.getElementById(id).style.MozOpacity=(temp/100);
		document.getElementById(id).style.KhtmlOpacity=(temp/100);
		setTimeout("fadein("+temp+",'"+id+"')",0.1);
	}else  fadePannelin();}
	
function fadeout(current,id){
	var temp = current-fadeinSpeed;
	if(temp>=0){
		document.getElementById(id).style.filter="alpha(opacity="+temp+")";
		document.getElementById(id).style.MozOpacity=(temp/100);
		document.getElementById(id).style.KhtmlOpacity=(temp/100);
		setTimeout("fadeout("+temp+",'"+id+"')",0.1);
	}else  fadePannelout();}