﻿function submitselectblog()
{
   var wd=document.getElementById('ThjKeyword').value.trim();
   if(wd!="")
   {
      window.location='index.aspx?wd='+wd;
   }
   return false;
}
String.prototype.trim = function()
{
   return this.replace(/(^\s+)|\s+$/g,"");
}
window.onload = function() { 
  
    for (var index = 0; index < document.images.length; index++) { 
  
        var widthRestriction = 650; //定义缩放的宽
        var heightRestriction = 1000; 
        var rate = document.images[index].width / document.images[index].height; 
  
        if (document.images[index].width > widthRestriction) { 
            document.images[index].width = widthRestriction; 
            document.images[index].height = widthRestriction / rate; 
              document.images[index].onclick = function() {window.open(this.src)}; 
              document.images[index].title = document.images[index].title + ' 点击在新窗口中查看原图'; 
        } else if (document.images[index].height > heightRestriction) { 
            document.images[index].height = heightRestriction; 
            document.images[index].width = heightRestriction * rate; 
              document.images[index].onclick = function() {window.open(this.src)}; 
        document.images[index].title = document.images[index].title + ' 点击在新窗口中查看原图'; 
        } 
  
      
    } 
}
