/* news */
function showTab(tabid) {
	var button=document.getElementById('btn'+tabid);
	var tab=document.getElementById(tabid)
	if(button.className!='sel') var opentab=true;
	for(var i=0;button.parentNode.parentNode.childNodes[i];i++) {
		var btnode=button.parentNode.parentNode.childNodes[i];
		if(btnode.nodeType!=3) btnode.childNodes[0].className='';
		}
	for(var i=0;tab.parentNode.childNodes[i];i++) {
		var tabnode=tab.parentNode.childNodes[i];
		if(tabnode.nodeType!=3) tabnode.style.display='none';
		}
	if(opentab) {
		button.className='sel';
		tab.style.display='block';
		document.getElementById('tabsbrowser').style.display='block';
		}
	else {
		document.getElementById('tabsbrowser').style.display='none';
		}
	}

function removePlaceholder(inp) {
	if(!inp.getAttribute("placeholder")) inp.setAttribute("placeholder",inp.value);
	if(inp.value==inp.getAttribute("placeholder")) {
		inp.value="";
		inp.style.color="#000";
		}
	}
function setPlaceholder(inp) {
	if(inp.value=="") {
		inp.value=inp.getAttribute("placeholder");
		inp.style.color="#aaa";
		}
	}

function sendComment() {
	var ajax=new kAjax;
	ajax.onSuccess(function(html) { document.getElementById('commentWait').style.display='none'; document.getElementById('commentSuccess').style.display='block'; return true; });
	ajax.onFail(function(html) { document.getElementById('commentWait').style.display='none'; document.getElementById('commentFail').style.display='block'; return false; });
	ajax.send("post",window.location.href,'&commentSubmit=true&commentName='+escape(document.getElementById('commentName').value)+'&commentEmail='+escape(document.getElementById('commentEmail').value)+'&commentText='+escape(document.getElementById('commentText').value));
	document.getElementById('commentForm').style.display='none';
	document.getElementById('commentWait').style.display='block';
	return true;
	}

