function colorFilter(id){
    
	var item = document.getElementById(id);
	if(item.className != 'selected'){
		item.className = 'selected';
	}
	else{
		item.className = 'none';
	}
       
}

function changeClass(id){
	var item = document.getElementById(id);
	if(item.className != 'dark'){
		item.className = 'dark';
	}
	else{
		item.className = 'light';
	}
}

function filter(val,ch){
    //alert(val + ch);
    
    hash = location.hash;
    hash = hash.split('#');

    var hash2 = new Array();
    x = 0;
    for(var i in hash){
        if(hash[i] != val){
            hash2[x] = hash[i];
            x++;
        }
    }

    //alert(hash2);
}

function handle_content(page,baseurl)
        {


                var query_string = '';

                $("input[type='checkbox'][name='prog']").each(
                        function()
                        {
                                if(this.checked)
                                {
                                        query_string += "&prog[]=" + this.value;

                                }

                        });

                $("input[type='checkbox'][name='cena']").each(
                        function()
                        {
                                if(this.checked)
                                {
                                        query_string += "&cena[]=" + this.value;
                                }
                        });

                $.ajax(
                        {
                                type: "POST",
                                url: baseurl + "ajax/form.php",
                                data: "id=1" + query_string + "&page=" + page,
                                success:
                                    function(t)
                                {
                                        $("div#content").empty().append(t);
                                },
                                error:
                                        function()
                                        {
                                        $("div#content").append("An error occured during processing");
                                        }
                         });
        }


		

