

function f_Menu() {
	theform.action = 'index.jsp';
	theform.submit();
   	return;
}

function f_submit(argUrl) {
	theform.action = argUrl
 	theform.target = '_top';
 	theform.submit();
}


function f_PickDate_2(argElement) {
 d = parseDate(argElement.value);
 if (d == null) { d = new Date(); }
 var pd = new PickDate(d, argElement);
 if ( !oPopup.document.all('DateStyle') ) { //add style the first time
    var elementDateStyle = oPopup.document.createElement("<style id=DateStyle>");
    oPopup.document.body.insertBefore(elementDateStyle);
    var styleSheetsDateStyle =  oPopup.document.styleSheets["DateStyle"];
    styleSheetsDateStyle.addRule(".PickDate"," { border:1px solid WindowText; background:Window; width:250px; height: 250px; padding:0px; cursor:default; -moz-user-focus:normal; position:absolute;  }");
    styleSheetsDateStyle.addRule(".PickDate td"," { font:Caption;  text-align:center; color:WindowText; cursor:default; font-weight:normal !important; -moz-user-select:none; padding:0; }");
    styleSheetsDateStyle.addRule(".PickDate td.red"," { color:red; }");
    styleSheetsDateStyle.addRule(".PickDate .header"," { background:ActiveCaption; padding:3px; border-bottom:1px solid;  }");
    styleSheetsDateStyle.addRule(".PickDate .headerTable"," { width:100%; height:11%;}");
    styleSheetsDateStyle.addRule(".PickDate .footer"," { padding:3px; }");
    styleSheetsDateStyle.addRule(".PickDate .footerTable"," { width:100%; }");
    styleSheetsDateStyle.addRule(".PickDate .grid"," { padding:3px; }");
    styleSheetsDateStyle.addRule(".PickDate .gridTable"," { width:100%; }");
    styleSheetsDateStyle.addRule(".PickDate .gridTable td"," { width:14.3%; font-size:10;}");
    styleSheetsDateStyle.addRule(".PickDate .gridTable .daysRow td"," { font-weight:bold !important; border-bottom:1px solid ThreeDDarkShadow; }");
    styleSheetsDateStyle.addRule(".PickDate .grid .gridTable .upperLine"," { width:100%; height:2px; overflow:hidden; background:transparent; }");
    styleSheetsDateStyle.addRule(".PickDate td.today"," { font-weight:bold !important; }");
    styleSheetsDateStyle.addRule(".PickDate td.selected"," { background:Highlight; color:HighlightText !important; }");
    styleSheetsDateStyle.addRule(".PickDate td.labelContainer"," { width:100%; }");
    styleSheetsDateStyle.addRule(".PickDate td .topLabel"," { color:CaptionText; display:block; font-weight:bold !important; width:100%; text-decoration:none; font-family:helvetica; font-size:18;}");
    styleSheetsDateStyle.addRule(".PickDate td.filler"," { width:100%; }");
    styleSheetsDateStyle.addRule(".PickDate button"," { border-width:1px; font:Caption; font-weight:normal !important; }");
    styleSheetsDateStyle.addRule(".PickDate .previousButton"," { background:buttonface url(\"images/arrow.left.png\") no-repeat center center; }");
    styleSheetsDateStyle.addRule(".PickDate .nextButton"," { background:buttonface url(\"images/arrow.right.png\") no-repeat center center; }");
    styleSheetsDateStyle.addRule(".PickDate .previousButton"," { width:14px; height:14px; }");
    styleSheetsDateStyle.addRule(".PickDate .nextButton"," { width:14px; height:14px; }");
    styleSheetsDateStyle.addRule(".PickDate .todayButton"," { width:75px; font-size:15; }");
    styleSheetsDateStyle.addRule(".PickDate .acceptButton"," { width:75px; font-size:15;  }");
    styleSheetsDateStyle.addRule(".PickDate .noneButton"," { width:50px; }");
    styleSheetsDateStyle.addRule(".PickDate .labelPopup"," { position:absolute; min-width:250px; background:Window; border:1px solid WindowText; padding:1px; }");
    styleSheetsDateStyle.addRule(".PickDate .labelPopup a"," { width:100%; display:block; color:WindowText; text-decoration:none; white-space:nowrap; }");
    styleSheetsDateStyle.addRule(".PickDate .labelPopup a:hover"," { background:Highlight; color:HighlightText; }");
    styleSheetsDateStyle.addRule(".PickDate .labelPopup a.selected"," { font-weight:bold; }");
  }
 oPopup.document.body.appendChild(pd.create());
 //oPopup.show(argElement.offsetLeft, argElement.offsetTop, 176, 147, document.body);
 //oPopup.show(argElement.offsetLeft+500, argElement.offsetTop, 176, 155, document.body); //for WinXP
 //oPopup.show(argElement.offsetLeft+500, posY(argElement.offsetTop % screen.height) - 200, 176, 147, document.body); //for WinXP
 //alert("argElement.offsetTop: " + argElement.offsetTop);
 //alert("Screen Height: " + screen.height);
 //alert("Height: " + (argElement.offsetTop % screen.height));
 //alert("PosY: " + posY);
 oPopup.show(posX-10, posY-10, 256, 185, document.body); //for WinXP
}


function trim(str)
{
   return str.replace(/^\s*|\s*$/g,"");
}


