';
//var url = window.location.href;
//alert (url);
//alert("inside gettreeviewbook");
//alert(xmlname);
//alert(type);
/*if (edition.indexOf("#") > 0){
edition1 = edition
edition = edition.substring(0,edition.indexOf("#"));
bookpath=getbookpath(xmlname,edition1,language);
}else{
bookpath=getbookpath(xmlname,edition,language);
}*/
//alert(edition);
//alert(language);
bookpath=getbookpath(xmlname,edition,language);
//alert ("book path=="+bookpath);
if(History!='Back')
load(bookpath);
//alert(window.location.href);
//document.location.reload();
if(document.getElementById('next')!==null){
if(document.getElementById('next').style.display=='block'){
document.getElementById('next').style.display="none";
document.getElementById('prev').style.display="none";
}
}
if(document.getElementById('download')!==null){
document.getElementById('download').style.display="none";
}
//url='http://'+location.hostname+'/readfromxml.php?keyword='+xmlname+'&type='+type+'&edition='+edition+'&language='+language;
//alert(url);
$.ajax({
url: 'https://'+location.hostname+'/readfromxml.php?keyword='+xmlname+'&type='+type+'&edition='+edition+'&language='+language,
type: 'post',
data: {'action': 'follow', 'userid': '11239528343'},
success: function(data, status) {
document.getElementById('bodycontent').innerHTML=data;
prepareList();
},
error: function(xhr, desc, err) {
console.log(xhr);
console.log("Details: " + desc + "\nError:" + err);
}
});
$('.dropdown.open .dropdown-toggle').dropdown('toggle');
}
function getbookpath(xmlname,edition,language){
//alert('xmlname= '+xmlname);
//alert('edition= '+edition);
//alert('language= '+language);
//added by Arindra
/*if(edition.indexOf("/") >= 0){
//alert('yes');
var slashpos = edition.search("/");
var reststr = edition.substring(slashpos);
//alert(reststr);
}*/
var xml=xmlname.replace(/\\/g,'/').replace( /.*\//, '' );
var bookpath="_StaticContent/SriAurobindoAshram/-09 E-Library/";
if(xml.indexOf("sriaurobindo") >=0){
bookpath+="-01 Works of Sri Aurobindo";
}else if(xml.indexOf("worksofthemother") >=0){
bookpath+="-02 Works of The Mother";
}else if(xml.indexOf("disciples") >=0){
bookpath+="-03 Disciples";
}else if(xml.indexOf("compilations") >=0){
bookpath+="-04 Compilations";
}else if(xml.indexOf("magazines") >=0){
bookpath+="-05 Magazines";
}else if(xml.indexOf("authorsfromothercenters") >=0){
bookpath+="-06 Authors from Other Centers";
}else if(xml.indexOf("authorsfromauroville") >=0){
bookpath+="-07 Authors from Auroville";
}else if(xml.indexOf("otherauthors") >=0){
bookpath+="-08 Other Authors";
}
if(language=="english"){
bookpath+="/-01 English";
}else if(language=="french"){
bookpath+="/-02 French";
}else if(language=="german"){
bookpath+="/-03 German";
}else if(language=="russian"){
bookpath+="/-04 Russian";
}else if(language=="tamil"){
bookpath+="/-05 Tamil";
}else if(language=="gujarati"){
bookpath+="/-06 Gujarati";
}else if(language=="marathi"){
bookpath+="/-07 Marathi";
}else if(language=="oriya"){
bookpath+="/-08 Oriya";
}else if(language=="hindi"){
bookpath+="/-09 Hindi";
}else if(language=="kannada"){
bookpath+="/-10 Kannada";
}else if(language=="spanish"){
bookpath+="/-11 Spanish";
}else if(language=="kannada"){
bookpath+="/-10 Kannada";
}else if(language=="spanish"){
bookpath+="/-11 Spanish";
}else if(language=="bengali"){
bookpath+="/-12 Bengali";
}else if(language=="telugu"){
bookpath+="/-13 Telugu";
}else if(language=="sanskrit"){
bookpath+="/-14 Sanskrit";
}else{
if(xml.indexOf("disciples") >=0 || xml.indexOf("authorsfromothercenters") >=0 || xml.indexOf("otherauthors") >=0 || xml.indexOf("authorsfromauroville") >=0){
bookpath+="/"+language.toProperCase();
}
}
// we have to add new languages if more is available
if(edition=='sabcl'){
bookpath+="/-01_SABCL";
}else if(edition=='other editions'){
bookpath+="/-02_Other Editions";
}else if(edition=='manuscripts'){
bookpath+="/-04_Manuscripts";
}else if(edition=='cwsa'){
bookpath+="/-03_CWSA";
}else if(edition=='manuscript'){
bookpath+="/-05_Manuscript";
}else if(edition=='cwmce'){
bookpath+="/-01_CWMCE";
}else if(edition=='agenda'){
bookpath+="/-03_Agenda";
}else if(edition=='sraddha'){
bookpath+="/Sraddha";
}else if(edition=='sri aurobindo - archives and research'){
bookpath+="/Sri Aurobindo - Archives and Research";
}else if(edition=='the advent'){
bookpath+="/The Advent";
}else if(edition=='bulletin'){
bookpath+="/-01_Bulletin";
}else if(edition=='arpan'){
bookpath+="/Arpan";
}else if(edition=='sahaj satsang'){
bookpath+="/Sahaj Satsang";
}else if(edition=='sanjeevan'){
bookpath+="/Sanjeevan";
}else{
if(edition!=""){
if(xml.indexOf("disciples") >=0 || xml.indexOf("authorsfromothercenters") >=0){
if(edition.indexOf("/") >=0){
var splitstr=edition.split("/");
for (var i=0;i 1){
//alert(hrefpos);
var uri = window.location.toString();
//alert(uri);
var clean_uri = uri.substring(0, (uri.indexOf("in/"))+2);
//alert (clean_uri);
window.history.replaceState({}, document.title, clean_uri);
}
}
function GettreeView(html,rightcontent,type,onlyright,History){
//alert("in fun");
var path="";
//alert ("from gettreeview and html = ("+html+"), content = ("+rightcontent+"), type = ("+type+"), right = ("+onlyright+")");
if(type=="audio"){
path="_StaticContent/SriAurobindoAshram/-06 Multimedia/Audio";
}else if(type=="video" || type=="speed"){
path="_StaticContent/SriAurobindoAshram/-06 Multimedia/Video";
}else if(type=='photo'){
path="_StaticContent/SriAurobindoAshram/-10 Photo Gallery^^^";
if(rightcontent.indexOf("#") > -1){
rightcontent = rightcontent.substring(rightcontent.indexOf("#")+1,rightcontent.length);
}
}
//alert ("from gettreeview and html now = ("+html+"), content = ("+rightcontent+"), type = ("+type+"), right = ("+onlyright+")");
//alert ("path=("+path+")");
if(rightcontent=='Savitri Readings'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Savitri Readings$$$";
}else{
path=path+"/Savitri Readings$$$";
}
if (html=="The Mother"){
html="English";
}
if (html=="English"){
path=path+"/The Mother";
}
//alert ("From Savitri");
}else if(rightcontent.toLowerCase()=='interviews with disciples and devotees$$$'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Interviews/Interviews With Disciples and Devotees$$$";
}else{
path=path+"/Interviews/Interviews With Disciples and Devotees$$$";
}
//alert (path);
}else if(rightcontent=='Sri Aurobindo Ashram - The Early Years$$$'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Interviews/Sri Aurobindo Ashram - The Early Years$$$";
}else{
path=path+"/Interviews/Sri Aurobindo Ashram - The Early Years$$$";
}
}else if(rightcontent.toLowerCase()=='interviews with aurovillians$$$'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Interviews/Interviews With Aurovillians$$$";
}else{
path=path+"/Interviews/Interviews With Aurovillians$$$";
}
}else if(rightcontent.toLowerCase()=='interviews'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Interviews";
}else{
path=path+"/Interviews";
}
}else if(rightcontent=='Explorations in Savitri$$$'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Explorations in Savitri$$$";
}else{
path=path+"/Explorations in Savitri$$$";
}
}else if(rightcontent=='Questions and Answers for a World in Crisis'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Questions and Answers for a World in Crisis";
}else{
path=path+"/Questions and Answers for a World in Crisis";
}
}else if(rightcontent=='Prayers and Meditations of The Mother'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Prayers and Meditations of The Mother";
}else{
path=path+"/Prayers and Meditations of The Mother";
}
}else if(rightcontent=='On Homeopathy with Dr. Pachegaonkar'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/On Homeopathy with Dr. Pachegaonkar";
}else{
path=path+"/On Homeopathy with Dr. Pachegaonkar";
}
}else if(rightcontent=='The Life Divine with Ranganath'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/The Life Divine with Ranganath";
}else{
path=path+"/The Life Divine with Ranganath";
}
}else if(rightcontent=='Evenings with Sraddhalu'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Evenings with Sraddhalu";
}else{
path=path+"/Evenings with Sraddhalu";
}
}else if(rightcontent=='The Ideal of Human Unity with Kittu Reddy'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/The Ideal of Human Unity with Kittu Reddy";
}else{
path=path+"/The Ideal of Human Unity with Kittu Reddy";
}
}else if(rightcontent=='The Human Cycle with Kittu Reddy'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/The Human Cycle with Kittu Reddy";
}else{
path=path+"/The Human Cycle with Kittu Reddy";
}
}else if(rightcontent=='Reflections on The Mother by Dr. Ananda Reddy'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Reflections on The Mother by Dr. Ananda Reddy";
}else{
path=path+"/Reflections on The Mother by Dr. Ananda Reddy";
}
}else if(rightcontent=='Fine Poetry'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Fine Poetry";
}else{
path=path+"/Fine Poetry";
}
}else if(rightcontent=='Quotations to Inspire and Uplift'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Quotations to Inspire and Uplift";
}else{
path=path+"/Quotations to Inspire and Uplift";
}
}else if(rightcontent=='Om Choir'){
path=path+"/Disciples/Narad/Om Choir$$$";
}else if(rightcontent=='Reading Radiant Daughter'){
path=path+"/Disciples/Narad/Readings of The Radiant Daughter";
}else if(rightcontent=='Reading The Mother on Savitri'){
path=path+"/Disciples/Narad/Readings of The Mother on Savitri";
}else if((rightcontent=='disciples' || rightcontent=='ashram') && (type=="audio")){
path=path+"/Disciples";
}else if((rightcontent=='disciples') && (type=="video")){
path=path+"/Disciples";
//html="Alok Pandey, Dr.";
//if (html=='Seeking the New Poetry$$$'){
//path=path+"/Narad$$$/"+html;
//}
}else if((rightcontent=='Auroville') && (type=="video")){
path=path+"/Auroville";
}else if(rightcontent=='Seeking the New Poetry'){
if (type=='video' && html!=''){
path=path+"/Disciples/"+html+"/Seeking the New Poetry$$$";
}else{
path=path+"/Seeking the New Poetry$$$";
}
}else if(((rightcontent=='Authors from Other Centers') || (rightcontent=='Other Centers')) && (type=="video")){
path=path+"/Authors from Other Centers";
}else if(((rightcontent=='Authors from Other Centers') || (rightcontent=='Related Centers')) && (type=="audio")){
path=path+"/Authors from Other Centers";
}else if((rightcontent=='ashram') && (type=="video")){
path=path+"/Ashram$$$";
}else if((rightcontent=='the mother') && (type=="video")){
path=path+"/The Mother---$$$";
}else if((rightcontent=='sri aurobindo') && (type=="video")){
path=path+"/Sri Aurobindo---$$$";
}else if(rightcontent=='the mother'){
path=path+"/The Mother";
}else if(rightcontent=='Sanskrit-Alphabet'){
path=path+"/Sanskrit/Alphabet/Alphabet$$$";
}else if(rightcontent=='Sanskrit-A New Method'){
path=path+"/Sanskrit/A New Method/Video$$$";
}else if(rightcontent=='Sanskrit-Lesson- 1$$$'){
path=path+"/Sanskrit/Samskrita Sopanam/Lesson- 1$$$";
}else if(rightcontent=='Sanskrit-Lesson- 2$$$'){
path=path+"/Sanskrit/Samskrita Sopanam/Lesson- 2$$$";
}else if(rightcontent=='Sanskrit-Lesson- 3$$$'){
path=path+"/Sanskrit/Samskrita Sopanam/Lesson- 3$$$";
}
if(html!="" && html!="Authors from Other Centers" && html!="English" && html!="Seeking the New Poetry$$$" && html!="Fine Poetry" && rightcontent!="Seeking the New Poetry" && rightcontent.toLowerCase()!="interviews with disciples and devotees$$$" && rightcontent!="Sri Aurobindo Ashram - The Early Years$$$" && rightcontent.toLowerCase()!="interviews with aurovillians$$$" && rightcontent!="Explorations in Savitri$$$" && rightcontent!="Savitri Readings" && rightcontent!="Om Choir" && rightcontent!="Reading Radiant Daughter" && rightcontent!="Reading The Mother on Savitri" && rightcontent!="Questions and Answers for a World in Crisis" && rightcontent!="Prayers and Meditations of The Mother" && rightcontent!="Fine Poetry" && rightcontent!="Quotations to Inspire and Uplift" && rightcontent!="Interviews" && rightcontent!="On Homeopathy with Dr. Pachegaonkar" && rightcontent!="The Life Divine with Ranganath" && rightcontent!="Evenings with Sraddhalu" && rightcontent!="The Ideal of Human Unity with Kittu Reddy" && rightcontent!="The Human Cycle with Kittu Reddy" && rightcontent!="Reflections on The Mother by Dr. Ananda Reddy"){
path=path+"/"+html;
//alert (path);
}
if(type=='photo'){
path=rightcontent;
}else if(type=='ashram'){
path=rightcontent;
}
// alert(document.location);
//alert("here");
//alert(path);
if(History!='Back'){
//alert("herexxx");
load(path);
}
if(onlyright!=1)
document.getElementById('bodycontent').innerHTML='