<!--

 function doLogin(url) {
 	 var f = document.forms["loginForm"];
 	 f.url.value = url;
 	 f.submit();
 	 return;
 }

/***
 MENU PROCEDURES
 */
var dummyImgs = new Object();
var MENU_FLAG = false;
var CUR_MENU=null;
var CONTEXT_PATH = ".";
$(function() {

	// PRELOAD IMAGES
	$('#mMenu2 div').each( function() {
		dummyImgs[this.id] = (new Image()).src = CONTEXT_PATH + '/images/template/menu/' + this.id + '_r.gif';
		// SET MOUSEOVER
		$(this).mouseover(function() {
			this.style.backgroundImage="url('" + CONTEXT_PATH + "/images/template/menu/" + this.id + "_r.gif')";
		});

		// SET MOUSEOUT
		$(this).mouseout(function() {
			if( this.id != MENU_ID )
				this.style.backgroundImage="url('" + CONTEXT_PATH + "/images/template/menu/" + this.id + ".gif')";
			MENU_FLAG=false;
		});
		this.style.cursor='pointer';

		//現在
		$(this).click( function() { window.location.href=CONTEXT_PATH + "/viewer.jsp?key=" + this.id; } );
		if(this.id == MENU_ID ) {
			this.style.backgroundImage="url('" + CONTEXT_PATH + "/images/template/menu/" + this.id + "_r.gif')";
			this.style.cursor='default';
		}

	});

	//WRITE SUB MENU
	$('#sub_' + MENU_ID).css({'display':'block'});
	$('#' + MENU_ID + '_' + SUB_MENU_ID).css({'background-image':'url(' + CONTEXT_PATH + '/images/template/' + MENU_ID + '/' + MENU_ID + '_' + SUB_MENU_ID + '_r.gif' + ')'});
	$('#' + MENU_ID + '_' + SUB_MENU_ID).css({'cursor':'default'});
	MENU_FLAG=true;
	CUR_MENU=$('#sub_' + MENU_ID);

	// BG
	$('#mLeft').css({'background-image':'url(' + CONTEXT_PATH + '/images/template/' + LEFT_BG_IMG + '_left.jpg' + ')'});
	$('#mRight').css({'background-image':'url(' + CONTEXT_PATH + '/images/template/' + RIGHT_BG_IMG + '_right.jpg' + ')'});


});

function evtMouseOverSub(obj,id) {
	obj.style.backgroundImage = "url('" + CONTEXT_PATH + "/images/template/" + id + "/" + obj.id + "_r.gif')";
	MENU_FLAG = true;
}
function evtMouseOutSub(obj,id) {
	obj.style.backgroundImage = "url('" + CONTEXT_PATH + "/images/template/" + id + "/" + obj.id  + ".gif')";
	MENU_FLAG = false;
}
function evtTimer(){
	if( !MENU_FLAG && CUR_MENU != null) {
		CUR_MENU.css("display","none");
		CUR_MENU=null;
		MENU_FLAG = false;
	}
	setTimeout("evtTimer();",500);
}
function doMouseOver(obj) {
	var re = /(\.\w+)$/;
	if( obj.src.match(re) ) {
		obj.src = obj.src.replace(re,"i$1");
	}
//	alert(obj.src);
}
function doMouseOut(obj) {
	var re = /i(\.\w+)$/;
	if( obj.src.match(re) ) {
		obj.src = obj.src.replace(re,"$1");
	}
}
/**
 * 入力日付の確認
 * @param szDate yyyyMMdd形式の日付文字列
 * @return 正常時:true/異常時:false
 */
function checkDate(szDate) {
	var re = /(\d\d\d\d)(\d\d)(\d\d)/;
	if( szDate.match(re) ) {
		var inYear = parseInt(RegExp.$1,"10");
		var inMonth = parseInt(RegExp.$2,"10");
		var inDate = parseInt(RegExp.$3,"10");

		if( inYear < 1900  || inYear > 2008 ) return false;

		if( inYear && inMonth && inDate ) {
			var date = new Date(inYear,inMonth-1,inDate);
			var nYear = date.getYear();
			var nMonth = date.getMonth() + 1;
			var nDate = date.getDate();
			var now = new Date();
			if( nYear < 2000) nYear += 1900;
			if( inYear != nYear
					|| inMonth != nMonth
					|| inDate != nDate ) 
				return false;
			return true;
		}
	} else {
		return false;
	}
}



//-->