
//Make a js function out of this to be called at every page. Saves load time.
//have to make the picture calls absolute, cant adjust for level.
function picmaker(name,description,ticked,attr,wid,heit) //makes a new array
{ this.name=name; this.description=description; this.ticked=ticked;this.attr=attr;this.wid=wid; this.heit=heit}

function picArray(){
pic=new Array(); // array for pic

pic[0]=new picmaker("Agni","Agni is the God of Fire.",false,"P");
pic[1]=new picmaker("Bagong_pool","The Bagong pool is a special meditation pool, the bottom of which is below ground level.",false,"P");
pic[2]=new picmaker("Bagong_pool2","The Bagong pool was made after water welled up under the Bagong statue.",false,"P");
pic[3]=new picmaker("Bayu","Bayu is the God of Air and Wind.",false,"P");
pic[4]=new picmaker("Borobudur","A replica of Borobudur, the most famous Buddhist temple in Java.",false,"L");
pic[5]=new picmaker("Borobudur2","Borobudur was made as a teaching tool for monks.",false,"L");
pic[6]=new picmaker("Candra","Candra is the Moon God.",false,"P");
pic[7]=new picmaker("Lakshmi","Lakshmi is the Goddess of Harmony and Spiritual Prosperity.",false,"C",336,480);
pic[8]=new picmaker("Dragon_Omphelos","This is a replica of the dragon that guards a sacred water source at Baluwarti, our previous location. The dragon is a universal symbol of raw natural power.",false,"L");
pic[9]=new picmaker("Dragon","The dragon is untamed energy.",false,"L");
pic[10]=new picmaker("Dragons","The red and white dragons chasing each other in circles represent the continuous movement of energy that keeps the universe going.",false,"L");
pic[11]=new picmaker("Durga_old_land","Durga is a very powerful manifestation of the Great Goddess. Although she is often seen as terrifying, she is also beautiful and benevolent.",false,"L");
pic[12]=new picmaker("Durga_old_land2","Durga is our first statue on the land. She was placed at this spot where an ancient Lingam existed long before anything else was built at the land. ",false,"L");
pic[13]=new picmaker("Easter_island","The monolithic stone head from Easter Island is the first of our miniatures.",false,"L");
pic[14]=new picmaker("Ellipse","A view along the ellipse toward the east.",false,"L");
pic[15]=new picmaker("Fountain","The fountian represents the Water of Life.",false,"L");
pic[16]=new picmaker("Ganesha_ol","Ganesha is the Lord of Created Beings and Remover of Obstacles. He is also the beloved son of Shiva and Pravati.",false,"P");
pic[17]=new picmaker("Ganesha","This Ganesha is placed on an inner tub of the main meditation pond.",false,"P");
pic[18]=new picmaker("Gareng_Petruk_Bagong","The two sons of Semar and his shadow are depicted as clowns; they often solve problems in unexpected ways; they symbolise certain aspects of the kundalini process.",false,"L");
pic[19]=new picmaker("Gareng","Gareng is one of Semar's sons.",false,"P");
pic[20]=new picmaker("Guardian","One of Kali's people; the guardian is fierce.",false,"P");
pic[21]=new picmaker("Indra","Indra is the King of the Gods, the ruler of heaven, connected to the planet Jupiter.",false,"P");
pic[22]=new picmaker("Inner_gates","The inner gates protectect the temple from harmful energies.",false,"L"); 
pic[23]=new picmaker("Kuwera","Kuwera is the Guardian of Wealth; he guards Indra's treasure.",false,"P");
pic[24]=new picmaker("Nara_Singa_Murti","Nara Singa Murti is Vishnu's fourth incarnation; he slays a demon king which represents the ego.",false,"P");
pic[25]=new picmaker("North_South_pole","The North - South Pole Deity represents time and space, what our dimension is made of and reality as we know it.",false,"P");
pic[26]=new picmaker("Old_land","Picture of the old land.",false,"L");
pic[27]=new picmaker("Opa","Opa is a highly developed yogi who is said to have sometimes lived at the North Pole.",false,"L");
pic[28]=new picmaker("Omphelos","The Omphelos contains many different aspects",false,"L");
pic[29]=new picmaker("Omphelos2","A student practicing sun meditation in the foreground.",false,"L");
pic[30]=new picmaker("Outer_gates","The outer gates are the first entrance to the land.",false,"L");
pic[31]=new picmaker("Overview_pond","The land seen from a vantage point.",false,"L");
pic[32]=new picmaker("Padmasana_back","The back of the Padmasana with Vishnu on Garuda. The Padmasana is the seat of the Deity; a focal point of ceremonies at Hindu temples.",false,"P");
pic[33]=new picmaker("Padmasana","The Padmasana seen from the front.",false,"P");
pic[34]=new picmaker("Padmasana2","Corner view of the Padmasana",false,"P");
pic[35]=new picmaker("Pendopo","The Pendopo is a traditional hall based on Javanese architecture. It is used for ritual purposes and for resting.",false,"L");
pic[36]=new picmaker("Pertiwi","Pertiwi is the Earth Goddess.",false,"P");
pic[37]=new picmaker("Petruk","Petruk is one of Semar's sons.",false,"P");
pic[38]=new picmaker("Pond","The pond has the eight gods of the different principles around and Vishnu and Ganesha in the center",false,"C",550,293);
pic[39]=new picmaker("Durga_south","This Durga is placed in the south axis of the ellipse",false,"P");
pic[40]=new picmaker("Sang_Hyang_Wenang","Sang Hyang Wenang is the highest authority, no image of this aspect",false,"L");
pic[41]=new picmaker("Semar_Omphelos","Semar is the guardian of Java. He is the javanese representation of Ishmoyo wich means the overcoming of maya and is the principle of the causal plane.",false,"P");
pic[42]=new picmaker("Semar_pendopo","Semar is the guardian of Java",false,"P");
pic[43]=new picmaker("Semar","Semar is the guardian of Java",false,"P");
pic[44]=new picmaker("Semar2_pendopo","Semar is the highest and the lowest",false,"P");
pic[45]=new picmaker("Sri_Bairawa_Bagawati","Sri Bairawa Bagawati is a destructive manifestation of the Great Godess created from the combined power of the gods to destroy evil manifest as a demon king. ",false,"P");
pic[46]=new picmaker("Sri_Erlanga","Sri Erlanga was a higly developed Javanese king who was recognised as an incarnation of Vishnu",false,"P");
pic[47]=new picmaker("Sunrise_over_Omphelos","Sunrise over Omphelos",false,"L");
pic[48]=new picmaker("Surya","Surya is the sun god",false,"P");
pic[49]=new picmaker("Uma","Uma is the beautiful aspect of Durga she is the consort of Manikmoyo",false,"P");
pic[50]=new picmaker("Vishnu_Garuda_pond","Vishnu on Garuda in the center of the pond.",false,"P");
pic[51]=new picmaker("Wamana_pendopo","Wamana is an incarnation of Vishnu he has the power over the three worlds.",false,"P");
pic[52]=new picmaker("Waruna","Waruna is the god of the waters",false,"P");
pic[53]=new picmaker("Yama","Yama si the god of death.",false,"P");
pic[54]=new picmaker("special_moon_tub","an underground above ground moon tub",false,"L");
pic[55]=new picmaker("Special_moon_tub2","This underground and above ground moon tub represents the extra 1/2 lunar month in the solar year.",false,"P");
pic[56]=new picmaker("North_pole_pen","Pak Hardjanto always paid special attention to the North Pole/South Pole principle, since it represents space and time, meaning our reality.",false,"P");
pic[57]=new picmaker("Dewi_Sri","Dewi Sri is the Godess of fertility and good harvest",false,"C",500,472);
pic[58]=new picmaker("Gayatri","Gayatri is the mother of the Vedas, the archetypal Great Mother Goddess, source of all life.",false,"C",180,470);
pic[59]=new picmaker("Vishnu_Garuda_omph","This staue is a copy of one that used to be a relif outside Pak Hardjantos office. The inscription is one of his tenents : If a man worships Vishnu without himself becoming Vishnu , he will not reap the fruits of that worship. If he worship Vishnu by becoming himself Vishnu an initiate will become great Vishnu. \n Wasista Ramayana",false,"P");


pic[60]=new picmaker("Pak_Hardjanto_young","Pak Hardjanto when he was younger.",false,"P");
pic[61]=new picmaker("Pak_Hardjanto2","Pak Hardjanto",false,"C",356,520);
pic[62]=new picmaker("Pak_Hardjanto3","Pak Hardjanto",false,"C",446,278);
pic[63]=new picmaker("Pak_Hardjanto4","Pak Hardjanto",false,"P");
pic[64]=new picmaker("Pak_Hardjanto5","Pak Hardjanto",false,"L");
pic[65]=new picmaker("Pak_Hardjanto6","Pak Hardjanto",false,"C",336,484);
pic[66]=new picmaker("Americas","North and south America, so far  represented by the serpent mound, Olmec head and Easter island head",false,"C",724,400);
pic[67]=new picmaker("hall","The center hall in this building is for Tai Chi, hatha yoga, meetings, guests etc.",false,"C",600,450);
pic[68]=new picmaker("pyramid28","This is where we are building our pyramid for stargazing. It is placed to counterbalance the pond",false,"L");
pic[69]=new picmaker("turtle","This is the center of the ellipse, the turtle will carry a Yoni-Linga in a roofed space.",false,"L");
pic[70]=new picmaker("NE_gate","The north east gate points directly towards the June solstice. on the left the gate we have, on the right the one we want.",false,"C",562,300);
pic[71]=new picmaker("East_gate","The east gate points directly towards the Equinox. On the left the gate we have, on the right the one we want. (actually this has to be a double gate) ",false,"C",542,300);
pic[72]=new picmaker("SE_gate","The south east gate points directly towards the december solstice. On the left the gate we have, on the right the one we want. ",false,"C",594,300);
pic[73]=new picmaker("Pak_Har_chair","Pak Hardjanto in his outside chair .",false,"C",293,448);
pic[74]=new picmaker("Bima","Bima is said to be the first human to Moksha, and has therefore got the honor of becoming the whole milky way",false,"C",336,420);
pic[75]=new picmaker("Pak_Har_ktp","Pak Hardjanto in formal black javanese-yogi style.",false,"C",302,448);
pic[76]=new picmaker("Omphalos_stone","The Omphalos stone is a replica of the actual one from Delphi. Omphalos means navel of the world and denotes the place it is in as the center of the world.",false,"P");
pic[77]=new picmaker("pretty1","Sunrise",false,"C",800,600);
 pic[78]=new picmaker("pretty2","Sunrise",false,"C",800,600);
 pic[79]=new picmaker("pretty3","Sunrise",false,"C",800,600);
 pic[80]=new picmaker("pretty4","Sunrise",false,"C",800,600);
 pic[81]=new picmaker("pretty5","Sunrise",false,"C",800,600);
 pic[82]=new picmaker("pretty6","Sunrise",false,"C",800,600);
 pic[83]=new picmaker("pretty7","Sunset",false,"C",800,600);
 pic[84]=new picmaker("pretty8","Sunset",false,"C",800,600);
 pic[85]=new picmaker("pretty9","Sunset",false,"C",800,600);
 pic[86]=new picmaker("pretty10","Sunset",false,"C",800,600);
 pic[87]=new picmaker("pretty11","Moon over Vishnu",false,"C",452,600);
  pic[88]=new picmaker("pretty12","Misty mountains",false,"C",800,600);
  pic[89]=new picmaker("pretty13","Moon and Venus",false,"C",800,600);
 pic[100]=new picmaker("plan_1","3D Plan",false,"C",800,520);
 pic[101]=new picmaker("plan_2","3D Plan",false,"C",800,520);
 pic[102]=new picmaker("plan_3","3D Plan",false,"C",800,520);
 pic[103]=new picmaker("plan_4","Overview 2d large",false,"C",800,534);
 pic[104]=new picmaker("plan_5","Overview 2d detail ellipse",false,"C",800,520);
 pic[107]=new picmaker("plan_6","measurements ellipse",false,"C",800,520);
 pic[106]=new picmaker("plan_7","small 3d",false,"C",800,600);
 pic[105]=new picmaker("plan_8","Plan on top, picture of land on bottom.",false,"C",800,464);
pic[150]=new picmaker("hard_work","Hard at work carving stone and sawing logs",false,"P");
pic[151]=new picmaker("threes_company","Efficiency rules in tight spaces",false,"L");
pic[152]=new picmaker("yoni_move1","Preparing to lower the yoni",false,"L");
pic[153]=new picmaker("yoni_move2","Lowering into the dragons lair",false,"L");
pic[154]=new picmaker("yoni_move3","Final adjustments, Some strong backs at work here.",false,"L");
pic[155]=new picmaker("yoni_move4","Crowning the achivement. Unfortunately this Lingam is not quite correct and has to be changed.",false,"L");



pic[170]=new picmaker("kendedes1","The Kendedes pool made with concrete.",false,"L");
pic[171]=new picmaker("kendedes2","Putting natural slate on sides and bottom",false,"P");
pic[172]=new picmaker("kendedes3","Pool finished with Kendedes statue installed",false,"L");
pic[173]=new picmaker("kendedes4","Tara installed on pedestal behind pool",false,"L");
pic[174]=new picmaker("kendedes5","Kendedes with flower garlands",false,"L");
pic[175]=new picmaker("kendedes6","View from south to north, center of pyramid in alignement with center of Kendedes pool",false,"L");

pic[200]=new picmaker("start_pyramid","This is the start of the pyramid , making stands to stretch lines from.",false,"L");
pic[201]=new picmaker("dig_and_place","Digging to place the foundation.",false,"L");
pic[202]=new picmaker("wide_pyramid","Wide angle to see the pyramid in connection with the rest of the land",false,"C",800,600);
pic[203]=new picmaker("foundation_ready","the foundation is ready to recive the bricks",false,"L");

pic[204]=new picmaker("walls_going_up","the walls are being built with red bricks on top of the finished foundation",false,"L");
pic[205]=new picmaker("pyramid_acd","Plan for the pyramid",false,"C",777,504);
pic[206]=new picmaker("pyr_cetto","Cetto is a Hindu temple seated on the slopes of Mount Lawu. On top of Cetto is a pyramid.",false,"L");
pic[207]=new picmaker("days_end","At days end Thursday July 8 the walls are growing. Soon its time to make the roof.",false,"L");
pic[208]=new picmaker("Coffer","The Coffer is based on the measurements of the one in the Kings chamber of the great pyramid.",false,"L");
pic[209]=new picmaker("pyr_iron1","Walls finished we make the iron beams for the edges of the roof , and the pillars for the wall.",false,"L");
pic[210]=new picmaker("pyr_iron2","Making the form for the roof",false,"P");
pic[211]=new picmaker("pyr_sem1","Cementing the roof.",false,"L");
pic[212]=new picmaker("pyr_found_wall","Making the foundation for the outside wall. ",false,"L");
pic[213]=new picmaker("pyr_fill_wall","Filling the space between the inside wall and the outside with landfill ",false,"L");
pic[214]=new picmaker("pyr_wall_out1","Outside wall filling up ",false,"L");
pic[215]=new picmaker("pyr_wall_anchor","We chose to use re bar to anchor the outside wall to the inside wall in order for the walls not to buckle from the pressure of the dirt ",false,"L");
pic[216]=new picmaker("pyr_wall_anchor2","The inside wall and the wall anchor, this will be cemented to the wall. ",false,"L");
pic[217]=new picmaker("pyr_view_top","View from the top of the pyramid. the Turtle is also undergoing changes. ",false,"L");
pic[218]=new picmaker("pyramid23","Keep filling up the sides",false,"L");
pic[219]=new picmaker("pyramid21","Starting stairs",false,"L");
pic[220]=new picmaker("pyramid22","Stairs finished",false,"L");
pic[221]=new picmaker("pyramid24","Almost to the top",false,"L");
pic[222]=new picmaker("pyramid25","Making a waterfall on the south side.",false,"P");
pic[223]=new picmaker("pyramid26","Start of tiling.",false,"L");
pic[224]=new picmaker("pyramid27","More tiling ",false,"L");
pic[225]=new picmaker("pyramid28","Tiling finished ",false,"L");
pic[226]=new picmaker("pyramid29","Pyramid finished ",false,"L");
pic[227]=new picmaker("pyramid30","Pyramid finished ",false,"L");

//pic[226]=new picmaker(" "," ",false,"L");

}

function doNothing() 
{}

//choose random pic from array x depending on length of array t times,c is the
//counter for the array outpic.

//absolute path ="http://www. sahasraadhipura.org/Images/thumbnails/Ganesha_ol_tn.jpg">

function  openWindow(t){
img ="<img src ='http://www.sahasraadhipura.org/Images/"+pic[t].name+".jpg'>";

switch(pic[t].attr){
case "P":
	wd=350;ht=460;break;
case "L":  
	wd=460;ht=350;break;
case"C":
	wd=pic[t].wid;ht=pic[t].heit;break;
default:
	wd=600;ht=600;
}

len=pic[t].description.length;

if (len<=40){ht+=100}
if ((40<len) &&( len<=60)){ht+=120}
if ((60<len) && (len<=120)){ht+=140}
if ((120<len) && (len<=200)){ht+=170}
if ((len>200) && (len<=300)) {ht+=220}
if(len>300){ht+=260}
wd+=30;

	x = window.open('','windowName','width='+wd+',height='+ht+',resizable=1');
	x.document.open();
	x.document.write('<html><head><title>'+pic[t].name+'<\/title><\/head><body><center>');
	x.document.write(img);
	x.document.write('<\/center><br>'+pic[t].description+'<\/body><\/html>');
	x.resizeTo(wd,ht);
	x.document.close();
	if( x.focus ) { x.focus(); }

}

function closeWindow(){x.document.close;}

function thumbsLeft(t,c)
{
var nameout=pic[t].name.replace(/_/g," ");
if (c){outstring="<div id='floatleftc'><a href='javascript: openWindow(";}
else 	{outstring="<div id='floatleft'><a href='javascript: openWindow(";}
	outstring+=t;      //here make call absolute
	outstring+=")'><img src='http://www.sahasraadhipura.org/Images/thumbnails/"+pic[t].name+"_tn.jpg' ";
	outstring+="border='0'></a><h5><center>";
	outstring+=nameout+"</center></h5></div>";
document.write(outstring);
}

function thumbsRight(t,c)
{var nameout=pic[t].name.replace(/_/g," ");
	if (c){outstring="<div id='floatrightc'><a href='javascript: openWindow(";}
else{outstring="<div id='floatright'><a href='javascript: openWindow(";}
	outstring+=t;           //here make call absolute
	outstring+=")'><img src='http://www.sahasraadhipura.org/Images/thumbnails/"+pic[t].name+"_tn.jpg' ";
	outstring+="border='0'></a><h5><center>";
	outstring+=nameout+"</center></h5></div>";
document.write(outstring);
}



function randomiser(ranx)
{i=0;
for (i=c; i<c+t; i++){
 	rnr=Math.floor(Math.random()*ranx.length);
	if (ranx[rnr].ticked==false )
		 {outpic[i]=ranx[rnr];
		ranx[rnr].ticked=true;}
else {i=i-1}
}
c=i;
}


