var thelocation=location.href;
var thefono;
thefoarr=new Array();
thelocationarr=thelocation.split("/");
for(i=0;i<thelocationarr.length;i++){
	if(thelocationarr[i]=="monastery"){
		thefono=i;
		break;
	}
}
var firstname2=thelocationarr[thelocationarr.length-2];
var thefoarrno=0;
for(i=thefono+1;i<thelocationarr.length-1;i++){
	thefoarr[thefoarrno]=thelocationarr[i];
	thefoarrno+=1;
}
var thebigpicurl=rooturl2+"showpic.asp?";
var firstname="monastery/";
for(i=0;i<thefoarr.length;i++){
	firstname+=thefoarr[i]+"/";
	if(i==0){
		thebigpicurl+="fo"+(i+1)+"="+thefoarr[i];
	}else{
		
		thebigpicurl+="&fo"+(i+1)+"="+thefoarr[i];
	}
}

firstname="/chineset/"+firstname+"moviepic/";
var thesviewdata="/chineset/monastery/sherabling/utility/smallview.swf?theurl="+firstname;

function showpic(ppp){
	var thebigpicurlin=thebigpicurl;
	var specs="toolbar=no,location=no,directories=no,statusbar=no,menubar=no,scrollbars=no,resizable=no";
	specs+=",width=670,height=450";
	thebigpicurlin+="&picnow="+ppp;
	subwin=window.open(thebigpicurlin,"",specs);
	subwin.moveTo((screen.width-670)/2,(screen.height-450)/2);
	subwin.focus();	
}
function showpic1(ppp){
	var thebigpicurl2=thebigpicurl;
	thebigpicurl+="&fo4="+ppp;
 	showpic(1);
 	thebigpicurl=thebigpicurl2;
}

function showpic2(ppp,thewww,thehhh){
	var thebigpicurl2=thebigpicurl;
	thebigpicurl+="&fo4="+ppp+"&parentwww="+thewww+"&parenthhh="+thehhh;
 	location.href=thebigpicurl;
 	thebigpicurl=thebigpicurl2;
}
function showvideo(ppp){
	var specs="toolbar=no,location=no,directories=no,statusbar=no,menubar=no,scrollbars=no,resizable=no";
	specs+=",width=600,height=340";
	var thisvideo="/movie/video_e.asp?thepagename="+ppp;
	subwin=window.open(thisvideo,"video",specs);
	subwin.moveTo((screen.width-600)/2,(screen.height-340)/2);
	subwin.focus();
}

