function browserCheck() 
{
	var b = navigator.appName;
	if (b == "Netscape") 
		this.b = "ns";
	else if (b == "Microsoft Internet Explorer") 
		this.b = "ie";
	else 
		this.b = b
	this.us = navigator.userAgent;
	
	//Opera check
	
	this.opera = this.us.indexOf("Opera");
	if(this.opera != -1){
		this.opera = true;
		this.b = "";
	}
	else {
		this.opera = false;
	}
	
	//Firefox Check
	
	this.firefox = this.us.indexOf("Firefox");
	if(this.us.indexOf("Firefox")!=-1){
		this.firefox = true;	
	}else{
		this.firefox = false;	
	}
	
	//DOM Check
	
	this.DOM = (document.createElement && document.getElementsByTagName);
	
	this.version = navigator.appVersion;
	if (this.b == 'ie')
	{ 
		var ve = this.version.indexOf("MSIE")
		this.v = parseInt(this.version.substr(ve+4))
	}
	else 
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v<5)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ie = (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.min = (this.ns||this.ie)
}//end BrowserCheck() 

is = new browserCheck();

function ScreenInfo(){
	this.w=screen.width;
	this.h=screen.height;
}

scrinfo = new ScreenInfo();

function WindowProperty(){
	if(is.ie){
		this.iH = document.body.clientHeight;
		this.iW = document.body.clientWidth;	
	}else{
		this.iH = window.outerHeight;
		this.iW = window.outerWidth;	
	}
}


function Initialize(homepage)
{

	WinProp = new WindowProperty();

	ObjContent = document.getElementById("content");
	ObjContainer = document.getElementById("container");
	ObjHeader = document.getElementById("header");
	ObjStyleSheet = document.getElementById("ldapstyles");

		
	
	if(is.ie)
	{
	
		if(WinProp.iW<773 || scrinfo.w==800)
		{	
			if(homepage)
			{
				ObjStyleSheet.href="/style/mainpage800.css";
			}else{
				ObjStyleSheet.href="/style/internal800.css";
			}	


		}	
		
		if(WinProp.iW>773 && WinProp.iW<996)
			{
				ObjContainer.style.width = WinProp.iW;
				if(homepage)
				{
					ObjContent.style.width = WinProp.iW - 470;
				}
			}else if(WinProp.iW>996)
				{
					ObjContainer.style.width = "960px";
					if(homepage)
					{
					ObjContent.style.width = "500px";
					}
				}	
	}else{

		if(WinProp.iW<801 || scrinfo.w==800)
		{	
			if(homepage)
			{
			ObjStyleSheet.href="/style/mainpage800.css";
			}else{
				ObjStyleSheet.href="/style/internal800.css";
			}	

		}		
	
	}
	
		ObjContainer.style.display = "block";
		//alert(ObjContent.offsetWidth);
		//alert(ObjContainer.offsetWidth);
	
}
