// JavaScript Document
//Created 10 June 2004 by Olga Lusina
// JAVA SCRIPTS Russian Orthodox Russian Church web site

var winName = '0';
function newWindow(myNumber)
{
	winName=winName+1;
	bulletinsWindow = window.open(myNumber,winName,'width=800, height=600,scrollbars=yes');
}		


var newWin = '0';
function photoWin(myPicture)
{
		newWin=newWin+1;
		myPhotos=window.open("",newWin,'width=540, height=440, left=100, top=50')
		myPhotos.document.write("<html><head><title>Pictures<\/title>")
		
		//myPix=newArray("assets/gosford_church/001.jpg","assets/gosford_church/002.jpg","assets/gosford_church/003.jpg")
		//thisPic = 0
		//imgCt = myPix.length-1
		
		//function chgSlide(direction)
		//{
				//if(document.images)
				//{
					//thisPic=thisPic+direction
					//if(thisPic>imgCt)
					//{
						//thisPic=0
					//}
					//if(thisPic<0)
					//{
						//thisPic=imgCt
					//}
					//document.Pictures.src=myPix[thisPic]
				//}
		//}
		
		
		myPhotos.document.write("<\/head><body topmargin='0' leftmargin='0'  marginwidth='0' marginheight='0'><img src = " + 
								myPicture + "><br>&lt;&lt&nbsp;&nbsp;Previous &nbsp;&nbsp; Next&nbsp;&nbsp;&gt;&gt; <\/body><\/html>");
		
		//myPhotos.document.write(myPicture);
		
		myPhotos.document.close();
		
}



//Open new window for flash movie//

function startSlides() {
   var resize = '';							// Set the defaults
   var titlebar = '';
   var wvalue = screen.width - 7;
   var hvalue = screen.height - 75;
   var probURL = "/netbank/problem_splash.asp"; 
    
		if (navigator.appName == 'Netscape') {	           // Netscape
			if (screen.height >= 600) {			           // 800 x 600 or greater
			   wvalue = 798;
			   hvalue = 572;
			} 
			else {							               // 640 x 480
			   hvalue = hvalue - 2;
			}		
		  
		    titlebar = ',titlebar=0';
		}
		else {								               // MS Internet Explorer.
			resize = ',resizable';
		}
		
//		setTimeout("location.href = \"" + probURL + "\"", 1);
		window.open('slides.html','clientXpress', 'top=0,left=0,scrollbars=yes,status=yes,width=' + wvalue + ',height=' + hvalue + resize + titlebar + ',hotkeys=0');
  	 
   
  return true;
}

//Loading multiply frames function (for changing versions)

function setFrames(pageMain, pageLeft, pageTop)
{
	parent.content.document.location.href=pageMain+".html"
	parent.left.document.location.href=pageLeft+".html"
	document.location.href=pageTop+".html"
}


//Creating Cycling Banners

adImages1=new Array("assets/images/rocor1.gif","assets/images/rocor2.gif" )
adImages2=new Array("assets/images/roc1.gif","assets/images/roc2.gif" )
thisAd1 = 0
thisAd2 = 0
imgCt1 = adImages1.length
imgCt2 = adImages2.length

function rotate() 
{
		if(document.images)
		{
				thisAd1++
				if(thisAd1 == imgCt1)
				{
						thisAd1 = 0
				}
				document.adBanner1.src=adImages1[thisAd1]
				
				
				thisAd2++
				if(thisAd2 == imgCt2)
				{
						thisAd2 = 0
				}
				document.adBanner2.src=adImages2[thisAd2]
				
				setTimeout("rotate()",3*1000)
		}
}




