

function status()
{
	alert("The status will be changed");
}
function savein()
{
	alert("The changes  will be saved");
}
function dispmesstut()
{
	alert("The tutor has been added");
}

function dispcoor()
{
	alert("The Coordinator has been added");
}
function dispsubj()
{
	alert("The subject is added");
}
function disptopic()
{
	alert("The topic is added");
}
function profreq()
{
	alert("A request has been sent successfully.Our coordinator will contact you soon");
	window.location.href="index.php";
}

function profreqdiv()
{
	document.getElementById("messchngtut").style.display="block";
}

function show(chkBtn)
{
	var chkButton = document.getElementById(chkBtn.id);
	//alert(chkButton.id);
	switch(chkButton.id)
	{
		case 'rdTutor':
			
				//alert("Tutor");
				document.getElementById("dvStudent").style.display="none";
				document.getElementById("dvTutor").style.display="block";
				document.getElementById("spTutor").style.fontWeight="bold";
				document.getElementById("spStudent").style.fontWeight="normal";							
				break;

		case 'rdStudent':
				
				//alert("Student");
				document.getElementById("dvTutor").style.display="none";
				document.getElementById("dvStudent").style.display="block";
				document.getElementById("spTutor").style.fontWeight="normal";
				document.getElementById("spStudent").style.fontWeight="bold";
				break;
	}
	
}


function openup(pgeid)
{
	window.location.href="message.php";
}

function openupcancel()
{
	alert("Thankyou for your message");
	//window.open("cancel.php","1","width=450,height=100,top=250,left=500");
}

function openupcont()
{
	//alert("hi");
	window.open("continue.php","1","width=450,height=100,top=250,left=500");
	
}

/*function openuphelp()
{
	//alert("hi");
	window.open("help_price.html","1","width=450,height=150,top=250,left=500");
	
}

function openuphelpded()
{
	//alert("hi");
	window.open("help_deadline.html","1","width=450,height=150,top=250,left=500");
	
}*/

function openuphelpsol()
{
	//alert("hi");
	window.open("help_solution.php","1","width=450,height=150,top=250,left=500");
	
}

function showto()
{
	
	window.location.href="index.php";
}

function solutionshowto()
{
	
	window.location.href="solutionbox.php";
}

function showedit()
{
	window.location.href="editpost.php";
}
function showtoind(lnkpge)
{
	var btnreg=document.getElementById(lnkpge.id);
	
	switch(btnreg.id)
	{
		case 'btnStudent':
			window.location.href="student/index.php";
			break;
		case 'btnTutor':
			window.location.href="tutor_reg.php";
			break;
	}
}

function showclose()
{
  window.close();
}

function showit()
{
	alert("You will get the details of previous question");
}

function showitnxt()
{
	alert("You will get the details of next question");
}

function openupind()
{
	//alert("hi");
	window.location.href="student_homepage.php";
}

function showtab(chkBtn,subjectid,pageid)
{
	//alert (chkBtn);
	var chkButton = document.getElementById(chkBtn.id);
	
	var subject=subjectid;
	
	if(pageid==1)
	{
	switch(chkButton.id)
	{		

		case 'testprep':
				document.getElementById("questiondisp").src="tutor_questions.php?qtypeid=3&solutiontype=1&subjectid="+subject+"&resetsession=1"; 
					//		alert("Student");
				document.getElementById("essayrev").className="";
				document.getElementById("testprep").className="activate";
				document.getElementById("homework").className="";
				document.getElementById("compsol").className="";
				break;
		
		case 'essayrev':
				document.getElementById("questiondisp").src="tutor_questions.php?qtypeid=2&solutiontype=1&subjectid="+subject+"&resetsession=1";
					//		alert("Student123");
				document.getElementById("essayrev").className="activate";
				document.getElementById("compsol").className="";
				document.getElementById("testprep").className="";
				document.getElementById("homework").className="";
				break;
		
		case 'compsol':
				document.getElementById("questiondisp").src="tutor_questions.php?solutiontype=0&resetsession=1";
				document.getElementById("compsol").className="activate";
				document.getElementById("testprep").className="";
				document.getElementById("homework").className="";
				document.getElementById("essayrev").className="";				
				break;

		default:
			    
				document.getElementById("questiondisp").src="tutor_questions.php?qtypeid=1&solutiontype=1&subjectid="+subject+"&resetsession=1";
					
				document.getElementById("essayrev").className="";
				document.getElementById("testprep").className="";
				document.getElementById("homework").className="activate";
				document.getElementById("compsol").className="";				
				break;
			

		}
	}
	else
	{
		switch(chkButton.id)
	{		

		case 'testprep':
				document.getElementById("questiondisp").src="tutor_quest_soln.php?qtypeid=3&solutiontype=1&subjectid="+subject+"&resetsession=1"; 
					//		alert("Student");
				document.getElementById("essayrev").className="";
				document.getElementById("testprep").className="activate";
				document.getElementById("homework").className="";
				document.getElementById("compsol").className="";
				break;
		
		case 'essayrev':
				document.getElementById("questiondisp").src="tutor_quest_soln.php?qtypeid=2&solutiontype=1&subjectid="+subject+"&resetsession=1";
					//		alert("Student123");
				document.getElementById("essayrev").className="activate";
				document.getElementById("compsol").className="";
				document.getElementById("testprep").className="";
				document.getElementById("homework").className="";
				break;
		
		case 'compsol':
				document.getElementById("questiondisp").src="tutor_quest_soln.php?solutiontype=0&resetsession=1";
				document.getElementById("compsol").className="activate";
				document.getElementById("testprep").className="";
				document.getElementById("homework").className="";
				document.getElementById("essayrev").className="";				
				break;

		default:
			    
				document.getElementById("questiondisp").src="tutor_quest_soln.php?qtypeid=1&solutiontype=1&subjectid="+subject+"&resetsession=1";
					
				document.getElementById("essayrev").className="";
				document.getElementById("testprep").className="";
				document.getElementById("homework").className="activate";
				document.getElementById("compsol").className="";				
				break;
			

		}
	}
	
}

function showadddiv()
{
	if(document.getElementById("divAddinfo").style.display=="none")
	{
		document.getElementById("divAddinfo").style.display="block";
		document.getElementById("regstufield").className="bgccc regstufield";
	}
	else
	{
		document.getElementById("divAddinfo").style.display="none";
		document.getElementById("regstufield").className="regstufield";
	}
}

function changediv(chgid)
{

	if(chgid)
	{
		document.getElementById("divQuestion").style.display="block";
	}
	else
	{
		document.getElementById("divQuestion").style.display="none";
	}
}

function changedivadmin(chgid)
{

	if(chgid)
	{
		document.getElementById("divMessages").src="admin_quest_mess_iframe.php";		
	}
	else
	{
		document.getElementById("divMessages").src="admin_gen_mess_iframe.php";			
	}

}

function changedivstu(chgid)
{
	if(chgid)
	{
		document.getElementById("divMessages").src="stu_quest_mess_iframe.php";			
	}
	else
	{
		document.getElementById("divMessages").src="stu_gen_mess_iframe.php";			
	}
}


