var openwindow;
function ShowCalendar(form,datetype,separator){
	if (!openwindow || openwindow.closed){
		win ="window.open('/RTM_v30/libraries/html/clnd.html?pbf="+form+"&datetype="+datetype+"&separator="+separator+"','Calendar','left=20,top=20,width=250,height=250,scrollbars=no,toolbar=no,menu=no')";
		openwindow=eval(win);
	}else{openwindow.focus()}
}
function CobalBorrar(dt) {
	if (!openwindow || openwindow.closed){
		win ="window.open('../pl/cobal_s.pl?lan=es&appid=RTM_LaHerradura&dt_cobal="+dt+"','CobalBorrar','left=20,top=20,width=500,height=250,scrollbars=no,toolbar=no,menu=no')";
		openwindow=eval(win);
	}else{openwindow.focus()}	
}
function CobalExpedientes(dt) {
	if (!openwindow || openwindow.closed){
		win ="window.open('../pl/cobal_expedientes_p.pl?lan=es&appid=RTM_LaHerradura&dt_cobal="+dt+"','CobalExpedientes','left=20,top=20,width=500,height=250,scrollbars=yes,toolbar=no,menu=no,resizable=yes')";
		openwindow=eval(win);
	}else{openwindow.focus()}	
}
function AbonosCheck(dt) {
	alert("En construccion... disculpe las molestias")
}
function AbonosCheck1(dt) {
	var dtp =dt.split("-");
	var periodo = dtp[0]+dtp[1];
	if (!openwindow || openwindow.closed){
		win ="window.open('../pl/verificar_cobal_abonos_OPICO.pl?lan=es&appid=RTM_LaHerradura&i8_periodo="+periodo+"','Verificacion','left=20,top=20,width=500,height=250,scrollbars=no,toolbar=no,menu=no')";
		openwindow=eval(win);
	}else{openwindow.focus()}	
}
function CobalesMandamiento(){
	if(document.form.dt_emision.value==""){alert("Seleccione la fecha de emision del recibo")}
	else{document.form.submit();}
}
