
function tabit(btn){
	var idname = new String(btn.id);
	var s = idname.indexOf("_");
	var e = idname.lastIndexOf("_")+1;
	var tabName = idname.substr(0, s);
	var id = parseInt(idname.substr(e, 1));
	var tabNumber = btn.parentNode.childNodes.length;
	
	for(i=0;i<tabNumber;i++){
			document.getElementById(tabName+"_div_"+i).style.display = "none";
			document.getElementById(tabName+"_btn_"+i).className = "";
		};
		document.getElementById(tabName+"_div_"+id).style.display = "block";
		btn.className = "curr";		
	

};

function ChangeBg(btn){
	var idname = new String(btn.id);
	var s = idname.indexOf("_");
	var e = idname.lastIndexOf("_")+1;
	var tabName = idname.substr(0, s);
	var id = parseInt(idname.substr(e, 1));
	var tabNumber = btn.parentNode.childNodes.length;
	
	for(i=0;i<tabNumber;i++){
			//document.getElementById(tabName+"_div_"+i).style.display = "none";
			document.getElementById(tabName+"_btn_"+i).className = "";
		};
		//document.getElementById(tabName+"_div_"+id).style.display = "block";
		btn.className = "curr";
	
};
function ChangeBg1(btn){
		btn.className = "curr1";
};



function website(abc)
{
     if(abc == "blank")
	{
	 document.inputGoogle.site.value=" ";
	 
	}

	else if (abc == "www.hctvnews.net")
	{
	 document.inputGoogle.site.value="www.hctvnews.net";
	}

}

function link()
{
link = "http://www.google.com/search?ie=gb2312&oe=gb2312&btnG=Google+%CB%D1%CB%F7&domains=www.hctvnews.net&sitesearch=" + document.inputGoogle.site.value + "&q=" + document.inputGoogle.q.value

window.open(link)

}



function button_over(eButton)
{
eButton.style.backgroundColor = "#ffe5b9";
eButton.style.borderColor = "#ff9600";
eButton.style.borderWidth = '1px';
eButton.style.borderStyle = 'solid'; 
}

function button_out(eButton)
{
eButton.style.backgroundColor = "#effaff";
eButton.style.borderColor = "#effaff";
}

function button_down(eButton)
{
eButton.style.backgroundColor = "#d2b9ff";
eButton.style.borderColor = "#5a00ff";
}

function button_up(eButton)
{
eButton.style.backgroundColor = "#d2b9ff";
eButton.style.borderColor = "#5a00ff";
eButton = null; 
}



