//JavaScripts by Pranesh Biswas
var height = 550;
var vwidth = 150;
var speed = 0;
var step =2;

var hheight = 20; // heigth of a header item
var iheight = 14; // heigth of a item

var bgc = "lightyellow" // background color of the item
var tc = "blue" // text color of the item
var  textdec  =  "none";
  
var over_bgc = "silver";
var over_tc = "blue";//original red
var  over_textdec  =  "underline"; // original none 
var open = -1;

var N = (document.all) ? 0 : 1;
var Link_count = 0;
var ntop = 0;
var items = false
var z = 0;
var hnr = 0;
var timerID = null;
var link_array = new Array();

function write_menu()
{
document.write("<div id=main_panel style='height:")
if (N) document.write(height);
else document.write(height-2);
document.write(";width:");
if (N) document.write(vwidth)
else document.write(vwidth-2)
document.write("'>");

cl =0;
for(i=0;i<Link.length;i++)
{
 la = Link[i].split("|");
 if(la[0] == "0")
 {
   if (items == true) {document.write("</div>");items = false;}
   document.write("<div class='head_item' id='move"+cl+"' style='height:"+hheight+";width:"+vwidth+";top:"+(ntop-1)+";z-index:"+z+"' onclick='move("+cl+","+hnr+")'>&nbsp;"+la[1]+"</div>");
   link_array[cl] = new Array("up",0,hnr);
   cl++;hnr++;
   ntop += hheight-1;
   z++;
 }
 else
 {
  cheight = height - ntop + 1;
  if (items == false) {document.write("<div class='item_panel' id='move"+cl+"' style='height:"+cheight+"px;width:"+vwidth+";top:")
  if (N) document.write(ntop+2);
  else document.write(ntop);
  document.write(";z-index:"+z+"'>");
  z++;
  link_array[cl] = new Array("up",0,"");
  cl++;
  }
   document.write("<a href='"+la[2]+"'");
   if (la[3] != "") document.write(" target='" + la[3] + "' ");
   document.write(" onmouseover=color('item"+i+"') onmouseout=uncolor('item"+i+"') ><div class='item' id='item"+i+"' style='height:"+iheight+";width:"+vwidth+"'>&nbsp;&nbsp;"+la[1]+"</div></a>");
  items = true;
 }
}
document.write("</div>");
if (items == true) {document.write("</div>");}
}

function color(obj)
{
 document.getElementById(obj).style.backgroundColor = over_bgc;
 document.getElementById(obj).style.color = over_tc
 document.getElementById(obj).style.textDecoration  =  over_textdec; 
}

function uncolor(obj)
{
 document.getElementById(obj).style.backgroundColor = bgc;
 document.getElementById(obj).style.color = tc;
 document.getElementById(obj).style.textDecoration  =  textdec;
}

function move(idnr,hid)
{
 if ((idnr != open)&& (timerID == null))
 {
 if(link_array[idnr][0] == "up")
 {
  down = height - (hid * hheight) - ((hnr -(hid+1))* hheight) + 2;
  if(N) down+=2;
  dmover(idnr+2,down);
 }
 else
 {
  up = height - ((hid -1) * hheight) -((hnr - (hid))* hheight) +2;
  if(N) up+=2;
  umover(idnr,up);
 }
 open = idnr;
 }
}

function dmover(idnr,down)
{
 for (i=idnr;i<link_array.length;i++)
 {
  if(link_array[i][0] == "up")
  {
   txt_obj = "move" + i
   document.getElementById(txt_obj).style.top = parseInt(document.getElementById(txt_obj).style.top) + step;
  }
 }
 down-= step;
 if(down > 0)timerID = setTimeout("dmover("+idnr+","+down+")",speed);
 else 
 {
  for (i=idnr;i<link_array.length;i++) {link_array[i][0] = "down";}
 timerID = null;
 }
}

function umover(idnr,up)
{
 for (i=0;i<(idnr+2);i++)
 {
  if(link_array[i][0] == "down")
  {
   txt_obj = "move" + i
   document.getElementById(txt_obj).style.top = parseInt(document.getElementById(txt_obj).style.top) - step;
  }
 }
 up-=step;
 if(up > 0)timerID = setTimeout("umover("+idnr+","+up+")",speed);
 else 
 {
  for (i=0;i<(idnr+2);i++) {link_array[i][0] = "up";}
 timerID = null;
 }
}
//JavaScripts by Pranesh Biswas

function start(idnr)
{
 write_menu();
 for(i=0;i<link_array.length;i++)
 {
  if (link_array[i][2] == idnr)
  {
   pull = i;
   i = link_array.length;
  }
 }
   move(pull,idnr);
}  
var Link = new Array();
  Link[0] = "0|News";//1
  Link[1] = "1|News Headlines|http://www.eastwestdirectory.com/News/news.php|_top";
  Link[2] = "1|India|http://www.eastwestdirectory.com/News/india_summary.php|_top";
  Link[3] = "1|Pakistan|http://www.eastwestdirectory.com/News/paknews_summary.php|_top";
  Link[4] = "1|SriLanka|http://www.eastwestdirectory.com/News/lankanews_summary.php|_top";
  Link[5] = "1|Bangladesh|http://www.eastwestdirectory.com/News/banglanews_summary.php|_top";
  Link[6] = "1|North America|http://www.eastwestdirectory.com/News/namericanews_summary.php|_top";
  Link[7] = "1|International|http://www.eastwestdirectory.com/News/international_summary.php|_top";
  Link[8] = "0|Sports";//2
  Link[9] = "1|Cricket|http://www.eastwestdirectory.com/News/cricket_summary.php|_top";
  Link[10] = "1|Field Hockey|http://www.eastwestdirectory.com/News/hockey_summary.php|_top"
  Link[11] = "1|Track & Field|http://www.eastwestdirectory.com/News/trackfield_summary.php|_top"
  Link[12] = "1|Soccer|http://www.eastwestdirectory.com/News/football_summary.php|_top"
  Link[13] = "1|Chess|http://www.eastwestdirectory.com/News/chess_summary.php|_top"
  Link[14] = "1|Squash|http://www.eastwestdirectory.com/News/squash_summary.php|_top"
  Link[15] = "1|Kabadi|http://www.eastwestdirectory.com/News/kabadi_summary.php|_top"
  Link[16] = "1|Miscellanious|http://www.eastwestdirectory.com/News/miscellanious_summary.php|_top"
  Link[17] = "0|Weather";//3
  Link[18] = "1|Canadian Weater|http://www.eastwestdirectory.com/cgi-bin/weather/hw3.cgi|_top";
  Link[19] = "1|USA Weather|http://www.eastwestdirectory.com/cgi-bin/weather/hw3.cgi?config=&forecast=pass&pass=tafUS|_top"
  Link[20] = "1|World Weather|http://www.eastwestdirectory.com/cgi-bin/weather/hw3.cgi?config=&forecast=pass&pass=tafINT|_top"
  Link[21] = "0|Astrology";//4
  Link[22] = "1|Daily Horoscope|http://www.eastwestdirectory.com/Astro/daily_summary.php|_top";
  Link[23] = "1|Weekly Horoscope|http://www.eastwestdirectory.com/Astro/weekly_summary.php|_top";
  Link[24] = "1|Monthly Horoscope|http://www.eastwestdirectory.com/Astro/Monthly/index.php|_top";
  Link[25] = "1|Yearly Horoscope|http://www.eastwestdirectory.com/Astro/Yearly/index.php|_top";
  Link[26] = "1|Vastu Shastra|http://www.eastwestdirectory.com/Astro/Vastu/index.php|_top";
  Link[27] = "1|Numerology|http://www.eastwestdirectory.com/Astro/Numerology/index.php|_top";
  Link[28] = "0|Immigration";//5
  Link[29] = "1|Canada|http://www.eastwestdirectory.com/Immigration/index.php|_top";
  Link[30] = "1|USA|http://www.eastwestdirectory.com/Immigration/usa_index.php|_top";
  Link[31] = "1|India|http://www.eastwestdirectory.com/Immigration/ind_index.php|_top";	
  Link[32] = "1|Pakistan|http://www.eastwestdirectory.com/Immigration/pak_index.php|_top";
  Link[33] = "1|SriLanka|http://www.eastwestdirectory.com/Immigration/sri_index.php|_top";
  Link[34] = "1|Bangladesh|http://www.eastwestdirectory.com/Immigration/ban_index.php|_top"
  Link[35] = "1|North America|http://www.eastwestdirectory.com/Immigration/NorthAmercia/index.html|_top"
  Link[36] = "1|Forum|http://www.eastwestdirectory.com/Board/index.php|_top"
  Link[37] = "0|Bollywood";//6
  Link[38] = "1|Bollywood News|http://www.eastwestdirectory.com/Bollywood/index.php|_top";
  Link[39] = "1|Top Movie|http://www.eastwestdirectory.com/Bollywood/top10movie/index.html|_top"
  Link[40] = "1|Movie Review|http://www.eastwestdirectory.com/News/filmreview.php|_top"
  Link[41] = "1|Top Music|http://www.eastwestdirectory.com/Bollywood/top10music/index.php|_top"
  Link[42] = "1|Music Review|http://www.eastwestdirectory.com/News/musicreview.php|_top"
  Link[43] = "1|Bollywood Poll|window.open('http://www.eastwestdirectory.com/poll/poll.php','','height=187,width=190')|_top"
  Link[44] = "0|Finance";//7
  Link[45] = "1|News|http://www.eastwestdirectory.com/Finance/index.html|_top";
  Link[46] = "1|Stock Market|http://www.eastwestdirectory.com/Finance/index.php|_top"
  Link[47] = "1|Precious Metals|http://www.eastwestdirectory.com/Finance/index.php|_top"
  Link[48] = "1|Currency|http://www.eastwestdirectory.com/Finance/index.php|_top"
  Link[49] = "0|NRI Services";//8
  Link[50] = "1|NRI Services|http://www.eastwestdirectory.com/nri/index.php|_top";
  Link[51] = "1|Taxation|http://www.eastwestdirectory.com/nri/tax_tax.php|_top"
  Link[52] = "1|FAQ|http://www.eastwestdirectory.com/nri/faq.php|_top"
  Link[53] = "0|Travel";//9
  Link[54] = "1|India|http://www.eastwestdirectory.com/travel/ind_index.php|_top";
  Link[55] = "1|Pakistan|http://www.eastwestdirectory.com/travel/pak_index.php|_top"
  Link[56] = "1|SriLanka|http://www.eastwestdirectory.com/travel/sri_index.php|_top"
  Link[57] = "1|Bangladesh|http://www.eastwestdirectory.com/travel/ban_index.php|_top"
  Link[58] = "1|Nepal|http://www.eastwestdirectory.com/travel/nep_index.php|_top"
  Link[59] = "1|Bhutan|http://www.eastwestdirectory.com/travel/bhu_index.php|_top"
  Link[60] = "0|Message Board";//10
  Link[61] = "1|Canada Immigration|http://www.eastwestdirectory.com/Board/index.php?c=4|_top";
  Link[62] = "1|USA Immigration|http://www.eastwestdirectory.com/Board/index.php?c=5|_top";
  Link[63] = "1|General Discussion|http://www.eastwestdirectory.com/Board/index.php?c=6|_top";
  Link[64] = "0|Events Calendar";//11
  Link[65] = "1|Local Events|http://www.eastwestdirectory.com/calendar/month.php?LocationID=|_top";
  Link[66] = "1|Current Month|http://www.eastwestdirectory.com/calendar/month.php?LocationID=|_top";
  Link[67] = "0|Greeting Cards";//12
  Link[68] = "1|All Occations|http://www.eastwestdirectory.com/cgi-bin/ecards/index.cgi|_top";
  Link[69] = "1|Birthday Cards|http://www.eastwestdirectory.com/cgi-bin/ecards/index.cgi|_top";
  Link[70] = "1|Festival Cards|http://www.eastwestdirectory.com/cgi-bin/ecards/index.cgi?page=1&cat=Festival&lang=english.pm|_top";
  Link[71] = "0|Matrimonials";//13
  Link[72] = "1|Search Partner|http://www.eastwestdirectory.com/Matrimonial/search.php?l=|_top";
  Link[73] = "1|Add Profile|http://www.eastwestdirectory.com/Matrimonial/add.php?l=|_top";
  Link[74] = "1|Edit Profile|http://www.eastwestdirectory.com/Matrimonial/login.php?l=|_top";
  Link[75] = "0|Jobs";//14
  Link[76] = "1|Job Seeker|http://www.eastwestdirectory.com/bazaar/|_top";
  Link[77] = "1|Employer|http://www.eastwestdirectory.com/bazaar/employers/login.php|_top";
  Link[78] = "0|Classifieds";//15
  Link[79] = "1|Automotive|http://www.eastwestdirectory.com/classifieds/index.php?kid=8&catname=Automotive|_top";
  Link[80] = "1|Computers|http://www.eastwestdirectory.com/classifieds/index.php?kid=16&catname=Computers|_top";
  Link[81] = "1|Furnitures|http://www.eastwestdirectory.com/classifieds/index.php?kid=36&catname=Furniture|_top";
  Link[82] = "1|Merchandise|http://www.eastwestdirectory.com/classifieds/index.php?kid=37&catname=General+Merchandise|_top";
  Link[83] = "1|Real Estate|http://www.eastwestdirectory.com/classifieds/index.php?kid=31&catname=Real+Estate|_top";
  Link[84] = "1|Rental Accomodation|http://www.eastwestdirectory.com/classifieds/index.php?kid=26&catname=Rental++Accomodation|_top";
  Link[85] = "0|Games"; //GAMES//16
  Link[86] = "1|All games|http://www.eastwestdirectory.com/Games/index.php|_top";
  Link[87] = "1|Arcadia|http://www.eastwestdirectory.com/Games/Arcadia.php|_top";
  Link[88] = "1|Bingo|http://www.eastwestdirectory.com/Games/Bingo.php|_top";
  Link[89] = "1|Lottery|http://www.eastwestdirectory.com/Games/Lottery.php|_top";
  Link[90] = "1|Sports|http://www.eastwestdirectory.com/Games/Sports.php|_top";
  Link[91] = "0|Kids";  //KIDS//17
  Link[92] = "1|Science Quiz|http://www.eastwestdirectory.com/quiz/index.php|_top";
  Link[93] = "1|Cross Word|http://www.eastwestdirectory.com/Kids/crossword/index.php|_top";
  Link[94] = "1|Games & Puzzles|http://www.eastwestdirectory.com/Games/index.php|_top";
  Link[95] = "1|Story|http://www.eastwestdirectory.com/News/stories_summary.php|_top";
  Link[96] = "1|Poems|http://www.eastwestdirectory.com/News/poems_summary.php|_top";
  Link[97] = "1|Drawing Contest|http://www.eastwestdirectory.com/draw/index.php|_top";
  Link[98] = "0|Youths"; //YOUTHS--18
  Link[99] = "1|Living|http://www.eastwestdirectory.com/News/livingna_summary.php|_top";
  Link[100] = "1|Lighter Side|http://www.eastwestdirectory.com/News/lighterside_summary.php|_top";
  Link[101] = "1|Spirituality|http://www.eastwestdirectory.com/News/religion_summary.php|_top";
  Link[102] = "1|Short Story|http://www.eastwestdirectory.com/News/shortstory_summary.php|_top";
  Link[103] = "1|Poems|http://www.eastwestdirectory.com/Youths/poems/Hindi/saurabh/index.html|_top";
  Link[104] = "1|Book Review|http://www.eastwestdirectory.com/News/bookreview_summary.php|_top";
  Link[105] = "1|Beauty Contest|http://www.eastwestdirectory.com/contest/index.php|_top";
  Link[106] = "0|Parents";//PARENTS--19
  Link[107] = "1|Parenting|http://www.eastwestdirectory.com/News/parenting_summary.php|_top";
  Link[108] = "1|Child Care|http://www.eastwestdirectory.com/News/childcare_summary.php|_top";
  Link[109] = "1|Pregnancy Guide|http://www.eastwestdirectory.com/News/pregnancy_summary.php|_top";
  Link[110] = "1|Internet Guide|http://www.eastwestdirectory.com/News/internet_summary.php|_top";
  Link[111] = "1|Discussion Forum|http://www.eastwestdirectory.com/Board/viewforum.php?f=13|_top";
  Link[112] = "0|Recipes";//RECIPES--20
  Link[113] = "1|Vegetarian|http://www.eastwestdirectory.com/Recipes/veg_index.php|_top";
  Link[114] = "1|Non Vegetarian|http://www.eastwestdirectory.com/Recipes/non_index.php|_top";
  Link[115] = "1|Rice &amp;Bread|http://www.eastwestdirectory.com/Recipes/rice_index.php|_top";
  Link[116] = "1|Salad &amp;Chutney|http://www.eastwestdirectory.com/Recipes/sal_index.php|_top";
  Link[117] = "1|Drinks &amp;Deserts|http://www.eastwestdirectory.com/Recipes/des_index.php|_top";
  Link[118] = "1|Home Made Spices|http://www.eastwestdirectory.com/Recipes/spi_index.php|_top";
  Link[119] = "1|Grand Ma's Tips|http://www.eastwestdirectory.com/Recipes/tips_index.php|_top";
  Link[120] = "1|Submit Recipes|http://www.eastwestdirectory.com/Recipes/sub_index.php|_top";
  Link[121] = "0|Health &amp; Fitness";//HEALTH & FITNESS--21
  Link[122] = "1|Mens Health|http://www.eastwestdirectory.com/health/Men/oral.php|_top";
  Link[123] = "1|Womens Health|http://www.eastwestdirectory.com/health/Women/index.php|_top";
  Link[124] = "1|Kids Health|http://www.eastwestdirectory.com/health/Kids/index.php|_top";
  Link[125] = "0|Shopping";//SHOPPING--22
  Link[126] = "1|Grocery|http://www.eastwestbazaar.com/index.php?cPath=69|_blank";
  Link[127] = "1|Clothing|http://www.eastwestbazaar.com/index.php?cPath=30|_blank";
  Link[128] = "1|Jewelery|http://www.eastwestbazaar.com/index.php?cPath=167|_blank";
  Link[129] = "1|Phone Cards|http://www.eastwestbazaar.com/index.php?cPath=168|_blank";
  Link[130] = "1|Electronics|http://www.eastwestbazaar.com/index.php?cPath=72|_blank";
  Link[131] = "1|Entertainment|http://www.eastwestbazaar.com/index.php?cPath=134|_blank";
  Link[132] = "1|Toys &amp; Games|http://www.eastwestbazaar.com/index.php?cPath=126|_blank";
  Link[133] = "1|Health Care|http://www.eastwestbazaar.com/index.php?cPath=24|_blank";
  Link[134] = "0|Wedding Cards";//WEDDING CARDS--23
  Link[135] = "1|Sikh Invitations|http://www.eastwestdirectory.com/SikhCard/index.php?start=0&album=1|_top";
  Link[136] = "1|Hindu Invitations|http://www.eastwestdirectory.com/HinduCard/index.php?start=0&album=1|_top";
  Link[137] = "1|Muslim Invitations|http://www.eastwestdirectory.com/MuslimCard/index.php?start=0&album=1|_top";
  Link[138] = "1|Christian Invitations|http://www.eastwestdirectory.com/ChristianCard/index.php?start=0&album=1|_top";

  start(4);