// JavaScript Document

		function em(emid)
		{
			return document.getElementById(emid);
		}

		function getXMLHttp()
		{
			var xmlhttp=false;
			try{
				xmlhttp=new XMLHttpRequest();
			}
			catch(e) {
				try {
					xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch(e) {
					try{
						xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
					}
					catch(e1) {
						xmlhttp=false;
					}
				}
			}
			return xmlhttp;
		}

		function switchTab(id)
		{
			em('tab_1_left').className = 'left_left_i';
			for (var i=1; i<=3; i++)
			{
				em('tab_'+i).className = 'tab_i';
				em('tab_'+i+'_right').className = 'tab_i_right';
				em('sbar_'+i).style.display = 'none';
			}
			em('tab_3_right').className = 'right_right_i';
			em('tab_'+id).className = 'tab_a';
			if (id==3) { em('tab_3_right').className = 'right_right_a'; }
				else { em('tab_'+id+'_right').className = 'tab_a_right'; }
			if (id==1) { em('tab_1_left').className = 'left_left_a'; }
				else { em('tab_'+(id-1)+'_right').className = 'tab_a_left'; }
			em('sbar_'+id).style.display = 'block';
		}
		
		function inpActive(id)
		{
			em(id).style.color = '#000000';
			if ( (em(id).value == 'Business name or category')
					 || (em(id).value == 'Location')
					 || (em(id).value == '* Last Name')
					 || (em(id).value == 'First Name')
					 || (em(id).value == 'City, State or Zip')
					 || (em(id).value == 'Enter phone number...')
					 || (em(id).value == 'Enter subject...')
			)
			{
				em(id).value = '';
			}
		}
	
		function inpInactive(id)
		{
			if (em(id).value == '')
			{
				if (id == 'q') { em(id).value = 'Business name or category'; }
				if (id == 'l') { em(id).value = 'Location'; }
				if (id == 'ln') { em(id).value = '* Last Name'; }
				if (id == 'fn') { em(id).value = 'First Name'; }
				if (id == 'cz') { em(id).value = 'City, State or Zip'; }
				if (id == 'r') { em(id).value = 'Enter phone number...'; }
				if (id == 'n') { em(id).value = 'Enter subject...'; }
				em(id).style.color = '#aaaaaa';
			}
		}
		
		function checkInput(id)
		{
			var test = em(id).value;
			if ( (test != 'Enter business name or category and location...')
				  && (test != '* Lastname')
				  && (test != 'Enter phone number...')
				  && (test != 'Enter subject...')
				  && (test != '') )
			{
				return true;
			}
			else
			{
				return false;
			}
		}

		function preloadImages()
		{
			if (document.images)
			{
				preload_image_object = new Image();
				image_url = new Array();
				image_url[0] = "/images/tab_left_a.png";
				image_url[1] = "/images/tab_left_i.png";
				image_url[2] = "/images/tab_left_left_a.png";
				image_url[3] = "/images/tab_left_left_i.png";
				image_url[4] = "/images/tab_right_a.png";
				image_url[5] = "/images/tab_right_i.png";
				image_url[6] = "/images/tab_right_right_a.png";
				image_url[7] = "/images/tab_right_right_i.png";
				image_url[8] = "/images/pin_b.png";
				image_url[9] = "/images/pin_g.png";
				var i = 0;
				for (i=0; i<=7; i++) preload_image_object.src = image_url[i];
			}
		}
		
		function go(url)
		{
			if (url != '')
			{
				location.href = url;
			}
		}

		function submitenter(myfield,e)
		{
			var keycode;
			if (window.event) keycode = window.event.keyCode;
			else if (e) keycode = e.which;
			else return true;
			if (keycode == 13)
			{
				myfield.form.submit();
				return false;
			}
			else
			return true;
		}
