// JavaScript Document

var platform;
var browser;
var window_size;

var mode;
var w = screen.width - 12;
var h = screen.height - 31;
var file_path = "index02.php"+window.location.search;
//alert(file_path+"  file_path");

if(navigator.userAgent.indexOf('Win') == -1) {
	platform = 'MAC'; 
} else { 
	platform = 'WIN'; 
} 

if(navigator.appName.indexOf('Netscape') == -1) {
	browser = 'IE'; 
} else { 
	browser = 'NN';
}

function openWindow(arg){
    mode = arg;
	
	if(platform == 'WIN' && browser == 'IE'){
		if (mode == 'fullscreen') {
			Sequel=window.open(file_path,"Sequel","scrollbars=yes,resizable=no,location=no,menubar=no,status=no,fullscreen=yes");
		} else if (mode == 'pop_up'){
			w = screen.width;
			h = screen.height - 25;
			Sequel=window.open(file_path,"Sequel","scrollbars=yes,resizable=no,location=no,menubar=no,status=no,left=0,top=0");
			Sequel.resizeTo(w,h);
		}
	} else if (platform == 'MAC' && browser == 'IE'){
		h = screen.height - 35;
		w = screen.width;
		Sequel=window.open(file_path,"Sequel","scrollbars=yes,resizable=no,location=no,menubar=no,status=no,left=0,top=0");
		Sequel.resizeTo(w,h);
	} else if (platform == 'MAC' && browser == 'NN'){
		h = screen.height - 54;
		window_size = "width=" + w + ",height=" + h +",innerWidth=" + w + ",innerHeight=" + h;
		Sequel=window.open(file_path,"Sequel","scrollbars=yes,resizable=no,location=no,menubar=no,status=no," + window_size);
		Sequel.moveTo(0,0);
	} else if ( platform == 'WIN' && browser == 'NN'){
		window_size = "width=" + w + ",height=" + h +",innerWidth=" + w + ",innerHeight=" + h;
		Sequel=window.open(file_path,"Sequel","scrollbars=yes,resizable=no,location=no,menubar=no,status=no," + window_size);
		Sequel.moveTo(0,0);
	}		
}
