function wOpenURL(url){
  if(location.pathname.indexOf('/weblication/grid5/') != 0){
    location.href = url;
  }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}  

function wOpenPopupURL(url, width, height){

  var name = '';
  
  if(width == '' || width == ' '){
    width = 786;
  }
  if(height == '' || height == ' '){
    height = 677;
  }
  
  url = url.replace(/&amp;/g, '&');
  options = ',location=no, menubar=no,toolbar=no,resizable=no,scrollbars=no,status=no';
  width   = parseInt(width);
  height  = parseInt(height);

  var posLeft = (screen.width / 2)  - (width  / 2);
  var posTop  = (screen.height / 2) - (height / 2);
  window.open(url, name, 'top='+posTop+',left='+posLeft+',width='+width+',height='+height+',' + options);
}

function wSendMailNospam(data){
  location.href = 'mailto:' + data.replace('|', '@');
}

function wEmbedNavpoint(id, url){
   
  url = url.indexOf('?') == -1 ? url + '?viewmode=embed' : url + '%amp;viewmode=embed';
  
  if($('#navpoint_' + id).data('hasLoaded') == '1'){             
    $('#navEmbed_' + id).show();
  }
  else{
    $.ajax({
      type: "GET",
      url: url,
      success: function(result){
        $('#navpoint_' + id).data('hasLoaded', '1');                  
        $('#navEmbed_' + id).html(result);
        $('#navEmbed_' + id).show();
        jQuery('#navpoint_' + id).mouseout(function(){
          $('#navEmbed_' + id).hide();
        });
        
        jQuery('#navEmbed_' + id).mouseover(function(){
          $('#navEmbed_' + id).show();
        });
        
        jQuery('#navEmbed_' + id).mouseout(function(){
          $('#navEmbed_' + id).hide();
        });    
      }
    });
  }
}                        
              
