function tg_tray(tip,act){
	if (act==1) document.getElementById('tray_'+tip).style.height='480px';
	else document.getElementById('tray_'+tip).style.height='330px';
}

function window_pop ( url, name, width, height ){
	var popup = window.open (url, name, "height=" + height + ", width=" + width + ", resizable=yes, scrollbars=yes");
	// Just in case the window already exists, so the window will appear still!
	popup.focus();
}

function smiley_bbcode ( form_name, textbox_name, text ){
	if ( document.all )
	{
		var textbox = document.forms[form_name].elements[textbox_name];
	}
	else
	{
		var textbox = document.getElementById(textbox_name);
	}
	
	var caretPos = textbox.caretPos;
	
	if ( textbox.createTextRange && textbox.caretPos )
	{
		caretPos.text = ( caretPos.text.charAt(caretPos.text.length - 1) == '' ) ? text + ' ' : text;
	}
	else
	{
		textbox.value += ' ' + text + ' ';
	}
	Calcul();
	textbox.focus (caretPos);
}

function storeCaret ( text ){
	if ( text.createTextRange )
	{
		text.caretPos = document.selection.createRange().duplicate();
	}
}

function livescore()
{
	
	window.open("ls/ls_live.php","","width=800,height=600");
}

