document.write("<script type=\"text/javascript\" src=\"http://www.gztv.com/web/js/ajax.js\"></script>");


function G(id){
    return document.getElementById(id);
};
function GC(t){
   return document.createElement(t);
};
String.prototype.trim = function(){
          return this.replace(/(^\s*)|(\s*$)/g, '');
};
function isIE(){
      return (document.all && window.ActiveXObject && !window.opera) ? true : false;
} 
 
function cancelSign(){
    G("sign_div").style.display = 'none';
    G("cover_div").style.display = 'none';
   document.body.style.overflow = '';
};

function popCoverDiv(){
   if (G("cover_div")) {
    G("cover_div").style.display = '';
   } else {
    var coverDiv = GC('div');
    document.body.appendChild(coverDiv);
	//document.getElementById("de").appendChild(coverDiv);
    coverDiv.id = 'cover_div';
    with(coverDiv.style) {
     position = 'absolute';
     background = '#CCCCCC';
     left = '0px';
     top = '0px';
     var bodySize = getBodySize();
     width = bodySize[0] + 'px'
     height = bodySize[1] + 'px';
     zIndex = 98;
     if (isIE()) {
      filter = "Alpha(Opacity=60)";
     } else {
      opacity = 0.6;
     }
    }
   }
}
function getBodySize(){
   var bodySize = [];
   with(document.documentElement) {
    bodySize[0] = (scrollWidth>clientWidth)?scrollWidth:clientWidth;
    bodySize[1] = (scrollHeight>clientHeight)?scrollHeight:clientHeight;
   }
   return bodySize;
}
function popSign(az_id){
   var loginDivWidth = 350;
   var sign_in_flow = "<div ><img src='http://www.gztv.com/web/images/loading.gif' align='absmiddle' /> 正在加载数据，请稍候...</div>";
   if (G("sign_div")) {
    G("sign_div").style.display = '';
   } else {
    var signDiv = GC('div');
    document.body.appendChild(signDiv);
    signDiv.id = 'sign_div';
    signDiv.align = "center";
  
    with (signDiv.style) {
     position = 'absolute';
     left = (document.documentElement.clientWidth - loginDivWidth)/2 + 'px';
     top = (document.documentElement.clientHeight + 200)/2 + 'px';
     width = loginDivWidth + 'px';
     zIndex = 99;
     background = '#efefef';
     border = '#999999 solid 1px';
     filter='alpha(opacity=80)'; 
    }
   }
    G("sign_div").innerHTML = sign_in_flow;
 
  
}
function popSignFlow(az_id) {
   popCoverDiv();  
   popSign(az_id);  
   document.body.style.overflow = "hidden";
     
      
}

function selectpage(tag,divid)
{
var page=document.getElementById("page_num").value;
if(page==null||page=="")
{
alert("������ҳ��");
return false;
}
getPage(tag,page,divid);
}

function getPage(tag,page,divid)
{
popSignFlow(6);
var post="";
 post="tag="+encodeURIComponent(tag)
     +"&page="+page;
 send_request(post,"http://news.gztv.com/web/templete.do?act=getListHtmlByPage",saveProcess);
 function saveProcess() 
  {
  var responseText = requestProcess();
       if (responseText != null) 
        {
        	responseText = unescape(responseText);
        	document.getElementById(divid).outerHTML = responseText;
        	cancelSign();
        }
        
  }
  
}