	var countryCode = ''; 
	var worldMapTyp = 'WORLDMAP';
	var language = 'de';
	var map_country = new Array();
	var map_back = new Array();
	
	//Set Focus on country
	function setCountryVariable(countryID)
	{
		if (worldMapTyp == 'WORLDMAP_HR_JOBS_SELECTION')
		{
			countryCode = map_back[countryID];
		} else {
			countryCode = countryID;
		} 
		// is it a region 1004 1005 ...?
		if (IsNumeric(countryCode))
		{
			showRegion(countryCode);
			document.site.SetVariable("jsCountry", countryCode);			

		} else if (countryCode != '00') {
			document.site.SetVariable("jsCountry", countryCode);
		}		
	}

	// test if input is numeric 
	function IsNumeric(input) {    
		return (input - 0) == input && input.length > 0; 
	} 
	// event handler
	function addEvent(obj, type, fn) {
	    if (obj.addEventListener)
	        obj.addEventListener( type, fn, false );
	    else if (obj.attachEvent) {
	        obj["e"+type+fn] = fn;
	        obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
	        obj.attachEvent( "on"+type, obj[type+fn] );
	    }
	}
	
	// write text to element
	function showRegion(region) {
		if (worldMapTyp != 'WORLDMAP_HR_JOBS_SELECTION')
		{
		    var container = document.getElementById('worldmap_txtbox');
		    var countries = new Array();
		    countries = map[region];
		    var countriesStr = '';
		    var i=0;
		    for (i=0;i<countries.length;i++)
		    {
		    	countriesStr += map[countries[i]];
		    }
		    container.innerHTML = countriesStr;
		}
	}
	
	// write text to element
	function showAddresses(addresses) {
		if (worldMapTyp != 'WORLDMAP_HR_JOBS_SELECTION' && addresses != 'undefined')
		{
			var container = document.getElementById('worldmap_txtbox');
			var mapjs = map[addresses];
			container.innerHTML = map[addresses];
	    	document.getElementById("wmDropDown").selectedValue=addresses;
	    	countryCode = addresses;
	    	setDropDown("wmDropDown", addresses);
		} else {
			showJobOffers(map_country[addresses],language);
		}
	}
	
	function setDropDown(dropDownName, dropDownValue)
	{
		// Get a reference to the drop-down
		var myDropdownList = document.getElementById("wmDropDown");
		// Loop through all the items
		for (iLoop = 0; iLoop< myDropdownList.options.length; iLoop++)
		{    
			if (myDropdownList.options[iLoop].value == dropDownValue)
			{
				//alert("found: " + myDropdownList.options[iLoop].value);
				// Item is found. Set its selected property, and exit the loop
				myDropdownList.options[iLoop].selected = true;
				break;
			}
		}
	
	}
	
	// load Job Offers as HTML (Parameters: ISO Countrycode, language)
	function showJobOffers(country,language) {
		currentCountry = $("#country").val();
		query 	= $("#query").val();
		entry 	= $("#entry").val();
		type 	= $("#type").val();
		field 	= $("#function").val();
		subfield = $("#subfunction").val();
		tag 	= $("#tag").val();
		if(country != currentCountry || (entry == 0 && type == 0 && field == 0 && subfield == 0 && tag == 0)) {
			$("#country").val(country);
			if(entry == 0 && type == 0 && field == 0 && subfield == 0 && tag == 0) {
				$.ajax({
					  url: "/PHP_Includes/Jobs/formOptions.php?",
					  cache: false,
					  dataType: "json",
					  data: ({ country : country, mode : 'jobListFromCountry', query: query, entry: entry, type: type, 'function' : field, 'subfunction' : subfield, tag: tag }),
					  success: function(data) {
								$.each(data, function(i,item) {
									if(i == 'html') {
										$("#jobList").html(item);
									} 
									if(i == 'js') {
										if(item > 0) {
											jobListNavigation(item);
										}
									}
								})},
					  error: function() {
						  		$("#jobList").html('');
					  		}});
				
			    $('a.jobLink').live('click',function(e){
			        Shadowbox.open(this);
			        e.preventDefault();
			    });
			} else {
				$("#jobList").html('');
			}
			updateChild('location');
		}
	    $('html,body').animate({scrollTop: $("#jobList").offset().top},800);
	}

	
	// init event on body load
	// addEvent(window, 'load', showAddresses);
	
	// ]]>

