
//Aggreg Hist
// 
var xmlhttp0=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp0 = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp0 = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp0 = false;
  }
 }
@end @*/
if (!xmlhttp0 && typeof XMLHttpRequest!='undefined') {
    try {
        xmlhttp0 = new XMLHttpRequest();
    } catch (e) {
        xmlhttp0=false;
    }
}
if (!xmlhttp0 && window.createRequest) {
    try {
        xmlhttp0 = window.createRequest();
    } catch (e) {
        xmlhttp0=false;
    }
}

if (xmlhttp0) {
    var url;
    var x0=1;
        if (x0==1) { url0="/dyn/aggreg_hist.php";}
        xmlhttp0.open("GET",url0,true);
        xmlhttp0.onreadystatechange=function() {
            if (xmlhttp0.readyState==4) {
            var eltid0="rss_hist"+x0
              var mondoc0=document.getElementById(eltid0)
              mondoc0.innerHTML=xmlhttp0.responseText
            }
        }
        xmlhttp0.send(null)
}
//Aggreg Hist 

// Aggreg Blog 
//
var xmlhttp2=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp2 = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp2 = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp2 = false;
  }
 }
@end @*/
if (!xmlhttp2 && typeof XMLHttpRequest!='undefined') {
    try {
        xmlhttp2 = new XMLHttpRequest();
    } catch (e) {
        xmlhttp2=false;
    }
}
if (!xmlhttp2 && window.createRequest) {
    try {
        xmlhttp2 = window.createRequest();
    } catch (e) {
        xmlhttp2=false;
    }
}

if (xmlhttp2) {
    var url;
    var x2=2;
    if (x2==2) { url2="/dyn/aggreg_blog.php";}
        xmlhttp2.open("GET",url2,true);
        xmlhttp2.onreadystatechange=function() {
            if (xmlhttp2.readyState==4) {
              var eltid2="rss_hist"+x2
              var mondoc2=document.getElementById(eltid2)
              mondoc2.innerHTML=xmlhttp2.responseText
            }
        }
        xmlhttp2.send(null)
}
//Aggreg Blog 

// book_dyn
//
var xmlhttp_book=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp_book = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp_book = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp_book = false;
  }
 }
@end @*/
if (!xmlhttp_book && typeof XMLHttpRequest!='undefined') {
    try {
        xmlhttp_book = new XMLHttpRequest();
    } catch (e) {
        xmlhttp_book=false;
    }
}
if (!xmlhttp_book && window.createRequest) {
    try {
        xmlhttp_book = window.createRequest();
    } catch (e) {
        xmlhttp_book=false;
    }
}

if (xmlhttp_book) {
    var url_book="/dyn/adsnews2u.php?idx=2";
        xmlhttp_book.open("GET",url_book,true);
        xmlhttp_book.onreadystatechange=function() {
            if (xmlhttp_book.readyState==4) {
              var eltid_book="book_dyn"
              var mondoc_book=document.getElementById(eltid_book)
              mondoc_book.innerHTML=xmlhttp_book.responseText
            }
        }
        xmlhttp_book.send(null)
}

//book_dyn 

//JS photo resize
//
function thumb_resize(which, max) {
var elem = document.getElementById(which);

if (elem == undefined || elem == null) return false;
var orig_width = elem.width;
var orig_height = elem.height;

if (max == undefined) max = getWindowWidth()-270;
if (elem.width > elem.height) {
if (elem.width > max) { elem.width = max; elem.height = orig_height*(max/orig_width);}
} else {
if (elem.height > max) { elem.height = max; elem.width = orig_width*(max/orig_height);};
}
}

function getWindowWidth(){
  var ww = 0;
  d = document;
   if ( typeof window.innerWidth != 'undefined' )
     ww = window.innerWidth;  // NN and Opera version
   else
   {
     if ( d.documentElement
       && typeof d.documentElement.clientWidth!='undefined'
       && d.documentElement.clientWidth != 0 )
       ww = d.documentElement.clientWidth;
     else
       if ( d.body
         && typeof d.body.clientWidth != 'undefined' )
         ww = d.body.clientWidth;
     else alert ("Can't identify window width - please tell me which browser you are using.")
   }
   return ww;
   }

