
function init() 
{
	if (self.parent.frames.length != 0 && self.parent!=self) self.parent.location = document.location;
	if (document.getElementById) document.onkeydown = myonkeydown;
}

function myonkeydown(e) 
{
	var code;
	if (!e) var e = window.event;
	if (e.keyCode) code = e.keyCode;
	else if (e.which) code = e.which;

	if ((code == 37) && (e.ctrlKey == true)) 
	{
		var destination = document.getElementById('previous_page');
		if (destination) location.href = destination.href;
	}
	if ((code == 39) && (e.ctrlKey == true)) 
	{
		var destination = document.getElementById('next_page');
		if (destination) location.href = destination.href;
	}
}

function setCookie(name, value) 
{
	var expires=3600*24*365;
	var path="/";
	var todaydate=new Date();

	var expdate=new Date(todaydate.getTime()+expires*1000);	
        document.cookie = name + "=" + escape(value) +
                "; expires=" + expdate.toGMTString()  +
                ((path) ? "; path=" + path : "");
}

function hideSection(cookiename, id)
{
 setCookie(cookiename, "1"); 
 var el = document.getElementById(id);
 if (el && el.style) el.style.display="none"; 
 return false;
}
