<!--
function colorize(id){
	if(!document.getElementById)return;
	var i,E=document.getElementById(id),tr;
	if(E&&E.tagName=='TABLE'){
		tr=E.getElementsByTagName('TR');
		for(i=0;i<tr.length;i++){
			tr[i].onmouseover=function(){
				if(this.className!='onDown')
					this.className='onOver';
			}
			tr[i].onmouseout=function(){
				if(this.className!='onDown')
					this.className='onOut';
			}
			tr[i].onmousedown=function(){
				this.className = this.className=='onDown'?'onOut':'onDown';
			}
		}
	}
}


function extendAdditionalInfo(){
	var a1 = document.getElementById('c11');
	var b1 = document.getElementById('c12');
	var c1 = document.getElementById('c13');
	var d1 = document.getElementById('c14');
	 
	var text=" Przyczyny ponownego wysłania formularza: ";
	if(a1!=null && a1.checked){
	text+=a1.value+',';
	}
	if(b1!=null &&  b1.checked){
	text+=b1.value+',';
	}
	if(c1!=null && c1.checked){
	text+=c1.value+',';
	}
	if(d1!=null && d1.checked){
	text+=d1.value+',';
	}
	if(text.lenght == 'resend>')
	text = '';
	var addtext = document.forms['recordForm'].additional_info.value+ text;
	document.forms['recordForm'].additional_info.value = addtext; 
}



function autocheck(obj) {
	var fname = obj.name;
	if (!eval("document.form1."+fname+"_check")) return;
	var flen = 0;
	if (obj.type == 'text') flen = obj.value.length;
	else if (obj.type == 'select-one') flen = 1; // pola typu select-one zawsze wł±czaj±
//	else if (obj.type == 'select-one') flen = obj.selectedIndex;
	else return;
	var state = (flen)? true:false;
	eval("document.form1."+fname+"_check.checked = state");
}

// prirtCalc('przyklad'); -> document.przyklad
// printCalc('');         -> document.form1

function printCalcs(fname, step) {
	if (!fname.length) fname = 'form1';
	var f = eval("document." + fname);
	if(!f.name) return;
	var u = document.location.href; // ? (+'?')
	if (u.indexOf('?') == -1 ) u += '?';
	var itemCount = f.length;
	for(var i=0;i<itemCount;i++) if (f[i].name != 'step' && f[i].value) u += '&' + f[i].name +'=' + f[i].value;
	u += '&step=' + step;
	u = u.replace(/index.jsp/gi, 'print.jsp');
	window.open(u, 'print', 'toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,width=600,height=500');
}

function showCalc(fname,step) {
	if (!fname.length) fname = 'form1';
	var f = eval("document." + fname);
	if(!f.name) return;
//	var u = document.location.href; // ? (+'?')
	var u = 'index.jsp';
	if (u.indexOf('?') == -1 ) u += '?';
	var itemCount = f.length;
	for(var i=0;i<itemCount;i++) {
		if (f[i].name != 'step' && f[i].value) {
			if ( i == 1) {
				u += f[i].name + '=' + f[i].value;
			} else {
				u += '&' + f[i].name +'=' + f[i].value;
				}
		}
	}
	u += '&step=' + step;
	u = u.replace(/index.jsp/gi, 'showCalc.jsp');
	window.open(u, 'showCalculators', 'toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,width=600,height=500');
}

function printSearch(fname) {
	if (!fname.length) fname = 'form1';
	var f = eval("document." + fname);
	if(!f.name) return;
	var u = document.location.href; // ? (+'?')
	if (u.indexOf('?') == -1 ) u += '?';
	var itemCount = f.length;
	for(var i=0;i<itemCount;i++) {
		if (f[i].name == 'offset') u += '&' + f[i].name +'=0';
		if (f[i].name == 'count') u += '&' + f[i].name +'=9999';
		else u += '&' + f[i].name +'=' + f[i].value;
	}
	u = u.replace(/index.jsp/gi, 'print.jsp');
	window.open(u, 'print', 'toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,width=600,height=500');
}

function printQuotation() {
	var u = document.location.href; // ? (+'?')
	if (u.indexOf('?') == -1 ) u += '?';
	u = u.replace(/index.jsp/gi, 'print.jsp');
	window.open(u, 'print', 'toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrollbars=1,width=600,height=500');
}

var invalid_mail = new Array("adam@o2.pl","adam@tlen.pl","adam@go2.pl");

Array.prototype.in_array_invalid = function(m_val) {
    for(var i = 0, l = this.length; i < l; i++) {
        if(this[i] == m_val) {return false;}
    }
    return true;
}



function validateFormStaticLondyn(AForm) {
	validate=true;

	//1. Imię
	reg = /^[a-zA-Z±ćęłńó¶żĽˇĆĘŁŃÓ¦Ż¬ -]{2,20}$/;
	wyn = document.recordForm.client_name.value.match(reg);
	var object = document.getElementById('label1');

	var tablicaImNaz = new Array('dupa','fuck','chuj','nie podam','sdf','asd','qwe');
	var tIm = true;
	var imF = new String(document.recordForm.client_name.value);
	
	for (var k = 0; k < tablicaImNaz.length; k++){
		if(document.recordForm.client_name.value.indexOf(tablicaImNaz[k]) != -1){
			tIm = false;
		}
	}

	for (var k = 2; k < imF.length; k++){
		if((imF.charAt(k) == imF.charAt(k-1)) && (imF.charAt(k) == imF.charAt(k-2))) {
			tIm = false;
		}
	}		

	if ((wyn == null) || (tIm == false)) {
		validate=false;
		if (object) {object.style.color='#ff0000';}
	} else {
		if (object) {object.style.color='#97969B';}
	}


	//2. Nazwisko
	reg = /^[a-zA-Z±ćęłńó¶żĽˇĆĘŁŃÓ¦Ż¬ -]{2,30}$/;
	wyn = document.recordForm.client_surname.value.match(reg);
	var object = document.getElementById('label2');
	var nazF = document.recordForm.client_surname.value;
	var tNaz = true;

	for (var k = 0; k < tablicaImNaz.length; k++){
		if(document.recordForm.client_surname.value.indexOf(tablicaImNaz[k]) != -1){
			tNaz = false;
		}
	}

	for (var k = 2; k < nazF.length; k++){
		if((nazF.charAt(k) == nazF.charAt(k-1)) && (nazF.charAt(k) == nazF.charAt(k-2))) 
			tNaz = false;
	}	

	if ((wyn == null) || (document.recordForm.client_name.value == document.recordForm.client_surname.value) || (tNaz == false)) {
		validate=false;
		if (object) {object.style.color='#ff0000';}
	} else {
		if (object) {object.style.color='#97969B';}
	}



		//3. Telefon 
		reg = /^[0-9]{10}$/;
		wyn = (document.recordForm.client_mobile.value.match(reg));
		var object = document.getElementById('label4');
		var tKom = true;
		var telKom = true;
		if(telKom) {
			var tablica = new Array('50', '51', '53', '600', '601', '602', '603', '604', '605', '606', '607', '608', '609', '660', '661', '662', '663', '664', '665', '6660', '6661', '6662', '6663', '6664', '6665', '6666', '6667', '6668', '6669', '667', '668', '669', '6901', '6902', '6903', '6904', '6905', '6906', '691', '692', '693', '694', '695', '696', '697', '698', '69900', '69901', '69902', '69903', '69904', '69905', '69906', '69907', '69908', '69909', '6991', '69920', '69921', '69922', '69923', '69924', '69925', '69926', '69927', '69928', '69929', '6993', '6994', '6995', '69960', '69961', '69962', '69963', '69964', '69965', '69966', '69967', '69968', '69969', '6997', '6998', '6999', '720', '721', '7220', '7221', '7222', '7223', '7224', '7225', '7226', '7227', '7228', '7229', '723', '724', '725', '726', '7271', '7272', '7273', '7274', '7275', '7276', '7277', '7278', '7279', '7280', '7281', '7282', '7283', '7284', '7285', '7286', '7287', '7288', '7289', '7290', '7291', '780', '781', '782', '7830', '7831', '7832', '7833', '7834', '7835', '7836', '7837', '7838', '7839', '784', '785', '7860', '7861', '7862', '7863', '7864', '7865', '7866', '7867', '7868', '7869', '7870', '7871', '7872', '7873', '7874', '7875', '7876', '7877', '7878', '7879', '788', '789', '790', '791', '792', '793', '794', '7950', '7951', '7952', '7953', '7954', '7955', '7956', '7957', '7958', '7959', '796', '797', '798', '799', '880', '8811', '8818', '882', '8830', '8831', '8832', '8833', '8834', '8835', '8836', '8837', '8838', '8839', '8841', '8842', '8844', '885', '886', '887', '888', '889');
			var tablicaBad = new Array('606123123','667665667','697111111','602555555','603111111','606555555','505555555','603555555','666111111','608100100');
			var tKom = false;
			for (var n = 0; n < tablica.length; ++n){
				if(document.recordForm.client_mobile.value.substring(0,tablica[n].length) == tablica[n]){
					tKom = true;
				}
			}
			for (var m = 0; m < tablicaBad.length; ++m){
				if(document.recordForm.client_mobile.value.substring(0,tablicaBad[m].length) == tablicaBad[m]){
					tKom = false;
				}
			}			
		}
		if (wyn == null || tKom == false) {
			validate=false;
			if (object) {object.style.color='#ff0000';}

		}
		else {
			if (object) {object.style.color='#97969B';}
		}

//3. Telefon stacjonarny
reg = /^[0-9]{10}$/;
wyn = (document.recordForm.client_phone.value.match(reg));
var object = document.getElementById('label6');
if (wyn == null && document.recordForm.client_phone.value != '') {
	validate=false;
	if (object) {object.style.color='#ff0000';}
}
else {
	if (object) {object.style.color='#97969B';}
}


//4. Email
reg = /^[a-zA-Z0-9±ćęłńó¶żĽˇĆĘŁŃÓ¦Ż¬._-]{1,30}@[a-zA-Z0-9±ćęłńó¶żĽˇĆĘŁŃÓ¦Ż¬]+(\.[a-zA-Z0-9±ćęłńó¶żĽˇĆĘŁŃÓ¦Ż¬]+)+$/;
wyn = document.recordForm.client_email.value.match(reg);
var object = document.getElementById('label5');
if ((wyn == null) || (!invalid_mail.in_array_invalid(document.recordForm.client_email.value))) {
	validate=false;
	if (object) {object.style.color='#ff0000';}
}
else {
	if (object) {object.style.color='#97969B';}
}



//5. Przetwarzanie danych osobowych
var object = document.getElementById('agreeCh');
var object2 = document.getElementById('l6');
if (document.recordForm.agree_data_processing.checked !== true) {
	validate=false;
	if (object) {object.style.color='#ff0000';};
	if (object2) {object2.style.color='#ff0000';};
}
else {
	if (object) {object.style.color='#97969B';};
	if (object2) {object2.style.color='#97969B';};	
}

return validate;
}




function validateFormStatic3(AForm) {
	validate=true;

	//1. Imię
	reg = /^[a-zA-Z±ćęłńó¶żĽˇĆĘŁŃÓ¦Ż¬ -]{2,20}$/;
	wyn = document.recordForm.client_name.value.match(reg);
	var object = document.getElementById('label1');

	var tablicaImNaz = new Array('dupa','fuck','chuj','nie podam','sdf','asd','qwe');
	var tIm = true;
	var imF = new String(document.recordForm.client_name.value);
	
	for (var k = 0; k < tablicaImNaz.length; k++){
		if(document.recordForm.client_name.value.indexOf(tablicaImNaz[k]) != -1){
			tIm = false;
		}
	}

	for (var k = 2; k < imF.length; k++){
		if((imF.charAt(k) == imF.charAt(k-1)) && (imF.charAt(k) == imF.charAt(k-2))) {
			tIm = false;
		}
	}		

	if ((wyn == null) || (tIm == false)) {
		validate=false;
		if (object) {object.style.color='#ff0000';}
	} else {
		if (object) {object.style.color='#97969B';}
	}


	//2. Nazwisko
	reg = /^[a-zA-Z±ćęłńó¶żĽˇĆĘŁŃÓ¦Ż¬ -]{2,30}$/;
	wyn = document.recordForm.client_surname.value.match(reg);
	var object = document.getElementById('label2');
	var nazF = document.recordForm.client_surname.value;
	var tNaz = true;

	for (var k = 0; k < tablicaImNaz.length; k++){
		if(document.recordForm.client_surname.value.indexOf(tablicaImNaz[k]) != -1){
			tNaz = false;
		}
	}

	for (var k = 2; k < nazF.length; k++){
		if((nazF.charAt(k) == nazF.charAt(k-1)) && (nazF.charAt(k) == nazF.charAt(k-2))) 
			tNaz = false;
	}	

	if ((wyn == null) || (document.recordForm.client_name.value == document.recordForm.client_surname.value) || (tNaz == false)) {
		validate=false;
		if (object) {object.style.color='#ff0000';}
	} else {
		if (object) {object.style.color='#97969B';}
	}



		//3. Telefon 
		reg = /^[0-9]{9}$/;
		wyn = (document.recordForm.client_mobile.value.match(reg));
		var object = document.getElementById('label4');
		var tKom = true;
		var telKom = true;
		if(telKom) {
			var tablica = new Array('50', '51', '53', '600', '601', '602', '603', '604', '605', '606', '607', '608', '609', '660', '661', '662', '663', '664', '665', '6660', '6661', '6662', '6663', '6664', '6665', '6666', '6667', '6668', '6669', '667', '668', '669', '6901', '6902', '6903', '6904', '6905', '6906', '691', '692', '693', '694', '695', '696', '697', '698', '69900', '69901', '69902', '69903', '69904', '69905', '69906', '69907', '69908', '69909', '6991', '69920', '69921', '69922', '69923', '69924', '69925', '69926', '69927', '69928', '69929', '6993', '6994', '6995', '69960', '69961', '69962', '69963', '69964', '69965', '69966', '69967', '69968', '69969', '6997', '6998', '6999', '720', '721', '7220', '7221', '7222', '7223', '7224', '7225', '7226', '7227', '7228', '7229', '723', '724', '725', '726', '7271', '7272', '7273', '7274', '7275', '7276', '7277', '7278', '7279', '7280', '7281', '7282', '7283', '7284', '7285', '7286', '7287', '7288', '7289', '7290', '7291', '780', '781', '782', '7830', '7831', '7832', '7833', '7834', '7835', '7836', '7837', '7838', '7839', '784', '785', '7860', '7861', '7862', '7863', '7864', '7865', '7866', '7867', '7868', '7869', '7870', '7871', '7872', '7873', '7874', '7875', '7876', '7877', '7878', '7879', '788', '789', '790', '791', '792', '793', '794', '7950', '7951', '7952', '7953', '7954', '7955', '7956', '7957', '7958', '7959', '796', '797', '798', '799', '880', '8811', '8818', '882', '8830', '8831', '8832', '8833', '8834', '8835', '8836', '8837', '8838', '8839', '8841', '8842', '8844', '885', '886', '887', '888', '889');
			var tablicaBad = new Array('606123123','667665667','697111111','602555555','603111111','606555555','505555555','603555555','666111111','608100100');
			var tKom = false;
			for (var n = 0; n < tablica.length; ++n){
				if(document.recordForm.client_mobile.value.substring(0,tablica[n].length) == tablica[n]){
					tKom = true;
				}
			}
			for (var m = 0; m < tablicaBad.length; ++m){
				if(document.recordForm.client_mobile.value.substring(0,tablicaBad[m].length) == tablicaBad[m]){
					tKom = false;
				}
			}			
		}
		if (wyn == null || tKom == false) {
			validate=false;
			if (object) {object.style.color='#ff0000';}

		}
		else {
			if (object) {object.style.color='#97969B';}
		}

//3. Telefon stacjonarny
reg = /^[0-9]{9}$/;
wyn = (document.recordForm.client_phone.value.match(reg));
var object = document.getElementById('label6');
if (wyn == null && document.recordForm.client_phone.value != '') {
	validate=false;
	if (object) {object.style.color='#ff0000';}
}
else {
	if (object) {object.style.color='#97969B';}
}


//4. Email
reg = /^[a-zA-Z0-9±ćęłńó¶żĽˇĆĘŁŃÓ¦Ż¬._-]{1,30}@[a-zA-Z0-9±ćęłńó¶żĽˇĆĘŁŃÓ¦Ż¬]+(\.[a-zA-Z0-9±ćęłńó¶żĽˇĆĘŁŃÓ¦Ż¬]+)+$/;
wyn = document.recordForm.client_email.value.match(reg);
var object = document.getElementById('label5');
if ((wyn == null) || (!invalid_mail.in_array_invalid(document.recordForm.client_email.value))) {
	validate=false;
	if (object) {object.style.color='#ff0000';}
}
else {
	if (object) {object.style.color='#97969B';}
}



//5. Przetwarzanie danych osobowych
var object = document.getElementById('agreeCh');
var object2 = document.getElementById('l6');
if (document.recordForm.agree_data_processing.checked !== true) {
	validate=false;
	if (object) {object.style.color='#ff0000';};
	if (object2) {object2.style.color='#ff0000';};
}
else {
	if (object) {object.style.color='#97969B';};
	if (object2) {object2.style.color='#97969B';};	
}

return validate;
}




function dymek(t, a){
	if(t == "aaa"){
	var text = "<div style='width:557px; height:10px;background:url(../../_iMg/site/formularze3krokowe/do-top2.gif) no-repeat top center;margin:0;padding:0;position:relative;top:3px;'> </div><div style='width:527px;background:url(../../_iMg/site/formularze3krokowe/backg2.gif) repeat-y top center;color:#66646b;padding:5px 15px;margin:0;font-size:9px;text-align:left;font-family:sans-serif;'>1. Dane osobowe Użytkownika mog± być przetwarzane zgodnie z ustaw± z dnia 29 sierpnia 1997 r. o ochronie danych osobowych (tj. Dz.U.z 2002 roku, Nr 101, poz. 926 ze zm.), wył±cznie po wyrażeniu przez Użytkownika zgody na takie przetwarzanie i wykorzystanie. Udzielenie zgody następuje poprzez zaznaczenie odpowiedniego okna w formularzu rejestracyjnym.<br />2. Zgoda Użytkownika na przetwarzanie danych osobowych i wykorzystywanie udzielana jest dla wewnętrznych celów statystycznych i marketingowych na rzecz Open Finance SA oraz jednostek powi±zanych Getin Noble Bank SA, Noble Funds SA, Tax Care SA oraz Home Broker SA.<br />3. Administratorem danych osobowych Użytkownika jest Open Finance SA, ul. Domaniewska 39, 02-672 Warszawa.<br />4. Każdy Użytkownik, którego dane osobowe s± przetwarzane ma prawo:<br />a) wgl±du do swoich danych, ich uzupełnienia, uaktualnienia, sprostowania, czasowego lub stałego wstrzymania ich przetwarzania lub ich usunięcia, Skorzystanie z prawa uzupełnienia, uaktualnienia, sprostowania, czasowego lub stałego wstrzymania ich przetwarzania oraz domagania się usunięcia danych z systemu serwisu jest realizowane poprzez wysłanie do administratora danych (kontakt@open.pl) poczt± elektroniczn± stosownego ż±dania wraz z podaniem imienia i nazwiska Użytkownika. Skorzystanie z prawa domagania się usunięcia danych z systemu serwisu jest równoznaczne z wyrejestrowaniem się Użytkownika z systemu serwisu. Administrator może jednak pozostawić w zbiorze imię lub imiona i nazwisko Użytkownika oraz numer PESEL lub adres wył±cznie w celu uniknięcia ponownego wykorzystania danych tej osoby, w celach objętych sprzeciwem.<br />b) uzyskać na pi¶mie w terminie 30 dni, w powszechnie zrozumiałej formie, tre¶ć tych danych oraz następuj±cych informacji:<br />- daty pierwszego wprowadzenia danych tego Użytkownika,<br />- Ľródła pochodzenia danych Użytkownika,<br />- w jaki sposób dane s± udostępniane oraz jakim uprawnionym podmiotom, <br />- kiedy i w jakim zakresie dane zostały udostępnione uprawnionym podmiotom.</div><div style='width:557px; height:16px;background:url(../../_iMg/site/formularze3krokowe/do-bottom.gif) no-repeat bottom center;margin:0;padding:0;'>  </div>";
	var v = 330;
	var h = 148;
	a.onmouseover = getPosition;
	a.onmousemove = getPosition;
	a.onmouseout = hideNotes;
	}else{
	var text = "<div style='width:557px; height:10px;background:url(../../_iMg/site/formularze3krokowe/do-top2.gif) no-repeat top center;margin:0;padding:0;position:relative;top:3px;'> </div><div style='width:527px;background:url(../../_iMg/site/formularze3krokowe/backg2.gif) repeat-y top center;color:#66646b;padding:5px 15px;font-size:9px;text-align:left;font-family:sans-serif;'>Użytkownik przez zaznaczenie odpowiedniego okna w formularzu rejestracyjnym, może odmówić lub wyrazić zgodę na otrzymywanie informacji handlowej drog± elektroniczn±, zgodnie z ustaw± z dnia 26.08.2002 r. o ¶wiadczeniu usług drog± elektroniczn± (Dz.U. z 2002 roku, Nr 144, poz. 1204). W przypadku, gdy Użytkownik wyraził zgodę na otrzymywanie informacji handlowej drog± elektroniczn±, ma on prawo w każdym czasie ż±dać usunięcia niniejszej zgody przez administratora danych. Skorzystanie z prawa domagania się usunięcia zgody na otrzymanie informacji handlowej jest realizowane poprzez wysłanie do administratora danych (kontakt@open.pl) poczt± elektroniczn± stosownego ż±dania wraz z podaniem imienia i nazwiska użytkownika.</div><div style='width:557px; height:16px;background:url(../../_iMg/site/formularze3krokowe/zgod-bottom.gif) no-repeat bottom center;margin:0;padding:0;'> </div>";	
	var v = 330;
	var h = 148;	
	a.onmouseover = getPosition2;
	a.onmousemove = getPosition2;
	a.onmouseout = hideNotes;
	
	}
	var ancor = a;
	var notes = document.getElementById("dymekDiv");

	if(notes==null){
		notes = document.createElement("div");
		notes.id = "dymekDiv";
		notes.style.display = "none";
		document.body.appendChild(notes);
	}

	function getPosition(e){
		var IE = document.all?true:false				
	
	  	if (IE) {
    		mouseX = event.clientX + document.documentElement.scrollLeft;
		    mouseY = event.clientY + document.documentElement.scrollTop;
	  	}
	    else {
    		mouseX = e.pageX;
    		mouseY = e.pageY;
	  	}
	
   	if(navigator.appVersion.indexOf('MSIE 6') >= 0){
   		showNotesIe(mouseX, mouseY, 305, 148);}
   	else{
		showNotesBrows(mouseX, mouseY, 305, 148);}

	}
	
	function getPosition2(e){
		var IE = document.all?true:false				
	
	  	if (IE) {
    		mouseX = event.clientX + document.documentElement.scrollLeft;
		    mouseY = event.clientY + document.documentElement.scrollTop;
	  	}
	    else {
    		mouseX = e.pageX;
    		mouseY = e.pageY;
	  	}
	
   	if(navigator.appVersion.indexOf('MSIE 6') >= 0){
   		showNotesIe(mouseX, mouseY, 125, 240);}
   	else{
		showNotesBrows(mouseX, mouseY, 125, 240);}

	}
	
	function showNotesIe(x,y, v, h){
		var scrOfX = 0, scrOfY = 0;
  		if( typeof( window.pageYOffset ) == 'number' ) {
   		scrOfY = window.pageYOffset;
    		scrOfX = window.pageXOffset;
    		} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
   		scrOfY = document.body.scrollTop;
                scrOfX = document.body.scrollLeft;
                } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
                scrOfY = document.documentElement.scrollTop;
                scrOfX = document.documentElement.scrollLeft;
       		}
    	
	       var myWidth = 0, myHeight = 0;
  	       if( typeof( window.innerWidth ) == 'number' ) {
               myWidth = window.innerWidth;
               myHeight = window.innerHeight;
               } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
               myWidth = document.documentElement.clientWidth;
               myHeight = document.documentElement.clientHeight;
               } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
               myWidth = document.body.clientWidth;
               myHeight = document.body.clientHeight;
   	       }
	
		var newX = x + scrOfX;
		var newY = y + scrOfY;
		var ponizejX = myWidth - notes.offsetWidth;
		var ponizejY = myHeight - notes.offsetHeight;		

               /* if(x > ponizejX){
                newX = x + scrOfX - notes.offsetWidth;
                }

		if(y > ponizejY){
		newY = y + scrOfY - notes.offsetHeight;
		}*/

		showNotes (newX, newY, v, h);
	}

	function showNotesBrows(x,y,v,h){
		
		/* Tu znalazlem : http://www.howtocreate.co.uk/tutorials/javascript/browserwindow */
		mastaHakaPoprawka = 10;
		viewWidth = document.documentElement.clientWidth; 
		viewHeight = document.documentElement.clientHeight;
		noteWidth = notes.offsetWidth;
		noteHeight = notes.offsetHeight;			
		diffX = x + noteWidth - document.documentElement.scrollLeft - viewWidth + mastaHakaPoprawka; 
		diffY = y + noteHeight - document.documentElement.scrollTop - viewHeight + mastaHakaPoprawka; 
		newX = x;
		newY = y;
		
		/*if (diffX > 0) {
			newX -= diffX;
		}
		
		if (diffY > 0) {
			newY -= diffY;
		}
		*/
		showNotes (newX, newY, v, h);
	}
	
	function showNotes(x,y,v,h){
		notes.style.display = "block";
		notes.style.position = "absolute";
		notes.style.top = ( y - v ) + "px";
		notes.style.left = ( x - h ) + "px";
		notes.style.zIndex = 1000;
		notes.innerHTML = text;
	}
	
	function hideNotes(){
		notes.style.display = "none";
		notes.innerHTML = "";
	}
}












