<!--
function delineate(str, value)
{
//first get the variable, then check if it is the same as the value value
  testStr = "";
	theleft = 0;
  theleft = str.indexOf("?");
	if(theleft == -1)
    return 0;
  while(true) {
    theright = str.indexOf("=");
		if(theright == -1) {
			//document.writeln('theright is -1<br/>');
		  break;
		}
		//document.writeln('remainder: ' + str.substring(theright+1)+'<br/>');
		varbound = str.indexOf("&");
		//document.writeln('next bound:'+varbound+'<br/>');
    testStr = str.substring(theleft+1, theright);
		//document.writeln('test str is:'+testStr+'<br/>');
		if(testStr == value)
		  break;
		//document.writeln('str is before: '+str);
		str = str.substring(varbound+1);
		//document.writeln('str is now: '+str);
		theleft = -1;
	}
	if(theright != -1) {
		if(varbound == -1) {
		  //document.writeln('returning: ' + str.substring(theright+1) + '<br/>');
			return str.substring(theright+1);
		}
		else {
		  //document.writeln('returning: ' + str.substring(theright+1, varbound) + '<br/>');
			return str.substring(theright+1, varbound);
		}
	}
	return 0;
}

if(typeof curr_lang == 'undefined') { 
	var query = window.location.search;
	
	//document.writeln(query+'<br/>');
	
	//document.writeln('value is: ' + delineate(query, "lang")+'<br/>');
	//document.writeln('value is: ' + delineate(query, "def")+'<br/>');

	lang_val = delineate(query, "lang");	
	if(lang_val == "es") { curr_lang = "Espa&ntilde;ol"; }
	else if(lang_val == "fr") { curr_lang = "Francais"; }
	else if(lang_val == "en") { curr_lang = "English"; }
	//document.writeln(curr_lang);
}
//-->
