function MenuDown (object)
{
	object = document.getElementById (object);

	if ( !object.style )
	{
		return false;
	}

	if( object.style.display == 'none' )
	{
		object.style.display = '';

	}
	else
	{
		object.style.display = 'none';
	}
}
function onEnter(e){
	if (!e) e = event;
	if (e.keyCode == 13) {
		document.fsearch.submit();
	}
}


function showSubMenu (object, HOST) {
	image = document.getElementById ("ico" + object);
	folder = document.getElementById ("folder" + object);
	object = document.getElementById (object);

	if ( !object.style || !image) {return false;}

	if( object.style.display == 'none' ) {
		object.style.display = '';
        image.src = HOST + "images/ico-arrow-bottom.gif";
	}else{
		object.style.display = 'none';
		image.src = HOST + "images/ico-arrow-left.gif";
	}
}

function ChangeClass(obj, setclass) {
  document.getElementById(obj).className = setclass;
}

function MenuUpon (object)
{
	object = document.getElementById (object);

	if ( !object.style )
	{
		return false;
	}

	if( object.style.display == 'none' )
	{
		object.style.display = '';
		object.style.position = 'fixed';
		object.style.top = '180px';
		object.style.left = '12px';
		object.style.width = '240px';
		object.style.bgcolor = 'red';
		object.style.background = 'red';
		object.style.backgroundColor = 'red';




	}
	else
	{
		object.style.display = 'none';
	}
}


function showItem (id, name, image, sdesc, cost, HOST, final_price, type) {
	document.getElementById('incase').value = id;
	document.getElementById('sdesc').innerHTML = sdesc;
	document.getElementById('show_img').innerHTML = '<a class="hh1" href="'+HOST+'items/'+id+'/"><img src="'+image+'" alt="'+name+'" /></a>';
	document.getElementById('name').innerHTML = '<a class="hh1" href="'+HOST+'items/'+id+'/">'+name+'</a>';
	if (type !== 'D') {
      document.getElementById('fcost').className = 'cost';
	  document.getElementById('fcost').innerHTML = cost + " руб.";
	}else{
      document.getElementById('fcost').className = 'discount';
      document.getElementById('fcost').innerHTML = '<img class="img_discount" src="' + HOST + 'img/ico_discount.gif" alt="Цена со скидкой" title="Цена со скидкой" />';
	  document.getElementById('fcost').innerHTML += cost + " руб.";
	}
}

function CreateWindow(widthx, heightx, urlx, scrolls) {
  if (!scrolls)
    window.open(urlx, 'CompYou', "width=" + widthx + ", height=" + heightx + ", location=no, menubar=no, resizable=yes, scrollbars=no, statusbar=no");
  else
    window.open(urlx, 'CompYou', "width=" + widthx + ", height=" + heightx + ", location=no, menubar=no, resizable=yes, scrollbars=yes, statusbar=no");
}

function SetTimerAndClose(time) {
  for (i=1; i<=time; i++) {
      setTimeout ("", 1000*(i+1));
  }
  setTimeout ("window.close();", 1000*(time+1));
}

function Display(object) {
    object = document.getElementById (object);

    if ( !object.style ) {
        return false;
    }
    object.style.display = '';
}

function DisplayObj(object) {
    object = document.getElementById (object);

    if ( !object.style ) {
        return false;
    }
    object.style.display = '';
}

function Hide(object) {
    object = document.getElementById (object);
    if ( !object.style ) {
        return false;
    }
    object.style.display = 'none';
}

function HideAllPayment(arr) {
    for (i=0; i < arr.length; i++) {
        Hide('pay_'+arr[i]);
    }
}

function ShowPayment(arr) {
    for (i=0; i < arr.length; i++) {
        Display('pay_'+arr[i]);
    }
}

function CheckValues(prefix, arr) {
    for (i=0; i<arr.length; i++) {
        if (document.getElementById(prefix+arr[i]).value == '') {
            document.getElementById('div_error').innerHTML = 'Заполните поля';
            return false;
        }
    }
  return true;
}

function SetTimerAndRedirect(time, span, url) {
  document.getElementById(span).innerHTML = time;
  for (i=1; i<=time; i++) {
      setTimeout ("document.getElementById('" +span+ "').innerHTML = (" +(time-i)+ ");", 1000*(i+1));
  }
  setTimeout ("document.location.href = '" +url+ "';", 1000*(time+1));
}

function OpenWindowIf(select, value, url, widthx, heightx) {
  if (document.getElementById(select).options[document.getElementById(select).selectedIndex].value == value) {
    window.open (url, '', 'width='+widthx+', height='+heightx+', location=no, menubar=no, resizable=no, scrollbars=no, statusbar=no');
  }
}

function goToUrlIf(select, value, url) {
  if (document.getElementById(select).options[document.getElementById(select).selectedIndex].value == value) {
    document.location.href =  url;
  }
}

function setValue (obj, txt) {
	document.getElementById(obj).value = txt;

}

function setHTML (obj, txt) {
	document.getElementById(obj).innerHTML = txt;

}

function reCost () {
    var allcost = 0;
    var i = 0;
    var href = "";
	for (i = 0; i < cats_hard.length; i++) {
      cost = (document.getElementById('1cost' + cats_hard[i]).innerHTML * 1) ;
      art =  (document.getElementById('art' + cats_hard[i]).value * 1);
      if (document.getElementById('count' + cats_hard[i]) == null) quon = 1;
      else quon = (document.getElementById('count' + cats_hard[i]).value * 1);

      if (cost !== 0) {
        for (j = 0; j < quon; j++)
      	  href += art + ",";
      }
      allcost += (cost * quon);
      document.getElementById('cost' + cats_hard[i]).innerHTML = (cost * quon);
	}
    document.getElementById('allcostbut').href =  HOST + 'case/incase=' + href + '/';
    document.getElementById('allcost').innerHTML = allcost;
}

function selectItem (cat_id, item_id, item_name, item_price) {
  window.opener.DisplayObj('calc_buy');
  window.opener.setValue('art' + cat_id, item_id);
  window.opener.setHTML('calc' + cat_id, item_name);
  window.opener.setHTML('cost' + cat_id, item_price);
  window.opener.setHTML('1cost' + cat_id, item_price);
  window.opener.reCost();
  window.close();
}

  function showData (ids, data) {
    $.each (ids, function () {
      $("#" + this).show ();
      $("#" + this).html(data);
    });
  }

  function addToCart (base_url, item_id) {
    $.ajax({
      url: base_url + "additemincase.php",
      data: {id: ""+item_id+""},
      success: function(data){
        showData (new Array ('img-case'), '<img class="img-add-to-cart" src="'+ base_url + 'images/tick.png" />');
        showData (new Array ('text-case'), 'Уже в <a href="'+ base_url +'case/">корзине</a>');
        showData (new Array ('what-in-case'), data.howmany);
        $("#order").show ();
      },
      dataType: 'json',
      type: 'post',
      beforeSend: function() {
        showData (new Array ('img-case'), '<img class="img-add-to-cart" src="'+ base_url + 'images/ajax-loader.gif" />');
      },
      timeout: 4000
    });
  }

  function addItemToCart (base_url, item_id) {
    $.ajax({
      url: base_url + "additemincase.php",
      data: {id: ""+item_id+""},
      success: function(data){
        showData (new Array ('img-case' + item_id), '<img class="img-add-to-cart" src="'+ base_url + 'images/tick.png" />');
        showData (new Array ('text-case' + item_id), 'Уже в <a href="'+ base_url +'case/">корзине</a>');
        showData (new Array ('what-in-case'), data.howmany);
        $("#order").show ();
      },
      dataType: 'json',
      type: 'post',
      beforeSend: function() {
        showData (new Array ('img-case' + item_id), '<img class="img-add-to-cart" src="'+ base_url + 'images/ajax-loader-grey.gif" />');
      },
      timeout: 4000
    });
  }

  function changeBorderColor (obj, color) {
    $(obj).css({
      "border-right": "3px " + color + " dashed"
    });
  }

  function fastOrder (base_url, item_id, type, custom) {
   var re_phone = /^[+0-9\s]{7,}$/;

   //if ( $("#fast-phone").val().match(re_phone) ) {
   var ph = $("#fast-phone").val();
   if ( ph.length > 6 ) {
     $.ajax({
      url: base_url + "fastorder.php",
      data: {id: ""+item_id+"", type: ""+type+"", custom: ""+custom+"", name: ""+ $("#fast-name").val() +"", phone: ""+ $("#fast-phone").val() +""},
      success: function(data){
        $('#fast-name').attr ("disabled", true);
        $('#fast-phone').attr ("disabled", true);
        showData (new Array ('fast-loader'), '<img src="'+ base_url + 'images/fast-tick.jpg" />');
        showData (new Array ('fast-send'), 'Ожидайте звонка');
      },
      dataType: 'json',
      type: 'post',
      beforeSend: function() {
        $('#fast-phone').attr ("style", "border: 1px green solid;");
        showData (new Array ('fast-loader'), '<img src="'+ base_url + 'images/fast-ajax-loader.gif" />');
      }
    });
   }else{
     $('#fast-phone').attr ("style", "border: 1px red solid;");
   }
  }

  function pfastOrder (base_url, item_id, type, custom) {
   var re_phone = /^[+0-9\s]{7,}$/;

   
   //if ( $("#pfast-phone").val().match(re_phone) ) {
   var ph = $("#pfast-phone").val();
   if ( ph.length > 6 ) {
     $.ajax({
      url: base_url + "fastorder.php",
      data: {id: ""+item_id+"", type: ""+type+"", custom: ""+custom+"", name: ""+ $("#pfast-name").val() +"", phone: ""+ $("#pfast-phone").val() +""},
      success: function(data){
        $('#pfast-name').attr ("disabled", true);
        $('#pfast-phone').attr ("disabled", true);
        showData (new Array ('pfast-loader'), '<img src="'+ base_url + 'images/tick.png" />');
        showData (new Array ('pfast-send'), 'Ожидайте звонка');
      },
      dataType: 'json',
      type: 'post',
      beforeSend: function() {
        //$('#pfast-phone').attr ("style", "border: 1px green solid;");
        showData (new Array ('pfast-loader'), '<img src="'+ base_url + 'images/ajax-loader.gif" />');
      }
    });
   }else{
     $('#pfast-phone').attr ("style", "border: 1px red solid;");
   }
  }

  function textCarousel (host, texts, ids) {
   i = 0;
   if (texts.length == 1) {
     $("#actions-text").everyTime (5000, function(i) {
        $(this).fadeTo (500, 0);
        txt = texts[0];
        id =  ids[0];
        $(this).oneTime (500, function() {
          $(this).html('<a id="no-a" href="'+host+'actions/'+id+'/">' + txt + '</a>');
        });
        $(this).fadeTo (500, 1);
        i++;
     });    
   }else{
     $("#actions-text").everyTime (5000, function(i) {
        $(this).fadeTo (500, 0);
        txt = texts[i % texts.length];
        id =  ids[i % texts.length];
        $(this).oneTime (500, function() {
          $(this).html('<a id="no-a" href="'+host+'actions/'+id+'/">' + txt + '</a>');
        });
        $(this).fadeTo (500, 1);
        i++;
     });
   }
  }

  function __loginBox () {
    $("#login_box").css({width: ($(window).width() / 4) + "px"});
  	  if ($("#login_box").width() < 310) $("#login_box").css({width: "310px"});
		  $("#login_box").show();

		  $("#login_button").click(function() {
          if ($("#login_form").height() == 0) {
            $("#login_form").animate({
            	height: "85px",
              paddingTop: "10px",
              paddingLeft: "40px"
            });
            $("#login_form").css ({
              borderTop: "#b2d9f2 2px solid"
            });
            $("#login_button").css ({
              borderTop: "#e8f2f8 2px solid"
            });
          }else{
            $("#login_form").animate({
            	height: "0px",
              paddingTop: "0px",
              paddingLeft: "0px"
            });
            $("#login_form").css ({
              border: "none"
            });
            $("#login_button").css ({
              borderTop: "#b2d9f2 2px solid"
            });
          }
		  });
  }

  function __search () {
  	$('#srch_fld').focus(function() {
  		$(this).val('');
  		$(this).css ('color', '#36373C');
  	});
  	$('#srch_fld2').focus(function() {
  		$(this).val('');
  		$(this).css ('color', '#36373C');
  	});
  	/*
  	$('#srch_fld').blur(function() {
  		$(this).css ('color', '#BFBFBF');
  		$(this).val('Поиск по каталогу');
  	});
  	$('#srch_fld2').blur(function() {
  		$(this).css ('color', '#C7C7C7');
  		$(this).val('Поиск по каталогу');
  	});*/
    $('#srch_fld').keypress(function(e) {
          if(e.which == 13) {
            $(this).blur();
            $('#fsearch').submit();
          }
    });
    $('#srch_fld2').keypress(function(e) {
          if(e.which == 13) {
            $(this).blur();
            $('#fsearch2').submit();
          }
    });
  }
  
  

  function __backPhone () {
    $("#a-back-phone").click(function() {
          if ($("#div-back-phone-info").height() == 0) {
            $("#div-back-phone-info").animate({
              height: "120px"
            });
          }else{
            $("#div-back-phone-info").animate({
              height: "0px"
            });
          }
		  });
  }

  function phoneBack (base_url, this_url, art) {
   var re_phone = /^[\+\-0-9\s]{7,}$/;

   //if ( $("#back-phone").val().match(re_phone) ) {
   var ph = $("#back-phone").val();
   if ( ph.length > 6 ) {
     $.ajax({
      url: base_url + "phoneback.php",
      data: {phone: ""+ $("#back-phone").val() +"", name: ""+ $("#back-name").val() +"", ref: ""+this_url+"", id: ""+art+""},
      success: function(data){
        $('#back-phone').attr ("disabled", true);
        showData (new Array ('back-loader'), '<img style="margin-bottom:-2px;" src="'+ base_url + 'images/tick.png" />');
        showData (new Array ('back-send'), 'Ожидайте звонка');
      },
      dataType: 'json',
      type: 'post',
      beforeSend: function() {
        $('#back-phone').attr ("style", "border: 1px green solid;");
        showData (new Array ('back-loader'), '<img style="margin-bottom:-2px;" src="'+ base_url + 'images/fast-ajax-loader.gif" />');
      }
    });
   }else{
     $('#back-phone').attr ("style", "border: 1px red solid;");
   }
  }

function prepareSlider (base_url, slider_id, counter_id, units, cmax, cmin, ccmax, ccmin, step) {
  $(function() {
		$("#" + slider_id).slider({
			range: true,
			min: cmin,
			max: cmax,
			values: [ccmin, ccmax],
			step: step,
			slide: function(event, ui) {
				$("#" + counter_id).html(' от <b>' + ui.values[0] + '</b> до <b>' + ui.values[1] + '</b> ' + units);
                $("#" + counter_id + "-from").val(ui.values[0]);
                $("#" + counter_id + "-to").val(ui.values[1]);
			},
            change: function(event, ui) {
                selectNotes (base_url);
            }
		});

		$("#" + counter_id).html(' от <b>&nbsp;' + $("#" + slider_id).slider("values", 0) + '&nbsp;</b> до <b>&nbsp;' + $("#" + slider_id).slider("values", 1) + '&nbsp;</b> ' + units);
        $("#" + counter_id + "-from").val($("#" + slider_id).slider("values", 0));
        $("#" + counter_id + "-to").val($("#" + slider_id).slider("values", 1));
	});
}

function prepareFastSlider (base_url, slider_id, counter_id, units, cmax, cmin, ccmax, ccmin, step) {
  $(function() {
		$("#" + slider_id).slider({
			range: true,
			min: cmin,
			max: cmax,
			values: [ccmin, ccmax],
			step: step,
			slide: function(event, ui) {
				$("#" + counter_id).html(' от <b>' + ui.values[0] + '</b> до <b>' + ui.values[1] + '</b> ' + units);
                $("#" + counter_id + "-from").val(ui.values[0]);
                $("#" + counter_id + "-to").val(ui.values[1]);
			},
            change: function(event, ui) {
                fastSelectNotes (base_url);
            }
		});

		$("#" + counter_id).html(' от <b>&nbsp;' + $("#" + slider_id).slider("values", 0) + '&nbsp;</b> до <b>&nbsp;' + $("#" + slider_id).slider("values", 1) + '&nbsp;</b> ' + units);
        $("#" + counter_id + "-from").val($("#" + slider_id).slider("values", 0));
        $("#" + counter_id + "-to").val($("#" + slider_id).slider("values", 1));
	});
}

function selectNotes (show) {
      var firms = '';
      var procs = '';
      var oss = '';
      var cons = '';
      var vids = '';
      var types = '';

      for (var i = 0; i < $('#firm-count').val(); i++) {
        if ($('#firm' + i).attr("checked")) { firms += ($('#firm' + i).val ()) + ','; }
      }
      for (var i = 0; i < $('#proc-count').val(); i++) {
        if ($('#proc' + i).attr("checked")) { procs += ($('#proc' + i).val ()) + ','; }
      }
      for (var i = 0; i < $('#con-count').val(); i++) {
        if ($('#con' + i).attr("checked")) { cons += ($('#con' + i).val ()) + ','; }
      }
      for (var i = 0; i < $('#os-count').val(); i++) {
        if ($('#os' + i).attr("checked")) { oss += ($('#os' + i).val ()) + ','; }
      }
      for (var i = 0; i < $('#wvid-count').val(); i++) {
        if ($('#wvid' + i).attr("checked")) { vids += ($('#wvid' + i).val ()) + ','; }
      }
      for (var i = 0; i < $('#types-count').val(); i++) {
        if ($('#type' + i).attr("checked")) { types += ($('#type' + i).val ()) + ','; }
      }
      var sliders = new Array ('hz','amount','display','vid','op','hdd','weight');
      $.ajax({
        url: base_url + "selectnotes.php",
        data: {
            firms: ""+ firms +"",
            procs: ""+ procs +"",
            oss: ""+ oss +"",
            cons: ""+ cons +"",
            vids: ""+ vids +"",
            types: ""+ types +"",
            amount: ""+ $("#amount-from").val() +","+ $("#amount-to").val() +"",
            hz: ""+ $("#hz-from").val() +","+ $("#hz-to").val() +"",
            display: ""+ $("#display-from").val() +","+ $("#display-to").val() +"",
            vid: ""+ $("#vid-from").val() +","+ $("#vid-to").val() +"",
            op: ""+ $("#op-from").val() +","+ $("#op-to").val() +"",
            hdd: ""+ $("#hdd-from").val() +","+ $("#hdd-to").val() +"",
            weight: ""+ $("#weight-from").val() +","+ $("#weight-to").val() +""
        },
        success: function(data){
            str =  'Выбрано моделей: <b>'+ data.count +'</b>.';
            if (data.count !== 0) str +=  '&nbsp;<a class="a-add-to-cart" href="javascript: showNotes(\''+ base_url +'\',\''+ data.result +'\');"><span>Показать</span></a> &rarr;';
            showData (new Array ('div-select-result'), str);
            if (show == 1) showNotes (base_url, data.result);
        },
        dataType: 'json',
        type: 'post',
        beforeSend: function() {
          showData (new Array ('div-select-result'), '<img src="'+ base_url + 'images/green-ajax-loader.gif" />');
        }
      });

}

function fastSelectNotes () {
      var firms = '';
      var oss = '';
      var cons = '';
      var vids = '';
      var types = '';

      for (var i = 0; i < $('#firm-count').val(); i++) {
        if ($('#firm' + i).attr("checked")) { firms += ($('#firm' + i).val ()) + ','; }
      }
      for (var i = 0; i < $('#con-count').val(); i++) {
        if ($('#con' + i).attr("checked")) { cons += ($('#con' + i).val ()) + ','; }
      }
      for (var i = 0; i < $('#os-count').val(); i++) {
        if ($('#os' + i).attr("checked")) { oss += ($('#os' + i).val ()) + ','; }
      }
      for (var i = 0; i < $('#wvid-count').val(); i++) {
        if ($('#wvid' + i).attr("checked")) { vids += ($('#wvid' + i).val ()) + ','; }
      }
      for (var i = 0; i < $('#types-count').val(); i++) {
        if ($('#type' + i).attr("checked")) { types += ($('#type' + i).val ()) + ','; }
      }
      /* var sliders = new Array ('hz','amount','display','vid','op','hdd','weight');  */
      $.ajax({
        url: base_url + "selectnotes.php",
        data: {
            firms: ""+ firms +"",
            oss: ""+ oss +"",
            cons: ""+ cons +"",
            vids: ""+ vids +"",
            types: ""+ types +"",
            amount: ""+ $("#amount-from").val() +","+ $("#amount-to").val() +"",
            hz: ""+ 1 +","+ 5000 +"",
            display: ""+ 1 +","+ 50 +"",
            vid: ""+ 0 +","+ 10000 +"",
            op: ""+ 0 +","+ 10000 +"",
            hdd: ""+ 0 +","+ 10000 +"",
            weight: ""+ 0 +","+ 100 +""
        },
        success: function(data){
            str =  'Моделей: <b>'+ data.count +'</b>.';
            if (data.count !== 0) str +=  '&nbsp;<a class="a-add-to-cart" href="#top" onclick="javascript: showFastNotes(\''+ base_url +'\',\''+ data.result +'\');"><span>Показать</span></a> &rarr;';
            showData (new Array ('div-select-result'), str);
        },
        dataType: 'json',
        type: 'post',
        beforeSend: function() {
          showData (new Array ('div-select-result'), '<img src="'+ base_url + 'images/green-ajax-loader.gif" />');
        }
      });
}

function showNotes (base_url, ids) {
      $.ajax({
        url: base_url + "shownotes.php",
        data: {
            ids: ""+ ids +""
        },
        success: function(data){
          $('#div-selected').css ('text-align', 'left');
          $('#div-selected').css ('float', 'left');
          showData (new Array ('div-selected'), data);
        },
        dataType: 'html',
        type: 'post',
        beforeSend: function() {
          $('#div-selected').css ('float', 'none');
          $('#div-selected').css ('text-align', 'center');  
          showData (new Array ('div-selected'), '<span class="span-grey">Терпение и труд все перетрут</span><br/><br/><img src="'+ base_url + 'images/ajax-loader-fff.gif" />');
        }
      });

}

function showFastNotes (base_url, ids) {
      $.ajax({
        url: base_url + "shownotes.php",
        data: {
            ids: ""+ ids +""
        },
        success: function(data){
          $('#div-selected').css ('text-align', 'left');
          $('#div-selected').css ('float', 'left');
          showData (new Array ('div-selected'), data);
        },
        dataType: 'html',
        type: 'post',
        beforeSend: function() {
          $("#div-filters").hide({
              height: "0px"
          });
          $("#div-fast-select-h1").html ("<h1>Бытрый подбор ноутбуков</h1>");  
          $("#div-fast-select-h1").show();
          $("#div-pages").hide();
          $('#div-selected').css ('float', 'none');
          $('#div-selected').css ('text-align', 'center');
          showData (new Array ('div-selected'), '<span class="span-grey">Терпение и труд все перетрут</span><br/><br/><img src="'+ base_url + 'images/ajax-loader-fff.gif" />');
        }
      });

}

function showTooltip (objName, content, x, y) {
    $("#" + objName).qtip({
         content: {
         	text: content
         },
         position: {
         	  corner: {
              target: 'rightMiddle',
              tooltip: 'leftMiddle'
            },
            adjust: { x: x}
         },
         style: {
              'background-color': '#E8F2F8',
              'line-height': '22px',
              'font-size': '12px',
              'color': '#000',
            title: {
              'font-size': '16px',
              'padding-left': '10px'
            },
            tip: {
              corner: 'leftMiddle',
              size: {x: 10, y: 15 }
            },
            name: 'light',
            width: { max: 300 },
            border: {
              color: '#B2D9F2',
              width: 1,
              radius: 0
            }
         },
         show: { when: { event: 'mouseover' } },
         hide: { when: { event: 'mouseout' }, fixed: true, delay: 100}

    });
  }


function showPageInfo (base_url, id) {
    $("#div-apage").dialog("destroy");
    $("#div-apage").dialog({modal: true, resizable: false, width: 600, height: 500});

    $.ajax({
      url: base_url + "showpageinfo.php",
      data: {id: id},
      success: function(data){
        $("#div-apage").css ('text-align', 'left');
        $("#div-apage").dialog( "option", "title", data.title);
        $("#div-apage").html (data.content);
      },
      dataType: 'json',
      type: 'post',
      beforeSend: function() {
        $("#div-apage").css ('text-align', 'center');
        $("#div-apage").html ('<img src="'+ base_url + 'images/ajax-loader-fff.gif" />');
      }
    });
}

function showModalDialog (id, title, ww, hh) {
    $("#" + id).dialog("destroy");
    $("#" + id).dialog({modal: true, resizable: false});
    $("#" + id).dialog( "option", "title", title);
}

function closeActionItems (base_url, idd) {
    $.ajax({
        url: base_url + "no_action_items.php",
        data: {
            off: "1"
        },
        success: function(data){},
        dataType: 'json',
        type: 'post',
        beforeSend: function() {
                $('#'+idd).hide ('slow');
        }
    });
}


