/*
	This script is protected by law.
	Copyright (c) 2007. divecenter.hu

*/

// Flash banner megjelenítése IE alatt sincs dupla kattintás
function flash( url, w, h, id ) {
	szoveg = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
	+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'">\n'
	+ '<param name="movie" value="'+url+'"><param name="quality" value="high">\n'
	+ '<embed src="'
	+url
	+ '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'">\n'
	+ '</embed></object>\n';
	document.write(szoveg);
};

// Video beillesztése - nem használt
function flash_video(url, w, h) {
	szoveg = '<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="'+w+'" height="'+h+'">'
	+'<param name="movie" value="/swf/player.swf" />'
	+'<param name="allowfullscreen" value="true" />'
	+'<param name="allowscriptaccess" value="always" />'
	+'<param name="flashvars" value="file='+url+'" />'
	+'<embed type="application/x-shockwave-flash" id="player2" name="player2" src="/swf/player.swf" width="'+w+'" height="'+h+'" allowscriptaccess="always" 			allowfullscreen="true"	flashvars="file='+url+'" />'
	+'</object>';
	document.write(szoveg);
};

// látható-rejtett stílus
function style_xor(mit) {
	honnan = document.getElementById(mit);
	if (honnan.style.display == "none") {
		honnan.style.display = "block";
	} else {
		honnan.style.display = "none";
	};
};

// Hír galériát nyit
function hir_galeria(pid) {
	var w=window.open('/Keptar/images_for_news/photo='+pid,'','width=830,height=590');
	w.focus();
};

// Ajax kapcsolatot nyit
function ajax_ini() {
	var xhr;
	try	{
		xhr = new XMLHttpRequest(); // FF & IE7
	} catch (e) {
		try	{
			xhr = new ActiveXObject('MSXML2.XMLHTTP.3.0');
		} catch(e) {
			try	{
				xhr = new ActiveXObject('Microsoft.XMLHTTP');
			} catch(e) {
				return false;
			}
		}
	}
	return xhr;
}
	

