/*DESIFIX Standard Javascripts.
* by Yoshifumi Harada. Jul.30
* Copyright (c) 1999,2000 desifix LLC. All Rights Reserved.
* This script is a work-in-progress.
* It is released for testing purposes only, and not recommended for general use.
* Contact office@desifix.net with feedback.
*/
function Setup(){
	/*
	if (document.all) { document.onmousedown = mdown; }
	if (document.layers) {	 window.onmousedown = mdown; window.captureEvents(Event.MOUSEDOWN); }
	*/
	bVersion = navigator.appVersion.charAt(0); bName = navigator.appName.charAt(0);
}
function ErrorProc(arg1,arg2,arg3){
	window.status = "Javascript Error. - " + arg1 + "(" + arg3 + ")";
}

/* Stop of Right button */
function mdown(e) {
	if (navigator.appName == "Microsoft Internet Explorer") {
		if (event.button == 2) { window.status = "右クリックは使用できません"; return(false); }
	} else if (navigator.appName == "Netscape") {
		if (e.which == 3) { window.status = "右クリックは使用できません"; return(false); }
	}
}

/* Popup Browsing */
function PopupWindow(DataDir,DataURL,DataExt,WinName,popWinX,popWinY,MenuBar,Resizeable,StatusBar){
	/* DataDir = "./somewhere/"  DataURL = "somedata"  DataExt = "html" */
	/* popWinX and popWinY = 10 to Max screen of size */
	var win_set = 'toolbar=no,location=0,directories=no,scrollbars=auto';
	if(StatusBar=='TRUE'){  win_set = win_set + ',status=Yes'; }else{ win_set = win_set + ',status=No'; }
	if(MenuBar=='TRUE'){  win_set = win_set + ',menubar=Yes'; }else{ win_set = win_set + ',menubar=No'; }
	if(Resizeable=='TRUE'){  win_set = win_set + ',resizable=Yes'; }else{ win_set = win_set + ',resizable=No'; }
	win_set = win_set + ',width=' + popWinX +',height=' + popWinY;
	window.open( DataDir + DataURL + "." + DataExt , WinName , win_set);
}

/* Prompt Popup Movie Browsing */
function PromptMovieOpen(loc,WIN_width,WIN_height){
		if (window.confirm("新しいウィンドウを開いてムービを\n再生しますが，よろしいですか？")==true){
			window.open(loc,"DESIFIXIG","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+WIN_width+",height="+WIN_height);
		}
}

/* Quick Jump */
function QuickJump(form, buttonID){
	var SelIndexA = form.QSel.selectedIndex;
	if(SelIndexA<0){ return; }
	var HTMLLoc = form.QSel.options[SelIndexA].value;
	if(HTMLLoc=="Hed"){ return; }
	parent.document.location = HTMLLoc;
}



