var nowSelectedData;
function getCalendar(id)  {
   var objDate = document.getElementById(id);
   var val;
   var isMSIE= (navigator.appName == "Microsoft Internet Explorer");
   if (isMSIE) {    
   		val = window.showModalDialog(url_base+"js/calendar.jsp","","dialogwidth=150pt;dialogheight=170pt;status=no;help=no;")
   		if (val  != -1 && val  != null) {
      		objDate.value = val;
   		}
   }else{
   		nowSelectedData = objDate;
   		var width = 300;
   		var height = 300; 
		var x = parseInt(screen.width / 2.0) - (width / 2.0);  
    	var y = parseInt(screen.height / 2.0) - (height / 2.0);   
    	var index = 0;
 		while(id.indexOf('.',index) != -1){
  			id = id.replace('.','_');
  			index = id.indexOf('.',index);
    	}
   		var win = window.open(url_base+"js/calendar.jsp?target="+id, "mcePopup", "top=" + y + ",left=" + x + ",scrollbars=no,dialog=yes,modal=yes,width=" + width + ",height=" + height + ",resizable=no" ); 
        eval('try { win.resizeTo(width, height); } catch(e) { }'); 
        win.focus();   
   }
}

