	//Avis addition
	function getURL(uri) {
uri.dir = location.href.substring(0, location.href.lastIndexOf('\/'));
uri.dom = uri.dir; if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);
uri.path = ''; var pos = uri.dom.indexOf('\/'); if (pos > -1) {uri.path = uri.dom.substr(pos+1); uri.dom = uri.dom.substr(0,pos);}
uri.page = location.href.substring(uri.dir.length+1, location.href.length+1);
pos = uri.page.indexOf('?');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
pos = uri.page.indexOf('#');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
uri.ext = ''; pos = uri.page.indexOf('.');if (pos > -1) {uri.ext =uri.page.substring(pos+1); uri.page = uri.page.substr(0,pos);}
uri.file = uri.page;
if (uri.ext != '') uri.file += '.' + uri.ext;
if (uri.file == '') uri.page = 'index';
uri.args = location.search.substr(1).split("?");
return uri;
}

		function toggleFocus_click()
		{
            if(document.getElementById('focusBy_formTR'))
            {
			    var focusLinks = document.getElementById('focusBy_formTR').getElementsByTagName('A');
			    for(i=0; i<focusLinks.length; i++)
			    {
				    focusLinks[i].onclick =function ()
				    {
					    focusTD_links = (this.parentNode).getElementsByTagName('A');
					    if(focusTD_links.length==1)
					    {
						    focusTD = this.parentNode;
						    focusTD = focusTD.parentNode;
						    focusTD_links = focusTD.getElementsByTagName('A');
					    }

					    for(x=0; x<focusTD_links.length; x++)
						    if((focusTD_links[x].className).indexOf('selectedCloud')!=-1)
							    focusTD_links[x].className = (focusTD_links[x].className).split('selectedCloud')[0];

					    this.className += ' selectedCloud';
					    return false;
				    }
			    }
			}		
		}
		
		function submitFocus()
		{
		    var uri = new Object();
		    var focusLinks = document.getElementById('focusBy_formTR').getElementsByTagName('A');
			var selectedLinks = [];
			getURL(uri);
			for(i=0; i<focusLinks.length; i++)
				if((focusLinks[i].className).indexOf('selectedCloud')!=-1)
					selectedLinks[selectedLinks.length] = focusLinks[i];

			for(x=0; x< selectedLinks.length; x++)
			{
				focusTD = selectedLinks[x].parentNode;
				if((focusTD.getElementsByTagName('A')).length==1)
				{
					focusTD = focusTD.parentNode;
					focusTD = focusTD.parentNode;
				}
				if(focusTD.className == 'focusBy_school')
				    document.getElementById(focusTD.className).value = selectedLinks[x].name;
				else
				    document.getElementById(focusTD.className).value = selectedLinks[x].innerHTML;
			}
			if(selectedLinks.length>0)
			{               
			    var urlIDC = '?focusBy_Lname=' + document.getElementById('focusBy_Lname').value + '&focusBy_Fname=' + document.getElementById('focusBy_Fname').value + '&focusBy_school=' + document.getElementById('focusBy_school').value;

			    document.location.href = uri.dir + '/' + uri.file + urlIDC;
			}
			else 
			document.location.href = uri.dir + '/' + uri.file;
		}
		
		function clearFocus()
		{
			var focusLinks = document.getElementById('focusBy_formTR').getElementsByTagName('A');
			var selectedLinks = [];
			for(i=0; i<focusLinks.length; i++)
				if((focusLinks[i].className).indexOf('selectedCloud')!=-1)
					selectedLinks[selectedLinks.length] = focusLinks[i];

			for(x=0; x< selectedLinks.length; x++)
			{
				selectedLinks[x].className = (selectedLinks[x].className).split('selectedCloud')[0];
				focusTD = selectedLinks[x].parentNode;
				if((focusTD.getElementsByTagName('A')).length==1)
				{
					focusTD = focusTD.parentNode;
					focusTD = focusTD.parentNode;
				}
				document.getElementById(focusTD.className).value = "";
			}
		}
		
