// JavaScript Document
function showDraw(){
	leftVal = (screen.width - 790) / 2;
	topVal = (screen.height - 505) / 2;
	window.open('/fun/draw/','Draw','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbar=no, resizable=no, copyhistory=yes,width=790,height=505,left='+ leftVal +', top='+ topVal);
}

function showMixer(){
	leftVal = (screen.width - 780) / 2;
	topVal = (screen.height - 425) / 2;
	window.open('/fun/mixer/','Mixer','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbar=no, resizable=no, copyhistory=yes,width=790,height=425,left='+ leftVal +', top='+ topVal);
}

function showChat(){
	leftVal = (screen.width - 746) / 2;
	topVal = (screen.height - 464) / 2;
	window.open('/chat.view.asp','Friends','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbar=no, resizable=no, copyhistory=yes,width=746,height=463,left='+ leftVal +', top='+ topVal);
}

function showMemoryGame(){
	leftVal = (screen.width - 610) / 2;
	topVal = (screen.height - 425) / 2;
	window.open('/fun/memory/','MemoryGame','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbar=no, resizable=no, copyhistory=yes,width=610,height=425,left='+ leftVal +', top='+ topVal);
}

function showSnowBoardGame(){
	leftVal = (screen.width - 560) / 2;
	topVal = (screen.height - 405) / 2;
	window.open('/fun/snowboard/','SnowBoardGame','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbar=no, resizable=no, copyhistory=yes,width=560,height=405,left='+ leftVal +', top='+ topVal);
}

function terms(){
	leftVal = (screen.width - 640) / 2;
	topVal = (screen.height - 480) / 2;
	window.open('/terms.html','Privicy','resizable=yes, scrollbars=yes, status=no, menubar=no, location=no, width=640, height=480, left='+ leftVal +', top='+ topVal);
}

//get flash
function getFlashMovieObject(movieName){
	if (window.document[movieName]){
		return window.document[movieName];
	}
	if (navigator.appName.indexOf("Microsoft Internet")==-1){
		if (document.embeds && document.embeds[movieName])
			return document.embeds[movieName]; 
	}else{
		return document.getElementById(movieName);
	}
}

/*function paramrefresh(num){
	var flashMovie=getFlashMovieObject("main");
	flashMovie.SetVariable('currscore', num);
}

function chatrefresh(){
	var flashMovie=getFlashMovieObject("chat");
	flashMovie.SetVariable('profileMovie.proStatus', 'Снимката е добавена успешно. Натисни "Промени", за да я видиш.');
}*/