/* function for opening popup window */
function openpopup(url,popup_name,height,width,other_properties)
{
	var left		= parseInt((screen.width-350)/2);
	var top			= parseInt((screen.height-300)/2)	
	var win_options = 'height=300,width=350,resizable=yes,' 
	+ 'scrollbars=yes,left=' + left + ',top=' + top;
//	alert(toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=600,height=500');
	window.open(url,popup_name,win_options);
//	window.open(url);
}
function checkDate(date_value)
{
	//valid format is DD/MM/YYYY
	
	var val_chk_dt = date_value.split("/");
	new_date = new Date(val_chk_dt[2],val_chk_dt[1]-1,val_chk_dt[0], 00, 00, 00);
	//var dateexpr =/^\([0-9][0-9]\)\\-\([0-9][0-9]\)\\-\([0-9]{4}\)/;
	//var dateexpr =/^\([0-9][0-9]\)\/\([0-9][0-9]\)\/\([0-9]{4}\)/; 

	if(new_date.getFullYear()!=val_chk_dt[2]||new_date.getDate()!=val_chk_dt[0]||new_date.getMonth()!=val_chk_dt[1]-1){
		alert("Please enter valid date in DD/MM/YYYY format!");
			return false;
	}	
	return true;

}
/// Tool Tips

function doTooltip(e, msg) {//alert(msg);
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ){ 
	return; 
  }
  Tooltip.show(e, msg);
}
function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.hide();
}