function start_Timeout(){
	if (timer) window.clearTimeout(timer);
	timer = window.setTimeout("resetAll()",50);
};
function clear_Timeout(){
	if (timer) window.clearTimeout(timer);
};
function resetAll(){
	document.getElementById('servNavService').className = 'hideLayer';
	document.getElementById('servNavPlusService').className = 'servNavPlus';
	document.getElementById('servNavServiceWrap').className = 'servNavLinksWrap';
};
function showLayer(idLayer,idTrigger,wrapper){
	document.getElementById(idLayer).className = 'showLayer';
	document.getElementById(idTrigger).className = 'servNavPlusHover';
	document.getElementById('servNav'+wrapper+'Wrap').className = 'servNav'+wrapper+'WrapHover';
};
function hideLayer(idLayer,idTrigger){
	if (timer) window.clearTimeout(timer);
	layerObj = idLayer;
	triggerObj = idTrigger;
	timer = window.setTimeout("resetAll()", 50);
};
function doLoad() {
	resetAll();
	document.getElementById("servNavService").onmouseout = start_Timeout;
	document.getElementById("servNavService").onmousemove = clear_Timeout;
	document.getElementById("servNavPlusService").onmouseover = changeService;
	document.getElementById("servNavPlusService").onfocus = changeService;
	document.getElementById("servNavPlusService").onmouseout = start_Timeout;
	document.getElementById("servNavPlusService").onmousemove = clear_Timeout;
};
function changeLinks(){
	showLayer('servNavlinks','servNavPlusLinks','Links')
};
function changeService(){
	showLayer('servNavService','servNavPlusService','Service')
};
var timer = 1;
window.onload = doLoad;
/* ---------- TOOLS ------------ */
/* Author: Yulian Netskov Yordanov - METRO CC BULGARIA */

function show_popup(url, width, height) {
	var ref = window.open(url, 'popup', 'toolbar=0,location=0,directories=0,status=0,scrollbars=auto,resizable=1,menuBar=0,width='+width+',height='+height);
	ref.focus();
	return false;
};
function show_popupLT(url, width, height, LT) {
	var ref = window.open(url, 'popup', 'toolbar=0,location=0,directories=0,status=0,scrollbars=auto,resizable=1,menuBar=0,left='+LT+',top='+LT+',width='+width+',height='+height);
	ref.focus();
	return false;
};
function clearValue(e) {
	var coll = document.all;
	if (coll != null) {
		for (var i = 0; i < coll.length; i++) {
			if (coll.item(i).tagName == 'INPUT') coll.item(i).value = '';
			if (coll.item(i).tagName == 'TEXTAREA') coll.item(i).value = '';
			if (coll.item(i).tagName == 'SELECT') coll.item(i).selectedIndex = 0;
};	};	};
function bookmark(e) {
	var URL = document.location.href;
	var Title = document.title;
	if (document.all)
		window.external.AddFavorite(URL, Title)
	else
		if (window.sidebar)
			window.sidebar.addPanel(Title, URL , '');
};
function setHomePage(e) {
	if (window.external) {
		e.style.behavior='url(#default#homepage)';
		e.setHomePage(location.href);
	};
};
function setWebSlice(e) {
	var URL = document.location.href;
	var Title = document.title;
	if (document.all)
		window.external.AddToFavoritesBar(URL, Title, 'slice')
	else
		if (window.sidebar)
			window.sidebar.addPanel(Title, URL , 'slice');
};
function scrollWinToContent(e) {
	if ( !e > 0 ) { e = 150; };
	window.scrollTo(0,e);
};
/*-- 3xxx --*/
function ShowTextCity(e1,e2) {
	document.getElementById("ShowTextCity1").value = e1;
	document.getElementById("ShowTextCity2").value = e2;
};
function HideTextCity() {
	document.getElementById("ShowTextCity1").value = '';
	document.getElementById("ShowTextCity2").value = '';
};
/*------------------------*/

$(function (){	$("#widget_facebook").hover(function(){
					$("#widget_facebook").stop(true, false).animate({right:"0"},"medium");
				},function(){
					$("#widget_facebook").stop(true, false).animate({right:"-241"},"medium");
				},500);
				return false;
});

