<!--

var xmlHttp;

function GetXmlHttpObject() {

	var xmlHttp = null;

	try {

		xmlHttp = new XMLHttpRequest();

	}

	catch (e) {

		try {

			xmlHttp = new ActiveXObject('Msxml2.XMLHTTP');

		}

		catch (e) {

			xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');

		}

	}

	return xmlHttp;

}




curCountryID = '';
lastCountryID = '';
lastCountryObj = '';
lastCityID = '';
lastCityObj = '';

function loadRemoteSubcontent(id) {

	remoteContentID = id;

	xmlHttp = GetXmlHttpObject();

	xmlHttp.onreadystatechange = pasteRemoteSubcontent;
	xmlHttp.open('POST', '/load_remote_content.php?id=' + id, true);
	xmlHttp.send(null);

}



function pasteRemoteSubcontent() {

	if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete') {

		document.all['result_subcontent_' + remoteContentID].innerHTML = xmlHttp.responseText;

		loadSubContent(remoteContentID);

	}

}



function pasteShops() {

	if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete') {

		document.all.where_to_buy_temp.innerHTML = xmlHttp.responseText;
		var city_id = document.all.where_to_buy_temp.getElementsByTagName('div')[0].getAttribute('city_id');
		document.cookie = 'where_to_buy_city_id='.city_id;

		document.all['where_to_buy_shops_list_' + city_id].innerHTML = xmlHttp.responseText;
		document.all['where_to_buy_shops_list_' + city_id].style.display = '';

	}

}



function fadeIn(obj, position) {

	curFadeInObj = obj;

	curFadeInObj.style.left = position;

	if (position < 0) {

		setTimeout('fadeIn(curFadeInObj, ' + (position + 10) + ')', '5');

	}

}



function checkLastObj(name, id) {

	if (document.all['where_to_buy_' + name + '_list_' + id]) {

		document.all['where_to_buy_' + name + '_list_' + id].style.display = 'none';

		if (document.all['where_to_buy_' + name + '_list_temp_' + id]) {

			document.all['where_to_buy_' + name + '_list_temp_' + id].style.display = 'none';

		}

	}

}

//-->