Set oPopup = window.createPopup()

Sub ContextMenu

	lefter = window.event.clientY
	topper = window.event.clientX - window.event.srcElement.offsetLeft
	oPopup.document.body.innerHTML = phPopup.innerHTML
	oPopup.show topper, lefter, 150, 28, document.body

End Sub

Function document_oncontextmenu
	Call ContextMenu
	document_oncontextmenu = False
End Function

Sub document_onreadystatechange

	On Error Resume Next

	strContents = document.body.innerHTML

	for i=0 To document.all.length
		if  document.all(i).tagName = "META" Then
			if  document.all(i).name = "author" Then
				strAuthor = document.all(i).content
			End If
			if  document.all(i).name = "source" Then
				strSource = document.all(i).content
			End If
			if  document.all(i).name = "category" Then
				strCategory = document.all(i).content
			End If
		End If
	Next 

	'DIV DEL POPUP

	strTitulo = ""

	strTitulo = strTitulo  + "<div oncontextmenu=""return false"" id=""phPopup"" style=""position:absolute;display: none"" >"
	strTitulo = strTitulo  + "<table width=""100%"" border=""2"" cellspacing=""0"" cellpadding=""2"" bgcolor=""#e3e3e3"" bordercolorlight=""#FFFFFF"" bordercolordark=""#000000"">"
	strTitulo = strTitulo  + "<tr><td><font oncontextmenu=""return false""  face=""Verdana, Arial, Helvetica, sans-serif"" size=""-1"" >www.planthogar.net</font></td></tr>"
	strTitulo = strTitulo  + "</table>" 
	strTitulo = strTitulo  + "</div>" 

	'MARCO GENERAL

	strTitulo = strTitulo + "<table width=""100%"" height=""100%"" border=0 cellspacing=0 cellpadding=0 align=center bgcolor=#999999>"
	strTitulo = strTitulo + "<tr><td><BR>"

	'MARCO PAGINA
	strTitulo = strTitulo + "<table width=""750"" border=1 cellspacing=0 cellpadding=0 align=center bgcolor=#FFFFFF bordercolor=#000000>"
	strTitulo = strTitulo + "<tr><td><BR><BR><BR>"

	'MEMBRETE	  
	strTitulo = strTitulo + "<table width=""98%"" border=0 cellspacing=2 cellpadding=0  align=""center"" >"
	strTitulo = strTitulo + "<tr>"
	strTitulo = strTitulo + "<td align=""left"">"
	strTitulo = strTitulo + "<img src=""../images/planthogarxx.gif"" border=""0"" alt=""Acceso a Planthogar"">"
	strTitulo = strTitulo + "<a class=nota href=""/"" target=""_self"">"
	strTitulo = strTitulo + "<CENTER>http://www.planthogar.net</CENTER>"
	strTitulo = strTitulo + "</a>"
	strTitulo = strTitulo + "</td>"

	'BANNER PUBLICIDAD

	strTitulo = strTitulo + "<td align=""right"">"
	strTitulo = strTitulo + "<iframe src=""http://impes.tradedoubler.com/imp/pool/iframe/6827/313546"" width=468 height=60 frameborder=0 border=0 marginwidth=0 marginheight=0 scrolling=""no""></iframe>"
	strTitulo = strTitulo + "</td>"
	strTitulo = strTitulo + "</tr>"
	strTitulo = strTitulo + "</table><BR><BR><BR>"

	' CUADRO TITULO 
	strTitulo = strTitulo + "<table width=""90%"" border=0 cellspacing=0 cellpadding=0  align=""center"" >"
	strTitulo = strTitulo + "<tr>"
	strTitulo = strTitulo + "<td colspan=""2"" class=""titulo2"" height=""20"">"
	strTitulo = strTitulo + "<img src=""../images/ico_notes.gif"" align=""absmiddle"">&nbsp;"
	strTitulo = strTitulo + "<font size=""3"">" + Mid(document.title,17) + "</font>"
	strTitulo = strTitulo + "</tr>"
	strTitulo = strTitulo + "<tr>"
	strTitulo = strTitulo + "<td colspan=""2"" >"
	strTitulo = strTitulo + "<img src=""../images/cell_magenta.gif"" height=""1"" width=""550"">"
	strTitulo = strTitulo + "</td>"
	strTitulo = strTitulo + "</tr>"
	strTitulo = strTitulo + "<tr>"
	strTitulo = strTitulo + "<td align=""left"" ><BR>"
	If strSource <> "Autor" Then
		strTitulo = strTitulo + "<img src=""../images/ico_web.gif"" align=""absmiddle"">&nbsp;"
		strTitulo = strTitulo + " <b>Fuente: </b> " + "<a class=""titulo2"" href=""" + strSource + """ target=""_blank"">" + strSource + "</a>"
		strTitulo = strTitulo + "<br>"
		strTitulo = strTitulo + "<img src=""../images/inv.gif"" width=""16"" height=""16"" align=""absmiddle"">&nbsp;"
		strTitulo = strTitulo + " (puesto por <b>" + strAuthor + "</b>)"
	Else
		strTitulo = strTitulo + "<img src=""../images/ico_face.gif"" align=""absmiddle"">&nbsp;"
		strTitulo = strTitulo + " <b>Autor: </b>" + strAuthor
		strTitulo = strTitulo + "<br>"
	End If

	strTitulo = strTitulo + "<br>"
	strTitulo = strTitulo + "</td>"
	strTitulo = strTitulo + "<td valign=""top"" align=""right"" ><BR>"
	strTitulo = strTitulo + "<img src=""../images/ico_task.gif"" align=""absmiddle"">&nbsp;"
	If document.fileUpdatedDate <> "" Then
		strTitulo = strTitulo + " Actualizado: " + FormatDateTime(document.LastModified,vbShortDate)
	Else
		strTitulo = strTitulo + " Creado: " + FormatDateTime(document.fileCreated,vbShortDate)
	End If
	strTitulo = strTitulo + "<br><img src=""../images/inv.gif"" width=""16"" height=""16"" align=""absmiddle"">&nbsp;"
	strTitulo = strTitulo + "<font class=""nota"">CATEGORIA: " + strCategory + "</font>"
	strTitulo = strTitulo + "</td>"
	strTitulo = strTitulo + "</tr>"
	strTitulo = strTitulo + "</table><BR>"

	' CUADRO CONTENIDO
	strTitulo = strTitulo + "<table width=""90%"" style=""BORDER:1px solid #EAEEFF"" border=0 cellspacing=0 cellpadding=15 align=center >"
	strTitulo = strTitulo + "<tr><td>"
	
	'PIE DE PAGINA

	strEnd = "</td></tr></table>"

	strEnd = strEnd + "<table width=""90%"" border=0 cellspacing=10 cellpadding=0 align=center bgcolor=#E2EBEB>"
	strEnd = strEnd + "<tr>"
	strEnd = strEnd + "<td>"
	strEnd = strEnd + "<img src=""../images/ico_home.gif"" align=""absmiddle"">&nbsp;"
	strEnd = strEnd + "<a href=""../"">Portada</a>"
	strEnd = strEnd + "</td>"
	strEnd = strEnd + "<td>"
	strEnd = strEnd + "<img src=""../images/ico_face.gif"" align=""absmiddle"">&nbsp;"
	strEnd = strEnd + "<a href=""../foro/forumlist.asp"">Foros</a>"
	strEnd = strEnd + "</td>"
	strEnd = strEnd + "<td>"
	strEnd = strEnd + "<img src=""../images/ico_sheet.gif"" align=""absmiddle"">&nbsp;"
	strEnd = strEnd + "<a href=""../enciclopedia/"">Enciclopedia</a>"
	strEnd = strEnd + "</td>"
	strEnd = strEnd + "<td>"
	strEnd = strEnd + "<img src=""../images/ico_notes.gif"" align=""absmiddle"">&nbsp;"
	strEnd = strEnd + "<a href=""../releases/"">Documentos</a>"
	strEnd = strEnd + "</td>"
	strEnd = strEnd + "<td>"
	strEnd = strEnd + "<img src=""../images/ico_photo.gif"" width=20 align=""absmiddle"">&nbsp;"
	strEnd = strEnd + "<a href=""../album/"">Album</a>"
	strEnd = strEnd + "</td>"
	strEnd = strEnd + "<td>"
	strEnd = strEnd + "<img src=""../images/ico_web.gif"" align=""absmiddle"">&nbsp;"
	strEnd = strEnd + "<a href=""../direcciones/"">Enlaces</a>"
	strEnd = strEnd + "</td>"
	strEnd = strEnd + "<td>"
	strEnd = strEnd + "<img src=""../images/ico_download.gif"" align=""absmiddle"">&nbsp;"
	strEnd = strEnd + "<a href=""../downloads/"">Downloads</a>"
	strEnd = strEnd + "</td>"
	strEnd = strEnd + "</tr>"
	strEnd = strEnd + "</table>"

	strEnd = strEnd + "<table width=""90%"" border=0 cellspacing=2 cellpadding=0 align=center bgcolor=#98B8B8>"
	strEnd = strEnd + "<tr>"
	strEnd = strEnd + "<td align=center colspan=""7"" >"
	strEnd = strEnd + "<a href=""http://www.planthogar.net""><font color=#FFFFFF><b>WWW.PLANTHOGAR.NET - Todos los derechos reservados</b></font></a>"
	strEnd = strEnd + "</td>"
	strEnd = strEnd + "</tr>"
	strEnd = strEnd + "</table><BR><BR>"

	'CIERRA MARCO PAGINA
	strEnd = strEnd + "</td></tr></table><BR><BR>"

	'CIERRA CUADRO GRANDE
	strEnd = strEnd + "</td></tr></table>"

	document.body.innerHTML = strTitulo & strContents & strEnd

End Sub
