function isExplorer() {
	var browser = navigator.appName;

	if (browser.indexOf('Microsoft') != -1) {
		return true;
	}
	
	return false;
}

function isInFrame() {
	if (top === self) {
		return false;
	}
	
	return true;
}

function setCookie(c_name, value, expiredays, path) {
	var exdate = new Date();
	exdate.setDate(exdate.getDate() + expiredays);
	document.cookie = c_name + "=" + escape(value) + ";path=" + (path == null ? "/" : path) +
		((expiredays==null || typeof(expiredays) == "undefined") ? "" : ";expires=" + exdate.toUTCString());
}

function getCookie(c_name) {
	if (document.cookie.length > 0) {
	  c_start=document.cookie.indexOf(c_name + "=");
	  if (c_start != -1) {
	    c_start = c_start + c_name.length + 1;
	    c_end = document.cookie.indexOf(";", c_start);
	    if (c_end == -1) {
	    	c_end = document.cookie.length;
	    }
	    return unescape(document.cookie.substring(c_start, c_end));
	  }
	}
	
	return "";
}

function isLeapYear(year) {
	return (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
}

function loadNoHeaderCss() {
	var cssRef = document.createElement("link");
	cssRef.setAttribute("rel", "stylesheet");
	cssRef.setAttribute("type", "text/css");
	cssRef.setAttribute("href", "/tescoutazas-theme/css/no-header.css");
	document.getElementsByTagName("head")[0].appendChild(cssRef);
}

function loadTozsdeforumJs() {
	jQuery.getScript("http://tozsdeforum.zebe.hu/js/setiframeheight.js");
}

