home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World Book 2004
/
WB04D1SE.iso
/
info_dat
/
STA
/
wbSurf.js
< prev
Wrap
Text File
|
2003-04-17
|
2KB
|
70 lines
/*********************************************************************************
** wbSurf.js
**
** Header file for "View from today" pages in Ancient, Middle and Modern Times.
** Contains functions used to display Surf/WBOL articles in the main window.
**
** TATA INFOTECH LIMITED
** (C) COPYRIGHT TATA INFOTECH LIMITED
** Created: Feb 8, 2002
*********************************************************************************/
var d = document;
/* Function Name: displayArticle
** Accepts: url and target
** Returns: Nothing
** Purpose: Displays WB article for the respective edition in the main window.
** It calls the article directly.
*/
function displayArticle(url,tg)
{
var furl="wb://articles/"+url;
if (tg) furl = furl + "#" + tg;
navigate (furl);
return false;
}
/* Function Name: showSurf
** Accepts: url and age
** Returns: Nothing
** Purpose: Displays Surf article for the respective age(times) in the main window.
** It submits to wbSurf.jsp after setting hidden variables url and navbar.
*/
function showSurf(url,age)
{
// var baseUrl = "/np/"+edition+"/surf/"; //Base Path to surf pages as /np/na/surf or /np/in/surf.
// var baseUrl = "file://W:/CDFILES/SURFTHEAGES/";
// var baseUrl = document.getProperty ("baseUrl");
var baseUrl = "wb://surftheages/";
//If age = 1, then it is ancient times.
//If age = 2, then it is middle times.
//If age = 3, then it is modern times.
// Append the respective navbar file for each age to variable navBarURl.
var ageUrl;
var navBarUrl;
if(age == 1)
{
ageUrl = baseUrl+"ancient/";
navBarUrl = baseUrl+"ancient/saanavba.htm";
}
else if(age == 2)
{
ageUrl = baseUrl + "middle/";
navBarUrl = baseUrl+ "middle/sainavba.htm";
}
else if(age == 3)
{
ageUrl = baseUrl+"modern/";
navBarUrl = baseUrl+"modern/saonavba.htm";
}
url = ageUrl + url;
// alert(url);
navigate (url);
return false;
}