var temp, temp2, cookieArray, cookieArray2, cookieCount;
function initiate(){
  cookieCount=0;
  if(document.cookie){
    cookieArray=document.cookie.split(";");
    cookieArray2=new Array();
    for(i in cookieArray){
      cookieArray2[cookieArray[i].split("=")[0].replace(/ /g,"")]=cookieArray[i].split("=")[1].replace(/ /g,"");
    }
  }
  cookieArray=(document.cookie.indexOf("state=")>=0)?cookieArray2["state"].split(","):new Array();
  temp=document.getElementById("containerul");
  for(var o=0;o<temp.getElementsByTagName("li").length;o++){
    if(temp.getElementsByTagName("li")[o].getElementsByTagName("ul").length>0){
      temp2 = document.createElement("span");
      temp2.className = "symbols";
      temp2.style.backgroundImage = (cookieArray.length>0)?((cookieArray[cookieCount]=="true")?"url(images/minus.png)":"url(images/plus.png)"):"url(images/plus.png)";
      temp2.onclick=function(){
        showhide(this.parentNode);
        writeCookie();
      }
      temp.getElementsByTagName("li")[o].insertBefore(temp2,temp.getElementsByTagName("li")[o].firstChild)
      temp.getElementsByTagName("li")[o].getElementsByTagName("ul")[0].style.display = "none";
      if(cookieArray[cookieCount]=="true"){
        showhide(temp.getElementsByTagName("li")[o]);
      }
      cookieCount++;
    }
    else{
      temp2 = document.createElement("span");
      temp2.className = "symbols";
      //temp2.style.backgroundImage = "url(images/page.png)";
      temp.getElementsByTagName("li")[o].insertBefore(temp2,temp.getElementsByTagName("li")[o].firstChild);
    }
  }
}

function showhide(el){
  el.getElementsByTagName("ul")[0].style.display=(el.getElementsByTagName("ul")[0].style.display=="block")?"none":"block";
  el.getElementsByTagName("span")[0].style.backgroundImage=(el.getElementsByTagName("ul")[0].style.display=="block")?"url(images/minus.png)":"url(images/plus.png)";
}

function writeCookie(){ // Runs through the menu and puts the "states" of each nested list into an array, the array is then joined together and assigned to a cookie.
  cookieArray=new Array()
  for(var q=0;q<temp.getElementsByTagName("li").length;q++){
    if(temp.getElementsByTagName("li")[q].childNodes.length>0){
      if(temp.getElementsByTagName("li")[q].childNodes[0].nodeName=="SPAN" && temp.getElementsByTagName("li")[q].getElementsByTagName("ul").length>0){
        cookieArray[cookieArray.length]=(temp.getElementsByTagName("li")[q].getElementsByTagName("ul")[0].style.display=="block");
      }
    }
  }
  document.cookie="state="+cookieArray.join(",")+";expires="+new Date(new Date().getTime() + 365*24*60*60*1000).toGMTString();
}


function links_l()
{
document.write("<table width='210' border='0' cellspacing='0' cellpadding='0'>");



document.write("        <tr >");
document.write("          <td align='right' valign='top'>");
document.write("		  <table width='210' border='0' cellspacing='0' cellpadding='0'>");
document.write("              <tr align='right' valign='top'>");
document.write("                <td background='images/Index_24.jpg'>&nbsp;</td>");
document.write("                <td width='180' height='20' background='images/Index_19.jpg' class='rightlinks' > مجلة الإصلاح الإقتصادى&nbsp;&nbsp;&nbsp;</td>");
document.write("              </tr>");
document.write("            </table>");
document.write("</td>");
document.write("        </tr>");
document.write("        <tr >");
document.write("          <td align='right' valign='top'>");
document.write("		  <table width='100%' border='0' cellspacing='0' cellpadding='0'>");
document.write("              <tr align='right' valign='middel'>");
document.write("                <td width='100%' colspan=2 height='124' background='images/Index_24.jpg'  style='padding:10' align=center ><div align='center'>");
/*document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='82' height='104'>");
document.write("  <param name='movie' value='images/mag.swf'>");
document.write("  <param name='quality' value='high'>");
document.write("  <embed src='images/mag.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='82' height='104'></embed>");
document.write("</object>");*/
document.write("  <a href='http://www.cipe-arabia.org/mag_art.asp?id=25' target='_blank'><img src='images/mag.jpg' border='0'></a>");
document.write("			   </div></td>");

document.write("              </tr>");
 document.write("  <tr align='right' valign='top'>");
 document.write("    <td width='90%' height='25' valign='middle'class='rightlinks' dir='rtl' ><a class='link1' href='magazine.asp' target='_self'>الأعداد السابقه</a></td>");
 document.write("     <td width='10%' align='center' valign='middle'><img src='images/white_but.gif' width='6' height='6'></td>");
document.write("   </tr>");

document.write("            </table>");
document.write("</td>");
document.write("        </tr>");











document.write("        <tr>");
 document.write("         <td align='right' valign='top'>");
 document.write("<table width='210' border='0' cellspacing='0' cellpadding='0'>");
 document.write("             <tr align='right' valign='top'>");
 document.write("               <td background='images/Index_24.jpg'>&nbsp;</td>");
 document.write("               <td width='180' height='20' background='images/Index_19.jpg' class='rightlinks' >حوكمة الشركات .. قضايا واتجاهات &nbsp;&nbsp;&nbsp;</td>");
 document.write("             </tr>");
 document.write("           </table>");
 document.write("</td>");
 document.write("       </tr>");
 document.write("       <tr>");
 document.write("         <td align='right' valign='top' background='images/Index_24.jpg'>");
 document.write("<table width='210' height='120' border='0' cellspacing='0' cellpadding='0'>");
 document.write("             <tr>");
 document.write("                <td align='right' valign='top'>");
document.write(" <table width='100%' border='0' cellspacing='0' cellpadding='0'>");
 document.write("  <tr align='right' valign='top'>");
 document.write("    <td width='90%' height='25' valign='Baseline' class='rightlinks' dir='rtl' lang='ar-eg' >حوكمة الشركات .. قضايا واتجاهات <br> العدد الثامن عشر (<a class='link1' href='http://www.hawkama.net/files/pdf/CGT_18_AR.pdf' target='_blank'>عربى</a>/<a class='link1'  href='http://www.hawkama.net/files/pdf/CGT_18_EN.pdf' target='_blank'>انجليزى</a>/<a class='link1'  href='http://www.hawkama.net/files/pdf/CGT_18_FR.pdf' target='_blank'>فرنسى</a>)</td>");
document.write("     <td width='10%' align='center' valign='Baseline'><img src='images/white_but.gif' width='6' height='6'></td>");
document.write("   </tr>");
document.write("   <tr align='center' valign='top'>");
document.write("     <td width='100%' colspan='2' height='25' align='center' valign='middle' style='padding:5'><a href='http://www.hawkama.net/Periodicalnews.asp?id=5' target='_blank'><img src='images/CG18.jpg' width='71' border='0'></a></td>");
document.write("   </tr>");
 document.write("  <tr align='right' valign='top'>");
 document.write("    <td width='90%' height='25' valign='middle'class='rightlinks' dir='rtl' ><a class='link1' href='http://www.hawkama.net/Periodicalnews.asp?id=5' target='_self'>جميع النشرات</a></td>");
document.write("     <td width='10%' align='center' valign='middle'><img src='images/white_but.gif' width='6' height='6'></td>");
document.write("   </tr>");
document.write(" </table>");
document.write(" </td>");
document.write("             </tr>");
document.write("            <tr>");
document.write("              <td align='left' valign='top'><a class='link2' href='http://www.hawkama.net/Periodicalnews.asp?id=5' target='_blank'>&nbsp;&nbsp;..المزيد</a></td>");
document.write("           </tr>");
document.write("          </table>");
document.write(" </td>");
document.write("         </tr>");









document.write("        <tr>");
 document.write("         <td align='right' valign='top'>");
 document.write("<table width='210' border='0' cellspacing='0' cellpadding='0'>");
 document.write("             <tr align='right' valign='top'>");
 document.write("               <td background='images/Index_24.jpg'>&nbsp;</td>");
 document.write("               <td width='180' height='20' background='images/Index_19.jpg' class='rightlinks' >النشره العربية &nbsp;&nbsp;&nbsp;</td>");
 document.write("             </tr>");
 document.write("           </table>");
 document.write("</td>");
 document.write("       </tr>");
 document.write("       <tr>");
 document.write("         <td align='right' valign='top' background='images/Index_24.jpg'>");
 document.write("<table width='210' height='120' border='0' cellspacing='0' cellpadding='0'>");
 document.write("             <tr>");
 document.write("                <td align='right' valign='top'>");
document.write(" <table width='100%' border='0' cellspacing='0' cellpadding='0'>");
document.write("  <tr align='right' valign='top'>");
 document.write("    <td width='90%' height='25' valign='middle'class='rightlinks'><a class='link1' href='news/February2010.htm' target='_blank'>النشرة العربية - فبراير 2010    </a></td>");
document.write("     <td width='10%' align='center' valign='middle'><img src='images/white_but.gif' width='6' height='6'></td>");
document.write("   </tr>");
document.write("   <tr align='right' valign='top'>");
document.write("     <td width='90%' height='25' valign='middle' class='rightlinks' dir='rtl' lang='ar-eg'><a class='link1' href='news/January2010.htm' target='_blank'>النشرة العربية - يناير 2010</a></a></td>");
 document.write("    <td width='10%' align='center' valign='middle'><img src='images/white_but.gif' width='6' height='6'></td>");
 document.write("  </tr>");
document.write("   <tr align='right' valign='top'>");
document.write("     <td width='90%' height='25' valign='middle'class='rightlinks'><a class='link1' href='allnews.asp' target='_self'>جميع النشرات</a></td>");
document.write("     <td width='10%' align='center' valign='middle'><img src='images/white_but.gif' width='6' height='6'></td>");
document.write("   </tr>");
document.write(" </table>");
document.write(" </td>");
document.write("             </tr>");
document.write("            <tr>");
document.write("              <td align='left' valign='top'><a class='link2' href='news.asp' target='_blank'>&nbsp;&nbsp;..المزيد</a></td>");
document.write("           </tr>");
document.write("          </table>");
document.write(" </td>");
document.write("         </tr>");







document.write("        <tr >");
document.write("          <td align='right' valign='top'>");
document.write("		  <table width='210' border='0' cellspacing='0' cellpadding='0'>");
document.write("              <tr align='right' valign='top'>");
document.write("                <td background='images/Index_24.jpg'>&nbsp;</td>");
document.write("                <td width='180' height='20' background='images/Index_19.jpg' class='rightlinks' > معهد علوم التنمية&nbsp;&nbsp;&nbsp;</td>");
document.write("              </tr>");
document.write("            </table>");
document.write("</td>");
document.write("        </tr>");
document.write("        <tr >");
document.write("          <td align='right' valign='top'>");
document.write("		  <table width='100%' border='0' cellspacing='0' cellpadding='0'>");
document.write("              <tr align='right' valign='middel'>");
document.write("                <td width='100%' colspan=2 height='124' background='images/Index_24.jpg'  style='padding:10' align=center ><div align='center'>");
document.write("  <a href='http://developmentinstitute.org/' target='_blank'><img src='images/dev-inst-banner.jpg' border='0'></a>");
document.write("			   </div></td>");

document.write("              </tr>");

document.write("            </table>");
document.write("</td>");
document.write("        </tr>");






document.write("        <tr >");
document.write("          <td align='right' valign='top'>");
document.write("		  <table width='210' border='0' cellspacing='0' cellpadding='0'>");
document.write("              <tr align='right' valign='top'>");
document.write("                <td background='images/Index_24.jpg'>&nbsp;</td>");
document.write("                <td width='180' height='20' background='images/Index_19.jpg' class='rightlinks' > الشرق الأوسط وشمال أفريقيا&nbsp;&nbsp;&nbsp;</td>");
document.write("              </tr>");
document.write("            </table>");
document.write("</td>");
document.write("        </tr>");
document.write("        <tr>");
document.write("          <td align='right' valign='top' background='images/Index_24.jpg'>");
document.write("		  <table width='210' border='0' cellspacing='0' cellpadding='0'>");
document.write("              <tr align='right' valign='top'> ");
document.write("                <td align='right'>");
document.write(" <table align='right' width='210' height='73' border='0' cellspacing='0' cellpadding='0'>");
document.write("                   <tr align='right' valign='top'>");
document.write("                     <td width='210'  align='right'  dir='rtl'>");                  
document.write(" 				<ul id='containerul'>");
document.write("   <li>");
document.write("     <span  class='staticsmall'>&nbsp;تصنيف البلاد&nbsp;</span>	");	
document.write("     <ul>");
document.write("       <li>");
document.write("        <img src='images/page.png' > <a href='artcountry.asp?countid=13' class='rightlinks'>المنطقة العربية</a>&nbsp;");
document.write("       </li>");
document.write("       <li>");
document.write("        <img src='images/page.png' > <a href='artcountry.asp?countid=2' class='rightlinks'>الأردن</a>&nbsp;");
document.write("       </li>");
document.write("       <li>");
document.write("        <img src='images/page.png' > <a href='artcountry.asp?countid=3' class='rightlinks'>لبنان</a>&nbsp;");
document.write("       </li>");
document.write("       <li>");
document.write("        <img src='images/page.png' > <a href='artcountry.asp?countid=7' class='rightlinks'>تونس</a>&nbsp;");
document.write("       </li>");
document.write("       <li>");
document.write("        <img src='images/page.png' > <a href='artcountry.asp?countid=9' class='rightlinks'>العراق</a>&nbsp;");
document.write("        </li>")
document.write("        <li>");
document.write("        <img src='images/page.png' > <a href='artcountry.asp?countid=10' class='rightlinks'>فلسطين</a>&nbsp;");
document.write("        </li>")
document.write("       <li>");
document.write("        <img src='images/page.png' > <a href='artcountry.asp?countid=1' class='rightlinks'>مصر</a>&nbsp;");
document.write("     </li>")
document.write("       <li>");
document.write("        <img src='images/page.png' > <a href='artcountry.asp?countid=12'  class='rightlinks'>اليمن</a>&nbsp;");
document.write("     </li>")
document.write("       <li>");
document.write("        <img src='images/page.png' > <a href='artcountry.asp?countid=8'  class='rightlinks'>تركيا</a>&nbsp;");
document.write("     </li>")
document.write("       <li>");
document.write("        <img src='images/page.png' > <a href='artcountry.asp?countid=14'  class='rightlinks'>البحرين</a>&nbsp;");
document.write("     </li>")
document.write("    </ul>");
document.write("  </li>");
document.write("				</ul>");
document.write("				<br></td>");
document.write("                   </tr>");
document.write("                 </table>");
//initiate();	
document.write("</td>");
document.write("              </tr>");
document.write("            </table>");
document.write("</td>");
document.write("        </tr>");











document.write("        <tr >");
document.write("          <td align='right' valign='top'>");
document.write("		  <table width='210' border='0' cellspacing='0' cellpadding='0'>");
document.write("              <tr align='right' valign='top'>");
document.write("                <td background='images/Index_24.jpg'>&nbsp;</td>");
document.write("                <td width='180' height='20' background='images/Index_19.jpg' class='rightlinks' >الموقع الإفتراضى لجمعيات الأعمال&nbsp;&nbsp;&nbsp;</td>");
document.write("              </tr>");
document.write("            </table>");
document.write("</td>");
document.write("        </tr>");
document.write("        <tr>");
document.write("          <td align='right' valign='top' background='images/Index_24.jpg'>");
document.write("		  <table width='210' border='0' cellspacing='0' cellpadding='0'>");
document.write("              <tr align='right' valign='top'> ");
document.write("                <td colspan='3'>");
document.write(" <table width='210' height='73' border='0' cellspacing='0' cellpadding='0'>");
 document.write("                   <tr align='right' valign='top'>");
 document.write("                     <td width='90%' ><a class='link1' href='http://www.cipe-arabia.org/vba' target='_blank'>موقع مخصص لمجالس إدارة الجمعيات<br> و العاملين بها</a></td>");
 document.write("                     <td width='10%' align='center' valign='baseline'><img src='images/white_but.gif' width='6' height='6'></td>");
 document.write("                   </tr>");
 document.write("                 </table>");
 document.write("</td>");
document.write("              </tr>");
document.write("              <tr align='right' valign='top'> ");
document.write("                <td width='60' height='50'>&nbsp;</td>");
 document.write("               <td width='100'><a href='http://www.cipe-arabia.org/vba' target='_blank'><img src='images/Index_32.gif' width='100' height='50' border='0'></a></td>");
document.write("                <td width='50' height='50'></td>");
document.write("              </tr>");
document.write("            </table>");
document.write("</td>");
document.write("        </tr>");



document.write("       <tr>");
document.write("          <td align='right' valign='top'>");
document.write("		  <table width='210' border='0' cellspacing='0' cellpadding='0'>");
 document.write("             <tr align='right' valign='top'>");
 document.write("               <td background='images/Index_24.jpg'>&nbsp;</td>");
document.write("                <td width='180' height='20' background='images/Index_19.jpg' class='rightlinks' > للإشتراك&nbsp;&nbsp;&nbsp;</td>");
document.write("              </tr>");
document.write("            </table>");
document.write("			</td>");
document.write("        </tr>");
document.write("        <tr>");
document.write("          <td height='60' align='right' valign='top' background='images/Index_24.jpg'>");
document.write("		  <table width='100%' border='0' cellspacing='0' cellpadding='0'>");
 document.write(" <tr align='right' valign='top'>");
 document.write("   <td width='90%' height='25' valign='middle'><a class='link1' href='print.asp' target='_blank'>مطبوعات مجانية</a></td>");
 document.write("   <td width='10%' align='center' valign='middle'><img src='images/white_but.gif' width='6' height='6'></td>");
 document.write(" </tr>");
 document.write(" <tr align='right' valign='top'>");
 document.write("   <td width='90%' height='25' valign='middle'><a class='link1' href='about.asp?id=7' target='_self'>للإتصال بنا</a></td>");
 document.write("   <td width='10%' align='center' valign='middle'><img src='images/white_but.gif' width='6' height='6'></td>");
 document.write(" </tr>");
document.write("</table>");
document.write("</td>");
document.write("        </tr>");
document.write("         <tr>");
document.write("           <td align='right' valign='top'>");
document.write(" <table width='210' border='0' cellspacing='0' cellpadding='0'>");
document.write("               <tr align='right' valign='top'>");
 document.write("                <td background='images/Index_24.jpg'>&nbsp;</td>");
 document.write("                <td width='180' height='20' background='images/Index_19.jpg' class='rightlinks' > بحث عربى&nbsp;&nbsp;&nbsp;</td>");
 document.write("              </tr>");
 document.write("            </table>");
 document.write(" </td>");
 document.write("        </tr>");
 document.write("        <tr>");
 document.write("          <td height='55'  align='right' valign='top' background='images/Index_24.jpg'>");
 document.write(" <table width='100%' border='0' cellspacing='0' cellpadding='0'>");
 document.write("              <tr>");
 document.write("                <td align='right' valign='top'><img src='images/Index_45.jpg' width='210' height='10'></td>");
   document.write("            </tr>");
 document.write("              <tr>");
document.write("                 <td   align='right' valign='top'>");
document.write(" <table width='100%' height='30' border='0' cellpadding='0' cellspacing='0'>");
  document.write("                   <tr align='right' valign='top'>");
document.write(" 					<form action='search.asp' method='post' name='arabic' target='_blank' id='search'>");
 document.write("                        <td width='30' height='30'></td>");
  document.write("                     <td><input type='image' border='0' name='imageField' src='images/Index_49.gif' width='30' height='30' onMousedown='checkvalue()' ></td>");
  document.write("                     <td width='150' valign='middle'><input name='arabic' type='text' size='15'>&nbsp;</td>");
document.write(" 					  </form>");
  document.write("                   </tr>");
document.write("                   </table>");
document.write(" 				  </td>");
document.write("               </tr>");
 document.write("              <tr>");
document.write("                 <td align='right' valign='top'><img src='images/Index_51.jpg' width='210' height='15'></td>");
document.write("               </tr>");
document.write("             </table>");
document.write(" </td>");
document.write("         </tr>");
document.write("        <tr>");
document.write("          <td height='70' align='right' valign='top' background='images/Index_24.jpg'>");
document.write("		  <table width='100%' border='0' cellspacing='0' cellpadding='0'>");
document.write("              <tr>");
document.write("                <td align='right' valign='top'><img src='images/Index_45.jpg' width='210' height='10'></td>");
 document.write("             </tr>");
document.write("              <tr>");
document.write("                <td height='35' align='right' valign='top'>&nbsp;</td>");
document.write("              </tr>");
document.write("            </table>");
document.write("</td>");
 document.write("       </tr>");

document.write("      </table>");
	

}
