msie_50 = ( navigator.appName.indexOf('Explorer')!=-1 && navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE")+5,3) >= 5.0 && navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE")+5,3) < 5.5 ) ? true : false;
msie_55 = ( navigator.appName.indexOf('Explorer')!=-1 && navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE")+5,3) >= 5.5 && navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE")+5,3) < 6.0 ) ? true : false;
msie_50_and_greater = ( navigator.appName.indexOf('Explorer')!=-1 && navigator.appVersion.substr(navigator.appVersion.indexOf("MSIE")+5,3) >= 5.0) ? true : false;
gecko_based = (navigator.userAgent.indexOf('Gecko')!=-1)?true:false;
netscape_6_series = ( navigator.appName.indexOf('Netscape')!=-1 && navigator.userAgent.indexOf('Netscape6')!=-1 ) ? true : false;
opera = (navigator.userAgent.indexOf('Opera') != -1)?true:false;

/*
*	Funkcja weryfikująca poprawność danych numerycznych w polu input
*/

function verifyNumeric(/*input object*/object, /*string*/errorMsg) {
	var rx=new RegExp("^[0-9]*([\\.,]*[0-9]+)?$");
	test = rx.test(object.value);
	if (!test) {
		alert(errorMsg);
		object.select();
		return false;
	}
}

function menuRollover(/*object*/cellObject,/*string*/color) {
	
	cellObject.style.color = color;
	if (msie_50 == true || msie_55 == true) {
		cellObject.style.cursor = 'hand';
	} else {
		cellObject.style.cursor = 'pointer';
	}
} 

function menuRollout(/*object*/cellObject,/*string*/color) {
	cellObject.style.color = color;
}

function menuOnClick(/*string*/ href, /*string*/ target, /*string*/ popup_params) {
	if (target == '_blank' || target == '_BLANK') {
		window.open(href,'',popup_params);
	} else if (target == '') {
		window.location = href;
	} else {
		eval(target + '.location = ' + href);
	}
}


/*Funkcja do menu InformacjeDla*/
	function menuInformacjeRollover() {
		cellObject = arguments[0];
		href = arguments[1];
		target = arguments[2];
		popupparams = arguments[3];
		
		cellObject.style.backgroundColor = '#F3FAE5';
		if (msie_50 == true || msie_55 == true) {
			cellObject.style.cursor = 'hand';
		} else {
			cellObject.style.cursor = 'pointer';
		}
		cellObject.onclick = function() {
			if(typeof(target) == "undefined") {
				window.location = href;
			} else {
				window.open(href,target,popupparams);
			}
		}
	}
	
	function menuInformacjeRollout(cellObject) {
		cellObject.style.backgroundColor = '#F3FAE5';
	}

/*Subskrypcja*/
/*TEST!!!*/
/*function dodaj(){
	window.open('e_subskrypcja_dodano.htm','','width=250,height=150,left=150,top=150');
}

*/
function dodaj(){
	okno = window.open('','','width=250,height=150,left=150,top=150');
	with(document.subform) {
		jump=action+'?job=dodaj_email&email='+(email.value)+'&lista='+(lista.value)+'&redirect_brak_emaila='+(redirect_brak_emaila.value)+'&redirect_email_niepraw='+(redirect_email_niepraw.value)+'&redirect_email_juz_jest='+(redirect_email_juz_jest.value)+'&redirect_dodano='+(redirect_dodano.value)+'&redirect_usunieto='+(redirect_usunieto.value)+'&redirect_brak_w_bazie='+(redirect_brak_w_bazie.value)
	}
	okno.location = jump;
}
function usun(){
	okno = window.open('','','width=250,height=150,left=150,top=150');
	with(document.subform) {
		jump=action+'?job=usun_email&email='+(email.value)+'&lista='+(lista.value)+'&redirect_brak_emaila='+(redirect_brak_emaila.value)+'&redirect_email_niepraw='+(redirect_email_niepraw.value)+'&redirect_email_juz_jest='+(redirect_email_juz_jest.value)+'&redirect_dodano='+(redirect_dodano.value)+'&redirect_usunieto='+(redirect_usunieto.value)+'&redirect_brak_w_bazie='+(redirect_brak_w_bazie.value)
	}
	
	okno.location = jump;
}

/*do subskrypcji*/
function submitSubscription(formObject) {
	dodaj();
	return false;
}

function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}
