function PopUp(mypage, myname, w, h) 
{
	scrollbars= "no";
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	abierta = 1;
	winprops = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl + ",scrollbars=" + scroll + ",resizable";
	win = window.open(mypage, myname, winprops);
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function PopUpNav(mypage, myname, w, h) 
{
	scrollbars= "no"
	var winl = (screen.width - w) / 2
	var wint = ((screen.height - h) / 2)-100
	abierta = 1
	winprops = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl + ",scrollbars=" + scroll + ",resizable,toolbar=yes"
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus() }
}

function PopUpAll(mypage, myname, w, h) 
{
	scrollbars= "yes"
	var winl = (screen.width - w) / 2
	var wint = ((screen.height - h) / 2)-100
	abierta = 1
	winprops = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl + ",scrollbars=yes,resizable,toolbar=yes, location=yes, menubar=yes"
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus() }
}

function PopUpAll2(mypage, myname, w, h) 
{
	scrollbars= "yes"
	var winl = (screen.width - w) / 2
	var wint = ((screen.height - h) / 2)-100
	abierta = 1
	winprops = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl + ",scrollbars=yes,resizable,toolbar=yes, location=yes, menubar=yes"
	win = window.open(mypage, myname, winprops)

}

function PopUpSet(mypage, myname, w, h,scrollbars ,toolbar ,location ,menubar ,resice ) 
{
	if (resice=="yes") { resiced=",resizable" } else { resiced="" }

	var winl = (screen.width - w) / 2
	var wint = ((screen.height - h) / 2)-100
	abierta = 1
	winprops = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl + ",scrollbars=" + scrollbars + ",toolbar=" + toolbar + ", location=" + location + ", menubar=" + menubar + resiced
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus() }
}

function PopUpSetPos(mypage, myname, w, h, posx, posy, scrollbars ,toolbar ,location ,menubar ,resice ) 
{
	if (resice=="yes") { resice=",resiceable" } else { resice="" }

	var winl = (screen.width - w) / 2
	var wint = ((screen.height - h) / 2)-100
	abierta = 1
	winprops = "height=" + h + ",width=" + w + ",top=" + posy + ",left=" + posx + ",scrollbars=" + scrollbars + ",toolbar=" + toolbar + ", location=" + location + ", menubar=" + menubar + resice
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus() }
}

function PopAyuda(IDAyuda) 
{
	PopUpSet('intranet_popup_ayuda.asp?IDAyuda=' + IDAyuda,'myAyuda','268','300','yes','no','no','no','no')
	
}

function PopAyudaWH(IDAyuda,Width,Height) 
{
	PopUpSet('intranet_popup_ayuda.asp?IDAyuda=' + IDAyuda,'myAyuda',Width,Height,'yes','no','no','no','no')
	
}

function PopSiNo(ID,Msg,Titulo,Redir) 
{
	PopUpSet('intranet_popup_sino.asp?ID=' + ID + '&Msg=' + Msg+ '&Titulo=' + Titulo + '&Redir=' + Redir,'MySiNo','380','250','yes','no','no','no','no')
}

function PopSiNoMover(ID,Msg,Titulo,Redir) 
{
	PopUpSet('intranet_popup_mover_foro.asp?ID=' + ID + '&Msg=' + Msg+ '&Titulo=' + Titulo + '&Redir=' + Redir,'MySiNo','380','250','yes','no','no','no','no')
}


function PopUsuario(IDUser) 
{	
	PopUpSet("/intranet_foro_usuario.asp?ID=" + IDUser,"MyUserForo","460","390","yes","no","no","no","no")	
}

function PopUsuarioActive(Grupo) 
{	
	PopUpSet("/intranet_user_active.asp?grupo="+Grupo,"MyUserForo","460","390","yes","no","no","no","no")	
}

function PopUsuarioActive2(Grupo) 
{	
	PopUpSet("/intranet_user_active.asp?grupo="+Grupo,"MyUserForo","660","390","yes","no","no","no","no")	
}

function PopAviso(Tittle,Msg) 
{
	PopUpSet('intranet_popup_aviso.asp?Taviso=' + Tittle + '&Msg=' + Msg,'myAviso','285','340','yes','no','no','no','no')
	
}

function PopTemaForo(Categoria, IDmen, Selpag, Busqueda,Acc) 
{
	PopUpSet('intranet_popup_tema_foro.asp?Acc=' + Acc + '&IDmem=' + IDmen + '&Cat=' + Categoria + '&SelPag=' + Selpag + '&Busqueda=' + Busqueda,'myTemaForo','480','380','yes','no','no','no','no')
	
}

function PopEncuesta() 
{
	PopUpSet('intranet_popup_encuesta.asp?PopEncuesta=true','myEncuesta','285','380','yes','no','no','no','no')
	
}

function PopLlamada(Modo,Tipo) 
{	
	PopUpSet("intranet_popup_llamada.asp?Modo=" + Modo + "&Tipo=" + Tipo,"MyUserAviso","450","425","yes","no","no","no","no")	
}

function OpenFoto(ID,W,H) 
{	
	// if (W > screen.width )  { W = screen.width - 80 }
	// if (H > screen.height)  { H = screen.height - 80 }
	
	// PopUpSet("intranet_album_foto_popup.asp?ID=" + ID +"&W=" + W + "&H=" + H,"MyFoto",W,H,"yes","no","no","no","no")	
	PopUpSet("intranet_album_foto_popup.asp?ID=" + ID ,"MyFoto",W,H,"yes","no","no","no","no")	
}

function PopMiAgencia() 
{	
	PopUpSet("/intranet_mi_agencia.asp","MyUserForo","460","390","yes","no","no","no","no")	
}


function PopOferta(IDOferta) 
{
	PopUpSet('intranet_popup_oferta.asp?IDOferta=' + IDOferta,'myOferta','400','460','yes','no','no','no','no')
	
}

function PopOfertaObs(IDOferta) 
{
	PopUpSet('intranet_popup_oferta_Observaciones.asp?IDOferta=' + IDOferta,'myOferta','400','460','yes','no','no','no','no')
	
}


function PopOfertaGran(IDOferta,w,h) 
{
	PopUpSet('popup_oferta_marcos.asp?gran=TRUE&IDOferta=' + IDOferta,'myOferta',w,h,'yes','no','no','no','yes')
	
}

function PopContenidoGran(IDOferta,w,h) 
{
	PopUpSet('popup_oferta_cuerpo.asp?gran=TRUE&IDOferta=' + IDOferta,'myOferta',w,h,'yes','no','no','no','yes')
	
}

function PopUpGo(mypage, myname, w, h) 
{
	var winl = (screen.width - w) / 2
	var wint = ((screen.height - h) / 2)-100
	abierta = 1
	winprops = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl + ",scrollbars=yes,resizable,toolbar=yes, location=no, menubar=no"
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus() }
}

function PopMay(May,w,h) 
{
	PopUpSet('popup_may_marcos.asp?May=' + May,'myOferta',w,h,'yes','no','no','no','no')
	
}

function WOpen(url,win,prop) { window.open(url,win,prop) }
