﻿var detect = navigator.userAgent.toLowerCase();
checkIt=function(string) {return detect.indexOf(string) + 1;}

function OpenRDR(b, c) {
    //if(!checkLogin()) return;
	if ((screen.availHeight >= 0) && (screen.availWidth >= 0)) {
		var height = screen.availHeight - 50;
		var width = screen.availWidth - 10;
	}
	else if ((screen.Height >= 0) && (screen.Width >= 0)) {
		var height = screen.Height - 90;
		var width = screen.Width - 10;
	}
	if (checkIt('aol')) {
		width = width - 10;
		height = height - 130;
	}

	if(checkIt('android')||checkIt('iphone'))
	{
		msg = window.open("/reader/fulfill.aspx?b=" + b, "rdr");
	}
	else
	{
		msg = window.open("/reader/fulfill.aspx?b=" + b, "rdr", "toolbar=0,status=no,location=no,menubar=no,directories=no,scrollbars=no,resizable=no,screenX=0,screenY=0,left=0,top=0,width=" + width + ",height=" + height);
	}
	if (window.focus) { msg.focus() }
}


