function validEmail(email) {
			
	zleZnaki = "/:,;"
	
	if (email == "") return false
	
	for (i=0; i<zleZnaki.length; i++) {
		zlyZnak = zleZnaki.charAt(i)
		if (email.indexOf(zlyZnak,0) != -1) return false
	}
	
	malpaPoz = email.indexOf("@",0)
	if (malpaPoz == -1 || malpaPoz == 0) return false
	
	if (email.indexOf("@",malpaPoz+1) != -1) return false
	
	kropkaPoz = email.indexOf(".",malpaPoz)
	if (kropkaPoz == -1 || kropkaPoz == malpaPoz+1) return false
	
	if (kropkaPoz+3 > email.length) return false
	
	return true
	
}



/* prealad images */

var count_images = 0
var images_src = []

function preload_images(pliki) {
	for (i = 0; i < pliki.length; i++) {
		count_images++
		images_src[count_images] = new Image()
		images_src[count_images].src = pliki[i]
	}	
}

/* prealad images stop */



function kubaSelectSet(fieldId, list, selected) {
	
	$(fieldId).length = 0
	list.each(function(item) {
		if (item) { // tu jest jakis bug w iterowaniu w Prototype ...
		
			var option = document.createElement('option')
			option.value = item[0]
			option.text = item[1]
			if (item[0] == selected) option.selected = true
			
			try {
				$(fieldId).add(option, null) // standards compliant; doesn't work in IE
			}
			catch(ex) {
				$(fieldId).add(option) // IE only
			}	
			
		}
	})
	
}
