// JavaScript Documentfunction search_eastern_experts()	{		window.location = "view_expert.php";	}function searchbytopic()	{		$('#content') .load('topiclist.html');	}function searchbyname()	{		$('#content') .load('namelist.html');	}	function getpage(a)	{		$('#namelist') .load('../easternexperts/process/allnames.php',{'p': a});	}function getpagetopic(a)	{		$('#namelist') .load('../easternexperts/process/alltopicspages.php',{'p': a});	}	function listallnames()	{		$('#namesearch').val("");		$('#selectedcontent').html("");		$('#namelist') .load('../easternexperts/process/allnames.php');	}function listalltopics()	{		$('#topicsearch').val("");		$('#selectedcontent').html("");		$('#namelist') .load('../easternexperts/process/alltopics.php');	}function getexpertname(a)	{		$('#namesearch').val("");		$('#namelist').html("");		window.location = "view_expert.php?id="+a;		//$('#selectedcontent') .load('../easternexperts/process/searchresult.php', {'id': a});			}function getexperttopic(a)	{		$('#topicsearch').val("");		$('#namelist').html("");		window.location = "view_expert.php?id="+a;		//$('#selectedcontent') .load('../easternexperts/process/searchresult.php', {'id': a});			}function topicsearch()	{		var a = $('#topicsearch').val();		$('#selectedcontent').html("");		$('#namelist') .load('../easternexperts/process/autocomptopic.php', {'id': a});	}function topicsearch2(a)	{		$('#namelist') .load('../easternexperts/process/autocomptopic.php', {'id': a});	}	function namesearch()	{		var a = $('#namesearch').val();		$('#selectedcontent').html("");		$('#namelist') .load('../easternexperts/process/autocompname.php', {'id': a});	}	function displaytooltip (a,b)	{		$('#' + b) .css({display:"block"});		$('#' + b) .load(a);	}function hidetooltip (a)	{		$('#' + a) .css({display:"none"});	}function updateexpsel()	{		var c = $('#timeout').val();		var b = $('#updexpsel').val();		window.location = "updateexpert.php?a=" + b + "&t=" + c;	}function addexpert(){		var a = new Array();		var ifempty = "This is a required field";		var blank = "";		var problem = "no";				a = $('input'); 				for (i = 0; i < 2; i++) 		{			b = a[i].id; 			c = a[i].value; 			if (c == "") 			{				$('#' + b + 'error') .html(ifempty); 				problem = "yes"; 			}			else			{				$('#' + b + 'error') .html(blank); 			}		}							if (problem == "yes")		{			return false;		}		else		{			return true;		}	}function updateexpert()	{		var a = new Array();		var ifempty = "This is a required field";		var blank = "";		var problem = "no";				a = $('input'); 				for (i = 0; i < 3; i++) 		{			b = a[i].id; 			c = a[i].value; 			if (c == "") 			{				$('#' + b + 'error') .html(ifempty); 				problem = "yes";				//alert(c);			}			else			{				$('#' + b + 'error') .html(blank);				//alert(c);			}					}				cleancommas();		cleanpuncuation();				var cred = $('#cred').val();		var intr = $('#intr').val();		var cont = $('#cont').val();										if (cred.match("Enter Credentials"))		{			$('#crederror').html(ifempty);			//alert(cred);			problem = "yes";		}		else		{			$('#crederror').html(blank);			breaktagcred(cred);		}		if (intr.match("Enter Interests"))		{			$('#intrerror').html(ifempty);			problem = "yes";		}		else		{			$('#intrerror').html(blank);			breaktagexpr(intr);		}		if (cont.match("Enter Contact Information"))		{			$('#conterror').html(ifempty);			problem = "yes";		}		else		{			$('#conterror').html(blank);			start(cont);		}				if (problem == "yes")		{			return false;		}		else		{			return true;		}	}function ajaxFileUpload(a)	{		var id = a;		$.ajaxFileUpload		(			{				url:'process/uploadimageajaxproc.php?a='+id,				secureuri:false,				fileElementId:'fileToUpload',				dataType: 'json',				success: function (data, status)				{					if(typeof(data.error) != 'undefined')					{						if(data.error != '')						{							var blank = "";							$('#fileToUpload').val(blank);							$('#imgerror').html(data.error);						}						else						{							var blank = "";							$('#imgerror').html(blank);							$('#fileToUpload').val(blank);							$('#photo').html(data.msg);						}					}				},				error: function (data, status, e)				{					alert(e);				}			}		)				return false;			}function emuimg(a){	var blank = "";	$('#fileToUpload').val(blank);	$('#imgerror').html(blank);	$('#photo') .load('../easternexperts/process/emuimg.php', {'id': a});}function deleteexpert(){	$('#deletemessage') .css({display:"block"});}function canceldelexpert(){	$('#deletemessage') .css({display:"none"});	}function delexpertconfirm(a,b){	window.location = "delete.php?a="+ a +"&t=" + b;	}function chgdept(){	var a = $('#college').val();	$('#coldept') .load('../easternexperts/process/getdeptproc.php', {'colid': a});	}
