//====Rezolution=========

//========================
function Al()
{
	alert('Under construction!');
}
function tabh(id,srcs)
{
 obj=document.all(id);
 obj.src= srcs;
}
function tab(id,srcs)
{
 obj=document.all(id);
 obj.src= srcs;
 document.cookie="img";
}
function processMyForm()
{
	alert('Under construction!');
}
function tm(id)
{
 obj=document.all(id);
  if (obj.style.display == '')
    obj.style.display= 'none';
  else
    obj.style.display = '';
}
function tmh(id)
{
	if (id=='1')
	{
		obj=document.all('Label1');
		obj.style.display= 'none';
		obj=document.all('Label2');
		obj.style.display= '';
		for(i=1;i<=30;i++)
		{
			var s;
			s='td'+i;
			obj=document.all(s);
			obj.style.display= 'none';
		}	
	/* -------------------------- */
		for(i=41;i<=60;i++)
		{
			var s;
			s='td'+i;
			obj=document.all(s);
			obj.style.display= '';
		}
	}
	if(id=='2')
	{
		obj=document.all('Label2');
		obj.style.display= 'none';
		obj=document.all('Label1');
		obj.style.display= '';
		for(i=41;i<=60;i++)
		{
			var s;
			s='td'+i;
			obj=document.all(s);
			obj.style.display= 'none';
		}
		/*-------------------------------*/
		for(i=1;i<=30;i++)
		{
			var s;
			s='td'+i;
			obj=document.all(s);
			obj.style.display= '';
		}
	}
}
/*====================TabMenuCatedre functions===================*/
function MouseClickImgT(img_id,path)
				{				
					var src;
					var i;
					//*****************************************************************************************
					document.getElementById(img_id).src=path;
					switch(img_id)
					{					
						case "im1":
						{
							document.getElementById('im2').src="../img/tabCatedre/im22.gif";
							document.getElementById('im3').src="../img/tabCatedre/im33.gif";
							document.getElementById('im4').src="../img/tabCatedre/im44.gif";
							document.getElementById('im5').src="../img/tabCatedre/im55.gif";
							//--
							document.getElementById('scrtist').style.display="";
							document.getElementById('person').style.display="none";
							document.getElementById('activit').style.display="none";
							document.getElementById('public').style.display="none";
							document.getElementById('discipl').style.display="none";
							break;
						}
						case "im2":
						{
							document.getElementById('im1').src="../img/tabCatedre/im12.gif";
							document.getElementById('im5').src="../img/tabCatedre/im55.gif";
							document.getElementById('im3').src="../img/tabCatedre/im33.gif";
							document.getElementById('im4').src="../img/tabCatedre/im44.gif";
							//--
							document.getElementById('scrtist').style.display="none";
							document.getElementById('person').style.display="";
							document.getElementById('activit').style.display="none";
							document.getElementById('public').style.display="none";
							document.getElementById('discipl').style.display="none";
					
							break;
						}
						case "im3":
						{
							document.getElementById('im1').src="../img/tabCatedre/im11.gif";
							document.getElementById('im2').src="../img/tabCatedre/im21.gif";
							document.getElementById('im4').src="../img/tabCatedre/im44.gif";
							document.getElementById('im5').src="../img/tabCatedre/im55.gif";
							//--
							document.getElementById('activit').style.display="";
							document.getElementById('person').style.display="none";
							document.getElementById('scrtist').style.display="none";
							document.getElementById('public').style.display="none";
							document.getElementById('discipl').style.display="none";
							break;
						}
						case "im4":
						{
							document.getElementById('im1').src="../img/tabCatedre/im11.gif";
							document.getElementById('im2').src="../img/tabCatedre/im22.gif";
							document.getElementById('im3').src="../img/tabCatedre/im31.gif";
							document.getElementById('im5').src="../img/tabCatedre/im55.gif";
							//--
							document.getElementById('public').style.display="";
							document.getElementById('person').style.display="none";
							document.getElementById('scrtist').style.display="none";
							document.getElementById('activit').style.display="none";
							document.getElementById('discipl').style.display="none";

							break;
						}
						case "im5":
						{
							document.getElementById('im1').src="../img/tabCatedre/im11.gif";
							document.getElementById('im2').src="../img/tabCatedre/im22.gif";
							document.getElementById('im3').src="../img/tabCatedre/im33.gif";
							document.getElementById('im4').src="../img/tabCatedre/im41.gif";
							//--
							document.getElementById('discipl').style.display="";
							document.getElementById('person').style.display="none";
							document.getElementById('scrtist').style.display="none";
							document.getElementById('activit').style.display="none";
							document.getElementById('public').style.display="none";

							break;
						}					
					}

				}
/*====================TabMenuCatedre functions===================*/
function SetCookie(img_id,part_id1,part_id2,path)
		{
				document.all("img_id").value=img_id;
				document.all("part_id1").value=part_id1;
				document.all("part_id2").value=part_id2;
				document.all("path").value=path;
		}
function GetCookie(property)
		{
				var idValue=document.all(property).value;
				return idValue;
		}
function MouseClickImg()
				{				
					var src;
					var i;
					//*****************************************************************************************
					//***************************Change tabs <img> sources********************************
					//*****************************************************************************************
					var img_id=GetCookie("img_id");
					var part_id1=GetCookie("part_id1");
					var part_id2=GetCookie("part_id2");
					var path=GetCookie("path");;
					var td_id="TD"+img_id;
					var tdCol=document.getElementsByTagName("td");
					for (i=0;i<tdCol.length;i++)
						{
							index=tdCol.item(i).id.indexOf("TD",0);
							if (index!=-1)
							{
								if ((part_id1.indexOf("Top",0)!=-1)||(part_id2.indexOf("Top",0)!=-1))									
									if 	(tdCol.item(i).id==td_id) 
									{
										tdCol.item(i).setAttribute("background","../img/TabStrip/tb2.gif",false);
									}
									else
									{								
										if (tdCol.item(i).id.indexOf("Top")!=-1)
											tdCol.item(i).setAttribute("background","../img/TabStrip/tb1.gif",false);
										if (tdCol.item(i).id.indexOf("Bottom")!=-1)
											tdCol.item(i).setAttribute("background","../img/TabStrip/tb2.gif",false);
									}
								if ((part_id1.indexOf("Bottom",0)!=-1)||(part_id2.indexOf("Bottom",0)!=-1))
									if 	(tdCol.item(i).id==td_id) 
									{
										tdCol.item(i).setAttribute("background","../img/TabStrip/tb1.gif",false);
									}
									else
									{								
										if (tdCol.item(i).id.indexOf("Bottom")!=-1)
											tdCol.item(i).setAttribute("background","../img/TabStrip/tb2.gif",false);
										if (tdCol.item(i).id.indexOf("Top")!=-1)
											tdCol.item(i).setAttribute("background","../img/TabStrip/tb1.gif",false);
										
									}
							}
							
						}					
					//*****************************************************************************************
					//***************************Setting tabctrl button's top or bottom borders****************
					//*****************************************************************************************													
					for (i=0;i<document.all.length;i++)					
					{
						var index;
						if(document.all(i).id!=null)
						{
							index=document.all(i).id.indexOf("TD",0);
							if (index!=-1)
							{
								//Upper td
								if (document.all(i).style.borderBottomStyle.indexOf("solid",0)!=-1) 
								{
								document.all(i).style.borderBottomWidth="1px";
								document.all(i).style.borderBottomStyle="solid";
								document.all(i).style.borderBottomColor="#7997b7";
								}
								//Lower td
								if (document.all(i).style.borderTopStyle.indexOf("solid",0)!=-1) 
								{
								document.all(i).style.borderTopWidth="1px";
								document.all(i).style.borderTopStyle="solid";
								document.all(i).style.borderTopColor="#7997b7";
								}
							}
						}
																	
					}
					if (document.all(td_id).style.borderBottomStyle.indexOf("solid",0)!=-1)
					{	
					document.all(td_id).style.borderBottomColor="#f5f5f5";
					}
					
					if (document.all(td_id).style.borderTopStyle.indexOf("solid",0)!=-1)
					{ 
					document.all(td_id).style.borderTopColor="#f5f5f5";
					}
					
					//*****************************************************************************************
					//*****************************Setting tabctrl button's left or right borders**************
					//*****************************************************************************************
					for (i=0;i<tdCol.length;i++)					
					{					
						var index;
						
							index=tdCol.item(i).id.indexOf("TD",0)
							if (index!=-1)
							{
								//if 	(tdCol.item(i).id==td_id) 
								{
								//Take Off left border					
								tdCol.item(i).style.borderLeft="none";
					
								//Take Off right border
								tdCol.item(i).style.borderRight="none";
								}
							}
						
					}
					
					if ((part_id1.indexOf("Part")!=-1) && (part_id2.indexOf("Part")!=-1))
					{
					document.all(td_id).style.borderLeftWidth="1px";
					document.all(td_id).style.borderLeftStyle="solid";
					document.all(td_id).style.borderLeftColor="#7997b7";
					
					document.all(td_id).style.borderRightWidth="1px";
					document.all(td_id).style.borderRightStyle="solid";
					document.all(td_id).style.borderRightColor="#7997b7";
					}
					if ((part_id1.indexOf("-1")!=-1)&&(part_id2.indexOf("Part")!=-1))
					{
					document.all(td_id).style.borderRightWidth="1px";
					document.all(td_id).style.borderRightStyle="solid";
					document.all(td_id).style.borderRightColor="#7997b7";
					}
					if ((part_id1.indexOf("Part")!=-1)&&(part_id2.indexOf("-1")!=-1))
					{
					document.all(td_id).style.borderLeftWidth="1px";
					document.all(td_id).style.borderLeftStyle="solid";
					document.all(td_id).style.borderLeftColor="#7997b7";
					}
										
					
					//*****************************************************************************************
					//*****************************Change partition <img> sources******************************
					//*****************************************************************************************
					for (i=0;i<document.all.length;i++)					
					{
						if(document.all(i).id!=null)
						{
							if (document.all(i).id.indexOf("Top",0)!=-1)
							{	
								document.all(i).src="../img/TabStrip/tb1p.gif";
								
							}
																		
							if (document.all(i).id.indexOf("Bottom",0)!=-1)
							{ 
								document.all(i).src="../img/TabStrip/tb2p.gif";
							
							}
						}
						
					}
					//*****************Take Off TopPart Images******************************
					if (part_id1.indexOf("PartTop")!=-1)
					document.all(part_id1).src="../img/TabStrip/tb1.gif";
					if (part_id2.indexOf("PartTop")!=-1)
					document.all(part_id2).src="../img/TabStrip/tb1.gif";
					//*****************Take Off BotomPart Images******************************
					if (part_id1.indexOf("PartBottom")!=-1)
					document.all(part_id1).src="../img/TabStrip/tb2.gif";
					if (part_id2.indexOf("PartBottom")!=-1)
					document.all(part_id2).src="../img/TabStrip/tb2.gif";
	}
/*===============================================================*/
				function ChangeText(id,text) 
				{
					document.all(id).innerText=text;
					SetCookie("SheetText",document.all(id).innerText);
				}
	function param()
	{
		var str=document.location.search;
		var fd=str.indexOf("?");
		var lst=str.indexOf("&");
		var llst=str.lastIndexOf("&");
		var tbc=0;
				tbc=str.substring(lst+5,llst);
		//-----------------------------------------//
		if(tbc!=0)
		{
					g=tbc;
					switch (g)
					{
						case '1':
						{
							document.all("TableTBC2").style.display="none";
							document.all("TableTBC1").setAttribute("width","100%",false);
							document.all("TableTBC5").style.display="none";
							//-----------------------
							w=str.substring(llst+5,str.length);
							switch (w)
							{
								case '1':
								{					
									document.all("LBt1").innerHTML="Catedra Disciplini Socioumane";
									document.all("LBt3").innerHTML="Catedra Drept Public";
									document.all("LBt4").innerHTML="Catedra Drept Privat";
									document.all("imgb4").setAttribute("src","../img/Catedre/Photo60x60/Drept Privat Pinzari Veaceslav.gif");
									document.all("imgb3").setAttribute("src","../img/Catedre/Photo60x60/Drept Public Marit Alexandru.gif");
									break;
								}
								case '6':
								{
									document.all("LBt1").innerHTML="Catedra Pedagogie si Asistenta Sociala";
									document.all("LBt3").innerHTML="Catedra Pedagogie si Invatamint Primar";
									document.all("LBt4").innerHTML="Catedra Educatie fizica";
									document.all("imgb1").setAttribute("src","../img/Catedre/Photo60x60/Psihologie si Asistenta Sociala Petcu Valentina.gif");
									document.all("imgb3").setAttribute("src","../img/Catedre/Photo60x60/Pedagogie si Invatamant Primar PereteatcuMaria.gif");
									document.all("imgb4").setAttribute("src","../img/Catedre/Photo60x60/Moraru Alexandru.gif");
									break;
								}
							}
							break;
						}
						case '2':
						{
							document.all("TableTBC5").style.display="none";
							document.all("TableTBC2").style.display="none";
							document.all("TableTBC1").setAttribute("width","100%",false);
							//==================================
							document.all("TableTBC4").style.display="none";
							document.all("TableTBC3").setAttribute("width","100%",false);
							w=str.substring(llst+5,str.length);
							switch (w)
							{
								case '2':
								{
									document.all("LBt1").innerHTML="Catedra Economie si Management";
									document.all("LBt3").innerHTML="Catedra Contabilitate si Analiza";
									document.all("imgb1").setAttribute("src","../img/Catedre/Photo60x60/DecanEconomie.TruseviciAla.gif");
									document.all("imgb3").setAttribute("src","../img/Catedre/Photo60x60/Contabilitate si Analiza.Balinschi Andrei.gif");
									break;
								}
								case '7':
								{
									document.all("LBt1").innerHTML="Catedra Geografie, Biologie si Chimie";
									document.all("LBt3").innerHTML="Catedra Tehnologii Agricole";
									document.all("imgb1").setAttribute("src","../img/Catedre/Photo60x60/Nicorici Maria.Geografie si Biologie.gif");
									document.all("imgb3").setAttribute("src","../img/Catedre/Photo60x60/Tehnologii Agricole Boincean, 2006 002.gif");
									break;
								}
								case '8':
								{
									document.all("LBt1").innerHTML="Catedra Instrumente Muzica si Metodica";
									document.all("LBt3").innerHTML="Catedra Dirijat si Teorie";
									document.all("imgb1").setAttribute("src","../img/Catedre/Photo60x60/Instrumente Muzicale si metodica Moraru Marina.gif");
									document.all("imgb3").setAttribute("src","../img/Catedre/Photo60x60/Teorie si Dirijat Babii Vladimir.gif");
									break;
								}
							}
							break;
						}
						case '4':
						{
						document.all("TableTBC5").style.display="none";
						w=str.substring(llst+5,str.length);
							switch (w)
							{
								case '5':
								{
									document.all("LBt1").innerHTML="Catedra Limba Romana";
									document.all("LBt2").innerHTML="Catedra Literatura Romana si Universala";
									document.all("LBt3").innerHTML="Catedra Limba si Literatura Rusa";
									document.all("LBt4").innerHTML="Catedra Limba si Literatura Ucraineana";
									document.all("imgb1").setAttribute("src","../img/Catedre/Photo60x60/Limba Romana Popa Gheorghe.gif");
									document.all("imgb2").setAttribute("src","../img/Catedre/Photo60x60/Literatura Romana si Universala Leahu Nicoloe.gif");
									document.all("imgb3").setAttribute("src","../img/Catedre/Photo60x60/Limba si Lit.rusa Borta Larisa.gif");
									document.all("imgb4").setAttribute("src","");
									break;
								}
							}
							break;
						}
						case '5':
						{
							w=str.substring(llst+5,str.length);
							document.all("imgb1").setAttribute("width","30",false);
							document.all("imgb2").setAttribute("width","30",false);
							document.all("imgb3").setAttribute("width","30",false);
							document.all("imgb4").setAttribute("width","30",false);
							document.all("imgb5").setAttribute("width","30",false);
							document.all("imgb1").setAttribute("Height","30",false);
							document.all("imgb2").setAttribute("Height","30",false);
							document.all("imgb3").setAttribute("Height","30",false);
							document.all("imgb4").setAttribute("Height","30",false);
							document.all("imgb5").setAttribute("Height","30",false);
							switch (w)
							{
								case '3':
								{
									document.all("LBt1").innerHTML="Catedra Matematica";
									document.all("LBt2").innerHTML="Catedra Tehnica si Tehnologii";
									document.all("LBt5").innerHTML="Catedra Informatica Aplicata si Tehnologii Informationale";
									document.all("LBt4").innerHTML="Catedra Fizica si Metodica Predarii Fizicii";
									document.all("LBt3").innerHTML="Catedra Electronica si Informatica";
									document.all("imgb1").setAttribute("src","../img/Catedre/Photo60x60/TFMIGasitoi.gif");
									document.all("imgb2").setAttribute("src","../img/Catedre/Photo60x60/Topala Pavel.Tehnica si Tehnologii.gif");
									document.all("imgb3").setAttribute("src","../img/Catedre/Photo60x60/rector60x60.gif");
									document.all("imgb4").setAttribute("src","../img/Catedre/Photo60x60/Cheptea.gif");
									document.all("imgb5").setAttribute("src","../img/Catedre/Photo60x60/Catedra Informatica Aplicata si Tehnologii Informationale.gif");
									break;
								}
								case '4':
								{
									document.all("LBt1").innerHTML="Catedra Filologie Franceza";
									document.all("LBt2").innerHTML="Catedra Filologie Engleza";
									document.all("LBt3").innerHTML="Catedra Filologie Germana";
									document.all("LBt4").innerHTML="Catedra Limba Engleza";
									document.all("LBt5").innerHTML="Catedra Limba Franceza";
									document.all("imgb1").setAttribute("src","../img/Catedre/Photo60x60/Filologie Franceza Rumleanschi Mihail.gif");
									document.all("imgb3").setAttribute("src","../img/Catedre/Photo60x60/Filologie Germana.Pomelnicova Ana.gif");
									document.all("imgb4").setAttribute("src","../img/Catedre/Photo60x60/Limba Engleza.Tomaili Liubovi.gif");
									document.all("imgb5").setAttribute("src","../img/Catedre/Photo60x60/Limba Franceza.Cabac.gif");
									break;
								}
							}
						break;
						}
					}
				}
				else
				{
					document.all("TableTBC2").style.display="none";
					document.all("TableTBC1").setAttribute("width","100%",false);
					document.all("TableTBC5").style.display="none";
					document.all("imgb4").setAttribute("src","../img/Catedre/Photo60x60/Drept Privat Pinzari Veaceslav.gif",false);
					document.all("imgb3").setAttribute("src","../img/Catedre/Photo60x60/Drept Public Marit Alexandru.gif",false);
				}
	//-----------------------------------------//
	}
				function MakeOnClick()
				{	
				var	ImgId=GetCookie("Img");				
				
				if(document.all(ImgId)==null){ImgId="DreptImg";}
				if(document.all('TempV').value=='1')
				{
				if(navigator.cookieEnabled==false){alert('Enable your cookie!');}
				ImgId="DreptImg";
				var str=document.location.href;
				document.all('TempV').value='0';
				if(str.indexOf("/ro")==-1)
				{
						MouseClickImg('DreptImg','-1','PartTopDreptImg','../img/TabEng/Law3.gif');
				}
					else
						MouseClickImg('DreptImg','-1','PartTopDreptImg','../img/TabStrip/Drept3.gif');
				}
				else
				{
				var src=document.all(ImgId).src;	
				var index=src.indexOf("1",0);
				if (index!=-1)
				{
					src=src.substring(0,index);						
					src=src+"3"+".gif";
					document.all(ImgId).src=src;
				}else
				{index=src.indexOf("2",0);
					if (index!=-1)
					{
						src=src.substring(0,index);						
						src=src+"3"+".gif";
						document.all(ImgId).src=src;
					}
				}
				var td_id="TD"+ImgId;
				if (document.all(td_id).style.borderBottomStyle.indexOf("solid",0)!=-1)
				{	
				document.all(td_id).style.borderBottomWidth="0px";
				}
					
				if (document.all(td_id).style.borderTopStyle.indexOf("solid",0)!=-1)
				{ 
				document.all(td_id).style.borderTopWidth="0px";
				}
				var	PartImgId1=GetCookie("PartImg1");
				var	PartImgId2=GetCookie("PartImg2");
				
				if (PartImgId1.indexOf("Part")!=-1)
				document.all(PartImgId1).src="../img/TabStrip/bg.gif";
				
				if (PartImgId2.indexOf("Part")!=-1)
				document.all(PartImgId2).src="../img/TabStrip/bg.gif";
				
				if ((PartImgId1.indexOf("Part")!=-1) && (PartImgId2.indexOf("Part")!=-1))
					{
					document.all(td_id).style.borderLeftWidth="1px";
					document.all(td_id).style.borderLeftStyle="solid";
					document.all(td_id).style.borderLeftColor="#7997b7";
					
					document.all(td_id).style.borderRightWidth="1px";
					document.all(td_id).style.borderRightStyle="solid";
					document.all(td_id).style.borderRightColor="#7997b7";
					}
				if ((PartImgId1.indexOf("-1")!=-1)&&(PartImgId2.indexOf("Part")!=-1))
					{
					document.all(td_id).style.borderRightWidth="1px";
					document.all(td_id).style.borderRightStyle="solid";
					document.all(td_id).style.borderRightColor="#7997b7";
					}
				if ((PartImgId1.indexOf("Part")!=-1)&&(PartImgId2.indexOf("-1")!=-1))
					{
					document.all(td_id).style.borderLeftWidth="1px";
					document.all(td_id).style.borderLeftStyle="solid";
					document.all(td_id).style.borderLeftColor="#7997b7";
					}				
						
				}
				}
//================
function varitext(text)
{
	text=document;
	print(text);
}