function get_browser()
{
    checkOP = window.opera;            // OP
    checkN6 = document.getElementById; // N6
    checkIE = document.all;            // IE
    checkN4 = document.layers;         // N4

    if(checkOP) {
        return "OP6";  // Opera 6 or above
    } else if(checkIE) {
        return "IE4";  // Internet Explorer 4.0 or above
    } else if(checkN6) {
		userAgent = navigator.userAgent;
		if(userAgent.indexOf("Safari") >= 0) {
			return "SA1";  // Safari 1.X
		}
        return "NS6";  // Netscape 6 or above
    } else if(myN4) {
        return "NN4";  // Netscape Navigator 4 to 5
    } else {
        if(navigator.appName == "Netscape") {
            return "NS";
        } else if(navigator.appName == "Microsoft Internet Explorer") {
            return "IE";
        }
    }

    return "UNKNOWN";
}

function get_os()
{
	platform = navigator.platform;
	
	if(platform >= "Win") {
		return "WIN";
	} else if(platform >= "Mac") {
		return "MAC";
	}
	
	return "UNKNOWM";
}



function openImgWindow(imgURL, imgWidth, imgHeight, titleStr)
{
	if(get_os() == "MAC") {
		newWin = window.open("", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+"600"+",height="+"600");
		newWin.moveTo(10, 10);
	} else {
		newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+"600"+",height="+"600");
		newWin.moveTo(10, 10);
	}
	
    newWin.document.open();
    newWin.document.writeln("<html><head>");
	newWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">');
	newWin.document.writeln('<meta http-equiv="Content-Style-Type" content="text/css">');
	newWin.document.writeln('<meta http-equiv="Content-Script-Type" content="text/javascript">');
	newWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
    newWin.document.writeln('<title>'+titleStr+'</title>');
    newWin.document.writeln('<style type="text/css">');
    newWin.document.writeln('<!--');
    newWin.document.writeln('* { margin:0px; paddingt:0px; }');
    newWin.document.writeln('-->');
    newWin.document.writeln('</style>');
    newWin.document.writeln('</head><body><table><tr><td style="width:600px; height:600px; text-align:center; vertical-align:middle;">');
    newWin.document.writeln('<img src="'+imgURL+'" />');
    newWin.document.writeln('</td></tr></table></body></html>');
    newWin.document.close();
}



function showAthlete(id)
{
	newWin = window.open("./show_detail/?id="+id, "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=640,height=640");
	newWin.moveTo(10, 10);
}
