// JavaScript Document
var time = null;
function showTab(idIndex){
    show = "document.getElementById('" + idIndex + "').style.display = 'block'";
    time = setTimeout(show,50);
}
function hideTab(idIndex){
    show = "document.getElementById('" + idIndex + "').style.display = 'none'";
    time = setTimeout(show,50);
}
function stopTimeOut(){
    clearTimeout(time);
}

var scrollWidth;

function position() {
    if(document.body.scrollWidth>1024) 
	{
   	x_poz=document.body.scrollWidth/2 - 285;
    document.getElementById('hotels').style.left = x_poz+'px'; 
	    document.getElementById('about').style.left = x_poz+'px'; 
		    document.getElementById('groups').style.left = x_poz+'px'; 
				    document.getElementById('local').style.left = x_poz+'px'; 
					    document.getElementById('contact').style.left = x_poz+'px';
    } else {
	x_poz=227;
    document.getElementById('hotels').style.left = x_poz+'px'; 
	    document.getElementById('about').style.left = x_poz+'px'; 
		    document.getElementById('groups').style.left = x_poz+'px'; 
				    document.getElementById('local').style.left = x_poz+'px'; 
					    document.getElementById('contact').style.left = x_poz+'px';
    }
}



var cssFix = function(){

  var u = navigator.userAgent.toLowerCase(),

  addClass = function(el,val){

    if(!el.className) {

      el.className = val;

    } else {

      var newCl = el.className;

      newCl+=(" "+val);

      el.className = newCl;

    }

  },

  is = function(t){return (u.indexOf(t)!=-1)};

  addClass(document.getElementsByTagName('html')[0],[

    (!(/opera|webtv/i.test(u))&&/msie (\d)/.test(u))?('ie ie'+RegExp.$1)

      :is('firefox/2')?'gecko ff2'

      :is('firefox/3')?'gecko ff3'

      :is('gecko/')?'gecko'

      :is('opera/9')?'opera opera9':/opera (\d)/.test(u)?'opera opera'+RegExp.$1

      :is('konqueror')?'konqueror'

      :is('applewebkit/')?'webkit safari'

      :is('mozilla/')?'gecko':'',

    (is('x11')||is('linux'))?' linux'

      :is('mac')?' mac'

      :is('win')?' win':''

  ].join(" "));

}();

