			  function table_over(s){

			 // alert(s);

			  	s.className='table_over';

			  }

			  function table_out(s){

			 // alert(s);

			// currentclass=s.className;

			  	s.className='table_out';

			  }



function popup_nofade(id,div_id,my_width,my_height){

	

	div_over=true;

	trueX = getRealLeft(id);

	trueY = getRealTop(id);

	document.getElementById(div_id).style.top=trueY+my_height+"px";

	document.getElementById(div_id).style.left=trueX-my_width+"px";

	document.getElementById(div_id).style.visibility="visible";

	//alert('');

}





		function getRealTop(el){

					yPos = document.getElementById(el).offsetTop;

					tempEl = document.getElementById(el).offsetParent;

						while (tempEl != null) {

						yPos += tempEl.offsetTop;

						tempEl = tempEl.offsetParent;

						}

						return yPos;

		}



	function getRealLeft(el){

			xPos = document.getElementById(el).offsetLeft;

			tempEl = document.getElementById(el).offsetParent;

							while (tempEl != null) {

							xPos += tempEl.offsetLeft;

							tempEl = tempEl.offsetParent;

							}

								return xPos;

	}

function common_hide_div(divid){

	document.getElementById(divid).style.visibility="hidden";

}





function home_around(){

	if(	document.getElementById('home_lat').value>0 && document.getElementById('home_lng').value>0)	{

		document.forms.search_home.submit();

	} else {

	popup_nofade('search_around_for','layer_search_home',0,19);

	search_search1(document.getElementById('search_around_street').value);

	}

	

	

	

}

		

function home_init_search_around(lat,lng,address){

	document.getElementById('home_lat').value=lat;

	document.getElementById('home_lng').value=lng;

	document.getElementById('search_around_street').value=address;

	common_hide_div('layer_search_home');

//	document.forms.search_home.submit();

	

}



function home_lat_lng_0(){

	document.getElementById('home_lat').value=0;

	document.getElementById('home_lng').value=0;	

}



function tool(divid,message){

	popup_nofade(divid,'common_tooltip',0,19);

	document.getElementById("div_common_tooltip").innerHTML=message;

	

}



function strrev(str) {

   if (!str) return '';

   var revstr='';

   for (i = str.length-1; i>=0; i--)

       revstr+=str.charAt(i)

   return revstr;

}



function share(){

	u=encodeURIComponent(document.location.href);

	t=encodeURIComponent(document.title);

    var targetUrl='http://www.facebook.com/sharer.php?u='+u;

    //alert(targetUrl);

	window.open(targetUrl);

}

function common_div(element){
	//vardocument.write('<div id="div_common_message"></div>');	
	if(!document.getElementById('div_common_message')){
	var newdiv = document.createElement('div');
 	  newdiv.setAttribute('id','div_common_message');
   newdiv.innerHTML = '  <div id="div_common_message_xclose" align=right><a class="xclose1" href="javascript:common_hide_div(\'div_common_message\');">Κλείσιμο</a></div><div id="div_common_message_data"></div>';

   document.body.appendChild(newdiv);
	}
	popup_nofade(element,'div_common_message',11,11);
}

function get_cats(){

//create_div('temp_div');
common_div('id_get_cats');
callAHAH('inc_cats.php','div_common_message_data','', '');
//popup_nofade('id_get_cats','temp_div',0,0);
}
