var rok_new = '';
var mies_new = '';
var czasopismo_glowna_aktywne=1;
var news_aktualny=1;
var ksiazki_aktywne=1;
var artykuly_aktywne=1;
var latarnik_aktywne=1;
var bylo=0;

function dodaj_cene(koszt,dostawa,id,opis_nr,total){
	koszt_dostawy=parseFloat(dostawa.replace(',','.'));
	cena=parseFloat(koszt.replace(',','.'));
	suma=koszt_dostawy+cena;
	cena_cala=String(suma.toFixed(2));
	do_zaplaty=cena_cala.replace('.',',');
	czesci=do_zaplaty.split(",");
	if (czesci[1]==undefined){
		do_zaplaty=do_zaplaty+',00';
	} else if (czesci[1].length==1){
		do_zaplaty=do_zaplaty+'0';
	}
	document.getElementById(id).innerHTML=do_zaplaty;
	for (i=1; i<=total; i++){
		if (i==opis_nr){
			if ($('#dostawa_'+i)){
				$('#dostawa_'+i).removeClass("invisible");
			}
		} else {
			if ($('#dostawa_'+i)){
				$('#dostawa_'+i).addClass("invisible");
			}
		}
	}
	return 1;
}

function showDivByCheckbox(chk_id, div_id,revert)
{
	chk=document.getElementById(chk_id);
	if(revert==1)
	{
		if (chk.checked)
			document.getElementById(div_id).style.display='none';
		else
			document.getElementById(div_id).style.display='block';
	}	
	else
	{
		if (chk.checked)
			document.getElementById(div_id).style.display='block';
		else
			document.getElementById(div_id).style.display='none';
	}
}

function forum_typ(pole)
{
	if(pole.options.selectedIndex == 0)
		{
			$('watek').style.display='none';
		}
		else
		{
			$('watek').style.display='block';
		}
   return false;
}

function naruszenie(element)
{
	var confirmed = confirm('Czy na pewno chcesz zgłosić naruszenie zasad forum w wybranym poście ?');
	if (confirmed)
		{
	 	element.href=element.href + 'potwierdzenie/';		
		return true;
		}
	return false;
}


function getPageScroll(){

	var yScroll;

	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
	}

	arrayPageScroll = new Array('',yScroll) 
	return arrayPageScroll;
}

function getPageSize(){
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}


	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}


function Focus(control) {
  control.focus();
  control.select();
}

function IsEmailCorrect(email) {
  return email.match(/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,4})$/)!=null;
}

function IsEmpty(pole) {
  if (pole=='') 
  	return true
	else
	return false
}

function login_test(login)
{
	return login.match(/^[-_a-zA-Z0-9]+$/)!=null;
}

function sprawdz_login_istnieje()
{
	var req = mint.Request();		
	req.OnSuccess =
	function()
    {		
		if (this.responseText=='jest')
			{
				alert('Podany login istnieje w naszym systemie. Prosimy wybrać inny.');
			    Focus(document.getElementById('login'));
				return false;
			}
		sprawdz_email_istnieje();
	}
	
	req.AddParam("rodzaj", 'sprawdz_login');
	req.AddParam("login", $('login').value);
	req.Send("/ajax.php");
	return false;
}

function sprawdz_email_istnieje()
{
	var req = mint.Request();		
	req.OnSuccess =
	function()
    {		
		if (this.responseText=='jest')
			{
				alert('Podany adres email istnieje w naszym systemie. Prosimy wybrać inny.');
			    Focus(document.getElementById('email'));
				return false;
			}
		$('register').submit();
	}
	
	req.AddParam("rodzaj", 'sprawdz_email');
	req.AddParam("email", $('email').value);
	req.Send("/ajax.php");
	return false;
}

function sprawdz_przypomnij_haslo()
{
if (!IsEmailCorrect(document.getElementById('email').value))	{
    alert('Proszę podać poprawny adres e-mail.');
    Focus(document.getElementById('email'));
	return false;
	}
}

function sprawdz_rejestracja()
{
if (!login_test(document.getElementById('login').value) || document.getElementById('login').value.length<5 || document.getElementById('login').value=='admin') {
    alert('                                  Podany login jest nie poprawny.\n Login może składać się jedynie z liter i cyfr i powinien mieć conajmniej 5 znaków.');
    Focus(document.getElementById('login'));
    return false;
  }
if (document.getElementById('haslo').value.length<5 || document.getElementById('haslo').value!=document.getElementById('haslo_retype').value) {
	alert('   Podane hasło jest nie poprawne. \nHasło musi mieć conajmniej 5 znaków');
    Focus(document.getElementById('haslo'));
	return false;
	}
if (!IsEmailCorrect(document.getElementById('email').value))	{
    alert('Proszę podać poprawny adres e-mail.');
    Focus(document.getElementById('email'));
	return false;
	}
if (!document.getElementById('regulamin').checked) {
    alert('Proszę zaakceptować regulamin.');
	return false;
	}
sprawdz_login_istnieje();
return false;
}

function sprawdz_zmien_dane()
{
if ((document.getElementById('haslo').value.length!=0 || document.getElementById('haslo_retype').value.length!=0) && (document.getElementById('haslo').value.length<5 || document.getElementById('haslo').value!=document.getElementById('haslo_retype').value)) {
	alert('Proszę podać poprawne hasło.');
    Focus(document.getElementById('haslo'));
	return false;
	}
if (document.getElementById('plec').selectedIndex=='0') {
	alert('Proszę wybrać płeć.');
	return false;
	}
return true;
}

function sprawdz_polec()
{
if (IsEmpty(document.getElementById('imie').value)) {
    alert('Proszę podać imię.');
    Focus(document.getElementById('imie'));
    return false;
  }
if (!IsEmailCorrect(document.getElementById('email').value))	{
    alert('Proszę podać poprawny adres e-mail.');
    Focus(document.getElementById('email'));
	return false;
	}
return true;
}

function sprawdz_kontakt()
{
if (IsEmpty(document.getElementById('imie').value)) {
    alert('Proszę podać imię.');
    Focus(document.getElementById('imie'));
    return false;
  }
if (IsEmpty(document.getElementById('nazwisko').value)) {
    alert('Proszę podać nazwisko.');
    Focus(document.getElementById('nazwisko'));
    return false;
  }
if (!IsEmailCorrect(document.getElementById('email').value))	{
    alert('Proszę podać poprawny adres e-mail.');
    Focus(document.getElementById('email'));
	return false;
	}
if (IsEmpty(document.getElementById('tresc').value)) {
    alert('Proszę podać treść.');
    Focus(document.getElementById('tresc'));
    return false;
  }
return true;
}


function sprawdz_temat()
{
if (IsEmpty(document.getElementById('autor').value)) {
    alert('Proszę podać autora.');
    Focus(document.getElementById('autor'));
    return false;
  }
if (document.getElementById('autor').value.length<4) {
    alert('Pole autor musi zawierać conajmniej 4 znaki.');
    Focus(document.getElementById('autor'));
    return false;
  }
if (IsEmpty(document.getElementById('tytul').value)) {
    alert('Proszę podać tytuł.');
    Focus(document.getElementById('tytul'));
    return false;
  }
if (document.getElementById('tytul').value.length<4) {
    alert('Pole tytuł musi zawierać conajmniej 4 znaki.');
    Focus(document.getElementById('tytul'));
    return false;
  }
return true;
}

function sprawdz_komentarz()
{
if (IsEmpty(document.getElementById('autor').value)) {
    alert('Proszę podać autora.');
    Focus(document.getElementById('autor'));
    return false;
  }
if (document.getElementById('autor').value.length<4) {
    alert('Pole autor musi zawierać conajmniej 4 znaki.');
    Focus(document.getElementById('autor'));
    return false;
  }
if (IsEmpty(document.getElementById('tytul').value)) {
    alert('Proszę podać tytuł.');
    Focus(document.getElementById('tytul'));
    return false;
  }
if (document.getElementById('tytul').value.length<4) {
    alert('Pole tytuł musi zawierać conajmniej 4 znaki.');
    Focus(document.getElementById('tytul'));
    return false;
  }
if (IsEmpty(document.getElementById('tresc').value)) {
    alert('Proszę podać treść.');
    Focus(document.getElementById('tresc'));
    return false;
  }
if (document.getElementById('tresc').value.length<4) {
    alert('Pole treść musi zawierać conajmniej 4 znaki.');
    Focus(document.getElementById('tresc'));
    return false;
  }
return true;
}

function szukaj(numer)
{
	if (numer==4)
		{
			$("szukaj1").className='';
			$("szukaj2").className='';
			$("szukaj3").className='';
			$("szukajw1").value='0';
			$("szukajw2").value='0';
			$("szukajw3").value='0';			
			if ($("szukaj4").className=='active')
				{
				$("szukaj4").className='';						
				$("szukajw4").value='0';
				}
				else
				{
				$("szukaj4").className='active';
				$("szukajw4").value='1';
				}
		}
		else
		{
			$("szukaj4").className='';
			if ($("szukaj" + numer).className=='')
					{
				  	$("szukaj" + numer).className='active';
					$("szukajw" + numer).value='1';
					}
				  	else
					{
				  	$("szukaj" + numer).className='';
					$("szukajw" + numer).value='0';					
					}
		}
}

function change_news(numer,ilosc)
{
	for (i=1;i<=ilosc;i++)
		{
			if (i==numer) 
				{
				$("news" + i).style.display='block';
				$("mn" + i).className='active';
				news_aktualny=i;
				}
				else
				{
				$("news" + i).style.display='none';
				$("mn" + i).className=$("mn" + i).className.replace(/active/, "");				
				} 
				
		}
}

function change_news_over(numer,ilosc)
{
	for (i=1;i<=ilosc;i++)
		{
			if (i==numer) 
				{
				$("news" + i).style.display='block';
				}
				else
				{
				$("news" + i).style.display='none';
				} 
				
		}
}

function change_news_out(ilosc)
{
	for (i=1;i<=ilosc;i++)
		{
			if (i==news_aktualny) 
				{
				$("news" + i).style.display='block';
				}
				else
				{
				$("news" + i).style.display='none';
				} 
				
		}
}

function zmien_ksiazki(numer)
{
	for (i=1;i<=4;i++)
		{
			if (i==numer) 
				{
				$("ksiazki" + i).style.display='block';
				$("mk" + i).className='active';
				ksiazki_aktywne=i;
				}
				else
				{
				$("ksiazki" + i).style.display='none';
				$("mk" + i).className=$("mk" + i).className.replace(/active/, "");				
				} 
				
		}
}

function zmien_ksiazki_over(numer)
{
	for (i=1;i<=4;i++)
		{
			if (i==numer) 
				{
				$("ksiazki" + i).style.display='block';
				}
				else
				{
				$("ksiazki" + i).style.display='none';
				} 
				
		}
}

function zmien_ksiazki_out()
{
	for (i=1;i<=4;i++)
		{
			if (i==ksiazki_aktywne) 
				{
				$("ksiazki" + i).style.display='block';
				}
				else
				{
				$("ksiazki" + i).style.display='none';
				} 
				
		}
}


function zmien_artykuly(numer,ilosc)
{
	for (i=1;i<=ilosc;i++)
		{
			if (i==numer) 
				{
				$("artykul" + i).style.display='block';
				$("ma" + i).className='active';
				artykuly_aktywne=i;
				}
				else
				{
				$("artykul" + i).style.display='none';
				$("ma" + i).className=$("ma" + i).className.replace(/active/, "");				
				} 
				
		}
}

function zmien_artykuly_over(numer,ilosc)
{
	for (i=1;i<=ilosc;i++)
		{
			if (i==numer) 
				{
				$("artykul" + i).style.display='block';
				}
				else
				{
				$("artykul" + i).style.display='none';
				} 
				
		}
}

function zmien_artykuly_out(ilosc)
{
	for (i=1;i<=ilosc;i++)
		{
			if (i==artykuly_aktywne) 
				{
				$("artykul" + i).style.display='block';
				}
				else
				{
				$("artykul" + i).style.display='none';
				} 
				
		}
}

function zmien_latarnik(numer,ilosc)
{
	for (i=1;i<=ilosc;i++)
		{
			if (i==numer) 
				{
				$("latarnik" + i).style.display='block';
				$("mal" + i).className='active';
				latarnik_aktywne=i;
				}
				else
				{
				$("latarnik" + i).style.display='none';
				$("mal" + i).className=$("mal" + i).className.replace(/active/, "");				
				} 
				
		}
}

function zmien_latarnik_over(numer,ilosc)
{
	for (i=1;i<=ilosc;i++)
		{
			if (i==numer) 
				{
				$("latarnik" + i).style.display='block';
				}
				else
				{
				$("latarnik" + i).style.display='none';
				} 
				
		}
}

function zmien_latarnik_out(ilosc)
{
	for (i=1;i<=ilosc;i++)
		{
			if (i==latarnik_aktywne) 
				{
				$("latarnik" + i).style.display='block';
				}
				else
				{
				$("latarnik" + i).style.display='none';
				} 
				
		}
}

function rozwin(pole)
{
	ul = $("ml" + pole);
	var req = mint.Request();
	if (ul.style.display=='none')
		{
		ul.style.display='block';
		req.AddParam("numer", pole);
		req.AddParam("wartosc", 1);
		req.AddParam("rodzaj", 'menu');
		req.Send("/ajax.php");
		}
		else
		{
		ul.style.display='none';
		req.AddParam("numer", pole);
		req.AddParam("wartosc", 0);
		req.AddParam("rodzaj", 'menu');
		req.Send("/ajax.php");
		}
}

function czasopismo(numer)
{
	for(i=1;i<5;i++)
		{
			if (i==numer) 
				{
				$("czasopismo" + i).style.display='block';
				$("mm" + i).className='active';
				czasopismo_glowna_aktywne=i;
				}
				else
				{
				$("czasopismo" + i).style.display='none';
				$("mm" + i).className=$("mm" + i).className.replace(/active/, "");				
				}
		}
}

function czasopismoover(numer)
{
	for(i=1;i<5;i++)
		{
			if (i==numer) 
				{
				$("czasopismo" + i).style.display='block';
				}
				else
				{
				$("czasopismo" + i).style.display='none';
				}
		}
}

function czasopismoout()
{
	for(i=1;i<5;i++)
		{
			if (i==czasopismo_glowna_aktywne) 
				{
				$("czasopismo" + i).style.display='block';
				}
				else
				{
				$("czasopismo" + i).style.display='none';
				}
		}
}

function czasopisma_numery(czasopismo,rok,id,typ,rok_ak,mies_ak)
{
	var req = mint.Request();		
	if (rok_new!='') rok_ak=rok_new;
	if (mies_new!='') mies_ak=mies_new;
	req.OnSuccess =
	function()
    {		
		$('czasopisma_numery' + id).innerHTML = this.responseText;
	}
	
	req.AddParam("rok", rok);
	req.AddParam("czasopismo", czasopismo);
	req.AddParam("numer", id);	
	req.AddParam("rodzaj", 'czasopisma_numery');
	req.AddParam("opcja", 'katalog_rozwin');
	req.AddParam("rok_ak", rok_ak);
	req.AddParam("mies_ak", mies_ak);
	req.AddParam("link", typ);
	req.Send("/ajax.php");
}

function czasopisma_wstepniak(czasopismo,rok,miesiac,id)
{
	var req = mint.Request();		
	rok_new=rok;
	mies_new=miesiac;
	req.OnSuccess =
	function()
    {
		$('czasopisma_text' + id).innerHTML = this.responseText;
		elementy = $('czasopisma_numery' + id).getElementsByTagName("a");
		for (i=0; i<elementy.length; i++) 
			{
				miesiac2 =id + '_' + miesiac
				if (elementy[i].id==miesiac2)
					elementy[i].className='active';
					else 
					elementy[i].className='';
			}
	}
	
	req.AddParam("rok", rok);
	req.AddParam("miesiac", miesiac);
	req.AddParam("czasopismo", czasopismo);
	req.AddParam("rodzaj", 'czasopisma_wstepniak');
	req.AddParam("opcja", 'katalog_rozwin');
	req.Send("/ajax.php");
}

function newsopis(karta,numer)
{
for (i=1;i<6;i++)
	{
		if (i==numer)			
			$('newsright_'+karta+'_'+i).className='right';
			else
			$('newsright_'+karta+'_'+i).className='right hidden';
	}
}

function newsletter_zapisz()
{
if (!IsEmailCorrect(document.getElementById('email_zapisz').value))	{
    alert('Proszę podać poprawny adres e-mail.');
    Focus(document.getElementById('email_zapisz'));
	return false;
	}	
}

function newsletter_wypisz()
{
if (!IsEmailCorrect(document.getElementById('email_wypisz').value))	{
    alert('Proszę podać poprawny adres e-mail.');
    Focus(document.getElementById('email_wypisz'));
	return false;
	}	
}

function wybierz_miasto(modul)
{	
	wojewodztwo=$("wojewodztwo").value;
	if (wojewodztwo==-1)
		{
			$('miasto').disabled=true;
			$('miasto').options.length=1;
			//$('rodzaj_szkoly').disabled=true;
			//$('rodzaj_szkoly').options.length=1;			
			return;
		}
	//$('rodzaj_szkoly').disabled=true;
	//$('rodzaj_szkoly').options.length=1;
	var req = mint.Request();
	req.OnSuccess =
	function()
    {
		$('miasto2').innerHTML=this.responseText;
		$('miasto').disabled=false;
	}
	req.AddParam("modul", modul);
	req.AddParam("wojewodztwo", wojewodztwo);
	req.AddParam("rodzaj", 'pobierz_miasto');
	req.Send("/ajax.php");
}

function wybierz_miasto_gabinety(modul)
{	
	wojewodztwo=$("wojewodztwo").value;
	if (wojewodztwo==-1)
		{
			$('miasto').disabled=true;
			$('miasto').options.length=1;				
			return;
		}
	var req = mint.Request();
	req.OnSuccess =
	function()
    {
		$('miasto2').innerHTML=this.responseText;
		$('miasto').disabled=false;
	}
	req.AddParam("modul", modul);
	req.AddParam("wojewodztwo", wojewodztwo);
	req.AddParam("rodzaj", 'pobierz_miasto');
	req.Send("/ajax.php");
}

function wybierz_szkole(modul)
{	
	miasto=$("miasto").value;
	if (miasto==-1)
		{
			$('rodzaj_szkoly').disabled=true;
			$('rodzaj_szkoly').options.length=1;
			return;
		}
	var req = mint.Request();
	req.OnSuccess =
	function()
    {
		$('rodzaj_szkoly').innerHTML=this.responseText;
		$('rodzaj_szkoly').disabled=false;
	}
	req.AddParam("modul", modul);
	req.AddParam("miasto", miasto);
	req.AddParam("rodzaj", 'pobierz_szkole');
	req.Send("/ajax.php");
}

function szkoly_sprawdz()
{
	if ($("wojewodztwo").value==-1)
		{
			alert('Proszę wybrać województwo.');
			return false;
		}
	if ($("miasto").value==-1)
		{
			alert('Proszę wybrać miasto.');
			return false;
		}
/*
if ($("rodzaj_szkoly").value==-1)
		{
			alert('Proszę wybrać rodzaj szkoły.');
			return false;
		}		
*/
return true;
}

function ksiazka(numer)
{	
	var arrayPageSize=getPageSize();
	$("tlo").style.height = arrayPageSize[1] + 'px';		
	x=parseInt((arrayPageSize[0]-761)/2);
	if (x<0) x=0;
	$("ksiazka"+numer).style.left=parseInt(x) + 'px';
	$("ksiazka"+numer).style.top='20px';
	$("ksiazka"+numer).style.display='block';

	$("reklama").style.display='none';
	$("tlo").style.display='block';		
}

function ksiazka_zamknij(numer)
{
	$("tlo").style.height='0px';
	$("tlo").style.display='none';
	$("ksiazka"+numer).style.display='none';
	$("reklama").style.display='block';
}

function sonda_odpowiedz(numer)
{
	$("sonda_odpowiedz").value=numer;
	$("FormularzAnkietowy").submit();
}

function kalendarz_lewa()
{
	kalendarz_month--;
	if (kalendarz_month<1)
		{
			kalendarz_month=12;
			kalendarz_year--;
		}
	var req = mint.Request();
	req.OnSuccess =
	function()
    {
		$('kalendarz_box').innerHTML=this.responseText;
	}
	req.AddParam("rok", kalendarz_year);
	req.AddParam("miesiac", kalendarz_month);
	req.AddParam("rodzaj", 'kalendarz');
	req.Send("/ajax.php");
}

function kalendarz_prawa()
{
	kalendarz_month++;
	if (kalendarz_month>12)
		{
			kalendarz_month=1;
			kalendarz_year++;
		}
	var req = mint.Request();
	req.OnSuccess =
	function()
    {
		$('kalendarz_box').innerHTML=this.responseText;
	}
	req.AddParam("rok", kalendarz_year);
	req.AddParam("miesiac", kalendarz_month);
	req.AddParam("rodzaj", 'kalendarz');
	req.Send("/ajax.php");
}


/* Piotrek */

function usun_wpis(element)
{
	var confirmed = confirm("Czy na pewno chcesz usunąć wybrany wpis?");
	if (confirmed)
		{
	 	element.href=element.href + 'usun/';		
		return true;
		}
	return false;
}

function usun_kategorie(element)
{
	var confirmed = confirm("Czy na pewno chcesz usunąć wybraną kategorię?");
	if (confirmed)
		{
	 	element.href=element.href + 'usun/';		
		return true;
		}
	return false;
}

function pokaz_faktura()
{
	chk=document.getElementById('faktura');
	if (chk.checked)
		document.getElementById('dane_faktury').style.display='block';
	else
		document.getElementById('dane_faktury').style.display='none';
}

function faktura_kopiuj()
{
	document.getElementById('faktura_imie').value=document.getElementById('imie').value;
	document.getElementById('faktura_nazwisko').value=document.getElementById('nazwisko').value;
	document.getElementById('faktura_adres').value=document.getElementById('adres').value;
	document.getElementById('faktura_adres2').value=document.getElementById('adres2').value;
	document.getElementById('faktura_miejscowosc').value=document.getElementById('miasto').value;
	document.getElementById('faktura_kod_pocztowy').value=document.getElementById('kod_pocztowy').value;
	document.getElementById('faktura_wojewodztwo').value=document.getElementById('wojewodztwo').value;
	document.getElementById('faktura_panstwo').value=document.getElementById('panstwo').value;
	return false;
}

function changeYoutubeVideo ( youtubeVideo, minivideo, minivideoId )
{	
	//jQuery('#monthBox').fadeOut('fast');
	//jQuery('#loader').fadeIn('fast');
	
	$.post("/ajax.php", { opcja: 'youtubeVideo' , youtubeVideo: youtubeVideo, minivideo: minivideo, minivideoId: minivideoId },
		  function(data)
		  {
				var arr = data.split("||");
				$("#youtubeVideo").html(arr[0]);
				$("#"+minivideoId).html(arr[1]);
				
				//jQuery('#prevDate').attr("href" , "javascript: changeDate('"+arr[2]+"' , '"+arr[3]+"')" );
				//jQuery('#nextDate').attr("href" , "javascript: changeDate('"+arr[4]+"' , '"+arr[5]+"')" );				
				//jQuery('#monthBox').fadeIn('fast');
				//jQuery('#loader').fadeOut('fast');
			});	
}