/* popup image/flash/video megjelenito */
function showImage(img, w, h) {
	var scrollbars = 1;
	if(w == null) w = 200;
	if(h == null) h = 200;
	ww = w;
	wh = h;
	if (img.toLowerCase().substr(img.length - 4, 4) == '.flv') {
		h = h + 45;
		scrollbars = 0;
	} else {
		scrollbars = 1;
		if (is.ie) {
			w = w + 20;
		}
	}
	var win = window.open("about:blank", "_blank", "width=" + w + ",height=" + h + ",status=0,resizable=1,scrollbars=" + scrollbars);
	var doc = win.document;

	doc.write('<html xmlns="http://www.w3.org/1999/xhtml"><head><title></title></head>');
	doc.write('<body style="margin: 0px;">');
	if (img.toLowerCase().substr(img.length - 4, 4) == '.swf') {
		doc.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="' + w + '" height="' + h + '" title="">  <param name="movie" value="' + img + '" />  <param name="quality" value="high" />  <embed src="' + img + '" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + w + '" height="' + h + '"></embed>  </object>');
	} else if (img.toLowerCase().substr(img.length - 4, 4) == '.flv') {
		//url = '/video/player.swf?videoURL=' + img + '&amp;_w=' + w + '&amp;_h=' + (h + 40);
		url = '/video/playerx.swf?videoURL=' + img + '&amp;skinURL=/video/SkinDeepskeye.swf';
		doc.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="' + w + '" height="' + h + '">  <param name="allowScriptAccess" value="sameDomain" />  <param name="allowFullScreen" value="true" />  <param name="movie" value="' + url + '" />  <param name="quality" value="high" />  <param name="bgcolor" value="#ffffff" />  <param name="scale" value="noscale" />  <param name="salign" value="lt" />  <embed src="' + url + '" quality="high" bgcolor="#ffffff" width="' + w + '" height="' + h + '" scale="noscale" salign="lt" name="playerx" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />  </object>');
	} else {
		doc.write('<img src="' + img + '" alt="" onclick="window.close();" style="cursor: pointer;">');
	}
	doc.write('</body></html>');
	doc.close();
	return false;
}

/* bookmark this page */
function bookmarkPage(title) {
	url = location.href;
	if (window.sidebar) { // firefox
		window.sidebar.addPanel(title, url, '');
	} else if (window.opera && window.print) { // opera
		var e = document.createElement('a');
		e.setAttribute('href', url);
		e.setAttribute('title', title);
		e.setAttribute('rel', 'sidebar');
		e.click();
	} else if (document.all) { // ie
		window.external.AddFavorite(url, title);
	}
	return false;
}

/* print this page */
function printPage() {
	window.print();
	return false;
}


/* floatmenu */
function SiteFloatMenuView(descriptor) {
	HTDefaultFloatMenuView.call(this, descriptor);
}

SiteFloatMenuView.prototype = {
	element: HTDefaultFloatMenuView.prototype.element,
	childElements: HTDefaultFloatMenuView.prototype.childElements,
	shdElement: HTDefaultFloatMenuView.prototype.shdElement,
	show: HTDefaultFloatMenuView.prototype.show,
	hide: HTDefaultFloatMenuView.prototype.hide,
	isVisible: HTDefaultFloatMenuView.prototype.isVisible,
	getMenuItem: HTDefaultFloatMenuView.prototype.getMenuItem,
	jsonMenuItemList: HTDefaultFloatMenuView.prototype.jsonMenuItemList,

	//jsonMenu: HTDefaultFloatMenuView.prototype.jsonMenu,
	jsonMenu: function() {
		var json = this.jsonMenuItemList();
		json.unshift("div", { 'style': 'position: absolute;', 'class' : 'flmenu' });

		console.dir(json);

		return json;
	},
	jsonMenuItem: HTDefaultFloatMenuView.prototype.jsonMenuItem
};

// Hírlevélről leíratkozás box
function hirlevel_unsubscribe() {
	document.getElementById('hirlevel_box_form_method').value = 'unsubscribe';
	document.getElementById('hirlevel_box_form').submit();
	return false;
}
