function sendnewpwd() {	var email = $("#forgotEmail").val();	$.post("/admin/php/iesz/php/forgotpwd.php", { 			email: email 		}, function(xml) {						document.getElementById("forgot_ajax").innerHTML = xml;						var Timeout = setTimeout(function() {									if (!document.getElementById("forgotDialog")) {					$("#forgotDialog").dialog("destroy").remove();				}			}, 3000);					});		}function forgotpwd() {		if (!document.getElementById("forgotDialog")) {		$("body").append("<div id=\"forgotDialog\"></div>");	}		$("#forgotDialog").html("<h2 class=\"red\">Elfelejtett jelszó...</h2> <br />Amennyiben elfelejtette jelszavát, kérjük, hogy írja be <u>E-mail címét</u> a mezőbe, és küldünk egy új jelszót, melyet belépés után bármikor módosíthat a Nevére kattintva a jobb-felső menüsávon!<div id=\"forgot_ajax\"></div><br /><input type=\"text\" class=\"forgotinput ui-state-deafult ui-corner-all ui-helper-clearfix green\" value=\"E-mail cím\"  name=\"email\" onclick=\"if (this.value=='E-mail cím') { this.value=''; } \" onblur=\"if (this.value=='') { this.value='E-mail cím'; }\" id=\"forgotEmail\">");		$("#forgotDialog").dialog({		bgiframe: true,		modal: true,		width: 350,		title: "Új jelszó igénylése",		buttons: {			"Küldés": function() {				sendnewpwd();			},			"Mégse": function() {				$(this).dialog("destroy");			}		}	});}function userInfo(userid) {					  //$("#mainPageNews:first").fadeOut(1000);		  if (!document.getElementById("editProfileFrame")) { $("body").append("<iframe id=\"editProfileFrame\" />"); }		  if (!document.getElementById("editProfile")) { $("body").append("<div id=\"editProfile\" />"); }		  		  		  $("#editProfileFrame, #editProfile").css({			position: "absolute",			left: "25.5%",			top: "10%",			height: "35%",			padding: 10,			width: 921,			background: "#fff",			overflow: "hidden",			opacity: .70,			zindex: 10000		  });		  		  $("#editProfileFrame").css({			opacity: 0,			zindex: 9999		  });		  		  //.load("/admin/php/iesz/php/regnews.php")		  api = $("#editProfile").load("/admin/php/iesz/php/userinfo.php?userid="+userid).show("fade", 1200).expose({api: true, color: "#a5d728", closeOnClick: false, closeOnEsc: false }); //fadeIn(1000).		  api.load();	}function errorMessage(text) {		if (!document.getElementById("errMsg")) {		$("body").append("<div id=\"errMsg\"></div>");	}		$("#errMsg").css({		zIndex: 18000	}).dialog({		modal: true,		title: "Hiba történt!",		autoOpen: true, 		open: function() {			$(this).html(text);		},		buttons: {			"Rendben": function() {				$(this).dialog("destroy");			}		}	});		return false;	}function alertMessage(text, title) {		if (!document.getElementById("alertMsg")) {		$("body").append("<div id=\"alertMsg\"></div>");	}		$("#alertMsg").dialog({	modal: true,	bgiframe: true,	title: title,	autoOpen: true, 	open: function() {		$(this).html(text);	},	buttons: {		"OK": function() {			$(this).dialog("destroy");		}	}	});		return false;	}function fnMessage(text, title, action) {		if (!document.getElementById("fnMsg")) {		$("body").append("<div id=\"fnMsg\"></div>");	}		if (title=="") { title="Információ!"; }		$("#fnMsg").dialog({	modal: true,	title: title,	autoOpen: true, 	open: function() {		$(this).html(text);	},	buttons: {		"Rendben": function() {			action();			$(this).dialog("destroy");		}	}	});		return false;}function closeBox() {	if (document.getElementById("regNews")) {		$("#regNews").hide("fade", 1000);//css("display", "none");		$("#regFrame").remove();//css("display", "none");	}		if (document.getElementById("loginMsgBox")) {		$("#loginMsgBox").hide("fade", 1000);//css("display", "none");		$("#logFrame").remove();//css("display", "none");	}			if (document.getElementById("editProfile")) {		$("#editProfile").hide("fade", 1000).remove();//css("display", "none");		$("#editProfileFrame").remove();//css("display", "none");	}		if (api) $.mask.close();}function ReferKeyword(userid) {	var keyword = $("#keyword").val();	var category  = $("#category").val();		//tinyMCE.triggerSave();	var description = $("#description").html();	var error = 0;		$("body").append(description);	if (description=='' || description=='Rövid leírás / magyarázat') error=1;	if (keyword=='' || keyword=='Kulcsszó/kifejezés') error=1;	if (category==0) error=1;		if (error==0) {			$.post("/admin/php/iesz/php/userRefer.php", {			keyword: keyword,			category: category,			description: description,			userid: userid		}, function(xml) {					alertMessage(xml, "Kifejezés ajánlása - Üzenet");					});				} else {			errorMessage("Nem adott meg Kifejezést, kategóriát vagy magyarázatot!");			}	}function Register() {	//var height_b = $(document).height();			var width_b = $(window).width()/2;					  //$("#mainPageNews:first").fadeOut(1000);		  if (!document.getElementById("regFrame")) { $("body").append("<iframe id=\"regFrame\" />"); }		  if (!document.getElementById("regNews")) { $("body").append("<div id=\"regNews\" />"); }		  		  		  $("#regFrame, #regNews").css({			position: "absolute",			left: "25.5%",			top: "10%",			height: 350,			padding: 10,			width: 921,			background: "#fff",			overflow: "hidden",			opacity: .85,			zindex: 1000		  });		  		  $("#regFrame").css({			opacity: 0,			zindex: 999		  });		  		  //.load("/admin/php/iesz/php/regnews.php")		  api = $("#regNews").load("/admin/php/iesz/php/regnews.php").show("fade", 1200).expose({api: true, color: "#a5d728", closeOnClick: false, closeOnEsc: false }); //fadeIn(1000).		  api.load();}function login() {	//var height_b = $(document).height();			var leftx = $(window).width()/2-175;					  //$("#mainPageNews:first").fadeOut(1000);		  if (!document.getElementById("logFrame")) { $("body").append("<iframe id=\"logFrame\" />"); }		  if (!document.getElementById("loginMsgBox")) { $("body").append('<div id="loginMsgBox" />'); }		  		  $("#logFrame, #loginMsgBox").css({			position: "absolute",			left: leftx,			top: "10%",			height: 150,			padding: 10,			width: 350,			background: "#fff",			overflow: "hidden",			opacity: .70,			zindex: 10000		  });		  		  $("#logFrame").css({			opacity: 0,			zindex: 9999		  });		  api = $("#loginMsgBox").load("/admin/php/iesz/php/loginnews.php").show("fade", 1200).expose({api: true, color: "#a5d728", closeOnClick: false, closeOnEsc: false }); //fadeIn(1000).		  api.load();}function Refer(userid) {		if (document.getElementById("keyword")) {		var sapi = $(".Content .contentSide:last").append("<div style=\"color: #444; text-align: center;\" id=\"alert\">Nyomja meg az ESC gombot a bezáráshoz!</div>").expose({api: true, color: "#a5d728", closeOnClick: true, closeOnEsc: true, onClose: function() { $(".Content .contentSide #alert").remove(); } }); //fadeIn(1000).		sapi.load();	} else {				if (!document.getElementById("referMsgBox")) { $("body").append('<div id="referMsgBox" />'); }						var leftx = $(window).width()/2-300;						 $("#referMsgBox").load("/admin/php/iesz/php/refer.php?userid="+userid).dialog({				modal: true,				bgiframe: true,				width: 600,				height: 500,				top: 120,				buttons: {				"Bezár": function() { $(this).dialog("destroy").remove(); }				},				close: function() { $(this).dialog("destroy").remove(); }			 });				}	}$(document).ready(function() {	$("#description").mouseover(function() {		$("#description").html('');	});	$("#Register").click(function() {					Register();			});		$('textarea.tinymce').tinymce({		// General options		script_url : 'http://nice.hu/documents/hunjob/js_new/tiny_mce/tiny_mce.js',		mode : "textareas",		theme : "advanced",		language: "hu",		plugins : "safari,style",	 		// Theme options		theme_advanced_buttons1 : "bold,italic,underline,|,formatselect,fontsizeselect,|,undo,redo,|,forecolor,backcolor,|,hr,removeformat",		theme_advanced_buttons2 : "",		theme_advanced_buttons3 : "",		theme_advanced_toolbar_location : "top",		theme_advanced_toolbar_align : "left",	//	theme_advanced_statusbar_location : "bottom",		theme_advanced_resizing : false	});		});window.onload = function() {	var offset = $(window).width()/2+($("#CenterDiv").width()/2);		var gbLeft = offset;	var gbTop = 155;		$("#gBanner").css({		position: "absolute",		left: gbLeft+20,		top: gbTop	});	}
