//AJAX Functions
//<link href="../css/wgmain.css" rel="stylesheet" type="text/css" />
var SITEURL='http://www.maxconsult.bg/';
function createXMLHttp() 
{

    if (typeof XMLHttpRequest != "undefined") 
	{
        return new XMLHttpRequest();
    } 
	else if (window.ActiveXObject) 
	{
      	var aVersions = [ "MSXML2.XMLHttp.5.0",
        "MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0",
       	"MSXML2.XMLHttp","Microsoft.XMLHttp"
      	];

      	for (var i = 0; i < aVersions.length; i++) 
		{
        	try 
			{
            	var oXmlHttp = new ActiveXObject(aVersions[i]);
           		return oXmlHttp;
        	} 
			catch (oError) 
			{
            	//Do nothing
        	}
      	}
   	}
    throw new Error("XMLHttp object could be created.");
}



function sendGetRequest(url, func) 
{
    var oXmlHttp = createXMLHttp();
    oXmlHttp.open("get", url, true);

    oXmlHttp.onreadystatechange = function () 
	{
        if (oXmlHttp.readyState == 4) {

            if (oXmlHttp.status == 200) {
			       	var result = JSON.parse(oXmlHttp.responseText);
                eval(func + "(result);");
            } else {
                alert("An error occurred: "+ oXmlHttp.statusText);
            }
        }
    };
    oXmlHttp.send(null);
}

function SiteSearch()
{
	if (document.getElementById('sitesearch').checked)
	{
		document.forms['search'].action='http://www.maxconsult.bg/search.php';	
	}
	else
		document.forms['search'].action='http://www.google.com/search';	
}

function getRegions(id)
{
	sendGetRequest('../../library/server/get_regions.php?id=' + id, 'displayRegions');	
	
}

function getFilm(film,dev)
{ 
	sendGetRequest('sel_film.php?film=' + film+'&dev='+dev, 'silvia');	
	
}

function loadWeather()
{ 
	
	sendGetRequest('http://www.maxconsult.bg/server/LoadWeather.php', 'silvia');	
	
}

function silvia()
{
}

function ChangeStat(temp)
{
	document.getElementById('stat').value=temp;
	document.getElementById('galll').style.display='none';
	document.getElementById('plan').style.display='none';
	document.getElementById('map22').style.display='none';
	document.getElementById('map_my_filed').style.display='none';
	document.getElementById('info').style.display='none';
	document.getElementById('walk').style.display='none';
	

	if (temp=="info") document.getElementById('info').style.display='block';
	if (temp=="map")  
	{	
		
		//if (document.getElementById('map_position1').value=='')
			document.getElementById('map22').style.display='block';
	//	else
		//{
			document.getElementById('map_my_filed').style.display='block';
			document.getElementById('map_my_filed').innerHTML='<div id="map" style="width:630px; height:400px; padding:5px;"></div>';
			
			//showGoogleMap(document.getElementById('map_position1').value,document.getElementById('map_position2').value);
			SetMapItem(document.getElementById('cityid').value,document.getElementById('map_position1').value,document.getElementById('map_position2').value)
		//}
	}
	if (temp=="galll") document.getElementById('galll').style.display='block';
	if (temp=="plan") document.getElementById('plan').style.display='block';
	if (temp=="walk") document.getElementById('walk').style.display='block';
	
		
	}

function checkCode(writeCode)
{ //alert(writeCode);
	sendGetRequest('http://www.maxconsult.bg/server/codeCheck.php?code=' + writeCode, 'Myval');	
	
}

function getSubtypes(id)
{
	sendGetRequest('server/get_subtypes.php?id=' + id, 'displaySubtypes');	
}



function displaySubtypes(aRegions)
{
	var div  = document.getElementById('subtype_container');
	var init = document.getElementById('subtype_init').value;
	
	
	if(aRegions.length>0)
	{
		var sel  = '<select name="subtype_id" id="idsubtype_id" style=" width:100px;">';
	
		for (var i=0; i < aRegions.length; i++) 
		{
			some = aRegions[i];
			sel += '<option value="' + some.id + '"';
			if(some.id == init)
				sel += " selected";
		
			sel += '>' + some.name + '</option>';
   		}
	
		sel += '</select>';
	}
	else sel = "";
	div.innerHTML = sel;
}

function displayRegions(aRegions)
{
	var div  = document.getElementById('region_container');
	var init = document.getElementById('region_init').value;
	
	
	var sel  = '<select name="regionid" id="idregion_id" class="sel" style=" width:100px;">';
	
	for (var i=0; i < aRegions.length; i++) 
	{
		some = aRegions[i];
		sel += '<option value="' + some.id + '"';
		if(some.id == init)
			sel += " selected";
		
		sel += '>' + some.name + '</option>';
    }
	
	sel += '</select>';
	
	div.innerHTML = sel;
}

function showGoogleMap(position1, position2)
{
	var data ='';
	//<![CDATA[';

		//some=aMapItems[0];
		var map = new GMap2(document.getElementById("map"));
		//var start = new GLatLng(65,25);
		map.setCenter(new GLatLng(parseFloat(position1),parseFloat(position2)), 12);
		map.addControl(new GMapTypeControl(1));
		map.addControl(new GLargeMapControl());
		
		map.enableContinuousZoom();
		map.enableDoubleClickZoom();
		map.setMapType(G_HYBRID_MAP) ;
		
		
		// "tiny" marker icon
		var icon = new GIcon();
		if (document.getElementById('dev').value==1)
			icon.image = SITEURL+"images/map_icons/proekti.png";
		else icon.image = SITEURL+"images/map_icons/obekti.png";
		icon.shadow = SITEURL+"images/map_icons/shadow.png";
		icon.iconSize = new GSize(24,24);
		icon.shadowSize = new GSize(26,26);
		icon.iconAnchor = new GPoint(16,26);
		icon.infoWindowAnchor = new GPoint(16,0);
		
		var point = new GLatLng(parseFloat(position1),parseFloat(position2))
		var markerN = new GMarker(point, {icon:icon}); 
		map.addOverlay(markerN);
		
	
	//]]>
}

//-------------------
/// ALL THING YOU NEED FOR REQUEST FORMSs

	var div1 = "";

function Bansko_weather()
{
	if (document.getElementById('bansko_weather_id').style.display=='block')
		document.getElementById('bansko_weather_id').style.display='none';	
	else 
		document.getElementById('bansko_weather_id').style.display='block';	
}


function openRequest()
{ 
	div1 = document.getElementById('div1');
 
	div1.style.display = "block";
	div1.style.top =  arguments[1] + "px";
	div1.style.left = arguments[0] + "px";
	
	fader.fadeIn();
	fader2.fadeIn();
}

function closeRequest_write()
{

	fader_write.fadeOut();
	fader2.fadeOut();
}

function openRequest_write()
{ 
	div1 = document.getElementById('div_write');
 
	div1.style.display = "block";
	div1.style.top =  arguments[1] + "px";
	div1.style.left = arguments[0] + "px";
	
	fader_write.fadeIn();
	fader2.fadeIn();
}

function openRequest_christmas()
{ 
	
	if (arguments[2])
	{ 
		card_lg='card_'+arguments[2];
	} 
	//alert(getCookie(card_lg));
	if ((document.getElementById('card_id').value=="") && (!getCookie(card_lg))&& (getCookie(card_lg)!=1))
	{
		if (arguments[3]) ex=arguments[3];
	setCookie(card_lg, "1",ex);
	document.getElementById('card_id').value="set";
	div1 = document.getElementById('div3');
 
	div1.style.display = "block";
	div1.style.top =  arguments[1] + "px";
	div1.style.left = arguments[0] + "px";
	
	fader3.fadeIn();
	fader2.fadeIn();
	}
	else 
		{fader3.fadeOut();

			fader2.fadeOut();
			document.getElementById('card_id').value="";
			}
	
	
}

function openRequest1()
{ 
	div1 = document.getElementById('div2');
 
	div1.style.display = "block";
	div1.style.top =  arguments[1] + "px";
	div1.style.left = arguments[0] + "px";
	
	fader1.fadeIn();
	fader2.fadeIn();
}

function openDesc()
{
	div1 = document.getElementById('divDescription');
	div1.style.display = "block";
	
	if (window.innerWidth || window.innerHeight)
	{ 
		docwidth = window.innerWidth; 
		docheight = window.innerHeight; 
	} 
	//IE Mozilla 
	if (document.body.clientWidth || document.body.clientHeight)
	{ 
		docwidth = document.body.clientWidth; 
		docheight = document.body.clientHeight; 
	} 
	
	if((docheight - 213)<arguments[1])
		div1.style.top  = (docheight - 200) + "px";
	else 	
		div1.style.top  = (arguments[1] - 10) + "px";
		
	div1.style.left = (arguments[0] + 105) + "px";	
	
	injectDiv('descTitle', arguments[2]);
	injectDiv('moreTitle', arguments[3]);
	injectInput('id', arguments[4]);
	injectDiv('listName', arguments[5]);
	injectDiv('listDesc', arguments[7]);
	injectDiv('descRegion', arguments[8]);
	injectDiv('listRegion', arguments[9]);
	
	document.getElementById('listImg').src = arguments[6] + ".jpg";
}

function closeDesc()
{
	document.getElementById('divDescription').style.display = "none";	
}

function injectDiv(some_id, text_to_inject)
{
	var id_container = document.getElementById(some_id);
	id_container.innerHTML = text_to_inject;
}

function injectInput(some_id, text_to_inject)
{
	var id_container = document.getElementById(some_id);
	id_container.value = text_to_inject;
}

function closeRequest()
{

	fader.fadeOut();
	fader1.fadeOut();
	fader2.fadeOut();
	if (document.getElementById('card_id').value=="set")
	 fader3.fadeOut();
}

function validate()
{
	if (document.forms['request'].elements['name'].value == "") 
	{
		alert("Please input Your Name.!");
		document.forms['request'].elements['name'].focus();
		return false;
	}
	if (document.forms['request'].elements['fr_name'].value == "") 
	{
		alert("Please input Your Friend's Name.!");
		document.forms['request'].elements['fr_name'].focus();
		return false;
	}
	if (document.forms['request'].elements['email'].value == "" || echeck(document.forms['request'].elements['email'].value)==false) 
	{
		alert("Please select correct e-mail address.!");
		document.forms['request'].elements['email'].value = "";
		document.forms['request'].elements['email'].focus();
		return false;
	}
	
	if (document.forms['request'].elements['fr_email'].value == "" || echeck(document.forms['request'].elements['fr_email'].value)==false) 
	{
		alert("Please select correct e-mail address.!");
		document.forms['request'].elements['fr_email'].value = "";
		document.forms['request'].elements['fr_email'].focus();
		return false;
	}
							
	return true
}

function Myval(aResult)
{
	a = parseInt(aResult)
	//alert(a);
	return a;
	
}



function validate2(code)
{
	if (document.forms['write22'].elements['name'].value == "") 
	{
		alert("Please input Your Name.!");
		//document.forms['write'].elements['name'].focus();
		return false;
	}
	if (document.forms['write22'].elements['code'].value == "") 
	{
		alert("Please write the letters you can see!");
		//document.forms['write'].elements['code'].focus();
		return false;
	}
	
	checkCode(document.forms['write22'].elements['code'].value);
	a= Myval();
	alert("Message is sending");
	//alert(a);
	if ((a==0) || (!a)) 
	{
		alert("The code is not correct");
		document.forms['write22'].elements['email'].focus();
		return false;
	}
	
	if (document.forms['write22'].elements['email'].value == "" || echeck(document.forms['write22'].elements['email'].value)==false) 
	{
		alert("Please select correct e-mail address.!");
		document.forms['write22'].elements['email'].value = "";
		//document.forms['write'].elements['email'].focus();
		return false;
	}
							
	return true
}


function CheckAndGo2(code)
{
	var checked = false;
	//alert(code);
	checked = validate2(code);
	if (checked) 
	{

		sendRequest('write22');
		document.forms['write22'].reset();
		//closeRequest();
	}
}

function CheckAndGo()
{
	var checked = false;
	checked = validate();
	if (checked) 
	{
		fader.fadeOut();
		sendRequest('request');
		document.forms['request'].reset();
		closeRequest();
	}
}

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}


function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   //alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   //alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    //alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    //alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    //alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}
	
	function getRequestBody(oForm) 
{
    var aParams = new Array();

    for (var i=0 ; i < oForm.elements.length; i++) 
	{
        var sParam = encodeURIComponent(oForm.elements[i].name);
        sParam += "=";
        sParam += encodeURIComponent(oForm.elements[i].value);
        aParams.push(sParam);
    }

    return aParams.join("&");
}
	
	function sendRequest( formm) 
{
	  
    var oForm = document.forms[formm];
    var sBody = getRequestBody(oForm);

    var oXmlHttp = createXMLHttp();
    oXmlHttp.open("post", oForm.action, true);
   	oXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

    oXmlHttp.onreadystatechange = function () 
	{
        if (oXmlHttp.readyState == 4) 
		{
            if (oXmlHttp.status == 200) 
			{
                //saveResult(oXmlHttp.responseText);
				alert('Your Message was sent successfully');
            } 
			else 
			{
               //saveResult("An error occurred: "+ oXmlHttp.statusText);
			   alert('Message not sent');
           	}
        }
    };
    oXmlHttp.send(sBody);
}

function sendMailRequest(formName) 
{
    var oForm = document.forms[formName];
    var sBody = getRequestBody(oForm);

    var oXmlHttp = createXMLHttp();
    oXmlHttp.open("post", oForm.action, true);
   	oXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

    oXmlHttp.onreadystatechange = function () 
	{
        if (oXmlHttp.readyState == 4) 
		{
            if (oXmlHttp.status == 200) 
			{
                clearForm(oXmlHttp.responseText, formName);
            } 
			else 
			{
                clearForm("An error occurred: "+ oXmlHttp.statusText, formName);
           	}
        }
    };
    oXmlHttp.send(sBody);
}


function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}


function SetMapItem(cityid,position1,position2)
{ 
	sendGetRequest(SITEURL+'server/get_map_item.php?cityid='+cityid+'&position1='+position1+'&position2='+position2 , 'showGoogleMap2');
}

function showGoogleMap2(aMapItems)
{
	var data ='';
	//<![CDATA[';

	if (aMapItems.length>0)
	{
		
		some=aMapItems[0];
		var map = new GMap2(document.getElementById("map"));
		//var start = new GLatLng(65,25);
		map.setCenter(new GLatLng(parseFloat(some.position1),parseFloat(some.position2)), 14);
		map.addControl(new GMapTypeControl(1));
		map.addControl(new GLargeMapControl());
		
		map.enableContinuousZoom();
		map.enableDoubleClickZoom();
		//map.setMapType(G_HYBRID_TYPE) ;
		map.setMapType(G_HYBRID_MAP);
		
		// "tiny" marker icon
		/*var icon = new GIcon();
		icon.image = SITEURL+"images/map_icons/home.png";
		icon.shadow = SITEURL+"images/map_icons/shadow.png";
		icon.iconSize = new GSize(26,26);
		icon.shadowSize = new GSize(28,26);
		icon.iconAnchor = new GPoint(16,26);
		icon.infoWindowAnchor = new GPoint(16,0);*/
		
		var icon = new GIcon();
		if (document.getElementById('dev').value==1)
			icon.image = SITEURL+"images/map_icons/proekti.png";
		else icon.image = SITEURL+"images/map_icons/obekti.png";
		icon.shadow = SITEURL+"images/map_icons/shadow.png";
		icon.iconSize = new GSize(24,24);
		icon.shadowSize = new GSize(26,26);
		icon.iconAnchor = new GPoint(16,26);
		icon.infoWindowAnchor = new GPoint(16,0);
		
		var airport = new GIcon(); //1
		airport.image = SITEURL+"images/map_icons/airport.png";
		airport.shadow = SITEURL+"images/map_icons/shadow.png";
		airport.iconSize = new GSize(24,24);
		airport.shadowSize =  new GSize(28,26);
		airport.iconAnchor = new GPoint(16,26);
		airport.infoWindowAnchor = new GPoint(16,0);
		
		
		var apteka = new GIcon(); //2
		apteka.image = SITEURL+"images/map_icons/apteka.png";
		apteka.shadow = SITEURL+"images/map_icons/shadow.png";
		apteka.iconSize = new GSize(24,24);
		apteka.shadowSize =  new GSize(28,26);
		apteka.iconAnchor = new GPoint(16,26);
		apteka.infoWindowAnchor = new GPoint(16,0);
		
		var bus = new GIcon(); //3
		bus.image = SITEURL+"images/map_icons/bus.png";
		bus.shadow = SITEURL+"images/map_icons/shadow.png";
		bus.iconSize = new GSize(24,24);
		bus.shadowSize =  new GSize(28,26);
		bus.iconAnchor = new GPoint(16,26);
		bus.infoWindowAnchor = new GPoint(16,0);
		
		var gas = new GIcon(); //4
		gas.image = SITEURL+"images/map_icons/gas.png";
		gas.shadow = SITEURL+"images/map_icons/shadow.png";
		gas.iconSize = new GSize(24,24);
		gas.shadowSize =  new GSize(28,26);
		gas.iconAnchor = new GPoint(16,26);
		gas.infoWindowAnchor = new GPoint(16,0);
		
		var hospital = new GIcon(); //5
		hospital.image = SITEURL+"images/map_icons/hospital.png";
		hospital.shadow = SITEURL+"images/map_icons/shadow.png";
		hospital.iconSize = new GSize(24,24);
		hospital.shadowSize = new GSize(28,26);
		hospital.iconAnchor = new GPoint(16,26);
		hospital.infoWindowAnchor = new GPoint(16,0);
		
		var kinderkarten = new GIcon(); //6
		kinderkarten.image = SITEURL+"images/map_icons/kinderkarten.png";
		kinderkarten.shadow = SITEURL+"images/map_icons/shadow.png";
		kinderkarten.iconSize = new GSize(24,24);
		kinderkarten.shadowSize = new GSize(28,26);
		kinderkarten.iconAnchor = new GPoint(16,26);
		kinderkarten.infoWindowAnchor = new GPoint(16,0);
		
		var police = new GIcon(); //7
		police.image = SITEURL+"images/map_icons/police.png";
		police.shadow = SITEURL+"images/map_icons/shadow.png";
		police.iconSize = new GSize(24,24);
		police.shadowSize = new GSize(28,26);
		police.iconAnchor = new GPoint(16,26);
		police.infoWindowAnchor = new GPoint(16,0);
		
		var post = new GIcon(); //8
		post.image = SITEURL+"images/map_icons/post.png";
		post.shadow = SITEURL+"images/map_icons/shadow.png";
		post.iconSize = new GSize(24,24);
		post.shadowSize = new GSize(28,26);
		post.iconAnchor = new GPoint(16,26);
		post.infoWindowAnchor = new GPoint(16,0);
		
		var school = new GIcon(); //9
		school.image = SITEURL+"images/map_icons/school.png";
		school.shadow = SITEURL+"images/map_icons/shadow.png";
		school.iconSize = new GSize(24,24);
		school.shadowSize = new GSize(28,26);
		school.iconAnchor = new GPoint(16,26);
		school.infoWindowAnchor = new GPoint(16,0);
		
		var supermarket = new GIcon(); //10
		supermarket.image = SITEURL+"images/map_icons/supermarket.png";
		supermarket.shadow = SITEURL+"images/map_icons/shadow.png";
		supermarket.iconSize = new GSize(24,24);
		supermarket.shadowSize = new GSize(28,26);
		supermarket.iconAnchor = new GPoint(16,26);
		supermarket.infoWindowAnchor = new GPoint(16,0);
		
		var train = new GIcon(); //11
		train.image = SITEURL+"images/map_icons/train.png";
		train.shadow = SITEURL+"images/map_icons/shadow.png";
		train.iconSize = new GSize(24,24);
		train.shadowSize = new GSize(28,26);
		train.iconAnchor = new GPoint(16,26);
		train.infoWindowAnchor = new GPoint(16,0);
		
		var office = new GIcon(); //12
		office.image = SITEURL+"images/map_icons/maxconsult_map_icon.png";
		office.shadow = SITEURL+"images/map_icons/shadow.png";
		office.iconSize = new GSize(24,24);
		office.shadowSize = new GSize(28,26);
		office.iconAnchor = new GPoint(16,26);
		office.infoWindowAnchor = new GPoint(16,0);
		
		var golf = new GIcon(); //13
		golf.image = SITEURL+"images/map_icons/golf.png";
		golf.shadow = SITEURL+"images/map_icons/shadow.png";
		golf.iconSize = new GSize(24,24);
		golf.shadowSize = new GSize(28,26);
		golf.iconAnchor = new GPoint(16,26);
		golf.infoWindowAnchor = new GPoint(16,0);
		
		var lift = new GIcon(); //14
		lift.image = SITEURL+"images/map_icons/lift.png";
		lift.shadow = SITEURL+"images/map_icons/shadow.png";
		lift.iconSize = new GSize(24,24);
		lift.shadowSize = new GSize(28,26);
		lift.iconAnchor = new GPoint(16,26);
		lift.infoWindowAnchor = new GPoint(16,0);
		
		var point = new GLatLng(parseFloat(some.position1),parseFloat(some.position2))
		var markerN = new GMarker(point, {icon:icon}); 
		map.addOverlay(markerN);
		
		
		for(var i=0;i<aMapItems.length;i++)
		{
			some=aMapItems[i];
			var ico=airport;
			var field_name='saved_airport_';
			var ff_tit='';
			if ((parseFloat(some.pos1)>0) && (parseFloat(some.pos2)>0))
			{
				var point = new GLatLng(parseFloat(some.pos1),parseFloat(some.pos2));
				if (some.type==1) 
					ico=airport;
					
				if (some.type==2) 
					ico=apteka;
					
				if (some.type==3) 
					ico=bus;
					
				if (some.type==4) 
					ico=gas;
					
				if (some.type==5) 
					ico=hospital;
					
				if (some.type==6) 
					ico=kinderkarten;
					
				if (some.type==7) 
					ico=police;
					
				if (some.type==8) 
					ico=post;
					
				if (some.type==9) 
					ico=school;
					
				if (some.type==10) 
					ico=supermarket;
					
				if (some.type==11) 
					ico=train;
					
				if (some.type==12) 
					ico=office;
					
				if (some.type==13) 
					ico=golf;
				
				if (some.type==14) 
					ico=lift;
					
				 var marker_plan =  new GMarker(point, {icon:ico, title:some.title}); 
				 map.addOverlay(marker_plan);
			}
			
		}// and of for
		
		
	}


	
	
	//]]>
}