// JavaScript Document




function changeLang(str)
{
	// get the publication data and apply to publication id
	url = "/xsl/getpubs.php?q=" + str;
	getData(url, "pubs");
	// get the papers and presentations data and apply to papers and presentations id
	url = "/xsl/getpandps.php?q=" + str;
	getData(url, "pandp");
		// get the k in the literature data and apply to kinlit id
	url = "/xsl/getklit.php?q=" + str;
	getData(url, "kinlit");
}

function pubPage(str)
{
	// get the publication data and apply to publication id
	url = "/xsl/getpubs.php?q=" + str ;
	getData(url, "pubs");
}

function papPage(str)
{
	// get the publication data and apply to publication id
	url = "/xsl/getpandps.php?q=" + str ;
	getData(url, "pandp");
}

function litPage(str)
{
	// get the publication data and apply to publication id
	url = "/xsl/getklit.php?q=" + str ;
	getData(url, "kinlit");
}


function getData(dataSource,udId)
{
	var XMLHttpRequestObject = false;
	
	if (window.XMLHttpRequest) {
		XMLHttpRequestObject = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		XMLHttpRequestObject = new
		ActiveXObject("Microsoft.XMLHTTP");
	}
	
	if(XMLHttpRequestObject) {
		XMLHttpRequestObject.open("GET", dataSource);
		
		XMLHttpRequestObject.onreadystatechange = function()
		{
			if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) {
				document.getElementById(udId).innerHTML = XMLHttpRequestObject.responseText;
				delete XMLHttpRequestObject;
				XMLHttpRequestObject = null;
			}
		}	
		XMLHttpRequestObject.send(null);
	}
}
