var platform;
var browser;
var window_size;
var w;
var h;
var file_path;

//check platform and browser
if(navigator.userAgent.indexOf('Win') == -1) {
	platform = 'MAC'; 
} else { 
	platform = 'WIN'; 
} 

if(navigator.appName.indexOf('Netscape') == -1) {
	browser = 'IE'; 
} else { 
	browser = 'NN';
}

//opens a new pop up to fill the screen with the file 'fp'
//does it a little differently for each platform/browser combination
function openWindow(fp){

	file_path = fp;

	if(platform == 'WIN' && browser == 'IE'){	
		w = screen.width;
		h = screen.height -25;
		newwin=window.open(file_path,"main_win","scrollbars=no, resizable=yes,location=yes,menubar=no,status=no,left=0,top=0, titlebar=no");
		newwin.resizeTo(w,h);

	}else if(platform == 'MAC' && browser == 'IE'){
		w = screen.width - 12;
		h = screen.height - 35;	
		newwin=window.open(file_path,"main_win","scrollbars=0,resizable=yes,location=yes,menubar=no,status=no,left=0,top=0");
		newwin.resizeTo(w,h);
	}else if(platform == 'MAC' && browser == 'NN'){
		w = screen.width - 12;
		h = screen.height - 54;
		window_size = "width=" + w + ",height=" + h +",innerWidth=" + w + ",innerHeight=" + h;
		newwin=window.open(file_path,"main_win","scrollbars=0,resizable=yes,location=yes,menubar=no,status=no," + window_size);
		newwin.moveTo(0,0);
	}else if( platform == 'WIN' && browser == 'NN'){
		w = screen.width - 12;
		h = screen.height - 31;
		window_size = "width=" + w + ",height=" + h +",innerWidth=" + w + ",innerHeight=" + h;
		newwin=window.open(file_path,"main_win","scrollbars=0,resizable=yes,location=yes,menubar=no,status=no," + window_size);
		newwin.moveTo(0,0);
	}	
}