/* INIT JQUERY AND STUFF */
/*
$(document).ready(function(){

  try {
		document.execCommand("BackgroundImageCache", false, true);
	} catch(err) { }

  //$("#treemenu2 li.submenu").addClass("suback");
  
});
*/







//time=new Date() - time;
//alert (time);







function popwin(cesta, width, height) 
	{
	WinFeatures = 'toolbar=no,scrollbars=no,status=no,resizable=yes,width='+width+',height='+height;
	ShowWindow = window.open(cesta,'info',WinFeatures);
	}

function showpic(language,cesta, width, height) 
	{
	WinFeatures = 'toolbar=no,scrollbars=no,status=no,resizable=yes,width='+width+',height='+height;
	ShowWindow = window.open('showpic.php?language='+language+'&path='+cesta,'info',WinFeatures);
	}

function showpic_scrollbar(language,cesta, width, height) 
	{
	WinFeatures = 'toolbar=no,scrollbars=yes,status=no,resizable=yes,width='+width+',height='+height;
	ShowWindow = window.open('showpic.php?language='+language+'&path='+cesta,'info',WinFeatures);
	}


function targetBlank(href) {
	var newWindow = window.open(href, "print_page", "toolbar=yes,titlebar=yes,directories=yes,menubar=yes,location=yes,scrollbars=yes,status=yes,resizable=yes");

	if(!newWindow) return false;
	return true;
}


function stripHTML(oldString) {

var re= /<\S[^>]*>/g; 
oldString = oldString.replace(re,""); 
return oldString;
  
}

function isEmailAddress (string) {
  var addressPattern = 
    /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
  return addressPattern.test(string);
}
function checkEmail (field) {
  if (!isEmailAddress(field.value)) {
    alert('Prosím vložte správnu e-mailovú adresu!');
    field.focus();
    field.select();
  }
}






// script by 1999 Idocs, Inc. http://www.idocs.com
function pismenacisla(e)
{
var key;
var keychar;
if (window.event)
key = window.event.keyCode;
else if (e)
key = e.which;
else
return true;
keychar = String.fromCharCode(key);
keychar = keychar.toLowerCase();
// control keys
if ((key==null) || (key==0) || (key==8) || 
(key==9) || (key==13) || (key==27) )
return true;
// alphas and numbers
else if ((("abcdefghijklmnopqrstuvwxyz0123456789").indexOf(keychar) > -1))
return true;
else
return false;
}	

