 function goaction(id){
       if (confirm("确定此操作吗??")) 
       window.location.href=id  
}  
function imgzoom(img,maxsize){
	var a=new Image();
	a.src=img.src
	if(a.width > maxsize * 4)
	{
		img.style.width=maxsize;
	}
	else if(a.width >= maxsize)
	{
		img.style.width=Math.round(a.width * Math.floor(4 * maxsize / a.width) / 4);
	}
	return false;
}


function imgzoomb(img,maxsize){
	var a=new Image();
	a.src=img.src
	if(a.width > maxsize )
	{
		img.style.width=maxsize;
		img.style.height=a.height/a.width*maxsize;
	}
	return true;
}


function trim(strValue)
{
if (strValue == null || strValue.length == 0)
{
  return ("");
}

var i = 0;

while (i < strValue.length)
{
  if ((strValue.charCodeAt(i) == 32) || (strValue.charCodeAt(i) == 12288))
  {
   i++;
  }
  else
  {
   break;
  }
}

var strLTrim = strValue.substring(i);
if (strValue.length > i)
{

  var j = strValue.length - 1;
  var k = 0;
  while(k < strLTrim.length)
  {
   if((strValue.charCodeAt(j) == 32) || (strValue.charCodeAt(j) == 12288))
   {
    j--;
    k++;
   }
   else
   {
    break;
   }
  
  }
  return (strValue.substring(i, j+1));
}
return(strValue.substring(i));
}

function msg1(str)
{
alert(str);
history.go(-1)
}			
function msg2(str)
{
alert(str);
window.close();
}
function msg3(str,strb)
{
alert(str);
location.href(strb);
}	
 //全选或全不选
function checkAll(e, itemName)
{
      var aa = document.getElementsByName(itemName);
      for (var i=0; i<aa.length; i++)
       aa[i].checked = e.checked;
}


