function Hide(id) {
	document.getElementById(id).style.display = 'none';
}
function Show(id) {
	document.getElementById(id).style.display = 'block';
}
function HideShow(id) {
	if(document.getElementById(id).style.display == 'block') {
		Hide(id);
	} else {
		Show(id);
	}
}
   
function Shout() {
		
	xmlHttp=GetXmlHttpObject();
		
		var nick;
		nick = document.getElementById("shoutbox_nick").value;
		
		var text;
		text = document.getElementById("shoutbox_text").value;
		
		if(text == '' || nick == '') {
			return 0;
		}
		
		document.getElementById("shoutbox_nick").value = '';
		document.getElementById("shoutbox_text").value = '';
		
	var url="js/shoutbox.php";
		url=url+"?text="+text+"&nick="+nick;
		xmlHttp.onreadystatechange=function tmp(){
			if (xmlHttp.readyState==4){ 
			document.getElementById("shoutbox").innerHTML=xmlHttp.responseText;
 		}
	};
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function Remove(id) {
		
	xmlHttp=GetXmlHttpObject();
		
	var url="js/shoutbox.php";
		url=url+"?id="+id;
		xmlHttp.onreadystatechange=function tmp(){
			if (xmlHttp.readyState==4){ 
			document.getElementById("shoutbox").innerHTML=xmlHttp.responseText;
 		}
	};
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

var popupWindow=null;
function popup(mypage,myname,w,h,pos,infocus) {
	if(pos=='random'){
	LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
	TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=='center'){
	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!='center' && pos!='random') || pos==null){LeftPosition=0;TopPosition=0;}settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
	popupWindow=window.open('',myname,settings);
	if(infocus=='front'){popupWindow.focus();popupWindow.location='nutki_od_was.html';}
}