function analytics(){
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
}
function subAnalytics(){
	try {
	var pageTracker = _gat._getTracker("UA-1528281-11");
	pageTracker._trackPageview();
	} catch(err) {}
}



tinyMCE.init({
	mode : "textareas",
	theme : "advanced",
	theme_advanced_buttons1 : "formatselect,separator,bold,separator,unlink,link,separator,undo,redo,separator,cleanup,code,help,image",
	theme_advanced_buttons2 : "",
	theme_advanced_buttons3 : "",
	extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
	external_link_list_url : "example_data/example_link_list.js",
	external_image_list_url : "index.php",
	flash_external_list_url : "example_data/example_flash_list.js",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_path_location : "bottom",
	 file_browser_callback : 'myFileBrowser'
});
function goTo(url){
	document.location = "index.php" + url;
}
var xmlHttp
////Zavedeni AJAXU
function GetXmlHttpObject()
{
  var xmlHttp=null;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
  return xmlHttp;
}

function getAgree(target,value){	
	document.getElementById(target).value = value;
}

function checkForm(){
	var email = document.getElementById("login");
	var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(email.value)) {
		alert('Prosím zadejte opravdovou emailovou adresu');
		return false;
	}	
	return true;
}
