var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function button3_DoFSCommand(command, args) {
	var button3Obj = isInternetExplorer ? document.all.button3 : document.button3;
	if(command=="click"){
		PopUpTabs();
	}
}

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub button3_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call button3_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

var uri = new Object();
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList; 

var href=document.location.href;

function _ref(id){
	document.frmForum.ref.value=id;
	if (navigator.userAgent.indexOf("Opera")==-1) document.location.replace(href+'#top');
	document.frmForum.message.focus();
}

function _del(thread, id, pg){
	var msg = confirm("Biztosan törölni szeretné ezt a hozzászólást?");
	if(msg){
		document.location = "index.php?do=forum&threadid="+thread+"&delete="+id+"&p="+pg;
	}
}

function _del2(cat, id, pg){
	var msg = confirm("Biztosan törölni szeretné ezt a hirdetést?");
	if(msg){
		document.location = "index.php?do=ads&cat="+cat+"&delete="+id+"&page="+pg;
	}
}

function _showmti(){
	var _w = 180;
	var _h = 200; 
	_PopMti = window.open("mti.html",'popup','width='+_w+',height='+_h+',left=20,top=20,toolbar=no,location=no,status=no,scrollbars=no,resizable=no,menubar=no,dependent=yes');
	_PopMti.focus()
}

function textCounter(field,cntfield,maxlimit) {
	var x = document.getElementById(cntfield);
	if (field.value.length > maxlimit)
		field.value = field.value.substring(0, maxlimit);
	else
		x.innerHTML = maxlimit - field.value.length;
}
