function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}

function float(el) {
	$(el).css("top",-$("div#page").position().top+56);
}

window.onload = function() {

    externalLinks();  
    
    jQuery(function($){
        //$(".txtDate").datepicker({showOn: 'both', buttonImage: '/img/calendar.gif', buttonImageOnly: true});
        //$(".txtDateS").datepicker({tipSobota: 'true', showOn: 'both', buttonImage: '/img/calendar.gif', buttonImageOnly: true});        
    });   
    
}   

var lastGM = "gMapD";
var timeOutC = 1;

function gM(id,no,link) {
    $("#gUl>li").removeClass("active");
    $("#gm"+no).addClass("active");    
    
    if (id==lastGM) { 
		if (no==3) { window.location.href = link; }
		return; 
	}
    
	clearTimeout(tOut);

    $("#"+lastGM).css("zIndex",10);
    $("#"+id).css("zIndex",9);    
    $("#"+id).show();                
    $("#"+lastGM).fadeOut(500,function() { $(this).hide(); });    
    
    lastGM = id;
}  


function openWindow(path, name, width, height) {

   var winl = (screen.width - width) / 2;
   var wint = (screen.height - height) / 2;

   style = eval("'status=no,width="+width+",height="+height+",left="+winl+",top="+wint+",resizable=no,menubar=no,scrollbars=yes,toolbar=no'");
   window.open(path, name, style) ;
}   
