function dispatchLinker(src)
 {
  	window.open(src, 777 , 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=800,height=600,left = 600,top = 500');
 }
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 open_menu(id,pid){

	document.getElementById(id).className='show';
	document.getElementById(pid).className='leftmenu_a';
	return false;

}
function navigate(url)

	{window.location=url;}
function redirect(el)

	{window.location=el.value;}
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 ghover(id,src)
 {
 	$('.img_marging').removeClass('gsel');
 	$('.img_marging').addClass('gunsel');
 	$('#small_'+id).removeClass('gunsel');
 	$('#small_'+id).addClass('gsel');
 	
 	$('.big_image').removeClass('gshow');
 	$('.big_image').addClass('ghide');
 	$('#big_'+id).removeClass('ghide');
 	$('#big_'+id).addClass('gshow');

 	$('#front_title').text(gtitles[id]);
 	$('#front_text').text(gshorts[id]);
 	
 	return false;
 }
 
 function region_cover(id)
 {
	$('#result').html('<img src="img/loaderm.gif" class="position_loader"/>');
	$.post("EngineFront.php", {'act':'region_cover','id':id,'xp':xp},
	function(data)
	{
		$('#result').empty();
		$('#result').html(data.result);
		if(data.type==1)
		{
			$.scrollTo('#result', {duration:700}); 
		}
		$('#result').fadeIn("slow");
		
	 }, "json");
 }
 function sports(iid,pid)
 {
	 $('#result').html('<img src="img/loaderm.gif" class="position_loader"/>');
	 $.post("EngineFront.php", {'act':'sports','iid':iid,'pid':pid,'xp':xp},
	 function(data)
	 {
		 $('#result').empty();
		 $('#result').html(data);
		 $.scrollTo('#result', {duration:2000}); 
		 $('#result').fadeIn("slow");
		 }, "json");
 }
 function schools(id,item,cat)
 {
	 $('#result').html('<img src="img/loaderm.gif" class="position_loader"/>');
	 $.post("EngineFront.php", {'act':'schools','id':id,'item':item,'cat':cat,'xp':xp},
	 function(data)
	 {
		 $('#result').empty();
		 $('#result').html(data);
		 $('#result a').cluetip({sticky: true, closePosition: 'title', arrows: true, local:true, cursor: 'pointer',closeText:'X',activation: 'click'});
		  $.scrollTo('#result', {duration:2000}); 
		 $('#result').fadeIn("slow");
		 
	 }, "json");
 }

