﻿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";
};
/* ads code*/
function loadAds(c, s, w, h)
{
	try{
		$(c).innerHTML = $(s).innerHTML;
		$(s).innerHTML = "";
		document.write('<style>');
		document.write('#'+c+'{position:static!important; display:block!important;');
		if (w)document.write('width:'+w+'px!important;');
		if (h)document.write('height:'+h+'px!important;');
		document.write('}</style>');
	}catch (e){/*do not*/}
} 

function setAdsSize(s, w, h)
{
	try
	{
		document.getElementById(s).style.width = w;
		document.getElementById(s).style.height = h;
	}
	catch (e)
	{/*do not*/}
}
