$(document).ready(function(){
    $('input.searchInput').focus();
    $("h1.forward").click(function(){
        window.open($("a." + $(this).attr("id")).attr("href") ,'_blank');
    });
    $("h2.forward").click(function(){
        window.open($("a." + $(this).attr("id")).attr("href") ,'_blank');        
    });
    $("h3.forward").click(function(){
        window.open($("a." + $(this).attr("id")).attr("href") ,'_blank');        
    });    
    $("h4.forward").click(function(){
        window.open($("a." + $(this).attr("id")).attr("href") ,'_blank');        
    });
    $("h5.forward").click(function(){
        window.open($("a." + $(this).attr("id")).attr("href") ,'_blank');        
    });
    $("h6.forward").click(function(){
        window.open($("a." + $(this).attr("id")).attr("href") ,'_blank');        
    });
    $("div.stickFooter a.close").click(function(){
        $("div.stickFooter").hide("slide", { direction: "down" }, 500);
        $.ajax({
            type: "post",
            url: URL_SITE + "mvc.php",
            data: "action=ajaxCloseDeliveryBar"
        });        
        return false;
    });
});
function redirectCorrection()
{
    var location = window.location.href;
    var newLocation = '';
    var pos = location.indexOf('.html');
    if (pos>=0){
        var locArr = location.split('/');
        for (var i=0;i<locArr.length-1;i++){
            if (locArr[i]!='#'){
                newLocation += locArr[i]+"/";
            }
        }
    }else{
        newLocation = location;
    }
    window.location.href = newLocation;
}
function IsNumeric(sText)
{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
}
