// JavaScript Document
var aWidth =screen.availWidth;
var aHeight=screen.availHeight;
var cWidth =f_clientWidth();
var cHeight=f_clientHeight();
var pWidth =pageWidth();
var pHeight=pageHeight();
var wWidth=pageWidth();
var wHeight=pageHeight();
var sLeft=f_scrollLeft();
var sTop=f_scrollTop();
var xTop=posLeft;
var yTop=posTop;
var xBot=posRight;
var yBot=posBottom;
// Make adjustments 
if(cWidth == 0) {
	cWidth = aHeight;
}
if(cHeight == 0) {
	cHeight = aHeight;
}
// Get Minimum values
var mnWidth = pWidth;
if(cWidth < mnWidth) {
	mnWidth=cWidth;
}
if(aWidth < mnWidth) {
	mnWidth=aWidth;
}
var mnHeight = pHeight;
if(cHeight < mnHeight) {
	mnHeight=cHeight;
}
if(aHeight < mnHeight) {
	mnHeight=aHeight;
}
// Get Maximum values
var mxWidth = pWidth;
if(cWidth > mxWidth) {
	mxWidth=cWidth;
}
if(aWidth > mxWidth) {
	mxWidth=aWidth;
}
var mxHeight = pHeight;
if(cHeight > mxHeight) {
	mxHeight=cHeight;
}
if(aHeight > mxHeight) {
	mxHeight=aHeight;
}
// ============================ Browser dependent functions ==============
function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function f_clientHeight() {
	return f_filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function f_scrollLeft() {
	return f_filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}

// Functions to obtain window size
// Browser Window Size and Position
// copyright Stephen Chapman, 3rd Jan 2005, 8th Dec 2005
// you may copy these functions but please keep the copyright notice as well
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 posLeft() {
	return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;
} 
function posTop() {
	return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;
}
function posRight() {
	return posLeft()+pageWidth();
}
function posBottom() {
	return posTop()+pageHeight();
}
// Browser Window Size and Position
// copyright Stephen Chapman, 3rd Jan 2005, 8th Dec 2005
// you may copy these functions but please keep the copyright notice as well
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 posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;} function posTop() {return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;} function posRight() {return posLeft()+pageWidth();} function posBottom() {return posTop()+pageHeight();}
                                        
