// JavaScript Document

function openFullWindow(url,name) {
	name = 'w' + Math.round(Math.random()*(1000000000));
	w = screen.width - 10;
	h = screen.height - 40;
	window.open(url,name,'toolbar=no,menubar=no,resizable=yes,scrollbars=no,left=0,top=0,width=' + w + ',height=' + h);
}

// THIS FUNCTION RESIZES
// THE VIEWPORT SO THAT
// THE FULLPAGE IS USED,
// AND THE CONTENT IS SCROLLABLE
// WITH HEADER FOOTERS DISPLAYED AT ALL TIME
function sizeViewport(myObj,mySize) {
myObject = document.getElementById(myObj);
// THIS BIT DETECTS THE AVAILABLE SCREEN SPACE
// IT ORIGINATES FROM http://www.quirksmode.org/viewport/compatibility.html
var x,y;
if (self.innerHeight) {
x = self.innerWidth;
y = self.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
{
x = document.documentElement.clientWidth;
y = document.documentElement.clientHeight;
}   else if (document.body)
{
x = document.body.clientWidth;
y = document.body.clientHeight;
}
// THIS IS THE ACTUAL RESIZING OF THE VIEWPORT
viewportHeight = y - mySize + 44;
myObject.style.height = viewportHeight + "px";
return 'resized';
}