﻿function Browser() {
		var b=navigator.appName;
		if (b=="Netscape") this.b="ns";
		else if ((b=="Opera") || (navigator.userAgent.indexOf("Opera")>0)) this.b = "opera";
		else if (b=="Microsoft Internet Explorer") this.b="ie";
		if (!b) alert('Unidentified browser./nThis browser is not supported,');
		this.version=navigator.appVersion;
		this.v=parseInt(this.version);
		this.ns=(this.b=="ns" && this.v>=4);
		this.ns4=(this.b=="ns" && this.v==4);
		this.ns6=(this.b=="ns" && this.v==5);
		this.ie=(this.b=="ie" && this.v>=4);
		this.isIE=(this.b=="ie" && this.v>=4);
		this.ie4=(this.version.indexOf('MSIE 4')>0);
		this.ie5=(this.version.indexOf('MSIE 5')>0);
		this.ie55=(this.version.indexOf('MSIE 5.5')>0);
		this.ie6=(this.version.indexOf('MSIE 6')>0);
		this.opera=(this.b=="opera");
		this.dom=(document.createElement && document.appendChild && document.getElementsByTagName)?true:false;
		this.def=(this.ie||this.dom); // most used browsers, for faster if loops
		var ua=navigator.userAgent.toLowerCase();
		if (ua.indexOf("win")>-1) this.platform="win32";
			else if (ua.indexOf("mac")>-1) this.platform="mac";
		else this.platform="other";
	}
is = new Browser();
browser = new Browser();


window.onload = function() {
	setpage();
}

function setpage(x)
{
	if (document.getElementById){
		var PP1 = document.getElementById('PP1');
		var PP1Height = PP1.offsetHeight;
		var PP2 = document.getElementById('PP2');
		var PP2Height = PP2.offsetHeight;
		var PP3 = document.getElementById('PP3');
		var PP3Height = PP3.offsetHeight;
		d1= 0;
		d2= 30;
		
		if (PP1Height > PP3Height) {
			PP3.style.height = (PP1Height-d1)+'px';
			PP2.style.height = (PP1Height-d2)+'px';
		}else{
			PP1.style.height = (PP3Height-d1)+'px';
			PP2.style.height = (PP3Height-d2)+'px';
		}
	}

	if (!is.ie){
		if (x==1)
		{
				PP3.style.height = (PP3Height+200)+'px';
				PP1.style.height = (PP1Height+200)+'px';
				PP2.style.height = (PP2Height+200)+'px';
		}
	}

}