Hola, soy nuevo en el foro!
 
tengo dos consultas:
1 - Estoy por armar un sitio web donde el menu es incluido con "include". El problema es que el menu es colapsable, entonces cuando despliego un submenu e ingreso en otra seccion, vuelve a cargar el menu pero sin desplegar ese submenu. como puedo hacer para que me quede colapsada la seccion?
 
2 - Como puedo hacer para ver el index.php y testear la web offline?
 
No soy programador, soy diseñador asi que pido disculpa por mi ignorancia.
 
 
 
-------------------------------------------------------------------
 
aqui les dejo el codigo del index.php
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="791" border="0">
  <tr>
    <td width="351" height="537" align="left" valign="top"><?php 
include("menu.htm"); 
?></td>
    <td width="430" bgcolor="#CCCCCC"> </td>
  </tr>
</table>
<p> </p>
</body>
</html>
 
-----------------------------------------------------------------------------------
 
Aqui el codigo del menu que seria incluido en todas las paginas:
 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>
<style type="text/css">
body {
	background-color: #FFFFFF;
	margin-left: 2px;
	margin-top: 2px;
	margin-right: 2px;
	margin-bottom: 2px;
}
.textos {
	font-family: tahoma;
	font-size: 12px;
}
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	color: #000000;
	text-decoration: none;
}
a:hover {
	color: #842029;
	text-decoration: none;
}
a:active {
	color: #842029;
	text-decoration: none;
}td img {display: block;}
</style>
<script type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>
<style type="text/css">
.menutitle{
	cursor:pointer;
	margin-bottom: 3px;
	width:182px;
	text-align:left;/* */
	font-family: Arial, Helvetica, sans-serif;
	font-size: 1<;
	background-color: #E6D6BB;
	background-position: left;
	font-size: 12px;
	border: 0px solid #000000;
	height: 14px;
	text-decoration: none;
	padding-top: 1px;
	padding-right: 1px;
	padding-bottom: 1px;
	padding-left: 4px;
}
 
.submenu{
	margin-bottom: 0.5em;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #CC0000;
	text-decoration: none;
}
.style1 {color: #842029}
.style2 {color: #E6D6BB}
.menutitulo {
	cursor:pointer;
	margin-bottom: 3px;
	width:165px;
	text-align:left;/* */
	font-family: tahoma;
	font-size: 1<;
	background-color: #CABCA5;
	background-position: left;
	font-size: 11px;
	border: 0px solid #000000;
	height: 25px;
	text-decoration: none;
	color: #7F1E27;
	padding: 0px;
}
</style>
 
<script type="text/javascript">
 
/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
 
var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only
 
if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}
 
function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsBy  TagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}
 
function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(off  set, end))
}
}
return returnvalue;
}
 
function onloadfunction(){
if (persistmenu=="yes"){
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=get_cookie(cookiename)
if (cookievalue!="")
document.getElementById(cookievalue).style.display  ="block"
}
}
 
function savemenustate(){
var inc=1, blockid=""
while (document.getElementById("sub"+inc)){
if (document.getElementById("sub"+inc).style.display=  ="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
document.cookie=cookiename+"="+cookievalue
}
 
if (window.addEventListener)
window.addEventListener("load", onloadfunction, false)
else if (window.attachEvent)
window.attachEvent("onload", onloadfunction)
else if (document.getElementById)
window.onload=onloadfunction
 
if (persistmenu=="yes" && document.getElementById)
window.onunload=savemenustate
 
</script>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="left" valign="top"><table width="2" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="63" colspan="3" align="center" valign="top"> </td>
      </tr>
      <tr>
        <td width="6"> </td>
        <td width="198" align="left" valign="top"><!-- Keep all menus within masterdiv-->
          <div id="masterdiv"> <br>
            <br>
            <div class="menutitle"><br>
            </div>
            <div class="menutitle" onClick="SwitchMenu('sub1')"><a href="publi_01.html" target="visor">seccion 1 </a><br>
      </div>
	<div class="menutitle" onClick="SwitchMenu('sub1')"><a href="publi_02.html" target="visor">seccion 2 </a><br>
      </div>
	<div class="menutitle" onClick="SwitchMenu('sub1')"><a href="publi_03.html" target="visor">seccion 3</a></div>
	<div class="menutitle" onClick="SwitchMenu('sub1')"><a href="publi_04.html" target="visor">seccion 4</a></div>
	<div class="menutitle" onClick="SwitchMenu('sub2')"><a href="publi_05.html" target="visor">seccion 5</a></div>
	<div class="menutitle" onClick="SwitchMenu('sub3')">seccion 6</div>
	  <span class="submenu" id="sub3">· <a href="seccion6-1.php" target="visor">Nro. 1 </a><br>
	  · Nro. 2 <br>
	  · Nro. 3 <br>
	  · Nro. 4 <br>
	  · Nro. 5 <br>
	  · Nro. 6 <br>
	  <br>
	    </span>
	  <div class="menutitle" onClick="SwitchMenu('sub6')">seccion 7</div>
	        <span class="submenu" id="sub6">
	    · <a href="prisma_01.html" target="visor">Nro. 1 </a><br>
	    ·  Nro. 2<br>
	    · <a href="prisma_03.html" target="visor"> Nro. 3<br>
	    · <a href="prisma_04.html" target="visor"> Nro. 4<br>
	    · <a href="prisma_05.html" target="visor"> Nro. 5<br>
	    · <a href="prisma_06.html" target="visor"> Nro. 6    
	    <br>
	    <br>
	    </span>
	  <div class="menutitle"></div>
          </div> </td>
        <td width="664" align="right" valign="top"> </td>
      </tr>
    </table>
    </td>
  </tr>
</table>
</body>
</html> 
   
  
 
