function modifyUrl()//usuwa dwie ostatenie pozycje z url'a (producenta wywala)
{
	var url  = window.location.href;
	var urlArray = url.split(',');
	window.location.href = window.location.href.replace(','+urlArray[urlArray.length-2]+','+urlArray[urlArray.length-1], '');
} 


function flash(width,height,path,div_id)
{

	var flash = '<object type="application/x-shockwave-flash" data="'+path+'" width="'+width+'" height="'+height+'">';
	flash += '<param name="movie" value="'+path+'" />';
	flash += '<param name="quality" value="high" />';
	flash += '<param name="allowScriptAccess" value="sameDomain" />';
	flash += '<param name="wmode" value="transparent" />';
	flash += '<param name="bgcolor" value="#ffffff" />';
	flash += '<param name="menu" value="false" />';
	flash += '<param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" />';
	flash += '</object>';
	
	
	document.getElementById(div_id).innerHTML = flash;
}

function show_hide(id)
{
	t=document.getElementsByName('I'+id);
	count=t.length;
	for(i=0;i<count;i++) {	
	
		if( t[i].style.display == 'none' )
		{
			t[i].style.display = 'block';
		}
		else
		{
			t[i].style.display = 'none';			
		};
	}
	
}

function show(id)
{
	t=document.getElementsByName('I'+id);
	count=t.length;
	for(i=0;i<count;i++) {			
			t[i].style.display = 'block';		
	}
	
}

function hide(id)
{
	t=document.getElementsByName('I'+id);
	count=t.length;
	for(i=0;i<count;i++) {			
			t[i].style.display = 'none';		
	}
	
}

function boldFunc(id)
{		
	t=document.getElementById('II'+id);
	t.style.color='#333';
	t.style.fontWeight='bold';
	t.style.background="url(img/arrow4.gif) no-repeat";

}

function blueFunc(id)
{		
	t=document.getElementById('II'+id);
	t.style.color='#0096FB';
}



function sprawdz_formularz(AForm)
{

    if(!AForm.imie_nazwisko.value)
	{
	alert('Prosze wypelnic pole "Imie i nazwisko" ');
	return false;
	}
   
    reg3 = /^[a-zA-Z0-9aceln�szzACELN�SZZ.]{1,30}@[a-zA-Z0-9aceln�szzACELN�SZZ]+(\.[a-zA-Z0-9aceln�szzACELN�SZZ]+)+$/;
    wyn3 = AForm.email.value.match(reg3);
    if (wyn3 == null) {
        alert("Prosze podac poprawny adres email. " +
              "Poprawny adres musi zawierac malpe " +
              "oraz co najmniej dwa czlony nazwy serwera, " +
              "np. a@b.c lub ala@ma.kota.czarnego.com ");
        return false;
    }
	
	if(!AForm.tresc.value)
	{ 
	alert('Prosze wypelnic pole "tresc" ');
	return false;
	}


    return true;
}




