var pics = new Array ("yellow", "blue", "red");
function initPage() {
	num = randomValue(3);
	document.images["pic"].src="img/"+pics[num-1]+".jpg";
}

function randomValue(high) {
    return 1 + Math.floor(Math.random() * high);
}

function mailme(name,text,subject,body){
     //(example below assumes your domain is domain_name.co.uk) 
     //edit the following 2 lines for the domain of your site 
     //d="9-30";
     //e=".com";
d="yahoo";
e=".com";

     str='mailto:' + name + '@' + d + e 
     if(subject != ""){
         str+='?subject=' + subject 
         if(body!="")str+="&body=" + body 
     }
     //str+= '">'
     //str+= name + '@' + d + e 
     window.open(str);
};

function showPage(idx, url) {
	shown=-1;
	parent.hidePhotos();
	test.endScroll();test.jumpTo(0,0); // reset scroll
	if (url.indexOf("why") >= 0 || url.indexOf("credits") >= 0 || url.indexOf("news") >= 0)
		document.getElementById("arrowSpan").style.display="inline";
	else document.getElementById("arrowSpan").style.display="none";
	window.tmp.location=url;
}
function updateContent(val) {
document.getElementById("myScrollContent").innerHTML="<table width='100%' height='100%'><tr><td align='right'>"+
val+"</td></tr></table>";
test.load();
}

function showPhotos(idx) {
//Menus[idx].mpop.hide();
document.getElementById("arrowSpan").style.display="none";
x=getPageX(document.images["mm"]);
y=getPageY(document.images["mm"]);
document.getElementById("photoLeftDiv").style.left=x+40+"px";
document.getElementById("photoLeftDiv").style.top=y-320+"px";
document.getElementById("photoRightDiv").style.left=x+250+"px";
document.getElementById("photoRightDiv").style.top=y-380+"px";
document.getElementById("photoLeftDiv").style.visibility="visible";
document.getElementById("photoRightDiv").style.visibility="visible";
document.getElementById("verse").style.visibility="hidden";
document.getElementById("myScrollContent").innerHTML="";
document.getElementById("picture").style.visibility="hidden";
}

function hidePhotos() {
document.getElementById("photoLeftDiv").style.visibility="hidden";
document.getElementById("photoRightDiv").style.visibility="hidden";
document.getElementById("verse").style.visibility="visible";
document.getElementById("picture").style.visibility="visible";
}
