function resize_player(value){
if (value != 'x')
	var prc = value;
else
	var prc = $('#player_size').val();
prc = parseInt(prc);
var max_h = window.innerheight;
max_h_temp = 75*prc/100;
max_h = max_h_temp + "%";
max_w_temp = 54*prc/100;
max_w = max_w_temp + "%";
//adjust the player_holder
$('#Player_holder').height(max_h);
$('#Player_holder').width(max_w);

//playersize = prc + "%";
//$('#Player').height(playersize);
//$('#Player').width(playersize);
}

function resize_chat(value){
if (value != 'x')
	var prc = value;
else
	var prc = $('#chat_size').val();
prc = parseInt(prc);
var max_h = window.innerheight;
max_h_temp = 75*prc/100;
max_h = max_h_temp + "%";
max_w_temp = 44*prc/100;
max_w = max_w_temp + "%";
//adjust the player
$('#sidebar').height(max_h);
$('#sidebar').width(max_w);
}

//loads a page into the sidebar
function load_page(data){ 
document.getElementById("chatbox").style.display = "none";
$("#ump").load("ask.php", { data:data}, null);
}

function close_page(){ 
$('#ump').empty();
document.getElementById("chatbox").style.display = "";
}

//loads a Page in the overlay
function load_overlay(data){ 
$("#overlay").load("ask.php", { data:data}, null);
$("#overlay").height("100%");
$("#overlay").show(450);
}

function close_overlay(){
$("#overlay").hide(450);
}

function load_chat() {
$('#ump').empty();
document.getElementById("chatbox").style.display = "";
}

function close_chat() {
document.getElementById("chatbox").style.display = "none";
}

var headergone = false;
function headerswitch() {
	if(headergone == false){
		document.getElementById("top").style.top = "-99px";
		document.getElementById("sidebar").style.top = "-99px";
		document.getElementById("newsticker").style.top = "-99px";
		document.getElementById("Player_holder").style.top = "-99px";
	headergone = true;
	}
	else {
		document.getElementById("top").style.top = "";
		document.getElementById("sidebar").style.top = "";
		document.getElementById("newsticker").style.top = "";
		document.getElementById("Player_holder").style.top = "";
	headergone = false;
	}
}

var tickergone = false;
function tickerswitch() {
	if(tickergone == false){
		document.getElementById("newsticker").style.display = "none";
	tickergone = true;
	}
	else {
		document.getElementById("newsticker").style.display = "";
	tickergone = false;
	}
}