var kURL = 'http://backoffice.clubliaison.com/';

function display(myimage) {
 html = "<html><head><title>Sesa-Select:: Imagen</title>" +
  "</head><body leftmargin=0 " +
  "marginwidth=0 topmargin=0 marginheigth=0><center>" +
  "<img src='" + myimage + "' border=0 name=image " +
  "onload='window.resizeTo(document.image.width+12,document.image.height+30)'></center>" +
  "</body></html>";
 popup=window.open
   ('','image','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1,width=100,height=100');
 popup.document.open();
 popup.document.write(html);
 popup.document.focus();
 popup.document.close()
 };

function validaNumero(v){
patron=/[^0-9\.]/;
v.value=v.value.replace(patron,"");
}

function mOvr(src,clrOver,clrFont) {
	if (!src.contains(event.fromElement)) {
	src.style.cursor = 'hand';
	src.style.color = clrFont;
	src.bgColor = clrOver;
	}
}

function mOut(src,clrIn,clrFont) {
	if (!src.contains(event.toElement)) {
	src.style.cursor = 'default';
	src.style.color = clrFont;
	src.bgColor = clrIn;
	}
}

function popup(url,w,h){
	
	var t = (screen.availHeight/2) - (h / 2);
	var l = (screen.availWidth/2)  - (w / 2);
	var f = 'top=' + t + ', left=' + l + ', height=' + h + ', width=' + w + ', scrollbars=no'

	window.open(url,'',f);
}

function popup1(url,name,w,h){
	
	var t = (screen.availHeight/2) - (h / 2);
	var l = (screen.availWidth/2)  - (w / 2);
	var f = 'top=' + t + ', left=' + l + ', height=' + h + ', width=' + w + ', scrollbars=no'

	window.open(url,name,f);
}

function popup2(url,w,h){
	
	var t = (screen.availHeight/2) - (h / 2);
	var l = (screen.availWidth/2)  - (w / 2);
	var f = 'top=' + t + ', left=' + l + ', height=' + h + ', width=' + w + ', scrollbars=yes,menubar=yes,resizable=yes'

	window.open(url,'',f);;
}

function openCal(campo,valor,min,max,year_init,year_show){
	popup(kURL + 'includes/inc_calendar.asp?f='+valor+'&c='+campo+'&min='+min+'&max='+max+'&yi='+year_init+'&ys='+year_show,200,165);
}

function seccion_restringida(xIdContacto,xSeccion){
	
	if(xIdContacto > 0){
		document.location.href = xSeccion;
	}else{
		popup('popup/login.asp',350,200);
	}
	
}

function change_action_form(xForm,xUrl){
	xForm.action = xUrl;
	xForm.submit();
}

function modal_win(xUrl,xWidth,xHeight){
	window.showModalDialog(xUrl, window, 'scroll:no; dialogWidth:'+xWidth+'px; dialogHeight:'+xHeight+'px; resizable:no; help:no');
}