
function do_vote( uid , stat , base ) {
	obj = document.getElementById('item_' + uid );
	
	if( stat == 1 || stat==-1 ) {
		url = base.replace('templates/main/default','') + 'action.php?user_vote=1&uid=' + uid + '&vote=' + stat ; 
		//alert(url);
		getData( 'item_' + uid , url );
		return;
	}

	img = base + '/img/ctrl/';

	if( stat == 2 ) //show up
		img += 'rating_up.png';
	if( stat == 3 ) //show down
		img += 'rating_down.png';
	if( stat == 0 ) //reset
		img += 'rating.png';

	obj.style.background = 'url(' + img + ')';
	obj.style.backgroundRepeat = 'no-repeat';

}

function top_hover( target , status , base ) {
	
	obj = document.getElementById(target);
	img = base ;
	if(status == 0) img += '_n.png';
	if(status == 1) img += '_h.png';
	//alert(img);
	obj.style.background = 'url(' + img + ')';
	obj.style.backgroundRepeat = 'repeat-x';
}

function open_mail(order_id) {
	loc = www_main + 'inc/page.mail.php?order_id=' + order_id;
	w = window.open( loc , 'Drumcenter Print' , "width=800,height=600,left=100,top=100,status=1,toolbar=1,menubar=1,scrollbars=1");
	w.focus();
}

function open_print(order_id) {
	loc = www_main + 'inc/page.print.php?order_id=' + order_id;
	w = window.open( loc , 'Drumcenter Print' , "width=800,height=600,left=100,top=100,status=1,toolbar=1,menubar=1,scrollbars=1");
	w.focus();
}

function do_sc_refresh( ) {
	loc = www_main + 'class.action.php?action=sc_refresh';
	getData( 'sc_navi' , loc );
}

function do_sc_change( target , idx , item ) {
	var cbo = get_object( 'd_combo_item_' + idx , 'select' , 0 );
	loc = www_main + 'action.php?action=sc_change&cnt=' + cbo.options[cbo.selectedIndex].value + '&uid=' + item ;
	getData( target , loc );
	do_sc_refresh( target );
}

function do_sc_change_class( target , idx , item ) {
	var cbo = get_object( 'd_combo_item_class_' + idx , 'select' , 0 );
	loc = www_main + 'action.php?action=sc_change_class&class=' + cbo.options[cbo.selectedIndex].value + '&uid=' + item ;
	alert(loc);
	getData( target , loc );
}

function do_sc_remove( target , idx , item ) {
	loc = www_main + 'action.php?action=sc_remove&uid=' + item ;
	if (confirm("Sind Sie sicher?"))  {
		getData( target , loc );
		do_sc_refresh( );
	}
}