﻿//读取html页面方式传入的参数
var isNull = function(v){if(v == null) return true;};
function getParameter(parameter)
{
    return isNull(window.location.href.match(new RegExp("[?#&]"+parameter+"=(.*?)(?:[#&]|$)", "i"))) ? "" : RegExp.$1;
}


//sichina 首页焦点新闻
var   isOK=true;   
var t;
function Change15s(no,zidong)
{

//isOK=zidong
//if (!zidong)
//{ 
//if(!no) no=18; 
//for(var i=18;i<=20;i++)
//{ 
//document.getElementById("si"+i).style.display=(i==no?"block":"none"); 
//document.getElementById(i+"_top").style.background =(i==no?"url(/images/titleBar_bg_2_138.jpg)":"url(/images/titleBar_bg_1_138.jpg)"); 
//}
//no++;
// t=setTimeout("Change15s("+(no==21?18:no)+",false);",6000); 
//}
//else
//{
////window.clearInterval(t);    
// clearTimeout(t);   

document.getElementById("si18").style.display="none";
document.getElementById("si19").style.display="none";
document.getElementById("si20").style.display="none";
document.getElementById("si"+no).style.display="block";

document.getElementById("18_top").style.background="url(/images/titleBar_bg_1_138.jpg)";
document.getElementById("19_top").style.background="url(/images/titleBar_bg_1_138.jpg)";
document.getElementById("20_top").style.background="url(/images/titleBar_bg_1_138.jpg)";
document.getElementById(no+"_top").style.background ="url(/images/titleBar_bg_2_138.jpg)";



//}

} 


	function tabit(tabName)
	{
	    
		document.getElementById("si06").style.display = "none";
		document.getElementById("06"+"_btn").className = "topnews_taboff";
		document.getElementById("si07").style.display = "none";
		document.getElementById("07"+"_btn").className = "topnews_taboff";
		document.getElementById("si08").style.display = "none";
		document.getElementById("08"+"_btn").className = "topnews_taboff";
		
		document.getElementById("si"+tabName).style.display = "block";
		document.getElementById(tabName+"_btn").className = "topnews_tabon";
	}


function gethtml(divid,filenamestr)
{
    $.ajax({        url:filenamestr,        data:'',        type:'get',        dataType:'html',        beforeSend:function()        {            $("#"+divid).empty().append("<img id='loading' src='/images/ajax-loader.gif' />正在加载,请稍等......");        },        error:function()        {            $("#"+divid).empty().append("read error!");        },        success: function(msg)        {            $("#"+divid).empty().append(msg);        }    });}

function gethtml2(divid,filenamestr,canshu)
{
    $.ajax({        url:filenamestr,        data:canshu,        type:'get',        dataType:'html',        beforeSend:function()        {            $("#"+divid).empty().append("<img id='loading' src='/images/ajax-loader.gif' />正在加载,请稍等......");        },        error:function()        {            $("#"+divid).empty().append("read error!");        },        success: function(msg)        {            $("#"+divid).empty().append(msg);        }    });}
