function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}


self.status="WORLD 3D";

var submitcount=0;
function dupl() {
	if (submitcount == 0) { submitcount++; return true; }
		else { alert("Ezt a hozzszlst mr elkldted!"); return false; }
}


function rere($id) {
	document.adatlap.form_valasztext.value = $id;
}

function askData() {
	if (confirm("Biztosan elkldd a hozzszlst ellenrzsre a Modertornak? Figyelem: az szndkosan rtelmetlenl megjellt hozzszlsokrt bntets jr! Csak olyan hozzszlst jellj meg, mely srti a Szablyzatot!")) 
	{ return true; }
	else { return false; }   
}

function chatablak() {
	window.open("chat7/index.php?ref=main","WORLD3D","width=640,height=610,directories=no,location=no,resizable=no,menubar=no,scrollbars=no,status=no,toolbar=no");
}

function lenyit(cim,cimsor) {
	tartalom = cim.nextSibling;
	while (tartalom != null) {
		if (tartalom.className == "lenyithato") {
			if (tartalom.style.display == "block") {
				tartalom.style.display = "none";
				cim.innerHTML = "<img src='images/lenyit.gif' border=0><span class='lenyithato_cim'> "+cimsor;
				}
			else {
				tartalom.style.display = "block";
				cim.innerHTML = "<img src='images/lenyit-zar.gif' border=0><span class='lenyithato_cim'> "+cimsor;
			}
		return;
		}
		else tartalom = tartalom.nextSibling;
		}
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}


function showDiv(divID_as_a_string) {
	MM_showHideLayers('cursorinfo','','show');
}


function hideDiv(divID_as_a_string) {
	pop('','');
	MM_showHideLayers('cursorinfo','','hide');
}


function pop(title,msg,width,height)
{
	if (msg) {
	if (width==0) width=250;
	var content ="<TABLE WIDTH="+width+" BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=151515><TR width="+width+"><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR bgcolor=333333><TD><CENTER><FONT COLOR=#cccccc SIZE=2 face=verdana><B>"+title+"</B></FONT></CENTER></TD></TR></TABLE><TABLE WIDTH="+width+" BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=000000><TR height="+height+" valign=top><TD><font face=verdana size=1 color=cccccc>"+msg+"</TD></TR></TABLE></TD></TR></TABLE>";
	}
	else { var content=""; }

	if(ns4){myReference.document.write(content); }
	if(ns6){document.getElementById("cursorinfo").innerHTML=content; }
	if(ie4){document.getElementById("cursorinfo").innerHTML=content; }
	MM_showHideLayers('cursorinfo','','show');

}




function MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
	obj.visibility=v; }
}


var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all

document.onmousemove = alertCoord;

function alertCoord(e) {
	if( !e ) { e = window.event; } if( !e || ( typeof( e.pageX ) != 'number' && typeof( e.clientX ) != 'number' ) ) { return window.alert('Your browser did not pass the required information about the event'); }
	if( typeof( e.pageX ) == 'number' ) { var xcoord = e.pageX; var ycoord = e.pageY; } else {
		var xcoord = e.clientX; var ycoord = e.clientY;
		if( !( ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) || ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 && !document.createElement ) || window.navigator.vendor == 'KDE' ) ) {
			if( document.documentElement && ( document.documentElement.scrollTop || document.documentElement.scrollLeft ) ) {
				xcoord += document.documentElement.scrollLeft; ycoord += document.documentElement.scrollTop;
			} else if( document.body && ( document.body.scrollTop || document.body.scrollLeft ) ) {
				xcoord += document.body.scrollLeft; ycoord += document.body.scrollTop;
			}
		}
	}
	if(ns4){myReference.document.style.left=xcoord-10; myReference.document.style.top=ycoord+10;}
	if(ns6){document.getElementById("cursorinfo").style.left=xcoord-10; document.getElementById("cursorinfo").style.top=ycoord+10;}
	if(ie4){document.getElementById("cursorinfo").style.left=xcoord-10; document.getElementById("cursorinfo").style.top=ycoord+10;}
}

function showPreview(imagePath,imageIndex,x,y){
	var subImages = document.getElementById('previewPane').getElementsByTagName('IMG');
	if(subImages.length==0){
		var img = document.createElement('IMG');
		document.getElementById('previewPane').appendChild(img);
	}else img = subImages[0];

	document.getElementById('largeImageCaption').style.display='none';
	img.onload = function() { hideWaitMessageAndShowCaption(imageIndex-1); };
	img.src = imagePath;
	
}


function hideWaitMessageAndShowCaption(imageIndex)
{
	document.getElementById('waitMessage').style.display='none';	
	document.getElementById('largeImageCaption').innerHTML = imageGalleryCaptions[imageIndex];
	document.getElementById('largeImageCaption').style.display='block';
	
}



function letolt3(url) {
	var popwin=window.open(url,"WORLD3D","width=460,height=320,directories=no,location=no,resizable=no,menubar=no,scrollbars=no,status=no,toolbar=no");
}

function ablak(url) {
	var popwin=window.open(url,"WORLD3D","width=620,height=490,directories=no,location=no,resizable=no,menubar=no,scrollbars=no,status=no,toolbar=no");
}


function pop2(title,msg,width,height)
{
 var content ="<TABLE WIDTH="+width+" BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=151515><TR width="+width+"><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR bgcolor=333333><TD><CENTER><FONT COLOR=#FF8A00 SIZE=1 face=verdana><B>"+title+"</B></FONT></CENTER></TD></TR></TABLE><TABLE WIDTH="+width+" BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=151515><TR height="+height+" valign=top><TD><font face=verdana size=1 color=cccccc>"+msg+"</TD></TR></TABLE></TD></TR></TABLE>";
 if(ns4){myReference.document.write(content); }
 if(ns6){document.getElementById("myDiv2").innerHTML=content; }
 if(ie4){document.getElementById("myDiv2").innerHTML=content; }
 showDiv('myDiv2');

 if(ns4){myDiv2.document.style.left=100; myDiv2.document.style.top=100;}
 if(ns6){document.getElementById("myDiv2").style.left=50; document.getElementById("myDiv2").style.top=searchy;}
 if(ie4){document.getElementById("myDiv2").style.left=50; document.getElementById("myDiv2").style.top=searchy;}
}




function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
