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 xfloat(el) { 
    //$(el).css("top",-$("div#page").position().top);       
}

function fullScreen(theURL) {
	window.open(theURL, '', 'fullscreen=yes, resizable=yes, scrollbars=yes');
}
      
function loadM(no) {

        $("div#sky>div").hide();
                
        $("#ldata").load(lang+"/"+no+".html",{limit: 25},function() {
            tb_init('a.thickbox, area.thickbox, input.thickbox');
            $("div#right").scrollTo(0);
            $("div#m"+no).show();
            //window.location.href='#top';
                
        });  
}


function emspa(a,b,c) {

	document.write('<a href=\"mailto:' + a + '@' + b + '.'+c+'\">');
	document.write(a + '@' + b + '.' + c + '</a>');

}


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) ;
}

window.onload = function() {
    externalLinks(); 
    
    $("ul#mtp>li").mouseover(function(){ 
      $(this).addClass("over");
    }).mouseout(function(){
      $(this).removeClass("over");
    });   
    
    parentEls = $("ul#mtp>li").find("ul").map(function () { 
                                var w = $(this).parent().width();
                                if (w<65) { w = 140; }
                                $(this).css("width",w+"px");
                                 
                              });
}