//- Initialize_Detect -//
function Instinct_Detect(oInstinct) {
//- Model - Initialize -//
	//- detect version -//
	this.Browser_Version = navigator.appVersion.split(' ');

	//- detect platform -//
	this.Browser_Platform = "???";
		
	//- detect name -//
	this.Browser_Name = "???";
	if (navigator.appName == 'Microsoft Internet Explorer') {
		this.Browser_Name = "IE?";
		//- Emulate document.getElementById() method for IE4 -//
		if ((this.Browser_Version[0] >= 4) && (this.Browser_Version[0] < 5)) {
			if (document.getElementById == null) {
				document.getElementById = document.all;
			}
		}
	}
	if (navigator.appName == 'Netscape') {
		if (this.Browser_Version[0] >= 5.0) {
			this.Browser_Name = "NS6";
		} else if (this.Browser_Version[0] >= 4.0) {
			this.Browser_Name = "NS4";
		}
	}

	//- detect engine -//
	this.Engine = "??";
	if (document.getElementById) {
		this.Engine = "W3";
	} else if (document.all) {
		this.Engine = "IE";
	} else if (document.layers) {
		this.Engine = "NS";
	}
	switch(this.Engine) {
	case "W3":
	case "IE":
		Instinct_Detect_W3(this);
		break;
			
	case "NS":
	case "??":
	default:
		Instinct_Detect_NS(this); break;
	}

//- Model - Link -//
	oInstinct.Detect = this;
	this.Resize = Resize;
	this.onLoad = onLoad;
	
//- Model - Implementation -//
	function Resize(hWnd, nWidth, nHeight) {
		hWnd.resizeTo(nWidth, nHeight);
	}
	function onLoad() {
		this.windowHeigth = this.getWindowHeight();
		this.windowWidth = this.getWindowWidth();
	}
}

//- static -//
var g_oDetect = new Instinct_Detect(oInstinct);
