
function E(id)
{
	try
	{
		return document.getElementById(id);
	}
	catch (e)
	{
		return false;
	}
	
}

function GetFileName(file_path)
{
	var file_name = file_path;
	var pos = file_path.lastIndexOf('\\');
	if (pos != -1) file_name = file_path.substr(pos + 1);
	return file_name;
}

function GetFileExtension(file_name)
{
	var extension = "";
	var pos = file_name.lastIndexOf('.');
	if (pos != -1) extension = file_name.substr(pos + 1);
	return extension;
}

function TogleVisibility(object)
{
	if (object.style.visibility == "hidden")
		object.style.visibility = "visible";
	else
		object.style.visibility = "hidden";
}

function ToggleDisplay(id)
{
	if (document.getElementById(id).style.display == "none")
		document.getElementById(id).style.display = "block";
	else
		document.getElementById(id).style.display = "none";
}

function jaunslogs(url,id,w,h){var l=eval(screen.width/2-w/2);var t=eval(screen.height/2-h/2);var data="fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=0,directories=no,location=no,width="+w+",height="+h+",left="+l+",top="+t;window.open(url,id,data);}