
function on_imgload(thiss,width,height){

	var img=  new Image();

	img.src=thiss.src; 
    var MaxWidth=width;
	var MaxHeight=height;
	
    var bl =MaxWidth/MaxHeight;
	if(img.width<width && img.height<height){
	   thiss.height=thiss.height;
	   thiss.width=thiss.width;
	   return true;
	
	}
	
	if((img.width/img.height)<bl){
	  thiss.height=height;
	}else{
	  thiss.width   =width;
	}

   
}

function topload(str){

 top.window.mainFrame.location.href=str;

}
function exit_sys(str){
  top.window.self.location.href=str;
}


function YesNo(str,nntext){
if (nntext==null){
  nntext="是否要删除这条信息?";
}
//texts="是否要"+ nntext +"这条信息?";
var truthBeTold = window.confirm(nntext);
if (truthBeTold) {
 window.location.href=str;
}  else ;
}



function winload(url){
window.location.href=url;

}
function status(str,url){
	if(url==''){
	 url='';
	}
title=window.document.title;
document.write(" <a onclick=winload('"+url+"') OnmouseOver=\"window.status='"+str+"'\" OnMouseOut=\"window.status='"+title+"'\" >");

}

function textRun(text,length,oper){
   var length_c=length-text.length;  /*取得目前的位置与实际字符数之差*/
   if(text.length>length){
     var result=text.substr(0,length);
    
   }else if(oper==1 && length_c>=5){
     var result=text+"&nbsp;&nbsp;详细内容";
   }else if(oper==1 && length_c>=3){
     var result=text+"&nbsp;&nbsp;详细";
   }else{
     var result=text;
   }
   return result;
}
