
function resize(){
  var htmlheight = (document.body.scrollHeight - 15);
  var windowheight = window.innerHeight;
  if ( navigator.userAgent.indexOf("AppleWebKit") == -1 )
    htmlheight = (document.body.parentNode.scrollHeight - 15);
  if ( htmlheight < windowheight ) {
    document.body.style.height = (windowheight-15) + "px";
  } else {
    document.body.style.height = htmlheight + "px";
  }
}

/**
* Returns the value of the selected radio button in the radio group, null if
* none are selected, and false if the button group doesn't exist
*
* @param {radio Object} or {radio id} el
* OR
* @param {form Object} or {form id} el
* @param {radio group name} radioGroup
*/
function $RF(el, radioGroup) {
    if($(el).type && $(el).type.toLowerCase() == 'radio') {
        var radioGroup = $(el).name;
        var el = $(el).form;
    } else if ($(el).tagName.toLowerCase() != 'form') {
        return false;
    }

    var checked = $(el).getInputs('radio', radioGroup).find(
        function(re) {return re.checked;}
    );
    return (checked) ? $F(checked) : null;
}

function set_cookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure )
{
  var cookie_string = name + "=" + escape ( value );

  if ( exp_y )
  {
    var expires = new Date ( exp_y, exp_m, exp_d );
    cookie_string += "; expires=" + expires.toGMTString();
  }

  if ( path )
        cookie_string += "; path=" + escape ( path );

  if ( domain )
        cookie_string += "; domain=" + escape ( domain );

  if ( secure )
        cookie_string += "; secure";

  document.cookie = cookie_string;
}

function showImageSmall() {
	 $('image_small').style.display='block';
	 $('image_big').style.display='none';
	 $('btmcontent').style.display = "block";
}
function showImageBig() {
	 $('image_small').style.display='none';
	 $('image_big').style.display='block';
	 $('btmcontent').style.display = "none";
}
function showImage(idACacher, idAMontrer) {
	 $(idACacher).style.display='none';
	 $(idAMontrer).style.display='block';
	 if ( $('btmcontent').style.display == 'none' )
	 	$('btmcontent').style.display = "block";
	 else
	  $('btmcontent').style.display = "none";
}