function getPageInfo()
{
	var pageNum=parseInt($("pageNum").value);		//获得分页总数
	var totalNum=parseInt($("totalNum").value);		//获得记录总条数
	var pageNo=parseInt($("pageNo").value);			//获得当前页数
	var domainstr="";
	if(pageNo==1)
	{
		domainstr="1-"+(pageNo)*10
	}
	else{
		domainstr=((pageNo-1)*10+1)+"-"+(pageNo)*10
	}
	
	var result='<table width="100%" border="0" cellpadding="0" cellspacing="0" valign="middle">';
	result +='<tr>';
	result +='<td width="70%" align="center"><table width="90%" border="0" cellspacing="0" cellpadding="0">';
	result +='<tr>';
	result +='<td width="60">'
	if(pageNo > 1){
		result +='<img src="/images/form2_22.gif" alt="上一页" width="55" height="20" border="0" onClick="preBack(0);" style="cursor:pointer">';
	}
	else{
		result +='<img src="/images/form2_22.gif" alt="上一页" width="55" height="20" border="0" style="cursor:pointer">';
	}
	result +='</td>';
	result +='<td align="center" class="num">';
	for(var i=1;i<=pageNum;i++)
	{
	    if(i==pageNo)
	    {
		result +='<font color="#FF6600" size="3">'+i+'</font> ';
		}
		else
		{
		  result +='<a class="STYLE18" href="javascript:switchPage('+i+')">'+i+'</a> ';
		}
	} 
	result +='</td>';
	result +='<td width="60">';
	if(pageNo!=pageNum && pageNum!=1 ){
		result +='<img src="/images/form2_24.gif" alt="下一页" width="55" height="20" border="0" onClick="preBack(1);" style="cursor:pointer">';
	}
	else{
		result +='<img src="/images/form2_24.gif" alt="下一页" width="55" height="20" border="0" style="cursor:pointer">';
	}
	result +='</td>';
	result +='</tr>';
	result +='</table></td>';
	result +='<td width="30%" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
	result +='<tr>';
	result +='<td> 到第 </td>';
	result +='<td><select name="pageNoSelect" id="pageNoSelect">';
	for(var i=1;i<=pageNum;i++)
	{
		if(i==pageNo)
		{
		result += "<option  value='"+i+"' selected>"+i+"</option>";
		}
		else{
			result += "<option  value='"+i+"'>"+i+"</option>";
		}
		
	}
	result+="</select></td>";
	result +='<td>页</td>';
	result +='<td><img src="/images/form2_26.gif" alt="查看" width="44" height="20" border="0" onClick="go2page(1);" style="cursor:pointer"></td>';
	result +='</tr>';
	result +='</table></td>';
	result +='</tr>';
	result +='</table>';
	if(pageNum>0)
	{
	  document.getElementById("pageInfo").innerHTML=result;
	}
	else{
		 document.getElementById("pageInfo").innerHTML="";
	}
}

//点击页码提交
function switchPage(page)
{
	document.getElementById("pageNo").value=parseInt(page);
	go2page(0);
}

//点击上下页提交
function preBack(pre)
{
	var pageNo=parseInt(document.getElementById("pageNo").value);
	var pageNum=parseInt(document.getElementById("pageNum").value);
	
	if(pre==1)
	{
		pageNo=pageNo+1;
		
		if(pageNo>pageNum)
		{
			pageNo=pageNum;
		}
		document.getElementById("pageNo").value=pageNo;
	}
	else{
		pageNo=pageNo-1;
		if(pageNo<1)
		{
			pageNo=1;
		}
		document.getElementById("pageNo").value=pageNo;
	}
	go2page(0);
}


function go2page(flag)
{
    if(flag==1)
	{
		if(document.getElementById("pageNoSelect")!=null)
		{
			document.getElementById("pageNo").value=document.getElementById("pageNoSelect").value;
		}
		
	}
	document.form1.submit();
}

function formsubmit()
{
    
	document.form1.submit();
}


function add_address()
	{
		var title_x=document.getElementsByTagName("TITLE")[0].innerHTML;
		var url_x=window.location.href;  //document.URL;
		//alert(url_x);
		addBookmark(title_x,""+url_x)
	}

function addBookmark(title,url) 
	{
		if (window.sidebar) 
			{ 
				window.sidebar.addPanel(title, url,""); 
			} 
		else if( document.all ) 
			{
				window.external.AddFavorite( url, title);
			} 
		else if( window.opera && window.print )
			{
				return true;
			}
	}
function deleteFriendLink(id){
	if(confirm("请确认是否要删除此友情链接"))
	{
		document.getElementById("linkId").value = id;
		document.deleteFriendLinkForm.submit();
	}
}

//回车提交表单
function check_key()
{
	var navigatorName = "Microsoft Internet Explorer";
	var isIE = false;
	   
	if( navigator.appName == navigatorName ){
		isIE = true;    
	}
	if(isIE){
		if (event.keyCode==13)
	 {
	  checkAll();
	 }
	}
}