/* ---------------------------- */
/* XMLHTTPRequest Enable */
/* ---------------------------- */
function createObject() {
var request_type;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
request_type = new ActiveXObject("Microsoft.XMLHTTP");
}else{
request_type = new XMLHttpRequest();
}
return request_type;
}

var http = createObject();

/* -------------------------- */
/* szavazo kod */
/* -------------------------- */

function reply() {
//magasságok beállítása: 
	var lcm = $("#cont_left").height();
	var rcm = $("#cont_right").height();
	if (lcm > rcm) {
	$("#cont_right").css("height", $("#cont_left").height());
		}
	else if (rcm > lcm) {
		$("#cont_left").css("height", $("#cont_right").height());
	
	}
var nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'replyserver.php?k='+nocache);
http.onreadystatechange = Reply_re;
http.send(null);
}
function Reply_re() {
if(http.readyState == 4){
var respon = http.responseText;
if(respon == "fail"){
//none
}
else {
var result = respon.split("*");

$.gritter.add({
				// (string | mandatory) the heading of the notification
				title: '<a style="color:#fff;" href="cikkek/'+result[4]+'/'+result[1]+'">'+result[2]+'</a>',
				// (string | mandatory) the text inside the notification
				text: 'Világszám hírajánló-buborék: Olvasd tovább a hírt! ',
				// (string | optional) the image to display on the left
				image: 'http://vilagszam.hu/hirimages/'+result[1]+'/galeria/slider/slider.jpg',
				// (bool | optional) if you want it to fade out on its own or just sit there
				sticky: false, 
				// (int | optional) the time you want it to be alive for before fading out
				time: ''
				
			});

			
}
}
}



