function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function printPopup(mainPath,id) {
	MM_openBrWindow(mainPath + 'newsprint.php?page=newsprint&id=' + id,'Cikk nyomtatása','scrollbars=yes,width=620,height=400');
}
function sendPopup(mainPath,id) {
	MM_openBrWindow(mainPath + 'newssend.php?page=newsprint&id=' + id,'Cikk küldése','scrollbars=yes,width=420,height=400');
}

function regPopup(mainPath) {
	MM_openBrWindow(mainPath + 'registration.php','Regisztráció','scrollbars=yes,width=380,height=400');
}
function newPwPopup(mainPath) {
	MM_openBrWindow(mainPath + 'newpassword.php','Elfelejtett jelszó','scrollbars=yes,width=380,height=400');
}

function CreatePopup(URL, xsize, ysize) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + xsize + ',height=' + ysize + '');");
}

function toggleLayer(whichLayer) {
  if (document.getElementById) {
    var style2 = document.getElementById(whichLayer).style;
    style2.display = style2.display? "":"block";
  }
  else if (document.all) {
    var style2 = document.all[whichLayer].style;
    style2.display = style2.display? "":"block";
  }
  else if (document.layers) {
    var style2 = document.layers[whichLayer].style;
    style2.display = style2.display? "":"block";
  }
}

function CreateBookmarkLink() {

	title = "[origó] Női Lapozó";
	url   = "http://www.noilapozo.hu/";

	if ( window.sidebar ) { // Mozilla Firefox Bookmark

		window.sidebar.addPanel( title, url,"" );

	} else if( window.external ) { // IE Favorite

		window.external.AddFavorite( url, title );

	} else if(window.opera && window.print) { // Opera Hotlist

		return true;

	}

}


    var mult  = 0;
	var jelen = 0;
	var jovo  = 0;

	function valaszt () {
	    if (jelen == 0) {
		    jelen = Math.floor (Math.random()*21);
			if (jelen == 0){ jelen++; }
			    document.getElementById('jelenkep').innerHTML='<img src="templates/imgs/applications/tarot/lap'+jelen+'.jpg" width="72" height="115" border="0" hspace="8">'
			}

		else if ( mult == 0 ) {
    	    mult = Math.floor (Math.random()*21);
	    	mult++;

			while (mult == jelen) {
                mult = Math.floor (Math.random()*21);
				mult++;
			}
			document.getElementById('multkep').innerHTML='<img src="templates/imgs/applications/tarot/lap'+mult+'.jpg" width="72" height="115" border="0" hspace="8">'
		}
		else if ( jovo == 0 ) {
			jovo = Math.floor (Math.random()*21);
			jovo++;

			while (jovo == jelen || jovo==mult) {
			    jovo = Math.floor (Math.random()*21);
				jovo++;
			}

            document.getElementById('jovokep').innerHTML='<img src="templates/imgs/applications/tarot/lap'+jovo+'.jpg" width="72" height="115" border="0" hspace="8">'
			document.getElementById('tovabb').innerHTML='<p><a href="tarot?jelen='+jelen+'&mult='+mult+'&jovo='+jovo+'">A magyarázathoz kattints ide!</a></p>'
		}
		else {
			alert("Már választottál!")
		}


    }  // valaszt end
    
  

