// ====================================================================================
//
// Created by SDPsM — http://alest.cc
//
// ====================================================================================

eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(1(){$("8[0^=a]").7(1(){$("4[0="+5.0.2("3","6")+"]").9()},1(){$("4[0="+5.0.2("3","6")+"]").b()})})',12,12,'id|function|replace|Parent|div|this|Child|hover|li|show|mainMenuParent|hide'.split('|'),0,{}))

// ====================================================================================

function popupWin(url, width, height, additional) {
	additional = additional || null;
	var left       = screen.width / 2 - width / 2;
	var top        = screen.height / 2 - height / 2;
	window.open(url, '_blank', 'status=no,dependent=yes,modal=yes,height=' + height + ',width=' + width + ',left=' + left + ',top=' + top + additional);
	return;
}

function showPoll() {
	popupWin('/poll.php', 370, (navigator.userAgent.match("Gecko") ? 390 : 430), ',scrollbars=1');
}

function showPoll_song() {
	popupWin('/poll_song.php', 440, (navigator.userAgent.match("Gecko") ? 390 : 430), ',scrollbars=1');
}

function inputLimit(field, quantity) {
	if (field.value.length > quantity) {
		field.value = field.value.substring(0, quantity + 1);
	}
}

function createHttpRequest() {
	req = false;
	if(window.XMLHttpRequest) {
		try {
			req = new XMLHttpRequest();
		} catch(e) {
			req = false;
		}
	} else if(window.ActiveXObject) {
		try {
			req = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				req = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				req = false;
			}
		}
	}
	return req;
}