/***********************************************************
 システム名		:NET Culture
 モジュール名	:JavaScript 共通関数
 作成日			;2008/03/12
 作成者			:
============================================================

============================================================
 変更履歴
	yyyy/mm/dd	氏名		変更理由
***********************************************************/
/***********************************************************
 処理名		:ﾄｯﾌﾟﾍﾟｰｼﾞﾁｪｯｸ
 戻値		:なし
 引数		:1.遷移先ﾍﾟｰｼﾞ		p_strPage(I,String)
 解説		:自ﾍﾟｰｼﾞがﾌﾚｰﾑのﾄｯﾌﾟでない場合指定したﾍﾟｰｼﾞへ遷移
***********************************************************/
function pf_chkTopPage(p_strPage){
	if(top==self){
		top.location.href=p_strPage;
	}
}

/***********************************************************
 処理名		:ログインウィンドウ表示
 戻値		:1=ログインＯＫ 2=新規ユーザ 他=キャンセル
 引数		:1. p_mode 1=ログイン 2=パスワード忘れ
***********************************************************/
function pf_showLoginDlg(p_mode){
    var style="dialogHeight:230px; dialogWidth:440px; status:no; edge:raised;unadorned:yes";
    val = showModalDialog('./login.php?mode=' + p_mode, null, style);
	return val;
}
/***********************************************************
 処理名		:画像ウィンドウ表示
 戻値		:なし
 引数		:1. url ファイルＵＲＬ
***********************************************************/
function pf_showFileView(url){
//    var style="dialogHeight:500px; dialogWidth:500px; status:no; status:no; edge:raised; resizable:yes; unadorned:yes; scrollbars:yes";
//    val = showModelessDialog(url, "fileview", style);
    var style="height=500, width=500, status=no, resizable=yes, scrollbars=yes, left=5, top=5 ";
//alert("fileview.php?url=" + url);
    val = window.open("fileview.php?url=" + url, "fileview", style);
}
/***********************************************************
 処理名		:画像ウィンドウ表示
 戻値		:なし
 引数		:1. url ファイルＵＲＬ
***********************************************************/
function pf_showFileView2(schl, prog, cont, img){
    var style="height=500, width=500, status=no, resizable=yes, scrollbars=yes, left=5, top=5 ";
    val = window.open("fileview2.php?schl=" + schl + "&prog=" + prog + "&cont=" + cont + "&img=" + img, "fileview", style);
}
/***********************************************************
 処理名		:中継表示
 戻値		:なし
 引数		:1. url ターゲットＵＲＬ
***********************************************************/
function pf_showHookView(url){
//    var style="dialogHeight:500px; dialogWidth:500px; status:no; status:no; edge:raised; resizable:yes; unadorned:yes; scrollbars:yes";
//    val = showModelessDialog(url, "fileview", style);
    var style="status=no, resizable=yes, scrollbars=yes, left=5, top=5 ";
//alert("fileview.php?url=" + url);
    val = window.open("filehook.php?url=" + url, "hookview", style);
}
/***********************************************************
 処理名		:規約表示
 戻値		:1=ログインＯＫ 2=新規ユーザ 他=キャンセル
 引数		:1. p_mode 1=ログイン 2=パスワード忘れ
***********************************************************/
function pf_showKiyakuView(){
//    var style="height=650, width=650, status=no, resizable=no, scrollbars=no, left=5, top=5 ";
//    val = window.open("kiyakuview.htm", "kiyakuview", style);
//    val = showModelessDialog(url, "fileview", style);
    var style="dialogHeight:680px; dialogWidth:650px; status:no; status:no; edge:raised; resizable:yes; unadorned:yes; scrollbars:yes";
    val = showModelessDialog("kiyakuview.htm", "fileview", style);
}
/***********************************************************
 処理名		:アップロードウィンドウ表示
 戻値		:
 引数		:
***********************************************************/
function pf_showUpload(p_type){
	var strWidth;
	var strHeight;
	var strOption;
	var aryValue;

	strWidth = '650';
	strHeight = '450';

	strOption = "width=" + strWidth + "px,height=" + strHeight + "px,";
	strOption += "alwaysRaised=yes,scrollbars=no,status=yes,help=no,edge=sunken,resizable=no";
	window.open("upload.php?tp=" + p_type, null, strOption );
}
/***********************************************************
 処理名		:コンテンツプレビューウィンドウ表示
 戻値		:
 引数		:
***********************************************************/
function pf_showPreview(p_schl, p_prog, p_cont){
	var strWidth;
	var strHeight;
	var strOption;
	var aryValue;

	strWidth = '650';
	strHeight = '700';

	strOption = "width=" + strWidth + "px,height=" + strHeight + "px,";
	strOption += "alwaysRaised=yes,scrollbars=yes,status=yes,help=no,edge=sunken,resizable=yes";
	window.open("contpreview.php?schl=" + p_schl + "&prog=" + p_prog + "&cont=" + p_cont, null, strOption );
}

