window.onload = function() {
	if(detectOldIE()) {
		pngFix();
	}
}

function detectOldIE() {
	var oldIE = false;
	if(navigator.userAgent.indexOf("MSIE") != -1) {
		var pattern = /MSIE (\d+)\.\d+/i;
		var version = pattern.exec(navigator.userAgent);
		if(version[1] < 7) {
			oldIE = true;
		}
	}
	return oldIE;
}

function pngFix() {
	document.styleSheets[0].addRule('div#popup', 'behavior: url(js/iepngfix.htc)');
}

function popup(lang) {
	usrwindow = window.open('popup.html?lang=' + lang, 'drbatz', 'top=0,left=0,resizable=no,hotkeys=yes,width=1000,height=750');   			
	usrwindow.moveTo(parseInt((window.screen.width-1000)/2),parseInt((window.screen.height-750)/2));
	if (parseInt(navigator.appVersion) >= 4) { usrwindow.focus(); }	
}
