// redirect to 
/*
var version = parseInt( navigator.appVersion );
if ( version >= 4 ) {
	x = screen.width ; y = screen.height
	if ( document.layers ) {
		if ( (x >= 800 ) && ( x <= 1028 ) ) {x = 1028}
		if ( (y >= 600 ) && ( y <= 780 ) )  {y = 780}
		if ( (x >= 640 ) && ( x <= 800 ) )  {x = 800}
		if ( (y >= 480 ) && ( y <= 600 ) )  {y = 600}
		if ( x <= 640 ) {x = 640}
		if ( y <= 480 ) {y = 480}
	}
	if ( x < 750 && y < 550 ) {
		document.location.href = "http://www.duyum.com.tr";
	}
}

*/

var user_agent = navigator.userAgent;
var isOpera = user_agent.indexOf("Opera") >= 0;
var isFirefox = user_agent.indexOf("Firefox") >= 0;
var isWin32up = user_agent.indexOf("Win32") >= 0 
	|| user_agent.indexOf("Win64") >= 0
	|| user_agent.indexOf("Windows NT") >= 0;
// disallow Opera faking IE
var isIE = !isOpera && user_agent.indexOf("MSIE") >= 0;
var isIE55up = isIE && isWin32up && user_agent.match(/MSIE ((5\.5)|[6789])/);
var isIE70up = isIE && isWin32up && user_agent.match(/MSIE ([789])/);
var isIE55dn = isIE && !isIE55up;
var browser = "other";

if (isFirefox)
	browser = "firefox";
else if (isOpera) 
	browser = "opera";
else if (isIE55up) 
	browser = "ie55p";
else if (isIE55dn) 
	browser = "ie55d";

function setHomePage2(ths, url) {
	ths.style.behavior='url(#default#homepage)';
	ths.setHomePage(url);
}

function popup2(url, window_name, width, height) {
	var left = parseInt((screen.width - width) / 2);
	var top = parseInt((screen.height - height) / 2);
	
	var wnd = window.open(url, 
		window_name, 
		'status=1, toolbar=0, menubar=0, scrollbars=no, resizable=0, ' +
		'left=' + left + ', top=' + top + ', ' +
		'width=' + width + ', height=' + height);

	wnd.focus();
	return wnd;
}

function popup_sizeable(url, window_name, width, height) {
	var left = parseInt((screen.width - width) / 2);
	var top = parseInt((screen.height - height) / 2);
	
	var wnd = window.open(url, 
		window_name, 
		'status=1, toolbar=0, menubar=0, scrollbars=yes, resizable=1, ' +
		'left=' + left + ', top=' + top + ', ' +
		'width=' + width + ', height=' + height);

	wnd.focus();
	return wnd;
}
