
function getBytesLength(str) {
	
	return str.replace(/[^\x00-\xff]/g, 'xx').length;
}
 
  
function isOverlength(str,lenght ) {
	if(getBytesLength(str) > lenght ) {
		return true;
	} else {
		return false;
	}
	
	return true;
}

function reviewContentHeight(contentid1,contentid2,contentid3,contentid5) {

	var x1 = 0;
	var x2 = 0;
	var x3 = 0;
	var x5 = 0;
	if(document.getElementById(contentid1) != null) {
		x1 = document.getElementById(contentid1).clientHeight;
		
	}
	if(document.getElementById(contentid2) != null) {
		x2 = document.getElementById(contentid2).clientHeight;
		
	}
	if(document.getElementById(contentid3) != null) {
		x3 = document.getElementById(contentid3).clientHeight;
		
	}
	if(document.getElementById(contentid5) != null) {
		x5 = document.getElementById(contentid5).clientHeight;
		
	}
	//alert(x1+" "+x2+" "+x3+" "+x5);
	var hh = 293;
	if((x1 + x2 + x3 + x5) < hh)
		document.getElementById(contentid3).style.height= (hh-(x1+x2+x3+x5))+"px";
}


  
function pagego(nowpage,maxpage,actionstr) {
	if((document.all("pagego").value - 1) == nowpage) {
		return false;
	}
	
	if(document.all("pagego").value < 1) {
		return false;
	}
	
	if(document.all("pagego").value > maxpage) {
		return false;
	}
	
	document.location.href=actionstr+(document.all("pagego").value-1);
}


var http=new ActiveXObject("Microsoft.XMLHTTP");
function getHttpData(url) {
	http.open("POST",url,false);
	http.send();
	var str=http.responseText;
	return str;
}

function opennewwindow(owurl){
	window.open (owurl,'newwindow','') ;
}

function opennewwindowN(name,owurl){
	window.open (owurl,name,'') ;
}

function SetWinHeight(obj)
{
var win=obj;
if (document.getElementById)
{
if (win && !window.opera)
{
   if (win.contentDocument && win.contentDocument.body.offsetHeight) 
     win.height = win.contentDocument.body.offsetHeight; 
   else if(win.Document && win.Document.body.scrollHeight)
     win.height = win.Document.body.scrollHeight;
}
}
}




