// JScript File

function AbrirEmergente(dir,nombre)
{
    window.open(dir,nombre,'height=500,width=500,status=no,resizable=no,toolbar=no,menubar=no,location=no'); 
}

			var popUp;

function ConsultarImagenes(idname1,idname2,postBack)
{
	popUp = window.open('UploadImages.aspx?formname=' + document.forms[0].name + 
		'&id1=' + idname1 + '&id2=' + idname2  +  '&postBack=' + postBack, 
		'popupcal', 
		'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=5px,left=5px,width=' + screen.width/2 + 'px,Height=600px' );
}

function ConsultarImagenesLogos(idname1,idname2,postBack)
{
	popUp = window.open('UploadImages.aspx?DirectoryFile=Logos&formname=' + document.forms[0].name + 
		'&id1=' + idname1 + '&id2=' + idname2  +  '&postBack=' + postBack, 
		'popupcal', 
		'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=5px,left=5px,width=' + screen.width/2 + 'px,Height=600px' );
}
function ConsultarImagenesFlash(idname1,idname2,postBack)
{
	popUp = window.open('UploadFlash.aspx?DirectoryFile=Flash&formname=' + document.forms[0].name + 
		'&id1=' + idname1 + '&id2=' + idname2  +  '&postBack=' + postBack, 
		'popupcal', 
		'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=5px,left=5px,width=' + screen.width/2 + 'px,Height=600px' );
}
function ConsultarImagenesNews(idname1,idname2,postBack)
{
	popUp = window.open('UploadImages.aspx?DirectoryFile=NewsImages&formname=' + document.forms[0].name + 
		'&id1=' + idname1 + '&id2=' + idname2  +  '&postBack=' + postBack, 
		'popupcal', 
		'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=5px,left=5px,width=' + 540 + 'px,Height=620px' );
}

function ConsultarImagenesProducts(idname1,idname2,postBack)
{
	popUp = window.open('UploadImages.aspx?DirectoryFile=ProductImages&formname=' + document.forms[0].name + 
		'&id1=' + idname1 + '&id2=' + idname2  +  '&postBack=' + postBack, 
		'popupcal', 
		'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=5px,left=5px,width=' + 540 + 'px,Height=620px' );
}
function ConsultarImagenesBanners(idname1,idname2,postBack)
{
	popUp = window.open('UploadImages.aspx?DirectoryFile=BannersImages&formname=' + document.forms[0].name + 
		'&id1=' + idname1 + '&id2=' + idname2  +  '&postBack=' + postBack, 
		'popupcal', 
		'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=5px,left=5px,width=' + 540 + 'px,Height=620px' );
}
function ConsultarPathLinks(idname1,idname2,postBack)
{
	popUp = window.open('UploadFiles.aspx?DirectoryFile=Files&formname=' + document.forms[0].name + 
		'&id1=' + idname1 + '&id2=' + idname2  +  '&postBack=' + postBack, 
		'popupcal', 
		'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=5px,left=5px,width=' + 540 + 'px,Height=620px' );
}
function ConsultarPathManual(idname1,idname2,postBack)
{
	popUp = window.open('UploadFiles.aspx?DirectoryFile=Files&formname=' + document.forms[0].name + 
		'&id1=' + idname1 + '&id2=' + idname2  +  '&postBack=' + postBack, 
		'popupcal', 
		'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=5px,left=5px,width=' + 540 + 'px,Height=620px' );
}
function SetValue(formName, id, newValue, postBack)
{
	eval('var theform = document.' + formName + ';');
	popUp.close();
	theform.elements[id].value = newValue;
	if (postBack)
		__doPostBack(id,'');
}	

function QuitaImagen(control,control2)
{
    control.value='';
    document.getElementById(control2).value='';
    
}

function ConsultarLinks(idname1,idname2,postBack)
{
	popUp = window.open('LnkInterno.aspx?formname=' + document.forms[0].name + 
		'&id1=' + idname1 + '&id2=' + idname2  +  '&postBack=' + postBack, 
		'popupcal', 
		'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=5px,left=5px,width=' + screen.width/2 + 'px,Height=600px' );
}

function GetDate(formName,CtrlName)    
{ 
     popUp = window.open('FrmCalendario.aspx?FormName=' + formName +  '&CtrlName=' + CtrlName, "PopUpCalendar", "width=270,height=300,top=200,left=200,toolbars=no,scrollbars=no,status=no,resizable=no");  
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}