obrazki = new Array();
obrazki[0] = new Image();
obrazki[0].src = "../gfx/minus.gif";
obrazki[1] = new Image();
obrazki[1].src = "../gfx/plus.gif";
var AT = '&#64;';
function putEml(usr,domain,txt) {
	document.write('<a hr');
	document.write('ef=\'&#109;&#97;&#105;&#108;&#116;&#111;&#58;'+usr+'&#64;'+domain+'\' class=\'normalLink\'>');
	document.write(txt+'<\/a>');
}
function putEmlClass(usr,domain,txt,add) {
	document.write('<a hr');
	document.write('ef=\'&#109;&#97;&#105;&#108;&#116;&#111;&#58;'+usr+'&#64;'+domain+'\' '+add+' class=\'normalLink\'>');
	document.write(txt+'<\/a>');
}
function putFullEml(usr,domain) {
	document.write('<a hr');
	document.write('ef=\'&#109;&#97;&#105;&#108;&#116;&#111;&#58;'+usr+'&#64;'+domain+'\' class=\'normalLink\'>');
	document.write(usr+'&#64;'+domain+'<\/a>');
}
function putFullEmlStyle(usr,domain,style) {
	document.write('<a hr');
	document.write('ef=\'&#109;&#97;&#105;&#108;&#116;&#111;&#58;'+usr+'&#64;'+domain+'\' class=\''+style+'\'>');
	document.write(usr+'&#64;'+domain+'<\/a>');
}
function openPicTempl(url,h,w) { window.open("../html/"+url,'','toolbar=no,menubar=no,location=no,personalbar=no,status=no,resizable=yes,scrollbars=no,directories=no,copyhistories=no,height='+h+',width='+w+',left=10,top=10'); }
function openpicDF() { openPicTempl("openpicDF.htm",460,580); }
function openpicMP() { openPicTempl("openpicMP.htm",460,580); }
function openpicMB() { openPicTempl("openpicMB.htm",460,580); }
function openpicEW() { openPicTempl("openpicEW.htm",460,580); }
function openpicPC() { openPicTempl("openpicPC.htm",460,580); }
function openpicOP() { openPicTempl("openpicOP.htm",580,750); }
function openpicGU() { openPicTempl("openpicGU.htm",580,750); }
function openpicDB() { openPicTempl("openpicDB.htm",580,750); }
function openpicOZ() { openPicTempl("openpicOZ.htm",480,750); }
function openpicOB() { openPicTempl("openpicOB.htm",480,650); }
function openpicZW() {}
function openpicRP() { openpicRAP(); }
function openpicRAP() { openPicTempl("openpicRAP.htm",500,700); }
function openpicRAP2() { openPicTempl("openpicRAP2.htm",500,700); }
function openpicRAP3() { openPicTempl("openpicRAP3.htm",500,700); }
function openpicRAP4() { openPicTempl("openpicRAP4.htm",500,700); }
function openpic2() { openPicTempl("openpic2.htm",300,440); }
function helpAR2() { openPicTempl("get_acrobat_toread.htm",170,500); }
function addEmail() {
	var confirmed = document.getElementById('ZGADZAMSIE').checked;
	if (confirmed) {
		var noth = window.open('../html/addmail.php?EMAIL='+informuj.EMAIL.value,'krowa_addemail_win','menubar=no, scrollbars=yes, resizable=yes, status=no, width=500, height=300, top=0, left=0'); informuj.EMAIL.value = "";
	} else { alert('Aby dodać swój email do naszej bazy musisz wyrazić swoją zgodę z polityką prywatności publikowaną w naszym serwisie. Zaznacz pole wyboru u dołu formularza w celu wyrażenia zgody.'); }
}
function sendIdea() {

	if (document.getElementById('POMYSL').value != "") 	{
		var noth = window.open('../html/sendIdea.php','krowa_sendIdea_win','menubar=no, scrollbars=yes, resizable=yes, status=no, width=500, height=300, top=0, left=0');
	} else { alert('Opisz swój pomysł w polu obok.'); }
}
function sendSuggestion(proj) {
	if (document.getElementById('SUGGESTION').value != "") {
		var noth = window.open('../html/sendSuggestion.php?proj='+proj,'krowa_sendIdea_win','menubar=no, scrollbars=yes, resizable=yes, status=no, width=500, height=300, top=0, left=0');
	} else { alert('Opisz swój pomysł w polu obok.'); }
}
function createAccount() {
	var sText = document.getElementById('FAKTURA').value;
	if (!isNIPFound(sText)) {
		document.getElementById('FAKTURA').focus();
		return false;
	}

	var confirmed = document.getElementById('ZGADZAMSIE_CREATE').checked;
	if (confirmed) {
		return true;
	} else {
		return confirm('Jeśli nie zgodzisz się z polityką prywatności nie będziesz otrzymywał powiadomień o aktualizacjach programu, darmowych dodatkach, aktualnościach. Kliknij "OK" aby kontynuować lub "Anuluj" by powrócić i zaznaczyć odpowiednie pole wyboru w celu wyrażenia zgody.');
	}
}
function zestaw() { var nothZestaw=window.open('../html/zestaw.php','krowa_zestaw_win','menubar=no,scrollbars=yes,resizable=yes,status=no,width=800,height=400,top=0,left=0'); }
function openWin(context) { var noth=window.open('../html/'+context+'.php?context='+context,'DF60_'+context+'_win','menubar=no,scrollbars=yes,resizable=yes,status=no,width=500,height=320,top=0,left=0'); }
function openWinTempl(url,scrl,h,w) { window.open(url,'','toolbar=no,menubar=no,location=no,personalbar=no,status=no,resizable=yes,scrollbars='+scrl+',directories=no,copyhistories=no,height='+h+',width='+w+',left=10,top=10'); }
function recommendation(context) { openWinTempl('recommendation.php?ID='+context,'yes',400,500); }
function polityka() { openWinTempl('polityka.php','yes',400,300); }
function helpAR() { openWinTempl('get_acrobat.htm','no',200,500); }
function openShopHelp() { openWinTempl('shopHelp.html','yes',480,680); }
function download(str) { openWinTempl(str,'yes',100,100); }
function instrukcja(str) { openWinTempl(str,'yes',600,500); }
function pdf(str) { openWinTempl(str,'yes',600,500); }
function isNIPFound(sText) {
	sText.replace(" ","");
	var nLen = sText.length;
	var bFound = false;

	if (nLen > 0) {
		var nCounter = 0;
		for (a = 0; a < nLen; a++) {
			if ((sText.charAt(a) >= '0') && (sText.charAt(a) <= '9')) { nCounter++; }
			if (nCounter == 10) { bFound = true; break; }
		}

		if (!bFound) {
			return confirm("Prawdopodobnie brakuje numeru NIP w danych do faktury. Czy podałeś numer NIP prawidłowo?");
		}
	}
	return true;
}
function menuOn(id,v) {
	try {
		document.getElementById(id).className = "menuOn_"+v;
	} catch(e) { }
}
function menuOff(id,v) {
	try {
		document.getElementById(id).className = "menuOff_"+v;
	} catch(e) { }
}
function showHideDiv(divId) {
	try {
		if(document.getElementById(divId).style.display=="none") {
			document.getElementById(divId).style.display = "block";
		} else {
			document.getElementById(divId).style.display = "none";
		}
	} catch(e) {}
}
