// JavaScript Document
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

function iecompattest() {
	return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function loadwindow(url,width,height) {
	if (!ie5&&!ns6) {
		window.open(url,"","width=width,height=height,scrollbars=1")
	} else {
		document.getElementById("dwindow").style.display=''
		document.getElementById("dwindow").style.width=width+"px"
		document.getElementById("dwindow").style.height=height+"px"
		document.getElementById("dwindow").style.left=ns6? window.pageYOffset*1+(screen.width-width)/2+"px" : iecompattest().scrollTop*1+(screen.width-width)/2+"px"
		document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+(screen.height-height)/3+"px" : iecompattest().scrollTop*1+(screen.height-height)/3+"px"
		document.getElementById("cframe").src=url
	}
}

function closeit() {
	document.getElementById("dwindow").style.display="none"
}

function setCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function getCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for (var i=0;i<ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	setCookie(name,"",-1);
}

//eraseCookie('FFNewsSubscribe');
//document.write(getCookie('FFNewsSubscribe'));
