function windetect(text) {
	var winua = navigator.userAgent.toLowerCase();
	stringposition = winua.indexOf(text) + 1;
	data = text;
	return stringposition;
}
//
function getBrowserWindowSize() { 
	var r = new Array(); 
	r['width'] = 0; 
	r['height'] = 0; 
	if(typeof(window.innerWidth) == 'number' ) { 
	//Non-IE 
	r['width'] = window.innerWidth; 
	r['height'] = window.innerHeight; 
	} 
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { 
	//IE 6+ in 'standards compliant mode' 
	r['width'] = document.documentElement.clientWidth; 
	r['height'] = document.documentElement.clientHeight; 
	} 
	else if(document.body && (document.body.clientWidth || document.body.clientHeight)) { 
	//IE 4 compatible 
	r['width'] = document.body.clientWidth; 
	r['height'] = document.body.clientHeight; 
	} 
	return r; 
}
//
function centerWin() {
	if (document.layers) {
	var cwidth = screen.width / 2 - outerWidth / 2;
	var cheight = -0 + screen.height / 2 - outerHeight / 2;
	} else {
	var cwidth = screen.width / 2 - document.body.offsetWidth / 2;
	var cheight = -75 + screen.height / 2 - document.body.offsetHeight / 2;
	}
	if (screen.width > 1024) {
	self.moveTo(cwidth, cheight);
	} else {
	self.moveTo(0, cheight);
	}
}
//
//
function winResize() {
	var window_size = getBrowserWindowSize();
	//
	if (window_size['width'] < winWidth || window_size['height'] < winHeight || winForce == true) {
	//
	if (winMinimum >= screen.width) {
	var TargetWidth = 1024;
	var TargetHeight = 650;
	self.moveTo(0, 0);
	} else {
	var TargetWidth = winWidth;
	var TargetHeight = winHeight;
	}
	//
	window.resizeBy(TargetWidth - window_size['width'], TargetHeight - window_size['height']); 
	self.focus();
	//
	}
}
