var Mac = navigator.appVersion.indexOf('Mac',0) != -1;
var Win = navigator.appVersion.indexOf('Win',0) != -1;
var IE  = navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1;
var NN  = navigator.appName.indexOf("Netscape",0) != -1;
var Moz = navigator.userAgent.indexOf("Gecko") != -1;

var NS4 = (bName == "Netscape" && bVer >= 4 &&  bVer <5);
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
var NS3 = (bName == "Netscape" && bVer < 4);
var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
var NN6 = (document.getElementById) ? true : false;

var bVer = parseInt(navigator.appVersion);
var bVerAll = parseFloat(navigator.appVersion);
var bName = navigator.appName;


/////////////////////////////////////////////////////////////
//　ディレクトリ検知 ※使ってませんコメントアウト中
/////////////////////////////////////////////////////////////
/*
var keyDir="printing-museum.org";
var directory="";

/////////
if(document.URL.indexOf("\\",0)>=0){
	keyDir=keyDir+"\\";
} else {
	keyDir=keyDir+"/";
}
/////////


sp =  document.URL.indexOf(keyDir,0);
while (document.URL.indexOf(keyDir,sp)>=0) {
	ep1 =  document.URL.indexOf(keyDir,sp);
	sp = ep1+1;
}
while (document.URL.indexOf("\\",sp)>=0 || document.URL.indexOf("/",sp)>=0) {
	if(sp != ep1+1){
	directory += "../";
	}
	if(document.URL.indexOf("/",sp)>=0){
		ep2 =  document.URL.indexOf("/",sp);
	} else if(document.URL.indexOf("\\",sp)>=0){
		ep2 =  document.URL.indexOf("\\",sp);
	}
	sp = ep2+1;
}

*/
/////////////////////////////////////////////////////////////
//　基本ウィンドウオープン
/////////////////////////////////////////////////////////////

function launchWin(URL,w,h){
	features = 'toolbar=no,locationbar=no,resizable=yes,scrollbars=yes,width='+w+',height='+h;
	newWin = window.open(URL,'sample',features);
	newWin.focus();
}


/////////////////////////////////////////////////////////////
//　コピーライト
/////////////////////////////////////////////////////////////
function copyright(){
document.write('<span class="t10" style="color:#666666;line-height:20px;">Copyright 2010 Printing Museum, Tokyo, all rights reserved.<br></span>');
}

/////////////////////////////////////////////////////////////
//　レクチャーウィンドウ
/////////////////////////////////////////////////////////////
function lectureRun(url){
lecWin = window.open("/"+"exhibition/lecture/"+url,'lecWin','width=520,height=600,scrollbars=1,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1');
lecWin.focus();
}

/////////////////////////////////////////////////////////////
//　520×600ウィンドウ
/////////////////////////////////////////////////////////////
function smallWin(url){
smallWin = window.open(url,'smallWin','width=520,height=600,scrollbars=1,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1');
smallWin.focus();
}

/////////////////////////////////////////////////////////////
//　FAXウィンドウ
/////////////////////////////////////////////////////////////
function faxWin(url){
faxWin = window.open(url,'workshop_fax','menubar=yes,toolbar=no,locationbar=no,resizable=yes,scrollbars=yes,status=no,width=640,height=780,toolbar=yes');
faxWin.focus();
}

