// JavaScript Document
// Email
var atChar = "@";
	var obf_eml = "t"+"a"+"s"+"k"+"a"+"r"+"a"+"d"+"i"+"o";
	obf_eml += atChar;
	obf_eml += "t"+"a"+"s"+"ka"+"ra"+"dio"+".com";


	var obf_eml_kiv = "k"+"i"+"v"+"a"+"n"+"s"+"a"+"g";
	obf_eml_kiv += atChar;
	obf_eml_kiv += "t"+"a"+"s"+"ka"+"ra"+"dio"+".com";
	
	var obf_eml_rek = "r"+"e"+"k"+"l"+"a"+"m";
	obf_eml_rek += atChar;
	obf_eml_rek += "t"+"a"+"s"+"ka"+"ra"+"dio"+".com";

	var obf_eml_repeta = "r"+"e"+"p"+"e"+"t"+"a";
	obf_eml_repeta += atChar;
	obf_eml_repeta += "t"+"a"+"s"+"ka"+"ra"+"dio"+".com";

//////////////////////////////////////////////////////////////////////////////////////////////////////////
// AudioPlayer
	AudioPlayer.setup("../scripts/audio-player/player.swf", {   
		width: 200,
		transparentpagebg: "yes"
   });   

//////////////////////////////////////////////////////////////////////////////////////////////////////////
// Jcarousel
function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////
jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
	    vertical: true,
        scroll: 1,
		auto: 10,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});

//////////////////////////////////////////////////////////////////////////////////////////////////////////
jQuery(document).ready(function() {
    jQuery('#mycarousel2').jcarousel({
	    vertical: true,
        scroll: 1,
		auto: 5,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});
//////////////////////////////////////////////////////////////////////////////////////////////////////////
// Google Analytics

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-13029909-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

//////////////////////////////////////////////////////////////////////////////////////////////////////////
// Flash Radio player popup
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=220,height=135,scrollbars=no');
return false;
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////
// Ajax refresher
			function Ajax()
			{
				var
					$http,
					$self = arguments.callee;

				if (window.XMLHttpRequest) {
					$http = new XMLHttpRequest();
				} else if (window.ActiveXObject) {
					try {
						$http = new ActiveXObject('Msxml2.XMLHTTP');
					} catch(e) {
						$http = new ActiveXObject('Microsoft.XMLHTTP');
					}
				}

				if ($http) {
					$http.onreadystatechange = function()
					{
						if (/4|^complete$/.test($http.readyState)) {
							document.getElementById('ReloadThis').innerHTML = $http.responseText;
							setTimeout(function(){$self();}, 10000);
						}
					};
					$http.open('GET', 'http://www.taskaradio.com/includes/dal_szavazas.php' + '?' + new Date().getTime(), true);
					$http.send(null);
				}

			}

//////////////////////////////////////////////////////////////////////////////////////////////////////////
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

////////////////////////////////////////////////////////////////////////////////////

function popUp(URL) {
var xtavolsag =((screen.width)-550);
adatok = "toolbar=0,location=0,statusbar=0,menubar=0,resizable=0,width=540,height=690,left ="+xtavolsag+",top = 0";
newwindow = window.open(URL, "Galeria2", adatok); 
newwindow.focus();
}

