var orig_img_dimensions = new Array();
  theObjects = document.getElementsByTagName("object");
  for (var i = 0; i < theObjects.length; i++) {
    theObjects[i].outerHTML = theObjects[i].outerHTML;
  }
function init_js() {
  init_images();
}
function show_text_only() {
  var noflash = document.getElementById("noflash");
  noflash.className = "active";  
}	
function hide_text_only() {
  var noflash = document.getElementById("noflash");
  noflash.className = "non_active";  
}
function init_images() {
  var text_div = document.getElementById("content");
  var text_images = text_div.getElementsByTagName("img");
  for(i=0; i<text_images.length; i++) {
	 var text_image = text_images[i];
    if(text_image.className=="layout_image") {
		 continue;
	 }
	 var img_holder = document.createElement("div");
	 img_holder.className = "image_holder";
	 var img_big_link = document.createElement("a");
	 img_big_link.href = text_image.src;
	 img_big_link.onclick = function() { var piclink=this; var picwin = window.open(piclink.href,'img_win','scrollbars=no,status=no'); picwin.resizeTo((orig_img_dimensions[piclink.href].width+50),(orig_img_dimensions[piclink.href].height+50)); picwin.focus(); picwin.onblur=function(){window.close();}; return false;}
	 var img_newimage = document.createElement("img");
	 var img_ratio = text_image.height / text_image.width;
	 orig_img_dimensions[text_image.src] = {width:text_image.width,height:text_image.height};
	 img_newimage.src = text_image.src;
    if(text_image.width>240) {
	   img_newimage.width = 230;
	   img_newimage.height = 230 * img_ratio;
	 }
	 img_newimage.alt = text_image.alt;
	 img_big_link.appendChild(img_newimage);
	 img_holder.appendChild(img_big_link);
	 text_image.parentNode.replaceChild(img_holder,text_image);
  }
}
window.onload = function() {
	init_js();
}
