function select(tabid,menu_left,menu_right){

	$(".tab").addClass('hidden');
	$("#"+tabid).removeClass('hidden');
	
	$(".tab_left").removeClass('left_a');
	$(".tab_left").addClass('left_p');
	$("#"+menu_left).removeClass('left_p');
	$("#"+menu_left).addClass('left_a');
	
	$(".tab_right").removeClass('right_a');
	$(".tab_right").addClass('right_p');
	$("#"+menu_right).removeClass('right_p');
	$("#"+menu_right).addClass('right_a');
	
	
	

	return false;

}
function openprogtab(id){

	$(".weekday").addClass('hidden');
	$("#weekday_"+id).removeClass('hidden');
	
	$(".ptab_pipich").removeClass('pipich_tab');
	$("#ptab_pipich_"+id).addClass('pipich_tab');
	
	$(".ptab").removeClass('tab_a');
	$(".ptab").removeClass('tab_p');
	$(".ptab").addClass('tab_p');
	$("#ptab_"+id).removeClass('tab_p');
	$("#ptab_"+id).addClass('tab_a');

	return false;

}
function OPtab(id){

	$(".proj").removeClass('pipich_tab');
	$("#proj_"+id).addClass('pipich_tab');
	$(".bgtab").removeClass('tab_a');
	$(".bgtab").addClass('tab_p');
	$("#bgtab_"+id).removeClass('tab_a');
	$("#bgtab_"+id).addClass('tab_a');
	
	$(".tabentries").addClass('hidden');
	$("#tabentries_"+id).removeClass('hidden');
	
	
	return false;
}	
function navigate(url)
	{window.location=url;}
function redirect(el)
	{window.location=el.value;}
function open_div(id){
	document.getElementById(id).className='show';
	return false;
}
function open_headdiv(id,id1){
	document.getElementById(id).className='show';
	document.getElementById(id1).className='menu_sub_hover';
	return false;
}
function close_headdiv(id,id1){
	document.getElementById(id).className='hide';
	document.getElementById(id1).className='menu_sub';

	return false;

}

	

function open_divv(id){

	document.getElementById(id).className='show';

}

function close_div(id){	

	document.getElementById(id).className='hide';

	return false;

}

function close_divv(id){	

	document.getElementById(id).className='hide';

}



function show_div(id){	

	document.getElementById(id).className='showblock';

}


function hide_div(id){	

	document.getElementById(id).className='hidden';

}



function toggle(name)
{
  $('#'+name).toggleClass('hidden');
  return false;
}



function swtabz(rtab,uid)
{
  tohide = $("#tabbodycontainer_"+uid+" > *");
  
  toshow = $('#tabbody_'+rtab+'_'+uid);
  tohide.addClass('tabbody');
  tohide.removeClass('currenttabbody');
  toshow.addClass('currenttabbody');
  toshow.removeClass('tabbody');
  tohide = $("#tabcontainer_"+uid+" > div");
  toshow = $('#tab_'+rtab+'_'+uid);
  tohide.addClass('tab');
  tohide.removeClass('currenttab');
  toshow.addClass('currenttab');
  toshow.removeClass('tab');
}
  
 function popUp(URL,pwidth,pheight,handler)
 {
   if(handler == null)	handler = 777; 
   window.open(URL, handler, 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+pwidth+',height='+pheight+',left = 600,top = 500');
   return false;          
 }
 function questioning(qid)
 {
 	var checked_radio=$('input:radio[name=radio_voting]:checked').val();
 	if(checked_radio==undefined)
		return;
	$.post("engine.php", { 'act':'questioning','answer_id':checked_radio,'qid':qid,'xp':xp},
  	function(data){
  	$("#voteclback").html(data);
  	},"json");
	return false;
 }
 function open_img(src,id)
 {
 
	 var p = $("#img_"+id);
	 var position = p.position();
     var top= position.top;
     if(top>973)
     top=973;
    
 	$("#big_img_div").attr('style','top:'+top+'px;');
 	$("#big_img_div").removeClass('hidden');
 	$("#big_img").attr('src','datas/awardsimg/'+src);
 	
 }
 function close_img()
 {
 	$("#big_img_div").addClass('hidden');
 }

