$(document).ready(function(){

  $("#tog-partneri").click(function() {
    
    $("#partnerske-stranky").slideToggle("slow");
    //$("#partnerske-stranky").slideDown("slow");
  
  });

});

$(document).ready(function(){

  $("#tog-kluby").click(function() {
    
    $("#klubove-stranky").slideToggle("slow");
    //$("#partnerske-stranky").slideDown("slow");
  
  });

});


function letternumber(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 (((":0123456789").indexOf(keychar) > -1))
return true;
else
return false;
}	


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

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('Please enter correct email address!');
    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;
}	

/*
startList=function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("IDddmenu").firstChild;
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" CSSover";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" CSSover", "");
				}
			}
		}
	}
}


window.onload=startList;
*/


function livepopup() 
	{
	WinFeatures = 'scrollbars=no,status=no,resizable=no,width=270,height=270';
	ShowWindow = window.open('live_window.php','info',WinFeatures);
	}


function uploadpopup(parameter) 
	{
	WinFeatures = 'scrollbars=no,status=no,resizable=no,width=320,height=60';
	ShowWindow = window.open('pages_user/upload_popup.php'+parameter,'info',WinFeatures);
	}
function insertimagepopup() 	
	{
	WinFeatures = 'scrollbars=yes,status=no,resizable=yes,width=422,height=400';
	ShowWindow = window.open('pages_user/filemanager/browse.php','info',WinFeatures);
	}
function setImage (imgname)
	{
	document.settings_form.user_icon.value=imgname;
	document.user_image.src = imgname;
	}

function setownImage (imgname)
	{
	document.settings_form.user_icon.value=imgname;
	document.user_image.src = 'icony/users/'+imgname;
	}

function setownPhoto (imgname,cislo_adresara)
	{
	foto_id=imgname.split("."); 
	document.fotozabava_form.foto_id.value=foto_id[0];
	document.user_image.src = 'photos_zabava/thumb'+cislo_adresara+'/'+imgname;
	pathpath= 'photos_zabava/thumb'+cislo_adresara+'/'+imgname;
	}
