
function changeSite(form){
	
	var index = form.counter_ids.selectedIndex;
	var new_counter_id =  form.counter_ids.options[index].value;
	
	//var check_month_set = form.counter_ids.show_month_set.value;
	//var check_year_set = form.counter_ids.show_year_set.value;
	
	var show_day_add = '&show_day=' + form.show_day.value;
	var show_month_add = '&show_month=' + form.show_month.value;
	var show_year_add = '&show_year=' + form.show_year.value;
	
	if(form.show_year_set.value == 1){
		var add_url = "&show_year_set=1&without_save=1";
	}
	else if(form.show_month_set.value == 1){
		var add_url = "&show_month_set=1&without_save=1";
	}	
	else{
		var add_url = "";
	}
	
	add_url = add_url + show_day_add + show_month_add + show_year_add;
	
	var url = form.change_url.value;
	var comp_url = url + "?counter_id=" + new_counter_id + add_url;
	window.document.location.href = comp_url;

}

function changeToplistCat(form){
	
	var index = form.cat_name.selectedIndex;
	var new_toplist_cat =  form.cat_name.options[index].value;
	var url = '../toplist_change.php?cat_name=';
	var comp_url = url + new_toplist_cat;
	window.document.location.href = comp_url;

}

function changeToplistRank(form){
	
	var index = form.rank_sel.selectedIndex;
	var new_toplist_rank =  form.rank_sel.options[index].value;
	
	var new_cat_name =  form.cur_toplist.value;
	var url = '../toplist_change.php?cat_name=' + new_cat_name;
	var comp_url = url + '&cur_rank=' + new_toplist_rank;
	window.document.location.href = comp_url;

}

function MultiFrames(url1_add, frame1, url2_add, frame2)
{
	//alert(parent.frames[frame1].location.href + url1_add);
	//document.write(parent.frames[frame1].location.href);
	parent.frames['xhittask'].location.href = 'change_frame.php?set_new_date=1&url=' + parent.frames['xhittask'].location.href + '&sep=sep' + url1_add;
	parent.frames['loginmain'].location.href =  'change_frame.php?set_new_date=1&url=' + parent.frames['loginmain'].location.href + '&sep=sep' + url2_add;
	//parent.frames[frame2].location.href = parent.frames[frame2].location.href + url2_add;

}

function MultiFrames_error(url1, url2)
{
	//alert(parent.frames[frame1].location.href + url1_add);
	//document.write(parent.frames[frame1].location.href);
	parent.frames['xhittask'].location.href = url1;
	parent.frames['loginmain'].location.href =  url2;
	//parent.frames[frame2].location.href = parent.frames[frame2].location.href + url2_add;

}

function confirmLink(theLink, message, counter)
{


    var message_show = 'Counter ' + counter + ' ' + message;
	
    var is_confirmed = confirm(message_show);
    if (is_confirmed) {
        theLink.href += '?is_js_confirmed=1';
    }

    return is_confirmed;
} // end of the 'confirmLink()' function

function open_help(help_id) {

        var height = 300;
        var width= 350;
        var url = 'help.php?id=' + help_id;
        var help_window = window.open(url, 'Hilfe', 'width=' + width + ',height=' + height+',resizable=0,scrollbars=1,menubar=no,status=no,resizable=no');
	help_window.focus();
	
}



