/**
* @version        1.8.04.2
* @copyright        Copyright (C) 2008 PHPiRX. All rights reserved.
* @license        GNU/GPL
*/
jQuery(function(){
  jQuery('img.autorefresh').each(function(){
    if(!isNaN(this.alt)) {
      this.id = 'autorefresh-' + Math.round(Math.random()*100);
      rAutoRefresh(this.id, this.alt);
    }
  });
  iFrameHeight = function(){};
});
function rAutoRefreshInit(data){
    var data = data.split(',');
    for(i=0;i<data.length;i++) {
      var params = data[i].split('=');
      jQuery('iframe.wrapper'+params[0]).each(function(){
        var eid = 'autorefresh-' + Math.round(Math.random()*100);     
        var el = jQuery(this);
        el.attr('id', eid).load(rIFrameHeight);
        rAutoRefresh(eid, params[1]);
      });      
    }
};
function rAutoRefresh(i, t){
    jQuery('#'+i).attr('src', jQuery('#'+i).attr('src'));
    eval("setTimeout(\"rAutoRefresh('"+i+"', "+t+");\", "+(t*1000)+");");
}
function rIFrameHeight(e) {
  var h = 0;
  if ( !jQuery.browser.mise ) {  
    h = e.currentTarget.contentDocument.height;
    e.currentTarget.style.height = h + 60 + 'px';
  } else {
    h = document.frames(e.currentTarget.id).document.body.scrollHeight;
    document.all.blockrandom.style.height = h + 20 + 'px';
  }
}

