function SetCookie(cookie, str) {
	document.cookie = cookie+"="+encodeURIComponent(str)+"; path=/; expires=Fri, 01-Jan-2010 00:00:00 GMT";
}

function GetCookie(cookie) {
	try {		var i1 = document.cookie.indexOf(cookie+"=");
		if(i1<0) return "";
		i1 += cookie.length+1;
		var i2 = document.cookie.indexOf(";", i1);
		if(i2<0) i2 = document.cookie.length;
		return decodeURIComponent(document.cookie.substring(i1, i2));
	} catch(e) {
		//error decoding
	}
}

function popup1(url, width, height) {
  var left = (screen.width/2)-(width/2);
  var top = (screen.height/2)-(height/2);
  window.open(url, 'popup', 'width=' + width + ',height=' + height + ',top='+top+',left='+left +'toolbar=no,status=no,scrollbars=yes,resizable=no,menubar=no,location=no,direction=no');
}
