function fixpng(element, method) {
 if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent)) {
  var src;  
  
  if (element.tagName == 'img' || element.tagName == 'IMG' || element.type == 'image' || element.type == 'IMAGE') {
   if (/\.png$/.test(element.src)) {
    src = element.src;
    element.src = http_path + "images/spacer.gif";
   } else {      
      src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);
      if (src) {
       src = src[1];
       element.runtimeStyle.backgroundImage="none";
      }     
     }
  } else {     
     src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i)     
     if (src) {
      src = src[1];
      element.runtimeStyle.width=element.offsetWidth;
      element.runtimeStyle.height=element.offsetHeight;
      element.runtimeStyle.backgroundImage="none";      
     }
    }   
    
   if (src) {    
    element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='" + method + "')";
   };
 }  
}

function redraw_buttons() {  
 $("#content img").each(function() {  
  if (($(this).attr("src").search("button") != "-1") && ($(this).css("display") != "none")) {
   $(this).parent().addClass("tn");
   $(this).parent().append("<em class=\"replaced_button\" title=\""+$(this).attr("title")+"\">"+$(this).attr("title")+"</em>");
   $(this).hide();
  }  
 });
 
 $(".inpopup img").each(function() {  
  if (($(this).attr("src").search("button") != "-1") && ($(this).css("display") != "none")) {
   $(this).parent().addClass("tn");
   $(this).parent().append("<em class=\"replaced_button\" title=\""+$(this).attr("title")+"\">"+$(this).attr("title")+"</em>");
   $(this).hide();
  }  
 });  
 
 $("#content form").each(function() {    
  content_form = $(this);  
  content_form.find("input[type=image]").each(function() {
   if (($(this).attr("src").search("button") != "-1") && ($(this).css("display") != "none")) {
//$(this).parent().append("<em class=\"replaced_button\" title=\""+$(this).attr("title")+"\" onclick=\"document."+content_form.attr("name")+".submit();\">"+$(this).attr("title")+"</em>");//onsubmit bug
    var attr = content_form.attr('onsubmit');
    form_method = (typeof attr !== 'undefined' && attr !== false && attr !== null)?'onsubmit': 'submit';
    $(this).parent().append("<em class=\"replaced_button\" title=\""+$(this).attr("title")+"\" onclick=\"document."+content_form.attr("name")+"."+form_method+"();\">"+$(this).attr("title")+"</em>");
    $(this).hide();
   }     
  });
 }); 
 
 $(".customization form").each(function() {    
  content_form_1 = $(this);  
  content_form_1.find("input[type=image]").each(function() {
   if (($(this).attr("src").search("button") != "-1") && ($(this).css("display") != "none")) {
    $(this).parent().append("<em class=\"replaced_button\" title=\""+$(this).attr("title")+"\" onclick=\"document."+content_form_1.attr("name")+".submit();\">"+$(this).attr("title")+"</em>");
    $(this).hide();
   }     
  });
 }); 
 
}
