var arrStocks = new Array();
arrStocks[0] = ["Stocks and Bonds", ""];
arrStocks[1] = ["Tel Aviv Stock Exchange", "/Finance/Shared/SearchResults.asp?Feeder=0&TypeID=6&WhatType=1&lang=EN&strToSearch=A"];
arrStocks[2] = ["Israeli stocks in NY", "/Finance/Shared/SearchResults.asp?Feeder=1&SearchIdxInst=1&Lang=EN&WhatType=3&TypeID=12&IdxInstrumentID="];
arrStocks[3] = ["Arbitrage gaps for dual-listed stocks", "/portal/arbitrage/?lang=en"];
arrStocks[4] = ["Israeli stocks in Europe", "/Finance/Shared/SearchResults.asp?Feeder=1&WhatType=3&TypeID=14&lang=en"];
var arrWarrants = new Array();
arrWarrants[0] = ["Warrants & Options", ""];
arrWarrants[1] = ["Tel Aviv 35 Options", "/Finance/Shared/SearchResults.asp?ExchangeID=45&Feeder=0&TypeID=15&WhatType=1&lang=en"];
arrWarrants[2] = ["$/NIS Options", "/Finance/Shared/SearchResults.asp?ExchangeID=45&Feeder=0&TypeID=18&WhatType=1&lang=en"];
var arrCurrency = new Array();
arrCurrency[0] = ["Currency Spot Rates", ""];
arrCurrency[1] = ["Current shekel exchange rates", "http://www.globes.co.il/Finance/Currency/BigCurrency1_en.htm"];
arrCurrency[2] = ["Historical shekel exchange rates", "http://www.globes.co.il/serveEn/fcurrency/HistoryRates.asp"];
arrCurrency[3] = ["Bank shekel exchange rates", "http://www.globes.co.il/Finance/Currency/BigBanksList_en.htm"];
var arrMutualFunds = new Array();
arrMutualFunds[0] = ["Mutual Funds", ""];
arrMutualFunds[1] = ["Funds search", "/Finance/Shared/SearchResults.asp?Lang=EN&Field=3&Direction=1&WhatType=1&TypeID=16&Feeder=0&strToSearch=A"];
arrMutualFunds[2] = ["Top performers", "http://www.globes.co.il/Finance/Funds/FundList1_EN.htm"];
arrMutualFunds[3] = ["Ranking by group", "http://www.globes.co.il/Finance/Funds/Details_EN/Group_1_1.htm"];
arrMutualFunds[4] = ["Ranking - selected period", "http://www.globes.co.il/Finance/Funds/FundList.asp?lang=en&GroupID=1&FromDate="];
var arrMarketReports = new Array();
arrMarketReports[0] = ["Market reports", ""];
arrMarketReports[1] = ["Tel Aviv Stock Exchange", "/serveEN/globes/NodeView.asp?fid=1051"];
arrMarketReports[2] = ["Israeli stocks on Wall Street", "/serveEN/globes/NodeView.asp?fid=1052"];
var arrIndices = new Array();
arrIndices[0] = ["Indices", ""];
arrIndices[1] = ["Price Indices from 1980", "/Finance/IndexPrice/IndexPrice.asp?Lang=EN&Year="];
var sAlign = "left";
var sFilter = " filter:FlipH";
var lblButton1 = "Click to open Menu";
var lblButton2 = "Click to close Menu";
var imgButton = "Arrow_Orange_Small_E.gif"
function buildMenuUnit(arr, bShowTitle, menuWidth, emptyRows, menuHeight) {
var iMenuWidth = 172;
var iMenuHeight = 16;
var isShowTitle = true;
var iEmptyRows = 0;
if(""+menuWidth != "undefined") {
iMenuWidth = menuWidth;
}
if(""+menuHeight != "undefined") {
iMenuHeight = menuHeight;
}
if(""+bShowTitle != "undefined") {
isShowTitle = bShowTitle;
}
if(""+emptyRows != "undefined") {
iEmptyRows = emptyRows;
}
var sMenuUnit = "
";
if(isShowTitle) {
sMenuUnit += "";
}
for(i = 1; i < arr.length; i++) {
var sLink = "'" + arr[i][1] + "'";
sLink += (sLink.indexOf("https://") != -1) ? " target='_blank' " : "";
sMenuUnit += "
";
}
if(iEmptyRows > 0) {
for(var i = 0; i < iEmptyRows; i++) {
sMenuUnit += "
";
}
}
return sMenuUnit += "
"
}
function rollOver(Button, IsOn) {
(IsOn) ? Button.style.backgroundColor = "#E5E5E5" : Button.style.backgroundColor = "#EFEFEF";
bIsInsideMenu = true;
}
var bIsMenuOpened = false;
var bIsInsideMenu = false;
function showDropMenu(handle) {
var oHMenu = document.getElementById("hMenu");
var iLeftOffset = (sLang == 'HE') ? 116 : 0
if(!bIsMenuOpened) {
hideDropDowns(true);
oHMenu.style.display = "block";
oHMenu.style.top = getY(handle) + 34;
oHMenu.style.left = getX(handle) + iLeftOffset + 1;
handle.innerHTML = ""+lblButton2+""
bIsMenuOpened = true;
bIsInsideMenu = true;
} else {
hideDropDowns(false);
oHMenu.style.display = "none";
oHMenu.style.top = 0;
oHMenu.style.left = 0;
handle.innerHTML = ""+lblButton1+""
bIsMenuOpened = false;
bIsInsideMenu = false;
}
}
function closeDropMenu() {
if(bIsMenuOpened == true && bIsInsideMenu == false) {
showDropMenu(document.getElementById("menuButton"));
}
}
function hideDropDowns(bHide) {
var colSelects = document.getElementsByTagName("select");
for(var i = 1; i < colSelects.length; i++) {
(bHide) ? colSelects[i].style.visibility = "hidden" : colSelects[i].style.visibility = "visible";
}
}
function drawSideMenu(sLang) {
var sDelimiter = "";
var sBanner = "dw(g.almond.iframe(322,170,43))" + "script>
";
if(sLang == "HE") {
var sMenu = buildMenuUnit(arrTaStock) + sDelimiter + buildMenuUnit(arrForeignCurr) + sDelimiter +
buildMenuUnit(arrFounds) + sDelimiter + buildMenuUnit(arrForeignStock) + sDelimiter + sBanner+
buildMenuUnit(arrArbitrage) + sDelimiter + buildMenuUnit(arrBarometer) + sDelimiter +
buildMenuUnit(arrAnalystAdvice) + sDelimiter + buildMenuUnit(arrCompanies) + sDelimiter +
buildMenuUnit(arrDebenture) + sDelimiter + buildMenuUnit(arrFutures) +
sDelimiter + buildMenuUnit(arrETF) + sDelimiter +
buildMenuUnit(arrIndexes) + sDelimiter + buildMenuUnit(arrEndOfDay)
} else {
var sMenu = buildMenuUnit(arrStocks) + sDelimiter + buildMenuUnit(arrWarrants) + sDelimiter +
buildMenuUnit(arrCurrency) + sDelimiter + buildMenuUnit(arrMutualFunds) + sDelimiter +
buildMenuUnit(arrMarketReports) + sDelimiter + buildMenuUnit(arrIndices)
}
return sMenu;
}
function buildOptionUnit(arr) {
var sMenuUnit = "";
sMenuUnit += "";
for(i = 1; i < arr.length; i++) {
sMenuUnit += "";
}
return sMenuUnit;
}
function drawSelectMenu(w, bShowMainTitle) {
var isShowMainTitle = true;
if(""+bShowMainTitle != "undefined") {
isShowMainTitle = bShowMainTitle;
}
var sMenu = "";
}
function viewPage(oOption) {
var sURL = oOption.value
if(sURL == -1 || sURL == "") {return}
if((sURL.indexOf("http://") != -1)||(sURL.indexOf("/Indications/default.asp") != -1)) {
window.open(sURL, "");
} else {top.location.href = sURL}
document.getElementById("sb_combo").selectedIndex = 0
}
function getX(source) {
var X = 0;
var P = source.offsetParent;
while(P != null) {
X += P.offsetLeft;
P = P.offsetParent;
}
return X;
}
function getY(source) {
var Y = 1;
var P = source.offsetParent;
while (P != null) {
Y += P.offsetTop;
P = P.offsetParent;
}
return Y;
}
// Populate links and labels to sections Arrays
function buildLinksObject(p1, p2, p3, p4) {
this.Label_HE = p1;
this.Link_HE = p2;
this.Label_EN = p3;
this.Link_EN = p4;
}
function getOBJ(obj) {
var str;
str = obj +"";
obj = eval(obj)
var i;
var msg = "";
msg = "";
for(i in obj) {
msg += " " + i + " | " ;
try{msg += " " + eval("obj." + i ) + " | " }
catch(e){msg += " | " }
msg += "
" ;
}
msg += "
"
var win = window.open("about:blank","","")
msg = "
"+str+"
" + msg
win.document.write( msg);
return;
}