/***********************************************
* CMotion Image Gallery- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for source code
* This copyright notice must stay intact for legal use
* Modified for autowidth and optional starting positions in
* http://www.dynamicdrive.com/forums/showthread.php?t=11839 by jschuer1 8/5/06
***********************************************/

var isIE = false;
var req;
var images = new Array;
var cachedImages = new Array;
var selectedIndex = 0;
var prevIndex = 0;
var mouseX;

 //1) Set width of the "neutral" area in the center of the gallery.
var restarea=6;
 //2) Set top scroll speed in pixels. Script auto creates a range from 0 to top speed.
var maxspeed=3;
 //3) Set to maximum width for gallery - must be less than the actual length of the image train.
var maxwidth=1000;
 //4) Set to 1 for left start, 0 for right, 2 for center.
var startpos=0;
 //5) Set message to show at end of gallery. Enter "" to disable message.
var endofgallerymsg='';

function enlargeimage(path, optWidth, optHeight){ //function to enlarge image. Change as desired.
var actualWidth=typeof optWidth!="undefined" ? optWidth : "600px" //set 600px to default width
var actualHeight=typeof optHeight!="undefined" ? optHeight : "500px" //set 500px to  default height
var winattributes="width="+actualWidth+",height="+actualHeight+",resizable=yes"
window.open(path,"", winattributes)
}

//mahesh

function showHideDiv()
{
    
}


//mahesh


////NO NEED TO EDIT BELOW THIS LINE////////////

var iedom=document.all||document.getElementById, scrollspeed=0, movestate='', actualwidth='', cross_scroll, ns_scroll, statusdiv, loadedyes=0, lefttime, righttime;

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function creatediv(){
statusdiv=document.createElement("div")
statusdiv.setAttribute("id","statusdiv")
document.body.appendChild(statusdiv)
statusdiv=document.getElementById("statusdiv")
statusdiv.innerHTML=endofgallerymsg
}

function positiondiv(){
var mainobjoffset=getposOffset(crossmain, "left"),
menuheight=parseInt(crossmain.offsetHeight),
mainobjoffsetH=getposOffset(crossmain, "top");
statusdiv.style.left=mainobjoffset+(menuwidth/2)-(statusdiv.offsetWidth/2)+"px";
statusdiv.style.top=menuheight+mainobjoffsetH+"px";
}

function showhidediv(what){
if (endofgallerymsg!="") {
positiondiv();
statusdiv.style.visibility=what;
}
}

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft: what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function moveleft(){
if (loadedyes){
movestate="left";
if (iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){
cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px";
showhidediv("hidden");
}
else
showhidediv("visible");
}
lefttime=setTimeout("moveleft()",10);
}

function moveright(){
if (loadedyes){
movestate="right";
if (iedom&&parseInt(cross_scroll.style.left)<0){
cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px";
showhidediv("hidden");
}
else
showhidediv("visible");
}
righttime=setTimeout("moveright()",10);
}

function motionengine(e){
var mainobjoffset=getposOffset(crossmain, "left"),
dsocx=(window.pageXOffset)? pageXOffset: ietruebody().scrollLeft,
dsocy=(window.pageYOffset)? pageYOffset : ietruebody().scrollTop,
curposy=window.event? event.clientX : e.clientX? e.clientX: "";
curposy-=mainobjoffset-dsocx;
var leftbound=(menuwidth-restarea)/2;
var rightbound=(menuwidth+restarea)/2;
if (curposy>rightbound){
scrollspeed=(curposy-rightbound)/((menuwidth-restarea)/2) * maxspeed;
clearTimeout(righttime);
if (movestate!="left") moveleft();
}
else if (curposy<leftbound){
scrollspeed=(leftbound-curposy)/((menuwidth-restarea)/2) * maxspeed;
clearTimeout(lefttime);
if (movestate!="right") moveright();
}
else
scrollspeed=0;
}

function contains_ns6(a, b) {
if (b!==null)
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function stopmotion(e){
if (!window.opera||(window.opera&&e.relatedTarget!==null))
if ((window.event&&!crossmain.contains(event.toElement)) || (e && e.currentTarget && e.currentTarget!= e.relatedTarget && !contains_ns6(e.currentTarget, e.relatedTarget))){
clearTimeout(lefttime);
clearTimeout(righttime);
movestate="";
}
}

function fillup(){
if (iedom){
crossmain=document.getElementById? document.getElementById("motioncontainer") : document.all.motioncontainer;
if(typeof crossmain.style.maxWidth!=='undefined'){
crossmain.style.maxWidth=maxwidth+'px';
menuwidth=crossmain.offsetWidth;
}
cross_scroll=document.getElementById? document.getElementById("motiongallery") : document.all.motiongallery;
actualwidth=document.getElementById? document.getElementById("trueContainer").offsetWidth : document.all['trueContainer'].offsetWidth;
if (startpos)
cross_scroll.style.left=(menuwidth-actualwidth)/startpos+'px';
crossmain.onmousemove=function(e){
motionengine(e);
}

crossmain.onmouseout=function(e){
stopmotion(e);
showhidediv("hidden");
}
}
loadedyes=1
if (endofgallerymsg!=""){
creatediv();
positiondiv();
}
if (document.body.filters)
onresize()
}
//window.onload=fillup;

onresize=function(){
if (typeof motioncontainer!=='undefined'&&motioncontainer.filters){
motioncontainer.style.width="0";
motioncontainer.style.width="";
motioncontainer.style.width=Math.min(motioncontainer.offsetWidth, maxwidth)+'px';
}
menuwidth=crossmain.offsetWidth;
cross_scroll.style.left=startpos? (menuwidth-actualwidth)/startpos+'px' : 0;
}


//var devotee1_brief = "This is brief introduction for devotee 1";
var varRege = "On 11TH June 1936 Chinna Kistna Rajasaheb Bahadur says: I look upon Sri Sai Baba as the Creator, Preserver and Destroyer. I did so before his mahasamadhi in 1918 and I do so now. To me, he is not gone. He is, even now. A short account of myself is necessary to show how I came to Sai Baba and how he filled my life and became my all in all...";
var varNarke = "Professor G.G Narke, M.A.,(Cal.) M.Sc.(Manch), Profes­sor of Geology & Chemistry in College of Engineering, Deccan Gymkhana, age 53, Brahmin, Poona says : In the first place, you see I have placed Sai Baba amongst the house-hold Gods we worship daily at home. Sai Baba is God - not an ordinary Satpurusha. The divine gleam in Sai\'s eyes denotes that He is the Satpurusha...";
//var varDhumal = "Rao bahadur s.b.dhumal, B.A., LL.B, Pleader, Brahmin, aged 63, Nasik, says: \r I have one great difficulty in answering the question \"What are your experiences of Sal Baba?\"   All hours of day and night, 1 am having experiences of Baba.    There is no incident or event in my life which I do not connect with him -however trivial it may appear to be. I firmly believe that everything in my life is swayed by Baba. What then is to be mentioned as my experience?   Of course, the outside world will not be ready to accept my belief as correct or well-founded. But that, matters nothing to me. In fact, that very disbelief of people seems to be a reason for refusing to dis­close one's experience. Every devotee feels that his experi­ences are his own, and are given to him for his own spiritual and temporal benefit and not for ventilation or publication to the general public which, of course, includes masses of Igno­rant, irrelevant carping critics and scoffers. Yet ardent biog­raphers are anxious to ferret out one's innermost secret and sacred experiences to embellish their work. But the devotee whom they delve into feels that in the very act of dragging the secret experience into light, its reality and life are destroyed. The anatomist anxious to examine the living organism inch by inch cuts out what he wants and places it under his microscope, but in that very act, life is destroyed and what he examines with his instrument is dead tissue and not the living organism. The best way of understanding Baba is to experience him oneself. Where is Baba gone? He is still alive and active - more active, if that were possible, than he was before his Mahasamadhi. Anyone In downright earnest can get Into touch with him, to-day and at once";
var varDhumal = "Rao Bahadur S.B. Dhumal, B.A., LL.B, Pleader, Brahmin, aged 63, Nasik, says: I have one great difficulty in answering the question \"What are your experiences of Sai Baba?\"   All hours of day and night, I am having experiences of Baba. There is no incident or event in my life which I do not connect with him - however trivial it may appear to be...";
//var varTarkhad = "My daughter took ill when she was fifteen months old and I was sore distressed. Just then my brother-in-law came back from Shirdi and was sounding the high praise of Sai Baba. I then said that if the child recovered, we should go with our child to Shirdi and pay our respects to Sai Baba. The child recovered and we went up to fulfil our vow. One\'s first impression of Sai Baba was derived from his eyes. There was such power and penetration in his glance that none could continue to look at his eyes. One felt that Sai Baba was reading him, or her, through and through. Soon one lowered one's eyes and bowed down. One felt that He was not only in one's heart, but in every atom of one's body. A few words, a gesture would reveal to one that Sai Baba knew all about the past, present and even future and about everything else. There was nothing else to do for one, except to submit trustfully and to surrender oneself to Him. And there He was to look after every minute detail, and guide one safe through every turn and every vicissitude of life. He was the Antaryami, call Him God or Satpurusha in Sahaja Sthithi or what you like. But the overpowering personality was there, and in his presence no doubts, no fears, no questioning had any place and one resigned oneself and found that was only course, the safest and best course. From one's first entry into His pres­ence, one went on getting experience of His power. His all-knowing and all-pervasive personality, His protecting care. that shielded one, wherever one went and at any time what­soever.";
var varTarkhad = "My daughter took ill when she was fifteen months old and I was sore distressed. Just then my brother-in-law came back from Shirdi and was sounding the high praise of Sai Baba. I then said that if the child recovered, we should go with our child to Shirdi and pay our respects to Sai Baba. The child recovered and we went up to fulfil our vow ...";
//var varRBPurandhare = "Raghuvir B. purandhare, s/o Bhaskar Purandhare. aged 60, Brahmin, Deshasth Shukla Yajur Vedi (Kelva Mahim, Thana Dist - originally) now at Bandra. Retired clerk of G.I.P. Rly, Sainath Ashram, 59-B, Perry Road, Bandra, state says:I heard first of Sai Baba in 1909 and went to see him. I was always desirous of association with Sadhus-saintly people. I heard he was a Saint, so I felt attracted to him. He appeared in my dream and called me to Shirdi. At that time my elder daughter (aged then six months) was very ill and so my mother objected to my going. I still persisted in going to Shirdi and I took my wife, that child and my mother with me to Shirdi. I remained there (first visit) for thirteen days. On the third day of my visit, the child got alright. Baba did not permit me to go back till the thirteenth day. I did not ask him about any matter. He told my mother that for seven centu­ries, he (Sai Baba) was connected with me. \"I will not forget him-I will always remember him even if he is away more than 2000 miles . I will not eat even a bit without him,\" said Baba.";
var varRBPurandhare = "Raghuvir B. Purandhare, s/o Bhaskar Purandhare, aged 60, Brahmin, Deshasth Shukla Yajur Vedi (Kelva Mahim, Thana Dist - originally) now at Bandra. Retired clerk of G.I.P. Rly, Sainath Ashram, 59-B, Perry Road, Bandra, says I heard first of Sai Baba in 1909 and went to see him. I was always desirous of association with Sadhus-saintly people...";
var varWPradhan = "W. Pradhan, B.A., L.L.B, High Court Pleader & J.P. aged 56, residing at Sai Baugh, Santa Cruz. says Nana Saheb Chandorkar was the cause of all my relations going to Baba and therefore the cause of my going also. It was the first week of May 1910. A group of my brothers and other relations were chatting with Mr.Chandorkar ...";
var varHVSathe = "Rao Bahadur Hari Vinayak Sathe, Retired Deputy Collector, Deccani, Brahmin, aged 81 (born 1855), residing at 108. Shukrawar Peth, Poona says I had a daughter by my first wife. I then became a widower before my fortyfourth year. Many friends and acquaintances were pressing me to get married, e.g. Mr. Brave, Mamlatdar of Kopargaon. ...";
//var varDasganu = "IN THE MONTH OF June 1936, DAS GANU MAHARAJ, i.e., Ganpatrao Dattatreya Sahasra-buddhe, says Some facts i.e., autobiographical reminiscences came from Baba's own mouth. But they were very few. Besides, I had not spent much time with Baba. I rarely saw Him. When I was at Shirdi, Baba did not allow me to stay long at the masjid. He made me go away to the Vittal temple where I stayed to write lives of saints, or to spend my time in repeti¬tion of Vishnu Sahasranama etc. I made some inquiries about Baba also before writing these works. Some facts were within my personal knowledge. I was in active (police) service as a Havildar. I had however my literary and histrionic learnings. I took great interest in Tamashas (village plays) and took part in them. I composed poems impromptu, in lavani and other metres. While I was in service and Nana Saheb Chandorkar was D.C. or Collector's chitnis, he took me to Sai Baba. Even from the outset Sai Baba foresaw my future and wanted to save me from my own ways and choice of profession and pastime.  He told Nana Saheb even in my presence. \"This man is fond of Tamashas, and of his service.   Let him give it all up\".   He told me the same and Nana Saheb also. But I liked my pastimes and service.   Gradually I gave up taking part in Tamashas i.e., Village plays.   As for service, I could not think of giving it up. Each time I was advised to give up service, I said \"I will see.\" Baba then said that only by sheer compulsion i.e., by being impaled, I could be made to quit service.   So for about 10 years,  Baba went on dinning into me directly and indirectly, that I should give up service, I shall mention later how in 1903 I was reduced to giving up service after several disasters in which Baba's grace saved me from punishment, disgrace, trouble of various sorts, and even death.";
var varDasganu = "Das ganu Maharaj i.e., Ganpatrao Dattatreya Sahasra-buddhe, Brahmin, Kirtankar, aged about 78, residing generally at Nanded. (Nizam's State) says I have known Sri Sai Baba for a long time and I have given some account of him in my books (1) Bhakti Saramrita Ch. 26, 65, 66 and 67 (1925) (2) Bhakta Lilamrita Ch.31 (1906) and Ch 32 and 33 and (3) Santakatamrita Ch 57. Ch 31 of No.2 and Ch. 57 of No.3 were published in Baba's lifetime. ...";
//var varBayyaji = "Bayyaji Apaji Patel, aged 47, Mahratta, Land owner and Revenue and Police Patel of Biragaon, residing at Shirdi on 9TH DEC 1936 says: I knew Baba since my babyhood.  My house was one of the few houses from which Baba took His bikhsha i.e., begged His bread from the beginning of His life here and up to the end. For some 3 years, Baba would go over about 8 times during the day to our house to beg for His bread.  Next for 3 years He visited us for this purpose four times a day. For 12 years, he visited us twice a day and during the last 12 years He came to us for bread once a day only. From my 11th year, I used to serve Baba. In 1896 i.e., my seventh year, the Ramanavami Urus celebration began.  It was then that Baba began to allow Hindus to affix sandal or to do pooja to him and moslems to read Koran before him at the masjid. This urns was started by Appa Kulkami out of gratitude to Baba for the acquittal in the embezzlement charge brought against him. When Hindus affixed sandal paste to Baba, the latter applied sandal marks with the hand (Punja marks) on the walls of the masjid and other moslems did the same. Baba then applied sandal paste to Mahalsapathy's forehead and the some moslems.  Mahalsapathy applied it to Baba's fore head.  Baba then allowed Namaz to go on at the mosque and enjoined silence on all others while Namaz was going on.  Baba Himself recited the Namaz sometimes. That was only on Saturdays.  When Pedas or other sweets were brought to Baba, He uttered the Kalam (which is the same as Fatia) over the sweets etc., and then distributed them to all - Hindus and Moslems alike.  Baba finding that Hindus and Moslems would have differences as to the way and manner of celebrating the Urus allowed Sandal Panja to be put on all - Hindus and Moslems alike. My father, Nana Sahib Chandorkar, Tatya Patel etc, all bore the expenses of the celebration.";
var varBayyaji = "Bayyaji Apaji Patel, aged 47, Mahratta, Land owner and Revenue and Police Patel of Biragaon, residing at Shirdi says I knew Baba since my babyhood.  My house was one of the few houses from which Baba took His bikhsha i.e., begged His bread from the beginning of His life here and up to the end. For some 3 years, Baba would go over about 8 times during the day to our house to beg for His bread...";
var varBVDev = "Mr. B.V.Dev, Retired Mamlatdar, Station Road, Thana, says I retired in 1911 and went to Baba. I tried to do Pada Pooja at the bidding of  Dixit.  Baba stopped me. 'You need not worship. You have given me Dakshina. That is enough’. Baba took from me one after another four sovereigns. Then he said 'I have received one'.";

var varShama = "Madhav Rao Deshpande alias Shama, Brahmin, aged about 80, Shirdi, says: Upasani Baba, when he came to Shirdi first, was sleeping and boarding here. He was still unwell. He cried in his sleep, 'I am dead' and he asked me to request Sai Baba to help him. I told Sai Baba that Upasani Sastri was expecting death and getting frightened.";


var varAbdul = "Abdul, son of Sultan of Nanded in Khandesh, Aged about 65, Mussulman, residing   at Shirdi says: I came to Shirdi 45 years ago (1889) from Nanded on the banks of Tapti. I was under the care of Fakir Amiruddin of Nanded. Sai Baba appeared in the dream of that Fakir and delivering two mangoes to him directed him to give those fruits to me and to send me to Shirdi. ...";


var varJaikar = "Shyama Rao Jayker aged 70, painter. Ville Parle says I was at Shirdi in 1916-1917 and even earlier, I went and stayed with others. But, when they left Shirdi, I continued to stay. When I was with others I was getting money and so Baba asked me for dakshina and I paid. After others left I had no money. Baba did not then ask me for dakshina. Baba knew of my condition without being told. ...";


var varChandrabai = "Chandrabai aged 66, wife of late Ramachandra Borkar, Ville Parleon. 27th September, 1936. says: I retired in 1911 and went to Baba. I tried to do Pada Pooja at the bidding of  Dixit.  Baba stopped me. 'You need not worship. You have given me Dakshina. That is enough’. Baba took from me one after another four sovereigns. Then he said 'I have received one'.";


var varKushabhav = "Kusha Bhav (alias) Krishnaji Kasinath Joshi son of Kashinath Padmakar Joshi, Joshi Vatandar, Brahmin, aged 70, (10 miles off Ahmednagar), Mirazgaon says: I was given a mere elementary Vernacular School Examination education to qualify myself for a School Master's place on Rs. 5 or 7 per mensem. I got trained also for the hereditary duties of the village priest.";

 



function swapThumbnailImage(imgName, obj) {
	obj.setAttribute('src', imgName)
}

function swapImage(imgName,imgAlt,imgTitl,imgHref,devName,devDesc) {
	var bigimage = document.getElementById('mainimage');
	var piclink = document.getElementById('piclink');
	var fullLink = document.getElementById('fullLink');

	if(prevIndex != 0)
		setOpacity(bigimage,0);
	prevIndex ++ ;
	
	bigimage.setAttribute('src',imgName);
	bigimage.setAttribute('alt',imgAlt);
	piclink.setAttribute('title',imgTitl);
	piclink.setAttribute('href',imgHref);
	
	fullLink.setAttribute('title',imgTitl);
	fullLink.setAttribute('href',imgHref);
	
	
	bigimage.onload = function () {
		fadeIn('mainimage',0);
	};
	
	var imgTitle = document.getElementById('imgTitle');
	if(imgTitle.firstChild!=null){
		imgTitle.removeChild(imgTitle.firstChild);
	}
	var spnName = document.getElementById('spnName');
	spnName.removeChild(spnName.firstChild);
	var newdesc = document.createTextNode(devName)
	spnName.appendChild(newdesc);
	
	var spnDesc = document.getElementById('spnDesc');
	spnDesc.removeChild(spnDesc.firstChild);
	var newdesc = document.createTextNode(devDesc)
	spnDesc.appendChild(newdesc);
}

function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 10;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
    }
  }
}

function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;
  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;
  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
	return true;
}
