function open_auth(id) {
    var slaider = document.getElementById('shrouded_'+id);
    var block_order = document.getElementById('block_'+id);
    
    var topheight = Math.round(document.documentElement.clientHeight*0.15) + document.documentElement.scrollTop;
    var divheight = document.documentElement.scrollHeight;

    slaider.style.height = divheight + "px";
    block_order.style.marginTop = topheight + "px";
    slaider.style.display = 'inline';
}
function open_region() {
    var slaider = document.getElementById('shrouded_region');
    var block_order = document.getElementById('changeregion');
    
    var topheight = Math.round(document.documentElement.clientHeight*0.15) + document.documentElement.scrollTop;
    var divheight = document.documentElement.scrollHeight;

    slaider.style.height = divheight + "px";
    block_order.style.marginTop = topheight + "px";
    slaider.style.display = 'inline';
}
function close_auth(id) {
    var slaider = document.getElementById('shrouded_'+id);
    slaider.style.display = 'none';
    document.getElementById('errormess').style.display = 'none';
}

function submit_form(div_id) {
    var email = $("#subscribe_email").val();
    var mails = email.match(/^[._\w\d-]+@[._\w\d-]+\.\w{2,}$/);

if (mails && mails.length == 1) {
    $("#email_subscription span").animate({color: "#0053a0"}, 1000);
    $("#subscribe_form").submit();
} else {

    $("#email_subscription").animate({marginTop: "-10px"}, 400).animate({marginTop: "20px"}, 200).animate({marginTop: "0px"}, 200);
    $("#email_subscription span").animate({color: "#FF0000"}, 1000);

    return false;

}

}

function show_slaider(id, a_href) {
      var str = "#"+id;
      var obj = $(str);
      if (obj.is(":hidden")) {
	obj.slideDown(10);
      } else {
        obj.slideUp(10);
	}
}

function open_slaider(id, a_href) {
      var str = "#"+id;
      var obj = $(str);
      if (obj.is(":hidden")) {
	    obj.slideDown(0);
      } else {
	    obj.slideUp(0);
      }
}

function open_description(id, a_href) {
      var div = document.getElementById(id);

      var str = "#"+id;
      var obj = $(str);
      if (obj.is(":hidden")) {
	    div.style.display = "inline";
      } else {
	    div.style.display = "none";
      };
}

function locked(id) {

if($("#"+id).is(':checked')){
  $("."+id).fadeIn(100);
  $("ul."+id).animate({height: "70px"}, 300);  
}else{
  $("."+id).fadeOut(100);
  $("ul."+id).animate({height: "10px"}, 300);  
}
}

