
var strFile = window.location.pathname;
var strDelimit="@@";
//alert(window.location.pathname);

function Calendar(objDate) {
	var strURL = "../JavaScript/Calendar.htm";
	objDate.value = window.showModalDialog(strURL,"yyyy-mm-dd","dialogHeight:300px;dialogWidth:400px;status:no;help:no;scroll:no");
}

function CalendarRoot(objDate) {
	var strURL = "JavaScript/Calendar.htm";
	objDate.value = window.showModalDialog(strURL,"yyyy/mm/dd","dialogHeight:300px;dialogWidth:400px;status:no;help:no;scroll:no");
}

function openWindow(strURL){
	//Open a new Window with spec URL
	if(strURL == "") return;
	var win;
	var x,y;
	x = (window.screen.availWidth-640)/2;
	y = (window.screen.availHeight-480)/2;
	win = window.open(strURL,'','resizable=yes,toolbar=no,location=no,titlebar=no,status=no,scrollbars=yes,width=640,height=480,left='+x+',top='+y);
	//win.moveTo(x,y);
}

function initDate(){
	var objStartDate = document.getElementById("txtStartDate");
	var objEndDate = document.getElementById("txtEndDate");
	if(objStartDate){
		if(objStartDate.value=="") objStartDate.value = getTime("d");
	}
	if(objEndDate){
		if(objEndDate.value=="") objEndDate.value = getTime("d");
	}
}

function GetDate(objDate) {
	var strURL = "../JavaScript/Calendar.htm";
	objDate.value = window.showModalDialog(strURL,"yyyy-mm-dd","dialogHeight:200px;dialogWidth:300px;status:no;help:no;scroll:no");
}


function showCondition(str){
	var layer;
	var arr = str.split(",");
	var i;
	var strHtml = "";
	for(i=0;i<=arr.length - 1;i++){
		if(arr[i] != "") strHtml += "&nbsp;" + arr[i] + "&nbsp;<br>";
	}
	layer = document.getElementById("layerShowCondition");
	layer.style.visibility ="visible";
	layer.innerHTML = "<font style='font-size:10pt;font-family:Verdana;'>" + strHtml + "</font>";
	layer.style.posLeft = window.event.clientX;
	layer.style.posTop = window.event.clientY;
}

function hideCondition(){
	var layer;
	layer = document.getElementById("layerShowCondition");
	layer.innerHTML = "";
	layer.style.visibility ="hidden";
}