prefs lmlmgm7erd2qhluqtg2lgva6wunp53vdldsxh6i LMLMGM7ERD2QHLUQTG2LGVA6WUNP53VDLDSXH6I




Take-A-Dive User Preferences

BODY, TD { font-family: Arial; }




// Identify the image path and all the arrays
// to contain user preferences
var imagePath = 'images/';

var newsNames = new Array(
new Array('The Wall Street Journal','http://www.wsj.com/'),
new Array('Barron\'s Online','http://www.barrons.com/'),
new Array('CNN Interactive','http://www.cnn.com/'),
new Array('MSNBC','http://www.msnbc.com/'),
new Array('Fox News','http://www.foxnews.com/')
);

var indexNames = new Array(
new Array('The New York Stock Exchange','http://www.nyse.com/'),
new Array('NASDAQ','http://www.nasdaq.com/'),
new Array('Dow Jones Indexes','http://www.dowjones.com/')
);

var strategy = new Array(
new Array('Cheap', 'I\'m Really Cheap'),
new Array('Stingy', 'I\'m Pretty Stingy'),
new Array('Conservative', 'I\'m Conservative'),
new Array('Moderate', 'I\'m a Moderate'),
new Array('Agressive', 'I\'m Aggressive'),
new Array('Willing to sell mother', 'I\'d Sell My Mother!')
);

var background = new Array(
new Array(imagePath + 'goldthumb.gif', 'Gold Bars'),
new Array(imagePath + 'billsthumb.gif', 'Dollar Bills'),
new Array(imagePath + 'fistthumb.gif', 'Fist of Cash'),
new Array(imagePath + 'currency1thumb.gif', 'Currency 1'),
new Array(imagePath + 'currency2thumb.gif', 'Currency 2')
);

var face = new Array(
new Array('times', 'Times Roman'),
new Array('arial', 'Arial'),
new Array('courier', 'Courier New'),
new Array('tahoma', 'Tahoma')
);

var size = new Array(
new Array('10', 'Small'),
new Array('12', 'Medium'),
new Array('14', 'Large'),
new Array('16', 'X-Large')
);

indexNames = indexNames.sort();
newsNames = newsNames.sort();

// Define an array for preloading the images
var allImages = new Array();
var imageNames = new Array(
'courier10', 'courier12', 'courier14', 'courier16',
'arial10', 'arial12', 'arial14', 'arial16',
'times10', 'times12', 'times14', 'times16',
'tahoma10', 'tahoma12', 'tahoma14', 'tahoma16',
'goldthumb', 'billsthumb', 'fistthumb', 'currency1thumb',
'currency2thumb', 'blank'
);

// Preload the images
for (var i = 0; i < imageNames.length; i++) {
allImages[i] = new Image();
allImages[i].src = imagePath + imageNames[i] + '.gif';
}

// Define a function that "makes" a URL to pass to
// swapImage() for the image rollovers
function makePath(formObj) {
var fontName = imagePath + formObj.face.options[formObj.face.selectedIndex].value +
formObj.size.options[formObj.size.selectedIndex].value + '.gif'
swapImage("fontImage", fontName);
}

// Conditionally perform the rollovers in JavaScript 1.0
function swapImage(imageName, imageBase) {
document[imageName].src = imageBase;
}

// Define a function to create SELECT lists on the fly
function genSelect(name, select, onChangeStr) {
var optStr = "";
var arrObj = eval(name);
for (var i = 0; i < arrObj.length; i++) {
optStr += '

Wyszukiwarka