<!-- Begin
function httpRequest(){
	var http_request = false;
	this.init = function(handler){
		if (window.XMLHttpRequest){
			http_request = new XMLHttpRequest();
			!window.ActiveXObject ? http_request.overrideMimeType('text/html') : false;
		} 
		else if (window.ActiveXObject){ // IE
			http_request = new ActiveXObject('Microsoft.XMLHTTP');
		}
		http_request.onreadystatechange = function(){
			if (http_request.readyState == 4){
				http_request.status == 200 ? handler(http_request.responseText) : handler(false);
			}
		};
	}
	this.load = function(url){
		http_request.open('GET', url, true);
		http_request.send(null);
	};
}

function DropdownMenu(formname){
	var JURL = document.forms[formname].CountryOption.options[document.forms[formname].CountryOption.selectedIndex].value;
	window.location.href = JURL;
}

Vac=0;
function quick_show(div_,objectid,hide){
	div_id = div_+objectid;
	if(Vac < 1 && hide < 1){
		Vac=1;
		if(div_ == 'objectinfo'){
			if(document.getElementById(div_id).innerHTML == ''){
				myFunction = function (response) {
					document.getElementById(div_id).innerHTML = response;		
				}
				var ajaxRequest = new httpRequest();
				ajaxRequest.init(myFunction);
				ajaxRequest.load('/object/ext/quick_show.php?ObjectID='+objectid);
			}
			h = 70;
		}
		if(div_ == 'vacancytable'){
			//if(document.getElementById("vacancytable"+objectid).innerHTML == ''){
				document.getElementById("vacancytable"+objectid).innerHTML = '<img name="vacancy'+objectid+'" src="/object/allocation.php?img='+objectid+'&ct='+ct+'" width="535" height="165" style="padding:5px 0px 5px 5px;">';
			//}
			//document.images['vacancy'+objectid].src = "/object/allocation.php?img="+objectid+"&ct="+ct;
			//document.getElementById('vacancy'+objectid).src = "/object/allocation.php?img="+objectid+"&ct="+ct;
			h = 173
		}

		if(document.all){
			document.all[div_id].style.borderTopWidth = 1+'px';
			document.all[div_id].style.height = h+'px';
		}
		else if(document.getElementById){
			document.getElementById(div_id).style.borderTopWidth = 1+'px';	
			document.getElementById(div_id).style.height = h+'px';
		}
	}
	else{
		Vac=0;
		if(document.all){
			document.all[div_id].style.borderTopWidth = 0+'px';
			document.all[div_id].style.height = 0+'px';			
		}
		else if(document.getElementById){
			document.getElementById(div_id).style.borderTopWidth = 0+'px';
			document.getElementById(div_id).style.height = 0+'px';			
		}
	}
}

function Fav(nr,id){
	if (document.images['Favorit'+nr].src.indexOf("notice-de.gif") !=-1){
		document.images['FavoritDummy'+nr].src="/search/favorit.php?Do=Add&ID="+id+"&reload="+Math.floor(Math.random()*1000+1); 
		document.images['Favorit'+nr].src= "http://"+window.location.hostname+"/img/search/noticed-de.gif"; 
	}
	else{ 
		document.images['FavoritDummy'+nr].src="/search/favorit.php?Do=Del&ID="+id+"&reload="+Math.floor(Math.random()*1000+1); 
		document.images['Favorit'+nr].src= "http://"+window.location.hostname+"/img/search/notice-de.gif"; 
	}
}

function GmapS(action){
	ZoomMin=1;
	ZoomMax=13;
	if(action == 'zoom_in'){
		GmapSZoom = GmapSZoom+1;
	}
	if(action == 'zoom_out'){
		GmapSZoom = GmapSZoom-1;
	}
	if(GmapSZoom > ZoomMax){GmapSZoom = ZoomMax;}
	if(GmapSZoom < ZoomMin){GmapSZoom = ZoomMin;}
	document.images['gmap_place'].src= 'http://maps.google.com/staticmap?size='+GmapS_w+'x'+GmapS_h+'&'+Marker+'&zoom='+GmapSZoom+'&key='+GApiKey;
}
// End -->
