// determine screen resolution
var winx = screen.width;
var winy = screen.height;
//	set console offset
if( winy > 1024 ) {		//	1600 x 1200
	var offy = 840;
} else if( winy > 768 ) {	//	1280 x 1024
	var offy = 670;
} else if( winy > 600 ) {	//	1024 x 768
	var offy = 410;
} else if( winy > 480 ) {	//	800 x 600
	var offy = 250;
} else {							// 640 x 480
	var offy = 150;
}
// IE 4+
if( (navigator.appName.indexOf("Microsoft") > -1) || (navigator.appName.indexOf("MSIE") > -1) ) {offy -= 80;}

function RLINK(sym) {
	var url = "/cgi-bin/stocks-research.pl";
	var call = "?" + sym;
	var features = "top="+offy+", left=0, width="+(winx -25)+", height=350, menubar=0, toolbar=0, resizable=1, scrollbars=0";
	new_win = window.open( url+call, sym, features );
	if( window.focus ){ new_win.focus() }
}

function OQA(sym){
	var url = "http://moneycentral.msn.com/detail/market_quote";
	var call = "?symbol=."+ sym;
//	var features = "top=0, left=0, width="+(winx -25)+",height="+( winy -100)+", resizable=0, scrollbars=1";
	var features = "top=120, left=0, width=600, height=670, resizable=0, scrollbars=1";
	new_win = window.open( url+call, "OQA", features );
	if( window.focus ){ new_win.focus() }
}

function PA(url){
	var features = "top=250, left=0, width=630, height=200, resizable=0, scrollbars=0";
	new_win = window.open( url, "PA", features );
	if( window.focus ){ new_win.focus() }
}

function PB(url){
	var features = "top=200, left=0, width=630, height=400, resizable=0, scrollbars=0";
	new_win = window.open( url, "PB", features );
	if( window.focus ){ new_win.focus() }
}

function PS(url){
	var features = "top=0, left=0, width=630, height=425, resizable=1, scrollbars=1";
	new_win = window.open( url, "PS", features );
	if( window.focus ){ new_win.focus() }
}

function PS2(url){
	var features = "top=220, left=0, width=630, height=425, resizable=1, scrollbars=1";
	new_win = window.open( url, "PS2", features );
	if( window.focus ){ new_win.focus() }
}

function PF(url){
	var features = "top=0, left=0, width="+(winx -15)+", height="+( winy -161)+", menubar=1, toolbar=1, status=1, resizable=1, scrollbars=1";
	new_win = window.open( url, "PF", features );
	if( window.focus ){ new_win.focus() }
}

function PST(url){
	var features = "top=0, left=0, width="+(winx -30)+", height="+( winy -181)+", menubar=1, toolbar=1, resizable=0, scrollbars=1";
	new_win = window.open( url, "PST", features );
	self.name = "mainWin";
	if( window.focus ){ new_win.focus() }
}

function PST2(url){
	var features = "top=0, left=0, width="+(winx -40)+", height="+( winy -191)+", menubar=1, toolbar=1, resizable=0, scrollbars=1";
	new_win = window.open( url, "PST2", features );
	self.name = "mainWin";
	if( window.focus ){ new_win.focus() }
}

function PST3(url){
	var features = "top=166, left=0, width=746, height=640, menubar=1, toolbar=1, resizable=0, scrollbars=1";
	new_win = window.open( url, "PST3", features );
	if( window.focus ){ new_win.focus() }
}

function PSEC(url){
	var features = "top=0, left=0, width="+(winx -45)+", height="+( winy -191)+", menubar=1, toolbar=1, status=1, resizable=0, scrollbars=1";
	new_win = window.open( url, "PSEC", features );
	self.name = "mainWin";
	if( window.focus ){ new_win.focus() }
}
