

function open_window(url) {
gifwindow = window.open(url,"picwindow",'toolbar=0,location=0,menubar=0,scrollbars=0,resizable=1,width=450,height=420');
}


function movewindow() {
window.moveTo(0,0);
window.resizeTo(screen.availWidth,screen.availHeight);
}


function pageHeightWidth(which) {
if (typeof( window.innerWidth ) == 'number' )
{
	frameWidth = window.innerWidth;
	frameHeight = window.innerHeight;
}
else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
{
	frameWidth = document.documentElement.clientWidth;
	frameHeight = document.documentElement.clientHeight;
}
else if (document.body && ( document.body.clientWidth || document.body.clientHeight ))
{
	frameWidth = document.body.clientWidth;
	frameHeight = document.body.clientHeight;
}

else {
	frameWidth = 1024;
	frameHeight = 800;
}

if (navigator.appVersion.toLowerCase().indexOf("mac")>0 && which != 1) {
	frameHeight = frameHeight - 150;
}

if (which == 1) return frameWidth;
else return frameHeight;
}


function pageWidth() {return window.innerWidth != null? window.innerWidth: document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth:document.body != null? document.body.clientWidth:null;}
function pageHeight() {return window.innerHeight != null? window.innerHeight: document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight:document.body != null? document.body.clientHeight:null;}

function move_window () {
if (pageHeightWidth(1) < screen.availWidth || pageHeightWidth(0) < screen.availHeight) {
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth,screen.availHeight);
}
}

