     function getHTTPObject(){
      if (window.ActiveXObject) 
      return new ActiveXObject("Microsoft.XMLHTTP");
      else if (window.XMLHttpRequest) 
      return new XMLHttpRequest();
      else {  alert("Your browser does not support AJAX.");
      return null;
      }      }


function finish(){
url = window.location.href;
url = (url.replace(/&/g, ""));

endTime = new Date();
var month = endTime.getMonth() + 1
var day = endTime.getDate()


timeEnd = endTime.getTime();
timex = (timeEnd - timeStart ) / 1000;
//alert("The max position was " + position + " pixels.");
httpObject = getHTTPObject();
if (httpObject != null) {
httpObject.open("GET", "final.php?inputText="+position+"&time="+timex+"&url="+url+"&month="+month+"&day="+day+"&cat="+catelement+"&maxy="+maxelement+"&divy="+divelement, true);
httpObject.send(null);

}}
function is_child_of(parent, child) {
			if( child != null ) {			
				while( child.parentNode ) {
					if( (child = child.parentNode) == parent ) {
						return true;
					}
				}
			}
			return false;
		}
		function fixOnMouseOut(element, event, JavaScript_code) {
			var current_mouse_target = null;
			if( event.toElement ) {				
				current_mouse_target 			 = event.toElement;
			} else if( event.relatedTarget ) {				
				current_mouse_target 			 = event.relatedTarget;
			}
			if( !is_child_of(element, current_mouse_target) && element != current_mouse_target ) {
				eval(JavaScript_code);
			}
		}

function show_message(message,ind,ind2) {

if (parseInt(ind2) > divelement ) { divelement =ind2 ;}
maxelement = ind;
//alert(divelement+message+ind);
//			get_object('status').innerHTML = (divelement+message);
		}
		
function showcategory() {
catelement = 1;

		}		
		
		

function get_object(id) {
			var object = null;
			if( document.layers )	{			
				object = document.layers[id];
			} else if( document.all ) {
				object = document.all[id];
			} else if( document.getElementById ) {
				object = document.getElementById(id);
			}
			return object;
		}
