
	var show = null;
	var idt = null;
	var sc = null;

	function kuk(id){
		window.location.assign('?pid=kamence&sc=vizualizacia&byt='+id);
	}
	
	//tato funkcia zavola zobrazenie lyteboxu
	function runs(file, skupina, title ){
		initLytebox();
		var aa  = document.createElement('a');
		aa.href = file;
		aa.rel  = "lytebox";
		
		//alert(file);
		
		if (title) {
			aa.title = 'ssss';
		}
		myLytebox.start(aa, false, false);
	}
	
	function s(){
		show = idt;
	}

	function runkamence_g(id){
		initLytebox();
		var aa  = document.createElement('a');
		
		if (!sc) {
			sc = "vizualizacia";
		} else {
			sc="lokalita";
		}
		
		
			aa.href = "projects/kamence/kamence_male.php?idb="+id+"&sc="+sc;
	
		aa.rev="width: 810px; height: 525px; scrolling: no;";
		aa.rel  = "lyteframe";		
		myLytebox.start(aa, false, true);
		idt = id;
		sc=null;
	}


	function runkamence(id){
		initLytebox();
		var aa  = document.createElement('a');
		
		pole = location.href.split('?pid=');
	
		if (pole[1]=='kamence2') {
			aa.href = "projects/kamence2/kamence_male.php?idb="+id;
		} else {
			aa.href = "projects/kamence/kamence_male.php?idb="+id;
		}
		
			
		
		aa.rev="width: 810px; height: 525px; scrolling: no;";
		aa.rel  = "lyteframe";		
		myLytebox.start(aa, false, true);
		idt = id; 
	}
	
	function runsarv ( def, vs, back ){
	
			sc="asasd";
			runsar( def, vs, back );
	}
	
		
	function runsar( def, vs, back ){
			
		if (idt){
			if (!show){
				show = idt;
			}
		}
			
			
		initLytebox();
		pole = vs.split('--');
		apole = new Array();
		document.getElementById('tmpl').innerHTML = ''; 
		for (i=0;i<pole.length;i++ )
		//for (x in pole)
			{
					//var newdiv = document.createElement('div');
						var aa  = document.createElement('a');
						aa.href = pole[i];
						aa.rel  = "lytebox[vacation]";
						aa.innerHTML = pole[i];
						document.getElementById('tmpl').appendChild(aa);
						
						//apole.push(aa);			
			}
			var aa  = document.createElement('a');
			aa.href = def;
			aa.rel  = "lytebox[vacation]";

									
		//alert(apole.length);
		myLytebox.initialize();
		myLytebox.start(aa, false, false);	
	}