
	

		function go_to_tutor(value)
		{
				
				window.location='tutor-'+value+'.php';
				
		}

		function ir_a_sitio_externo(value)
		{
			if(value!='') window.location=value;
		}
		
		
		/////////////////////FOR MENUE/////////////////
		///////////////////////////////////////////////
		// JavaScript Document


	var array_act = new Array();
	var array_langu = new Array();
	var semaforo=true;
	var aux;

	function load_lang_menu(lang,a_procesar)
	{
		var inc=1;
		var inc_2=1;
		var pos_cerrar=0;
		var pos_abrir=0;
	
		
		if((lang_activo==a_procesar))//qdq it is to close
		{
			//evitarlo por el momento.
			//document.getElementById(array_langu[lang_activo]+'_menu_item_lang').className='inactive';
			//document.getElementById(array_langu[lang_activo]+'_menu').style.display='none';			 
			//lang_activo=-1;
			
		}else
		if((lang_activo!=a_procesar)&&(lang_activo!=-1))//qdq it is to open
		{
				
			    document.getElementById(array_langu[lang_activo]+'_menu_item_lang').className='inactive';
				 document.getElementById(array_langu[lang_activo]+'_menu').style.display='none';
				//Effect.SlideUp(array_langu[lang_activo]+'_menu');
				document.getElementById(array_langu[a_procesar]+'_menu_item_lang').className='active';
			
				aux=document.getElementById(array_langu[a_procesar]+'_menu');				
			//	window.setTimeout('aux.style.display="block"',100);		
				aux.style.display="block";
				//semaforo=window.setTimeout('Effect.toggle(\''+array_langu[a_procesar]+'_menu\')',500);		
				lang_activo=a_procesar;
			
		}else/*if not selected to open*/
		{
			window.setTimeout('inactive_all_lang()',2);
			document.getElementById(array_langu[a_procesar]+'_menu_item_lang').className='active';
			document.getElementById(array_langu[a_procesar]+'_menu').style.display='block';	
			//new Effect.toggle(array_langu[a_procesar]+'_menu');
			lang_activo=a_procesar;
			
		}		
			
		return true;
	}
	
	
	
	function load_lang_menu_complete(lang,a_procesar)
	{
		var inc=1;
		var inc_2=1;
		var pos_cerrar=0;
		var pos_abrir=0;
	
		
		if((lang_activo==a_procesar))//qdq it is to close
		{
			//evitarlo por el momento.
			document.getElementById(array_langu[lang_activo]+'_menu_item_lang').className='inactive';
			document.getElementById(array_langu[lang_activo]+'_menu').style.display='none';
			 
			lang_activo=-1;
			
		}else
		if((lang_activo!=a_procesar)&&(lang_activo!=-1))//qdq it is to open
		{
				
			    document.getElementById(array_langu[lang_activo]+'_menu_item_lang').className='inactive';
				 document.getElementById(array_langu[lang_activo]+'_menu').style.display='none';
				//Effect.SlideUp(array_langu[lang_activo]+'_menu');
				document.getElementById(array_langu[a_procesar]+'_menu_item_lang').className='active';
			
				aux=document.getElementById(array_langu[a_procesar]+'_menu');				
			//	window.setTimeout('aux.style.display="block"',100);		
				aux.style.display="block";
				//semaforo=window.setTimeout('Effect.toggle(\''+array_langu[a_procesar]+'_menu\')',500);		
				lang_activo=a_procesar;
			
		}else/*if not selected to open*/
		{
			window.setTimeout('inactive_all_lang()',2);
			document.getElementById(array_langu[a_procesar]+'_menu_item_lang').className='active';
			document.getElementById(array_langu[a_procesar]+'_menu').style.display='block';	
			//new Effect.toggle(array_langu[a_procesar]+'_menu');
			lang_activo=a_procesar;
			
		}		
			
		return true;
	}
	
			/////////////////////FOR CSS POPUPS/////////////////
		///////////////////////////////////////////////

function csstoggle(div_id) {
	var el = document.getElementById(div_id);
	if ( el.style.display == 'none' ) {	el.style.display = 'block';}
	else {el.style.display = 'none';}
}

function csswindow_pos(popUpDivVar) {
	if (typeof window.innerWidth != 'undefined') {
		viewportwidth = window.innerHeight;
	} else {
		viewportwidth = document.documentElement.clientHeight;
	}
	if ((viewportwidth > document.body.parentNode.scrollWidth) && (viewportwidth > document.body.parentNode.clientWidth)) {
		window_width = viewportwidth;
	} else {
		if (document.body.parentNode.clientWidth > document.body.parentNode.scrollWidth) {
			window_width = document.body.parentNode.clientWidth;
		} else {
			window_width = document.body.parentNode.scrollWidth;
		}
	}
	var popUpDiv = document.getElementById(popUpDivVar);
	window_width=window_width/2-260;
	//260 is half popup's width
	popUpDiv.style.left = window_width + 'px';
}
function csspopup(windowname) {
	csswindow_pos(windowname);
	csstoggle(windowname);		
}
