function piszJakMaszyna(i, ktore_zdanie){
	var x = document.getElementById('npwarszawa');
	var zdanie = new String();
	var pisz = new Array();
	pisz[0] = new Array(' ','W','a','r','s','z','a','w','a', ''); 
	pisz[1] = new Array('','P','o','z','n','a','ń','');
	pisz[2] = new Array('', 'K','r','a','k','ó','w','');
	pisz[3] = new Array('','W','r','o','c','ł','a','w','');
	pisz[3] = new Array('','G','d','a','ń','s','k','');
	for (j=0; j<i; j++){
		zdanie += pisz[ktore_zdanie][j];
	}
	i++;
	x.innerHTML = zdanie;
	if (i==pisz[ktore_zdanie].length){ 
		i = 0; 
		ktore_zdanie = Math.floor(Math.random()*pisz.length);
	}
	setTimeout("piszJakMaszyna("+i+", "+ktore_zdanie+")", 200);
}

function reklama(){
	var w = 800;
    var h = 600;
    var left = (screen.width/2)-(w/2);
    var top = (screen.height/2)-(h/2);
    window.open('http://randkizadarmo.pl/index/reklama.html', 'reklama', 'width=800px, height=600px,status=yes,toolbar=no,menubar=no,location=no, left='+left+', top='+top+'');
}
function regulamin(){
	window.open('/img/regulamin.gif', '', '');
}

function akceptacja(keygen, sms, ivr_kom, ivr_stac, ivr_wew){
	var y = document.getElementById('akceptacja');
	var source;
	if (keygen == "") {
		source = '<h2>Czy chcesz zobaczyć kontakt do tej kobiety?</h2>';
		source += '<form action="' + document.location + '" method="POST">';
		source += '<input type="hidden" name="reg" value="1">';
		source += '<input type="image" src="/img/tak.jpg" value="TAK" style="margin-right: 40px">';
		source += '<span onclick="location.href=\'' + document.location + '\'">nie</span>';
		source += '</form>';
		source += '<p>Kliknięcie TAK oznacza akceptację ';
		source += '<span onclick="regulamin()">regulaminu</span></p>';
	}
	else {
		source = '<h2>SMS o treści <span style="color: red">' + keygen + '</span> na numer <span style="color: red">'+sms+'</span> <!--<img src="/img/numer.gif" alt="" />--></h2>';
		if (ivr_kom != "" && ivr_stac != "") {
			source += '<h2>Zadzwoń do mnie z komórki <span style="color: red">'+ivr_kom+'</span></h2>'+
				'<h2>Zadzwon do mnie z tel. stacjonarnego <span style="color: red">'+ivr_stac+'</span></h2>';
			if(ivr_wew != "")
				source += '<h2>i podaj mój wewnętrzny <span style="color: red">'+ivr_wew+'</span></h2>';
		}
		document.getElementById('zobacz_kontakt').style.display = 'none';
	}
	y.innerHTML = '<div class="akceptacja">'+source+'</div>';
}

piszJakMaszyna(0, 0);
/*
new flashembed("flowplayerholder", { src: "/js/FlowPlayerLight.swf", width: 268, height: 229, wmode: 'transparent' }, 
		{
	onLoad: function () { 
    this.setVolume(0); 
  }, 
			config:{ 
				videoFile: "/films/1.flv",
				autoPlay: true, 
				hideControls: true, 
				loop: true,
				autoRewind: false, 
				initialScale: 'scale', 
				autoBuffering: true
				//onload: function(){this.setvolume(0);}
				//initialVolumePercentage: 0,
				//onStart: function() { this.mute(); }
			}
//			,
//			 plugins: {  
//			    controls: {  
//			      mute: true
//			}}
			
//			clip: {
//			onLoad: function() {    // called when player has finished loading 
//		        this.setVolume(1);    // set volume property 
//		    }
			//	onStart: function() { this.mute(); }
			//	mute : true
//				}
//				onLoad: function() {    // called when player has finished loading 
//			        this.setVolume(0);    // set volume property 
//			    }

		});
*/
