function check_subscriber_mail(id_mail) {
    var email_id = document.getElementById(id_mail).value;
    var regMail = /^([_a-zA-Z0-9-]+)(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,3})$/;

    if(regMail.test(email_id) == false) {

      alert("The Email-Id entered is Invalid!") ;
      return false;

    } else {
      alert("You have successfully subscribed to our mailing list.");
      return true;

    }
}

function select_div(id) {

  //var id_custom = id"
  document.getElementById("profile").style.display = 'none';
  document.getElementById("profile_li").className = '';


  document.getElementById("gallery").style.display = 'none';
  document.getElementById("gallery_li").className = '';

  document.getElementById("management").style.display = 'none';
  document.getElementById("management_li").className = '';

  document.getElementById("news").style.display = 'none';
  document.getElementById("news_li").className = '';

  document.getElementById("brochure").style.display = 'none';
  document.getElementById("brochure_li").className = '';

document.getElementById(id).style.display = 'block';
  var custom_id  = id+'_li';  
  
  document.getElementById(custom_id).className = 'hover'; 

}

function is_report_brochure_page() {
  var report_url = window.location.href;
  var report_url_search_flag = report_url.search("#brochure");
  if(report_url_search_flag != -1) {
     setTimeout("select_div('brochure')",10)
  } else {
    return false;
  }
}

function get_ad_slots(website_id,strlocation) {
   // alert(website_id);return false;
      var ad_slot_id = '';
      switch(website_id) {
         case 3: if(strlocation == 'top_right') {
                    ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 29: if(strlocation == 'top_right') {
                   ad_slot_id = "BusinessReviewEurope_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 42: if(strlocation == 'top_right') {
                   ad_slot_id = "Exec_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 68: if(strlocation == 'top_right') {
                   ad_slot_id = "SupplyChain_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 81: if(strlocation == 'top_right') {
                   ad_slot_id = "StockMarket_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 94: if(strlocation == 'top_right') {
                   ad_slot_id = "LatinoBusinessReview_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 107: if(strlocation == 'top_right') {
                   ad_slot_id = "AfricanBusinessReview_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 192: if(strlocation == 'top_right') {
                   ad_slot_id = "AfricanBusinessReview_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 120: if(strlocation == 'top_right') {
                   ad_slot_id = "Manufacturing_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 129: if(strlocation == 'top_right') {
                   ad_slot_id = "HealthCare_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 138: if(strlocation == 'top_right') {
                   ad_slot_id = "FoodandDrink_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 147: if(strlocation == 'top_right') {
                   ad_slot_id = "Energy_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 156: if(strlocation == 'top_right') {
                   ad_slot_id = "Construction_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 165: if(strlocation == 'top_right') {
                   ad_slot_id = "Construction_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 174: if(strlocation == 'top_right') {
                   ad_slot_id = "Retail_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 183: if(strlocation == 'top_right') {
                   ad_slot_id = "Technology_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 205: if(strlocation == 'top_right') {
                   ad_slot_id = "BusinessReviewIndia_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 218: if(strlocation == 'top_right') {
                   ad_slot_id = "BusinessReviewCanada_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 231: if(strlocation == 'top_right') {
                   ad_slot_id = "BusinessReviewCanada_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
         case 244: if(strlocation == 'top_right') {
                   ad_slot_id = "BusinessReviewCanada_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;
       default : if(strlocation == 'top_right') {
                   ad_slot_id = "BusinessReviewCanada_Home_300x250_Right";
                 } else if(strlocation == 'header') {
                   ad_slot_id = "BusinessReviewAustralia_Home_728x90_Top";
                 } else if(strlocation == 'bottem_right') {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_BottomRight";
                 } else {
                   ad_slot_id = "BusinessReviewAustralia_Home_300x250_Right";
                 }
                 break;

       }
       return ad_slot_id;
  }

  function PaginationAjax(page_id,website_url,widget,web_id,blog_id,web_name,category_id) {
      // blog_id = document.getElementById("current_blog_reports_home").value;
      // web_id = document.getElementById("current_web").value;
      // web_name = document.getElementById("current_web_name").value;
      // category_id = document.getElementById("category_id").value;
      // widget = document.getElementById("reports_home_widget").value;
       $.ajax({
       type: "GET",
       url: website_url+"php/get_widget_ajax.php",
       data: ({widget:widget, website_id:web_id, cur_blog_id:blog_id, cur_web_name:web_name, category_id:category_id,page:page_id}),
       success: function(msg){
         document.getElementById("reports_home").innerHTML= msg;
       }
     });
  }


